Switch between rendered modes using space in the test app.

This commit is contained in:
Relintai 2024-01-05 16:36:44 +01:00
parent a7007dda46
commit 9c94e2da8b

View File

@ -30,6 +30,12 @@ public:
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;