idk what I coded

This commit is contained in:
2024-10-06 01:30:45 -05:00
parent b7829fda5c
commit 40b0395552
7 changed files with 41 additions and 7 deletions

View File

@ -25,7 +25,23 @@ void frameUpdate() {
if(map == NULL) return;
// Draw the map area.
frameMapDraw();
if(GAME.state == GAME_STATE_PAUSED) {
framePausedDraw();
} else {
frameMapDraw();
}
}
void framePausedDraw() {
char_t *test = "Paused";
uint16_t x = (FRAME_WIDTH - strlen(test)) / 2;
uint16_t y = (FRAME_HEIGHT - FRAME_BOTTOM_UI_HEIGHT) / 2;
uint16_t j;
for(uint16_t i = 0; i < strlen(test); i++) {
j = (y * FRAME_WIDTH) + x + i;
FRAME_BUFFER[j] = test[i];
FRAME_COLOR[j] = COLOR_WHITE;
}
}
void frameUIReset() {

View File

@ -32,6 +32,11 @@ void frameInit();
*/
void frameUpdate();
/**
* Draws the paused screen.
*/
void framePausedDraw();
/**
* Resets the UI area of the frame.
*/