Prev: BDC3 Up: Map Next: BEE1
BE29: Lose a life, end game or resurrect Wally.
Used by the routines at Wally_Death and Update_RollRock.
Input
Output
Wally_Resurrect BE29 XOR A Reset the energy glass.
BE2A LD (MilkLevel),A
BE2D CALL Milk_DrawFull
BE30 LD HL,WallyLives Lose one life and update the scoreboard.
BE33 DEC (HL)
BE34 LD A,(HL)
BE35 ADD A,A
BE36 ADD A,A
BE37 ADD A,A
BE38 ADD A,A
BE39 LD (BitmapX),A
BE3C LD A,$10
BE3E LD (BitmapY),A
BE41 LD A,$4C
BE43 CALL Bitmap16Draw
BE46 LD A,(WallyLives) No more lives, so display the losing screen.
BE49 OR A
BE4A JP Z,Screen_YouLost
BE4D LD A,(Wally_RoomNo) Get the resurrect position, within the room, for Wally.
BE50 LD E,A
BE51 LD D,$00
BE53 LD HL,Wally_ResurectY
BE56 ADD HL,DE
BE57 LD A,(HL)
BE58 LD HL,Wally_ResurectX
BE5B ADD HL,DE
BE5C LD L,(HL)
BE5D LD H,A
BE5E LD (BitmapX),HL
BE61 LD A,$9F Index for 'puff of smoke' image, drawn to bring back Wally from the dead.
BE63 CALL Bitmap16Draw
BE66 LD A,H
BE67 ADD A,$10
BE69 LD (BitmapY),A
BE6C LD A,$9F
BE6E CALL Bitmap16Draw
BE71 CALL Pause_Short
BE74 LD D,$9F 'puff of smoke' animation start index.
BE76 LD B,$05 Number of frames.
Wally_Resurrect_0 BE78 LD (BitmapX),HL Animate smoke.
BE7B LD A,D
BE7C CALL Bitmap16Draw
BE7F LD A,H
BE80 ADD A,$10
BE82 LD (BitmapY),A
BE85 LD A,D
BE86 CALL Bitmap16Draw
BE89 INC D
BE8A LD (BitmapX),HL
BE8D LD A,D
BE8E CALL Bitmap16Draw
BE91 LD A,H
BE92 ADD A,$10
BE94 LD (BitmapY),A
BE97 LD A,D
BE98 CALL Bitmap16Draw Make sure the rest of the room is still animated.
BE9B PUSH HL
BE9C PUSH DE
BE9D PUSH BC
BE9E CALL Room_EventCaller
BEA1 CALL Pause_Short
BEA4 CALL Room_EventCaller
BEA7 CALL Pause_Short
BEAA POP BC
BEAB POP DE
BEAC POP HL
BEAD DJNZ Wally_Resurrect_0
BEAF LD (Wally_X),HL Make sure Wally is resurrected.
BEB2 LD (BitmapX),HL
BEB5 LD A,D
BEB6 CALL Bitmap16Draw
BEB9 LD A,H
BEBA ADD A,$10
BEBC LD (BitmapY),A
BEBF LD A,D
BEC0 CALL Bitmap16Draw
BEC3 LD SP,$0000
BEC6 XOR A
BEC7 LD (DeathFlag),A
BECA CALL Wally_Reset
BECD CALL Wally_Draw
BED0 LD A,(Wally_RoomNo) For all the normal rooms...
BED3 CP $1E
BED5 JP C,GameLoop
BED8 CALL Invaders_Init_YPos For the special arcade room...
BEDB CALL Invaders_Init
BEDE JP Invaders_Loop
Prev: BDC3 Up: Map Next: BEE1