![]() |
Routines |
| Prev: 61040 | Up: Map | Next: 61142 |
|
|
|||||||||||||||||||||||||||||||||||||||
|
*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.
|
|||||||||||||||||||||||||||||||||||||
|
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.
|
|||||||||||||||||||||||||||||||||||||
| 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.
|
|||||||||||||||||||||||||||||||||||||
| 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 |