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