Prev: 50775 Up: Map Next: 50972
50916: Handle Player Top
Does all of the work for the top half of the robot (objects 32 to 43), which is a copy of the bottom half placed 12 above it. The top half is one unit shorter than the bottom half. If the top half has been flagged as killed this flags the bottom half as killed too and turns the player into a sparkle.
Input
IX The address of the object
Turn into a sparkle if killed.
HandlePlayerTop 50916 CALL SetPixelAdjustments_PlayerTop Call SetPixelAdjustments_PlayerTop.
50919 BIT 6,(IX+13) Jump to HandlePlayerTop_Copy if the player has not been killed.
50923 JR Z,HandlePlayerTop_Copy
50925 SET 6,(IX-19) Set bit 6 of the bottom half extra flags.
50929 JP TurnIntoSparkle Jump to TurnIntoSparkle.
Copy the bottom half and raise it.
HandlePlayerTop_Copy 50932 PUSH IX Copy IX to DE (using the stack).
50934 POP DE
50935 LD HL,65504 Point HL at the bottom half.
50938 ADD HL,DE
50939 PUSH HL Copy HL to IY (using the stack).
50940 POP IY
50942 INC DE Increment DE.
50943 INC HL Increment HL.
50944 LD BC,7 Set BC to 0007.
50947 LDIR Copy the position, size and flags.
50949 DEC (IX+6) Decrement the height of the top half.
50952 LD A,(IY+0) Fetch the sprite number of the bottom half.
50955 ADD A,16 Add 16.
50957 LD (IX+0),A Set the sprite number of the top half.
50960 LD A,(IY+3) Fetch the z position of the bottom half.
50963 ADD A,12 Add 12.
50965 LD (IX+3),A Set the z position of the top half.
50968 CALL FlagOverlappingObjects Call FlagOverlappingObjects.
50971 RET Return.
Prev: 50775 Up: Map Next: 50972