Prev: 59443 Up: Map Next: 59540
59515: Knock Sabreman Off Rope
Used by the routine at Handle_Sabreman_On_Rope.
Makes Sabreman fall off the rope when something hits him (a bubble, a creature or the falling stalactite). He tumbles, with the y velocity that is in B. His x velocity is the distance that the end of the rope moved (see Rope_End_Position) and the countdown in byte 10 is set to 20. The rope is made a type 23 object again, and Sabreman is drawn, at Restore_Type_17_Object.
Input
B Y velocity
IX Object record of Sabreman
Knock_Sabreman_Off_Rope 59515 LD A,(43671) Fetch the previous position of the end of the rope.
59518 LD E,A Store it in E.
59519 LD A,(43669) Fetch the position of the end of the rope.
59522 SUB E Subtract the previous position.
59523 LD (IX+6),A Set the x velocity.
59526 LD (IX+9),B Set the y velocity.
59529 LD (IX+0),24 Set the sprite id to 24 (tumbling).
59533 LD (IX+10),20 Set the countdown to 20.
59537 JP Restore_Type_17_Object Jump to Restore_Type_17_Object.
Prev: 59443 Up: Map Next: 59540