mirror of
https://codeberg.org/hkzlab/TK2048.git
synced 2025-12-25 14:22:16 +11:00
Draw the game box
This commit is contained in:
parent
340a521b05
commit
8c48dfa6cd
1 changed files with 6 additions and 2 deletions
|
|
@ -27,13 +27,17 @@ void draw_game_background(void) {
|
|||
uint8_t* buf = (uint8_t*)DISPLAY_PAGE_1;
|
||||
|
||||
// Horizontal borders
|
||||
for(uint8_t col = 0; col < GRID_SIDE * 5; col++) {
|
||||
for(uint8_t col = 0; col < GRID_SIDE * (TILE_SIDE/7); col++) {
|
||||
buf[line_offset_map[TOP_OFFSET] + col + LEFT_OFFSET_B] = 0x7F;
|
||||
buf[line_offset_map[TOP_OFFSET + (TILE_SIDE * GRID_SIDE)] + col + LEFT_OFFSET_B] = 0x7F;
|
||||
}
|
||||
|
||||
// TODO vertical borders
|
||||
|
||||
for(uint8_t row = 1; row < TILE_SIDE * GRID_SIDE; row++) { // Skipping one at the top
|
||||
buf[line_offset_map[row + TOP_OFFSET] + LEFT_OFFSET_B - 1] = 0x40;
|
||||
buf[line_offset_map[row + TOP_OFFSET] + LEFT_OFFSET_B + (GRID_SIDE * (TILE_SIDE/7))] = 0x01;
|
||||
}
|
||||
|
||||
// Copy the data from display page 1 to 2
|
||||
memcpy((void*)DISPLAY_PAGE_2, (void*)DISPLAY_PAGE_1, DISPLAY_PAGE_SIZE);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue