Prev: 44387 Up: Map Next: 44422
44393: Knock Back Rhino
Used by the routine at HandlerRhino.
Turns a rhino which has been hit by the sword of the player and sends it away from the player with a velocity of 96 (to the right) or 160 (to the left), depending on which way the player is facing. A warble is played.
Input
IX Actor record of the rhino
KnockBackRhino 44393 LD A,(38658) Fetch the sprite ID of the player from ImmortalData.
44396 BIT 3,A Jump to KnockBackRhino_Right if the player is attacking to the right (bit 3 of the sprite ID is set).
44398 JR NZ,KnockBackRhino_Right
44400 RES 1,(IX+0) Reset bit 1 of the sprite ID so the rhino faces left.
44404 LD A,160 Set the X velocity in A to 160 (moving left).
KnockBackRhino_Velocity 44406 LD (IX+6),A Set the X velocity of the rhino.
44409 CALL PlayWarbleSound Play the warble sound.
44412 JR UpdateActor Jump to UpdateActor to update the rhino.
KnockBackRhino_Right 44414 SET 1,(IX+0) Set bit 1 of the sprite ID so the rhino faces right.
44418 LD A,96 Set the X velocity in A to 96 (moving right).
44420 JR KnockBackRhino_Velocity Jump to KnockBackRhino_Velocity.
Prev: 44387 Up: Map Next: 44422