summaryrefslogtreecommitdiff
path: root/mm/2s2h/DeveloperTools/WarpPoint.cpp
diff options
context:
space:
mode:
authorGarrett Cox <garrettjcox@gmail.com>2025-11-24 21:31:29 -0600
committerGitHub <noreply@github.com>2025-11-24 22:31:29 -0500
commitc5b02ec2af6fc33006da521c135db295a0191c55 (patch)
tree6decbb7ea2981e010774a28a59f5547f5be29398 /mm/2s2h/DeveloperTools/WarpPoint.cpp
parentc59e0833be0b99747b37e171efa2b917d8fcd5c0 (diff)
Fix debug save options & expose boot to warp point (#1364)
* Fix debug save options & expose boot to warp point * Update mm/2s2h/DeveloperTools/WarpPoint.cpp Co-authored-by: Eblo <7004497+Eblo@users.noreply.github.com> * Update mm/2s2h/DeveloperTools/WarpPoint.cpp * Apply suggestion from @Eblo --------- Co-authored-by: Eblo <7004497+Eblo@users.noreply.github.com>
Diffstat (limited to 'mm/2s2h/DeveloperTools/WarpPoint.cpp')
-rw-r--r--mm/2s2h/DeveloperTools/WarpPoint.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/mm/2s2h/DeveloperTools/WarpPoint.cpp b/mm/2s2h/DeveloperTools/WarpPoint.cpp
index fa5cd9b63..d9af86dd2 100644
--- a/mm/2s2h/DeveloperTools/WarpPoint.cpp
+++ b/mm/2s2h/DeveloperTools/WarpPoint.cpp
@@ -3,6 +3,7 @@
#include "2s2h/GameInteractor/GameInteractor.h"
#include "2s2h/DeveloperTools/DeveloperTools.h"
#include "2s2h/ShipInit.hpp"
+#include "2s2h/BenGui/BenGui.hpp"
extern "C" {
#include "z64.h"
@@ -39,7 +40,7 @@ void Warp() {
// to leave it as a hidden cvar. This is incompatible with the SkipToFileSelect enhancement. To enable it open
// the Console and type: `set gDeveloperTools.WarpPoint.BootToWarpPoint 1`
gSaveContext.gameMode = GAMEMODE_NORMAL;
- Sram_InitDebugSave();
+ Sram_InitNewSave();
gSaveContext.sceneLayer = 0;
gSaveContext.save.time = CLOCK_TIME(8, 0);
gSaveContext.save.day = 1;
@@ -107,6 +108,17 @@ void RegisterWarpPoint() {
}
void RenderWarpPointSection() {
+ bool skipToFileSelect = (bool)CVarGetInteger("gEnhancements.Cutscenes.SkipToFileSelect", 0);
+ UIWidgets::CVarCheckbox(
+ "Boot to Warp Point on Launch", WARP_POINT_CVAR "BootToWarpPoint",
+ UIWidgets::CheckboxOptions({ { .disabled = skipToFileSelect,
+ .disabledTooltip = "Incompatible with Skip to File Select enhancement" } })
+ .DefaultValue(true)
+ .Color(THEME_COLOR)
+ .Tooltip(
+ "If enabled, the game will boot directly to the saved warp point with the debug save when launching "
+ "the game. Make temporary changes to the debug save (in code) to speed up your debugging experience\n\n"
+ "Incompatible with Skip to File Select enhancement."));
if (UIWidgets::Button("Set Warp Point", { { .disabled = gPlayState == NULL,
.disabledTooltip = "Cannot set warp points when not in-game" } })) {
Player* player = GET_PLAYER(gPlayState);