![]() |
Routines |
| Prev: EA04 | Up: Map | Next: EA43 |
|
This isn't the entire falling animation rather the "comedy" part - where the monster realises they are about to fall, and cartoon-ishly they hover in the air for a few frames before falling.
|
|||||||||||||||||||||
| Action_Falling | EA18 | LD A,($D24A) | Decrease *Active_MonsterAboutToFallCountdown by one. | ||||||||||||||||||
| EA1B | DEC A | ||||||||||||||||||||
| EA1C | LD ($D24A),A | ||||||||||||||||||||
| EA1F | JR Z,Action_Falling_Finished | Jump to Action_Falling_Finished if *Active_MonsterAboutToFallCountdown is zero. | |||||||||||||||||||
|
The animation is in-progress so select the "Oh No" head sprite.
The routine at DrawMonsterSprite handles which monster to display.
|
|||||||||||||||||||||
| EA21 | LD A,$19 | A=sprite ID 19.
|
|||||||||||||||||||
|
Set the co-ordinates for where to draw.
|
|||||||||||||||||||||
| EA23 | LD BC,($D24D) | BC=*Active_MonsterXPosition/Active_MonsterYPosition. | |||||||||||||||||||
| EA27 | CALL DrawMonsterSprite | Call DrawMonsterSprite. | |||||||||||||||||||
|
Again, set the co-ordinates for where to draw.
|
|||||||||||||||||||||
| EA2A | LD BC,($D24D) | BC=*Active_MonsterXPosition/Active_MonsterYPosition. | |||||||||||||||||||
| EA2E | INC B | Increment the Y position by two to draw the lower section of the monsters body. | |||||||||||||||||||
| EA2F | INC B | ||||||||||||||||||||
|
The routine at DrawMonsterSprite handles which monster to display.
|
|||||||||||||||||||||
| EA30 | LD A,$23 | A=sprite ID 23.
|
|||||||||||||||||||
| EA32 | CALL DrawMonsterSprite | Call DrawMonsterSprite. | |||||||||||||||||||
| EA35 | RET | Return. | |||||||||||||||||||
|
The hovering-in-the-air animation is done so progress to the next state.
|
|||||||||||||||||||||
| Action_Falling_Finished | EA36 | LD A,$03 | Write 03 to *Active_MonsterAboutToFallCountdown. | ||||||||||||||||||
| EA38 | LD ($D24A),A | ||||||||||||||||||||
| EA3B | LD A,$08 | Write 08 to *JumpTable_Pointer. | |||||||||||||||||||
| EA3D | LD ($D244),A | ||||||||||||||||||||
| EA40 | JP Action_JumpTable | Jump to Action_JumpTable. | |||||||||||||||||||
| Prev: EA04 | Up: Map | Next: EA43 |