![]() |
Routines |
| Prev: 59540 | Up: Map | Next: 59582 |
|
Used by the routines at Handle_Sabreman_Walking and Handle_Sabreman_Falling.
Makes Sabreman tumble after a creature has hit him (see Handle_Flying_Creature), which sets bit 3 of his redraw flags. The sprite id is 24 plus a random number from zero to three (the low bits of FRAMES). Bits 3 and 4 of the redraw flags are reset, he moves up by one pixel, and the countdown in byte 10 is set to 20. The routine goes on at Continue_Sabreman_Tumbling to carry on with the tumbling.
|
||||||||
| Tumble_Sabreman | 59554 | LD A,(23672) | Fetch the low byte of FRAMES. | |||||
| 59557 | AND %00000011 | Keep only the two low bits. | ||||||
| 59559 | ADD A,24 | Add 24. | ||||||
| 59561 | LD (IX+0),A | Set the sprite id. | ||||||
| 59564 | LD A,(IX+15) | Fetch the redraw flags. | ||||||
| 59567 | AND %11100111 | Reset bits 3 and 4. | ||||||
| 59569 | LD (IX+15),A | Store the redraw flags. | ||||||
| 59572 | DEC (IX+3) | Move Sabreman up by one pixel. | ||||||
| 59575 | LD (IX+10),20 | Set the countdown to 20. | ||||||
| 59579 | JP Continue_Sabreman_Tumbling | Jump to Continue_Sabreman_Tumbling. | ||||||
| Prev: 59540 | Up: Map | Next: 59582 |