Prev: 91E2 Up: Map Next: 933E
930C: Board Moon Rover
Used by the routine at Handler_JetmanMovement.
Copy the rover state over Jetman, snap him to the seat and play SoundsTakeObject.
Input
IX Actor slot
Copy the rover state over Jetman and snap him to the seat.
BoardMoonRover 930C LD HL,$6097 Copy the 09 bytes of rover state from Rover_Board_Copy over Jetman at Jetman_Board_Copy.
930F LD DE,$607F
9312 LD BC,$0009
9315 LDIR
Screen column 68 is the rover seat. Y=AF is the ground line.
9317 LD (IX+$01),$68 Write 68 to *IX+01.
931B LD (IX+$04),$AF Write AF to Jetman's Y position.
Bit 2 of the 0-based sprite index is facing. Type 12 is seated left, 16 is seated right.
931F LD A,(IX+$00) Fetch the actor type.
9322 DEC A Decrease it to a 0-based sprite index.
9323 AND %00000100 Keep only the facing bit.
9325 JR NZ,BoardMoonRover_WriteType Jump to BoardMoonRover_WriteType if Jetman is facing right.
""Lunar Rover: Left Frame 4"".
9327 LD (IX+$00),$12 Write 12 to the actor type.
Clear the parked rover, stop Jetman and play the take-object sound.
BoardMoonRover_Loop 932B XOR A Write 00 to Rover_Slot.
932C LD ($6090),A
932F LD (IX+$05),A Write 00 to the speed and the thrust.
9332 LD (IX+$06),A
9335 JP SoundsTakeObject Jump to SoundsTakeObject.
When Jetman faces right, seat him as type 16 and finish as above.
BoardMoonRover_WriteType 9338 LD (IX+$00),$16 Write 16 to the actor type.
933C JR BoardMoonRover_Loop Jump to BoardMoonRover_Loop.
Prev: 91E2 Up: Map Next: 933E