![]() |
Routines |
Prev: 31290 | Up: Map | Next: 31327 |
Sets 2 rows of attributes to an INK colour, starting with the row in _NEXT_ALIEN_ROW_TO_DRAW. The colour comes from a table indexed by the value at _ALIEN_BAND_ARG.
As the aliens move down the screen the bands of yellow, green, green, red, red need to move down with them. This sets the colour bands for one row of aliens
The alien band to set is passed in via _ALIEN_BAND_ARG and provides the colour: top row (0) is yellow, row 1 is green, etc
_NEXT_ALIEN_ROW_TO_DRAW is cy; the cy is the attribute row to start at. _ALIEN_BAND_ARG contains band to set colour, 0 being top alien row
Called from the routine at print_alien_row
|
||||
set_alien_colour_band | 31303 | LD BC,(_NEXT_ALIEN_ROW_TO_DRAW) | cy from here goes into B | |
31307 | LD C,0 | cx is 0, start of row | ||
31309 | LD HL,_ALIEN_COLOUR_BANDS | Colour bands table | ||
31312 | LD A,(_ALIEN_BAND_ARG) | Alien row to colour, 0 to 4 (top to bottom) | ||
31315 | ADD A,L | Find table entry | ||
31316 | LD L,A | |||
31317 | JR NC,set_alien_colour_band_0 | |||
31319 | INC H | |||
set_alien_colour_band_0 | 31320 | LD A,(HL) | Pick up INK colour from (HL) | |
31321 | LD E,A | E is INK colour | ||
31322 | LD D,64 | 2 full rows | ||
31324 | JP set_attributes_xy_n | Set INK colour of 64 cells from B,C |
Prev: 31290 | Up: Map | Next: 31327 |