mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 14:23:44 -07:00
Save Entrance
This commit is contained in:
parent
091983b3e3
commit
d026b267e3
6 changed files with 78 additions and 2 deletions
19
libultraship/libultraship/GameSettings.cpp.rej
Normal file
19
libultraship/libultraship/GameSettings.cpp.rej
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
diff a/libultraship/libultraship/GameSettings.cpp b/libultraship/libultraship/GameSettings.cpp (rejected hunks)
|
||||||
|
@@ -75,6 +75,9 @@ namespace Game {
|
||||||
|
|
||||||
|
Settings.enhancements.newdrops = stob(Conf[EnhancementSection]["newdrops"]);
|
||||||
|
CVar_SetS32("gNewDrops", Settings.enhancements.newdrops);
|
||||||
|
+
|
||||||
|
+ Settings.enhancements.save_entrance = stob(Conf[EnhancementSection]["save_entrance"]);
|
||||||
|
+ CVar_SetS32("gSaveEntrance", Settings.enhancements.save_entrance);
|
||||||
|
|
||||||
|
// Audio
|
||||||
|
Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]);
|
||||||
|
@@ -184,6 +187,7 @@ namespace Game {
|
||||||
|
Conf[EnhancementSection]["newdrops"] = std::to_string(Settings.enhancements.newdrops);
|
||||||
|
Conf[EnhancementSection]["visualagony"] = std::to_string(Settings.enhancements.visualagony);
|
||||||
|
Conf[EnhancementSection]["mm_bunny_hood"] = std::to_string(Settings.enhancements.mm_bunny_hood);
|
||||||
|
+ Conf[EnhancementSection]["save_entrance"] = std::to_string(Settings.enhancements.save_entrance);
|
||||||
|
|
||||||
|
|
||||||
|
// Controllers
|
9
libultraship/libultraship/GameSettings.h.rej
Normal file
9
libultraship/libultraship/GameSettings.h.rej
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
diff a/libultraship/libultraship/GameSettings.h b/libultraship/libultraship/GameSettings.h (rejected hunks)
|
||||||
|
@@ -29,6 +29,7 @@ struct SoHConfigType {
|
||||||
|
bool newdrops = false;
|
||||||
|
bool visualagony = false;
|
||||||
|
bool mm_bunny_hood = false;
|
||||||
|
+ bool save_entrance = true;
|
||||||
|
|
||||||
|
} enhancements;
|
||||||
|
|
|
@ -576,6 +576,7 @@ namespace SohImGui {
|
||||||
EnhancementCheckbox("Minimal UI", "gMinimalUI");
|
EnhancementCheckbox("Minimal UI", "gMinimalUI");
|
||||||
EnhancementCheckbox("MM Bunny Hood", "gMMBunnyHood");
|
EnhancementCheckbox("MM Bunny Hood", "gMMBunnyHood");
|
||||||
EnhancementCheckbox("Visual Stone of Agony", "gVisualAgony");
|
EnhancementCheckbox("Visual Stone of Agony", "gVisualAgony");
|
||||||
|
EnhancementCheckbox("Save Last Entrance", "gSaveEntrance");
|
||||||
|
|
||||||
ImGui::Text("Graphics");
|
ImGui::Text("Graphics");
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
13
libultraship/libultraship/SohImGuiImpl.cpp.rej
Normal file
13
libultraship/libultraship/SohImGuiImpl.cpp.rej
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
diff a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp (rejected hunks)
|
||||||
|
@@ -421,6 +421,11 @@ namespace SohImGui {
|
||||||
|
needs_save = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (ImGui::Checkbox("Save Last Entrance", &Game::Settings.enhancements.save_entrance)) {
|
||||||
|
+ CVar_SetS32("gSaveEntrance", Game::Settings.enhancements.save_entrance);
|
||||||
|
+ needs_save = true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
ImGui::Text("Graphics");
|
||||||
|
ImGui::Separator();
|
||||||
|
|
|
@ -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", 0)) {
|
||||||
|
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);
|
||||||
|
|
26
soh/src/code/z_sram.c.rej
Normal file
26
soh/src/code/z_sram.c.rej
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
diff a/soh/src/code/z_sram.c b/soh/src/code/z_sram.c (rejected hunks)
|
||||||
|
@@ -362,14 +362,22 @@ void Sram_OpenSave(SramContext* sramCtx) {
|
||||||
|
case SCENE_GANON_DEMO:
|
||||||
|
gSaveContext.entranceIndex = 0x41B;
|
||||||
|
break;
|
||||||
|
-
|
||||||
|
- default:
|
||||||
|
+ case SCENE_KAKUSIANA:
|
||||||
|
if (gSaveContext.savedSceneNum != SCENE_LINK_HOME) {
|
||||||
|
gSaveContext.entranceIndex = (LINK_AGE_IN_YEARS == YEARS_CHILD) ? 0xBB : 0x5F4;
|
||||||
|
} else {
|
||||||
|
gSaveContext.entranceIndex = 0xBB;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
+ default:
|
||||||
|
+ if (!CVar_GetS32("gSaveEntrance", 0)) {
|
||||||
|
+ 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);
|
Loading…
Add table
Add a link
Reference in a new issue