From 9c41610be508578935942dfd9ab7758fdfae2597 Mon Sep 17 00:00:00 2001 From: Sonic Dreamcaster Date: Tue, 26 Nov 2024 05:23:08 -0300 Subject: [PATCH] Developer: add ending debug option --- src/overlays/ovl_menu/fox_title.c | 10 ++++++++-- src/port/ui/ImguiUI.cpp | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index a1e7eec0..57d13a51 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -3388,8 +3388,14 @@ void Title_NextState_OptionMenu(void) { if (sWipeHeight < 120) { sWipeHeight += 18; } else { - gGameState = GSTATE_MENU; - // gGameState = GSTATE_ENDING; + if (CVarGetInteger("gDebugEnding", 0) == 1) { + gGameState = GSTATE_ENDING; + gGreatFoxIntact = 1; + gLeveLClearStatus[LEVEL_ZONESS] = 1; + gLeveLClearStatus[LEVEL_KATINA] = 1; + } else { + gGameState = GSTATE_MENU; + } gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; gDrawMode = DRAW_NONE; diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index 3d8d6c8e..ef9b6f45 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -560,6 +560,10 @@ void DrawDebugMenu() { .tooltip = "Control the Arwing speed" }); + UIWidgets::CVarCheckbox("Debug Ending", "gDebugEnding", { + .tooltip = "Jump to credits at the main menu" + }); + if (CVarGetInteger("gCheckpoint.Set", 0)) { if (UIWidgets::Button("Clear Checkpoint")) { CVarClear("gCheckpoint.Set");