![]() |
Routines |
| Prev: 57240 | Up: Map | Next: 57439 |
|
Handler for the object types 81 to 83 (the pieces of a stalactite that has landed). The counter in byte 6 goes up on every call. The type goes up by one on every second call, and when it would go past 83 the piece moves four pixels to the left and is destroyed (see Destroy_Creature). The piece is removed if Sabreman is not in the room.
|
||||||||
| Handle_Rock_Fragments | 57383 | CALL StoreEntity | Save the state of the piece. | |||||
| 57386 | LD A,(36636) | Fetch the room x of Sabreman. | ||||||
| 57389 | CP (IX+2) | Jump to Remove_Unseen_Weapon to remove the piece if it is in a different room x. | ||||||
| 57392 | JP NZ,Remove_Unseen_Weapon | |||||||
| 57395 | LD A,(36638) | Fetch the room y of Sabreman. | ||||||
| 57398 | CP (IX+4) | Jump to Remove_Unseen_Weapon to remove the piece if it is in a different room y. | ||||||
| 57401 | JP NZ,Remove_Unseen_Weapon | |||||||
| 57404 | INC (IX+6) | Increase the counter. | ||||||
| 57407 | BIT 0,(IX+6) | Jump to Update_Object_Sprite if the counter is odd. | ||||||
| 57411 | JP NZ,Update_Object_Sprite | |||||||
| 57414 | LD A,(IX+0) | Fetch the type. | ||||||
| 57417 | INC A | Add one. | ||||||
| 57418 | CP 84 | Jump to Handle_Rock_Fragments_Explode if the type is past 83. | ||||||
| 57420 | JR NC,Handle_Rock_Fragments_Explode | |||||||
| 57422 | LD (IX+0),A | Store the type. | ||||||
| 57425 | JP Update_Object_Sprite | Jump to Update_Object_Sprite. | ||||||
| Handle_Rock_Fragments_Explode | 57428 | LD A,(IX+1) | Fetch the x position. | |||||
| 57431 | SUB 4 | Subtract four. | ||||||
| 57433 | LD (IX+1),A | Store the x position. | ||||||
| 57436 | JP Destroy_Creature | Destroy the piece. | ||||||
| Prev: 57240 | Up: Map | Next: 57439 |