Prev: BC3E Up: Map Next: BDFB
BDC1: Clears the playfield then sets its attributes
The playfield is the lower two thirds of the screen - where the action happens.
clear_playfield clears it, then the bitmap is reset to $FF and three bands of attributes are laid in: two rows of plain sky, three rows of bright sky and eleven rows of the stage's ground colour. Both edge columns of every playfield row are then stamped black on black, which hides the road overdraw at the screen borders.
Used by the routines at load_stage, run_pregame_screen and set_up_stage.
set_playfield_attrs BDC1 CALL clear_playfield Call clear_playfield
BDC4 LD HL,$4800 Clear the game screen pixels to $FF (bug: duplicates work just done)
BDC7 LD DE,$4801
BDCA LD BC,$0FFF
BDCD LD (HL),$FF
BDCF LDIR
BDD1 LD HL,$5900 Clear the game screen attributes to $28 (black over cyan) - first two rows only
BDD4 LD DE,$5901
BDD7 LD (HL),$28
BDD9 LD C,$40
BDDB LDIR
BDDD LD (HL),$68 Clear the next three rows to $68 (bright, black over cyan)
BDDF LD C,$60
BDE1 LDIR
BDE3 LD A,($5CF4) Clear the next 11 rows to the current ground colour
BDE6 LD (HL),A
BDE7 LD BC,$015F
BDEA LDIR
BDEC LD HL,$5900 Clear the edges of the game screen to black on black
BDEF LD DE,$001F
BDF2 LD B,$10
cpsa_clear_edges_loop BDF4 LD (HL),D
BDF5 ADD HL,DE
BDF6 LD (HL),D
BDF7 INC HL
BDF8 DJNZ cpsa_clear_edges_loop
BDFA RET Return
Prev: BC3E Up: Map Next: BDFB