Prev: EE70 Up: Map Next: EED6
EE9B: Animate: Eating
*Active_MonsterActionCountdown is set to 06 at EE93. This is used as a countdown to display six frames of animation.
Animate_Eating EE9B LD A,($D24B) A=*Active_MonsterActionCountdown.
EE9E DEC A Decrease A by one.
EE9F CP $FF Jump to Animate_Eating_Finished if the animation is finished.
EEA1 JR Z,Animate_Eating_Finished
EEA3 LD ($D24B),A Update the countdown at *Active_MonsterActionCountdown.
Select the "climbing" monster sprite.
The routine at DrawMonsterSprite handles which monster to display.
EEA6 LD A,$09 A=sprite ID 09.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
09 sprite-9-left 49 sprite-73-left 89 sprite-137-left
Set the co-ordinates for where to draw.
EEA8 LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
EEAC CALL DrawMonsterSprite Call DrawMonsterSprite.
Again, set the co-ordinates for where to draw.
EEAF LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
Select the monster head sprite.
The routine at DrawMonsterSprite handles which monster to display.
EEB3 LD A,$0D A=sprite ID 0D.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
0D sprite-13-left 4D sprite-77-left 8D sprite-141-left
EEB5 CALL DrawMonsterSprite Call DrawMonsterSprite.
Now, set the co-ordinates for where to draw the mouth.
EEB8 LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
EEBC INC B Increment both the X and Y positions by one to target drawing the mouth animation.
EEBD INC C
EEBE LD A,($D24B) Using *Active_MonsterActionCountdown, sequentially choose a frame between 00-03.
EEC1 AND %00000011
Calculate the sprite ID.
EEC3 ADD A,A A*=02.
EEC4 ADD A,$2B A+=2B.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
2B sprite-43-left 6B sprite-107-left AB sprite-171-left
2D sprite-45-left 6D sprite-109-left AD sprite-173-left
2F sprite-47-left 6F sprite-111-left AF sprite-175-left
31 sprite-49-left 71 sprite-113-left B1 sprite-177-left
EEC6 CALL DrawMonsterSprite Call DrawMonsterSprite.
EEC9 RET Return.
The animation is complete.
Animate_Eating_Finished EECA XOR A Write 00 to *JumpTable_Pointer.
EECB LD ($D244),A
EECE LD A,$19 Write 19 to *Active_MonsterActionCountdown.
EED0 LD ($D24B),A
EED3 JP Action_JumpTable Jump to Action_JumpTable.
Prev: EE70 Up: Map Next: EED6