Prev: 46539 Up: Map Next: 46729
46571: Draw Border
Used by the routines at InitialiseGame and GameOver.
Draws the decorative frame that surrounds the play window and the screen text: two rings of beads, one inside the other, each made of two characters that alternate. The frame is 24 characters wide and 24 characters tall, and the attributes are bright blue.
Before After
draw-border-before draw-border-after
DrawBorder 46571 LD HL,37889 Point HL at the border graphics.
46574 LD (38424),HL Use them as the current character set.
Draw the outer ring of beads, which uses characters 0 and 1.
46577 LD HL,16384 Point HL at the top left of the display file.
46580 LD BC,6144 The top row is 24 characters wide (B) and starts with character 1 (C).
46583 CALL PrintBorderRow Draw the top row using PrintBorderRow.
46586 LD HL,20704 Point HL at the start of the bottom row, in the last character row.
46589 LD BC,6145 The bottom row is 24 characters wide (B) and starts with character 0 (C).
46592 CALL PrintBorderRow Draw the bottom row.
46595 LD HL,16416 Point HL at the left column, on the second character row.
46598 LD BC,5633 The column is 22 characters tall (B) and starts with character 0 (C).
46601 CALL PrintBorderColumn Draw the left column using PrintBorderColumn.
46604 LD HL,16439 Point HL at the right column, on the second character row.
46607 LD BC,5632 The column is 22 characters tall (B) and starts with character 1 (C).
46610 CALL PrintBorderColumn Draw the right column.
Draw the inner ring of beads, which uses characters 2 and 3.
46613 LD HL,16417 Point HL at the start of the second character row, one column in.
46616 LD BC,5634 The row is 22 characters long (B) and starts with character 3 (C).
46619 CALL PrintBorderRow Draw the second row.
46622 LD HL,20673 Point HL at the start of the last but one character row, one column in.
46625 LD B,22 The row is 22 characters long.
46627 CALL PrintBorderRow Draw it.
46630 LD HL,16449 Point HL at the second column, on the third character row.
46633 LD B,20 The column is 20 characters tall.
46635 CALL PrintBorderColumn Draw it using PrintBorderColumn.
46638 LD HL,16470 Point HL at the second to last column, on the third character row.
46641 LD B,20 The column is 20 characters tall.
46643 CALL PrintBorderColumn Draw it.
Colour the frame.
46646 LD A,72 Use 72 (bright, black ink on blue paper) for the top left and bottom left corners.
46648 LD (22528),A Write the attribute to the top left corner.
46651 LD (23264),A Write the attribute to the bottom left corner.
46654 LD A,65 Use 65 (bright, blue ink on black paper) for the top right and bottom right corners.
46656 LD (22551),A Write the attribute to the top right corner.
46659 LD (23287),A Write the attribute to the bottom right corner.
46662 LD HL,22529 Point HL at the top row, after the corner.
46665 LD BC,5705 The row is 22 attributes long (B) and the attribute is 73 (bright, blue ink on blue paper) (C).
46668 CALL FillAttributeRow Colour the top row using FillAttributeRow.
46671 LD HL,23265 Point HL at the bottom row, after the corner.
46674 LD B,22 The row is 22 attributes long.
46676 CALL FillAttributeRow Colour the bottom row.
46679 LD HL,22560 Point HL at the left column, below the corner.
46682 LD B,22 The column is 22 attributes tall.
46684 CALL FillAttributeColumn Colour the left column using FillAttributeColumn.
46687 LD HL,22583 Point HL at the right column, below the corner.
46690 LD B,22 The column is 22 attributes tall.
46692 CALL FillAttributeColumn Colour the right column.
46695 LD HL,22561 Point HL at the second row, one column in.
46698 LD BC,5704 The row is 22 attributes long (B) and the attribute is 72 (C).
46701 CALL FillAttributeRow Colour the second row.
46704 LD HL,23233 Point HL at the last but one row, one column in.
46707 LD B,22 The row is 22 attributes long.
46709 CALL FillAttributeRow Colour it.
46712 LD HL,22593 Point HL at the second column, on the third row.
46715 LD B,20 The column is 20 attributes tall.
46717 CALL FillAttributeColumn Colour it.
46720 LD HL,22614 Point HL at the second to last column, on the third row.
46723 LD B,20 The column is 20 attributes tall.
46725 CALL FillAttributeColumn Colour it.
46728 RET Return.
Prev: 46539 Up: Map Next: 46729