Prev: 6FFC Up: Map Next: 7047
6FFD: Handler: Downhill
If you hit a downhill too fast the bike will launch (crash) and you fall off.
The parameters are quite wide though;
Direction Bike Range Crash Point
Lowest Highest
Left 69 7F < 6A
Right 80 96 > 96
Handler_Downhill 6FFD LD A,($7822) A=*Speed.
7000 CP $96 Jump to Initialise_CrashDownhill if the players speed is higher than or equal to 96.
7002 JR NC,Initialise_CrashDownhill
7004 CP $6A Return if A is higher than 6A.
7006 RET NC
Initialise_CrashDownhill 7007 LD HL,$BC9E HL=BC9E.
700A LD DE,($782E) DE=*782E.
700E INC D Increment D by one.
700F LD B,A Store speed in B temporarily.
7010 LD A,$03 Write 03 to *Action.
7012 LD ($782A),A
7015 LD A,B Restore the current speed back to A.
7016 RLCA RLCA.
7017 JR NC,Handler_Downhill_2 Jump to Handler_Downhill_2 if A is higher.
7019 INC E Increment E by one.
701A JR NZ,Handler_Downhill_0 Jump to Handler_Downhill_0 if E is not zero.
701C LD A,D D+=05.
701D ADD A,$05
701F LD D,A
Handler_Downhill_0 7020 LD A,(DE) A=*DE.
7021 CP $0B Jump to Handler_Downhill_1 if A is equal to 0B.
7023 JR Z,Handler_Downhill_1
7025 CP $1E Jump to Handler_Downhill_5 if A is not equal to 1E.
7027 JR NZ,Handler_Downhill_5
Handler_Downhill_1 7029 LD L,$B3 L=B3.
702B JR Handler_Downhill_5 Jump to Handler_Downhill_5.
Handler_Downhill_2 702D LD L,$D6 L=D6.
702F LD A,E A=E.
7030 DEC E Decrease E by one.
7031 AND A Jump to Handler_Downhill_3 if A is not zero.
7032 JR NZ,Handler_Downhill_3
7034 LD A,D D-=05.
7035 SUB $05
7037 LD D,A
Handler_Downhill_3 7038 LD A,(DE) A=*DE.
7039 CP $0A Jump to Handler_Downhill_4 if A is equal to 0A.
703B JR Z,Handler_Downhill_4
703D CP $1F Jump to Handler_Downhill_5 if A is not equal to 1F.
703F JR NZ,Handler_Downhill_5
Handler_Downhill_4 7041 LD L,$EB L=EB.
Handler_Downhill_5 7043 LD ($783A),HL Write HL to *783A.
7046 RET Return.
Prev: 6FFC Up: Map Next: 7047