render: enable footer on demand

This commit is contained in:
Lephenixnoir 2022-08-20 23:12:25 +02:00
parent d4db7d54d1
commit c4147de174
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 3 additions and 2 deletions

View File

@ -41,6 +41,7 @@ int main(void)
num level_z = 0.0;
num player_speed = 5.0;
int sections_passed = 0;
bool show_footer = false;
struct camera camera;
camera.pos = vec3(0, RENDER_CAMERA_DEPTH, 0);
@ -105,7 +106,6 @@ int main(void)
prof_leave_norec(perf_comp);
azrp_update();
static bool show_footer = false;
if(show_footer) {
drect(0, DHEIGHT-20, DWIDTH-1, DHEIGHT-1, C_WHITE);
dprint(4, 209, C_BLACK, "render:%4d+%4dus comp:%4dus FPS:%02d",
@ -115,7 +115,6 @@ int main(void)
last_frame_us ? 1000000 / last_frame_us : 0);
r61524_display(gint_vram, DHEIGHT-20, 20, R61524_DMA_WAIT);
}
show_footer = !show_footer;
//---
// Input
@ -128,6 +127,8 @@ int main(void)
if(ev.key == KEY_EXIT || ev.key == KEY_MENU)
game_run = false;
if(ev.key == KEY_OPTN)
show_footer = !show_footer;
if(ev.key == KEY_F1) {
level = level_create(1);
level_update(&level);