summaryrefslogtreecommitdiff
path: root/3de.c
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-08-10 22:43:20 +1000
committerquou <quou@disroot.org>2024-08-10 22:43:20 +1000
commit4d1b3761467722d5d2899084fc6e384effa214d6 (patch)
tree129544f71d5b9eb72b6eaca428e9a3823ac8ad3c /3de.c
parentbcd2fc9a97d33884e1229d62bb65d5a2679334b7 (diff)
pause
Diffstat (limited to '3de.c')
-rw-r--r--3de.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/3de.c b/3de.c
index 099096a..679f61d 100644
--- a/3de.c
+++ b/3de.c
@@ -89,7 +89,7 @@ int entrypoint(int argc, const char** argv, Arena* a) {
Colour blue = make_aliceblue();
Player p;
Services s;
- int editing = 0;
+ int editing = 0, pause = 0;
(void)argc;
(void)argv;
init_maths();
@@ -134,7 +134,11 @@ int entrypoint(int argc, const char** argv, Arena* a) {
editing = !editing;
cfg_mouse(app, editing);
}
- if (!editing)
+ if (app->key_states[key_escape] & key_state_just_pressed) {
+ pause = !pause;
+ cfg_mouse(app, pause);
+ }
+ if (!editing && !pause)
update_player(&p, &s);
ren_begin(&r, app->fb, depth, app->w, app->h);
ren_clearc(&r, make_colour(0xc3c3c3, 0xff));