B58E: Draws the car
draw_car |
B58E |
AND A |
|
B58F |
JR NZ,draw_car_0 |
|
B591 |
LD ($A251),A |
draw_car_0 |
B594 |
LD C,A |
|
B595 |
PUSH BC |
|
B596 |
LD HL,$CF8E |
|
B599 |
RLCA |
|
B59A |
RLCA |
|
B59B |
LD C,A |
|
B59C |
LD B,$00 |
|
B59E |
ADD HL,BC |
|
B59F |
LD DE,$7860 |
|
B5A2 |
LD C,$07 |
|
B5A4 |
CALL sub_b627 |
|
B5A7 |
POP BC |
|
B5A8 |
LD A,$75 |
|
B5AA |
SUB $00 |
|
B5AC |
LD D,A |
|
B5AD |
LD A,C |
|
B5AE |
ADD A,B |
|
B5AF |
ADD A,$00 |
|
B5B1 |
CP $09 |
|
B5B3 |
JR C,draw_car_1 |
|
B5B5 |
SUB $09 |
draw_car_1 |
B5B7 |
LD HL,$CEDA |
|
B5BA |
ADD A,A |
|
B5BB |
ADD A,A |
|
B5BC |
LD C,A |
|
B5BD |
ADD A,A |
|
B5BE |
ADD A,A |
|
B5BF |
ADD A,C |
|
B5C0 |
LD C,A |
|
B5C1 |
LD B,$00 |
|
B5C3 |
ADD HL,BC |
|
B5C4 |
PUSH DE |
|
B5C5 |
LD A,($A22A) |
|
B5C8 |
ADD A,(HL) |
|
B5C9 |
NEG |
|
B5CB |
ADD A,D |
|
B5CC |
LD E,A |
|
B5CD |
AND $0F |
|
B5CF |
ADD A,$F0 |
|
B5D1 |
LD D,A |
|
B5D2 |
LD A,E |
|
B5D3 |
AND $70 |
|
B5D5 |
ADD A,A |
|
B5D6 |
ADD A,$0D |
|
B5D8 |
LD E,A |
|
B5D9 |
INC HL |
|
B5DA |
LD B,(HL) |
|
B5DB |
INC HL |
|
B5DC |
LD A,(HL) |
|
B5DD |
INC HL |
|
B5DE |
PUSH HL |
|
B5DF |
PUSH DE |
|
B5E0 |
LD H,(HL) |
|
B5E1 |
LD L,A |
|
B5E2 |
LD A,$05 |
|
B5E4 |
LD E,A |
|
B5E5 |
LD D,$00 |
|
B5E7 |
EXX |
|
B5E8 |
POP HL |
|
B5E9 |
EX AF,AF' |
|
B5EA |
LD A,($A251) |
|
B5ED |
AND A |
|
B5EE |
JR NZ,draw_car_perhaps_flipped |
|
B5F0 |
EX AF,AF' |
|
B5F1 |
CALL plot_sprite |
|
B5F4 |
JR draw_car_cont |
draw_car_perhaps_flipped |
B5F6 |
EX AF,AF' |
|
B5F7 |
DEC L |
|
B5F8 |
CALL plot_sprite_flipped |
draw_car_cont |
B5FB |
POP HL |
|
B5FC |
POP DE |
|
B5FD |
INC HL |
|
B5FE |
LD E,$68 |
|
B600 |
LD C,$05 |
|
B602 |
CALL sub_b627 |
|
B605 |
LD E,$68 |
|
B607 |
LD C,$05 |
|
B609 |
CALL sub_b627 |
|
B60C |
LD A,($A251) |
|
B60F |
AND A |
|
B610 |
LD C,$01 |
|
B612 |
LD E,$60 |
|
B614 |
JR Z,draw_car_2 |
|
B616 |
LD E,$90 |
draw_car_2 |
B618 |
CALL sub_b627 |
|
B61B |
LD C,$01 |
|
B61D |
LD A,($A251) |
|
B620 |
AND A |
|
B621 |
LD E,$60 |
|
B623 |
JR NZ,sub_b627 |
|
B625 |
LD E,$90 |
sub_b627 |
B627 |
LD A,D |
|
B628 |
PUSH DE |
|
B629 |
SUB (HL) |
|
B62A |
LD D,A |
|
B62B |
INC HL |
|
B62C |
LD B,(HL) |
|
B62D |
INC HL |
|
B62E |
LD A,(HL) |
|
B62F |
INC HL |
|
B630 |
PUSH HL |
|
B631 |
LD H,(HL) |
|
B632 |
LD L,A |
|
B633 |
PUSH BC |
|
B634 |
EXX |
|
B635 |
POP BC |
|
B636 |
LD A,($A251) |
|
B639 |
LD B,A |
|
B63A |
LD E,C |
|
B63B |
DEC C |
|
B63C |
AND A |
|
B63D |
JR NZ,draw_car_3 |
|
B63F |
LD C,A |
draw_car_3 |
B640 |
EXX |
|
B641 |
CALL sub_b67c_3 |
|
B644 |
POP HL |
|
B645 |
INC HL |
|
B646 |
POP DE |
|
B647 |
RET |