Prev: 6FBF Up: Map Next: 6FFC
6FC0: Handler: Jumps
If you hit a jump too fast or too slow the bike will crash.
Handler_Jumps 6FC0 LD DE,$0000 DE=0000.
6FC3 LD A,($7822) A=*Speed.
Check if the speed was too fast.
The parameters are quite wide;
Direction Bike Range Crash Point
Lowest Highest
Left 69 7F < 6A
Right 80 96 > 96
6FC6 CP $96 Jump to Initialise_CrashJumpTooFast if A is higher than 96.
6FC8 JR NC,Initialise_CrashJumpTooFast
6FCA LD E,$42 E=42.
6FCC CP $6A Jump to Initialise_CrashJumpTooFast if A is lower than 6A.
6FCE JR C,Initialise_CrashJumpTooFast
6FD0 LD E,$23 E=23.
Check if the speed was too slow.
The parameters are again, quite wide;
Direction Bike Range Crash Point
Lowest Highest
Left 69 7F > 70
Right 80 96 < 90
6FD2 CP $90 Return if A is higher than 90.
6FD4 RET NC
6FD5 CP $70 Return if A is lower than 70.
6FD7 RET C
6FD8 BIT 7,A Jump to Initialise_CrashJumpTooFast if *Speed is higher than 80 (i.e. moving right).
6FDA JR NZ,Initialise_CrashJumpTooFast
6FDC LD E,$65 E=65.
Initialise_CrashJumpTooFast 6FDE RLCA RLCA.
6FDF LD HL,($782E) HL=*782E.
6FE2 JR C,Handler_Jumps_0 Jump to Handler_Jumps_0 if {} is lower.
6FE4 DEC L Decrease L by two.
6FE5 DEC L
Handler_Jumps_0 6FE6 INC L Increment L by one.
6FE7 LD A,(HL) A=*HL.
6FE8 LD HL,$BD34 HL=BD34.
6FEB CP $43 Jump to Handler_Jumps_1 if A is lower than 43.
6FED JR C,Handler_Jumps_1
6FEF LD HL,$C400 HL=C400.
Handler_Jumps_1 6FF2 ADD HL,DE HL+=DE.
6FF3 LD ($783A),HL Write HL to *783A.
6FF6 LD A,$04 Write 04 to *Action.
6FF8 LD ($782A),A
6FFB RET Return.
Prev: 6FBF Up: Map Next: 6FFC