Skip to navigation


Extra tracks: ModifyGameCode (Part 3 of 3)

Name: ModifyGameCode (Part 3 of 3) [Show more] Type: Subroutine Category: Extra tracks Summary: Modify the game code to support the extra track data
Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file

The code modifications are done in three parts. This is also where the zTrackSegmentI table is built, once the modifications have been done. The routine is padded out to be exactly 40 bytes long, so there's one byte for each inner segment z-coordinate.
.mods3 LDA #4 \ ?&3574 = 4 (object dimension in objectTop) STA &3574 LDA #11 \ ?&35F4 = 11 (object dimension in objectBottom) STA &35F4 LDA #LO(HookSlopeJump) \ !&45CC = HookSlopeJump (address in a JSR instruction) STA &45CC LDA #HI(HookSlopeJump) STA &45CD LDA #75 \ ?&2772 = 75 (argument in a CMP #75 instruction) STA &2772 RTS \ Return from the subroutine EQUB &00, &00 \ These bytes pad the routine out to exactly 40 bytes EQUB &00, &00 EQUB &00, &00 EQUB &00, &00 EQUB &00, &00 EQUB &00, &00 EQUB &00, &00