![]() |
Routines |
| Prev: 42220 | Up: Map | Next: 42349 |
|
Used by the routine at MoveHunter.
Sets the flags of the type of an enemy, which select how its sprite is flipped, according to the direction that it is heading in.
|
||||||||
| FaceEnemy | 42320 | RES 7,(IX+0) | Do not flip the sprite... | |||||
| 42324 | RES 1,(IX+0) | ...and use the first pair of sprites... | ||||||
| 42328 | LD A,(IX+7) | ...and fetch the direction. | ||||||
| 42331 | BIT 0,A | Jump if the lowest bit of the direction is set. | ||||||
| 42333 | JR NZ,FaceEnemy_Sprite | |||||||
| 42335 | SET 7,(IX+0) | Otherwise flip the sprite. | ||||||
| FaceEnemy_Sprite | 42339 | CPL | Invert the direction... | |||||
| 42340 | DEC A | |||||||
| 42341 | BIT 1,A | ...and return if bit 1 of the result is set. | ||||||
| 42343 | RET NZ | |||||||
| 42344 | SET 1,(IX+0) | Otherwise use the second pair of sprites. | ||||||
| 42348 | RET | Return. | ||||||
| Prev: 42220 | Up: Map | Next: 42349 |