Prev: C657 Up: Map Next: C71C
C6E4: Handle Player Top
Does all of the work for the top half of the robot (objects 20 to 2B), which is a copy of the bottom half placed 0C 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 C6E4 CALL SetPixelAdjustments_PlayerTop Call SetPixelAdjustments_PlayerTop.
C6E7 BIT 6,(IX+$0D) Jump to HandlePlayerTop_Copy if the player has not been killed.
C6EB JR Z,HandlePlayerTop_Copy
C6ED SET 6,(IX-$13) Set bit 6 of the bottom half extra flags.
C6F1 JP TurnIntoSparkle Jump to TurnIntoSparkle.
Copy the bottom half and raise it.
HandlePlayerTop_Copy C6F4 PUSH IX Copy IX to DE (using the stack).
C6F6 POP DE
C6F7 LD HL,$FFE0 Point HL at the bottom half.
C6FA ADD HL,DE
C6FB PUSH HL Copy HL to IY (using the stack).
C6FC POP IY
C6FE INC DE Increment DE.
C6FF INC HL Increment HL.
C700 LD BC,$0007 Set BC to 0007.
C703 LDIR Copy the position, size and flags.
C705 DEC (IX+$06) Decrement the height of the top half.
C708 LD A,(IY+$00) Fetch the sprite number of the bottom half.
C70B ADD A,$10 Add 10.
C70D LD (IX+$00),A Set the sprite number of the top half.
C710 LD A,(IY+$03) Fetch the z position of the bottom half.
C713 ADD A,$0C Add 0C.
C715 LD (IX+$03),A Set the z position of the top half.
C718 CALL FlagOverlappingObjects Call FlagOverlappingObjects.
C71B RET Return.
Prev: C657 Up: Map Next: C71C