Prev: 9395 Up: Map Next: 93E8
93A6: Place Actor At Scroll
Copy Jetman_Position into the actor's world position and draw it. On action, turn it into type 2F handled by Handler_FallingPlatform, and play SoundsDropItem.
Input
IX Actor slot
Place the actor at Jetman's scroll position.
PlaceActorAtScroll 93A6 LD HL,($607A) Fetch Jetman_Position.
93A9 LD (IX+$03),H Write the high byte to the actor's world X.
93AC LD (IX+$02),L Write the low byte to the actor's world X.
93AF LD A,($607C) Fetch Jetman_Y.
93B2 ADD A,$08 Add 08 to the Y position.
93B4 CP $AF Jump to PlaceActorAtScroll_Draw if it is still above the ground line.
93B6 JR C,PlaceActorAtScroll_Draw
AF is the ground line.
93B8 LD A,$AF A=AF.
Redraw the actor and test the action key.
PlaceActorAtScroll_Draw 93BA LD (IX+$04),A Write the Y position to *IX+04.
93BD CALL DrawSprite Call DrawSprite.
93C0 CALL ColouriseSprite Call ColouriseSprite.
93C3 CALL TestActionKey Call TestActionKey.
93C6 JR Z,PlaceActorAtScroll_ClearAttached Jump to PlaceActorAtScroll_ClearAttached if the action key is not pressed.
93C8 BIT 0,(IX+$08) Return if bit 0 of the actor flags is already set.
93CC RET NZ
Turn the actor into type 2F and give it Jetman's speed.
93CD LD (IX+$00),$2F Write type 2F to the actor.
93D1 LD HL,$6080 HL=Jetman_Flags.
93D4 RES 0,(HL) Reset bit 0 of Jetman's flags.
93D6 LD A,($607D) Fetch Jetman_Speed.
93D9 LD (IX+$05),A Copy that speed to the actor.
10 is a signed +10 downward throw.
93DC LD (IX+$06),$10 Write 10 to the vertical thrust.
93E0 JP SoundsDropItem Jump to SoundsDropItem.
PlaceActorAtScroll_ClearAttached 93E3 RES 0,(IX+$08) Reset bit 0 of the actor flags.
93E7 RET Return.
Prev: 9395 Up: Map Next: 93E8