Prev: 61040 Up: Map Next: 61142
61083: Animate: Eating
*Active_MonsterActionCountdown is set to 6 at 61075. This is used as a countdown to display six frames of animation.
Animate_Eating 61083 LD A,(53835) A=*Active_MonsterActionCountdown.
61086 DEC A Decrease A by one.
61087 CP 255 Jump to Animate_Eating_Finished if the animation is finished.
61089 JR Z,Animate_Eating_Finished
61091 LD (53835),A Update the countdown at *Active_MonsterActionCountdown.
Select the "climbing" monster sprite.
The routine at DrawMonsterSprite handles which monster to display.
61094 LD A,9 A=sprite ID 9.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
9 sprite-9-left 73 sprite-73-left 137 sprite-137-left
Set the co-ordinates for where to draw.
61096 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
61100 CALL DrawMonsterSprite Call DrawMonsterSprite.
Again, set the co-ordinates for where to draw.
61103 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
Select the monster head sprite.
The routine at DrawMonsterSprite handles which monster to display.
61107 LD A,13 A=sprite ID 13.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
13 sprite-13-left 77 sprite-77-left 141 sprite-141-left
61109 CALL DrawMonsterSprite Call DrawMonsterSprite.
Now, set the co-ordinates for where to draw the mouth.
61112 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
61116 INC B Increment both the X and Y positions by one to target drawing the mouth animation.
61117 INC C
61118 LD A,(53835) Using *Active_MonsterActionCountdown, sequentially choose a frame between 0-3.
61121 AND %00000011
Calculate the sprite ID.
61123 ADD A,A A*=2.
61124 ADD A,43 A+=43.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
43 sprite-43-left 107 sprite-107-left 171 sprite-171-left
45 sprite-45-left 109 sprite-109-left 173 sprite-173-left
47 sprite-47-left 111 sprite-111-left 175 sprite-175-left
49 sprite-49-left 113 sprite-113-left 177 sprite-177-left
61126 CALL DrawMonsterSprite Call DrawMonsterSprite.
61129 RET Return.
The animation is complete.
Animate_Eating_Finished 61130 XOR A Write 0 to *JumpTable_Pointer.
61131 LD (53828),A
61134 LD A,25 Write 25 to *Active_MonsterActionCountdown.
61136 LD (53835),A
61139 JP Action_JumpTable Jump to Action_JumpTable.
Prev: 61040 Up: Map Next: 61142