AB7C: Main handler for moving Wally around.
Wally_Handler |
AB7C |
LD A,(Wally_CharAligned) |
|
AB7F |
OR A |
|
AB80 |
JR NZ,Wally_Handler_0 |
|
AB82 |
LD HL,(Wally_X) |
|
AB85 |
LD A,L |
|
AB86 |
ADD A,$08 |
|
AB88 |
LD L,A |
|
AB89 |
LD A,H |
|
AB8A |
ADD A,$20 |
|
AB8C |
LD H,A |
|
AB8D |
CALL A=ATTR(pixel_HY, pixel_LX) |
|
AB90 |
LD (Wally_ATTR),A |
|
AB93 |
LD A,($AE35) |
|
AB96 |
LD (Wally_ATTRAlt),A |
|
AB99 |
JR Wally_Handler_1 |
Wally_Handler_0 |
AB9B |
LD A,($AE38) |
|
AB9E |
LD (Wally_ATTRAlt),A |
|
ABA1 |
LD (Wally_ATTR),A |
Wally_Handler_1 |
ABA4 |
LD A,(IsArcadeMode) |
|
ABA7 |
OR A |
|
ABA8 |
JR NZ,Wally_Handler_2 |
|
ABAA |
LD A,(Wally_JumpDir) |
|
ABAD |
OR A |
|
ABAE |
JP NZ,Wally_JumpHandlerEntry |
Wally_Handler_2 |
ABB1 |
LD A,(Wally_Falling) |
|
ABB4 |
OR A |
|
ABB5 |
JP NZ,Wally_CheckFall |
|
ABB8 |
LD A,(Wally_ATTR) |
|
ABBB |
CP $45 |
|
ABBD |
JR Z,Wally_Handler_3 |
|
ABBF |
CP $42 |
|
ABC1 |
JR Z,Wally_Handler_3 |
|
ABC3 |
LD A,$01 |
|
ABC5 |
LD (Wally_Falling),A |
|
ABC8 |
JP Wally_CheckFall |
Wally_Handler_3 |
ABCB |
LD A,(Input_Flag) |
|
ABCE |
OR A |
|
ABCF |
JR Z,Wally_Handler_4 |
|
ABD1 |
IN A,($1F) |
|
ABD3 |
BIT 4,A |
|
ABD5 |
JP NZ,Wally_Jump |
|
ABD8 |
JR Wally_Handler_5 |
Wally_Handler_4 |
ABDA |
LD A,(Game_InputJumpAddr) |
|
ABDD |
IN A,($FE) |
|
ABDF |
OR $E0 |
|
ABE1 |
LD HL,Game_InputJump |
|
ABE4 |
OR (HL) |
|
ABE5 |
CP $FF |
|
ABE7 |
JP NZ,Wally_Jump |
Wally_Handler_5 |
ABEA |
XOR A |
|
ABEB |
LD (Wally_Dir),A |
|
ABEE |
LD A,(Input_Flag) |
|
ABF1 |
OR A |
|
ABF2 |
JR Z,Wally_Handler_6 |
|
ABF4 |
IN A,($1F) |
|
ABF6 |
BIT 0,A |
|
ABF8 |
JR NZ,Wally_Handler_7 |
|
ABFA |
JR Wally_Handler_8 |
Wally_Handler_6 |
ABFC |
LD A,(Game_InputRightAddr) |
|
ABFF |
IN A,($FE) |
|
AC01 |
OR $E0 |
|
AC03 |
LD HL,Game_InputRight |
|
AC06 |
OR (HL) |
|
AC07 |
CP $FF |
|
AC09 |
JR Z,Wally_Handler_8 |
Wally_Handler_7 |
AC0B |
LD A,$01 |
|
AC0D |
LD (Wally_Dir),A |
|
AC10 |
LD (Wall_LastDir),A |
|
AC13 |
JP Wally_Move |
Wally_Handler_8 |
AC16 |
LD A,(Input_Flag) |
|
AC19 |
OR A |
|
AC1A |
JR Z,Wally_Handler_9 |
|
AC1C |
IN A,($1F) |
|
AC1E |
BIT 1,A |
|
AC20 |
JR NZ,Wally_Handler_10 |
|
AC22 |
RET |
Wally_Handler_9 |
AC23 |
LD A,(Game_InputLeftAddr) |
|
AC26 |
IN A,($FE) |
|
AC28 |
OR $E0 |
|
AC2A |
LD HL,Game_InputLeft |
|
AC2D |
OR (HL) |
|
AC2E |
CP $FF |
|
AC30 |
RET Z |
Wally_Handler_10 |
AC31 |
LD A,$FF |
|
AC33 |
LD (Wally_Dir),A |
|
AC36 |
LD (Wall_LastDir),A |
|
AC39 |
JP Wally_Move |