![]() |
Routines |
| Prev: E894 | Up: Map | Next: E8BE |
|
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 18 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 0A is set to 14. The routine goes on at Continue_Sabreman_Tumbling to carry on with the tumbling.
|
||||||||
| Tumble_Sabreman | E8A2 | LD A,($5C78) | Fetch the low byte of FRAMES. | |||||
| E8A5 | AND %00000011 | Keep only the two low bits. | ||||||
| E8A7 | ADD A,$18 | Add 18. | ||||||
| E8A9 | LD (IX+$00),A | Set the sprite id. | ||||||
| E8AC | LD A,(IX+$0F) | Fetch the redraw flags. | ||||||
| E8AF | AND %11100111 | Reset bits 3 and 4. | ||||||
| E8B1 | LD (IX+$0F),A | Store the redraw flags. | ||||||
| E8B4 | DEC (IX+$03) | Move Sabreman up by one pixel. | ||||||
| E8B7 | LD (IX+$0A),$14 | Set the countdown to 14. | ||||||
| E8BB | JP Continue_Sabreman_Tumbling | Jump to Continue_Sabreman_Tumbling. | ||||||
| Prev: E894 | Up: Map | Next: E8BE |