mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-13 04:39:36 +00:00
proposal for link age macros (#1119)
* proposal for link age macros * apply @Dragorn421 suggestions * also annotate the slinkage variable
This commit is contained in:
parent
621b91e2b6
commit
82cedcc3ef
12 changed files with 64 additions and 60 deletions
|
@ -31,8 +31,8 @@
|
|||
|
||||
#define GET_ACTIVE_CAM(globalCtx) ((globalCtx)->cameraPtrs[(globalCtx)->activeCamera])
|
||||
|
||||
#define LINK_IS_ADULT (gSaveContext.linkAge == 0)
|
||||
#define LINK_IS_CHILD (gSaveContext.linkAge == 1)
|
||||
#define LINK_IS_ADULT (gSaveContext.linkAge == LINK_AGE_ADULT)
|
||||
#define LINK_IS_CHILD (gSaveContext.linkAge == LINK_AGE_CHILD)
|
||||
|
||||
#define YEARS_CHILD 5
|
||||
#define YEARS_ADULT 17
|
||||
|
|
|
@ -62,7 +62,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
/* 0x0000 */ s32 entranceIndex; // start of `save` substruct, originally called "memory"
|
||||
/* 0x0004 */ s32 linkAge; // 0: Adult; 1: Child
|
||||
/* 0x0004 */ s32 linkAge;
|
||||
/* 0x0008 */ s32 cutsceneIndex;
|
||||
/* 0x000C */ u16 dayTime; // "zelda_time"
|
||||
/* 0x0010 */ s32 nightFlag;
|
||||
|
@ -212,4 +212,9 @@ typedef enum {
|
|||
/* 3 */ SUNSSONG_SPECIAL // time does not advance, but signals the song was played. used for freezing redeads
|
||||
} SunsSongState;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ LINK_AGE_ADULT,
|
||||
/* 1 */ LINK_AGE_CHILD
|
||||
} LinkAge;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -569,9 +569,9 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
} else {
|
||||
if (gSaveContext.sceneSetupIndex < 4) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
globalCtx->linkAgeOnLoad = 0;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_ADULT;
|
||||
} else {
|
||||
globalCtx->linkAgeOnLoad = 1;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
}
|
||||
}
|
||||
globalCtx->nextEntranceIndex = 0x02CA;
|
||||
|
@ -670,7 +670,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
globalCtx->fadeTransition = 2;
|
||||
break;
|
||||
case 25:
|
||||
globalCtx->linkAgeOnLoad = 0;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_ADULT;
|
||||
globalCtx->nextEntranceIndex = 0x006B;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
gSaveContext.cutsceneIndex = 0xFFF0;
|
||||
|
@ -714,7 +714,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
gSaveContext.chamberCutsceneNum = 2;
|
||||
break;
|
||||
case 32:
|
||||
globalCtx->linkAgeOnLoad = 1;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x00CD;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
|
@ -750,7 +750,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
globalCtx->fadeTransition = 4;
|
||||
break;
|
||||
case 40:
|
||||
globalCtx->linkAgeOnLoad = 0;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_ADULT;
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
gSaveContext.cutsceneIndex = 0xFFFA;
|
||||
|
@ -827,7 +827,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
case 54:
|
||||
gSaveContext.gameMode = 3;
|
||||
Audio_SetSoundBanksMute(0x6F);
|
||||
globalCtx->linkAgeOnLoad = 1;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x0117;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
|
@ -876,7 +876,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
globalCtx->fadeTransition = 2;
|
||||
break;
|
||||
case 62:
|
||||
globalCtx->linkAgeOnLoad = 0;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_ADULT;
|
||||
globalCtx->nextEntranceIndex = 0x00EE;
|
||||
gSaveContext.cutsceneIndex = 0xFFF6;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
|
@ -895,7 +895,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
globalCtx->fadeTransition = 2;
|
||||
break;
|
||||
case 65:
|
||||
globalCtx->linkAgeOnLoad = 1;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x0157;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
|
@ -934,7 +934,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
Player_SetEquipmentData(globalCtx, player);
|
||||
gSaveContext.equips.equipment |= 0x1000;
|
||||
Player_SetEquipmentData(globalCtx, player);
|
||||
globalCtx->linkAgeOnLoad = 1;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x0053;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
|
@ -948,7 +948,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
gSaveContext.nextTransition = 2;
|
||||
break;
|
||||
case 73:
|
||||
globalCtx->linkAgeOnLoad = 1;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x0157;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
|
@ -962,21 +962,21 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
gSaveContext.nextTransition = 3;
|
||||
break;
|
||||
case 75:
|
||||
globalCtx->linkAgeOnLoad = 1;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x0157;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
gSaveContext.cutsceneIndex = 0xFFF4;
|
||||
globalCtx->fadeTransition = 2;
|
||||
break;
|
||||
case 76:
|
||||
globalCtx->linkAgeOnLoad = 0;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_ADULT;
|
||||
globalCtx->nextEntranceIndex = 0x0157;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
gSaveContext.cutsceneIndex = 0xFFF5;
|
||||
globalCtx->fadeTransition = 2;
|
||||
break;
|
||||
case 77:
|
||||
globalCtx->linkAgeOnLoad = 1;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
globalCtx->nextEntranceIndex = 0x0157;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
gSaveContext.cutsceneIndex = 0xFFF6;
|
||||
|
@ -1207,7 +1207,7 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
case 117:
|
||||
gSaveContext.gameMode = 3;
|
||||
Audio_SetSoundBanksMute(0x6F);
|
||||
globalCtx->linkAgeOnLoad = 0;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_ADULT;
|
||||
globalCtx->nextEntranceIndex = 0x00CD;
|
||||
gSaveContext.cutsceneIndex = 0xFFF7;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
|
|
|
@ -342,7 +342,7 @@ s32 func_8008E9C4(Player* this) {
|
|||
}
|
||||
|
||||
s32 Player_IsChildWithHylianShield(Player* this) {
|
||||
return gSaveContext.linkAge != 0 && (this->currentShield == PLAYER_SHIELD_HYLIAN);
|
||||
return gSaveContext.linkAge != LINK_AGE_ADULT && (this->currentShield == PLAYER_SHIELD_HYLIAN);
|
||||
}
|
||||
|
||||
s32 Player_ActionToModelGroup(Player* this, s32 actionParam) {
|
||||
|
|
|
@ -59,7 +59,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 entranceIndex;
|
||||
/* 0x04 */ s32 linkAge; // 0: Adult; 1: Child
|
||||
/* 0x04 */ s32 linkAge;
|
||||
/* 0x08 */ s32 cutsceneIndex;
|
||||
/* 0x0C */ u16 dayTime; // "zelda_time"
|
||||
/* 0x10 */ s32 nightFlag;
|
||||
|
@ -682,7 +682,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) {
|
|||
}
|
||||
|
||||
gSaveContext.entranceIndex = 0xBB;
|
||||
gSaveContext.linkAge = 1;
|
||||
gSaveContext.linkAge = LINK_AGE_CHILD;
|
||||
gSaveContext.dayTime = 0x6AAB;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
|
||||
|
|
|
@ -1795,7 +1795,7 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.nextCutsceneIndex = 0xFFF2;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 3;
|
||||
globalCtx->linkAgeOnLoad = 1;
|
||||
globalCtx->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -856,7 +856,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->unk_150[i].unk_22 < 2) {
|
||||
disp = (u32)gEffFlash1DL;
|
||||
if (linkAge != 0) {
|
||||
if (linkAge != LINK_AGE_ADULT) {
|
||||
Matrix_Translate(translateX, translateY, translateZ, MTXMODE_NEW);
|
||||
} else {
|
||||
if (translateY) {}
|
||||
|
|
|
@ -766,7 +766,7 @@ void Fishing_InitPondProps(Fishing* this, GlobalContext* globalCtx) {
|
|||
if (prop->type == FS_PROP_REED) {
|
||||
prop->scale = (Fishing_RandZeroOne() * 0.25f) + 0.75f;
|
||||
prop->reedAngle = Rand_ZeroFloat(2 * M_PI);
|
||||
if (sLinkAge == 1) {
|
||||
if (sLinkAge == LINK_AGE_CHILD) {
|
||||
prop->scale *= 0.6f;
|
||||
}
|
||||
prop->drawDistance = 1200.0f;
|
||||
|
@ -779,7 +779,7 @@ void Fishing_InitPondProps(Fishing* this, GlobalContext* globalCtx) {
|
|||
} else if (prop->type == FS_PROP_LILY_PAD) {
|
||||
prop->scale = (Fishing_RandZeroOne() * 0.3f) + 0.5f;
|
||||
prop->rotY = Rand_ZeroFloat(2 * M_PI);
|
||||
if (sLinkAge == 1) {
|
||||
if (sLinkAge == LINK_AGE_CHILD) {
|
||||
if ((i % 4) != 0) {
|
||||
prop->scale *= 0.6f;
|
||||
} else {
|
||||
|
@ -821,7 +821,7 @@ void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f);
|
||||
|
||||
if (KREG(5) != 0) {
|
||||
sLinkAge = 1;
|
||||
sLinkAge = LINK_AGE_CHILD;
|
||||
} else {
|
||||
sLinkAge = gSaveContext.linkAge;
|
||||
}
|
||||
|
@ -851,7 +851,7 @@ void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
thisx->focus.pos.y += 75.0f;
|
||||
thisx->flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3;
|
||||
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
if (HIGH_SCORE(HS_FISHING) & 0x1000) {
|
||||
D_80B7A688 = 0;
|
||||
} else {
|
||||
|
@ -869,7 +869,7 @@ void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x0100FF);
|
||||
|
||||
if (sLinkAge == 1) {
|
||||
if (sLinkAge == LINK_AGE_CHILD) {
|
||||
if ((HIGH_SCORE(HS_FISHING) & 0x7F) != 0) {
|
||||
D_80B7E078 = HIGH_SCORE(HS_FISHING) & 0x7F;
|
||||
} else {
|
||||
|
@ -939,7 +939,7 @@ void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
fish->unk_3E = 0;
|
||||
fish->unk_40 = 0;
|
||||
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
if (((i >= 15) && (i < 20)) || ((i >= 35) && (i < 40)) || ((i >= 55) && (i < 60))) {
|
||||
fish->type = FS_GROUP_FISH_NONE;
|
||||
}
|
||||
|
@ -952,7 +952,7 @@ void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_FISHING, 0.0f, 0.0f, 0.0f, 0, 0, 0, 200);
|
||||
|
||||
if ((KREG(1) == 1) || ((D_80B7E07D & 3) == 3)) {
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
fishCount = 16;
|
||||
} else {
|
||||
fishCount = 17;
|
||||
|
@ -1000,7 +1000,7 @@ void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->unk_1AC = KREG(6) + 80.0f;
|
||||
}
|
||||
|
||||
if (sLinkAge == 1) {
|
||||
if (sLinkAge == LINK_AGE_CHILD) {
|
||||
this->unk_1AC *= 0.73f;
|
||||
}
|
||||
}
|
||||
|
@ -2030,7 +2030,7 @@ void Fishing_DrawRod(GlobalContext* globalCtx) {
|
|||
|
||||
Matrix_Mult(&player->mf_9E0, MTXMODE_NEW);
|
||||
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
Matrix_Translate(0.0f, 400.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else {
|
||||
Matrix_Translate(0.0f, 230.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
@ -2153,8 +2153,8 @@ void Fishing_UpdateLure(Fishing* this, GlobalContext* globalCtx) {
|
|||
D_80B7E082 = 0;
|
||||
D_80B7E0B6 = 0;
|
||||
|
||||
if (((sLinkAge == 1) && (HIGH_SCORE(HS_FISHING) & 0x400)) ||
|
||||
((sLinkAge != 1) && (HIGH_SCORE(HS_FISHING) & 0x800))) {
|
||||
if (((sLinkAge == LINK_AGE_CHILD) && (HIGH_SCORE(HS_FISHING) & 0x400)) ||
|
||||
((sLinkAge != LINK_AGE_CHILD) && (HIGH_SCORE(HS_FISHING) & 0x800))) {
|
||||
sSinkingLureLocation = (u8)Rand_ZeroFloat(3.999f) + 1;
|
||||
}
|
||||
|
||||
|
@ -2823,7 +2823,7 @@ void func_80B71278(Fishing* this, u8 arg1) {
|
|||
}
|
||||
|
||||
void Fishing_HandleAquariumDialog(Fishing* this, GlobalContext* globalCtx) {
|
||||
if (sLinkAge == 1) {
|
||||
if (sLinkAge == LINK_AGE_CHILD) {
|
||||
if ((HIGH_SCORE(HS_FISHING) & 0x7F) != 0) {
|
||||
if (HIGH_SCORE(HS_FISHING) & 0x80) {
|
||||
this->actor.textId = 0x40B1;
|
||||
|
@ -3782,8 +3782,8 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
|
||||
if ((D_80B7E122 == 0) && (D_80B7E124 == 0)) {
|
||||
D_80B7E086 = 0x4081;
|
||||
if (((sLinkAge == 1) && (HIGH_SCORE(HS_FISHING) & 0x400)) ||
|
||||
((sLinkAge != 1) && (HIGH_SCORE(HS_FISHING) & 0x800))) {
|
||||
if (((sLinkAge == LINK_AGE_CHILD) && (HIGH_SCORE(HS_FISHING) & 0x400)) ||
|
||||
((sLinkAge != LINK_AGE_CHILD) && (HIGH_SCORE(HS_FISHING) & 0x800))) {
|
||||
D_80B7A67C = 0;
|
||||
}
|
||||
} else {
|
||||
|
@ -3835,7 +3835,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Math_ApproachF(&D_80B7FEC8, 15.0f, 0.05f, 0.75f);
|
||||
|
||||
sp10C.x = D_80B7FEC8;
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
sp10C.y = 30.0f;
|
||||
sp10C.z = 55.0f;
|
||||
} else {
|
||||
|
@ -3850,7 +3850,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
sCameraEye.z += player->actor.world.pos.z;
|
||||
|
||||
sCameraAt = player->actor.world.pos;
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
sCameraAt.y += 40.0f;
|
||||
} else {
|
||||
sCameraAt.y += 25.0f;
|
||||
|
@ -4566,7 +4566,7 @@ void Fishing_UpdateGroupFishes(GlobalContext* globalCtx) {
|
|||
Math_ApproachF(&sFishGroupAngle3, 4.6f, 1.0f, 0.001f);
|
||||
}
|
||||
|
||||
if (sLinkAge == 1) {
|
||||
if (sLinkAge == LINK_AGE_CHILD) {
|
||||
spD8 = 0.8f;
|
||||
} else {
|
||||
spD8 = 1.0f;
|
||||
|
@ -4680,7 +4680,7 @@ void Fishing_DrawGroupFishes(GlobalContext* globalCtx) {
|
|||
s16 i;
|
||||
s32 pad;
|
||||
|
||||
if (sLinkAge == 1) {
|
||||
if (sLinkAge == LINK_AGE_CHILD) {
|
||||
scale = 0.003325f;
|
||||
} else {
|
||||
scale = 0.00475f;
|
||||
|
@ -4721,7 +4721,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
|
|||
switch (this->unk_15C) {
|
||||
case 0:
|
||||
if (D_80B7E0AC == 0) {
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
if ((HIGH_SCORE(HS_FISHING) & 0x100) && !(HIGH_SCORE(HS_FISHING) & 0x200)) {
|
||||
this->actor.textId = 0x4093;
|
||||
} else {
|
||||
|
@ -4739,7 +4739,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
|
|||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
if (D_80B7E0AC == 0) {
|
||||
this->unk_15C = 1;
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
HIGH_SCORE(HS_FISHING) |= 0x200;
|
||||
} else {
|
||||
HIGH_SCORE(HS_FISHING) |= 0x100;
|
||||
|
@ -4895,7 +4895,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
|
|||
|
||||
D_80B7E082++;
|
||||
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
if (D_80B7E082 >= 6) {
|
||||
D_80B7E082 = 0;
|
||||
}
|
||||
|
@ -4910,7 +4910,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
|
|||
case 2:
|
||||
if (D_80B7E084 == 0) {
|
||||
Message_ContinueTextbox(globalCtx, 0x4085);
|
||||
} else if (sLinkAge == 1) {
|
||||
} else if (sLinkAge == LINK_AGE_CHILD) {
|
||||
Message_ContinueTextbox(globalCtx, 0x4092);
|
||||
}
|
||||
this->unk_15C = 22;
|
||||
|
@ -4932,7 +4932,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
|
|||
D_80B7E078 = D_80B7A670;
|
||||
D_80B7A670 = 0.0f;
|
||||
|
||||
if (sLinkAge == 1) {
|
||||
if (sLinkAge == LINK_AGE_CHILD) {
|
||||
f32 temp;
|
||||
|
||||
HIGH_SCORE(HS_FISHING) &= 0xFFFFFF00;
|
||||
|
@ -4974,7 +4974,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
|
|||
getItemId = GI_RUPEE_GREEN;
|
||||
}
|
||||
|
||||
if (sLinkAge == 1) {
|
||||
if (sLinkAge == LINK_AGE_CHILD) {
|
||||
if ((D_80B7E078 >= 50.0f) && !(HIGH_SCORE(HS_FISHING) & 0x400)) {
|
||||
HIGH_SCORE(HS_FISHING) |= 0x400;
|
||||
getItemId = GI_HEART_PIECE;
|
||||
|
@ -5016,7 +5016,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, GlobalContext* globalCtx) {
|
|||
case 1:
|
||||
if (D_80B7E084 == 0) {
|
||||
Message_ContinueTextbox(globalCtx, 0x4085);
|
||||
} else if (sLinkAge == 1) {
|
||||
} else if (sLinkAge == LINK_AGE_CHILD) {
|
||||
Message_ContinueTextbox(globalCtx, 0x4092);
|
||||
}
|
||||
this->unk_15C = 22;
|
||||
|
@ -5268,7 +5268,7 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Math_ApproachF(&sCameraAt.z, sLurePos.z, camAtFraction, fabsf(spFC.z) * D_80B7FECC);
|
||||
|
||||
sp114.x = 0.0f - D_80B7FED0;
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
sp114.y = 80.0f;
|
||||
} else {
|
||||
sp114.y = 55.0f;
|
||||
|
@ -5441,7 +5441,7 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
sp114.x = Math_SinS(globalCtx->gameplayFrames * 0x1000);
|
||||
sp114.y = D_80B7FEE4;
|
||||
sp114.z = -5.0f;
|
||||
if (sLinkAge == 1) {
|
||||
if (sLinkAge == LINK_AGE_CHILD) {
|
||||
sp114.y -= 20.0f;
|
||||
}
|
||||
|
||||
|
@ -5455,7 +5455,7 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
|
||||
sp114.x = D_80B7FEC8 - 15.0f;
|
||||
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
sp114.y = 60.0f;
|
||||
sp114.z = -30.0f;
|
||||
} else {
|
||||
|
@ -5469,7 +5469,7 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
sCameraEye.z += player->actor.world.pos.z;
|
||||
|
||||
sCameraAt = player->actor.world.pos;
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
sCameraAt.y += 62.0f;
|
||||
} else {
|
||||
sCameraAt.y += 40.0f;
|
||||
|
@ -5743,13 +5743,13 @@ void Fishing_DrawOwner(Actor* thisx, GlobalContext* globalCtx) {
|
|||
D_80B7E0A6--;
|
||||
|
||||
if (D_80B7E0A6 == 0) {
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KAKARIKO_ADULT);
|
||||
} else {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KAKARIKO_KID);
|
||||
}
|
||||
|
||||
if (sLinkAge != 1) {
|
||||
if (sLinkAge != LINK_AGE_CHILD) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KAKARIKO_ADULT);
|
||||
} else {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KAKARIKO_KID);
|
||||
|
|
|
@ -465,7 +465,6 @@ void ObjBean_Grown(ObjBean* this) {
|
|||
|
||||
void ObjBean_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 path;
|
||||
s32 linkAge;
|
||||
ObjBean* this = (ObjBean*)thisx;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
|
|
|
@ -13893,12 +13893,12 @@ void func_808526EC(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg
|
|||
static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
|
||||
static Color_RGBA8 primColor = { 255, 255, 255, 0 };
|
||||
static Color_RGBA8 envColor = { 0, 128, 128, 0 };
|
||||
s32 age = gSaveContext.linkAge;
|
||||
s32 linkAge = gSaveContext.linkAge;
|
||||
Vec3f sparklePos;
|
||||
Vec3f sp34;
|
||||
Vec3s* ptr;
|
||||
|
||||
func_80851294(globalCtx, this, D_80855208[age]);
|
||||
func_80851294(globalCtx, this, D_80855208[linkAge]);
|
||||
|
||||
if (this->rightHandType != 0xFF) {
|
||||
this->rightHandType = 0xFF;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
void Opening_SetupTitleScreen(OpeningContext* this) {
|
||||
gSaveContext.gameMode = 1;
|
||||
this->state.running = false;
|
||||
gSaveContext.linkAge = 0;
|
||||
gSaveContext.linkAge = LINK_AGE_ADULT;
|
||||
Sram_InitDebugSave();
|
||||
gSaveContext.cutsceneIndex = 0xFFF3;
|
||||
gSaveContext.sceneSetupIndex = 7;
|
||||
|
|
|
@ -311,9 +311,9 @@ void Select_UpdateMenu(SelectContext* this) {
|
|||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||
gSaveContext.linkAge = 1;
|
||||
gSaveContext.linkAge = LINK_AGE_CHILD;
|
||||
} else {
|
||||
gSaveContext.linkAge = 0;
|
||||
gSaveContext.linkAge = LINK_AGE_ADULT;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -754,5 +754,5 @@ void Select_Init(GameState* thisx) {
|
|||
this->staticSegment = GameState_Alloc(&this->state, size, "../z_select.c", 1114);
|
||||
DmaMgr_SendRequest1(this->staticSegment, _z_select_staticSegmentRomStart, size, "../z_select.c", 1115);
|
||||
gSaveContext.cutsceneIndex = 0x8000;
|
||||
gSaveContext.linkAge = 1;
|
||||
gSaveContext.linkAge = LINK_AGE_CHILD;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue