Prev: 6D12 Up: Map Next: 6E32
6D73: Handler: Accelerate
Used by the routines at HandlerCanAccelerate and 6D12.
Increase speed (see HandlerCanAccelerate).
HandlerAccelerate 6D73 LD ($5E0D),A Write A to Speed.
This entry point is used by the routines at HandlerCanAccelerate and 6D12.
HandlerAccelerate_0 6D76 LD A,($5E0D) A=Speed.
6D79 LD HL,$49E2 HL=49E2.
6D7C CALL DrawGaugeLine Call DrawGaugeLine.
6D7F LD A,($5E11) A=5E11.
6D82 INC A Increment A by one.
6D83 LD C,A Store the result in C.
6D84 LD A,($5E10) A=Player_Direction.
6D87 RRA Shift A right three times.
6D88 RRA
6D89 RRA
6D8A AND %00011111 Keep bits 0-4.
6D8C BIT 0,C
6D8E JR NZ,HandlerAccelerate_1
6D90 XOR %00011111 Unset bits 0-4.
HandlerAccelerate_1 6D92 LD E,A Create an offset; E=A and D=00.
6D93 LD D,$00
6D95 PUSH DE Stash DE on the stack.
6D96 LD HL,$7F6B HL=7F6B + offset.
6D99 ADD HL,DE
6D9A LD A,($5E0D) Create an offset; E=Speed and D=00.
6D9D LD E,A
6D9E LD D,$00
6DA0 PUSH DE Stash DE on the stack.
6DA1 LD A,(HL)
6DA2 CALL $6F2F Call 6F2F.
6DA5 LD A,($5E09) A=5E09.
6DA8 LD DE,($5E07) DE=5E07.
6DAC CALL $6EC2 Call 6EC2.
6DAF BIT 1,C
6DB1 JR NZ,HandlerAccelerate_6
6DB3 ADD HL,DE
6DB4 ADC A,$00
6DB6 CP $0C
6DB8 JR NC,HandlerAccelerate_7
HandlerAccelerate_2 6DBA LD ($5E09),A Store A at 5E09.
6DBD LD ($5E07),HL Store HL at 5E07.
HandlerAccelerate_3 6DC0 POP HL
6DC1 POP DE
6DC2 PUSH HL
6DC3 LD HL,$7F8A HL=7F8A.
6DC6 AND A
6DC7 SBC HL,DE
6DC9 LD A,(HL)
6DCA POP DE
6DCB CALL $6F2F Call 6F2F.
6DCE LD A,($5E06) A=5E06.
6DD1 LD DE,($5E04) DE=5E04.
6DD5 CALL $6EC2 Call 6EC2.
6DD8 DEC C
6DD9 BIT 1,C
6DDB JR NZ,$6E32
6DDD ADD HL,DE
6DDE ADC A,$00
6DE0 CP $18
6DE2 JR NC,HandlerAccelerate_8
This entry point is used by the routine at 6E32.
HandlerAccelerate_4 6DE4 LD ($5E04),HL
6DE7 LD ($5E06),A
HandlerAccelerate_5 6DEA CALL $6C2D Call 6C2D.
6DED JR $6E43 Jump to 6E43.
HandlerAccelerate_6 6DEF EX DE,HL
6DF0 AND A
6DF1 SBC HL,DE
6DF3 SBC A,$00
6DF5 JR NZ,HandlerAccelerate_2
6DF7 EX AF,AF'
6DF8 LD A,H
6DF9 CP $80
6DFB JR C,HandlerAccelerate_7
6DFD EX AF,AF'
6DFE JR HandlerAccelerate_2
HandlerAccelerate_7 6E00 LD A,($5E11)
6E03 XOR $01
6E05 LD ($5E11),A
6E08 LD A,($5E10)
6E0B CPL
6E0C LD ($5E10),A
6E0F LD A,$05
6E11 LD ($5E45),A
6E14 CALL SoundsBounce
6E17 JR HandlerAccelerate_3
This entry point is used by the routine at 6E32.
HandlerAccelerate_8 6E19 LD A,($5E11)
6E1C XOR $03
6E1E LD ($5E11),A
6E21 LD A,($5E10)
6E24 CPL
6E25 LD ($5E10),A
6E28 LD A,$05
6E2A LD ($5E45),A
6E2D CALL SoundsBounce
6E30 JR HandlerAccelerate_5
Prev: 6D12 Up: Map Next: 6E32