AF01: Draw Wally.
Wally_Draw |
AF01 |
PUSH AF |
|
AF02 |
PUSH BC |
|
AF03 |
LD HL,(Wally_X) |
|
AF06 |
LD (BitmapX),HL |
|
AF09 |
LD A,($F188) |
|
AF0C |
OR A |
|
AF0D |
JR Z,Wally_Draw_1 |
|
AF0F |
LD A,(Wally_Frame) |
|
AF12 |
LD C,A |
|
AF13 |
CP $10 |
|
AF15 |
JR NC,Wally_Draw_0 |
|
AF17 |
ADD A,$3E |
|
AF19 |
JR Wally_Draw_2 |
Wally_Draw_0 |
AF1B |
ADD A,$2F |
|
AF1D |
JR Wally_Draw_2 |
Wally_Draw_1 |
AF1F |
LD A,(Wally_Frame) |
|
AF22 |
LD C,A |
Wally_Draw_2 |
AF23 |
CALL Bitmap16Draw |
|
AF26 |
LD A,H |
|
AF27 |
ADD A,$10 |
|
AF29 |
LD (BitmapY),A |
|
AF2C |
LD A,C |
|
AF2D |
INC A |
|
AF2E |
CALL Bitmap16Draw |
|
AF31 |
PUSH DE |
|
AF32 |
LD HL,(Wally_X) |
|
AF35 |
LD A,L |
|
AF36 |
AND $07 |
|
AF38 |
LD (Wally_ShiftValue),A |
|
AF3B |
SRL L |
|
AF3D |
SRL L |
|
AF3F |
SRL L |
|
AF41 |
LD A,H |
|
AF42 |
AND $07 |
|
AF44 |
LD (Wally_CharAligned),A |
|
AF47 |
JR NZ,Wally_Draw_3 |
|
AF49 |
LD D,$04 |
|
AF4B |
JR Wally_Draw_4 |
Wally_Draw_3 |
AF4D |
LD D,$05 |
Wally_Draw_4 |
AF4F |
LD A,H |
|
AF50 |
AND $F8 |
|
AF52 |
LD H,A |
|
AF53 |
LD A,D |
|
AF54 |
LD E,L |
|
AF55 |
LD D,$58 |
|
AF57 |
LD L,H |
|
AF58 |
LD H,$00 |
|
AF5A |
ADD HL,HL |
|
AF5B |
ADD HL,HL |
|
AF5C |
ADD HL,DE |
|
AF5D |
LD BC,Wally_BgColour |
|
AF60 |
LD DE,$001E |
Wally_Draw_5 |
AF63 |
PUSH AF |
|
AF64 |
LD A,(HL) |
|
AF65 |
LD (BC),A |
|
AF66 |
LD (HL),$46 |
|
AF68 |
INC BC |
|
AF69 |
INC HL |
|
AF6A |
LD A,(HL) |
|
AF6B |
LD (BC),A |
|
AF6C |
LD (HL),$46 |
|
AF6E |
INC HL |
|
AF6F |
INC BC |
|
AF70 |
LD A,(Wally_ShiftValue) |
|
AF73 |
OR A |
|
AF74 |
JR Z,Wally_Draw_6 |
|
AF76 |
LD A,(HL) |
|
AF77 |
LD (BC),A |
|
AF78 |
LD (HL),$46 |
Wally_Draw_6 |
AF7A |
INC BC |
|
AF7B |
ADD HL,DE |
|
AF7C |
POP AF |
|
AF7D |
DEC A |
|
AF7E |
JR NZ,Wally_Draw_5 |
|
AF80 |
POP DE |
|
AF81 |
POP BC |
|
AF82 |
POP AF |
|
AF83 |
RET |