Prev: A678 Up: Map Next: A8EF
A6A6: Handle Sabreman Falling
Handler for the object types 15 and 16 which are the falling sprites of Sabreman (15 when he falls to the left and 16 when he falls to the right). It is also where he lands from a jump or a fall.
The routine checks for contact with the falling stalactite, deals with the special states in the same way as Handle_Sabreman_Walking, lets him steer while he is not moving sideways, checks for contact with the bubbles and the creatures, moves him sideways and then applies the pull of gravity to the y velocity, which is increased by 02 each time up to a limit of 4C. The y position changes by one sixteenth of the y velocity.
He lands when the y position reaches 9F. Landing after a fall that reaches a y velocity of 74 or more kills him (see Start_Dying).
Input
IX Object record of Sabreman
Handle_Sabreman_Falling A6A6 CALL StoreEntity Remember the position and sprite id of Sabreman.
Check for contact with the falling stalactite. If it touches him, the routine ends at Knock_Sabreman_Down_Set_Velocity.
A6A9 CALL Check_Stalactite_Contact Check for contact with the falling stalactite.
A6AC BIT 2,C Jump to Knock_Sabreman_Down_Set_Velocity to knock him down if the falling stalactite touches him (bit 2 of C is set).
A6AE JP NZ,Knock_Sabreman_Down_Set_Velocity
A6B1 BIT 6,(IX+$0F) Jump to Start_Being_Carried if Sabreman is being carried (bit 6 of the redraw flags).
A6B5 JP NZ,Start_Being_Carried
A6B8 BIT 7,(IX+$0F) Jump to Start_Tumbling if Sabreman is tumbling (bit 7 of the redraw flags).
A6BC JP NZ,Start_Tumbling
A6BF BIT 3,(IX+$0F) Jump to Tumble_Sabreman if Sabreman is in the special state (bit 3 of the redraw flags is set).
A6C3 JP NZ,Tumble_Sabreman
Read the controls. While he is not moving sideways, bit 0 clear makes the sprite id 16 and bit 1 clear makes it 15. A clear bit 4 throws a weapon, otherwise the flag for the released fire key is set.
A6C6 CALL ReadControls Read the controls.
A6C9 LD C,A Keep the state of the controls in C.
A6CA LD A,(IX+$06) Fetch the x velocity of Sabreman.
A6CD AND A Jump to Handle_Sabreman_Falling_Check_Fire if he is moving sideways (the x velocity is not zero).
A6CE JR NZ,Handle_Sabreman_Falling_Check_Fire
A6D0 BIT 0,C Jump to Handle_Sabreman_Falling_Check_Left_Key if the right control is not used (bit 0 of the controls is set).
A6D2 JR NZ,Handle_Sabreman_Falling_Check_Left_Key
A6D4 LD (IX+$00),$16 Set the sprite id to 16 (falling to the right).
Handle_Sabreman_Falling_Check_Left_Key A6D8 BIT 1,C Jump to Handle_Sabreman_Falling_Check_Fire if the left control is not used (bit 1 of the controls is set).
A6DA JR NZ,Handle_Sabreman_Falling_Check_Fire
A6DC LD (IX+$00),$15 Set the sprite id to 15 (falling to the left).
Handle_Sabreman_Falling_Check_Fire A6E0 BIT 4,C Jump to Handle_Sabreman_Falling_Fire_Released if the fire control is not used (bit 4 of the controls is set).
A6E2 JR NZ,Handle_Sabreman_Falling_Fire_Released
A6E4 CALL Throw_Weapon Throw a weapon (see Throw_Weapon).
A6E7 JR Handle_Sabreman_Falling_Check_Contact Jump to Handle_Sabreman_Falling_Check_Contact.
Handle_Sabreman_Falling_Fire_Released A6E9 LD A,$FF Set the flag for the released fire key (Fire_Key_Flag) to FF.
A6EB LD ($AAAB),A
Check for contact with the bubbles and then the creatures. The contact result is in C. With bit 1 clear he is pushed away sideways with an x velocity of 02 or FE a tone is played and he tumbles at Continue_Sabreman_Tumbling. With bit 1 set he lands on top of the object at Land_Sabreman when bit 0 is clear, and nothing happens when bit 0 is set.
Handle_Sabreman_Falling_Check_Contact A6EE CALL Read_World_Map Read the world map entry of the room.
A6F1 LD A,E Store the room flags in Room_Flags.
A6F2 LD ($AAAC),A
A6F5 CALL Check_Bubble_Contact Check for contact with the bubbles.
A6F8 BIT 2,C Jump to Handle_Sabreman_Falling_Bubble_Contact if Sabreman touches a bubble (bit 2 of C is set).
A6FA JR NZ,Handle_Sabreman_Falling_Bubble_Contact
A6FC PUSH DE Stash the world map entry on the stack.
A6FD CALL Check_Decoration_Contact Check for contact with the creatures.
A700 POP DE Restore the world map entry from the stack.
A701 BIT 2,C Jump to Handle_Sabreman_Falling_Move_Sideways if Sabreman touches no creature (bit 2 of C is not set).
A703 JR Z,Handle_Sabreman_Falling_Move_Sideways
Handle_Sabreman_Falling_Bubble_Contact A705 BIT 0,C Jump to Handle_Sabreman_Falling_Land_On_Bubble if he is touching the middle of it (bit 0 of C is clear).
A707 JR Z,Handle_Sabreman_Falling_Land_On_Bubble
A709 BIT 1,C Jump to Handle_Sabreman_Falling_Move_Sideways to carry on falling if he is on top of the edge of it (bit 1 of C is set).
A70B JR NZ,Handle_Sabreman_Falling_Move_Sideways
Handle_Sabreman_Falling_Push_Sideways A70D CALL Start_Tumbling_Inside_Walls Make Sabreman tumble inside the walls (see Start_Tumbling_Inside_Walls).
A710 BIT 7,C Jump to Handle_Sabreman_Falling_Push_Left if he is on the left of it (bit 7 of C is clear).
A712 JR Z,Handle_Sabreman_Falling_Push_Left
A714 LD (IX+$06),$02 Push him to the right by setting the x velocity to 02.
A718 JR Handle_Sabreman_Falling_Push_Play_Tone Jump to Handle_Sabreman_Falling_Push_Play_Tone.
Handle_Sabreman_Falling_Push_Left A71A LD (IX+$06),$FE Push him to the left by setting the x velocity to FE.
Handle_Sabreman_Falling_Push_Play_Tone A71E CALL Play_Low_Tone Play a low tone.
A721 JP Continue_Sabreman_Tumbling Jump to Continue_Sabreman_Tumbling.
Handle_Sabreman_Falling_Land_On_Bubble A724 BIT 1,C Jump to Handle_Sabreman_Falling_Push_Sideways and push him away sideways if he is not on top of it (bit 1 of C is clear).
A726 JR Z,Handle_Sabreman_Falling_Push_Sideways
A728 LD A,B Set the y position so that Sabreman stands on top of the bubble.
A729 NEG
A72B ADD A,$A1
A72D LD (IX+$03),A
A730 JP Land_Sabreman Jump to Land_Sabreman.
Move Sabreman sideways by the x velocity. At the left-hand side of the room (x position less than 18) a solid left wall stops him and reverses the x velocity so that he tumbles. Without a wall, he enters the room on the left when the x position is less than 08.
Handle_Sabreman_Falling_Move_Sideways A733 LD A,E Combine the contact flags of Sabreman with the contact flags of the room.
A734 OR (IX+$0B)
A737 LD E,A
A738 XOR A Clear the contact flags of Sabreman.
A739 LD (IX+$0B),A
A73C LD A,(IX+$01) Fetch the x position of Sabreman.
A73F ADD A,(IX+$06) Add the x velocity of Sabreman.
A742 LD (IX+$01),A Store the new x position of Sabreman.
A745 BIT 7,A Jump to Handle_Falling_At_Right_Edge if he is in the right half of the room (bit 7 of the x position is set).
A747 JP NZ,Handle_Falling_At_Right_Edge
A74A CP $18 Jump to Handle_Sabreman_Falling_Apply_Gravity if he is clear of the left wall (x position 18 or more).
A74C JR NC,Handle_Sabreman_Falling_Apply_Gravity
A74E BIT 6,E Jump to Handle_Sabreman_Falling_No_Left_Wall if the left wall is not solid (bit 6 of E is clear).
A750 JR Z,Handle_Sabreman_Falling_No_Left_Wall
A752 LD (IX+$01),$18 Stop him at the left wall by setting the x position to 18.
This entry point is used by the routine at Handle_Falling_At_Right_Edge.
Handle_Sabreman_Falling_Reverse_Velocity A756 LD A,(IX+$06) Reverse the x velocity, so that he bounces off the wall.
A759 NEG
A75B LD (IX+$06),A
A75E JP Continue_Sabreman_Tumbling Jump to Continue_Sabreman_Tumbling to tumble.
Handle_Sabreman_Falling_No_Left_Wall A761 EX AF,AF' Mark the ceiling and the floor as solid (bits 0 and 4 of the contact flags of Sabreman), as he is in the gap in the wall, keeping the new x position in AF'.
A762 LD A,$11
A764 OR (IX+$0B)
A767 LD (IX+$0B),A
A76A EX AF,AF'
A76B SET 4,E Mark the room as having a floor (bit 4 of E).
A76D CP $08 Jump to Handle_Sabreman_Falling_Apply_Gravity if he has not left the room (x position 08 or more).
A76F JR NC,Handle_Sabreman_Falling_Apply_Gravity
A771 DEC (IX+$02) Decrease the room x, to go to the room on the left.
A774 LD (IX+$01),$F0 Put him at the right edge of the next room (x position F0).
A778 CALL Draw_Room Draw the new room.
A77B JP Update_Object_Sprite Jump to Update_Object_Sprite.
This entry point is used by the routine at Handle_Falling_At_Right_Edge.
Apply gravity. If the y velocity is positive and has reached 4C it is left as it is, otherwise it is increased by 02. The y position is then changed by the y velocity divided by 10.
If the new y position is 9F or more, the contact flags are given the bits 44 and he lands at Handle_Sabreman_Falling_Reach_Floor when the room has a floor or goes down to the room below at Handle_Sabreman_Falling_Check_Bottom_Edge when it does not.
Handle_Sabreman_Falling_Apply_Gravity A77E LD A,(IX+$09) Fetch the y velocity of Sabreman.
A781 BIT 7,A Jump to Handle_Sabreman_Falling_Increase_Velocity if he is moving upwards (bit 7 of the y velocity is set).
A783 JR NZ,Handle_Sabreman_Falling_Increase_Velocity
A785 CP $4C Jump to Handle_Sabreman_Falling_Increase_Velocity if he is not yet falling at full speed (the y velocity is less than 4C).
A787 JR C,Handle_Sabreman_Falling_Increase_Velocity
A789 CALL Start_Tumbling_Inside_Walls Make Sabreman tumble inside the walls (see Start_Tumbling_Inside_Walls).
A78C JR Handle_Sabreman_Falling_Move_Vertically Jump to Handle_Sabreman_Falling_Move_Vertically.
Handle_Sabreman_Falling_Increase_Velocity A78E INC (IX+$09) Increase the y velocity (gravity pulls him down).
A791 INC (IX+$09) Increase the y velocity again.
Handle_Sabreman_Falling_Move_Vertically A794 SRA A Divide the y velocity by sixteen, keeping the sign.
A796 SRA A
A798 SRA A
A79A SRA A
A79C ADD A,(IX+$03) Add the y position of Sabreman to get the new y position.
A79F CP $9F Jump to Handle_Sabreman_Falling_Above_Floor if he has not reached the bottom of the room (the new y position is less than 9F).
A7A1 JR C,Handle_Sabreman_Falling_Above_Floor
A7A3 EX AF,AF' Set bits 2 and 6 of the contact flags of Sabreman (both side walls are solid), keeping the new y position in the alternate AF'.
A7A4 LD A,$44
A7A6 OR (IX+$0B)
A7A9 LD (IX+$0B),A
A7AC EX AF,AF'
A7AD BIT 4,E Jump to Handle_Sabreman_Falling_Check_Bottom_Edge if the room has no floor (bit 4 of E is clear), to go down to the room below.
A7AF JP Z,Handle_Sabreman_Falling_Check_Bottom_Edge
A7B2 JP Handle_Sabreman_Falling_Reach_Floor Jump to Handle_Sabreman_Falling_Reach_Floor to land on the floor.
This entry point is used by the routine at Handle_Sabreman_Tumbling.
The y position is above 9F. If it is less than 48 and the room has a ceiling (bit 0 of E), a negative y velocity is made positive and the y position is set to 48. If it is less than 48 and the room has no ceiling, the contact flags are given the bits 44 and, when the y position is less than 28 he moves up to the room above.
Handle_Sabreman_Falling_Above_Floor A7B5 CP $48 Jump to Handle_Sabreman_Falling_Store_Y_Position if he is below the top of the room (y position 48 or more).
A7B7 JR NC,Handle_Sabreman_Falling_Store_Y_Position
A7B9 BIT 0,E Jump to Handle_Sabreman_Falling_No_Ceiling if the room has no ceiling (bit 0 of E is clear).
A7BB JR Z,Handle_Sabreman_Falling_No_Ceiling
A7BD CALL Start_Tumbling_Inside_Walls Make Sabreman tumble inside the walls (see Start_Tumbling_Inside_Walls).
A7C0 LD A,(IX+$09) Fetch the y velocity of Sabreman.
A7C3 BIT 7,A Jump to Handle_Sabreman_Falling_Set_Ceiling_Position if he is moving down (bit 7 of the y velocity is clear).
A7C5 JR Z,Handle_Sabreman_Falling_Set_Ceiling_Position
A7C7 NEG Negate the y velocity, so that he bounces off the ceiling.
A7C9 LD (IX+$09),A Store the new y velocity of Sabreman.
Handle_Sabreman_Falling_Set_Ceiling_Position A7CC LD A,$48 Set the y position to 48 just below the ceiling.
Store the y position and make C the y position less 37 (with a minimum of 02). While the countdown is not zero it is decreased and the routine ends.
Handle_Sabreman_Falling_Store_Y_Position A7CE LD (IX+$03),A Store the y position of Sabreman.
A7D1 SUB $37 Work out the length of rope needed to reach him (the y position less 37) and jump to Handle_Sabreman_Falling_Set_Threshold unless that is negative.
A7D3 JR NC,Handle_Sabreman_Falling_Set_Threshold
A7D5 LD A,$02 Use the shortest length of 02 instead.
Handle_Sabreman_Falling_Set_Threshold A7D7 LD C,A Keep the length of rope needed in C.
A7D8 LD A,(IX+$0A) Fetch the countdown of Sabreman.
A7DB AND A Jump to Handle_Sabreman_Falling_Check_Rope if the countdown is zero.
A7DC JR Z,Handle_Sabreman_Falling_Check_Rope
A7DE DEC (IX+$0A) Decrease the countdown of Sabreman.
A7E1 JP Update_Object_Sprite Jump to Update_Object_Sprite.
Handle_Sabreman_Falling_No_Ceiling A7E4 EX AF,AF' Switch to the shadow registers.
A7E5 LD A,(IX+$0B) Fetch the contact flags of Sabreman.
A7E8 OR %01000100 Set bits 2 and 6 (both side walls are solid).
A7EA LD (IX+$0B),A Store the contact flags of Sabreman.
A7ED EX AF,AF' Switch back to the main registers.
A7EE CP $28 Jump to Handle_Sabreman_Falling_Store_Y_Position if he has not left the top of the room (y position 28 or more).
A7F0 JR NC,Handle_Sabreman_Falling_Store_Y_Position
A7F2 DEC (IX+$04) Decrease the room y, to go to the room above.
A7F5 LD (IX+$03),$BA Put him at the bottom of the room above (y position BA).
A7F9 CALL Draw_Room Draw the new room.
A7FC JP Update_Object_Sprite Jump to Update_Object_Sprite.
The countdown is zero. Now the routine checks whether he is falling onto the rope (the type 17 object, see Handle_Rope). The conditions are that the room y is 10 or more, that the number in Rope_Length (the length of the rope) is not less than C, that his x position is within 10 of 78 (where the rope hangs), and that record 3 holds the rope and Rope_Displacement_Pixels is zero. When they hold, he grabs the rope: the sprite id is set to 01 record 3 is cleared (from then on Handle_Sabreman_On_Rope looks after the rope), and the second byte of the world map entry of each room below him is cleared down to the first room that has a floor.
Handle_Sabreman_Falling_Check_Rope A7FF LD A,(IX+$04) Fetch the room y of Sabreman.
A802 CP $10 Jump to Update_Object_Sprite if he is in a special room (the room y is less than 10), as there is no rope there.
A804 JP C,Update_Object_Sprite
A807 LD A,($AAA5) Fetch the length of the rope from Rope_Length.
A80A AND %01111111 Keep only the length (bits 0 to 6).
A80C CP C Jump to Update_Object_Sprite if the rope is too short to reach him (the length is less than C).
A80D JP C,Update_Object_Sprite
A810 LD A,(IX+$0F) Fetch the redraw flags of Sabreman.
A813 AND %10100111 Keep only bits 0, 1, 2, 5 and 7 (this clears bits 3, 4 and 6).
A815 LD (IX+$0F),A Store the redraw flags of Sabreman.
A818 LD A,(IX+$01) Fetch the x position of Sabreman.
A81B SUB $78 Work out how far he is from the rope (x position 78) and jump to Handle_Sabreman_Falling_Check_Rope_Distance if he is on the right of it.
A81D JP P,Handle_Sabreman_Falling_Check_Rope_Distance
A820 NEG Make the distance positive.
Handle_Sabreman_Falling_Check_Rope_Distance A822 CP $10 Jump to Update_Object_Sprite if he is too far from the rope (the distance is 10 or more).
A824 JP NC,Update_Object_Sprite
A827 LD A,($8F2A) Fetch the type of record 3 (the rope).
A82A AND A Jump to Handle_Sabreman_Falling_No_Rope if the rope has not been set up.
A82B JP Z,Handle_Sabreman_Falling_No_Rope
A82E LD A,($AAA4) Fetch the displacement of the rope from Rope_Displacement_Pixels.
A831 AND A Jump to Update_Object_Sprite if the rope is swinging (the displacement is not zero).
A832 JP NZ,Update_Object_Sprite
Handle_Sabreman_Falling_Catch_Rope A835 LD B,C Copy the length of rope needed to B.
A836 BIT 7,B Jump to Update_Object_Sprite if the length of rope needed is too long (bit 7 of B is set).
A838 JP NZ,Update_Object_Sprite
A83B LD A,($AAA5) Fetch the length of the rope from Rope_Length.
A83E AND %10000000 Keep only bit 7 (the flag of the rope).
A840 OR B Combine the flag with the length of rope needed.
A841 LD ($AAA5),A Set the length of the rope to the length needed to reach him.
A844 LD (IX+$00),$01 Set the sprite id to 01 (hanging on the rope).
A848 LD A,(IX+$06) Fetch the x velocity of Sabreman.
A84B SLA A Multiply the x velocity by eight.
A84D SLA A
A84F SLA A
A851 LD ($AAA2),A Set the x velocity of the end of the rope (Rope_Velocity) so that it swings the way that he was moving.
A854 XOR A Clear the type of record 3 (the rope), as Sabreman is now holding it.
A855 LD ($8F2A),A
A858 CALL Find_World_Map_Address Find the world map entry of the room.
A85B LD BC,$0020 Set the offset to the room below (20).
Handle_Sabreman_Falling_Find_Rope_Row_Loop A85E BIT 4,(HL) Jump to Handle_Sabreman_Falling_Move_Rope if this room has a floor (bit 4 of the room flags).
A860 JR NZ,Handle_Sabreman_Falling_Move_Rope
A862 ADD HL,BC Add the offset to move to the entry of the room below.
A863 INC HL Move on to the second byte of the entry.
A864 LD (HL),$00 Clear the second byte of the entry.
A866 DEC HL Move back to the first byte of the entry.
A867 JR Handle_Sabreman_Falling_Find_Rope_Row_Loop Jump to Handle_Sabreman_Falling_Find_Rope_Row_Loop.
Handle_Sabreman_Falling_Move_Rope A869 CALL Update_Rope Move the rope (see Update_Rope).
A86C JP Set_Position_From_Rope Jump to Set_Position_From_Rope to position Sabreman on the rope.
Handle_Sabreman_Falling_Check_Bottom_Edge A86F CP $BC Jump to Handle_Sabreman_Falling_Above_Floor if he has not reached the bottom of the room (the y position is less than BC).
A871 JP C,Handle_Sabreman_Falling_Above_Floor
A874 INC (IX+$04) Increase the room y, to go to the room below.
A877 LD (IX+$03),$2A Put him at the top of the room below (y position 2A).
A87B CALL Draw_Room Draw the new room.
A87E JP Handle_Sabreman_Falling_Above_Floor Jump to Handle_Sabreman_Falling_Above_Floor.
There is no rope in record 3. If the room has a ceiling (bit 0 of E) and no floor (bit 4), the second byte of the world map entry of the room is set to 08 the rope end positions in Line_Step_Count are cleared and the code above carries on, so that he grabs a rope that is just long enough.
Handle_Sabreman_Falling_No_Rope A881 BIT 0,E Jump to Update_Object_Sprite if the room has no ceiling (bit 0 of E is clear).
A883 JP Z,Update_Object_Sprite
A886 BIT 4,E Jump to Update_Object_Sprite if the room has a floor (bit 4 of E is set).
A888 JP NZ,Update_Object_Sprite
A88B CALL Find_World_Map_Address Find the world map entry of the room.
A88E INC HL Move on to the second byte of the entry.
A88F LD (HL),$08 Write 08 to the second byte of the entry.
A891 LD HL,$0000 Clear the length of the rope (Rope_Length) and the word at Previous_Rope_End_Position.
A894 LD ($AA97),HL
A897 LD ($AAA5),HL
A89A JR Handle_Sabreman_Falling_Catch_Rope Jump to Handle_Sabreman_Falling_Catch_Rope to grab the new rope.
This entry point is used by the routine at Handle_Sabreman_Tumbling.
Handle_Sabreman_Falling_Reach_Floor A89C LD (IX+$03),$9F Put him on the floor by setting the y position to 9F.
This entry point is used by the routine at Handle_Sabreman_Tumbling.
Sabreman lands. If the y velocity is positive and 74 or more (and the gem timer at Gem_Timer is zero) he dies at Start_Dying. Otherwise a low tone is played and the sprite id becomes 09 (when he faced left) or 0D (when he faced right), which are the walking sprites.
Land_Sabreman A8A0 LD A,($8EEE) Fetch the gem timer from Gem_Timer.
A8A3 AND A Jump to Land_Sabreman_Play_Tone if the gem timer is running (it is not zero), as he cannot be hurt.
A8A4 JR NZ,Land_Sabreman_Play_Tone
A8A6 LD A,(IX+$09) Fetch the y velocity of Sabreman.
A8A9 BIT 7,A Jump to Land_Sabreman_Play_Tone if he is moving up (bit 7 of the y velocity is set).
A8AB JR NZ,Land_Sabreman_Play_Tone
A8AD CP $74 Jump to Start_Dying and kill him if he has fallen too fast (the y velocity is 74 or more).
A8AF JP NC,Start_Dying
Land_Sabreman_Play_Tone A8B2 CALL Play_Low_Tone Play a low tone.
A8B5 LD A,(IX+$00) Fetch the sprite id of Sabreman.
A8B8 DEC A Decrease the sprite id so that bit 0 tells which way he was falling.
A8B9 RLA Rotate the direction up to bit 2.
A8BA RLA
A8BB AND %00000100 Keep only bit 2 (set when he faced right).
A8BD ADD A,$09 Add 09 to make the sprite id for walking in that direction.
A8BF LD (IX+$00),A Set the sprite id of Sabreman.
A8C2 RES 7,(IX+$0F) Stop him tumbling by resetting bit 7 of the redraw flags.
A8C6 JP Update_Object_Sprite Jump to Update_Object_Sprite.
This entry point is used by the routine at Handle_Sabreman_On_Rope.
Sabreman comes down from the rope onto the floor at y position 9F. The sprite id becomes 09 (when the x velocity is negative) or 0D.
Stand_Sabreman_On_Floor A8C9 LD (IX+$03),$9F Put him on the floor by setting the y position to 9F.
A8CD LD A,$09 Start with the sprite id 09 (walking to the left).
A8CF BIT 7,(IX+$06) Jump to Stand_Sabreman_On_Floor_Set_Sprite if he is moving to the left (bit 7 of the x velocity is set).
A8D3 JR NZ,Stand_Sabreman_On_Floor_Set_Sprite
A8D5 ADD A,$04 Add 04 to make the sprite id 0D (walking to the right).
Stand_Sabreman_On_Floor_Set_Sprite A8D7 LD (IX+$00),A Set the sprite id of Sabreman.
This entry point is used by the routines at Handle_Sabreman_On_Rope and Knock_Sabreman_Off_Rope.
Record 3 is made a type 17 object again, with its x velocity (byte 06) set to 03.
Restore_Type_17_Object A8DA LD A,$17 Set the type of record 3 (the rope) to 17.
A8DC LD ($8F2A),A
A8DF LD A,$03 Set the x velocity of the rope to 03.
A8E1 LD ($8F30),A
A8E4 LD A,(IX+$0F) Fetch the redraw flags of Sabreman.
A8E7 AND %01000000 Keep only bit 6 (being carried).
A8E9 JP NZ,Start_Being_Carried Jump to Start_Being_Carried if Sabreman is being carried by an eagle.
A8EC JP Update_Object_Sprite Jump to Update_Object_Sprite.
Prev: A678 Up: Map Next: A8EF