idk what I coded
This commit is contained in:
@ -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() {
|
||||
|
@ -32,6 +32,11 @@ void frameInit();
|
||||
*/
|
||||
void frameUpdate();
|
||||
|
||||
/**
|
||||
* Draws the paused screen.
|
||||
*/
|
||||
void framePausedDraw();
|
||||
|
||||
/**
|
||||
* Resets the UI area of the frame.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user