![]() |
Routines |
| Prev: B5CB | Up: Map | Next: B689 |
|
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 18 characters wide and 18 characters tall, and the attributes are bright blue.
|
||||||||
| DrawBorder | B5EB | LD HL,$9401 | Point HL at the border graphics. | |||||
| B5EE | LD ($9618),HL | Use them as the current character set. | ||||||
|
Draw the outer ring of beads, which uses characters 00 and 01.
|
||||||||
| B5F1 | LD HL,$4000 | Point HL at the top left of the display file. | ||||||
| B5F4 | LD BC,$1800 | The top row is 18 characters wide (B) and starts with character 01 (C). | ||||||
| B5F7 | CALL PrintBorderRow | Draw the top row using PrintBorderRow. | ||||||
| B5FA | LD HL,$50E0 | Point HL at the start of the bottom row, in the last character row. | ||||||
| B5FD | LD BC,$1801 | The bottom row is 18 characters wide (B) and starts with character 00 (C). | ||||||
| B600 | CALL PrintBorderRow | Draw the bottom row. | ||||||
| B603 | LD HL,$4020 | Point HL at the left column, on the second character row. | ||||||
| B606 | LD BC,$1601 | The column is 16 characters tall (B) and starts with character 00 (C). | ||||||
| B609 | CALL PrintBorderColumn | Draw the left column using PrintBorderColumn. | ||||||
| B60C | LD HL,$4037 | Point HL at the right column, on the second character row. | ||||||
| B60F | LD BC,$1600 | The column is 16 characters tall (B) and starts with character 01 (C). | ||||||
| B612 | CALL PrintBorderColumn | Draw the right column. | ||||||
|
Draw the inner ring of beads, which uses characters 02 and 03.
|
||||||||
| B615 | LD HL,$4021 | Point HL at the start of the second character row, one column in. | ||||||
| B618 | LD BC,$1602 | The row is 16 characters long (B) and starts with character 03 (C). | ||||||
| B61B | CALL PrintBorderRow | Draw the second row. | ||||||
| B61E | LD HL,$50C1 | Point HL at the start of the last but one character row, one column in. | ||||||
| B621 | LD B,$16 | The row is 16 characters long. | ||||||
| B623 | CALL PrintBorderRow | Draw it. | ||||||
| B626 | LD HL,$4041 | Point HL at the second column, on the third character row. | ||||||
| B629 | LD B,$14 | The column is 14 characters tall. | ||||||
| B62B | CALL PrintBorderColumn | Draw it using PrintBorderColumn. | ||||||
| B62E | LD HL,$4056 | Point HL at the second to last column, on the third character row. | ||||||
| B631 | LD B,$14 | The column is 14 characters tall. | ||||||
| B633 | CALL PrintBorderColumn | Draw it. | ||||||
|
Colour the frame.
|
||||||||
| B636 | LD A,$48 | Use 48 (bright, black ink on blue paper) for the top left and bottom left corners. | ||||||
| B638 | LD ($5800),A | Write the attribute to the top left corner. | ||||||
| B63B | LD ($5AE0),A | Write the attribute to the bottom left corner. | ||||||
| B63E | LD A,$41 | Use 41 (bright, blue ink on black paper) for the top right and bottom right corners. | ||||||
| B640 | LD ($5817),A | Write the attribute to the top right corner. | ||||||
| B643 | LD ($5AF7),A | Write the attribute to the bottom right corner. | ||||||
| B646 | LD HL,$5801 | Point HL at the top row, after the corner. | ||||||
| B649 | LD BC,$1649 | The row is 16 attributes long (B) and the attribute is 49 (bright, blue ink on blue paper) (C). | ||||||
| B64C | CALL FillAttributeRow | Colour the top row using FillAttributeRow. | ||||||
| B64F | LD HL,$5AE1 | Point HL at the bottom row, after the corner. | ||||||
| B652 | LD B,$16 | The row is 16 attributes long. | ||||||
| B654 | CALL FillAttributeRow | Colour the bottom row. | ||||||
| B657 | LD HL,$5820 | Point HL at the left column, below the corner. | ||||||
| B65A | LD B,$16 | The column is 16 attributes tall. | ||||||
| B65C | CALL FillAttributeColumn | Colour the left column using FillAttributeColumn. | ||||||
| B65F | LD HL,$5837 | Point HL at the right column, below the corner. | ||||||
| B662 | LD B,$16 | The column is 16 attributes tall. | ||||||
| B664 | CALL FillAttributeColumn | Colour the right column. | ||||||
| B667 | LD HL,$5821 | Point HL at the second row, one column in. | ||||||
| B66A | LD BC,$1648 | The row is 16 attributes long (B) and the attribute is 48 (C). | ||||||
| B66D | CALL FillAttributeRow | Colour the second row. | ||||||
| B670 | LD HL,$5AC1 | Point HL at the last but one row, one column in. | ||||||
| B673 | LD B,$16 | The row is 16 attributes long. | ||||||
| B675 | CALL FillAttributeRow | Colour it. | ||||||
| B678 | LD HL,$5841 | Point HL at the second column, on the third row. | ||||||
| B67B | LD B,$14 | The column is 14 attributes tall. | ||||||
| B67D | CALL FillAttributeColumn | Colour it. | ||||||
| B680 | LD HL,$5856 | Point HL at the second to last column, on the third row. | ||||||
| B683 | LD B,$14 | The column is 14 attributes tall. | ||||||
| B685 | CALL FillAttributeColumn | Colour it. | ||||||
| B688 | RET | Return. | ||||||
| Prev: B5CB | Up: Map | Next: B689 |