![]() |
Routines |
| Prev: 60341 | Up: Map | Next: 60382 |
|
Used by the routine at Handle_Sabreman_Falling.
Makes Sabreman tumble (see Handle_Sabreman_Tumbling) when he is knocked about while he jumps or falls. The type of the object is set to 24 which is the first frame of the tumbling Sabreman.
The x position is then limited so that he does not tumble into the wall: it is kept below 192 when the room has a wall on the right, and below 232 when it does not.
|
||||||||
| Start_Tumbling_Inside_Walls | 60352 | LD (IX+0),24 | Set the type of the object to 24 the tumbling Sabreman. | |||||
| 60356 | CALL Read_World_Map | Fetch the frame flags of the room into E. | ||||||
| 60359 | BIT 2,E | Test bit 2 of the frame flags, which is set when the room has a wall on the right. | ||||||
| 60361 | LD A,(IX+1) | Fetch the x position of the object. | ||||||
| 60364 | JR Z,Start_Tumbling_Inside_Walls_No_Wall | Jump to Start_Tumbling_Inside_Walls_No_Wall if there is no wall on the right. | ||||||
| 60366 | CP 192 | Return if the x position is less than 192. | ||||||
| 60368 | RET C | |||||||
| 60369 | LD (IX+1),192 | Limit the x position to 192. | ||||||
| 60373 | RET | Return. | ||||||
| Start_Tumbling_Inside_Walls_No_Wall | 60374 | CP 232 | Return if the x position is less than 232. | |||||
| 60376 | RET C | |||||||
| 60377 | LD (IX+1),232 | Limit the x position to 232. | ||||||
| 60381 | RET | Return. | ||||||
| Prev: 60341 | Up: Map | Next: 60382 |