From 9c94e2da8bd5ceae89ca3ca655b8585022837ba6 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 5 Jan 2024 16:36:44 +0100 Subject: [PATCH] Switch between rendered modes using space in the test app. --- tools/merger/test/game_application.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/merger/test/game_application.h b/tools/merger/test/game_application.h index a0f9ef9..a1b6a3a 100644 --- a/tools/merger/test/game_application.h +++ b/tools/merger/test/game_application.h @@ -28,6 +28,12 @@ public: down = pressed; } else if (scancode == KEY_D) { right = pressed; + } + + if (k->get_physical_scancode() == KEY_SPACE) { + if (pressed) { + immediate = !immediate; + } } return; @@ -67,8 +73,11 @@ public: } virtual void render() { - //render_obj(); - render_immediate(); + if (!immediate) { + render_obj(); + } else { + render_immediate(); + } } virtual void render_immediate() { @@ -156,6 +165,8 @@ public: } GameApplication() { + immediate = false; + left = false; right = false; up = false; @@ -327,6 +338,8 @@ public: memdelete(sprite); } + bool immediate; + bool left; bool right; bool up;