summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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));