Prev: BDB5 Up: Map Next: BE29
BDC3: Animate Wally's Death
Used by the routine at Action08_BoxingGloveSafe.
Input
L Wally X pos.
D Y position of Wally's lower half.
Output
Wally_Death BDC3 LD A,L Get X position.
BDC4 LD H,D Get Y position of lower half.
BDC5 SUB $08 Adjust X position to left of standing position.
BDC7 JR NC,Wally_Death_0 Don't let it drop of the left hand of screen.
BDC9 XOR A
Wally_Death_0 BDCA CP $E0
BDCC JR C,Wally_Death_1
BDCE LD A,$E0 Don't let it drop of the right hand of screen.
Wally_Death_1 BDD0 LD L,A Update X position for drawing.
BDD1 LD (BitmapX),HL
BDD4 LD A,$4D Dead Wally graphic.
BDD6 CALL Bitmap16Draw
BDD9 LD A,L
BDDA ADD A,$10
BDDC LD (BitmapX),A
BDDF LD A,$4E
BDE1 CALL Bitmap16Draw
BDE4 LD B,$28 Wait for a little while, updating the room.
Wally_Death_2 BDE6 PUSH BC
BDE7 PUSH HL
BDE8 CALL Pause_Short
BDEB CALL Room_EventCaller
BDEE POP HL
BDEF POP BC
BDF0 DJNZ Wally_Death_2
Wally_Death_3 BDF2 PUSH HL Now float lying down Wally graphic up the screen.
BDF3 CALL Room_EventCaller Update room.
BDF6 CALL Pause_Short
BDF9 POP HL
BDFA LD (BitmapX),HL Draw Wally.
BDFD LD A,$4D
BDFF CALL Bitmap16Draw
BE02 LD A,L
BE03 ADD A,$10
BE05 LD (BitmapX),A
BE08 LD A,$4E
BE0A CALL Bitmap16Draw
BE0D DEC H
BE0E DEC H
BE0F LD A,H
BE10 CP $30 End of animation, move onto to losing a life.
BE12 JR C,Wally_Resurrect
BE14 LD (BitmapX),HL Erase Wally.
BE17 LD A,$4D
BE19 CALL Bitmap16Draw
BE1C LD A,L
BE1D ADD A,$10
BE1F LD (BitmapX),A
BE22 LD A,$4E
BE24 CALL Bitmap16Draw
BE27 JR Wally_Death_3
Prev: BDB5 Up: Map Next: BE29