![]() |
Routines |
| Prev: EA18 | Up: Map | Next: EA9C |
|
|
|||||||||||||||||||||
|
Select the "Oh No" head sprite.
The routine at DrawMonsterSprite handles which monster to display.
|
|||||||||||||||||||||
| Animate_Falling | EA43 | LD A,$19 | A=sprite ID 19.
|
||||||||||||||||||
|
Set the co-ordinates for where to draw.
|
|||||||||||||||||||||
| EA45 | LD BC,($D24D) | BC=*Active_MonsterXPosition/Active_MonsterYPosition. | |||||||||||||||||||
| EA49 | CALL DrawMonsterSprite | Call DrawMonsterSprite. | |||||||||||||||||||
|
Again, set the co-ordinates for where to draw.
|
|||||||||||||||||||||
| EA4C | LD BC,($D24D) | BC=*Active_MonsterXPosition/Active_MonsterYPosition. | |||||||||||||||||||
| EA50 | INC B | Increment the Y position by two to draw the lower section of the monsters body. | |||||||||||||||||||
| EA51 | INC B | ||||||||||||||||||||
|
The routine at DrawMonsterSprite handles which monster to display.
|
|||||||||||||||||||||
| EA52 | LD A,$23 | A=sprite ID 23.
|
|||||||||||||||||||
| EA54 | CALL DrawMonsterSprite | Call DrawMonsterSprite. | |||||||||||||||||||
|
Apply gravity.
|
|||||||||||||||||||||
| EA57 | CALL Handler_IncrementMonsterYPosition | Call Handler_IncrementMonsterYPosition. | |||||||||||||||||||
| EA5A | CP $12 | Jump to Animate_HitTheFloor if monster Y position is equal to 12. | |||||||||||||||||||
| EA5C | JR Z,Animate_HitTheFloor | ||||||||||||||||||||
| EA5E | LD A,($D24B) | Decrease *Active_MonsterActionCountdown by one. | |||||||||||||||||||
| EA61 | DEC A | ||||||||||||||||||||
| EA62 | LD ($D24B),A | ||||||||||||||||||||
| EA65 | CP $12 | Return if *Active_MonsterActionCountdown is higher than 12. | |||||||||||||||||||
| EA67 | RET NC | ||||||||||||||||||||
| EA68 | CALL Handler_IncrementMonsterYPosition | Call Handler_IncrementMonsterYPosition. | |||||||||||||||||||
| EA6B | CP $12 | Return if A is not equal to 12. | |||||||||||||||||||
| EA6D | RET NZ | ||||||||||||||||||||
|
Monster is now at ground level.
|
|||||||||||||||||||||
| Animate_HitTheFloor | EA6E | LD A,$12 | Write 12 to *Active_MonsterYPosition. | ||||||||||||||||||
| EA70 | LD ($D24E),A | ||||||||||||||||||||
| EA73 | LD A,$0C | Write 0C to *Active_MonsterActionCountdown. | |||||||||||||||||||
| EA75 | LD ($D24B),A | ||||||||||||||||||||
| EA78 | XOR A | Set *Flag_MonsterClimbing to "not climbing" (00). | |||||||||||||||||||
| EA79 | LD ($D246),A | ||||||||||||||||||||
| EA7C | LD A,($D244) | Jump to HitTheFloor_Finished if *JumpTable_Pointer is not equal to 20. | |||||||||||||||||||
| EA7F | CP $20 | ||||||||||||||||||||
| EA81 | JR NZ,HitTheFloor_Finished | ||||||||||||||||||||
| EA83 | LD A,$21 | A=21. | |||||||||||||||||||
| EA85 | JP Action_JumpTable | Jump to Action_JumpTable. | |||||||||||||||||||
|
The monster still has energy, so finish this animation sequence.
|
|||||||||||||||||||||
| HitTheFloor_Finished | EA88 | LD A,$09 | Write 09 to *JumpTable_Pointer. | ||||||||||||||||||
| EA8A | LD ($D244),A | ||||||||||||||||||||
| EA8D | LD IY,$D244 | IY=JumpTable_Pointer. | |||||||||||||||||||
|
Take off four hit points from the monsters energy.
|
|||||||||||||||||||||
| EA91 | LD A,$04 | A=04. | |||||||||||||||||||
| EA93 | CALL Handler_DecreaseEnergy | Call Handler_DecreaseEnergy. | |||||||||||||||||||
|
Make the splat sound.
|
|||||||||||||||||||||
| EA96 | LD A,$05 | Write melody ID 05 to *MelodyID. | |||||||||||||||||||
| EA98 | LD ($FF8D),A | ||||||||||||||||||||
| EA9B | RET | Return. | |||||||||||||||||||
| Prev: EA18 | Up: Map | Next: EA9C |