Prev: BCBF Up: Map Next: BD04
BCD1: The ship on a slope
Used by the routine at leave_slope.
An object is done (next_box's stop). The ship stops scrolling this pass, with a sound unless it is being knocked sideways (fuel_saver) or was on the slope last pass; on its second pass in a row it slides 2 pixels downhill. Marks ship_on_slope. All of it ran in the build's sessions.
ship_on_slope_response BCD1 LD A,(piece_step_x) an object: stop
BCD4 AND A
BCD5 JP Z,next_box_2
BCD8 XOR A the ship: no scroll this pass
BCD9 LD (scroll_across),A
BCDC LD (scroll_down),A
BCDF LD A,(fuel_saver) a sound, if new to the slope and not knocked
BCE2 AND A
BCE3 JR NZ,ship_on_slope_response_0
BCE5 LD A,(ship_on_slope)
BCE8 AND A
BCE9 CALL Z,sound_buzz
ship_on_slope_response_0 BCEC LD A,(ship_on_slope) on the slope last pass too: 2 pixels downhill
BCEF AND A
BCF0 JR Z,ship_on_slope_response_1
BCF2 CALL downhill
BCF5 LD A,(IX+$07)
BCF8 ADD A,A
BCF9 LD (scroll_across),A
ship_on_slope_response_1 BCFC LD A,$80 on a slope; stop
BCFE LD (ship_on_slope),A
BD01 JP next_box_2
Prev: BCBF Up: Map Next: BD04