summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorRalphie Morell <stratomaster64@gmail.com>2023-01-25 14:32:21 -0500
committerGitHub <noreply@github.com>2023-01-25 14:32:21 -0500
commit6d6c1c8c328eaaac957dcac1ef094259097a0085 (patch)
treeba84240a9f2078ba519fbf94322faa89d9cafef1 /soh/src/code
parent21ae445548da73233dc981713a0f2538262dc65a (diff)
Enhancement: Better Farore's Wind (#2374)
* Updated SaveManager, SaveContext; lifted restriction from gtg and ganon's castle; disabled clearing fw during master sword lift; added checkbox * increment load version (whoops); clear age fw after use * beef up fw console handler (for testing) * Simplify better FW (2 copies > 1 copy) * Apply suggestions * whoops
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_demo.c10
-rw-r--r--soh/src/code/z_parameter.c5
2 files changed, 13 insertions, 2 deletions
diff --git a/soh/src/code/z_demo.c b/soh/src/code/z_demo.c
index b8eab98b2..a00d018d6 100644
--- a/soh/src/code/z_demo.c
+++ b/soh/src/code/z_demo.c
@@ -616,8 +616,14 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->fadeTransition = 11;
break;
case 8:
- gSaveContext.fw.set = 0;
- gSaveContext.respawn[RESPAWN_MODE_TOP].data = 0;
+ if (CVarGetInteger("gBetterFW", 0)) {
+ FaroresWindData tempFW = gSaveContext.backupFW;
+ gSaveContext.backupFW = gSaveContext.fw;
+ gSaveContext.fw = tempFW;
+ } else {
+ gSaveContext.fw.set = 0;
+ gSaveContext.respawn[RESPAWN_MODE_TOP].data = 0;
+ }
if (!(gSaveContext.eventChkInf[4] & 0x20)) {
gSaveContext.eventChkInf[4] |= 0x20;
play->nextEntranceIndex = 0x00A0;
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c
index d82b4922f..c7ec3b46f 100644
--- a/soh/src/code/z_parameter.c
+++ b/soh/src/code/z_parameter.c
@@ -1371,6 +1371,11 @@ void Interface_SetSceneRestrictions(PlayState* play) {
interfaceCtx->restrictions.farores, interfaceCtx->restrictions.dinsNayrus,
interfaceCtx->restrictions.all);
osSyncPrintf(VT_RST);
+ if (CVarGetInteger("gBetterFW", 0)) {
+ if (currentScene == SCENE_MEN || currentScene == SCENE_GANONTIKA) {
+ interfaceCtx->restrictions.farores = 0;
+ }
+ }
return;
}
i++;