Prev: 37346 Up: Map Next: 37694
37644: Board Moon Rover
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 37644 LD HL,24727 Copy the 9 bytes of rover state from Rover_Board_Copy over Jetman at Jetman_Board_Copy.
37647 LD DE,24703
37650 LD BC,9
37653 LDIR
Screen column 104 is the rover seat. Y=175 is the ground line.
37655 LD (IX+1),104 Write 104 to *IX+1.
37659 LD (IX+4),175 Write 175 to Jetman's Y position.
Bit 2 of the 0-based sprite index is facing. Type 18 is seated left, 22 is seated right.
37663 LD A,(IX+0) Fetch the actor type.
37666 DEC A Decrease it to a 0-based sprite index.
37667 AND %00000100 Keep only the facing bit.
37669 JR NZ,BoardMoonRover_WriteType Jump to BoardMoonRover_WriteType if Jetman is facing right.
""Lunar Rover: Left Frame 4"".
37671 LD (IX+0),18 Write 18 to the actor type.
Clear the parked rover, stop Jetman and play the take-object sound.
BoardMoonRover_Loop 37675 XOR A Write 0 to Rover_Slot.
37676 LD (24720),A
37679 LD (IX+5),A Write 0 to the speed and the thrust.
37682 LD (IX+6),A
37685 JP SoundsTakeObject Jump to SoundsTakeObject.
When Jetman faces right, seat him as type 22 and finish as above.
BoardMoonRover_WriteType 37688 LD (IX+0),22 Write 22 to the actor type.
37692 JR BoardMoonRover_Loop Jump to BoardMoonRover_Loop.
Prev: 37346 Up: Map Next: 37694