Prev: CA2B Up: Map Next: CA9D
CA55: Draw the frame round the play area
Used by the routine at NEW_GAME.
Yellow on red, in the border's pieces (BORDER_CHARS) as FRAME_PIECES arranges them: corners two characters square at rows 0 and 16 and columns 5 and 29; eleven lengths of edge along the top and the bottom between them, from column 7; seven lengths of side down each side, from row 2. The play area is what it encloses, character rows 2-15 and columns 7-28. Called once a game, by NEW_GAME.
DRAW_PLAY_FRAME CA55 LD A,$16 yellow on red; the border's pieces; the frame's layout
CA57 EX AF,AF'
CA58 LD HL,BORDER_CHARS
CA5B LD (FONT_BASE),HL
CA5E LD DE,FRAME_PIECES
CA61 LD HL,$4005 the four corners, taking four codes each
CA64 CALL PRINT_BLOCK
CA67 LD HL,$401D
CA6A CALL PRINT_BLOCK
CA6D LD HL,$5005
CA70 CALL PRINT_BLOCK
CA73 LD HL,$501D
CA76 CALL PRINT_BLOCK
CA79 LD HL,$4007 the top and the bottom, the same four codes for every length
CA7C LD B,$0B
CA7E CALL PRINT_BLOCK_ROW
CA81 LD HL,$5007
CA84 LD B,$0B
CA86 CALL PRINT_BLOCK_ROW
CA89 INC DE past the edges' codes to the sides'
CA8A INC DE
CA8B INC DE
CA8C INC DE
CA8D LD HL,$4045 the left and the right side
CA90 LD B,$07
CA92 CALL PRINT_BLOCK_COLUMN
CA95 LD HL,$405D
CA98 LD B,$07
CA9A JP PRINT_BLOCK_COLUMN
Prev: CA2B Up: Map Next: CA9D