Prev: A4EC Up: Map Next: A56D
A550: Face Enemy
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.
Input
IX Entity
FaceEnemy A550 RES 7,(IX+$00) Do not flip the sprite...
A554 RES 1,(IX+$00) ...and use the first pair of sprites...
A558 LD A,(IX+$07) ...and fetch the direction.
A55B BIT 0,A Jump if the lowest bit of the direction is set.
A55D JR NZ,FaceEnemy_Sprite
A55F SET 7,(IX+$00) Otherwise flip the sprite.
FaceEnemy_Sprite A563 CPL Invert the direction...
A564 DEC A
A565 BIT 1,A ...and return if bit 1 of the result is set.
A567 RET NZ
A568 SET 1,(IX+$00) Otherwise use the second pair of sprites.
A56C RET Return.
Prev: A4EC Up: Map Next: A56D