mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -07:00
Adds an option in debug menu to load directly into your save rather than waiting through the opening.
This commit is contained in:
parent
02f5fae219
commit
9ecf28bbd8
2 changed files with 67 additions and 1 deletions
|
@ -680,7 +680,7 @@ namespace SohImGui {
|
|||
EnhancementCheckbox("MM Bunny Hood", "gMMBunnyHood");
|
||||
Tooltip("Wearing the Bunny Hood grants a speed increase like in Majora's Mask");
|
||||
EnhancementCheckbox("Load Save Entrance", "gSaveEntrance");
|
||||
Tooltip("Instead of going to Link's House or the Temple of Time when you load your save, go to where you saved your game.");
|
||||
Tooltip("Instead of going to Link's House or The Temple of Time when you load your save, go to where you saved your game.");
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
@ -778,6 +778,11 @@ namespace SohImGui {
|
|||
{
|
||||
EnhancementCheckbox("OoT Debug Mode", "gDebugEnabled");
|
||||
Tooltip("Enables Debug Mode, allowing you to select maps with L + R + Z, noclip with L + D-pad Right,\nand open the debug menu with L on the pause screen");
|
||||
EnhancementCheckbox("Fast File Select", "gSkipLogoTitle");
|
||||
Tooltip("Directly load the game to selected slot bellow\nUse slot number 4 to load directly in Zelda Map Select\n(Do not require debug menu but you will be unable to save there)\n(you can also load Zelda map select with Debug mod + slot 0).");
|
||||
if (CVar_GetS32("gSkipLogoTitle", 0)) {
|
||||
EnhancementSliderInt("Save file to load: %d", "##SaveFileID", "gSaveFileID", 1, 4, "");
|
||||
}
|
||||
ImGui::Separator();
|
||||
EnhancementCheckbox("Stats", "gStatsEnabled");
|
||||
Tooltip("Shows the stats window, with your FPS and frametimes, and the OS you're playing on");
|
||||
|
|
|
@ -222,6 +222,67 @@ void Title_Draw(TitleContext* this) {
|
|||
void Title_Main(GameState* thisx) {
|
||||
TitleContext* this = (TitleContext*)thisx;
|
||||
|
||||
if (CVar_GetS32("gSkipLogoTitle", 0) != 0) {
|
||||
Sram_InitSram(&this->state, &this->sramCtx);
|
||||
s16 selectedfile = CVar_GetS32("gSaveFileID", 0);
|
||||
if (selectedfile == 4) {
|
||||
selectedfile = 0xFF;
|
||||
} else {
|
||||
selectedfile--;
|
||||
if (selectedfile < 0) {
|
||||
selectedfile = 0xFF;
|
||||
}
|
||||
}
|
||||
if (selectedfile == 0 && CVar_GetS32("gDebugEnabled", 0) || selectedfile == 0xFF) {
|
||||
gSaveContext.fileNum = selectedfile;
|
||||
Sram_OpenSave(&this->sramCtx);
|
||||
gSaveContext.gameMode = 0;
|
||||
this->state.running = false;
|
||||
SET_NEXT_GAMESTATE(&this->state, Select_Init, SelectContext);
|
||||
} else {
|
||||
gSaveContext.fileNum = selectedfile;
|
||||
Sram_OpenSave(&this->sramCtx);
|
||||
gSaveContext.gameMode = 0;
|
||||
this->state.running = false;
|
||||
SET_NEXT_GAMESTATE(&this->state, Gameplay_Init, GlobalContext);
|
||||
}
|
||||
gSaveContext.respawn[0].entranceIndex = -1;
|
||||
gSaveContext.respawnFlag = 0;
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = 0xFF;
|
||||
gSaveContext.showTitleCard = true;
|
||||
gSaveContext.dogParams = 0;
|
||||
gSaveContext.timer1State = 0;
|
||||
gSaveContext.timer2State = 0;
|
||||
gSaveContext.eventInf[0] = 0;
|
||||
gSaveContext.eventInf[1] = 0;
|
||||
gSaveContext.eventInf[2] = 0;
|
||||
gSaveContext.eventInf[3] = 0;
|
||||
gSaveContext.unk_13EE = 0x32;
|
||||
gSaveContext.nayrusLoveTimer = 0;
|
||||
gSaveContext.healthAccumulator = 0;
|
||||
gSaveContext.unk_13F0 = 0;
|
||||
gSaveContext.unk_13F2 = 0;
|
||||
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
|
||||
gSaveContext.skyboxTime = 0;
|
||||
gSaveContext.nextTransition = 0xFF;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFEF;
|
||||
gSaveContext.cutsceneTrigger = 0;
|
||||
gSaveContext.chamberCutsceneNum = 0;
|
||||
gSaveContext.nextDayTime = 0xFFFF;
|
||||
gSaveContext.unk_13C3 = 0;
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
gSaveContext.unk_13E7 = gSaveContext.unk_13E8 = gSaveContext.unk_13EA = gSaveContext.unk_13EC =
|
||||
gSaveContext.unk_13F4 = 0;
|
||||
gSaveContext.unk_13F6 = gSaveContext.magic;
|
||||
gSaveContext.magic = 0;
|
||||
gSaveContext.magicLevel = gSaveContext.magic;
|
||||
gSaveContext.naviTimer = 0;
|
||||
// Properly exit the function to avoid issues with OPEN_DISP etc.
|
||||
return;
|
||||
}
|
||||
|
||||
OPEN_DISPS(this->state.gfxCtx, "../z_title.c", 494);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue