diff options
author | quou <quou@disroot.org> | 2024-08-10 22:43:20 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-08-10 22:43:20 +1000 |
commit | 4d1b3761467722d5d2899084fc6e384effa214d6 (patch) | |
tree | 129544f71d5b9eb72b6eaca428e9a3823ac8ad3c | |
parent | bcd2fc9a97d33884e1229d62bb65d5a2679334b7 (diff) |
pause
-rw-r--r-- | 3de.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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)); |