Prev: A9B1 Up: Map Next: AA43
A9C7: A remote-controlled robot (graphics 124 to 127)
Reached through UPDATES. One in each of eight rooms, two in room $0B, each room with four buttons (REMOTE_BUTTON) and a pad (REMOTE_PAD) that the player stands on to drive it. One robot at a time is in control: bit 7 of REMOTE_ORDERS says one has it, and bit 7 of its own +10 which. The first robot to run while no one has control takes it. While the player stands on a button the robot in control steps two units a turn in the button's direction (REMOTE_STEPS), animating through its four graphics, with a sound; on the pad it animates on the spot. When he steps off, it gives control up and the next robot to run takes it -- so the two in room $0B take turns, one for each time he steps off a button or the pad (measured there).
Otherwise a robot falls under gravity, with a sound pitched by its height while it moves. They are harmless, and there to push things: the rooms that have them are the rooms of the things that break when moved (FRAGILE), all but room $0B.
+10: bit 7 in control, waiting; bit 6 in control, moving.
REMOTE_ROBOT A9C7 CALL DRAW_AT_L16_D9 draw 16 left and 9 down
A9CA LD HL,REMOTE_ORDERS no robot in control: take it
A9CD LD A,(HL)
A9CE AND $80
A9D0 JR Z,REMOTE_ROBOT_1
A9D2 LD A,(IX+$10) not this one: just fall
A9D5 AND $C0
A9D7 JR Z,REMOTE_ROBOT_0
A9D9 BIT 7,(IX+$10) waiting for an order
A9DD JR NZ,REMOTE_ROBOT_2
A9DF LD A,(HL) moving, and another order
A9E0 AND $3F
A9E2 JR NZ,REMOTE_ROBOT_3
A9E4 RES 7,(HL) no order: give control up, and stop
A9E6 RES 6,(IX+$10)
A9EA XOR A
A9EB LD (IX+$09),A
A9EE LD (IX+$0A),A
REMOTE_ROBOT_0 A9F1 CALL DEC_DZ_AND_UPDATE_UVZ fall, and move by the step
A9F4 CALL IS_OBJ_MOVING not moving: done
A9F7 RET Z
A9F8 CALL BEEP_BY_Z a sound pitched by its height; redraw
A9FB JP SET_WIPE_AND_DRAW_FLAGS
REMOTE_ROBOT_1 A9FE SET 7,(HL) take control
AA00 SET 7,(IX+$10)
AA04 JR REMOTE_ROBOT_0
REMOTE_ROBOT_2 AA06 LD A,(HL) waiting, and still no order
AA07 AND $7F
AA09 JR Z,REMOTE_ROBOT_0
AA0B LD A,(IX+$10) an order: from waiting to moving
AA0E AND $3F
AA10 OR $40
AA12 LD (IX+$10),A
REMOTE_ROBOT_3 AA15 LD A,(HL) take the order; control stays taken
AA16 LD (HL),$80
AA18 DEC A the order's pair of steps
AA19 RLCA
AA1A AND $7E
AA1C LD HL,REMOTE_STEPS
AA1F CALL ADD_HL_A
AA22 LD A,(HL) the step in U and in V
AA23 INC HL
AA24 LD (IX+$09),A
AA27 LD A,(HL)
AA28 DEC HL
AA29 LD (IX+$0A),A
AA2C CALL NEXT_FRAME_MOD4 the next of its four graphics
AA2F LD A,(IX+$09) a step to take: take it
AA32 OR (IX+$0A)
AA35 JR Z,REMOTE_ROBOT_4
AA37 CALL DEC_DZ_AND_UPDATE_UVZ
REMOTE_ROBOT_4 AA3A LD HL,WARBLE_COUNTS its sound; redraw
AA3D CALL WARBLE_SOUND
AA40 JP SET_WIPE_AND_DRAW_FLAGS
Prev: A9B1 Up: Map Next: AA43