![]() |
Routines |
| Prev: 61012 | Up: Map | Next: 61082 |
|
Handler for the object types 52 to 55 the gargoyle (see Sprite_Gargoyle_1). It is a flying creature that is handled like the jellyfish (see Handle_Jellyfish), and it shares the routines that animate and move it.
When the gargoyle is in a different room x from Sabreman, its y velocity is set to a random 32 or 224 (see Choose_Random_Velocity) and Move_Creature_Horizontally moves it towards his room. When it is in the same room x but a different room y, its x velocity is set to a random 32 or 224 and Move_Creature_Vertically moves it towards his room. When it is in the same room as Sabreman it is animated and moves in the same way as the jellyfish (see Handle_Jellyfish_Set_X_Velocity).
|
||||||||
| Handle_Gargoyle | 61030 | CALL Read_World_Map | Read the world map entry of the room that the gargoyle is in. The flags of the room are returned in E. | |||||
| 61033 | LD A,(IX+11) | Fetch the contact flags of the gargoyle. | ||||||
| 61036 | OR E | Combine them with the flags of the room. | ||||||
| 61037 | LD E,A | Store the result in E. | ||||||
| 61038 | LD A,(36636) | Fetch the room x of Sabreman. | ||||||
| 61041 | CP (IX+2) | Jump to Handle_Gargoyle_Different_Room_X if the gargoyle is in a different room x. | ||||||
| 61044 | JR NZ,Handle_Gargoyle_Different_Room_X | |||||||
| 61046 | LD A,(36638) | Fetch the room y of Sabreman. | ||||||
| 61049 | CP (IX+4) | Jump to Handle_Gargoyle_Different_Room_Y if the gargoyle is in a different room y. | ||||||
| 61052 | JR NZ,Handle_Gargoyle_Different_Room_Y | |||||||
| 61054 | CALL Animate_Jellyfish | Animate the gargoyle. | ||||||
| 61057 | JP Handle_Jellyfish_Set_X_Velocity | Jump to Handle_Jellyfish_Set_X_Velocity to set the x velocity and to move the gargoyle. | ||||||
| Handle_Gargoyle_Different_Room_X | 61060 | PUSH AF | Stash the result of the comparison, as the carry flag says which way Sabreman's room is. | |||||
| 61061 | CALL Choose_Random_Velocity | Choose a velocity. | ||||||
| 61064 | LD (IX+9),A | Set the y velocity. | ||||||
| 61067 | POP AF | Restore the result of the comparison. | ||||||
| 61068 | JP Move_Creature_Horizontally | Jump to Move_Creature_Horizontally to move the gargoyle towards the room x of Sabreman. | ||||||
| Handle_Gargoyle_Different_Room_Y | 61071 | PUSH AF | Stash the result of the comparison, as the carry flag says which way Sabreman's room is. | |||||
| 61072 | CALL Choose_Random_Velocity | Choose a velocity. | ||||||
| 61075 | LD (IX+8),A | Set the x velocity. | ||||||
| 61078 | POP AF | Restore the result of the comparison. | ||||||
| 61079 | JP Move_Creature_Vertically | Jump to Move_Creature_Vertically to move the gargoyle towards the room y of Sabreman. | ||||||
| Prev: 61012 | Up: Map | Next: 61082 |