From 92fe25c22d3e7655facaebc13eca1dc2db0fba79 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Sat, 15 Feb 2025 22:42:01 -0500 Subject: [PATCH 1/3] pin linuxdeploy see https://github.com/HarbourMasters/Shipwright/pull/5070/ --- cmake/packaging.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/packaging.cmake b/cmake/packaging.cmake index be0fb315..2af9c685 100644 --- a/cmake/packaging.cmake +++ b/cmake/packaging.cmake @@ -60,7 +60,7 @@ if (NOT LINUXDEPLOY_EXECUTABLE) message(STATUS "Downloading linuxdeploy") set(LINUXDEPLOY_EXECUTABLE ${CPACK_PACKAGE_DIRECTORY}/linuxdeploy/linuxdeploy) file(DOWNLOAD - https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-x86_64.AppImage ${LINUXDEPLOY_EXECUTABLE} INACTIVITY_TIMEOUT 10 LOG ${CPACK_PACKAGE_DIRECTORY}/linuxdeploy/download.log @@ -87,4 +87,4 @@ execute_process( endif() -include(CPack) \ No newline at end of file +include(CPack) From f90ba8d4ad50c1ec9c4b6313e5edddda879adcac Mon Sep 17 00:00:00 2001 From: Kiloku Date: Wed, 12 Feb 2025 22:47:58 -0300 Subject: [PATCH 2/3] Make DebugPause work with a shortcut --- src/port/mods/PortEnhancements.c | 8 ++++++++ src/port/ui/ImguiUI.cpp | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/port/mods/PortEnhancements.c b/src/port/mods/PortEnhancements.c index 641ad55f..14431076 100644 --- a/src/port/mods/PortEnhancements.c +++ b/src/port/mods/PortEnhancements.c @@ -165,6 +165,14 @@ void OnGameUpdatePost(IEvent* event) { } void OnPlayUpdateEvent(IEvent* event){ + bool debugPaused = CVarGetInteger("gDebugPause", 0); + if (CVarGetInteger("gLToDebugPause", 0)){ + if (gControllerPress[0].button & L_TRIG) { + CVarSetInteger("gDebugPause", !debugPaused); + } + } else { + CVarSetInteger("gDebugPause", 0); //Unpause if we disable the shortcut + } event->cancelled = CVarGetInteger("gDebugPause", 0); } diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index 71c294be..63eb520a 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -718,9 +718,8 @@ void DrawDebugMenu() { .tooltip = "Jump to credits at the main menu" }); - if (gGameState == GSTATE_PLAY){ - UIWidgets::CVarCheckbox("Debug Pause", "gDebugPause"); - } + UIWidgets::CVarCheckbox("Press L to Debug Pause", "gLToDebugPause"); + if (CVarGetInteger(StringHelper::Sprintf("gCheckpoint.%d.Set", gCurrentLevel).c_str(), 0)) { if (UIWidgets::Button("Clear Checkpoint")) { From 38a2029cecd2b720c14eb19a949d6b99daf06da2 Mon Sep 17 00:00:00 2001 From: Kiloku Date: Wed, 12 Feb 2025 23:02:07 -0300 Subject: [PATCH 3/3] Add Frame Advance feature --- src/port/mods/PortEnhancements.c | 6 ++++++ src/port/ui/ImguiUI.cpp | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/port/mods/PortEnhancements.c b/src/port/mods/PortEnhancements.c index 14431076..3c38a290 100644 --- a/src/port/mods/PortEnhancements.c +++ b/src/port/mods/PortEnhancements.c @@ -166,14 +166,20 @@ void OnGameUpdatePost(IEvent* event) { void OnPlayUpdateEvent(IEvent* event){ bool debugPaused = CVarGetInteger("gDebugPause", 0); + bool shouldRepause = false; if (CVarGetInteger("gLToDebugPause", 0)){ if (gControllerPress[0].button & L_TRIG) { CVarSetInteger("gDebugPause", !debugPaused); + shouldRepause = debugPaused && CVarGetInteger("gLToFrameAdvance", 0); } } else { CVarSetInteger("gDebugPause", 0); //Unpause if we disable the shortcut } + event->cancelled = CVarGetInteger("gDebugPause", 0); + if (shouldRepause){ + CVarSetInteger("gDebugPause", 1); + } } void RefillBoostMeter(Player* player) { diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index 63eb520a..829b45ec 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -718,8 +718,12 @@ void DrawDebugMenu() { .tooltip = "Jump to credits at the main menu" }); - UIWidgets::CVarCheckbox("Press L to Debug Pause", "gLToDebugPause"); - + UIWidgets::CVarCheckbox("Press L to toggle Debug Pause", "gLToDebugPause"); + if (CVarGetInteger("gLToDebugPause", 0)){ + ImGui::Dummy(ImVec2(22.0f, 0.0f)); + ImGui::SameLine(); + UIWidgets::CVarCheckbox("Pressing L again advances one frame instead", "gLToFrameAdvance"); + } if (CVarGetInteger(StringHelper::Sprintf("gCheckpoint.%d.Set", gCurrentLevel).c_str(), 0)) { if (UIWidgets::Button("Clear Checkpoint")) {