Modified z_sram.c so that it would no longer, by default, change your entranceIndex to link's home or the temple of time. Grottos bring to default.

This commit is contained in:
starburst 2022-05-18 17:44:40 -05:00
commit 5430c0adb6
2 changed files with 12 additions and 2 deletions

View file

@ -679,6 +679,8 @@ namespace SohImGui {
Tooltip("Allows equiping the tunic and boots to c-buttons"); Tooltip("Allows equiping the tunic and boots to c-buttons");
EnhancementCheckbox("MM Bunny Hood", "gMMBunnyHood"); EnhancementCheckbox("MM Bunny Hood", "gMMBunnyHood");
Tooltip("Wearing the Bunny Hood grants a speed increase like in Majora's Mask"); 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.");
ImGui::EndMenu(); ImGui::EndMenu();
} }

View file

@ -362,14 +362,22 @@ void Sram_OpenSave(SramContext* sramCtx) {
case SCENE_GANON_DEMO: case SCENE_GANON_DEMO:
gSaveContext.entranceIndex = 0x41B; gSaveContext.entranceIndex = 0x41B;
break; break;
case SCENE_KAKUSIANA:
default:
if (gSaveContext.savedSceneNum != SCENE_LINK_HOME) { if (gSaveContext.savedSceneNum != SCENE_LINK_HOME) {
gSaveContext.entranceIndex = (LINK_AGE_IN_YEARS == YEARS_CHILD) ? 0xBB : 0x5F4; gSaveContext.entranceIndex = (LINK_AGE_IN_YEARS == YEARS_CHILD) ? 0xBB : 0x5F4;
} else { } else {
gSaveContext.entranceIndex = 0xBB; gSaveContext.entranceIndex = 0xBB;
} }
break; break;
default:
if (!CVar_GetS32("gSaveEntrance", true))
if (gSaveContext.savedSceneNum != SCENE_LINK_HOME) {
gSaveContext.entranceIndex = (LINK_AGE_IN_YEARS == YEARS_CHILD) ? 0xBB : 0x5F4;
} else {
gSaveContext.entranceIndex = 0xBB;
}
break;
} }
osSyncPrintf("scene_no = %d\n", gSaveContext.entranceIndex); osSyncPrintf("scene_no = %d\n", gSaveContext.entranceIndex);