summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorbriaguya <70942617+briaguya-ai@users.noreply.github.com>2022-12-06 00:34:30 -0500
committerGitHub <noreply@github.com>2022-12-06 00:34:30 -0500
commit321e563c8235bf4fc4c390ca5c0059239ab8406b (patch)
treedf6812bee9c5ea46407586f3107c19771a06d686 /soh/src/code
parentacd07f2a0766a71956b876f75ab90fb9f6c4f6fe (diff)
use enum for starting age (#2085)
Co-authored-by: briaguya <briaguya@alice>
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_parameter.c2
-rw-r--r--soh/src/code/z_sram.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c
index 1bd7c239c..1d4e59f07 100644
--- a/soh/src/code/z_parameter.c
+++ b/soh/src/code/z_parameter.c
@@ -1508,7 +1508,7 @@ void Inventory_SwapAgeEquipment(void) {
gSaveContext.equips.equipment = gSaveContext.childEquips.equipment;
gSaveContext.equips.equipment &= 0xFFF0;
gSaveContext.equips.equipment |= 0x0001;
- } else if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_STARTING_AGE)) {
+ } else if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_STARTING_AGE) == RO_AGE_ADULT) {
/*If in rando and starting age is adult, childEquips is not initialized and buttonItems[0]
will be ITEM_NONE. When changing age from adult -> child, reset equips to "default"
(only kokiri tunic/boots equipped, no sword, no C-button items, no D-Pad items).
diff --git a/soh/src/code/z_sram.c b/soh/src/code/z_sram.c
index 7d9d85b68..02986a918 100644
--- a/soh/src/code/z_sram.c
+++ b/soh/src/code/z_sram.c
@@ -383,12 +383,12 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
int startingAge = Randomizer_GetSettingValue(RSK_STARTING_AGE);
switch (startingAge) {
- case 1: //Adult
+ case RO_AGE_ADULT: //Adult
gSaveContext.linkAge = 0;
gSaveContext.entranceIndex = 0x5F4;
gSaveContext.savedSceneNum = SCENE_SPOT20; //Set scene num manually to ToT
break;
- case 0: //Child
+ case RO_AGE_CHILD: //Child
gSaveContext.linkAge = 1;
break;
default: