Prev: AE03 Up: Map Next: AE33
AE17: Handle Valve Ghost
The handler for the ghost of a valve (objects 68 to 6B). It hovers over the socket which comes before it in the table of objects, and is created by HandleSocket. It retires itself if there are special objects in the room. It stays for a couple of frames in IX+10, then changes into its sparkle form (see HandleValveGhostSparkle).
Input
IX The address of the object
Hover over the socket, then become a sparkle.
HandleValveGhost AE17 CALL SetPixelAdjustments_Valve Call SetPixelAdjustments_Valve.
AE1A CALL TestValvesInPlay Call TestValvesInPlay.
AE1D JP NZ,RetireObject_Retire Jump to RetireObject_Retire if there are special objects in the room.
AE20 LD A,(IX-$1D) Fetch the height of the socket.
AE23 ADD A,$0D Add 0D.
AE25 LD (IX+$03),A Set the height of the ghost.
AE28 DEC (IX+$10) Return if there are frames left.
AE2B RET NZ
AE2C SET 2,(IX+$00) Set bit 2 of the sprite number.
AE30 JP SetWipeAndDrawFlags Jump to SetWipeAndDrawFlags.
Prev: AE03 Up: Map Next: AE33