Prev: AE2B Up: Map Next: AEBF
AE3B: Erase Wally and colour background.
Input
Output
Wally_Erase AE3B PUSH AF
AE3C PUSH DE
AE3D PUSH BC
AE3E LD HL,(Wally_X)
AE41 LD A,L
AE42 AND $07
AE44 LD (Wally_ShiftValue),A
AE47 SRL L
AE49 SRL L
AE4B SRL L
AE4D LD A,H
AE4E AND $07
AE50 JR NZ,Wally_Erase_0
AE52 LD D,$04
AE54 JR Wally_Erase_1
Wally_Erase_0 AE56 LD D,$05
Wally_Erase_1 AE58 LD A,H
AE59 AND $F8
AE5B LD H,A
AE5C LD A,D
AE5D LD E,L
AE5E LD D,$58
AE60 LD L,H
AE61 LD H,$00
AE63 ADD HL,HL
AE64 ADD HL,HL
AE65 ADD HL,DE
AE66 LD BC,Wally_BgColour
AE69 LD DE,$001E
Wally_Erase_2 AE6C PUSH AF
AE6D LD A,(BC)
AE6E LD (HL),A
AE6F INC BC
AE70 INC HL
AE71 LD A,(BC)
AE72 LD (HL),A
AE73 INC HL
AE74 INC BC
AE75 LD A,(Wally_ShiftValue)
AE78 OR A
AE79 JR Z,Wally_Erase_3
AE7B LD A,(BC)
AE7C LD (HL),A
Wally_Erase_3 AE7D INC BC
AE7E ADD HL,DE
AE7F POP AF
AE80 DEC A
AE81 JR NZ,Wally_Erase_2
AE83 POP BC
AE84 POP DE
AE85 POP AF
AE86 PUSH AF
AE87 PUSH BC
AE88 LD HL,(Wally_X)
AE8B LD (BitmapX),HL
AE8E LD A,($F188)
AE91 OR A
AE92 JR Z,Wally_Erase_5
AE94 LD A,(Wally_Frame)
AE97 LD C,A
AE98 CP $10
AE9A JR NC,Wally_Erase_4
AE9C ADD A,$3E
AE9E JR Wally_Erase_6
Wally_Erase_4 AEA0 ADD A,$2F
AEA2 JR Wally_Erase_6
Wally_Erase_5 AEA4 LD A,(Wally_Frame)
AEA7 LD C,A
Wally_Erase_6 AEA8 CALL Bitmap16Draw
AEAB LD A,H
AEAC ADD A,$10
AEAE LD (BitmapY),A
AEB1 LD A,C
AEB2 INC A
AEB3 CALL Bitmap16Draw
AEB6 LD A,(Wally_HeadTurned)
AEB9 LD ($F188),A
AEBC POP BC
AEBD POP AF
AEBE RET
Prev: AE2B Up: Map Next: AEBF