.mods3 LDA #LO(HookForward) \ !&24DF = HookForward (address in a JSR STA &24DF \ instruction) LDA #HI(HookForward) STA &24E0 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 LDA #&A9 \ !&1310 = &A9 &88 (LDA #17*8 instruction) STA &1310 LDA #&88 STA &1311 LDA #22 \ Set A = 22 to pass to part 4 JMP mods4 \ Jump to part 4Name: ModifyGameCode (Part 3 of 4) [Show more] Type: Subroutine Category: Extra tracks Summary: Modify the game code to support the extra track dataContext: 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 four 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.
[X]
Subroutine HookForward (category: Extra tracks)
Move the player forward by an extra segment when edgeSegmentNumber is 10
[X]
Subroutine HookSlopeJump (category: Extra tracks)
Jump the car when driving fast over sloping segments
[X]
Label mods4 in subroutine ModifyGameCode (Part 4 of 4)