Prev: 24823 Up: Map Next: 24868
24835: Initialise new screen data
Called when a new screen of aliens is to appear, which means start of game or when a screen is cleared. Initialise the data structures.
Curiously, after 5 screens the rate at which the aliens fire fire back in incremented, up to a limit at screen 44, when presumably the algorithm makes the game impossible.
Used by the routine at start.
init_new_screen 24835 LD HL,_SCREEN_INIT_DATA Copy defaults values for the game's runtime data block starting at _NUM_ALIENS_REMAINING
24838 LD DE,_NUM_ALIENS_REMAINING
24841 LD BC,39
24844 LDIR
24846 LD A,(_NUMBER_OF_SCREENS_COMPLETED) Pick up screen number and increment it. Limited to 255
24849 INC A
24850 RET Z
24851 LD (_NUMBER_OF_SCREENS_COMPLETED),A Write it back
24854 CP 50 Limit alien fire rate even if player is doing remarkably well
24856 RET NC
24857 CP 9 Limit alien fire rate for first few screens
24859 RET C
24860 LD A,(_ALIENS_FIRE_RATE) Bump alien fire rate
24863 INC A
24864 LD (_ALIENS_FIRE_RATE),A
24867 RET
Prev: 24823 Up: Map Next: 24868