From c4147de174b3b9212df8f6210df2ff090af0cd0f Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Sat, 20 Aug 2022 23:12:25 +0200 Subject: [PATCH] render: enable footer on demand --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index cdf6455..bbc5739 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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);