Prev: 91BB Up: Map Next: 930C
91E2: Routine at 91E2
91E2 LD A,($5E6C) If 5E6C is not zero, jump to 9267.
91E5 AND A
91E6 JR NZ,$9267
91E8 LD HL,$9000 Write 9000 to FuelLevel_1.
91EB LD ($608E),HL
91EE LD A,H A=H.
91EF LD HL,$1040 HL=1040.
91F2 CALL DrawGauge Call DrawGauge.
91F5 CALL HandlerControls Call HandlerControls.
91F8 BIT 0,A
91FA JP Z,$92CB
91FD BIT 1,A
91FF JP Z,$92BA
9202 LD A,(IX+$05)
9205 AND A
9206 JR Z,$9211
9208 JP P,$920F
920B ADD A,$01
920D JR $9211 Jump to 9211.
920F SUB $01
9211 LD (IX+$05),A
9214 LD HL,($607A)
9217 BIT 7,(IX+$05)
921B JP NZ,$92B4
921E LD DE,$FFF8 DE=FFF8.
9221 ADD HL,DE HL+=DE.
9222 SRA H
9224 RR L
9226 SRA H
9228 RR L
922A SRA H
922C RR L
922E LD A,H
922F AND %00000011 Keep only bits 0-1.
9231 LD H,A H=A.
9232 LD B,$06 B=06.
9234 EX DE,HL Switch the DE and HL registers.
9235 LD HL,$7000 HL=TerrainData_Active.
9238 ADD HL,DE HL+=DE.
9239 LD A,(HL)
923A AND A
923B JR Z,$924A
923D AND %00001000 Keep only bit 3.
923F JR NZ,$924A
9241 INC DE
9242 LD A,D
9243 AND %00000011 Keep only bits 0-1.
9245 LD D,A D=A.
9246 DJNZ $9235
9248 JR $9250 Jump to 9250.
924A LD (IX+$05),$00
924E JR $9264
9250 LD A,(IX+$05)
9253 AND A
9254 JR Z,$9264
9256 JP M,$92A7
9259 LD A,(IX+$02)
925C RRA
925D AND $03
925F ADD A,$16
9261 LD (IX+$00),A
9264 CALL $907B
9267 CALL $877C
926A LD A,($5E6C)
926D AND A
926E JR Z,$9277
9270 INC A
9271 LD ($5E6C),A
9274 JP $9F3F
9277 CALL $B87E
927A LD DE,$BC9E
927D CALL $890A
9280 CALL $AD22
9283 CALL $933E
9286 CALL NZ,$92DC
9289 LD A,($FF54)
928C CP $51
928E RET NZ
928F LD A,($5E40)
9292 AND $7F
9294 RET NZ
9295 LD A,($5E42)
9298 AND $0E
929A LD C,A
929B LD B,$00
929D LD HL,$9DB0
92A0 ADD HL,BC
92A1 LD E,(HL)
92A2 INC HL
92A3 LD D,(HL)
92A4 JP $B9BC
92A7 LD A,(IX+$02)
92AA RRA
92AB AND $03
92AD ADD A,$12
92AF LD (IX+$00),A
92B2 JR $9264
92B4 LD DE,$FFF0
92B7 JP $9221
92BA LD A,(IX+$05)
92BD AND A
92BE JP P,$92C6
92C1 CP $E8
92C3 JP C,$9211
92C6 SUB $02
92C8 JP $9211
92CB LD A,(IX+$05)
92CE AND A
92CF JP M,$92D7
92D2 CP $28
92D4 JP NC,$9211
92D7 ADD A,$02
92D9 JP $9211
92DC CALL $B8C3
92DF LD HL,$607A
92E2 LD DE,$6092
92E5 LD BC,$000E
92E8 LDIR
92EA LD (IX+$01),$78
92EE LD A,(IX+$00)
92F1 CP $16
92F3 JR NC,$9304
92F5 LD (IX+$00),$09
92F9 LD A,$1A
92FB LD ($6090),A
92FE CALL $8634
9301 JP $AD33
9304 LD (IX+$00),$0D
9308 LD A,$22
930A JR $92FB
Prev: 91BB Up: Map Next: 930C