From d902d6ab748b9ea38709188615fdc7b5de1a08cd Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Mon, 13 May 2019 18:09:41 -0700 Subject: [PATCH] When --watch flag is passed, reload all the code upon resume. This allows you to reload without wiping all game state! But maybe this should be a different flag? --- src/console.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/console.c b/src/console.c index 79867af..ab7c73e 100644 --- a/src/console.c +++ b/src/console.c @@ -2156,6 +2156,11 @@ static void onConsoleResumeCommand(Console* console, const char* param) { commandDone(console); + const tic_script_config* script_config = console->tic->api.get_script_config(console->tic); + if (script_config->eval && console->codeLiveReload.active) + { + script_config->eval(console->tic, console->tic->cart.code.data); + } console->tic->api.resume(console->tic); resumeRunMode();