Prev: A95A Up: Map Next: A985
A964: Handler: Wulf Landing
Handles the second frame of the Wulf pouncing (sprite IDs 59 and 5D). When the timer in IX+02 runs out the Wulf goes back to running with a faster velocity than before.
Input
IX Actor record of the Wulf
HandlerWulfLanding A964 CALL StoreEntity Remember the previous position of the Wulf.
A967 DEC (IX+$02) Decrease the pounce timer by one and jump to HandlerWulfLanding_Move if it is not zero.
A96A JR NZ,HandlerWulfLanding_Move
A96C RES 3,(IX+$00) Reset bit 3 of the sprite ID to go back to running.
A970 LD (IX+$02),$10 Set the pounce timer of the Wulf to 10.
A974 LD A,(IX+$06) Fetch the X velocity of the Wulf.
A977 AND A Jump to HandlerWulfLanding_Velocity if the velocity is positive.
A978 JP P,HandlerWulfLanding_Velocity
A97B SUB $40 Subtract 40 if the velocity is negative.
HandlerWulfLanding_Velocity A97D ADD A,$20 Add 20 making the velocity faster in either direction.
A97F LD (IX+$06),A Set the new X velocity of the Wulf.
HandlerWulfLanding_Move A982 JP HandlerWulf_Move Jump to HandlerWulf_Move to move the Wulf.
Prev: A95A Up: Map Next: A985