AD81: Checks to see if Wally should turn his head towards the camera.
Wally_TurnHead |
AD81 |
PUSH AF |
|
AD82 |
CP $00 |
|
AD84 |
JR Z,Wally_TurnHead_2 |
|
AD86 |
CP $10 |
|
AD88 |
JR Z,Wally_TurnHead_2 |
|
AD8A |
CP $0C |
|
AD8C |
JR Z,Wally_TurnHead_0 |
|
AD8E |
CP $1C |
|
AD90 |
JR Z,Wally_TurnHead_0 |
|
AD92 |
LD A,(Wally_HeadCountdown) |
|
AD95 |
OR A |
|
AD96 |
JR NZ,Wally_TurnHead_3 |
|
AD98 |
JR Wally_TurnHead_1 |
Wally_TurnHead_0 |
AD9A |
LD A,(Wally_HeadCountdown) |
|
AD9D |
OR A |
|
AD9E |
JR NZ,Wally_TurnHead_3 |
|
ADA0 |
LD (Wally_HeadTurned),A |
|
ADA3 |
LD A,R |
|
ADA5 |
AND $1F |
|
ADA7 |
LD (Wally_HeadCountdown),A |
Wally_TurnHead_1 |
ADAA |
POP AF |
|
ADAB |
RET |
Wally_TurnHead_2 |
ADAC |
LD A,(Wally_HeadCountdown) |
|
ADAF |
OR A |
|
ADB0 |
JR NZ,Wally_TurnHead_3 |
|
ADB2 |
INC A |
|
ADB3 |
LD (Wally_HeadTurned),A |
|
ADB6 |
JR Wally_TurnHead_1 |
Wally_TurnHead_3 |
ADB8 |
DEC A |
|
ADB9 |
LD (Wally_HeadCountdown),A |
|
ADBC |
JR Wally_TurnHead_1 |