![]() |
Routines |
| Prev: A3DD | Up: Map | Next: A406 |
|
Used by the routine at Handle_Sabreman_Walking.
Handles Sabreman being touched by the falling stalactite. It is entered from A475 with the result of Check_Stalactite_Contact in C. Bit 7 of C is set when the stalactite is on the right of Sabreman or level with him, and bit 0 is set when it is at least 0A pixels away horizontally.
Sabreman is pushed away from the stalactite at a speed of 02. If bit 0 of C is clear (a direct hit), the routine goes to Start_Dying, which turns the sprite into the death sprite. Otherwise he starts to tumble with a jump upwards.
|
||||||||||
| Handle_Stalactite_Hit | A3E9 | BIT 7,C | Jump to Handle_Stalactite_Hit_Move_Left if bit 7 of the contact result is set. | |||||||
| A3EB | JR NZ,Handle_Stalactite_Hit_Move_Left | |||||||||
| A3ED | LD A,$02 | A=02 (move to the right). | ||||||||
| A3EF | JR Handle_Stalactite_Hit_Set_Velocity | Jump to Handle_Stalactite_Hit_Set_Velocity. | ||||||||
| Handle_Stalactite_Hit_Move_Left | A3F1 | LD A,$FE | A=FE (move to the left). | |||||||
| Handle_Stalactite_Hit_Set_Velocity | A3F3 | LD (IX+$06),A | Set the x velocity. | |||||||
| A3F6 | BIT 0,C | Jump to Start_Dying if the stalactite hit him directly. | ||||||||
| A3F8 | JP Z,Start_Dying | |||||||||
| A3FB | LD (IX+$00),$18 | Set the sprite id to 18 (tumbling). | ||||||||
| A3FF | LD (IX+$09),$C0 | Set the y velocity to C0 (up). | ||||||||
| A403 | JP Update_Object_Sprite | Jump to Update_Object_Sprite. | ||||||||
| Prev: A3DD | Up: Map | Next: A406 |