Prev: DCA1 Up: Map Next: DDF2
DD79: Decide whether the landscape's fly-in has finished
Used by the routine at scroll_landscape.
scroll_landscape comes here instead of going on with the play pass while map_rebuild is not zero. In the fly-in ($FF) the landscape keeps scrolling 4 pixels a pass: 40 passes (160 rows, one map cell) when the play area was left unfilled, or, when it was filled with the checker, until the six bytes in two rows at the ship's screen position (kept in bare_ship) are all clear -- the sky has been swept down to the ship's place. Then the colour goes on, one pass is drawn with map_rebuild = 3, and finally the window is rebuilt with objects (map_rebuild = 0), the ship's record (in bare_ship) gets the map column and row (+1, +4) and the in-cell position (+2, +5), and play begins through sound_rising_whine, which returns to the caller of start_landscape.
fly_in_step DD79 LD A,(map_rebuild) The last pass done: on to play.
DD7C CP $03
DD7E JP Z,fly_in_step_4
DD81 LD A,$04 Scroll 4 pixels a pass.
DD83 LD (scroll_down),A
DD86 LD A,(start_filled) Filled with the checker: go on until the ship's place is clear.
DD89 AND A
DD8A JR Z,fly_in_step_2
DD8C LD B,$06
DD8E LD HL,(ship_screen_x)
DD91 CALL pixel_to_screen
fly_in_step_0 DD94 LD A,(HL)
DD95 AND A
DD96 JR NZ,fly_in_step_1
DD98 DEC H
DD99 LD A,(HL)
DD9A AND A
DD9B JR NZ,fly_in_step_1
DD9D INC H
DD9E INC L
DD9F DJNZ fly_in_step_0
DDA1 POP BC
DDA2 JR fly_in_step_3
fly_in_step_1 DDA4 POP BC
DDA5 JR start_landscape_7
fly_in_step_2 DDA7 POP BC Not filled: 40 passes.
DDA8 DJNZ start_landscape_7
fly_in_step_3 DDAA CALL colour_play_area Colour the play area; one more pass with the window rebuilt.
DDAD XOR A
DDAE LD (scroll_down),A
DDB1 LD A,$03
DDB3 LD (map_rebuild),A
DDB6 LD HL,(view_column)
DDB9 CALL load_map_window
DDBC JP start_landscape_7
fly_in_step_4 DDBF POP BC Play: rebuild the window with its objects.
DDC0 XOR A
DDC1 LD (map_rebuild),A
DDC4 LD HL,(view_column)
DDC7 CALL load_map_window
DDCA LD IX,ship_record The ship's map position and in-cell position.
DDCE LD HL,(view_column)
DDD1 LD (IX+$01),L
DDD4 LD (IX+$04),H
DDD7 LD HL,(view_x)
DDDA LD (IX+$02),L
DDDD LD (IX+$05),H
DDE0 LD (IX+$07),$58
DDE4 LD A,(IX+$1E)
DDE7 SUB $17
DDE9 LD (IX+$09),A
DDEC CALL move_object
DDEF JP sound_rising_whine Into play.
Prev: DCA1 Up: Map Next: DDF2