Prev: 26169 Up: Map Next: 26217
26195: Handle Monster Waiting
State 1 of the monster; it stays where it is for a short time, changing between its two frames every 8 frames.
Input
IX Actor
HandleMonster_Waiting 26195 DEC (IX+7) Decrease the timer in byte 7 of the actor by one.
26198 JR Z,HandleMonster_NextState Jump to HandleMonster_NextState if the timer is zero.
26200 LD A,(24349) Fetch the frame counter.
26203 AND %00000111 Keep only bits 0-2.
26205 JR NZ,HandleMonster_Draw Jump to HandleMonster_Draw unless the frame counter is a multiple of 8.
26207 LD A,(IX+0) Fetch the actor ID.
26210 XOR %00000001 Flip bit 0, which chooses the other frame of the monster.
26212 LD (IX+0),A Update the actor ID with the other frame of the monster.
26215 JR HandleMonster_Draw Jump to HandleMonster_Draw.
Prev: 26169 Up: Map Next: 26217