mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-02 22:14:33 +00:00
Defines for SaveContext
flags (eventChkInf
, itemGetInf
, infTable
, eventInf
) (#1094)
* script-assisted `itemGetInf` flags * comment near non-trivial `itemGetInf` usage * Run formatter * Try something with the itemgetinf flags that can't use the packed value * Add defines for `eventChkInf` (direct access) * Add defines for `eventChkInf` (access through `Flags_GetEventChkInf`) * Add defines for `eventChkInf` (access through `Flags_SetEventChkInf`) * Add defines for `infTable` (direct access) * Add defines for `infTable` (used by `Flags_GetInfTable`) * Add defines for `infTable` (used by `Flags_SetInfTable`) * Add defines for `eventInf` * parenthesis cleanup near `GET_EVENTCHKINF` usage * parenthesis cleanup near `GET_ITEMGETINF` usage * parenthesis cleanup near `GET_INFTABLE` usage * fixup one `eventInf` usage * parenthesis cleanup near `GET_EVENTINF` usage * parenthesis cleanup near `Flags_GetEventChkInf` usage * slight `z64save.h` formatting improvement * Improve itemGetInf flags in z_bg_dy_yoseizo * Questionable improvement in z_en_ge2 * Questionable improvement in z_en_daiku * Questionable improvement in z_en_mu * Run formatter * Parentheses around `gSaveContext` macros arguments * Move individual flags define to the end of z64save.h, and improve comments separating the groups
This commit is contained in:
parent
16790bc253
commit
6336df5fcd
146 changed files with 1931 additions and 1315 deletions
|
@ -79,7 +79,7 @@ s32 BgBdanObjects_GetContactRu1(BgBdanObjects* this, s32 arg1) {
|
|||
case 0:
|
||||
return this->cameraSetting == CAM_SET_NORMAL0;
|
||||
case 4:
|
||||
return gSaveContext.infTable[20] & 0x40;
|
||||
return GET_INFTABLE(INFTABLE_146);
|
||||
case 3:
|
||||
return this->cameraSetting == CAM_SET_DUNGEON1;
|
||||
default:
|
||||
|
@ -97,7 +97,7 @@ void BgBdanObjects_SetContactRu1(BgBdanObjects* this, s32 arg1) {
|
|||
this->cameraSetting = CAM_SET_DUNGEON0;
|
||||
break;
|
||||
case 4:
|
||||
gSaveContext.infTable[20] |= 0x40;
|
||||
SET_INFTABLE(INFTABLE_146);
|
||||
break;
|
||||
default:
|
||||
osSyncPrintf("Bg_Bdan_Objects_Set_Contact_Ru1\nそんな送信モードは無い%d!!!!!!!!\n");
|
||||
|
|
|
@ -249,8 +249,8 @@ void BgBreakwall_Wait(BgBreakwall* this, GlobalContext* globalCtx) {
|
|||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
|
||||
}
|
||||
|
||||
if ((wallType == BWALL_DC_ENTRANCE) && (!(Flags_GetEventChkInf(0xB0)))) {
|
||||
Flags_SetEventChkInf(0xB0);
|
||||
if ((wallType == BWALL_DC_ENTRANCE) && !Flags_GetEventChkInf(EVENTCHKINF_B0)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_B0);
|
||||
Cutscene_SetSegment(globalCtx, gDcOpeningCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
|
|
|
@ -182,7 +182,7 @@ void BgDodoago_WaitExplosives(BgDodoago* this, GlobalContext* globalCtx) {
|
|||
sFirstExplosiveFlag = true;
|
||||
sTimer = 50;
|
||||
}
|
||||
} else if (Flags_GetEventChkInf(0xB0)) {
|
||||
} else if (Flags_GetEventChkInf(EVENTCHKINF_B0)) {
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliderMain);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliderLeft);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->colliderRight);
|
||||
|
@ -312,7 +312,7 @@ void BgDodoago_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void BgDodoago_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_dodoago.c", 672);
|
||||
|
||||
if (Flags_GetEventChkInf(0xB0)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_B0)) {
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_dodoago.c", 677),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
|
@ -207,17 +207,17 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
|||
if (globalCtx->sceneNum != SCENE_DAIYOUSEI_IZUMI) {
|
||||
switch (this->fountainType) {
|
||||
case FAIRY_SPELL_FARORES_WIND:
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x100)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_18)) {
|
||||
givingReward = true;
|
||||
}
|
||||
break;
|
||||
case FAIRY_SPELL_DINS_FIRE:
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x200)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_19)) {
|
||||
givingReward = true;
|
||||
}
|
||||
break;
|
||||
case FAIRY_SPELL_NAYRUS_LOVE:
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x400)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_1A)) {
|
||||
givingReward = true;
|
||||
}
|
||||
break;
|
||||
|
@ -651,7 +651,7 @@ static s16 sDemoEffectLightColors[] = { DEMO_EFFECT_LIGHT_GREEN, DEMO_EFFECT_LIG
|
|||
|
||||
static s16 sExItemTypes[] = { EXITEM_MAGIC_WIND, EXITEM_MAGIC_FIRE, EXITEM_MAGIC_DARK };
|
||||
|
||||
static s16 sItemGetFlags[] = { 0x100, 0x200, 0x400 };
|
||||
static s16 sItemGetFlags[] = { ITEMGETINF_18_MASK, ITEMGETINF_19_MASK, ITEMGETINF_1A_MASK };
|
||||
|
||||
static u8 sItemIds[] = { ITEM_FARORES_WIND, ITEM_DINS_FIRE, ITEM_NAYRUS_LOVE };
|
||||
|
||||
|
@ -761,7 +761,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
|||
this->itemSpawned = true;
|
||||
gSaveContext.healthAccumulator = 0x140;
|
||||
Interface_ChangeAlpha(9);
|
||||
gSaveContext.itemGetInf[1] |= sItemGetFlags[actionIndex];
|
||||
gSaveContext.itemGetInf[ITEMGETINF_18_19_1A_INDEX] |= sItemGetFlags[actionIndex];
|
||||
Item_Give(globalCtx, sItemIds[actionIndex]);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -43,8 +43,7 @@ void BgGateShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->somePos.x = thisx->world.pos.x;
|
||||
this->somePos.y = thisx->world.pos.y;
|
||||
this->somePos.z = thisx->world.pos.z;
|
||||
if (((gSaveContext.infTable[7] & 0x40) || (gSaveContext.eventChkInf[4] & 0x20)) &&
|
||||
(globalCtx->sceneNum == SCENE_SPOT01)) {
|
||||
if ((GET_INFTABLE(INFTABLE_76) || GET_EVENTCHKINF(EVENTCHKINF_45)) && (globalCtx->sceneNum == SCENE_SPOT01)) {
|
||||
thisx->world.pos.x = -89.0f;
|
||||
thisx->world.pos.z = -1375.0f;
|
||||
}
|
||||
|
@ -63,7 +62,7 @@ void BgGateShutter_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_8087828C(BgGateShutter* this, GlobalContext* globalCtx) {
|
||||
if (this->openingState == 1 && !(gSaveContext.infTable[7] & 0x40)) {
|
||||
if (this->openingState == 1 && !GET_INFTABLE(INFTABLE_76)) {
|
||||
this->unk_178 = 2;
|
||||
this->actionFunc = func_80878300;
|
||||
} else if (this->openingState == 2) {
|
||||
|
|
|
@ -49,7 +49,7 @@ void BgGjyoBridge_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 0x2000) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_4D)) {
|
||||
this->actionFunc = func_808787A4;
|
||||
} else {
|
||||
this->dyna.actor.draw = NULL;
|
||||
|
@ -86,7 +86,7 @@ void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, GlobalContext* globalCtx) {
|
|||
(globalCtx->csCtx.npcActions[2]->action == 2)) {
|
||||
this->dyna.actor.draw = BgGjyoBridge_Draw;
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
gSaveContext.eventChkInf[4] |= 0x2000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4D);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,13 +45,15 @@ void BgInGate_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if ((globalCtx->sceneNum != SCENE_SPOT20 || !LINK_IS_ADULT) ||
|
||||
(((gSaveContext.eventChkInf[1] & 0x100)) && (gSaveContext.cutsceneIndex != 0xFFF0))) {
|
||||
(GET_EVENTCHKINF(EVENTCHKINF_18) && (gSaveContext.cutsceneIndex != 0xFFF0))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
||||
Actor_SetScale(&this->dyna.actor, 0.1f);
|
||||
if (((this->dyna.actor.params & 1) != 0) && ((gSaveContext.eventInf[0] & 0xF) == 6)) {
|
||||
if (((this->dyna.actor.params & 1) != 0) &&
|
||||
((gSaveContext.eventInf[EVENTINF_0X_INDEX] & (EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK |
|
||||
EVENTINF_03_MASK)) == (EVENTINF_01_MASK | EVENTINF_02_MASK))) {
|
||||
globalCtx->csCtx.frames = 0;
|
||||
BgInGate_SetupAction(this, func_80892890);
|
||||
} else {
|
||||
|
|
|
@ -55,7 +55,7 @@ void BgRelayObjects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
DynaPolyActor_Init(&this->dyna, 3);
|
||||
if (thisx->params == WINDMILL_ROTATING_GEAR) {
|
||||
CollisionHeader_GetVirtual(&gWindmillRotatingPlatformCol, &colHeader);
|
||||
if (gSaveContext.eventChkInf[6] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_65)) {
|
||||
thisx->world.rot.y = 0x400;
|
||||
} else {
|
||||
thisx->world.rot.y = 0x80;
|
||||
|
@ -109,7 +109,7 @@ void BgRelayObjects_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
if ((this->dyna.actor.params == WINDMILL_ROTATING_GEAR) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
gSaveContext.eventChkInf[6] &= ~0x20;
|
||||
CLEAR_EVENTCHKINF(EVENTCHKINF_65);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,9 +180,9 @@ void func_808A932C(BgRelayObjects* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_808A939C(BgRelayObjects* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetEnv(globalCtx, 5)) {
|
||||
gSaveContext.eventChkInf[6] |= 0x20;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_65);
|
||||
}
|
||||
if (gSaveContext.eventChkInf[6] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_65)) {
|
||||
Math_ScaledStepToS(&this->dyna.actor.world.rot.y, 0x400, 8);
|
||||
} else {
|
||||
Math_ScaledStepToS(&this->dyna.actor.world.rot.y, 0x80, 8);
|
||||
|
|
|
@ -79,7 +79,7 @@ void BgSpot00Hanebasi_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (gSaveContext.sceneSetupIndex != 6) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
|
||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !(gSaveContext.eventChkInf[8] & 1)) {
|
||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
this->dyna.actor.shape.rot.x = -0x4000;
|
||||
}
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ void BgSpot00Hanebasi_DrawbridgeWait(BgSpot00Hanebasi* this, GlobalContext* glob
|
|||
|
||||
if ((gSaveContext.sceneSetupIndex >= 4) || !CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) ||
|
||||
!CHECK_QUEST_ITEM(QUEST_GORON_RUBY) || !CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) ||
|
||||
(gSaveContext.eventChkInf[8] & 1)) {
|
||||
GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
if (this->dyna.actor.shape.rot.x != 0) {
|
||||
if (Flags_GetEnv(globalCtx, 0) || ((gSaveContext.sceneSetupIndex < 4) && IS_DAY)) {
|
||||
this->actionFunc = BgSpot00Hanebasi_DrawbridgeRiseAndFall;
|
||||
|
@ -211,14 +211,14 @@ void BgSpot00Hanebasi_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->dyna.actor.params == DT_DRAWBRIDGE) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT00) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
|
||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !(gSaveContext.eventChkInf[8] & 1) && LINK_IS_CHILD) {
|
||||
CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !GET_EVENTCHKINF(EVENTCHKINF_80) && LINK_IS_CHILD) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if ((player->actor.world.pos.x > -450.0f) && (player->actor.world.pos.x < 450.0f) &&
|
||||
(player->actor.world.pos.z > 1080.0f) && (player->actor.world.pos.z < 1700.0f) &&
|
||||
(!(Gameplay_InCsMode(globalCtx)))) {
|
||||
gSaveContext.eventChkInf[8] |= 1;
|
||||
Flags_SetEventChkInf(0x82);
|
||||
SET_EVENTCHKINF(EVENTCHKINF_80);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_82);
|
||||
this->actionFunc = BgSpot00Hanebasi_DoNothing;
|
||||
func_8002DF54(globalCtx, &player->actor, 8);
|
||||
globalCtx->nextEntranceIndex = 0x00CD;
|
||||
|
|
|
@ -47,7 +47,7 @@ void BgSpot01Fusya_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->unk_158 = 100.0f;
|
||||
this->unk_15C = 0.5f;
|
||||
if (gSaveContext.sceneSetupIndex < 4) {
|
||||
gSaveContext.eventChkInf[6] &= 0xFFDF;
|
||||
CLEAR_EVENTCHKINF(EVENTCHKINF_65);
|
||||
}
|
||||
BgSpot01Fusya_SetupAction(this, func_808AAA50);
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ void func_808AAA50(BgSpot01Fusya* this, GlobalContext* globalCtx) {
|
|||
f32 temp;
|
||||
Actor* thisx = &this->actor;
|
||||
|
||||
if (gSaveContext.eventChkInf[6] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_65)) {
|
||||
this->unk_158 = 1800.0f;
|
||||
}
|
||||
thisx->shape.rot.z += this->unk_154;
|
||||
|
|
|
@ -302,7 +302,7 @@ void BgSpot01Idohashira_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (gSaveContext.sceneSetupIndex < 4) {
|
||||
if ((gSaveContext.eventChkInf[5] & 0x10) && LINK_IS_ADULT) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_54) && LINK_IS_ADULT) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
} else {
|
||||
this->action = 0;
|
||||
|
|
|
@ -36,7 +36,7 @@ void BgSpot01Idomizu_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
BgSpot01Idomizu* this = (BgSpot01Idomizu*)thisx;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
if (gSaveContext.eventChkInf[6] & 0x80 || LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_67) || LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||
this->waterHeight = -550.0f;
|
||||
} else {
|
||||
this->waterHeight = 52.0f;
|
||||
|
@ -49,7 +49,7 @@ void BgSpot01Idomizu_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_808ABB84(BgSpot01Idomizu* this, GlobalContext* globalCtx) {
|
||||
if (gSaveContext.eventChkInf[6] & 0x80) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_67)) {
|
||||
this->waterHeight = -550.0f;
|
||||
}
|
||||
globalCtx->colCtx.colHeader->waterBoxes[0].ySurface = this->actor.world.pos.y;
|
||||
|
|
|
@ -87,8 +87,7 @@ void BgSpot02Objects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
|
||||
|
||||
if (((gSaveContext.eventChkInf[1] & 0x2000) && (globalCtx->sceneNum == SCENE_SPOT02) &&
|
||||
(thisx->params == 2)) ||
|
||||
if ((GET_EVENTCHKINF(EVENTCHKINF_1D) && (globalCtx->sceneNum == SCENE_SPOT02) && (thisx->params == 2)) ||
|
||||
(LINK_IS_ADULT && (thisx->params == 1))) {
|
||||
Actor_Kill(thisx);
|
||||
}
|
||||
|
@ -100,7 +99,7 @@ void BgSpot02Objects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_808ACC34;
|
||||
thisx->draw = func_808ACCB8;
|
||||
|
||||
if (gSaveContext.eventChkInf[1] & 0x2000) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_1D)) {
|
||||
Actor_Kill(thisx);
|
||||
}
|
||||
break;
|
||||
|
@ -131,7 +130,7 @@ void func_808AC908(BgSpot02Objects* this, GlobalContext* globalCtx) {
|
|||
if (globalCtx->csCtx.state != 0) {
|
||||
if (globalCtx->csCtx.npcActions[3] != NULL && globalCtx->csCtx.npcActions[3]->action == 2) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GRAVE_EXPLOSION);
|
||||
gSaveContext.eventChkInf[1] |= 0x2000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_1D);
|
||||
this->timer = 25;
|
||||
pos.x = (Math_SinS(this->dyna.actor.shape.rot.y) * 50.0f) + this->dyna.actor.world.pos.x;
|
||||
pos.y = this->dyna.actor.world.pos.y + 30.0f;
|
||||
|
|
|
@ -123,7 +123,7 @@ void BgSpot06Objects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Collider_SetJntSph(globalCtx, &this->collider, thisx, &sJntSphInit, this->colliderItem);
|
||||
|
||||
if (LINK_IS_ADULT && Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
if (!(gSaveContext.eventChkInf[6] & 0x200)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_69)) {
|
||||
thisx->home.pos.y = thisx->world.pos.y = WATER_LEVEL_LOWERED;
|
||||
} else {
|
||||
thisx->home.pos.y = thisx->world.pos.y = WATER_LEVEL_RAISED;
|
||||
|
@ -149,7 +149,7 @@ void BgSpot06Objects_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_ProcessInitChain(thisx, sInitChainWaterPlane);
|
||||
thisx->flags = ACTOR_FLAG_4 | ACTOR_FLAG_5;
|
||||
|
||||
if (LINK_IS_ADULT && !(gSaveContext.eventChkInf[6] & 0x200)) {
|
||||
if (LINK_IS_ADULT && !GET_EVENTCHKINF(EVENTCHKINF_69)) {
|
||||
if (gSaveContext.sceneSetupIndex < 4) {
|
||||
this->lakeHyliaWaterLevel = -681.0f;
|
||||
globalCtx->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].ySurface =
|
||||
|
@ -483,7 +483,7 @@ void BgSpot06Objects_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
* cleared.
|
||||
*/
|
||||
void BgSpot06Objects_WaterPlaneCutsceneWait(BgSpot06Objects* this, GlobalContext* globalCtx) {
|
||||
if (gSaveContext.eventChkInf[6] & 0x200) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_69)) {
|
||||
this->actionFunc = BgSpot06Objects_WaterPlaneCutsceneRise;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,9 @@ s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
|||
return this->dyna.actor.params == 0;
|
||||
}
|
||||
|
||||
carpentersRescued = (gSaveContext.eventChkInf[9] & 0xF) == 0xF;
|
||||
carpentersRescued =
|
||||
CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK);
|
||||
|
||||
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||
switch (this->dyna.actor.params) {
|
||||
|
@ -138,7 +140,8 @@ void BgSpot09Obj_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
BgSpot09Obj* this = (BgSpot09Obj*)thisx;
|
||||
|
||||
osSyncPrintf("Spot09 Object [arg_data : 0x%04x](大工救出フラグ 0x%x)\n", this->dyna.actor.params,
|
||||
gSaveContext.eventChkInf[9] & 0xF);
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX] &
|
||||
(EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK));
|
||||
this->dyna.actor.params &= 0xFF;
|
||||
if ((this->dyna.actor.params < 0) || (this->dyna.actor.params >= 5)) {
|
||||
osSyncPrintf("Error : Spot 09 object の arg_data が判別出来ない(%s %d)(arg_data 0x%04x)\n",
|
||||
|
|
|
@ -109,7 +109,7 @@ s32 func_808B3AAC(BgSpot15Rrbox* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (rotY < 0x2000 && rotY > -0x6000) {
|
||||
return gSaveContext.eventChkInf[1] & 0x10;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_14);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ void BgSpot15Saku_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->unk_170.x = this->dyna.actor.world.pos.x;
|
||||
this->unk_170.y = this->dyna.actor.world.pos.y;
|
||||
this->unk_170.z = this->dyna.actor.world.pos.z;
|
||||
if (gSaveContext.infTable[7] & 2) {
|
||||
if (GET_INFTABLE(INFTABLE_71)) {
|
||||
this->dyna.actor.world.pos.z = 2659.0f;
|
||||
}
|
||||
this->actionFunc = func_808B4930;
|
||||
|
@ -58,7 +58,7 @@ void BgSpot15Saku_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_808B4930(BgSpot15Saku* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_168 && !(gSaveContext.infTable[7] & 2)) {
|
||||
if (this->unk_168 && !GET_INFTABLE(INFTABLE_71)) {
|
||||
this->timer = 2;
|
||||
this->actionFunc = func_808B4978;
|
||||
}
|
||||
|
|
|
@ -443,7 +443,7 @@ void func_808B5950(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
|
|||
OnePointCutscene_Init(globalCtx, 4180, 50, NULL, MAIN_CAM);
|
||||
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
gSaveContext.eventChkInf[2] |= 8;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_23);
|
||||
|
||||
func_808B5A78(this);
|
||||
} else {
|
||||
|
|
|
@ -70,7 +70,7 @@ void BgSpot16Doughnut_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "%f" VT_RST "\n", this->actor.scale.x);
|
||||
if (!LINK_IS_ADULT || gSaveContext.eventChkInf[2] & 0x8000) {
|
||||
if (!LINK_IS_ADULT || GET_EVENTCHKINF(EVENTCHKINF_2F)) {
|
||||
this->fireFlag &= ~1;
|
||||
} else {
|
||||
this->fireFlag |= 1;
|
||||
|
|
|
@ -47,7 +47,7 @@ void BgSpot18Shutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (param == 0) {
|
||||
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||
if (gSaveContext.infTable[16] & 0x200) {
|
||||
if (GET_INFTABLE(INFTABLE_109)) {
|
||||
this->actionFunc = func_808B95AC;
|
||||
this->dyna.actor.world.pos.y += 180.0f;
|
||||
} else {
|
||||
|
@ -62,7 +62,7 @@ void BgSpot18Shutter_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (gSaveContext.infTable[16] & 0x200) {
|
||||
if (GET_INFTABLE(INFTABLE_109)) {
|
||||
this->dyna.actor.world.pos.x += 125.0f * Math_CosS(this->dyna.actor.world.rot.y);
|
||||
this->dyna.actor.world.pos.z -= 125.0f * Math_SinS(this->dyna.actor.world.rot.y);
|
||||
this->actionFunc = func_808B95AC;
|
||||
|
@ -93,7 +93,7 @@ void func_808B95B8(BgSpot18Shutter* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_808B9618(BgSpot18Shutter* this, GlobalContext* globalCtx) {
|
||||
if (gSaveContext.infTable[16] & 0x200) {
|
||||
if (GET_INFTABLE(INFTABLE_109)) {
|
||||
Actor_SetFocus(&this->dyna.actor, 70.0f);
|
||||
if (((this->dyna.actor.params >> 8) & 1) == 0) {
|
||||
this->actionFunc = func_808B9698;
|
||||
|
|
|
@ -46,7 +46,7 @@ void BgTokiHikari_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = BgTokiHikari_DoNothing;
|
||||
break;
|
||||
case 1:
|
||||
if (!(gSaveContext.eventChkInf[4] & 0x800)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_4B)) {
|
||||
this->actionFunc = func_808BA204;
|
||||
this->unk_14C = 0.0f;
|
||||
} else {
|
||||
|
|
|
@ -93,13 +93,13 @@ void BgTokiSwd_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) {
|
||||
if (((gSaveContext.eventChkInf[4] & 0x8000) == 0) && (gSaveContext.sceneSetupIndex < 4) &&
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_4F) && (gSaveContext.sceneSetupIndex < 4) &&
|
||||
Actor_IsFacingAndNearPlayer(&this->actor, 800.0f, 0x7530) && !Gameplay_InCsMode(globalCtx)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x8000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4F);
|
||||
globalCtx->csCtx.segment = D_808BBD90;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
if (!LINK_IS_ADULT || ((gSaveContext.eventChkInf[5] & 0x20))) {
|
||||
if (!LINK_IS_ADULT || GET_EVENTCHKINF(EVENTCHKINF_55)) {
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
Item_Give(globalCtx, ITEM_SWORD_MASTER);
|
||||
|
|
|
@ -139,9 +139,9 @@ void func_808BC864(BgTreemouth* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_808BC8B8(BgTreemouth* this, GlobalContext* globalCtx) {
|
||||
if ((!(Flags_GetEventChkInf(5))) || LINK_IS_ADULT) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_05) || LINK_IS_ADULT) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0xC)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_0C)) {
|
||||
if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x7530)) {
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_0;
|
||||
if (this->dyna.actor.isTargeted) {
|
||||
|
@ -152,7 +152,7 @@ void func_808BC8B8(BgTreemouth* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
} else if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x4E20)) {
|
||||
Flags_SetEventChkInf(0xC);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_0C);
|
||||
globalCtx->csCtx.segment = D_808BCE20;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
BgTreemouth_SetupAction(this, func_808BC9EC);
|
||||
|
@ -184,7 +184,7 @@ void func_808BC9EC(BgTreemouth* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
globalCtx->csCtx.segment = D_808BD520;
|
||||
Flags_SetEventChkInf(5);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_05);
|
||||
BgTreemouth_SetupAction(this, func_808BCAF0);
|
||||
} else {
|
||||
globalCtx->csCtx.segment = D_808BD790;
|
||||
|
@ -234,7 +234,7 @@ void BgTreemouth_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
|
||||
if ((gSaveContext.sceneSetupIndex < 4) || LINK_IS_ADULT) {
|
||||
if (gSaveContext.eventChkInf[0] & 0x80) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_07)) {
|
||||
alpha = 2150;
|
||||
}
|
||||
} else { // neeeded to match
|
||||
|
|
|
@ -41,7 +41,7 @@ void BgUmaJump_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
if (this->dyna.actor.params == 1) {
|
||||
if (!Flags_GetEventChkInf(0x18) && (DREG(1) == 0)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_18) && (DREG(1) == 0)) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -333,7 +333,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
this->cameraAt.z = player->actor.world.pos.z;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[7] & 2) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_71)) {
|
||||
if (this->unk_198 == 100) {
|
||||
this->actor.world.pos.x = -1114.0f;
|
||||
this->actor.world.pos.z = -2804.0f;
|
||||
|
@ -374,7 +374,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
case 4:
|
||||
Math_SmoothStepToF(&this->unk_20C, 0.0f, 1.0f, 0.01f, 0.0f);
|
||||
|
||||
if (gSaveContext.eventChkInf[7] & 2) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_71)) {
|
||||
phi_f0 = -50.0f;
|
||||
} else {
|
||||
phi_f0 = 0.0f;
|
||||
|
@ -402,7 +402,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->unk_198 == 0x5A) {
|
||||
if (!(gSaveContext.eventChkInf[7] & 2)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_71)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(&object_kingdodongo_Blob_017410), 0xA0, 0xB4, 0x80,
|
||||
0x28);
|
||||
|
@ -422,7 +422,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
this->unk_1DA = 50;
|
||||
this->unk_1BC = 0;
|
||||
player->actor.shape.rot.y = -0x4002;
|
||||
gSaveContext.eventChkInf[7] |= 2;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_71);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -342,7 +342,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
this->timers[0] = 0;
|
||||
this->camData.speedMod = 0.0f;
|
||||
this->camData.accel = 0.0f;
|
||||
if (gSaveContext.eventChkInf[7] & 8) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_73)) {
|
||||
this->introState = BFD_CS_EMERGE;
|
||||
this->camData.nextEye.x = player2->actor.world.pos.x + 100.0f + 300.0f - 600.0f;
|
||||
this->camData.nextEye.y = player2->actor.world.pos.y + 100.0f - 50.0f;
|
||||
|
@ -464,7 +464,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
osSyncPrintf("WAY_SPD X = %f\n", this->camData.atVel.x);
|
||||
osSyncPrintf("WAY_SPD Y = %f\n", this->camData.atVel.y);
|
||||
osSyncPrintf("WAY_SPD Z = %f\n", this->camData.atVel.z);
|
||||
if ((this->timers[3] > 190) && !(gSaveContext.eventChkInf[7] & 8)) {
|
||||
if ((this->timers[3] > 190) && !GET_EVENTCHKINF(EVENTCHKINF_73)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
|
@ -492,7 +492,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
if (this->timers[3] == 160) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_FIRE_BOSS);
|
||||
}
|
||||
if ((this->timers[3] == 130) && !(gSaveContext.eventChkInf[7] & 8)) {
|
||||
if ((this->timers[3] == 130) && !GET_EVENTCHKINF(EVENTCHKINF_73)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(gVolvagiaBossTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
||||
}
|
||||
|
@ -543,7 +543,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
this->actionFunc = BossFd_Wait;
|
||||
this->handoffSignal = FD2_SIGNAL_GROUND;
|
||||
gSaveContext.eventChkInf[7] |= 8;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_73);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -564,7 +564,7 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ChangeCameraStatus(globalCtx, this->csCamIndex, CAM_STAT_ACTIVE);
|
||||
this->csCamFov = 60.0f;
|
||||
|
||||
if (gSaveContext.eventChkInf[7] & 0x100) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_78)) {
|
||||
// watched cutscene already, skip most of it
|
||||
this->csState = 17;
|
||||
this->csTimer = 0;
|
||||
|
@ -1083,12 +1083,12 @@ void BossGanon_IntroCutscene(BossGanon* this, GlobalContext* globalCtx) {
|
|||
gSegments[6] = VIRTUAL_TO_PHYSICAL(
|
||||
globalCtx->objectCtx.status[Object_GetIndex(&globalCtx->objectCtx, OBJECT_GANON)].segment);
|
||||
|
||||
if (!(gSaveContext.eventChkInf[7] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_78)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(gDorfTitleCardTex), 160, 180, 128, 40);
|
||||
}
|
||||
|
||||
gSaveContext.eventChkInf[7] |= 0x100;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_78);
|
||||
}
|
||||
|
||||
if (this->csTimer >= 20) {
|
||||
|
|
|
@ -680,7 +680,7 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
// entrance of the boss room
|
||||
if (fabsf(player->actor.world.pos.x - 150.0f) < 60.0f &&
|
||||
fabsf(player->actor.world.pos.z - 350.0f) < 60.0f) {
|
||||
if (gSaveContext.eventChkInf[7] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_70)) {
|
||||
BossGoma_SetupEncounterState4(this, globalCtx);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_SHUTTER, 164.72f,
|
||||
-480.0f, 397.68002f, 0, -0x705C, 0, 0x180);
|
||||
|
@ -919,13 +919,13 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
if (Animation_OnFrame(&this->skelanime, 40.0f)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_CRY1);
|
||||
|
||||
if (!(gSaveContext.eventChkInf[7] & 1)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_70)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(gGohmaTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
||||
}
|
||||
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
gSaveContext.eventChkInf[7] |= 1;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_70);
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelanime, this->currentAnimFrameCount)) {
|
||||
|
|
|
@ -359,7 +359,7 @@ void BossMo_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
MO_WATER_LEVEL(globalCtx) = -500;
|
||||
return;
|
||||
}
|
||||
if (gSaveContext.eventChkInf[7] & 0x10) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_74)) {
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
this->tentMaxAngle = 5.0f;
|
||||
this->timers[0] = 50;
|
||||
|
@ -1424,7 +1424,7 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
if (this->timers[2] == 130) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(gMorphaTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
||||
gSaveContext.eventChkInf[7] |= 0x10;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_74);
|
||||
}
|
||||
break;
|
||||
case MO_INTRO_FINISH:
|
||||
|
|
|
@ -378,7 +378,7 @@ void BossSst_HeadSetupIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sCutsceneCamera, CAM_STAT_ACTIVE);
|
||||
Math_Vec3f_Copy(&sCameraAt, &player->actor.world.pos);
|
||||
if (gSaveContext.eventChkInf[7] & 0x80) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_77)) {
|
||||
sCameraEye.z = ROOM_CENTER_Z - 100.0f;
|
||||
}
|
||||
|
||||
|
@ -414,7 +414,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ChangeCameraStatus(globalCtx, sCutsceneCamera, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
Gameplay_ClearCamera(globalCtx, sCutsceneCamera);
|
||||
gSaveContext.eventChkInf[7] |= 0x80;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_77);
|
||||
BossSst_HeadSetupNeutral(this);
|
||||
this->colliderJntSph.base.ocFlags1 |= OC1_ON;
|
||||
sHands[LEFT]->colliderJntSph.base.ocFlags1 |= OC1_ON;
|
||||
|
@ -437,7 +437,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
this->ready = true;
|
||||
func_800AA000(this->actor.xyzDistToPlayerSq, 0xFF, 0x14, 0x96);
|
||||
Audio_PlayActorSound2(&sFloor->dyna.actor, NA_SE_EN_SHADEST_TAIKO_HIGH);
|
||||
} else if (gSaveContext.eventChkInf[7] & 0x80) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_77)) {
|
||||
sHands[RIGHT]->actor.draw = BossSst_DrawHand;
|
||||
sHands[LEFT]->actor.draw = BossSst_DrawHand;
|
||||
this->actor.draw = BossSst_DrawHead;
|
||||
|
@ -564,7 +564,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (this->timer <= 198) {
|
||||
revealStateTimer = 198 - this->timer;
|
||||
if ((gSaveContext.eventChkInf[7] & 0x80) && (revealStateTimer <= 44)) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_77) && (revealStateTimer <= 44)) {
|
||||
sCameraAt.x += 492.0f * 0.01f;
|
||||
sCameraAt.y += 200.0f * 0.01f;
|
||||
sCameraEye.x -= 80.0f * 0.01f;
|
||||
|
@ -593,7 +593,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
sCameraEye.y += 125.0f * 0.01f;
|
||||
sCameraEye.z -= 350.0f * 0.01f;
|
||||
} else if (revealStateTimer == 85) {
|
||||
if (!(gSaveContext.eventChkInf[7] & 0x80)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_77)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(gBongoTitleCardTex), 160, 180, 128, 40);
|
||||
}
|
||||
|
|
|
@ -514,7 +514,7 @@ void BossTw_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->actor.naviEnemyId = NAVI_ENEMY_TWINROVA_KOTAKE;
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_tw_Skel_0070E0, &object_tw_Anim_006F28, NULL, NULL, 0);
|
||||
|
||||
if (gSaveContext.eventChkInf[7] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_75)) {
|
||||
// began twinrova battle
|
||||
BossTw_SetupFlyTo(this, globalCtx);
|
||||
this->actor.world.pos.x = -600.0f;
|
||||
|
@ -532,7 +532,7 @@ void BossTw_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->actor.naviEnemyId = NAVI_ENEMY_TWINROVA_KOUME;
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_tw_Skel_01F888, &object_tw_Anim_006F28, NULL, NULL, 0);
|
||||
|
||||
if (gSaveContext.eventChkInf[7] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_75)) {
|
||||
// began twinrova battle
|
||||
BossTw_SetupFlyTo(this, globalCtx);
|
||||
this->actor.world.pos.x = 600.0f;
|
||||
|
@ -554,7 +554,7 @@ void BossTw_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_tw_Skel_032020, &object_tw_Anim_0244B4, NULL, NULL, 0);
|
||||
Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_0244B4, -3.0f);
|
||||
|
||||
if (gSaveContext.eventChkInf[7] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_75)) {
|
||||
// began twinrova battle
|
||||
BossTw_SetupWait(this, globalCtx);
|
||||
} else {
|
||||
|
@ -2227,7 +2227,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
globalCtx->envCtx.unk_D8 = 0.0f;
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(object_tw_Blob_02E170), 0xA0, 0xB4, 0x80, 0x28);
|
||||
gSaveContext.eventChkInf[7] |= 0x20;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_75);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
}
|
||||
|
||||
|
|
|
@ -627,7 +627,7 @@ void BossVa_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
0, BOSSVA_DOOR);
|
||||
if (Flags_GetClear(globalCtx, globalCtx->roomCtx.curRoom.num)) {
|
||||
warpId = ACTOR_EN_RU1;
|
||||
if (gSaveContext.eventChkInf[3] & 0x80) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_37)) {
|
||||
warpId = ACTOR_DOOR_WARP1;
|
||||
}
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, warpId, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
|
@ -640,7 +640,7 @@ void BossVa_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
} else {
|
||||
this->actor.colChkInfo.damageTable = sDamageTable;
|
||||
sPhase2Timer = 0xFFFF;
|
||||
if (gSaveContext.eventChkInf[7] & 0x40) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_76)) {
|
||||
sCsState = INTRO_CALL_BARI;
|
||||
sDoorState = 100;
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
|
@ -975,7 +975,7 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
sCameraNextAt.y = 140.0f;
|
||||
sCameraNextAt.z = -200.0f;
|
||||
|
||||
if (!(gSaveContext.eventChkInf[7] & 0x40)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_76)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(gBarinadeTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
||||
}
|
||||
|
@ -1017,7 +1017,7 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
sCsState++;
|
||||
gSaveContext.eventChkInf[7] |= 0x40;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_76);
|
||||
player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -491,7 +491,7 @@ void DemoEffect_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->jewel.isPositionInit = 0;
|
||||
DemoEffect_InitJewel(globalCtx, this);
|
||||
Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTOR_EN_DOOR);
|
||||
if ((globalCtx->sceneNum == SCENE_BDAN) && (gSaveContext.infTable[20] & 0x20)) {
|
||||
if ((globalCtx->sceneNum == SCENE_BDAN) && GET_INFTABLE(INFTABLE_145)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -696,7 +696,7 @@ void DemoEffect_InitTimeWarp(DemoEffect* this, GlobalContext* globalCtx) {
|
|||
Actor_SetScale(&this->actor, 84 * 0.001f);
|
||||
}
|
||||
} else if (gSaveContext.sceneSetupIndex == 5 || gSaveContext.sceneSetupIndex == 4 ||
|
||||
(gSaveContext.entranceIndex == 0x0324 && !((gSaveContext.eventChkInf[12] & 0x200)))) {
|
||||
(gSaveContext.entranceIndex == 0x0324 && !GET_EVENTCHKINF(EVENTCHKINF_C9))) {
|
||||
SkelCurve_SetAnim(&this->skelCurve, &gTimeWarpAnim, 1.0f, 59.0f, 59.0f, 0.0f);
|
||||
SkelCurve_Update(globalCtx, &this->skelCurve);
|
||||
this->updateFunc = DemoEffect_UpdateTimeWarpReturnFromChamberOfSages;
|
||||
|
@ -760,7 +760,7 @@ void DemoEffect_UpdateTimeWarpReturnFromChamberOfSages(DemoEffect* this, GlobalC
|
|||
|
||||
if (this->timeWarp.shrinkTimer > 250) {
|
||||
if (gSaveContext.entranceIndex == 0x0324) {
|
||||
gSaveContext.eventChkInf[12] |= 0x200;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_C9);
|
||||
}
|
||||
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -1560,8 +1560,8 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, GlobalContext* globalCtx) {
|
|||
if (globalCtx->csCtx.state && globalCtx->csCtx.npcActions[this->csActionId]) {
|
||||
switch (globalCtx->csCtx.npcActions[this->csActionId]->action) {
|
||||
case 3:
|
||||
if (gSaveContext.eventChkInf[4] & 0x800) {
|
||||
gSaveContext.eventChkInf[4] |= 0x800;
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_4B)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4B);
|
||||
}
|
||||
DemoEffect_MoveJewelActivateDoorOfTime(this, globalCtx);
|
||||
if ((globalCtx->gameplayFrames & 1) == 0) {
|
||||
|
@ -1594,7 +1594,7 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (gSaveContext.entranceIndex == 0x0053) {
|
||||
if (!(gSaveContext.eventChkInf[4] & 0x800)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_4B)) {
|
||||
hasCmdAction = globalCtx->csCtx.state && globalCtx->csCtx.npcActions[this->csActionId];
|
||||
if (!hasCmdAction) {
|
||||
this->effectFlags |= 0x1;
|
||||
|
|
|
@ -890,7 +890,7 @@ void func_80986BE4(DemoIm* this, s32 arg1) {
|
|||
}
|
||||
|
||||
void func_80986BF8(DemoIm* this, GlobalContext* globalCtx) {
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
this->action = 24;
|
||||
this->drawConfig = 1;
|
||||
this->unk_280 = 1;
|
||||
|
@ -902,14 +902,14 @@ void func_80986C30(DemoIm* this, GlobalContext* globalCtx) {
|
|||
if (func_80986A5C(this, globalCtx)) {
|
||||
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gZeldasCourtyardLullabyCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
gSaveContext.eventChkInf[5] |= 0x200;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_59);
|
||||
Item_Give(globalCtx, ITEM_SONG_LULLABY);
|
||||
func_80985F54(this);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80986CC8(DemoIm* this) {
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
this->action = 26;
|
||||
this->drawConfig = 1;
|
||||
this->unk_280 = 1;
|
||||
|
@ -919,7 +919,7 @@ void func_80986CC8(DemoIm* this) {
|
|||
|
||||
void func_80986CFC(DemoIm* this, GlobalContext* globalCtx) {
|
||||
if (func_80986A5C(this, globalCtx)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x1000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4C);
|
||||
this->action = 19;
|
||||
}
|
||||
}
|
||||
|
@ -928,9 +928,9 @@ void func_80986D40(DemoIm* this, GlobalContext* globalCtx) {
|
|||
if (gSaveContext.sceneSetupIndex == 6) {
|
||||
this->action = 19;
|
||||
this->drawConfig = 1;
|
||||
} else if (gSaveContext.eventChkInf[8] & 1) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (!(gSaveContext.eventChkInf[5] & 0x200)) {
|
||||
} else if (!GET_EVENTCHKINF(EVENTCHKINF_59)) {
|
||||
this->action = 23;
|
||||
} else {
|
||||
this->action = 20;
|
||||
|
|
|
@ -232,7 +232,7 @@ void DemoKankyo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case DEMOKANKYO_DOOR_OF_TIME:
|
||||
this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 1.0f;
|
||||
this->unk_150[0].unk_18 = 0.0f;
|
||||
if (!(gSaveContext.eventChkInf[4] & 0x800)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_4B)) {
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_TOKI,
|
||||
this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0,
|
||||
0x0000);
|
||||
|
@ -411,7 +411,7 @@ void DemoKankyo_UpdateDoorOfTime(DemoKankyo* this, GlobalContext* globalCtx) {
|
|||
this->unk_150[0].unk_18 += 1.0f;
|
||||
if (this->unk_150[0].unk_18 >= 102.0f) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_STONEDOOR_STOP);
|
||||
gSaveContext.eventChkInf[4] |= 0x800;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4B);
|
||||
Actor_Kill(this->actor.child);
|
||||
DemoKankyo_SetupAction(this, DemoKankyo_KillDoorOfTimeCollision);
|
||||
}
|
||||
|
|
|
@ -63,7 +63,9 @@ static u8 sEnergyColors[] = {
|
|||
};
|
||||
|
||||
s32 DemoKekkai_CheckEventFlag(s32 params) {
|
||||
static s32 eventFlags[] = { 0xC3, 0xBC, 0xBF, 0xBE, 0xBD, 0xAD, 0xBB };
|
||||
static s32 eventFlags[] = {
|
||||
EVENTCHKINF_C3, EVENTCHKINF_BC, EVENTCHKINF_BF, EVENTCHKINF_BE, EVENTCHKINF_BD, EVENTCHKINF_AD, EVENTCHKINF_BB,
|
||||
};
|
||||
|
||||
if ((params < KEKKAI_TOWER) || (params > KEKKAI_FOREST)) {
|
||||
return true;
|
||||
|
@ -167,7 +169,7 @@ void DemoKekkai_TowerBarrier(DemoKekkai* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
this->timer++;
|
||||
if (this->timer > 100) {
|
||||
Flags_SetEventChkInf(0xC3);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_C3);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
} else if (this->timer > 40) {
|
||||
|
|
|
@ -598,7 +598,7 @@ void func_809975C0(DoorShutter* this, GlobalContext* globalCtx) {
|
|||
Actor_UpdateBgCheckInfo(globalCtx, &this->dyna.actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
|
||||
if (this->dyna.actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
DoorShutter_SetupAction(this, func_809976B8);
|
||||
if (!(gSaveContext.eventChkInf[7] & 1)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_70)) {
|
||||
BossGoma* parent = (BossGoma*)this->dyna.actor.parent;
|
||||
|
||||
this->unk_164 = 10;
|
||||
|
|
|
@ -49,7 +49,7 @@ void DoorToki_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void DoorToki_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
DoorToki* this = (DoorToki*)thisx;
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 0x800) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_4B)) {
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
|
|
|
@ -498,8 +498,8 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
TRANS_TRIGGER_START);
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_DDAN_BOSS) {
|
||||
if (!Flags_GetEventChkInf(0x25)) {
|
||||
Flags_SetEventChkInf(0x25);
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_25)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_25);
|
||||
Item_Give(globalCtx, ITEM_GORON_RUBY);
|
||||
globalCtx->nextEntranceIndex = 0x13D;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF1;
|
||||
|
@ -508,9 +508,9 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.nextCutsceneIndex = 0;
|
||||
}
|
||||
} else if (globalCtx->sceneNum == SCENE_YDAN_BOSS) {
|
||||
if (!Flags_GetEventChkInf(7)) {
|
||||
Flags_SetEventChkInf(7);
|
||||
Flags_SetEventChkInf(9);
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_07)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_07);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_09);
|
||||
Item_Give(globalCtx, ITEM_KOKIRI_EMERALD);
|
||||
globalCtx->nextEntranceIndex = 0xEE;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF1;
|
||||
|
@ -605,7 +605,7 @@ void DoorWarp1_RutoWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
this->warpTimer++;
|
||||
|
||||
if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == 0xFFEF) {
|
||||
gSaveContext.eventChkInf[3] |= 0x80;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_37);
|
||||
Item_Give(globalCtx, ITEM_ZORA_SAPPHIRE);
|
||||
globalCtx->nextEntranceIndex = 0x10E;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF0;
|
||||
|
@ -706,8 +706,8 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == 0xFFEF) {
|
||||
if (globalCtx->sceneNum == SCENE_MORIBOSSROOM) {
|
||||
if (!(gSaveContext.eventChkInf[4] & 0x100)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x100;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_48)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_48);
|
||||
Item_Give(globalCtx, ITEM_MEDALLION_FOREST);
|
||||
globalCtx->nextEntranceIndex = 0x6B;
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
|
@ -721,8 +721,8 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.nextCutsceneIndex = 0;
|
||||
}
|
||||
} else if (globalCtx->sceneNum == SCENE_FIRE_BS) {
|
||||
if (!(gSaveContext.eventChkInf[4] & 0x200)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x200;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_49)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_49);
|
||||
Item_Give(globalCtx, ITEM_MEDALLION_FIRE);
|
||||
globalCtx->nextEntranceIndex = 0xDB;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF3;
|
||||
|
@ -735,8 +735,8 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.nextCutsceneIndex = 0;
|
||||
}
|
||||
} else if (globalCtx->sceneNum == SCENE_MIZUSIN_BS) {
|
||||
if (!(gSaveContext.eventChkInf[4] & 0x400)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x400;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_4A)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4A);
|
||||
Item_Give(globalCtx, ITEM_MEDALLION_WATER);
|
||||
globalCtx->nextEntranceIndex = 0x6B;
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
|
|
|
@ -79,7 +79,7 @@ void EfcErupc_UpdateAction(EfcErupc* this, GlobalContext* globalCtx) {
|
|||
case 2:
|
||||
if (this->unk_14E == 0) {
|
||||
func_800F3F3C(6);
|
||||
gSaveContext.eventChkInf[2] |= 0x8000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_2F);
|
||||
}
|
||||
this->unk_14E++;
|
||||
break;
|
||||
|
|
|
@ -123,7 +123,7 @@ void func_809B0558(EnAni* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
EnAni_SetupAction(this, func_809B0524);
|
||||
}
|
||||
gSaveContext.itemGetInf[1] |= 0x20;
|
||||
SET_ITEMGETINF(ITEMGETINF_15);
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 200.0f);
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ void func_809B064C(EnAni* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else if (yawDiff >= -0x36AF && yawDiff < 0 && this->actor.xzDistToPlayer < 150.0f &&
|
||||
-80.0f < this->actor.yDistToPlayer) {
|
||||
if (gSaveContext.itemGetInf[1] & 0x20) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_15)) {
|
||||
EnAni_SetText(this, globalCtx, 0x5056);
|
||||
} else {
|
||||
EnAni_SetText(this, globalCtx, 0x5055);
|
||||
|
@ -187,16 +187,16 @@ void func_809B07F8(EnAni* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else if (yawDiff > -0x36B0 && yawDiff < 0 && this->actor.xzDistToPlayer < 150.0f &&
|
||||
-80.0f < this->actor.yDistToPlayer) {
|
||||
if (gSaveContext.itemGetInf[1] & 0x20) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_15)) {
|
||||
EnAni_SetText(this, globalCtx, 0x5056);
|
||||
} else {
|
||||
EnAni_SetText(this, globalCtx, 0x5055);
|
||||
}
|
||||
} else if (yawDiff > -0x3E8 && yawDiff < 0x36B0 && this->actor.xzDistToPlayer < 350.0f) {
|
||||
if (!(gSaveContext.eventChkInf[2] & 0x8000)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_2F)) {
|
||||
textId = 0x5052;
|
||||
} else {
|
||||
textId = (gSaveContext.itemGetInf[1] & 0x20) ? 0x5054 : 0x5053;
|
||||
textId = GET_ITEMGETINF(ITEMGETINF_15) ? 0x5054 : 0x5053;
|
||||
}
|
||||
EnAni_SetText(this, globalCtx, textId);
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
this->dialogState = TEXT_STATE_EVENT;
|
||||
|
||||
// Check for beaten Dodongo's Cavern
|
||||
if ((gSaveContext.eventChkInf[2] & 0x20) || BREG(2)) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_25) || BREG(2)) {
|
||||
this->actor.textId = 0xBF;
|
||||
} else {
|
||||
this->actor.textId = 0x7058;
|
||||
|
@ -164,7 +164,7 @@ void EnBomBowMan_CheckBeatenDC(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
this->blinkTimer = (s16)Rand_ZeroFloat(60.0f) + 20;
|
||||
|
||||
// Check for beaten Dodongo's Cavern
|
||||
if (!((gSaveContext.eventChkInf[2] & 0x20) || BREG(2))) {
|
||||
if (!(GET_EVENTCHKINF(EVENTCHKINF_25) || BREG(2))) {
|
||||
this->actionFunc = EnBomBowMan_WaitNotBeatenDC;
|
||||
} else {
|
||||
this->actor.textId = 0x18;
|
||||
|
@ -389,7 +389,7 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
switch (this->prizeSelect) {
|
||||
case 0:
|
||||
prizeTemp = EXITEM_BOMB_BAG_BOWLING;
|
||||
if (gSaveContext.itemGetInf[1] & 2) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_11)) {
|
||||
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
||||
}
|
||||
break;
|
||||
|
@ -401,7 +401,7 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 3:
|
||||
prizeTemp = EXITEM_HEART_PIECE_BOWLING;
|
||||
if (gSaveContext.itemGetInf[1] & 4) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_12)) {
|
||||
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -157,10 +157,10 @@ void EnBomBowlPit_SetupGivePrize(EnBomBowlPit* this, GlobalContext* globalCtx) {
|
|||
if (this->exItemDone != 0) {
|
||||
switch (this->prizeIndex) {
|
||||
case EXITEM_BOMB_BAG_BOWLING:
|
||||
gSaveContext.itemGetInf[1] |= 2;
|
||||
SET_ITEMGETINF(ITEMGETINF_11);
|
||||
break;
|
||||
case EXITEM_HEART_PIECE_BOWLING:
|
||||
gSaveContext.itemGetInf[1] |= 4;
|
||||
SET_ITEMGETINF(ITEMGETINF_12);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ void EnChanger_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
minigameRoomNum *= 2;
|
||||
// Spawn Heart Piece in chest (or Purple Rupee if won Heart Piece)
|
||||
if (globalCtx->roomCtx.curRoom.num >= 6) {
|
||||
rewardChestParams = ((gSaveContext.itemGetInf[1] & 0x800) ? (0x4EA0) : (0x4EC0));
|
||||
rewardChestParams = GET_ITEMGETINF(ITEMGETINF_1B) ? 0x4EA0 : 0x4EC0;
|
||||
rewardChestParams = sTreasureFlags[5] | rewardChestParams;
|
||||
this->finalChest = (EnBox*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_BOX,
|
||||
20.0f, 20.0f, -2500.0f, 0, 0x7FFF, 0, rewardChestParams);
|
||||
|
@ -111,8 +111,8 @@ void EnChanger_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
} else {
|
||||
rewardParams = ((gSaveContext.itemGetInf[1] & 0x800) ? (ITEM_ETC_RUPEE_PURPLE_CHEST_GAME)
|
||||
: (ITEM_ETC_HEART_PIECE_CHEST_GAME)) &
|
||||
rewardParams = (GET_ITEMGETINF(ITEMGETINF_1B) ? ITEM_ETC_RUPEE_PURPLE_CHEST_GAME
|
||||
: ITEM_ETC_HEART_PIECE_CHEST_GAME) &
|
||||
0xFF;
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_ETCETERA, 20.0f, 20.0f, -2500.0f, 0, 0, 0,
|
||||
((sTreasureFlags[5] & 0x1F) << 8) + rewardParams);
|
||||
|
@ -276,8 +276,8 @@ void EnChanger_OpenChests(EnChanger* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnChanger_SetHeartPieceFlag(EnChanger* this, GlobalContext* globalCtx) {
|
||||
if (this->finalChest->unk_1F4 != 0) {
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x800)) {
|
||||
gSaveContext.itemGetInf[1] |= 0x800;
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_1B)) {
|
||||
SET_ITEMGETINF(ITEMGETINF_1B);
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ void EnCow_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x4000)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_1E)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ s32 EnCs_GetTalkState(EnCs* this, GlobalContext* globalCtx) {
|
|||
if (this->actor.textId == 0x2026) {
|
||||
Player_UnsetMask(globalCtx);
|
||||
Item_Give(globalCtx, ITEM_SOLD_OUT);
|
||||
gSaveContext.itemGetInf[3] |= 0x400;
|
||||
SET_ITEMGETINF(ITEMGETINF_3A);
|
||||
Rupees_ChangeBy(30);
|
||||
this->actor.textId = 0x2027;
|
||||
talkState = 2;
|
||||
|
@ -210,7 +210,7 @@ s32 EnCs_GetTextID(EnCs* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
s32 textId = Text_GetFaceReaction(globalCtx, 15);
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
if (textId == 0) {
|
||||
textId = 0x2028;
|
||||
}
|
||||
|
@ -333,14 +333,14 @@ void EnCs_Walk(EnCs* this, GlobalContext* globalCtx) {
|
|||
animIndex = this->currentAnimIndex;
|
||||
|
||||
if (this->talkState == 0) {
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
rnd = Rand_ZeroOne() * 10.0f;
|
||||
} else {
|
||||
rnd = Rand_ZeroOne() * 5.0f;
|
||||
}
|
||||
|
||||
if (rnd == 0) {
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
animIndex = 2.0f * Rand_ZeroOne();
|
||||
animIndex = (animIndex == 0) ? ENCS_ANIM_2 : ENCS_ANIM_1;
|
||||
} else {
|
||||
|
@ -469,7 +469,7 @@ void EnCs_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnCs_OverrideLimbDraw, EnCs_PostLimbDraw, &this->actor);
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
s32 childLinkObjectIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_LINK_CHILD);
|
||||
|
||||
// Handle attaching the Spooky Mask to the boy's face
|
||||
|
|
|
@ -152,13 +152,13 @@ void EnDaiku_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 noKill = true;
|
||||
s32 isFree = false;
|
||||
|
||||
if ((this->actor.params & 3) == 0 && (gSaveContext.eventChkInf[9] & 1)) {
|
||||
if ((this->actor.params & 3) == 0 && GET_EVENTCHKINF(EVENTCHKINF_90)) {
|
||||
isFree = true;
|
||||
} else if ((this->actor.params & 3) == 1 && (gSaveContext.eventChkInf[9] & 2)) {
|
||||
} else if ((this->actor.params & 3) == 1 && GET_EVENTCHKINF(EVENTCHKINF_91)) {
|
||||
isFree = true;
|
||||
} else if ((this->actor.params & 3) == 2 && (gSaveContext.eventChkInf[9] & 4)) {
|
||||
} else if ((this->actor.params & 3) == 2 && GET_EVENTCHKINF(EVENTCHKINF_92)) {
|
||||
isFree = true;
|
||||
} else if ((this->actor.params & 3) == 3 && (gSaveContext.eventChkInf[9] & 8)) {
|
||||
} else if ((this->actor.params & 3) == 3 && GET_EVENTCHKINF(EVENTCHKINF_93)) {
|
||||
isFree = true;
|
||||
}
|
||||
|
||||
|
@ -238,10 +238,10 @@ s32 EnDaiku_UpdateTalking(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x6061:
|
||||
gSaveContext.infTable[23] |= 0x40;
|
||||
SET_INFTABLE(INFTABLE_176);
|
||||
break;
|
||||
case 0x6064:
|
||||
gSaveContext.infTable[23] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_178);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -271,7 +271,8 @@ void EnDaiku_UpdateText(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
if (this->stateFlags & ENDAIKU_STATEFLAG_GERUDODEFEATED) {
|
||||
freedCount = 0;
|
||||
for (carpenterType = 0; carpenterType < 4; carpenterType++) {
|
||||
if (gSaveContext.eventChkInf[9] & (1 << carpenterType)) {
|
||||
if (gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX] &
|
||||
(1 << (carpenterType + EVENTCHKINF_90_SHIFT))) {
|
||||
freedCount++;
|
||||
}
|
||||
}
|
||||
|
@ -307,7 +308,7 @@ void EnDaiku_UpdateText(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
|
||||
this->actor.textId = 0x6063;
|
||||
} else {
|
||||
if (!(gSaveContext.infTable[23] & 0x40)) {
|
||||
if (!GET_INFTABLE(INFTABLE_176)) {
|
||||
this->actor.textId = 0x6061;
|
||||
} else {
|
||||
this->actor.textId = 0x6062;
|
||||
|
@ -318,7 +319,7 @@ void EnDaiku_UpdateText(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
|
||||
this->actor.textId = 0x6066;
|
||||
} else {
|
||||
if (!(gSaveContext.infTable[23] & 0x100)) {
|
||||
if (!GET_INFTABLE(INFTABLE_178)) {
|
||||
this->actor.textId = 0x6064;
|
||||
} else {
|
||||
this->actor.textId = 0x6065;
|
||||
|
@ -399,7 +400,7 @@ void EnDaiku_InitEscape(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
EnDaiku_ChangeAnim(this, ENDAIKU_ANIM_RUN, &this->currentAnimIndex);
|
||||
this->stateFlags &= ~(ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2);
|
||||
|
||||
gSaveContext.eventChkInf[9] |= 1 << (this->actor.params & 3);
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX] |= 1 << ((this->actor.params & 3) + EVENTCHKINF_90_SHIFT);
|
||||
|
||||
this->actor.gravity = -1.0f;
|
||||
this->escapeSubCamTimer = sEscapeSubCamParams[this->actor.params & 3].maxFramesActive;
|
||||
|
@ -494,7 +495,8 @@ void EnDaiku_EscapeSuccess(EnDaiku* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
this->subCamActive = false;
|
||||
|
||||
if ((gSaveContext.eventChkInf[9] & 0xF) == 0xF) {
|
||||
if (CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK)) {
|
||||
Matrix_RotateY(BINANG_TO_RAD(this->initRot.y), MTXMODE_NEW);
|
||||
Matrix_MultVec3f(&D_809E4148, &vec);
|
||||
gerudoGuard =
|
||||
|
|
|
@ -215,10 +215,10 @@ s32 EnDaikuKakariko_GetTalkState(EnDaikuKakariko* this, GlobalContext* globalCtx
|
|||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x6061:
|
||||
gSaveContext.infTable[23] |= 0x40;
|
||||
SET_INFTABLE(INFTABLE_176);
|
||||
break;
|
||||
case 0x6064:
|
||||
gSaveContext.infTable[23] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_178);
|
||||
break;
|
||||
}
|
||||
talkState = 0;
|
||||
|
|
|
@ -140,14 +140,14 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, GlobalContext* globalCt
|
|||
} else {
|
||||
s32 rupeesNeeded = 5;
|
||||
|
||||
if (gSaveContext.eventChkInf[3] & 0x100) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
rupeesNeeded = 10;
|
||||
}
|
||||
if (this->grabbedRupeesCounter >= rupeesNeeded) {
|
||||
// Won.
|
||||
gSaveContext.timer1State = 0;
|
||||
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
this->actor.textId = 0x4055;
|
||||
} else {
|
||||
this->actor.textId = 0x405D;
|
||||
|
@ -160,7 +160,7 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, GlobalContext* globalCt
|
|||
func_800F5B58();
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
this->actionFunc = func_809EE96C;
|
||||
} else {
|
||||
this->actionFunc = func_809EE048;
|
||||
|
@ -206,7 +206,7 @@ void EnDivingGame_Talk(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
switch (this->state) {
|
||||
case ENDIVINGGAME_STATE_NOTPLAYING:
|
||||
this->unk_292 = TEXT_STATE_CHOICE;
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
this->actor.textId = 0x4053;
|
||||
this->phase = ENDIVINGGAME_PHASE_1;
|
||||
} else {
|
||||
|
@ -248,7 +248,7 @@ void EnDivingGame_HandlePlayChoice(EnDivingGame* this, GlobalContext* globalCtx)
|
|||
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
||||
break;
|
||||
}
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100) || this->actor.textId == 0x85 || this->actor.textId == 0x2D) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38) || this->actor.textId == 0x85 || this->actor.textId == 0x2D) {
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_292 = TEXT_STATE_EVENT;
|
||||
this->actionFunc = func_809EE048;
|
||||
|
@ -307,7 +307,7 @@ void EnDivingGame_SetupRupeeThrow(EnDivingGame* this, GlobalContext* globalCtx)
|
|||
this->unk_2D0.x = -280.0f;
|
||||
this->unk_2D0.y = -20.0f;
|
||||
this->unk_2D0.z = -240.0f;
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
this->rupeesLeftToThrow = 5;
|
||||
} else {
|
||||
this->rupeesLeftToThrow = 10;
|
||||
|
@ -351,7 +351,7 @@ void EnDivingGame_RupeeThrow(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
this->spawnRuppyTimer = 5;
|
||||
EnDivingGame_SpawnRuppy(this, globalCtx);
|
||||
this->rupeesLeftToThrow--;
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
this->unk_296 = 30;
|
||||
} else {
|
||||
this->unk_296 = 5;
|
||||
|
@ -409,7 +409,7 @@ void func_809EE800(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->unk_292 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
func_80088B34(BREG(2) + 50);
|
||||
} else {
|
||||
func_80088B34(BREG(2) + 50);
|
||||
|
@ -472,7 +472,7 @@ void func_809EEAF8(EnDivingGame* this, GlobalContext* globalCtx) {
|
|||
// "Successful completion"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
||||
gSaveContext.eventChkInf[3] |= 0x100;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_38);
|
||||
this->actionFunc = func_809EDCB0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -290,7 +290,7 @@ void func_809EFA28(EnDns* this) {
|
|||
}
|
||||
|
||||
void func_809EFA58(EnDns* this) {
|
||||
gSaveContext.itemGetInf[0] |= 0x800;
|
||||
SET_ITEMGETINF(ITEMGETINF_0B);
|
||||
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
||||
}
|
||||
|
||||
|
@ -303,12 +303,12 @@ void func_809EFACC(EnDns* this) {
|
|||
}
|
||||
|
||||
void func_809EFAFC(EnDns* this) {
|
||||
gSaveContext.infTable[25] |= 0x4;
|
||||
SET_INFTABLE(INFTABLE_192);
|
||||
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
||||
}
|
||||
|
||||
void func_809EFB40(EnDns* this) {
|
||||
gSaveContext.infTable[25] |= 0x8;
|
||||
SET_INFTABLE(INFTABLE_193);
|
||||
Rupees_ChangeBy(-this->dnsItemEntry->itemPrice);
|
||||
}
|
||||
|
||||
|
|
|
@ -156,14 +156,14 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
|
|||
delay = 0;
|
||||
switch (Player_GetMask(globalCtx)) {
|
||||
case PLAYER_MASK_SKULL:
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x4000)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_1E)) {
|
||||
reaction = DNT_SIGNAL_CELEBRATE;
|
||||
this->prize = DNT_PRIZE_STICK;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_SARIA_THEME);
|
||||
break;
|
||||
}
|
||||
case PLAYER_MASK_TRUTH:
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x8000) && (Player_GetMask(globalCtx) != PLAYER_MASK_SKULL)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_1F) && (Player_GetMask(globalCtx) != PLAYER_MASK_SKULL)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->prize = DNT_PRIZE_NUTS;
|
||||
|
|
|
@ -283,7 +283,7 @@ void EnDntJiji_GivePrize(EnDntJiji* this, GlobalContext* globalCtx) {
|
|||
osSyncPrintf("実 \n");
|
||||
osSyncPrintf("実 \n");
|
||||
osSyncPrintf("実 \n");
|
||||
gSaveContext.itemGetInf[1] |= 0x8000;
|
||||
SET_ITEMGETINF(ITEMGETINF_1F);
|
||||
} else {
|
||||
// "stick"
|
||||
osSyncPrintf("棒 \n");
|
||||
|
@ -292,7 +292,7 @@ void EnDntJiji_GivePrize(EnDntJiji* this, GlobalContext* globalCtx) {
|
|||
osSyncPrintf("棒 \n");
|
||||
osSyncPrintf("棒 \n");
|
||||
osSyncPrintf("棒 \n");
|
||||
gSaveContext.itemGetInf[1] |= 0x4000;
|
||||
SET_ITEMGETINF(ITEMGETINF_1E);
|
||||
}
|
||||
this->actor.textId = 0;
|
||||
if ((this->stage != NULL) && (this->stage->actor.update != NULL)) {
|
||||
|
|
|
@ -246,7 +246,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, GlobalContext* globalCtx) {
|
|||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
// "Big hit"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 大当り ☆☆☆☆☆ %d\n" VT_RST, this->hitCounter);
|
||||
if (!LINK_IS_ADULT && !(gSaveContext.itemGetInf[1] & 0x2000)) {
|
||||
if (!LINK_IS_ADULT && !GET_ITEMGETINF(ITEMGETINF_1D)) {
|
||||
this->hitCounter++;
|
||||
if (this->hitCounter >= 3) {
|
||||
OnePointCutscene_Init(globalCtx, 4140, -99, &this->actor, MAIN_CAM);
|
||||
|
|
|
@ -325,10 +325,10 @@ void EnDog_FollowPath(EnDog* this, GlobalContext* globalCtx) {
|
|||
// depending on where he is on his path. En_Hy checks these event flags.
|
||||
if (this->waypoint < 9) {
|
||||
// Richard is close to her, text says something about his coat
|
||||
gSaveContext.eventInf[3] |= 1;
|
||||
SET_EVENTINF(EVENTINF_30);
|
||||
} else {
|
||||
// Richard is far, text says something about running fast
|
||||
gSaveContext.eventInf[3] &= ~1;
|
||||
CLEAR_EVENTINF(EVENTINF_30);
|
||||
}
|
||||
} else {
|
||||
frame = globalCtx->state.frames % 3;
|
||||
|
|
|
@ -165,7 +165,7 @@ void EnDoor_SetupType(EnDoor* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else if (doorType == DOOR_CHECKABLE) {
|
||||
this->actor.textId = (this->actor.params & 0x3F) + 0x0200;
|
||||
if (this->actor.textId == 0x0229 && !(gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
if (this->actor.textId == 0x0229 && !GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
// Talon's house door. If Talon has not been woken up at Hyrule Castle
|
||||
// this door should be openable at any time of day. Note that there is no
|
||||
// check for time of day as the scene setup for Lon Lon merely initializes
|
||||
|
|
|
@ -80,7 +80,7 @@ void EnDs_DisplayOddPotionText(EnDs* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = 0x504F;
|
||||
this->actionFunc = EnDs_TalkAfterGiveOddPotion;
|
||||
this->actor.flags &= ~ACTOR_FLAG_8;
|
||||
gSaveContext.itemGetInf[3] |= 1;
|
||||
SET_ITEMGETINF(ITEMGETINF_30);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ void EnDs_Wait(EnDs* this, GlobalContext* globalCtx) {
|
|||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
player->actor.textId = 0x504A;
|
||||
this->actionFunc = EnDs_OfferOddPotion;
|
||||
} else if (gSaveContext.itemGetInf[3] & 1) {
|
||||
} else if (GET_ITEMGETINF(ITEMGETINF_30)) {
|
||||
player->actor.textId = 0x500C;
|
||||
this->actionFunc = EnDs_OfferBluePotion;
|
||||
} else {
|
||||
|
|
|
@ -111,7 +111,7 @@ u16 func_809FDC38(GlobalContext* globalCtx, Actor* actor) {
|
|||
return 0x301D;
|
||||
}
|
||||
}
|
||||
if (gSaveContext.infTable[0x11] & 8) {
|
||||
if (GET_INFTABLE(INFTABLE_113)) {
|
||||
return 0x301B;
|
||||
} else {
|
||||
return 0x301A;
|
||||
|
@ -126,13 +126,13 @@ s16 func_809FDCDC(GlobalContext* globalCtx, Actor* actor) {
|
|||
case TEXT_STATE_CLOSING:
|
||||
switch (actor->textId) {
|
||||
case 0x301A:
|
||||
gSaveContext.infTable[0x11] |= 8;
|
||||
SET_INFTABLE(INFTABLE_113);
|
||||
break;
|
||||
case 0x301C:
|
||||
case 0x301F:
|
||||
return 2;
|
||||
case 0x3020:
|
||||
gSaveContext.eventChkInf[0x2] |= 4;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_22);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
@ -156,7 +156,7 @@ s16 func_809FDCDC(GlobalContext* globalCtx, Actor* actor) {
|
|||
s32 func_809FDDB4(EnDu* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT18 && LINK_IS_CHILD) {
|
||||
return 1;
|
||||
} else if (globalCtx->sceneNum == SCENE_HIDAN && !(gSaveContext.infTable[0x11] & 0x400) && LINK_IS_ADULT) {
|
||||
} else if (globalCtx->sceneNum == SCENE_HIDAN && !GET_INFTABLE(INFTABLE_11A) && LINK_IS_ADULT) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -411,7 +411,7 @@ void func_809FE798(EnDu* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else {
|
||||
Actor_Kill(&this->actor);
|
||||
gSaveContext.infTable[0x11] |= 0x400;
|
||||
SET_INFTABLE(INFTABLE_11A);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ void EnEncount2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// "☆☆☆☆☆ Death Mountain Encount2 set ☆☆☆☆☆"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ デスマウンテンエンカウント2セットされました ☆☆☆☆☆ %d\n" VT_RST,
|
||||
this->actor.params);
|
||||
if (LINK_IS_ADULT && (gSaveContext.eventChkInf[4] & 0x200)) { // flag for having used fire temple blue warp
|
||||
if (LINK_IS_ADULT && GET_EVENTCHKINF(EVENTCHKINF_49)) { // flag for having used fire temple blue warp
|
||||
Actor_Kill(thisx);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -411,7 +411,7 @@ void EnExItem_TargetPrizeFinish(EnExItem* this, GlobalContext* globalCtx) {
|
|||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
// "Successful completion"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||
gSaveContext.itemGetInf[1] |= 0x2000;
|
||||
SET_ITEMGETINF(ITEMGETINF_1D);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ void EnExRuppy_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actor.gravity = 0.0f;
|
||||
|
||||
// If you haven't won the diving game before, you will always get 5 rupees
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
this->rupeeValue = 5;
|
||||
this->colorIdx = 1;
|
||||
} else {
|
||||
|
@ -232,7 +232,7 @@ void EnExRuppy_EnterWater(EnExRuppy* this, GlobalContext* globalCtx) {
|
|||
this->actor.world.pos.x = ((Rand_ZeroOne() - 0.5f) * 300.0f) + -260.0f;
|
||||
this->actor.world.pos.y = ((Rand_ZeroOne() - 0.5f) * 200.0f) + 370.0f;
|
||||
temp_f2 = this->unk_15A * -50.0f;
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_38)) {
|
||||
temp_f2 += -500.0f;
|
||||
this->actor.world.pos.z = ((Rand_ZeroOne() - 0.5f) * 80.0f) + temp_f2;
|
||||
} else {
|
||||
|
|
|
@ -105,9 +105,9 @@ static EnFrPointers sEnFrPointers = {
|
|||
},
|
||||
};
|
||||
|
||||
// Flags for gSaveContext.eventChkInf[13]
|
||||
static u16 sSongIndex[] = {
|
||||
0x0002, 0x0004, 0x0010, 0x0008, 0x0020, 0x0040, 0x0001, 0x0000,
|
||||
EVENTCHKINF_D1_MASK, EVENTCHKINF_D2_MASK, EVENTCHKINF_D4_MASK, EVENTCHKINF_D3_MASK,
|
||||
EVENTCHKINF_D5_MASK, EVENTCHKINF_D6_MASK, EVENTCHKINF_D0_MASK, 0,
|
||||
};
|
||||
|
||||
// Frog to Index for Song Flag (sSongIndex) Mapping
|
||||
|
@ -281,7 +281,10 @@ void EnFr_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actor.home.pos.z, 255, 255, 255, -1);
|
||||
// Check to see if the song for a particular frog has been played.
|
||||
// If it has, the frog is larger. If not, the frog is smaller
|
||||
this->scale = gSaveContext.eventChkInf[13] & sSongIndex[sFrogToSongIndex[frogIndex]] ? 270.0f : 150.0f;
|
||||
this->scale =
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] & sSongIndex[sFrogToSongIndex[frogIndex]]
|
||||
? 270.0f
|
||||
: 150.0f;
|
||||
// When the frogs are not active (link doesn't have his ocarina out),
|
||||
// Then shrink the frogs down by a factor of 10,000
|
||||
Actor_SetScale(&this->actor, this->scale * 0.0001f);
|
||||
|
@ -629,12 +632,12 @@ void EnFr_Activate(EnFr* this, GlobalContext* globalCtx) {
|
|||
void EnFr_ActivateCheckFrogSong(EnFr* this, GlobalContext* globalCtx) {
|
||||
if (sEnFrPointers.flags == 11) {
|
||||
// Check if all 6 child songs have been played for the frogs
|
||||
if ((gSaveContext.eventChkInf[13] & 0x2) // ZL
|
||||
&& (gSaveContext.eventChkInf[13] & 0x4) // Epona
|
||||
&& (gSaveContext.eventChkInf[13] & 0x10) // Saria
|
||||
&& (gSaveContext.eventChkInf[13] & 0x8) // Suns
|
||||
&& (gSaveContext.eventChkInf[13] & 0x20) // SoT
|
||||
&& (gSaveContext.eventChkInf[13] & 0x40)) { // SoS
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_D1) // ZL
|
||||
&& GET_EVENTCHKINF(EVENTCHKINF_D2) // Epona
|
||||
&& GET_EVENTCHKINF(EVENTCHKINF_D4) // Saria
|
||||
&& GET_EVENTCHKINF(EVENTCHKINF_D3) // Suns
|
||||
&& GET_EVENTCHKINF(EVENTCHKINF_D5) // SoT
|
||||
&& GET_EVENTCHKINF(EVENTCHKINF_D6)) { // SoS
|
||||
this->actionFunc = EnFr_TalkBeforeFrogSong;
|
||||
this->songIndex = FROG_CHOIR_SONG;
|
||||
Message_StartTextbox(globalCtx, 0x40AB, &this->actor);
|
||||
|
@ -724,7 +727,7 @@ void EnFr_ChildSong(EnFr* this, GlobalContext* globalCtx) {
|
|||
if (songIndex == FROG_STORMS) {
|
||||
this->actor.textId = 0x40AA;
|
||||
EnFr_SetupReward(this, globalCtx, false);
|
||||
} else if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
|
||||
} else if (!(gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] & sSongIndex[songIndex])) {
|
||||
frog = sEnFrPointers.frogs[sSongToFrog[songIndex]];
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
if (frog->actionFunc == EnFr_ChooseJumpFromLogSpot) {
|
||||
|
@ -798,7 +801,7 @@ void EnFr_DeactivateButterfly() {
|
|||
}
|
||||
|
||||
u8 EnFr_GetNextNoteFrogSong(u8 ocarinaNoteIndex) {
|
||||
if (!(gSaveContext.eventChkInf[13] & 1)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_D0)) {
|
||||
return gFrogsSongPtr[ocarinaNoteIndex];
|
||||
} else {
|
||||
return sOcarinaNotes[(s32)Rand_ZeroFloat(60.0f) % 5];
|
||||
|
@ -937,22 +940,22 @@ void EnFr_SetReward(EnFr* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnFr_Deactivate;
|
||||
this->reward = GI_NONE;
|
||||
if ((songIndex >= FROG_ZL) && (songIndex <= FROG_SOT)) {
|
||||
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
|
||||
if (!(gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] |= sSongIndex[songIndex];
|
||||
this->reward = GI_RUPEE_PURPLE;
|
||||
} else {
|
||||
this->reward = GI_RUPEE_BLUE;
|
||||
}
|
||||
} else if (songIndex == FROG_STORMS) {
|
||||
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
|
||||
if (!(gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] |= sSongIndex[songIndex];
|
||||
this->reward = GI_HEART_PIECE;
|
||||
} else {
|
||||
this->reward = GI_RUPEE_BLUE;
|
||||
}
|
||||
} else if (songIndex == FROG_CHOIR_SONG) {
|
||||
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
|
||||
if (!(gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] & sSongIndex[songIndex])) {
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_D0_D1_D2_D3_D4_D5_D6_INDEX] |= sSongIndex[songIndex];
|
||||
this->reward = GI_HEART_PIECE;
|
||||
} else {
|
||||
this->reward = GI_RUPEE_PURPLE;
|
||||
|
|
|
@ -134,7 +134,7 @@ void EnFu_WaitChild(EnFu* this, GlobalContext* globalCtx) {
|
|||
u16 textID = Text_GetFaceReaction(globalCtx, 0xB);
|
||||
|
||||
if (textID == 0) {
|
||||
textID = (gSaveContext.eventChkInf[6] & 0x80) ? 0x5033 : 0x5032;
|
||||
textID = GET_EVENTCHKINF(EVENTCHKINF_67) ? 0x5033 : 0x5032;
|
||||
}
|
||||
|
||||
// if ACTOR_FLAG_8 is set and textID is 0x5033, change animation
|
||||
|
@ -150,7 +150,7 @@ void EnFu_WaitChild(EnFu* this, GlobalContext* globalCtx) {
|
|||
void func_80A1DB60(EnFu* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->csCtx.state == CS_STATE_IDLE) {
|
||||
this->actionFunc = EnFu_WaitAdult;
|
||||
gSaveContext.eventChkInf[5] |= 0x800;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_5B);
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
}
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ void func_80A1DBD4(EnFu* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.cutsceneTrigger = 1;
|
||||
Item_Give(globalCtx, ITEM_SONG_STORMS);
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_00;
|
||||
gSaveContext.eventChkInf[6] |= 0x20;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_65);
|
||||
} else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_02) {
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_24;
|
||||
this->actionFunc = EnFu_WaitAdult;
|
||||
|
@ -214,7 +214,7 @@ void EnFu_WaitAdult(EnFu* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if ((gSaveContext.eventChkInf[5] & 0x800)) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_5B)) {
|
||||
func_80A1D94C(this, globalCtx, 0x508E, func_80A1DBA0);
|
||||
} else if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
this->actor.textId = 0x5035;
|
||||
|
|
|
@ -141,7 +141,7 @@ static Vec3f sBottlesPositions[] = {
|
|||
};
|
||||
|
||||
void func_80A2F180(EnGb* this) {
|
||||
if (gSaveContext.infTable[0xB] & 0x40) {
|
||||
if (GET_INFTABLE(INFTABLE_B6)) {
|
||||
this->textId = 0x70F5;
|
||||
} else {
|
||||
this->textId = 0x70F4;
|
||||
|
@ -303,8 +303,8 @@ void func_80A2F83C(EnGb* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A2F94C(EnGb* this, GlobalContext* globalCtx) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
if (!(gSaveContext.infTable[0xB] & 0x40)) {
|
||||
gSaveContext.infTable[0xB] |= 0x40;
|
||||
if (!GET_INFTABLE(INFTABLE_B6)) {
|
||||
SET_INFTABLE(INFTABLE_B6);
|
||||
}
|
||||
func_80A2F180(this);
|
||||
this->actionFunc = func_80A2F83C;
|
||||
|
@ -313,8 +313,8 @@ void func_80A2F94C(EnGb* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A2F9C0(EnGb* this, GlobalContext* globalCtx) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
if (!(gSaveContext.infTable[0xB] & 0x40)) {
|
||||
gSaveContext.infTable[0xB] |= 0x40;
|
||||
if (!GET_INFTABLE(INFTABLE_B6)) {
|
||||
SET_INFTABLE(INFTABLE_B6);
|
||||
}
|
||||
func_80A2F180(this);
|
||||
Player_UpdateBottleHeld(globalCtx, GET_PLAYER(globalCtx), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
|
@ -325,8 +325,8 @@ void func_80A2F9C0(EnGb* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A2FA50(EnGb* this, GlobalContext* globalCtx) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(globalCtx)) {
|
||||
if (!(gSaveContext.infTable[0xB] & 0x40)) {
|
||||
gSaveContext.infTable[0xB] |= 0x40;
|
||||
if (!GET_INFTABLE(INFTABLE_B6)) {
|
||||
SET_INFTABLE(INFTABLE_B6);
|
||||
}
|
||||
func_80A2F180(this);
|
||||
Player_UpdateBottleHeld(globalCtx, GET_PLAYER(globalCtx), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
|
|
|
@ -152,7 +152,7 @@ void EnGe1_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// "Horseback archery Gerudo EVENT_INF(0) ="
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "やぶさめ ゲルド EVENT_INF(0) = %x\n" VT_RST, gSaveContext.eventInf[0]);
|
||||
|
||||
if (gSaveContext.eventInf[0] & 0x100) {
|
||||
if (GET_EVENTINF(EVENTINF_08)) {
|
||||
this->actionFunc = EnGe1_TalkAfterGame_Archery;
|
||||
} else if (EnGe1_CheckCarpentersFreed()) {
|
||||
this->actionFunc = EnGe1_Wait_Archery;
|
||||
|
@ -209,9 +209,10 @@ void EnGe1_SetAnimationIdle(EnGe1* this) {
|
|||
}
|
||||
|
||||
s32 EnGe1_CheckCarpentersFreed(void) {
|
||||
u16 carpenterFlags = gSaveContext.eventChkInf[9];
|
||||
u16 carpenterFlags = gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX];
|
||||
|
||||
if (!((carpenterFlags & 1) && (carpenterFlags & 2) && (carpenterFlags & 4) && (carpenterFlags & 8))) {
|
||||
if (!((carpenterFlags & EVENTCHKINF_90_MASK) && (carpenterFlags & EVENTCHKINF_91_MASK) &&
|
||||
(carpenterFlags & EVENTCHKINF_92_MASK) && (carpenterFlags & EVENTCHKINF_93_MASK))) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
@ -230,7 +231,7 @@ void EnGe1_KickPlayer(EnGe1* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
||||
globalCtx->nextEntranceIndex = 0x1A5;
|
||||
} else if (gSaveContext.eventChkInf[12] & 0x80) { // Caught previously
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_C7)) { // Caught previously
|
||||
globalCtx->nextEntranceIndex = 0x5F8;
|
||||
} else {
|
||||
globalCtx->nextEntranceIndex = 0x3B4;
|
||||
|
@ -496,9 +497,9 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnGe1_SetupWait_Archery;
|
||||
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
|
||||
gSaveContext.itemGetInf[0] |= 0x8000;
|
||||
SET_ITEMGETINF(ITEMGETINF_0F);
|
||||
} else {
|
||||
gSaveContext.infTable[25] |= 1;
|
||||
SET_INFTABLE(INFTABLE_190);
|
||||
}
|
||||
} else {
|
||||
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
|
||||
|
@ -584,8 +585,8 @@ void EnGe1_BeginGame_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.nextCutsceneIndex = 0xFFF0;
|
||||
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST);
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.eventInf[0] |= 0x100;
|
||||
gSaveContext.eventChkInf[6] |= 0x100;
|
||||
SET_EVENTINF(EVENTINF_08);
|
||||
SET_EVENTCHKINF(EVENTCHKINF_68);
|
||||
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
|
@ -626,7 +627,7 @@ void EnGe1_TalkNoPrize_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGe1_TalkAfterGame_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
||||
gSaveContext.eventInf[0] &= ~0x100;
|
||||
CLEAR_EVENTINF(EVENTINF_08);
|
||||
LOG_NUM("z_common_data.yabusame_total", gSaveContext.minigameScore, "../z_en_ge1.c", 1110);
|
||||
LOG_NUM("z_common_data.memory.information.room_inf[127][ 0 ]", HIGH_SCORE(HS_HBA), "../z_en_ge1.c", 1111);
|
||||
this->actor.flags |= ACTOR_FLAG_16;
|
||||
|
@ -638,14 +639,14 @@ void EnGe1_TalkAfterGame_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
if (gSaveContext.minigameScore < 1000) {
|
||||
this->actor.textId = 0x6045;
|
||||
this->actionFunc = EnGe1_TalkNoPrize_Archery;
|
||||
} else if (!(gSaveContext.infTable[25] & 1)) {
|
||||
} else if (!GET_INFTABLE(INFTABLE_190)) {
|
||||
this->actor.textId = 0x6046;
|
||||
this->actionFunc = EnGe1_TalkWinPrize_Archery;
|
||||
this->stateFlags &= ~GE1_STATE_GIVE_QUIVER;
|
||||
} else if (gSaveContext.minigameScore < 1500) {
|
||||
this->actor.textId = 0x6047;
|
||||
this->actionFunc = EnGe1_TalkNoPrize_Archery;
|
||||
} else if (gSaveContext.itemGetInf[0] & 0x8000) {
|
||||
} else if (GET_ITEMGETINF(ITEMGETINF_0F)) {
|
||||
this->actor.textId = 0x6047;
|
||||
this->actionFunc = EnGe1_TalkNoPrize_Archery;
|
||||
} else {
|
||||
|
@ -670,8 +671,8 @@ void EnGe1_Wait_Archery(EnGe1* this, GlobalContext* globalCtx) {
|
|||
if (!(player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
EnGe1_SetTalkAction(this, globalCtx, 0x603F, 100.0f, EnGe1_TalkNoHorse_Archery);
|
||||
} else {
|
||||
if (gSaveContext.eventChkInf[6] & 0x100) {
|
||||
if (gSaveContext.infTable[25] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_68)) {
|
||||
if (GET_INFTABLE(INFTABLE_190)) {
|
||||
textId = 0x6042;
|
||||
} else {
|
||||
textId = 0x6043;
|
||||
|
|
|
@ -223,7 +223,10 @@ s32 Ge2_DetectPlayerInUpdate(GlobalContext* globalCtx, EnGe2* this, Vec3f* pos,
|
|||
}
|
||||
|
||||
s32 EnGe2_CheckCarpentersFreed(void) {
|
||||
if ((u8)(gSaveContext.eventChkInf[9] & 0xF) == 0xF) {
|
||||
if (CHECK_FLAG_ALL(
|
||||
gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX] &
|
||||
(EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK | 0xF0),
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -239,7 +242,7 @@ void EnGe2_CaptureClose(EnGe2* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
||||
globalCtx->nextEntranceIndex = 0x1A5;
|
||||
} else if (gSaveContext.eventChkInf[12] & 0x80) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_C7)) {
|
||||
globalCtx->nextEntranceIndex = 0x5F8;
|
||||
} else {
|
||||
globalCtx->nextEntranceIndex = 0x3B4;
|
||||
|
@ -265,7 +268,7 @@ void EnGe2_CaptureCharge(EnGe2* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
||||
globalCtx->nextEntranceIndex = 0x1A5;
|
||||
} else if (gSaveContext.eventChkInf[12] & 0x80) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_C7)) {
|
||||
globalCtx->nextEntranceIndex = 0x5F8;
|
||||
} else {
|
||||
globalCtx->nextEntranceIndex = 0x3B4;
|
||||
|
|
|
@ -1577,7 +1577,7 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->timer == 0) {
|
||||
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
|
||||
globalCtx->nextEntranceIndex = 0x1A5;
|
||||
} else if (gSaveContext.eventChkInf[12] & 0x80) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_C7)) {
|
||||
globalCtx->nextEntranceIndex = 0x5F8;
|
||||
} else {
|
||||
globalCtx->nextEntranceIndex = 0x3B4;
|
||||
|
|
|
@ -316,55 +316,55 @@ void EnGirlA_SetupAction(EnGirlA* this, EnGirlAActionFunc func) {
|
|||
s32 EnGirlA_TryChangeShopItem(EnGirlA* this) {
|
||||
switch (this->actor.params) {
|
||||
case SI_MILK_BOTTLE:
|
||||
if (gSaveContext.itemGetInf[0] & 0x4) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_02)) {
|
||||
this->actor.params = SI_HEART;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_10_2:
|
||||
if (gSaveContext.itemGetInf[0] & 0x40) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_06)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_10_3:
|
||||
if (gSaveContext.itemGetInf[0] & 0x80) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_07)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_20_3:
|
||||
if (gSaveContext.itemGetInf[0] & 0x100) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_08)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_20_4:
|
||||
if (gSaveContext.itemGetInf[0] & 0x200) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_09)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_10_4:
|
||||
if (gSaveContext.itemGetInf[0] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_0A)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_10_1:
|
||||
if (gSaveContext.itemGetInf[0] & 0x8) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_03)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_20_1:
|
||||
if (gSaveContext.itemGetInf[0] & 0x10) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_04)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case SI_BOMBCHU_20_2:
|
||||
if (gSaveContext.itemGetInf[0] & 0x20) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_05)) {
|
||||
this->actor.params = SI_SOLD_OUT;
|
||||
return true;
|
||||
}
|
||||
|
@ -842,7 +842,7 @@ void EnGirlA_ItemGive_BottledItem(GlobalContext* globalCtx, EnGirlA* this) {
|
|||
|
||||
void EnGirlA_BuyEvent_ShieldDiscount(GlobalContext* globalCtx, EnGirlA* this) {
|
||||
if (this->actor.params == SI_HYLIAN_SHIELD) {
|
||||
if (gSaveContext.infTable[7] & 0x40) {
|
||||
if (GET_INFTABLE(INFTABLE_76)) {
|
||||
Rupees_ChangeBy(-(this->basePrice - sShieldDiscounts[(s32)Rand_ZeroFloat(7.9f)]));
|
||||
return;
|
||||
}
|
||||
|
@ -861,28 +861,28 @@ void EnGirlA_BuyEvent_ZoraTunic(GlobalContext* globalCtx, EnGirlA* this) {
|
|||
void EnGirlA_BuyEvent_ObtainBombchuPack(GlobalContext* globalCtx, EnGirlA* this) {
|
||||
switch (this->actor.params) {
|
||||
case SI_BOMBCHU_10_2:
|
||||
gSaveContext.itemGetInf[0] |= 0x40;
|
||||
SET_ITEMGETINF(ITEMGETINF_06);
|
||||
break;
|
||||
case SI_BOMBCHU_10_3:
|
||||
gSaveContext.itemGetInf[0] |= 0x80;
|
||||
SET_ITEMGETINF(ITEMGETINF_07);
|
||||
break;
|
||||
case SI_BOMBCHU_20_3:
|
||||
gSaveContext.itemGetInf[0] |= 0x100;
|
||||
SET_ITEMGETINF(ITEMGETINF_08);
|
||||
break;
|
||||
case SI_BOMBCHU_20_4:
|
||||
gSaveContext.itemGetInf[0] |= 0x200;
|
||||
SET_ITEMGETINF(ITEMGETINF_09);
|
||||
break;
|
||||
case SI_BOMBCHU_10_4:
|
||||
gSaveContext.itemGetInf[0] |= 0x400;
|
||||
SET_ITEMGETINF(ITEMGETINF_0A);
|
||||
break;
|
||||
case SI_BOMBCHU_10_1:
|
||||
gSaveContext.itemGetInf[0] |= 0x8;
|
||||
SET_ITEMGETINF(ITEMGETINF_03);
|
||||
break;
|
||||
case SI_BOMBCHU_20_1:
|
||||
gSaveContext.itemGetInf[0] |= 0x10;
|
||||
SET_ITEMGETINF(ITEMGETINF_04);
|
||||
break;
|
||||
case SI_BOMBCHU_20_2:
|
||||
gSaveContext.itemGetInf[0] |= 0x20;
|
||||
SET_ITEMGETINF(ITEMGETINF_05);
|
||||
break;
|
||||
}
|
||||
Rupees_ChangeBy(-this->basePrice);
|
||||
|
@ -902,27 +902,27 @@ void EnGirlA_SetItemDescription(GlobalContext* globalCtx, EnGirlA* this) {
|
|||
isMaskFreeToBorrow = false;
|
||||
switch (this->actor.params) {
|
||||
case SI_KEATON_MASK:
|
||||
if (gSaveContext.itemGetInf[3] & 0x100) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_38)) {
|
||||
isMaskFreeToBorrow = true;
|
||||
}
|
||||
break;
|
||||
case SI_SPOOKY_MASK:
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
isMaskFreeToBorrow = true;
|
||||
}
|
||||
break;
|
||||
case SI_SKULL_MASK:
|
||||
if (gSaveContext.itemGetInf[3] & 0x200) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_39)) {
|
||||
isMaskFreeToBorrow = true;
|
||||
}
|
||||
break;
|
||||
case SI_BUNNY_HOOD:
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
|
||||
isMaskFreeToBorrow = true;
|
||||
}
|
||||
break;
|
||||
case SI_MASK_OF_TRUTH:
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
|
||||
isMaskFreeToBorrow = true;
|
||||
}
|
||||
break;
|
||||
|
@ -984,7 +984,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, GlobalContext* globalCtx) {
|
|||
this->actor.objBankIndex = this->objBankIndex;
|
||||
switch (this->actor.params) {
|
||||
case SI_KEATON_MASK:
|
||||
if (gSaveContext.itemGetInf[3] & 0x100) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_38)) {
|
||||
this->actor.textId = 0x70B6;
|
||||
} else {
|
||||
this->actor.textId = itemEntry->itemDescTextId;
|
||||
|
@ -992,7 +992,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, GlobalContext* globalCtx) {
|
|||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||
break;
|
||||
case SI_SPOOKY_MASK:
|
||||
if (gSaveContext.itemGetInf[3] & 0x400) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
|
||||
this->actor.textId = 0x70B5;
|
||||
} else {
|
||||
this->actor.textId = itemEntry->itemDescTextId;
|
||||
|
@ -1000,7 +1000,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, GlobalContext* globalCtx) {
|
|||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||
break;
|
||||
case SI_SKULL_MASK:
|
||||
if (gSaveContext.itemGetInf[3] & 0x200) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_39)) {
|
||||
this->actor.textId = 0x70B4;
|
||||
} else {
|
||||
this->actor.textId = itemEntry->itemDescTextId;
|
||||
|
@ -1008,7 +1008,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, GlobalContext* globalCtx) {
|
|||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||
break;
|
||||
case SI_BUNNY_HOOD:
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
|
||||
this->actor.textId = 0x70B7;
|
||||
} else {
|
||||
this->actor.textId = itemEntry->itemDescTextId;
|
||||
|
@ -1016,7 +1016,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, GlobalContext* globalCtx) {
|
|||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||
break;
|
||||
case SI_MASK_OF_TRUTH:
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
|
||||
this->actor.textId = 0x70BB;
|
||||
this->itemBuyPromptTextId = itemEntry->itemBuyPromptTextId;
|
||||
} else {
|
||||
|
|
|
@ -141,14 +141,14 @@ void EnGm_UpdateEye(EnGm* this) {
|
|||
void EnGm_SetTextID(EnGm* this) {
|
||||
switch (func_80A3D7C8()) {
|
||||
case 0:
|
||||
if (gSaveContext.infTable[11] & 1) {
|
||||
if (GET_INFTABLE(INFTABLE_B0)) {
|
||||
this->actor.textId = 0x304B;
|
||||
} else {
|
||||
this->actor.textId = 0x304A;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (gSaveContext.infTable[11] & 2) {
|
||||
if (GET_INFTABLE(INFTABLE_B1)) {
|
||||
this->actor.textId = 0x304F;
|
||||
} else {
|
||||
this->actor.textId = 0x304C;
|
||||
|
@ -202,12 +202,12 @@ void func_80A3DC44(EnGm* this, GlobalContext* globalCtx) {
|
|||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
switch (func_80A3D7C8()) {
|
||||
case 0:
|
||||
gSaveContext.infTable[11] |= 1;
|
||||
SET_INFTABLE(INFTABLE_B0);
|
||||
case 3:
|
||||
this->actionFunc = func_80A3DD7C;
|
||||
return;
|
||||
case 1:
|
||||
gSaveContext.infTable[11] |= 2;
|
||||
SET_INFTABLE(INFTABLE_B1);
|
||||
case 2:
|
||||
this->actionFunc = EnGm_ProcessChoiceIndex;
|
||||
default:
|
||||
|
|
|
@ -112,20 +112,20 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
}
|
||||
case 0x00:
|
||||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) {
|
||||
if (gSaveContext.infTable[16] & 0x8000) {
|
||||
if (GET_INFTABLE(INFTABLE_10F)) {
|
||||
return 0x3042;
|
||||
} else {
|
||||
return 0x3041;
|
||||
}
|
||||
} else if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1) || (gSaveContext.infTable[16] & 0x2000)) {
|
||||
if (gSaveContext.infTable[16] & 0x4000) {
|
||||
} else if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1) || GET_INFTABLE(INFTABLE_10D)) {
|
||||
if (GET_INFTABLE(INFTABLE_10E)) {
|
||||
return 0x3038;
|
||||
} else {
|
||||
return 0x3037;
|
||||
}
|
||||
} else {
|
||||
if (gSaveContext.infTable[16] & 0x200) {
|
||||
if (gSaveContext.infTable[16] & 0x400) {
|
||||
if (GET_INFTABLE(INFTABLE_109)) {
|
||||
if (GET_INFTABLE(INFTABLE_10A)) {
|
||||
return 0x3033;
|
||||
} else {
|
||||
return 0x3032;
|
||||
|
@ -143,9 +143,9 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case 0x20:
|
||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else if (gSaveContext.eventChkInf[2] & 0x8) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_23)) {
|
||||
return 0x3021;
|
||||
} else if (gSaveContext.infTable[14] & 0x1) {
|
||||
} else if (GET_INFTABLE(INFTABLE_E0)) {
|
||||
return 0x302A;
|
||||
} else {
|
||||
return 0x3008;
|
||||
|
@ -153,7 +153,7 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case 0x30:
|
||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else if (gSaveContext.eventChkInf[2] & 0x8) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_23)) {
|
||||
return 0x3026;
|
||||
} else {
|
||||
return 0x3009;
|
||||
|
@ -161,7 +161,7 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case 0x40:
|
||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else if (gSaveContext.eventChkInf[2] & 0x8) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_23)) {
|
||||
return 0x3026;
|
||||
} else {
|
||||
return 0x300A;
|
||||
|
@ -169,7 +169,7 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case 0x50:
|
||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else if (gSaveContext.infTable[15] & 1) {
|
||||
} else if (GET_INFTABLE(INFTABLE_F0)) {
|
||||
return 0x3015;
|
||||
} else {
|
||||
return 0x3014;
|
||||
|
@ -177,7 +177,7 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case 0x60:
|
||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else if (gSaveContext.infTable[15] & 0x10) {
|
||||
} else if (GET_INFTABLE(INFTABLE_F4)) {
|
||||
return 0x3017;
|
||||
} else {
|
||||
return 0x3016;
|
||||
|
@ -185,7 +185,7 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case 0x70:
|
||||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else if (gSaveContext.infTable[15] & 0x100) {
|
||||
} else if (GET_INFTABLE(INFTABLE_F8)) {
|
||||
return 0x3019;
|
||||
} else {
|
||||
return 0x3018;
|
||||
|
@ -206,36 +206,36 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case TEXT_STATE_CLOSING:
|
||||
switch (thisx->textId) {
|
||||
case 0x3008:
|
||||
gSaveContext.infTable[14] |= 1;
|
||||
SET_INFTABLE(INFTABLE_E0);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x300B:
|
||||
gSaveContext.infTable[14] |= 0x800;
|
||||
SET_INFTABLE(INFTABLE_EB);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x3014:
|
||||
gSaveContext.infTable[15] |= 1;
|
||||
SET_INFTABLE(INFTABLE_F0);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x3016:
|
||||
gSaveContext.infTable[15] |= 0x10;
|
||||
SET_INFTABLE(INFTABLE_F4);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x3018:
|
||||
gSaveContext.infTable[15] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_F8);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x3036:
|
||||
func_8002F434(thisx, globalCtx, GI_TUNIC_GORON, xzRange, yRange);
|
||||
gSaveContext.infTable[16] |= 0x2000; // EnGo exclusive flag
|
||||
SET_INFTABLE(INFTABLE_10D); // EnGo exclusive flag
|
||||
unkState = 2;
|
||||
break;
|
||||
case 0x3037:
|
||||
gSaveContext.infTable[16] |= 0x4000;
|
||||
SET_INFTABLE(INFTABLE_10E);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x3041:
|
||||
gSaveContext.infTable[16] |= 0x8000;
|
||||
SET_INFTABLE(INFTABLE_10F);
|
||||
unkState = 0;
|
||||
break;
|
||||
case 0x3059:
|
||||
|
@ -260,7 +260,7 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
switch (thisx->textId) {
|
||||
case 0x300A:
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
if (CUR_UPG_VALUE(UPG_STRENGTH) != 0 || (gSaveContext.infTable[14] & 0x800)) {
|
||||
if (CUR_UPG_VALUE(UPG_STRENGTH) != 0 || GET_INFTABLE(INFTABLE_EB)) {
|
||||
thisx->textId = 0x300B;
|
||||
} else {
|
||||
thisx->textId = 0x300C;
|
||||
|
@ -273,12 +273,12 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
break;
|
||||
case 0x3034:
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
if (gSaveContext.infTable[16] & 0x800) {
|
||||
if (GET_INFTABLE(INFTABLE_10B)) {
|
||||
thisx->textId = 0x3033;
|
||||
} else {
|
||||
thisx->textId = 0x3035;
|
||||
}
|
||||
} else if (gSaveContext.infTable[16] & 0x800) {
|
||||
} else if (GET_INFTABLE(INFTABLE_10B)) {
|
||||
thisx->textId = 0x3036;
|
||||
} else {
|
||||
thisx->textId = 0x3033;
|
||||
|
@ -295,7 +295,7 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
Message_ContinueTextbox(globalCtx, thisx->textId);
|
||||
unkState = 1;
|
||||
}
|
||||
gSaveContext.infTable[11] |= 0x10;
|
||||
SET_INFTABLE(INFTABLE_B4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
|||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (thisx->textId) {
|
||||
case 0x3035:
|
||||
gSaveContext.infTable[16] |= 0x800;
|
||||
SET_INFTABLE(INFTABLE_10B);
|
||||
case 0x3032:
|
||||
case 0x3033:
|
||||
thisx->textId = 0x3034;
|
||||
|
@ -595,7 +595,7 @@ void func_80A3F908(EnGo* this, GlobalContext* globalCtx) {
|
|||
if (((this->actor.params & 0xF0) == 0x90) && (isUnkCondition == true)) {
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_SWORD_BROKEN) {
|
||||
if (func_8002F368(globalCtx) == EXCH_ITEM_SWORD_BROKEN) {
|
||||
if (gSaveContext.infTable[11] & 0x10) {
|
||||
if (GET_INFTABLE(INFTABLE_B4)) {
|
||||
this->actor.textId = 0x3055;
|
||||
} else {
|
||||
this->actor.textId = 0x3054;
|
||||
|
@ -663,7 +663,7 @@ void EnGo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnGo_SetupAction(this, EnGo_FireGenericActionFunc);
|
||||
break;
|
||||
case 0x40:
|
||||
if (gSaveContext.infTable[14] & 0x800) {
|
||||
if (GET_INFTABLE(INFTABLE_EB)) {
|
||||
EnGo_SetMovedPos(this, globalCtx);
|
||||
}
|
||||
Actor_SetScale(&this->actor, 0.015f);
|
||||
|
@ -751,7 +751,7 @@ void EnGo_GoronLinkRolling(EnGo* this, GlobalContext* globalCtx) {
|
|||
(this->unk_218 == 0)) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
EnGo_SetupAction(this, func_80A4008C);
|
||||
gSaveContext.infTable[16] |= 0x200;
|
||||
SET_INFTABLE(INFTABLE_109);
|
||||
}
|
||||
|
||||
this->actor.shape.rot = this->actor.world.rot;
|
||||
|
@ -846,7 +846,7 @@ void func_80A405CC(EnGo* this, GlobalContext* globalCtx) {
|
|||
this->skelAnime.curFrame = lastFrame;
|
||||
this->skelAnime.playSpeed = 0.0f;
|
||||
this->unk_212 = Rand_S16Offset(30, 30);
|
||||
if (((this->actor.params & 0xF0) == 0x40) && ((gSaveContext.infTable[14] & 0x800) == 0)) {
|
||||
if (((this->actor.params & 0xF0) == 0x40) && !GET_INFTABLE(INFTABLE_EB)) {
|
||||
EnGo_SetupAction(this, func_80A40B1C);
|
||||
} else {
|
||||
EnGo_SetupAction(this, EnGo_BiggoronActionFunc);
|
||||
|
@ -933,7 +933,7 @@ void func_80A40A54(EnGo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A40B1C(EnGo* this, GlobalContext* globalCtx) {
|
||||
if (gSaveContext.infTable[14] & 0x800) {
|
||||
if (GET_INFTABLE(INFTABLE_EB)) {
|
||||
EnGo_ChangeAnim(this, ENGO_ANIM_3);
|
||||
EnGo_SetupAction(this, func_80A40A54);
|
||||
} else {
|
||||
|
|
|
@ -8,27 +8,28 @@
|
|||
/*
|
||||
FLAGS
|
||||
|
||||
gSaveContext.eventChkInf[2] & 0x8 - DC entrance boulder blown up as child
|
||||
EVENTCHKINF_23 - DC entrance boulder blown up as child
|
||||
|
||||
InfTable
|
||||
|
||||
gSaveContext.infTable[11] & 0x10
|
||||
gSaveContext.infTable[14] & 0x1 - Talked to DMT Goron at DC entrance (Before DC is opened as child)
|
||||
gSaveContext.infTable[14] & 0x8 - Talked to GC Goron in bottom level stairwell
|
||||
gSaveContext.infTable[14] & 0x40 - Talked to GC Goron at LW entrance (Before LW shortcut is opened)
|
||||
gSaveContext.infTable[14] & 0x800 - Talked to DMT Goron at Bomb Flower with goron bracelet
|
||||
gSaveContext.infTable[15] & 0x1 - Talked to Goron at GC Entrance (Before goron ruby is obtained)
|
||||
gSaveContext.infTable[15] & 0x10 - Talked to Goron at GC Island (Before goron ruby is obtained)
|
||||
gSaveContext.infTable[15] & 0x100 - (not on cloud modding) Talked to GC Goron outside Darunias door (after opening door,
|
||||
before getting goron bracelet) gSaveContext.infTable[16] & 0x200 - Obtained Fire Tunic from Goron Link
|
||||
gSaveContext.infTable[16] & 0x400 - (not on cloud modding)
|
||||
gSaveContext.infTable[16] & 0x800 - Spoke to Goron Link About Volvagia
|
||||
gSaveContext.infTable[16] & 0x1000 - Stopped Goron Link's Rolling
|
||||
gSaveContext.infTable[16] & 0x2000 - EnGo Exclusive
|
||||
gSaveContext.infTable[16] & 0x4000 - Spoke to Goron Link
|
||||
gSaveContext.infTable[16] & 0x8000 - (not on cloud modding)
|
||||
INFTABLE_B4
|
||||
INFTABLE_E0 - Talked to DMT Goron at DC entrance (Before DC is opened as child)
|
||||
INFTABLE_E3 - Talked to GC Goron in bottom level stairwell
|
||||
INFTABLE_E6 - Talked to GC Goron at LW entrance (Before LW shortcut is opened)
|
||||
INFTABLE_EB - Talked to DMT Goron at Bomb Flower with goron bracelet
|
||||
INFTABLE_F0 - Talked to Goron at GC Entrance (Before goron ruby is obtained)
|
||||
INFTABLE_F4 - Talked to Goron at GC Island (Before goron ruby is obtained)
|
||||
INFTABLE_F8 - (not on cloud modding) Talked to GC Goron outside Darunias door (after opening door,
|
||||
before getting goron bracelet)
|
||||
INFTABLE_109 - Obtained Fire Tunic from Goron Link
|
||||
INFTABLE_10A - (not on cloud modding)
|
||||
INFTABLE_10B - Spoke to Goron Link About Volvagia
|
||||
INFTABLE_10C - Stopped Goron Link's Rolling
|
||||
INFTABLE_10D - EnGo Exclusive
|
||||
INFTABLE_10E - Spoke to Goron Link
|
||||
INFTABLE_10F - (not on cloud modding)
|
||||
|
||||
gSaveContext.infTable[17] & 0x4000 - Bomb bag upgrade obtained from rolling Goron
|
||||
INFTABLE_11E - Bomb bag upgrade obtained from rolling Goron
|
||||
|
||||
EnGo
|
||||
pathIndex: this->actor.params & 0xF
|
||||
|
@ -322,7 +323,7 @@ u16 EnGo2_GoronFireGenericGetTextId(EnGo2* this) {
|
|||
}
|
||||
|
||||
u16 EnGo2_GetTextIdGoronCityRollingBig(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (gSaveContext.infTable[17] & 0x4000) {
|
||||
if (GET_INFTABLE(INFTABLE_11E)) {
|
||||
return 0x3013;
|
||||
} else if (CUR_CAPACITY(UPG_BOMB_BAG) >= 20 && this->waypoint > 7 && this->waypoint < 12) {
|
||||
return 0x3012;
|
||||
|
@ -344,7 +345,7 @@ s16 EnGo2_GetStateGoronCityRollingBig(GlobalContext* globalCtx, EnGo2* this) {
|
|||
bombBagUpgrade = CUR_CAPACITY(UPG_BOMB_BAG) == 30 ? GI_BOMB_BAG_40 : GI_BOMB_BAG_30;
|
||||
EnGo2_GetItem(this, globalCtx, bombBagUpgrade);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
gSaveContext.infTable[17] |= 0x4000;
|
||||
SET_INFTABLE(INFTABLE_11E);
|
||||
return 2;
|
||||
} else {
|
||||
return 2;
|
||||
|
@ -363,8 +364,8 @@ u16 EnGo2_GetTextIdGoronDmtBombFlower(GlobalContext* globalCtx, EnGo2* this) {
|
|||
s16 EnGo2_GetStateGoronDmtBombFlower(GlobalContext* globalCtx, EnGo2* this) {
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
if ((this->actor.textId == 0x300B) && (gSaveContext.infTable[14] & 0x800) == 0) {
|
||||
gSaveContext.infTable[14] |= 0x800;
|
||||
if ((this->actor.textId == 0x300B) && !GET_INFTABLE(INFTABLE_EB)) {
|
||||
SET_INFTABLE(INFTABLE_EB);
|
||||
return 2;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -391,7 +392,7 @@ u16 EnGo2_GetTextIdGoronDmtRollingSmall(GlobalContext* globalCtx, EnGo2* this) {
|
|||
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else {
|
||||
return (gSaveContext.eventChkInf[2] & 0x8) ? 0x3026 : 0x3009;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_23) ? 0x3026 : 0x3009;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -409,14 +410,14 @@ u16 EnGo2_GetTextIdGoronDmtDcEntrance(GlobalContext* globalCtx, EnGo2* this) {
|
|||
} else if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else {
|
||||
return gSaveContext.eventChkInf[2] & 0x8 ? 0x3021 : gSaveContext.infTable[14] & 0x1 ? 0x302A : 0x3008;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_23) ? 0x3021 : GET_INFTABLE(INFTABLE_E0) ? 0x302A : 0x3008;
|
||||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronDmtDcEntrance(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3008) {
|
||||
gSaveContext.infTable[14] |= 0x1;
|
||||
SET_INFTABLE(INFTABLE_E0);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -430,14 +431,14 @@ u16 EnGo2_GetTextIdGoronCityEntrance(GlobalContext* globalCtx, EnGo2* this) {
|
|||
} else if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3027;
|
||||
} else {
|
||||
return gSaveContext.infTable[15] & 0x1 ? 0x3015 : 0x3014;
|
||||
return GET_INFTABLE(INFTABLE_F0) ? 0x3015 : 0x3014;
|
||||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityEntrance(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3014) {
|
||||
gSaveContext.infTable[15] |= 0x1;
|
||||
SET_INFTABLE(INFTABLE_F0);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -451,14 +452,14 @@ u16 EnGo2_GetTextIdGoronCityIsland(GlobalContext* globalCtx, EnGo2* this) {
|
|||
} else if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
|
||||
return 0x3067;
|
||||
} else {
|
||||
return gSaveContext.infTable[15] & 0x10 ? 0x3017 : 0x3016;
|
||||
return GET_INFTABLE(INFTABLE_F4) ? 0x3017 : 0x3016;
|
||||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityIsland(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3016) {
|
||||
gSaveContext.infTable[15] |= 0x10;
|
||||
SET_INFTABLE(INFTABLE_F4);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -474,7 +475,7 @@ u16 EnGo2_GetTextIdGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) {
|
|||
} else {
|
||||
return CUR_UPG_VALUE(UPG_STRENGTH) != 0 ? 0x302C
|
||||
: !Flags_GetSwitch(globalCtx, 0x1B) ? 0x3017
|
||||
: gSaveContext.infTable[15] & 0x100 ? 0x3019
|
||||
: GET_INFTABLE(INFTABLE_F8) ? 0x3019
|
||||
: 0x3018;
|
||||
}
|
||||
}
|
||||
|
@ -482,7 +483,7 @@ u16 EnGo2_GetTextIdGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) {
|
|||
s16 EnGo2_GetStateGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3018) {
|
||||
gSaveContext.infTable[15] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_F8);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -492,13 +493,13 @@ s16 EnGo2_GetStateGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) {
|
|||
|
||||
u16 EnGo2_GetTextIdGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) {
|
||||
return gSaveContext.infTable[16] & 0x8000 ? 0x3042 : 0x3041;
|
||||
return GET_INFTABLE(INFTABLE_10F) ? 0x3042 : 0x3041;
|
||||
} else if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
return gSaveContext.infTable[16] & 0x4000 ? 0x3038 : 0x3037;
|
||||
} else if (gSaveContext.infTable[16] & 0x1000) {
|
||||
return GET_INFTABLE(INFTABLE_10E) ? 0x3038 : 0x3037;
|
||||
} else if (GET_INFTABLE(INFTABLE_10C)) {
|
||||
this->unk_20C = 0;
|
||||
this->dialogState = TEXT_STATE_NONE;
|
||||
return gSaveContext.infTable[16] & 0x400 ? 0x3033 : 0x3032;
|
||||
return GET_INFTABLE(INFTABLE_10A) ? 0x3033 : 0x3032;
|
||||
} else {
|
||||
return 0x3030;
|
||||
}
|
||||
|
@ -513,7 +514,7 @@ s16 EnGo2_GetStateGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
|||
this->actionFunc = EnGo2_SetupGetItem;
|
||||
return 2;
|
||||
case 0x3037:
|
||||
gSaveContext.infTable[16] |= 0x4000;
|
||||
SET_INFTABLE(INFTABLE_10E);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -521,12 +522,12 @@ s16 EnGo2_GetStateGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
|||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->actor.textId == 0x3034) {
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
this->actor.textId = gSaveContext.infTable[16] & 0x800 ? 0x3033 : 0x3035;
|
||||
this->actor.textId = GET_INFTABLE(INFTABLE_10B) ? 0x3033 : 0x3035;
|
||||
if (this->actor.textId == 0x3035) {
|
||||
Audio_StopSfxById(NA_SE_EN_GOLON_CRY);
|
||||
}
|
||||
} else {
|
||||
this->actor.textId = gSaveContext.infTable[16] & 0x800 ? 0x3036 : 0x3033;
|
||||
this->actor.textId = GET_INFTABLE(INFTABLE_10B) ? 0x3036 : 0x3033;
|
||||
if (this->actor.textId == 0x3036) {
|
||||
Audio_StopSfxById(NA_SE_EN_GOLON_CRY);
|
||||
}
|
||||
|
@ -542,7 +543,7 @@ s16 EnGo2_GetStateGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
|
|||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x3035:
|
||||
gSaveContext.infTable[16] |= 0x800;
|
||||
SET_INFTABLE(INFTABLE_10B);
|
||||
case 0x3032:
|
||||
case 0x3033:
|
||||
this->actor.textId = 0x3034;
|
||||
|
@ -660,13 +661,13 @@ s16 EnGo2_GetStateGoronFireGeneric(GlobalContext* globalCtx, EnGo2* this) {
|
|||
}
|
||||
|
||||
u16 EnGo2_GetTextIdGoronCityStairwell(GlobalContext* globalCtx, EnGo2* this) {
|
||||
return !LINK_IS_ADULT ? gSaveContext.infTable[14] & 0x8 ? 0x3022 : 0x300E : 0x3043;
|
||||
return !LINK_IS_ADULT ? GET_INFTABLE(INFTABLE_E3) ? 0x3022 : 0x300E : 0x3043;
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityStairwell(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x300E) {
|
||||
gSaveContext.infTable[14] |= 0x8;
|
||||
SET_INFTABLE(INFTABLE_E3);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -692,7 +693,7 @@ u16 EnGo2_GetTextIdGoronCityLostWoods(GlobalContext* globalCtx, EnGo2* this) {
|
|||
if (Flags_GetSwitch(globalCtx, 0x1C)) {
|
||||
return 0x302F;
|
||||
} else {
|
||||
return gSaveContext.infTable[14] & 0x40 ? 0x3025 : 0x3024;
|
||||
return GET_INFTABLE(INFTABLE_E6) ? 0x3025 : 0x3024;
|
||||
}
|
||||
} else {
|
||||
return 0x3043;
|
||||
|
@ -702,7 +703,7 @@ u16 EnGo2_GetTextIdGoronCityLostWoods(GlobalContext* globalCtx, EnGo2* this) {
|
|||
s16 EnGo2_GetStateGoronCityLostWoods(GlobalContext* globalCtx, EnGo2* this) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3024) {
|
||||
gSaveContext.infTable[14] |= 0x40;
|
||||
SET_INFTABLE(INFTABLE_E6);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -1052,7 +1053,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, GlobalContext* globalCtx, Player* play
|
|||
|
||||
} else if (INV_CONTENT(ITEM_TRADE_ADULT) <= ITEM_SWORD_BROKEN) {
|
||||
if (func_8002F368(globalCtx) == EXCH_ITEM_SWORD_BROKEN) {
|
||||
if (gSaveContext.infTable[11] & 0x10) {
|
||||
if (GET_INFTABLE(INFTABLE_B4)) {
|
||||
textId = 0x3055;
|
||||
} else {
|
||||
textId = 0x3054;
|
||||
|
@ -1327,7 +1328,7 @@ void EnGo2_GetItemAnimation(EnGo2* this, GlobalContext* globalCtx) {
|
|||
void EnGo2_SetupRolling(EnGo2* this, GlobalContext* globalCtx) {
|
||||
if ((this->actor.params & 0x1F) == GORON_CITY_ROLLING_BIG || (this->actor.params & 0x1F) == GORON_CITY_LINK) {
|
||||
this->collider.info.bumperFlags = 1;
|
||||
this->actor.speedXZ = gSaveContext.infTable[17] & 0x4000 ? 6.0f : 3.6000001f;
|
||||
this->actor.speedXZ = GET_INFTABLE(INFTABLE_11E) ? 6.0f : 3.6000001f;
|
||||
} else {
|
||||
this->actor.speedXZ = 6.0f;
|
||||
}
|
||||
|
@ -1548,7 +1549,7 @@ void EnGo2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnGo2_GetItemAnimation(this, globalCtx);
|
||||
break;
|
||||
case GORON_CITY_LINK:
|
||||
if ((gSaveContext.infTable[16] & 0x200)) {
|
||||
if (GET_INFTABLE(INFTABLE_109)) {
|
||||
Path_CopyLastPoint(this->path, &this->actor.world.pos);
|
||||
this->actor.home.pos = this->actor.world.pos;
|
||||
if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE) && CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
|
||||
|
@ -1557,7 +1558,7 @@ void EnGo2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnGo2_CurledUp;
|
||||
}
|
||||
} else {
|
||||
gSaveContext.infTable[16] &= ~0x1000;
|
||||
CLEAR_INFTABLE(INFTABLE_10C);
|
||||
this->collider.dim.height = (D_80A4816C[this->actor.params & 0x1F].height * 0.6f);
|
||||
EnGo2_SetupRolling(this, globalCtx);
|
||||
this->isAwake = true;
|
||||
|
@ -1588,7 +1589,7 @@ void EnGo2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnGo2_CurledUp;
|
||||
break;
|
||||
case GORON_DMT_BOMB_FLOWER:
|
||||
if (gSaveContext.infTable[14] & 0x800) {
|
||||
if (GET_INFTABLE(INFTABLE_EB)) {
|
||||
Path_CopyLastPoint(this->path, &this->actor.world.pos);
|
||||
this->actor.home.pos = this->actor.world.pos;
|
||||
}
|
||||
|
@ -1782,7 +1783,7 @@ void EnGo2_SetGetItem(EnGo2* this, GlobalContext* globalCtx) {
|
|||
EnGo2_GetItemAnimation(this, globalCtx);
|
||||
return;
|
||||
case GI_TUNIC_GORON:
|
||||
gSaveContext.infTable[16] |= 0x200;
|
||||
SET_INFTABLE(INFTABLE_109);
|
||||
EnGo2_GetItemAnimation(this, globalCtx);
|
||||
return;
|
||||
case GI_SWORD_BGS:
|
||||
|
@ -1866,7 +1867,7 @@ void EnGo2_GoronLinkStopRolling(EnGo2* this, GlobalContext* globalCtx) {
|
|||
if (Message_GetState(&globalCtx->msgCtx) != TEXT_STATE_CLOSING) {
|
||||
player->actor.freezeTimer = 10;
|
||||
} else {
|
||||
gSaveContext.infTable[16] |= 0x1000;
|
||||
SET_INFTABLE(INFTABLE_10C);
|
||||
this->unk_26E = 1;
|
||||
this->unk_211 = false;
|
||||
this->isAwake = false;
|
||||
|
|
|
@ -52,7 +52,7 @@ static InitChainEntry sInitChain[] = {
|
|||
void EnGuest_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnGuest* this = (EnGuest*)thisx;
|
||||
|
||||
if (gSaveContext.infTable[7] & 0x40) {
|
||||
if (GET_INFTABLE(INFTABLE_76)) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
this->osAnimeBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_OS_ANIME);
|
||||
|
|
|
@ -112,13 +112,13 @@ void EnHeishi1_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->type != 5) {
|
||||
if (((gSaveContext.dayTime < 0xB888) || IS_DAY) && !(gSaveContext.eventChkInf[8] & 1)) {
|
||||
if (((gSaveContext.dayTime < 0xB888) || IS_DAY) && !GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
this->actionFunc = EnHeishi1_SetupWalk;
|
||||
} else {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
} else {
|
||||
if ((gSaveContext.dayTime >= 0xB889) || !IS_DAY || (gSaveContext.eventChkInf[8] & 1)) {
|
||||
if ((gSaveContext.dayTime >= 0xB889) || !IS_DAY || GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
this->actionFunc = EnHeishi1_SetupWaitNight;
|
||||
} else {
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -347,7 +347,7 @@ void EnHeishi1_Kick(EnHeishi1* this, GlobalContext* globalCtx) {
|
|||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
if (!this->loadStarted) {
|
||||
gSaveContext.eventChkInf[4] |= 0x4000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4E);
|
||||
globalCtx->nextEntranceIndex = 0x4FA;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
this->loadStarted = true;
|
||||
|
|
|
@ -189,8 +189,7 @@ void func_80A53278(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
this->unk_30B = 1;
|
||||
this->unk_300 = TEXT_STATE_DONE;
|
||||
this->actionFunc = func_80A5475C;
|
||||
} else if ((gSaveContext.eventChkInf[0] & 0x200) && (gSaveContext.eventChkInf[2] & 0x20) &&
|
||||
(gSaveContext.eventChkInf[3] & 0x80)) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_09) && GET_EVENTCHKINF(EVENTCHKINF_25) && GET_EVENTCHKINF(EVENTCHKINF_37)) {
|
||||
// "Get all spiritual stones!"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 全部の精霊石GET! ☆☆☆☆☆ \n" VT_RST);
|
||||
this->unk_300 = TEXT_STATE_DONE;
|
||||
|
@ -209,7 +208,7 @@ void func_80A53278(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
this->unk_300 = TEXT_STATE_DONE;
|
||||
this->actor.textId = 0x7099;
|
||||
this->actionFunc = func_80A5475C;
|
||||
} else if (gSaveContext.eventChkInf[1] & 4) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_12)) {
|
||||
if (this->unk_30E == 0) {
|
||||
// "Start under the first sleeve!"
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ 1回目袖の下開始! ☆☆☆☆☆ \n" VT_RST);
|
||||
|
@ -352,8 +351,8 @@ void func_80A5399C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
|
||||
this->unk_30B = 0;
|
||||
var = 0;
|
||||
if (gSaveContext.infTable[7] & 0x40) {
|
||||
if (!(gSaveContext.infTable[7] & 0x80)) {
|
||||
if (GET_INFTABLE(INFTABLE_76)) {
|
||||
if (!GET_INFTABLE(INFTABLE_77)) {
|
||||
if (Player_GetMask(globalCtx) == PLAYER_MASK_KEATON) {
|
||||
if (this->unk_309 == 0) {
|
||||
this->actor.textId = 0x200A;
|
||||
|
@ -524,7 +523,7 @@ void func_80A53F30(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
void func_80A54038(EnHeishi2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
gSaveContext.infTable[7] |= 0x40;
|
||||
SET_INFTABLE(INFTABLE_76);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
func_8002DF54(globalCtx, 0, 7);
|
||||
this->actionFunc = func_80A53908;
|
||||
|
@ -539,8 +538,8 @@ void func_80A540C0(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = 0x2020;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
Player_UnsetMask(globalCtx);
|
||||
gSaveContext.infTable[7] |= 0x80;
|
||||
gSaveContext.itemGetInf[3] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_77);
|
||||
SET_ITEMGETINF(ITEMGETINF_38);
|
||||
Item_Give(globalCtx, ITEM_SOLD_OUT);
|
||||
if (this->unk_30A != 0) {
|
||||
this->unk_30A = 2;
|
||||
|
@ -848,7 +847,7 @@ void EnHeishi2_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHeishi2_OverrideLimbDraw,
|
||||
EnHeishi2_PostLimbDraw, this);
|
||||
if ((this->type == 5) && (gSaveContext.infTable[7] & 0x80)) {
|
||||
if ((this->type == 5) && GET_INFTABLE(INFTABLE_77)) {
|
||||
linkObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_LINK_CHILD);
|
||||
if (linkObjBankIndex >= 0) {
|
||||
Matrix_Put(&this->mtxf_330);
|
||||
|
|
|
@ -202,7 +202,7 @@ void func_80A55D00(EnHeishi3* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx) &&
|
||||
(this->respawnFlag == 0)) {
|
||||
gSaveContext.eventChkInf[4] |= 0x4000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_4E);
|
||||
globalCtx->nextEntranceIndex = 0x47E; // Hyrule Castle from Guard Capture (outside)
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
this->respawnFlag = 1;
|
||||
|
|
|
@ -130,12 +130,12 @@ void func_80A563BC(EnHeishi4* this, GlobalContext* globalCtx) {
|
|||
this->unk_2B4 = 1;
|
||||
this->actionFunc = func_80A56B40;
|
||||
} else {
|
||||
if (gSaveContext.eventChkInf[8] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
this->actor.textId = 0x5065;
|
||||
this->actionFunc = func_80A56B40;
|
||||
return;
|
||||
}
|
||||
if (gSaveContext.eventChkInf[4] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_45)) {
|
||||
this->actor.textId = 0x5068;
|
||||
this->actionFunc = func_80A56B40;
|
||||
return;
|
||||
|
@ -211,14 +211,14 @@ void func_80A56614(EnHeishi4* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A5673C(EnHeishi4* this, GlobalContext* globalCtx) {
|
||||
if (gSaveContext.eventChkInf[4] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_45)) {
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ マスターソード祝入手! ☆☆☆☆☆ \n" VT_RST);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
this->unk_284 = 0;
|
||||
if (gSaveContext.eventChkInf[8] & 1) {
|
||||
if (!(gSaveContext.infTable[6] & 0x1000)) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
if (!GET_INFTABLE(INFTABLE_6C)) {
|
||||
f32 frames = Animation_GetLastFrame(&gEnHeishiDyingGuardAnim_00C444);
|
||||
Animation_Change(&this->skelAnime, &gEnHeishiDyingGuardAnim_00C444, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP,
|
||||
-10.0f);
|
||||
|
@ -265,7 +265,7 @@ void func_80A56994(EnHeishi4* this, GlobalContext* globalCtx) {
|
|||
func_80038290(globalCtx, &this->actor, &this->unk_260, &this->unk_266, this->actor.focus.pos);
|
||||
if ((this->unk_282 == Message_GetState(&globalCtx->msgCtx)) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
gSaveContext.infTable[6] |= 0x1000;
|
||||
SET_INFTABLE(INFTABLE_6C);
|
||||
func_8002DF54(globalCtx, NULL, 8);
|
||||
this->actionFunc = func_80A56A50;
|
||||
}
|
||||
|
|
|
@ -461,7 +461,8 @@ s32 EnHorse_BgCheckBridgeJumpPoint(EnHorse* this, GlobalContext* globalCtx) {
|
|||
if (this->actor.speedXZ < 12.8f) {
|
||||
return false;
|
||||
}
|
||||
if ((gSaveContext.eventChkInf[9] & 0xF) == 0xF) {
|
||||
if (CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -682,7 +683,11 @@ s32 EnHorse_Spawn(EnHorse* this, GlobalContext* globalCtx) {
|
|||
player = GET_PLAYER(globalCtx);
|
||||
if (globalCtx->sceneNum != SCENE_SPOT20 ||
|
||||
//! Same flag checked twice
|
||||
(Flags_GetEventChkInf(0x18) && ((gSaveContext.eventInf[0] & 0xF) != 6 || Flags_GetEventChkInf(0x18))) ||
|
||||
(Flags_GetEventChkInf(EVENTCHKINF_18) &&
|
||||
(!((gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) ==
|
||||
(EVENTINF_01_MASK | EVENTINF_02_MASK)) ||
|
||||
Flags_GetEventChkInf(EVENTCHKINF_18))) ||
|
||||
// always load two spawns inside lon lon
|
||||
((sHorseSpawns[i].pos.x == 856 && sHorseSpawns[i].pos.y == 0 && sHorseSpawns[i].pos.z == -918) ||
|
||||
(sHorseSpawns[i].pos.x == -1003 && sHorseSpawns[i].pos.y == 0 && sHorseSpawns[i].pos.z == -755))) {
|
||||
|
@ -793,10 +798,10 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP | ENHORSE_UNRIDEABLE;
|
||||
} else if (this->actor.params == 6) {
|
||||
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP;
|
||||
if (Flags_GetEventChkInf(0x18) || DREG(1) != 0) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_18) || DREG(1) != 0) {
|
||||
this->stateFlags &= ~ENHORSE_CANT_JUMP;
|
||||
this->stateFlags |= ENHORSE_FLAG_26;
|
||||
} else if (gSaveContext.eventInf[0] & 0x40 && this->type == HORSE_HNI) {
|
||||
} else if (GET_EVENTINF(EVENTINF_06) && this->type == HORSE_HNI) {
|
||||
this->stateFlags |= ENHORSE_FLAG_21 | ENHORSE_FLAG_20;
|
||||
}
|
||||
} else if (this->actor.params == 1) {
|
||||
|
@ -806,8 +811,10 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
}
|
||||
}
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_SPOT20 && (gSaveContext.eventInf[0] & 0xF) == 6 &&
|
||||
Flags_GetEventChkInf(0x18) == 0 && !DREG(1)) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT20 &&
|
||||
((gSaveContext.eventInf[EVENTINF_0X_INDEX] & (EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK |
|
||||
EVENTINF_03_MASK)) == (EVENTINF_01_MASK | EVENTINF_02_MASK)) &&
|
||||
!Flags_GetEventChkInf(EVENTCHKINF_18) && !DREG(1)) {
|
||||
this->stateFlags |= ENHORSE_FLAG_25;
|
||||
}
|
||||
|
||||
|
@ -833,7 +840,7 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
if (Flags_GetEventChkInf(0x18)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_18)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -841,12 +848,12 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
} else if (!Flags_GetEventChkInf(0x18) && !DREG(1) && !IS_DAY) {
|
||||
} else if (!Flags_GetEventChkInf(EVENTCHKINF_18) && !DREG(1) && !IS_DAY) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
} else if (globalCtx->sceneNum == SCENE_MALON_STABLE) {
|
||||
if (IS_DAY || Flags_GetEventChkInf(0x18) || DREG(1) != 0 || !LINK_IS_ADULT) {
|
||||
if (IS_DAY || Flags_GetEventChkInf(EVENTCHKINF_18) || DREG(1) != 0 || !LINK_IS_ADULT) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
@ -872,7 +879,7 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
if (this->rider == NULL) {
|
||||
__assert("this->race.rider != NULL", "../z_en_horse.c", 3077);
|
||||
}
|
||||
if (!(gSaveContext.eventInf[0] & 0x40)) {
|
||||
if (!GET_EVENTINF(EVENTINF_06)) {
|
||||
this->ingoHorseMaxSpeed = 12.07f;
|
||||
} else {
|
||||
this->ingoHorseMaxSpeed = 12.625f;
|
||||
|
@ -882,7 +889,7 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
} else if (this->actor.params == 8) {
|
||||
EnHorse_InitHorsebackArchery(this);
|
||||
Interface_InitHorsebackArchery(globalCtx);
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT20 && !Flags_GetEventChkInf(0x18) && !DREG(1)) {
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT20 && !Flags_GetEventChkInf(EVENTCHKINF_18) && !DREG(1)) {
|
||||
EnHorse_InitFleePlayer(this);
|
||||
} else {
|
||||
if (globalCtx->sceneNum == SCENE_SOUKO) {
|
||||
|
@ -2534,7 +2541,7 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (globalCtx->interfaceCtx.hbaAmmo != 0) {
|
||||
if (!(this->hbaFlags & 2)) {
|
||||
if (gSaveContext.infTable[25] & 1) {
|
||||
if (GET_INFTABLE(INFTABLE_190)) {
|
||||
if ((s32)gSaveContext.minigameScore >= 1500) {
|
||||
this->hbaFlags |= 4;
|
||||
}
|
||||
|
@ -3578,7 +3585,9 @@ void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->stateFlags &= ~ENHORSE_FLAG_24;
|
||||
}
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_SPOT09 && (gSaveContext.eventChkInf[9] & 0xF) != 0xF) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT09 &&
|
||||
!CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK)) {
|
||||
EnHorse_CheckBridgeJumps(this, globalCtx);
|
||||
}
|
||||
|
||||
|
|
|
@ -110,22 +110,34 @@ void EnHorseGameCheck_FinishIngoRace(EnHorseGameCheckIngoRace* this, GlobalConte
|
|||
gSaveContext.cutsceneIndex = 0;
|
||||
if (this->result == INGORACE_PLAYER_WIN) {
|
||||
globalCtx->nextEntranceIndex = 0x4CE;
|
||||
if (gSaveContext.eventInf[0] & 0x40) {
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 6;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
if (GET_EVENTINF(EVENTINF_06)) {
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
(EVENTINF_01_MASK | EVENTINF_02_MASK);
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
Environment_ForcePlaySequence(NA_BGM_INGO);
|
||||
} else {
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 4;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
EVENTINF_02_MASK;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
Environment_ForcePlaySequence(NA_BGM_INGO);
|
||||
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
|
||||
}
|
||||
} else {
|
||||
globalCtx->nextEntranceIndex = 0x558;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 3;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK);
|
||||
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST);
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
}
|
||||
DREG(25) = 0;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
|
@ -445,7 +457,7 @@ void EnHorseGameCheck_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
EnHorseGameCheckBase* this = (EnHorseGameCheckBase*)thisx;
|
||||
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT20) && (Flags_GetEventChkInf(0x18) || DREG(1))) {
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT20) && (Flags_GetEventChkInf(EVENTCHKINF_18) || DREG(1))) {
|
||||
this->actor.params = HORSEGAME_MALON_RACE;
|
||||
}
|
||||
if (sInitFuncs[this->actor.params] != NULL) {
|
||||
|
|
|
@ -165,11 +165,11 @@ void EnHorseLinkChild_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (gSaveContext.sceneSetupIndex > 3) {
|
||||
func_80A69EC0(this);
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT20) {
|
||||
if (!Flags_GetEventChkInf(0x14)) {
|
||||
if (!Flags_GetEventChkInf(EVENTCHKINF_14)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
this->unk_2A0 = gSaveContext.eventChkInf[1] & 0x40;
|
||||
this->unk_2A0 = GET_EVENTCHKINF(EVENTCHKINF_16);
|
||||
func_80A69EC0(this);
|
||||
} else {
|
||||
func_80A69EC0(this);
|
||||
|
@ -358,17 +358,17 @@ void func_80A6A068(EnHorseLinkChild* this, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (((gSaveContext.eventChkInf[1] & 0x40) && (DREG(53) != 0)) ||
|
||||
if ((GET_EVENTCHKINF(EVENTCHKINF_16) && (DREG(53) != 0)) ||
|
||||
((globalCtx->sceneNum == SCENE_SPOT20) && (gSaveContext.cutsceneIndex == 0xFFF1))) {
|
||||
func_80A6A4DC(this);
|
||||
} else {
|
||||
this->unk_2A0 = gSaveContext.eventChkInf[1] & 0x40;
|
||||
this->unk_2A0 = GET_EVENTCHKINF(EVENTCHKINF_16);
|
||||
}
|
||||
|
||||
newAnimationIdx = this->animationIdx;
|
||||
animationEnded = SkelAnime_Update(&this->skin.skelAnime);
|
||||
if (animationEnded || (this->animationIdx == 1) || (this->animationIdx == 0)) {
|
||||
if (gSaveContext.eventChkInf[1] & 0x20) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_15)) {
|
||||
distFromHome = Math3D_Vec3f_DistXYZ(&this->actor.world.pos, &this->actor.home.pos);
|
||||
distLinkFromHome = Math3D_Vec3f_DistXYZ(&player->actor.world.pos, &this->actor.home.pos);
|
||||
if (distLinkFromHome > 250.0f) {
|
||||
|
|
|
@ -207,7 +207,7 @@ void EnHorseNormal_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Flags_GetEventChkInf(0x14)) {
|
||||
if (Flags_GetEventChkInf(EVENTCHKINF_14)) {
|
||||
if (this->actor.world.rot.z != 3) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
@ -216,7 +216,7 @@ void EnHorseNormal_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
} else if (Flags_GetEventChkInf(0x18) || (DREG(1) != 0)) {
|
||||
} else if (Flags_GetEventChkInf(EVENTCHKINF_18) || (DREG(1) != 0)) {
|
||||
if (this->actor.world.rot.z != 7) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
|
|
@ -77,7 +77,7 @@ void EnHs_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// "chicken shop (adult era)"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) " ヒヨコの店(大人の時) \n" VT_RST);
|
||||
func_80A6E3A0(this, func_80A6E9AC);
|
||||
if (gSaveContext.itemGetInf[3] & 1) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_30)) {
|
||||
// "chicken shop closed"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) " ヒヨコ屋閉店 \n" VT_RST);
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -128,7 +128,7 @@ void func_80A6E630(EnHs* this, GlobalContext* globalCtx) {
|
|||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
func_80088AA0(180);
|
||||
func_80A6E3A0(this, func_80A6E6B0);
|
||||
gSaveContext.eventInf[1] &= ~1;
|
||||
CLEAR_EVENTINF(EVENTINF_10);
|
||||
}
|
||||
|
||||
this->unk_2A8 |= 1;
|
||||
|
|
|
@ -429,9 +429,9 @@ u16 func_80A6F810(GlobalContext* globalCtx, Actor* thisx) {
|
|||
switch (this->actor.params & 0x7F) {
|
||||
case ENHY_TYPE_AOB:
|
||||
if (globalCtx->sceneNum == SCENE_KAKARIKO) {
|
||||
return (this->unk_330 & 0x800) ? 0x508D : ((gSaveContext.infTable[12] & 0x800) ? 0x508C : 0x508B);
|
||||
return (this->unk_330 & EVENTCHKINF_6B_MASK) ? 0x508D : (GET_INFTABLE(INFTABLE_CB) ? 0x508C : 0x508B);
|
||||
} else if (globalCtx->sceneNum == SCENE_MARKET_DAY) {
|
||||
return (gSaveContext.eventInf[3] & 1) ? 0x709B : 0x709C;
|
||||
return GET_EVENTINF(EVENTINF_30) ? 0x709B : 0x709C;
|
||||
} else if (gSaveContext.dogIsLost) {
|
||||
s16 followingDog = (gSaveContext.dogParams & 0xF00) >> 8;
|
||||
|
||||
|
@ -445,77 +445,73 @@ u16 func_80A6F810(GlobalContext* globalCtx, Actor* thisx) {
|
|||
return 0x70A0;
|
||||
}
|
||||
case ENHY_TYPE_COB:
|
||||
if (gSaveContext.eventChkInf[8] & 1) {
|
||||
return (gSaveContext.infTable[12] & 2) ? 0x7017 : 0x7045;
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
return GET_INFTABLE(INFTABLE_C1) ? 0x7017 : 0x7045;
|
||||
} else {
|
||||
return (gSaveContext.infTable[12] & 1) ? 0x7017 : 0x7016;
|
||||
return GET_INFTABLE(INFTABLE_C0) ? 0x7017 : 0x7016;
|
||||
}
|
||||
case ENHY_TYPE_AHG_2:
|
||||
if (globalCtx->sceneNum == SCENE_KAKARIKO) {
|
||||
return 0x5086;
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT01) {
|
||||
return 0x5085;
|
||||
} else if (gSaveContext.eventChkInf[8] & 1) {
|
||||
return (gSaveContext.infTable[12] & 8) ? 0x701A : 0x7047;
|
||||
} else if (gSaveContext.eventChkInf[1] & 0x10) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
return GET_INFTABLE(INFTABLE_C3) ? 0x701A : 0x7047;
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
return 0x701A;
|
||||
} else if (gSaveContext.eventChkInf[1] & 1) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_10)) {
|
||||
return 0x701B;
|
||||
} else if (gSaveContext.infTable[12] & 4) {
|
||||
} else if (GET_INFTABLE(INFTABLE_C2)) {
|
||||
return 0x701C;
|
||||
} else {
|
||||
return 0x701A;
|
||||
}
|
||||
case ENHY_TYPE_BOJ_3:
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? ((gSaveContext.infTable[12] & 0x10) ? 0x7001 : 0x70EB) : 0x7001;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? (GET_INFTABLE(INFTABLE_C4) ? 0x7001 : 0x70EB) : 0x7001;
|
||||
case ENHY_TYPE_AHG_4:
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x704B : ((gSaveContext.infTable[12] & 0x20) ? 0x7024 : 0x7023);
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x704B : (GET_INFTABLE(INFTABLE_C5) ? 0x7024 : 0x7023);
|
||||
case ENHY_TYPE_BOJ_5:
|
||||
player->exchangeItemId = EXCH_ITEM_BLUE_FIRE;
|
||||
return 0x700C;
|
||||
case ENHY_TYPE_BBA:
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x704A : ((gSaveContext.infTable[12] & 0x40) ? 0x7022 : 0x7021);
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x704A : (GET_INFTABLE(INFTABLE_C6) ? 0x7022 : 0x7021);
|
||||
case ENHY_TYPE_BJI_7:
|
||||
if (globalCtx->sceneNum == SCENE_KAKARIKO) {
|
||||
return 0x5088;
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT01) {
|
||||
return 0x5087;
|
||||
} else {
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x704D
|
||||
: ((gSaveContext.infTable[12] & 0x80) ? 0x7028 : 0x7027);
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x704D : (GET_INFTABLE(INFTABLE_C7) ? 0x7028 : 0x7027);
|
||||
}
|
||||
case ENHY_TYPE_CNE_8:
|
||||
if (gSaveContext.eventChkInf[8] & 1) {
|
||||
return (gSaveContext.infTable[12] & 0x200) ? 0x701E : 0x7048;
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
|
||||
return GET_INFTABLE(INFTABLE_C9) ? 0x701E : 0x7048;
|
||||
} else {
|
||||
return (gSaveContext.infTable[12] & 0x100) ? 0x701E : 0x701D;
|
||||
return GET_INFTABLE(INFTABLE_C8) ? 0x701E : 0x701D;
|
||||
}
|
||||
case ENHY_TYPE_BOJ_9:
|
||||
if (globalCtx->sceneNum == SCENE_KAKARIKO) {
|
||||
return (gSaveContext.eventChkInf[10] & 0x400) ? 0x5082 : 0x5081;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_AA) ? 0x5082 : 0x5081;
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT01) {
|
||||
return CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) ? 0x5080 : 0x507F;
|
||||
} else {
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x7049
|
||||
: ((gSaveContext.infTable[12] & 0x400) ? 0x7020 : 0x701F);
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x7049 : (GET_INFTABLE(INFTABLE_CA) ? 0x7020 : 0x701F);
|
||||
}
|
||||
case ENHY_TYPE_BOJ_10:
|
||||
if (globalCtx->sceneNum == SCENE_LABO) {
|
||||
return (gSaveContext.eventChkInf[10] & 0x400) ? 0x507E : 0x507D;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_AA) ? 0x507E : 0x507D;
|
||||
} else if (globalCtx->sceneNum == SCENE_SPOT01) {
|
||||
return CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) ? 0x507C : 0x507B;
|
||||
} else {
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x7046
|
||||
: ((gSaveContext.infTable[12] & 0x2000) ? 0x7019 : 0x7018);
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x7046 : (GET_INFTABLE(INFTABLE_CD) ? 0x7019 : 0x7018);
|
||||
}
|
||||
case ENHY_TYPE_CNE_11:
|
||||
return (gSaveContext.infTable[8] & 0x800) ? ((gSaveContext.infTable[12] & 0x1000) ? 0x7014 : 0x70A4)
|
||||
: 0x7014;
|
||||
return GET_INFTABLE(INFTABLE_8B) ? (GET_INFTABLE(INFTABLE_CC) ? 0x7014 : 0x70A4) : 0x7014;
|
||||
case ENHY_TYPE_BOJ_12:
|
||||
if (globalCtx->sceneNum == SCENE_SPOT01) {
|
||||
return !IS_DAY ? 0x5084 : 0x5083;
|
||||
} else {
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x7044 : 0x7015;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x7044 : 0x7015;
|
||||
}
|
||||
case ENHY_TYPE_AHG_13:
|
||||
return 0x7055;
|
||||
|
@ -528,20 +524,20 @@ u16 func_80A6F810(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case ENHY_TYPE_AHG_17:
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (IS_DAY) {
|
||||
return (gSaveContext.infTable[22] & 1) ? 0x5058 : 0x5057;
|
||||
return GET_INFTABLE(INFTABLE_160) ? 0x5058 : 0x5057;
|
||||
} else {
|
||||
return (gSaveContext.infTable[22] & 2) ? 0x505A : 0x5059;
|
||||
return GET_INFTABLE(INFTABLE_161) ? 0x505A : 0x5059;
|
||||
}
|
||||
} else if (IS_DAY) {
|
||||
return (gSaveContext.infTable[22] & 4) ? 0x505C : 0x505B;
|
||||
return GET_INFTABLE(INFTABLE_162) ? 0x505C : 0x505B;
|
||||
} else {
|
||||
return 0x5058;
|
||||
}
|
||||
case ENHY_TYPE_BOB_18:
|
||||
if (!LINK_IS_ADULT) {
|
||||
return (gSaveContext.eventChkInf[8] & 1) ? 0x505F : ((gSaveContext.infTable[22] & 8) ? 0x505E : 0x505D);
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x505F : (GET_INFTABLE(INFTABLE_163) ? 0x505E : 0x505D);
|
||||
} else {
|
||||
return (this->unk_330 & 0x800) ? 0x5062 : ((gSaveContext.infTable[22] & 0x10) ? 0x5061 : 0x5060);
|
||||
return (this->unk_330 & EVENTCHKINF_6B_MASK) ? 0x5062 : (GET_INFTABLE(INFTABLE_164) ? 0x5061 : 0x5060);
|
||||
}
|
||||
case ENHY_TYPE_BJI_19:
|
||||
return 0x7120;
|
||||
|
@ -599,67 +595,67 @@ s16 func_80A70058(GlobalContext* globalCtx, Actor* thisx) {
|
|||
Player_UpdateBottleHeld(globalCtx, GET_PLAYER(globalCtx), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
break;
|
||||
case 0x7016:
|
||||
gSaveContext.infTable[12] |= 1;
|
||||
SET_INFTABLE(INFTABLE_C0);
|
||||
break;
|
||||
case 0x7045:
|
||||
gSaveContext.infTable[12] |= 2;
|
||||
SET_INFTABLE(INFTABLE_C1);
|
||||
break;
|
||||
case 0x701B:
|
||||
gSaveContext.infTable[12] |= 4;
|
||||
SET_INFTABLE(INFTABLE_C2);
|
||||
break;
|
||||
case 0x7047:
|
||||
gSaveContext.infTable[12] |= 8;
|
||||
SET_INFTABLE(INFTABLE_C3);
|
||||
break;
|
||||
case 0x70EB:
|
||||
gSaveContext.infTable[12] |= 0x10;
|
||||
SET_INFTABLE(INFTABLE_C4);
|
||||
break;
|
||||
case 0x7023:
|
||||
gSaveContext.infTable[12] |= 0x20;
|
||||
SET_INFTABLE(INFTABLE_C5);
|
||||
break;
|
||||
case 0x7021:
|
||||
gSaveContext.infTable[12] |= 0x40;
|
||||
SET_INFTABLE(INFTABLE_C6);
|
||||
break;
|
||||
case 0x7027:
|
||||
gSaveContext.infTable[12] |= 0x80;
|
||||
SET_INFTABLE(INFTABLE_C7);
|
||||
break;
|
||||
case 0x701D:
|
||||
gSaveContext.infTable[12] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_C8);
|
||||
break;
|
||||
case 0x7048:
|
||||
gSaveContext.infTable[12] |= 0x200;
|
||||
SET_INFTABLE(INFTABLE_C9);
|
||||
break;
|
||||
case 0x701F:
|
||||
gSaveContext.infTable[12] |= 0x400;
|
||||
SET_INFTABLE(INFTABLE_CA);
|
||||
break;
|
||||
case 0x7018:
|
||||
gSaveContext.infTable[12] |= 0x2000;
|
||||
SET_INFTABLE(INFTABLE_CD);
|
||||
break;
|
||||
case 0x70A4:
|
||||
gSaveContext.infTable[12] |= 0x1000;
|
||||
SET_INFTABLE(INFTABLE_CC);
|
||||
break;
|
||||
case 0x5057:
|
||||
gSaveContext.infTable[22] |= 1;
|
||||
SET_INFTABLE(INFTABLE_160);
|
||||
break;
|
||||
case 0x5059:
|
||||
gSaveContext.infTable[22] |= 2;
|
||||
SET_INFTABLE(INFTABLE_161);
|
||||
break;
|
||||
case 0x505B:
|
||||
gSaveContext.infTable[22] |= 4;
|
||||
SET_INFTABLE(INFTABLE_162);
|
||||
break;
|
||||
case 0x505D:
|
||||
gSaveContext.infTable[22] |= 8;
|
||||
SET_INFTABLE(INFTABLE_163);
|
||||
break;
|
||||
case 0x5060:
|
||||
gSaveContext.infTable[22] |= 0x10;
|
||||
SET_INFTABLE(INFTABLE_164);
|
||||
break;
|
||||
case 0x508B:
|
||||
gSaveContext.infTable[12] |= 0x800;
|
||||
SET_INFTABLE(INFTABLE_CB);
|
||||
break;
|
||||
case 0x709E:
|
||||
gSaveContext.dogParams = 0;
|
||||
break;
|
||||
case 0x709F:
|
||||
func_80A6F7CC(this, globalCtx, (gSaveContext.infTable[25] & 2) ? GI_RUPEE_BLUE : GI_HEART_PIECE);
|
||||
func_80A6F7CC(this, globalCtx, GET_INFTABLE(INFTABLE_191) ? GI_RUPEE_BLUE : GI_HEART_PIECE);
|
||||
this->actionFunc = func_80A714C4;
|
||||
break;
|
||||
}
|
||||
|
@ -854,7 +850,7 @@ s32 EnHy_ShouldSpawn(EnHy* this, GlobalContext* globalCtx) {
|
|||
return true;
|
||||
} else if (IS_NIGHT) {
|
||||
return false;
|
||||
} else if ((gSaveContext.eventChkInf[8] & 1) && !(gSaveContext.eventChkInf[4] & 0x20)) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_80) && !GET_EVENTCHKINF(EVENTCHKINF_45)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
@ -913,7 +909,7 @@ void EnHy_InitImpl(EnHy* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_KAKARIKO) {
|
||||
this->unk_330 = gSaveContext.eventChkInf[6];
|
||||
this->unk_330 = gSaveContext.eventChkInf[EVENTCHKINF_6B_INDEX];
|
||||
}
|
||||
|
||||
EnHy_InitSetProperties(this);
|
||||
|
@ -970,7 +966,7 @@ void func_80A710F8(EnHy* this, GlobalContext* globalCtx) {
|
|||
if (this->skelAnime.animation != &gObjOsAnim_0BFC) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENHY_ANIM_26);
|
||||
}
|
||||
} else if (gSaveContext.eventInf[3] & 1) {
|
||||
} else if (GET_EVENTINF(EVENTINF_30)) {
|
||||
if (this->skelAnime.animation != &gObjOsAnim_0FE4) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENHY_ANIM_25);
|
||||
}
|
||||
|
@ -1061,7 +1057,7 @@ void func_80A71530(EnHy* this, GlobalContext* globalCtx) {
|
|||
case GI_HEART_PIECE:
|
||||
gSaveContext.dogParams = 0;
|
||||
gSaveContext.dogIsLost = false;
|
||||
gSaveContext.infTable[25] |= 2;
|
||||
SET_INFTABLE(INFTABLE_191);
|
||||
break;
|
||||
case GI_RUPEE_BLUE:
|
||||
Rupees_ChangeBy(5);
|
||||
|
|
|
@ -1400,7 +1400,7 @@ void EnIk_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80A780D0(EnIk* this, GlobalContext* globalCtx) {
|
||||
if (this->actor.params == 0) {
|
||||
if (!(gSaveContext.eventChkInf[3] & 0x800)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_3B)) {
|
||||
this->actor.update = EnIk_Update;
|
||||
this->actor.draw = EnIk_Draw;
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
|
@ -1416,7 +1416,7 @@ void func_80A78160(EnIk* this, GlobalContext* globalCtx) {
|
|||
this->actor.update = func_80A75FA0;
|
||||
this->actor.draw = func_80A76798;
|
||||
this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2;
|
||||
gSaveContext.eventChkInf[3] |= 0x800;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_3B);
|
||||
Actor_SetScale(&this->actor, 0.012f);
|
||||
func_80A7489C(this);
|
||||
}
|
||||
|
@ -1430,7 +1430,7 @@ void func_80A781CC(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Cutscene_SetSegment(globalCtx, gSpiritBossNabooruKnuckleDefeatCs);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
gSaveContext.eventChkInf[3] |= 0x1000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_3C);
|
||||
func_80A7735C(this, globalCtx);
|
||||
}
|
||||
}
|
||||
|
@ -1439,7 +1439,7 @@ void EnIk_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnIk* this = (EnIk*)thisx;
|
||||
s32 flag = this->actor.params & 0xFF00;
|
||||
|
||||
if (((this->actor.params & 0xFF) == 0 && (gSaveContext.eventChkInf[3] & 0x1000)) ||
|
||||
if (((this->actor.params & 0xFF) == 0 && GET_EVENTCHKINF(EVENTCHKINF_3C)) ||
|
||||
(flag != 0 && Flags_GetSwitch(globalCtx, flag >> 8))) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
|
|
|
@ -110,14 +110,14 @@ static Gfx* sAdultEraDLs[] = {
|
|||
};
|
||||
|
||||
u16 func_80A78FB0(GlobalContext* globalCtx) {
|
||||
if (gSaveContext.eventChkInf[1] & 0x10) {
|
||||
if (gSaveContext.infTable[9] & 0x80) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
if (GET_INFTABLE(INFTABLE_97)) {
|
||||
return 0x2046;
|
||||
} else {
|
||||
return 0x2045;
|
||||
}
|
||||
}
|
||||
if (gSaveContext.infTable[9] & 0x10) {
|
||||
if (GET_INFTABLE(INFTABLE_94)) {
|
||||
return 0x2040;
|
||||
} else {
|
||||
return 0x203F;
|
||||
|
@ -131,7 +131,7 @@ u16 func_80A79010(GlobalContext* globalCtx) {
|
|||
if (temp_v0 != 0) {
|
||||
return temp_v0;
|
||||
}
|
||||
if (gSaveContext.eventChkInf[1] & 0x100) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
if (IS_DAY) {
|
||||
return 0x205F;
|
||||
} else {
|
||||
|
@ -141,12 +141,13 @@ u16 func_80A79010(GlobalContext* globalCtx) {
|
|||
if (IS_NIGHT) {
|
||||
return 0x204E;
|
||||
}
|
||||
switch (gSaveContext.eventInf[0] & 0xF) {
|
||||
case 1:
|
||||
switch (gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) {
|
||||
case EVENTINF_00_MASK:
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
return 0x2036;
|
||||
} else if (gSaveContext.eventChkInf[1] & 0x800) {
|
||||
if (gSaveContext.infTable[10] & 4) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_1B)) {
|
||||
if (GET_INFTABLE(INFTABLE_A2)) {
|
||||
return 0x2036;
|
||||
} else {
|
||||
return 0x2038;
|
||||
|
@ -154,22 +155,22 @@ u16 func_80A79010(GlobalContext* globalCtx) {
|
|||
} else {
|
||||
return 0x2037;
|
||||
}
|
||||
case 3:
|
||||
if ((gSaveContext.eventInf[0] & 0x40) || (gSaveContext.eventInf[0] & 0x20)) {
|
||||
case EVENTINF_00_MASK | EVENTINF_01_MASK:
|
||||
if (GET_EVENTINF(EVENTINF_06) || GET_EVENTINF(EVENTINF_05)) {
|
||||
return 0x203E;
|
||||
} else {
|
||||
return 0x203D;
|
||||
}
|
||||
case 4:
|
||||
case EVENTINF_02_MASK:
|
||||
return 0x203A;
|
||||
case 5:
|
||||
case 6:
|
||||
case EVENTINF_00_MASK | EVENTINF_02_MASK:
|
||||
case EVENTINF_01_MASK | EVENTINF_02_MASK:
|
||||
return 0x203C;
|
||||
case 7:
|
||||
case EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK:
|
||||
return 0x205B;
|
||||
case 2:
|
||||
case EVENTINF_01_MASK:
|
||||
default:
|
||||
if (gSaveContext.infTable[0x9] & 0x400) {
|
||||
if (GET_INFTABLE(INFTABLE_9A)) {
|
||||
return 0x2031;
|
||||
} else {
|
||||
return 0x2030;
|
||||
|
@ -195,14 +196,14 @@ s16 func_80A791CC(GlobalContext* globalCtx, Actor* thisx) {
|
|||
|
||||
switch (thisx->textId) {
|
||||
case 0x2045:
|
||||
gSaveContext.infTable[9] |= 0x80;
|
||||
SET_INFTABLE(INFTABLE_97);
|
||||
break;
|
||||
case 0x203E:
|
||||
ret = 2;
|
||||
break;
|
||||
case 0x203F:
|
||||
gSaveContext.eventChkInf[1] |= 2;
|
||||
gSaveContext.infTable[9] |= 0x10;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_11);
|
||||
SET_INFTABLE(INFTABLE_94);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
@ -223,7 +224,7 @@ s16 func_80A7924C(GlobalContext* globalCtx, Actor* thisx) {
|
|||
this->actor.textId = 0x2034;
|
||||
}
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
gSaveContext.infTable[9] |= 0x400;
|
||||
SET_INFTABLE(INFTABLE_9A);
|
||||
break;
|
||||
case 0x2034:
|
||||
if (globalCtx->msgCtx.choiceIndex == 1) {
|
||||
|
@ -249,7 +250,7 @@ s16 func_80A7924C(GlobalContext* globalCtx, Actor* thisx) {
|
|||
} else {
|
||||
this->actor.textId = 0x2039;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
gSaveContext.infTable[10] |= 4;
|
||||
SET_INFTABLE(INFTABLE_A2);
|
||||
}
|
||||
break;
|
||||
case 0x205B:
|
||||
|
@ -257,9 +258,10 @@ s16 func_80A7924C(GlobalContext* globalCtx, Actor* thisx) {
|
|||
sp18 = 2;
|
||||
} else {
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId = 0x2039);
|
||||
gSaveContext.eventInf[0] &= ~0xF;
|
||||
gSaveContext.eventInf[0] &= ~0x20;
|
||||
gSaveContext.eventInf[0] &= ~0x40;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] &=
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK);
|
||||
CLEAR_EVENTINF(EVENTINF_05);
|
||||
CLEAR_EVENTINF(EVENTINF_06);
|
||||
this->actionFunc = func_80A7A4C8;
|
||||
}
|
||||
break;
|
||||
|
@ -364,34 +366,34 @@ s32 func_80A7975C(EnIn* this, GlobalContext* globalCtx) {
|
|||
|
||||
s32 func_80A79830(EnIn* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT20 && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 1 &&
|
||||
!(gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
!GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
return 1;
|
||||
}
|
||||
if (globalCtx->sceneNum == SCENE_MALON_STABLE && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 3 &&
|
||||
(gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
return 1;
|
||||
}
|
||||
if (globalCtx->sceneNum == SCENE_MALON_STABLE && LINK_IS_CHILD && IS_NIGHT) {
|
||||
if ((this->actor.shape.rot.z == 2) && !(gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
if ((this->actor.shape.rot.z == 2) && !GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
return 1;
|
||||
}
|
||||
if ((this->actor.shape.rot.z == 4) && (gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
if ((this->actor.shape.rot.z == 4) && GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (globalCtx->sceneNum == SCENE_SPOT20 && LINK_IS_ADULT && IS_DAY) {
|
||||
if ((this->actor.shape.rot.z == 5) && !(gSaveContext.eventChkInf[1] & 0x100)) {
|
||||
if ((this->actor.shape.rot.z == 5) && !GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
return 2;
|
||||
}
|
||||
if ((this->actor.shape.rot.z == 7) && (gSaveContext.eventChkInf[1] & 0x100)) {
|
||||
if ((this->actor.shape.rot.z == 7) && GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
if (globalCtx->sceneNum == SCENE_SOUKO && LINK_IS_ADULT && IS_NIGHT) {
|
||||
if (this->actor.shape.rot.z == 6 && !(gSaveContext.eventChkInf[1] & 0x100)) {
|
||||
if (this->actor.shape.rot.z == 6 && !GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
return 3;
|
||||
}
|
||||
if (this->actor.shape.rot.z == 8 && (gSaveContext.eventChkInf[1] & 0x100)) {
|
||||
if (this->actor.shape.rot.z == 8 && GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
@ -490,7 +492,7 @@ void EnIn_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
respawnPos = respawn->pos;
|
||||
// hardcoded coords for lon lon entrance
|
||||
if (D_80A7B998 == 0 && respawnPos.x == 1107.0f && respawnPos.y == 0.0f && respawnPos.z == -3740.0f) {
|
||||
gSaveContext.eventInf[0] = 0;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] = 0;
|
||||
D_80A7B998 = 1;
|
||||
}
|
||||
this->actionFunc = func_80A79FB0;
|
||||
|
@ -514,7 +516,7 @@ void func_80A79FB0(EnIn* this, GlobalContext* globalCtx) {
|
|||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
|
||||
if (func_80A7975C(this, globalCtx)) {
|
||||
gSaveContext.eventInf[0] &= ~0x8000;
|
||||
CLEAR_EVENTINF(EVENTINF_0F);
|
||||
return;
|
||||
}
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
|
@ -530,7 +532,7 @@ void func_80A79FB0(EnIn* this, GlobalContext* globalCtx) {
|
|||
case 3:
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_7);
|
||||
this->actionFunc = func_80A7A4BC;
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
this->actor.params = 5;
|
||||
}
|
||||
break;
|
||||
|
@ -543,23 +545,24 @@ void func_80A79FB0(EnIn* this, GlobalContext* globalCtx) {
|
|||
Actor_Kill(&this->actor);
|
||||
break;
|
||||
default:
|
||||
switch (gSaveContext.eventInf[0] & 0xF) {
|
||||
switch (gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) {
|
||||
case 0:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 7:
|
||||
case EVENTINF_01_MASK:
|
||||
case EVENTINF_00_MASK | EVENTINF_01_MASK:
|
||||
case EVENTINF_02_MASK:
|
||||
case EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK:
|
||||
if (this->actor.params == 2) {
|
||||
sp3C = 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case EVENTINF_00_MASK:
|
||||
if (this->actor.params == 3) {
|
||||
sp3C = 1;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
case EVENTINF_00_MASK | EVENTINF_02_MASK:
|
||||
case EVENTINF_01_MASK | EVENTINF_02_MASK:
|
||||
if (this->actor.params == 4) {
|
||||
sp3C = 1;
|
||||
}
|
||||
|
@ -569,36 +572,37 @@ void func_80A79FB0(EnIn* this, GlobalContext* globalCtx) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
switch (gSaveContext.eventInf[0] & 0xF) {
|
||||
switch (gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) {
|
||||
case 0:
|
||||
case 2:
|
||||
case EVENTINF_01_MASK:
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_2);
|
||||
this->actionFunc = func_80A7A4C8;
|
||||
gSaveContext.eventInf[0] = 0;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] = 0;
|
||||
break;
|
||||
case 1:
|
||||
case EVENTINF_00_MASK:
|
||||
this->actor.targetMode = 3;
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_2);
|
||||
this->actionFunc = func_80A7A568;
|
||||
func_80088B34(0x3C);
|
||||
break;
|
||||
case 3:
|
||||
case EVENTINF_00_MASK | EVENTINF_01_MASK:
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_4);
|
||||
this->actionFunc = func_80A7A770;
|
||||
break;
|
||||
case 4:
|
||||
case EVENTINF_02_MASK:
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_6);
|
||||
this->unk_1EC = 8;
|
||||
this->actionFunc = func_80A7A940;
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
case EVENTINF_00_MASK | EVENTINF_02_MASK:
|
||||
case EVENTINF_01_MASK | EVENTINF_02_MASK:
|
||||
this->actor.targetMode = 3;
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_6);
|
||||
this->unk_1EC = 8;
|
||||
this->actionFunc = func_80A7AA40;
|
||||
break;
|
||||
case 7:
|
||||
case EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK:
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_2);
|
||||
this->actionFunc = func_80A7A848;
|
||||
break;
|
||||
|
@ -639,9 +643,13 @@ void func_80A7A4BC(EnIn* this, GlobalContext* globalCtx) {
|
|||
void func_80A7A4C8(EnIn* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_308.unk_00 == 2) {
|
||||
func_80A79BAC(this, globalCtx, 1, TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST));
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x000F) | 0x0001;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.infTable[10] &= ~4;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
EVENTINF_00_MASK;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
CLEAR_INFTABLE(INFTABLE_A2);
|
||||
Environment_ForcePlaySequence(NA_BGM_HORSE);
|
||||
globalCtx->msgCtx.stateTimer = 0;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
|
@ -654,8 +662,8 @@ void func_80A7A568(EnIn* this, GlobalContext* globalCtx) {
|
|||
s32 phi_a2;
|
||||
s32 transitionType;
|
||||
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x800) && (player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
gSaveContext.infTable[10] |= 0x800;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_1B) && (player->stateFlags1 & PLAYER_STATE1_23)) {
|
||||
SET_INFTABLE(INFTABLE_AB);
|
||||
}
|
||||
if (gSaveContext.timer1State == 10) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
|
@ -671,27 +679,33 @@ void func_80A7A568(EnIn* this, GlobalContext* globalCtx) {
|
|||
this->unk_308.unk_00 = 0;
|
||||
return;
|
||||
}
|
||||
gSaveContext.eventInf[0] =
|
||||
(gSaveContext.eventInf[0] & ~0x10) | (((EnHorse*)GET_PLAYER(globalCtx)->rideActor)->type << 4);
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 2;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_04_MASK) |
|
||||
(((EnHorse*)GET_PLAYER(globalCtx)->rideActor)->type << EVENTINF_04_SHIFT);
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
EVENTINF_01_MASK;
|
||||
phi_a2 = 2;
|
||||
transitionType = TRANS_TYPE_FADE_BLACK;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x800)) {
|
||||
if (gSaveContext.infTable[10] & 0x800) {
|
||||
gSaveContext.eventChkInf[1] |= 0x800;
|
||||
gSaveContext.infTable[10] |= 0x800;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_1B)) {
|
||||
if (GET_INFTABLE(INFTABLE_AB)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_1B);
|
||||
SET_INFTABLE(INFTABLE_AB);
|
||||
}
|
||||
}
|
||||
gSaveContext.eventInf[0] &= ~0xF;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] &=
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK);
|
||||
phi_a2 = 0;
|
||||
transitionType = TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST);
|
||||
}
|
||||
func_80A79BAC(this, globalCtx, phi_a2, transitionType);
|
||||
globalCtx->msgCtx.stateTimer = 0;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
}
|
||||
|
@ -705,10 +719,14 @@ void func_80A7A770(EnIn* this, GlobalContext* globalCtx) {
|
|||
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_3);
|
||||
this->actionFunc = func_80A7A848;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x0F) | 7;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK);
|
||||
this->unk_308.unk_00 = 0;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & 0xFFFF) | 0x20;
|
||||
if (!(gSaveContext.eventInf[0] & 0x40)) {
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & 0xFFFF) | EVENTINF_05_MASK;
|
||||
if (!GET_EVENTINF(EVENTINF_06)) {
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
}
|
||||
|
@ -718,18 +736,23 @@ void func_80A7A770(EnIn* this, GlobalContext* globalCtx) {
|
|||
void func_80A7A848(EnIn* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_308.unk_00 == 2) {
|
||||
if ((globalCtx->msgCtx.choiceIndex == 0 && gSaveContext.rupees < 50) || globalCtx->msgCtx.choiceIndex == 1) {
|
||||
gSaveContext.eventInf[0] &= ~0xF;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] &=
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK);
|
||||
this->actionFunc = func_80A7A4C8;
|
||||
} else {
|
||||
func_80A79BAC(this, globalCtx, 2, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0xF) | 2;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
EVENTINF_01_MASK;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
globalCtx->msgCtx.stateTimer = 0;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
}
|
||||
this->unk_308.unk_00 = 0;
|
||||
gSaveContext.eventInf[0] &= ~0x20;
|
||||
gSaveContext.eventInf[0] &= ~0x40;
|
||||
CLEAR_EVENTINF(EVENTINF_05);
|
||||
CLEAR_EVENTINF(EVENTINF_06);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -747,12 +770,17 @@ void func_80A7A940(EnIn* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_308.unk_00 == 2) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||
func_80A79BAC(this, globalCtx, 2, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x000F) | 0x0002;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) |
|
||||
EVENTINF_01_MASK;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
globalCtx->msgCtx.stateTimer = 0;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & 0xFFFF) | 0x40;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & 0xFFFF) | EVENTINF_06_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -892,13 +920,16 @@ void func_80A7B024(EnIn* this, GlobalContext* globalCtx) {
|
|||
player->actor.freezeTimer = 10;
|
||||
if (this->unk_308.unk_00 == 2) {
|
||||
if (1) {}
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x800) && (gSaveContext.infTable[10] & 0x800)) {
|
||||
gSaveContext.eventChkInf[1] |= 0x800;
|
||||
gSaveContext.infTable[10] |= 0x800;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_1B) && GET_INFTABLE(INFTABLE_AB)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_1B);
|
||||
SET_INFTABLE(INFTABLE_AB);
|
||||
}
|
||||
func_80A79BAC(this, globalCtx, 0, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
|
||||
gSaveContext.eventInf[0] = gSaveContext.eventInf[0] & ~0xF;
|
||||
gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000;
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
~(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK);
|
||||
gSaveContext.eventInf[EVENTINF_0X_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_0X_INDEX] & ~EVENTINF_0F_MASK) | EVENTINF_0F_MASK;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
|
@ -918,7 +949,10 @@ void EnIn_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &collider->base);
|
||||
if (this->actionFunc != func_80A7A304) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->skelAnime.animation == &object_in_Anim_001BE0 && ((gSaveContext.eventInf[0] & 0xF) != 6)) {
|
||||
if (this->skelAnime.animation == &object_in_Anim_001BE0 &&
|
||||
((gSaveContext.eventInf[EVENTINF_0X_INDEX] &
|
||||
(EVENTINF_00_MASK | EVENTINF_01_MASK | EVENTINF_02_MASK | EVENTINF_03_MASK)) !=
|
||||
(EVENTINF_01_MASK | EVENTINF_02_MASK))) {
|
||||
func_80A79690(&this->skelAnime, this, globalCtx);
|
||||
}
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
|
||||
|
|
|
@ -96,7 +96,7 @@ void EnJj_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->extraBlinkCounter = 0;
|
||||
this->extraBlinkTotal = 0;
|
||||
|
||||
if (gSaveContext.eventChkInf[3] & 0x400) { // Fish given
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_3A)) { // Fish given
|
||||
EnJj_SetupAction(this, EnJj_WaitToOpenMouth);
|
||||
} else {
|
||||
EnJj_SetupAction(this, EnJj_WaitForFish);
|
||||
|
@ -219,7 +219,7 @@ void EnJj_BeginCutscene(EnJj* this, GlobalContext* globalCtx) {
|
|||
gSaveContext.cutsceneTrigger = 1;
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, bodyCollisionActor->bgId);
|
||||
func_8005B1A4(GET_ACTIVE_CAM(globalCtx));
|
||||
gSaveContext.eventChkInf[3] |= 0x400;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_3A);
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ void func_80A90264(EnKakasi2* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_80A904D8;
|
||||
} else if ((this->actor.xzDistToPlayer < this->maxSpawnDistance.x) &&
|
||||
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < this->maxSpawnDistance.y) &&
|
||||
(gSaveContext.eventChkInf[9] & 0x1000)) {
|
||||
GET_EVENTCHKINF(EVENTCHKINF_9C)) {
|
||||
|
||||
this->unk_194 = 0;
|
||||
if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_0B) {
|
||||
|
|
|
@ -387,8 +387,8 @@ void func_80A91A90(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->dialogState == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (this->unk_195) {
|
||||
if (!(gSaveContext.eventChkInf[9] & 0x1000)) {
|
||||
gSaveContext.eventChkInf[9] |= 0x1000;
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_9C)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_9C);
|
||||
}
|
||||
}
|
||||
if (globalCtx->cameraPtrs[this->camId] == NULL) {
|
||||
|
|
|
@ -285,15 +285,15 @@ u16 func_80A96FD0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
EnKo* this = (EnKo*)thisx;
|
||||
switch (ENKO_TYPE) {
|
||||
case ENKO_TYPE_CHILD_FADO:
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
return 0x10DA;
|
||||
}
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||
return 0x10D9;
|
||||
}
|
||||
return (gSaveContext.infTable[11] & 0x80) ? 0x10D8 : 0x10D7;
|
||||
return GET_INFTABLE(INFTABLE_B7) ? 0x10D8 : 0x10D7;
|
||||
case ENKO_TYPE_CHILD_0:
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
return 0x1025;
|
||||
}
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||
|
@ -301,62 +301,62 @@ u16 func_80A96FD0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
}
|
||||
return 0x1004;
|
||||
case ENKO_TYPE_CHILD_1:
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
return 0x1023;
|
||||
}
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||
return 0x1043;
|
||||
}
|
||||
if (gSaveContext.infTable[1] & 0x4000) {
|
||||
if (GET_INFTABLE(INFTABLE_1E)) {
|
||||
return 0x1006;
|
||||
}
|
||||
return 0x1005;
|
||||
case ENKO_TYPE_CHILD_2:
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
return 0x1022;
|
||||
}
|
||||
return 0x1007;
|
||||
case ENKO_TYPE_CHILD_3:
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
return 0x1021;
|
||||
}
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||
return 0x1044;
|
||||
}
|
||||
if (gSaveContext.infTable[2] & 4) {
|
||||
if (GET_INFTABLE(INFTABLE_22)) {
|
||||
return 0x1009;
|
||||
}
|
||||
return 0x1008;
|
||||
case ENKO_TYPE_CHILD_4:
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
return 0x1097;
|
||||
}
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||
return 0x1042;
|
||||
}
|
||||
if (gSaveContext.infTable[2] & 0x10) {
|
||||
if (GET_INFTABLE(INFTABLE_24)) {
|
||||
return 0x100B;
|
||||
}
|
||||
return 0x100A;
|
||||
case ENKO_TYPE_CHILD_5:
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
return 0x10B0;
|
||||
}
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||
return 0x1043;
|
||||
}
|
||||
if (gSaveContext.infTable[2] & 0x40) {
|
||||
if (GET_INFTABLE(INFTABLE_26)) {
|
||||
return 0x100D;
|
||||
}
|
||||
return 0x100C;
|
||||
case ENKO_TYPE_CHILD_6:
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
return 0x10B5;
|
||||
}
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||
return 0x1043;
|
||||
}
|
||||
if (gSaveContext.infTable[2] & 0x100) {
|
||||
if (GET_INFTABLE(INFTABLE_28)) {
|
||||
return 0x1019;
|
||||
}
|
||||
return 0x100E;
|
||||
|
@ -392,7 +392,7 @@ u16 func_80A97338(GlobalContext* globalCtx, Actor* thisx) {
|
|||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST)) {
|
||||
return 0x1072;
|
||||
}
|
||||
if (gSaveContext.infTable[4] & 2) {
|
||||
if (GET_INFTABLE(INFTABLE_41)) {
|
||||
return 0x1056;
|
||||
}
|
||||
return 0x1055;
|
||||
|
@ -405,7 +405,7 @@ u16 func_80A97338(GlobalContext* globalCtx, Actor* thisx) {
|
|||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST)) {
|
||||
return 0x1074;
|
||||
}
|
||||
if (gSaveContext.infTable[4] & 0x80) {
|
||||
if (GET_INFTABLE(INFTABLE_47)) {
|
||||
return 0x105E;
|
||||
}
|
||||
return 0x105D;
|
||||
|
@ -425,7 +425,7 @@ u16 func_80A97338(GlobalContext* globalCtx, Actor* thisx) {
|
|||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST)) {
|
||||
return 0x1077;
|
||||
}
|
||||
if (gSaveContext.infTable[5] & 2) {
|
||||
if (GET_INFTABLE(INFTABLE_51)) {
|
||||
return 0x1059;
|
||||
}
|
||||
return 0x1058;
|
||||
|
@ -438,7 +438,7 @@ u16 func_80A97338(GlobalContext* globalCtx, Actor* thisx) {
|
|||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST)) {
|
||||
return 0x107A;
|
||||
}
|
||||
if (gSaveContext.infTable[5] & 0x200) {
|
||||
if (GET_INFTABLE(INFTABLE_59)) {
|
||||
return 0x1050;
|
||||
}
|
||||
return 0x104F;
|
||||
|
@ -456,7 +456,7 @@ u16 func_80A97338(GlobalContext* globalCtx, Actor* thisx) {
|
|||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST)) {
|
||||
return 0x107C;
|
||||
}
|
||||
if (gSaveContext.infTable[6] & 2) {
|
||||
if (GET_INFTABLE(INFTABLE_61)) {
|
||||
return 0x1054;
|
||||
}
|
||||
return 0x1053;
|
||||
|
@ -497,37 +497,37 @@ s16 func_80A97738(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case TEXT_STATE_CLOSING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x1005:
|
||||
gSaveContext.infTable[1] |= 0x4000;
|
||||
SET_INFTABLE(INFTABLE_1E);
|
||||
break;
|
||||
case 0x1008:
|
||||
gSaveContext.infTable[2] |= 0x4;
|
||||
SET_INFTABLE(INFTABLE_22);
|
||||
break;
|
||||
case 0x100A:
|
||||
gSaveContext.infTable[2] |= 0x10;
|
||||
SET_INFTABLE(INFTABLE_24);
|
||||
break;
|
||||
case 0x100C:
|
||||
gSaveContext.infTable[2] |= 0x40;
|
||||
SET_INFTABLE(INFTABLE_26);
|
||||
break;
|
||||
case 0x100E:
|
||||
gSaveContext.infTable[2] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_28);
|
||||
break;
|
||||
case 0x104F:
|
||||
gSaveContext.infTable[5] |= 0x200;
|
||||
SET_INFTABLE(INFTABLE_59);
|
||||
break;
|
||||
case 0x1053:
|
||||
gSaveContext.infTable[6] |= 2;
|
||||
SET_INFTABLE(INFTABLE_61);
|
||||
break;
|
||||
case 0x1055:
|
||||
gSaveContext.infTable[4] |= 2;
|
||||
SET_INFTABLE(INFTABLE_41);
|
||||
break;
|
||||
case 0x1058:
|
||||
gSaveContext.infTable[5] |= 2;
|
||||
SET_INFTABLE(INFTABLE_51);
|
||||
break;
|
||||
case 0x105D:
|
||||
gSaveContext.infTable[4] |= 0x80;
|
||||
SET_INFTABLE(INFTABLE_47);
|
||||
break;
|
||||
case 0x10D7:
|
||||
gSaveContext.infTable[11] |= 0x80;
|
||||
SET_INFTABLE(INFTABLE_B7);
|
||||
break;
|
||||
case 0x10BA:
|
||||
return 1;
|
||||
|
@ -562,7 +562,7 @@ s16 func_80A97738(GlobalContext* globalCtx, Actor* thisx) {
|
|||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
break;
|
||||
case 0x10B7:
|
||||
gSaveContext.infTable[11] |= 0x1000;
|
||||
SET_INFTABLE(INFTABLE_BC);
|
||||
|
||||
case 0x10B8:
|
||||
this->actor.textId = (globalCtx->msgCtx.choiceIndex == 0) ? 0x10BA : 0x10B9;
|
||||
|
@ -584,7 +584,7 @@ s32 EnKo_GetForestQuestState(EnKo* this) {
|
|||
|
||||
if (!LINK_IS_ADULT) {
|
||||
// Obtained Zelda's Letter
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
return ENKO_FQS_CHILD_SARIA;
|
||||
}
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||
|
@ -951,7 +951,7 @@ void func_80A9877C(EnKo* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = INV_CONTENT(ITEM_TRADE_ADULT) > ITEM_ODD_POTION ? 0x10B9 : 0x10DF;
|
||||
|
||||
if (func_8002F368(globalCtx) == ENKO_TYPE_CHILD_9) {
|
||||
this->actor.textId = (gSaveContext.infTable[11] & 0x1000) ? 0x10B8 : 0x10B7;
|
||||
this->actor.textId = GET_INFTABLE(INFTABLE_BC) ? 0x10B8 : 0x10B7;
|
||||
this->unk_210 = 0;
|
||||
}
|
||||
player->actor.textId = this->actor.textId;
|
||||
|
@ -1060,7 +1060,7 @@ s32 EnKo_GetForestQuestState2(EnKo* this) {
|
|||
return CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST) ? ENKO_FQS_ADULT_SAVED : ENKO_FQS_ADULT_ENEMY;
|
||||
}
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
|
||||
return (gSaveContext.eventChkInf[4] & 1) ? ENKO_FQS_CHILD_SARIA : ENKO_FQS_CHILD_STONE;
|
||||
return GET_EVENTCHKINF(EVENTCHKINF_40) ? ENKO_FQS_CHILD_SARIA : ENKO_FQS_CHILD_STONE;
|
||||
}
|
||||
return ENKO_FQS_CHILD_START;
|
||||
}
|
||||
|
@ -1207,7 +1207,7 @@ void func_80A99560(EnKo* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = 0x10B9;
|
||||
Message_ContinueTextbox(globalCtx, this->actor.textId);
|
||||
this->unk_1E8.unk_00 = 1;
|
||||
gSaveContext.itemGetInf[3] |= 2;
|
||||
SET_ITEMGETINF(ITEMGETINF_31);
|
||||
this->actionFunc = func_80A99384;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ u16 EnKz_GetTextNoMaskChild(GlobalContext* globalCtx, EnKz* this) {
|
|||
|
||||
if (CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE)) {
|
||||
return 0x402B;
|
||||
} else if (gSaveContext.eventChkInf[3] & 8) {
|
||||
} else if (GET_EVENTCHKINF(EVENTCHKINF_33)) {
|
||||
return 0x401C;
|
||||
} else {
|
||||
player->exchangeItemId = EXCH_ITEM_LETTER_RUTO;
|
||||
|
@ -85,7 +85,7 @@ u16 EnKz_GetTextNoMaskAdult(GlobalContext* globalCtx, EnKz* this) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_FROG) {
|
||||
if (!(gSaveContext.infTable[19] & 0x200)) {
|
||||
if (!GET_INFTABLE(INFTABLE_139)) {
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_TUNIC, 2)) {
|
||||
return 0x401F;
|
||||
} else {
|
||||
|
@ -124,14 +124,14 @@ s16 func_80A9C6C0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
ret = 0;
|
||||
switch (this->actor.textId) {
|
||||
case 0x4012:
|
||||
gSaveContext.infTable[19] |= 0x200;
|
||||
SET_INFTABLE(INFTABLE_139);
|
||||
ret = 2;
|
||||
break;
|
||||
case 0x401B:
|
||||
ret = !Message_ShouldAdvance(globalCtx) ? 1 : 2;
|
||||
break;
|
||||
case 0x401F:
|
||||
gSaveContext.infTable[19] |= 0x200;
|
||||
SET_INFTABLE(INFTABLE_139);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -236,7 +236,7 @@ void func_80A9CB18(EnKz* this, GlobalContext* globalCtx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (func_80A9C95C(globalCtx, this, &this->unk_1E0.unk_00, 340.0f, EnKz_GetText, func_80A9C6C0)) {
|
||||
if ((this->actor.textId == 0x401A) && !(gSaveContext.eventChkInf[3] & 8)) {
|
||||
if ((this->actor.textId == 0x401A) && !GET_EVENTCHKINF(EVENTCHKINF_33)) {
|
||||
if (func_8002F368(globalCtx) == EXCH_ITEM_LETTER_RUTO) {
|
||||
this->actor.textId = 0x401B;
|
||||
this->sfxPlayed = false;
|
||||
|
@ -258,7 +258,7 @@ void func_80A9CB18(EnKz* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
this->isTrading = false;
|
||||
if (gSaveContext.infTable[19] & 0x200) {
|
||||
if (GET_INFTABLE(INFTABLE_139)) {
|
||||
this->actor.textId = CHECK_QUEST_ITEM(QUEST_SONG_SERENADE) ? 0x4045 : 0x401A;
|
||||
player->actor.textId = this->actor.textId;
|
||||
} else {
|
||||
|
@ -330,12 +330,12 @@ void EnKz_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->unk_1E0.unk_00 = 0;
|
||||
Animation_ChangeByInfo(&this->skelanime, sAnimationInfo, ENKZ_ANIM_0);
|
||||
|
||||
if (gSaveContext.eventChkInf[3] & 8) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_33)) {
|
||||
EnKz_SetMovedPos(this, globalCtx);
|
||||
}
|
||||
|
||||
if (LINK_IS_ADULT) {
|
||||
if (!(gSaveContext.infTable[19] & 0x100)) {
|
||||
if (!GET_INFTABLE(INFTABLE_138)) {
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_BG_ICE_SHELTER,
|
||||
this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0,
|
||||
0x04FF);
|
||||
|
@ -397,7 +397,7 @@ void EnKz_Mweep(EnKz* this, GlobalContext* globalCtx) {
|
|||
Animation_ChangeByInfo(&this->skelanime, sAnimationInfo, ENKZ_ANIM_1);
|
||||
Inventory_ReplaceItem(globalCtx, ITEM_LETTER_RUTO, ITEM_BOTTLE);
|
||||
EnKz_SetMovedPos(this, globalCtx);
|
||||
gSaveContext.eventChkInf[3] |= 8;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_33);
|
||||
this->actor.speedXZ = 0.0;
|
||||
this->actionFunc = EnKz_StopMweep;
|
||||
}
|
||||
|
@ -443,7 +443,7 @@ void EnKz_StartTimer(EnKz* this, GlobalContext* globalCtx) {
|
|||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_FROG) {
|
||||
func_80088AA0(180); // start timer2 with 3 minutes
|
||||
gSaveContext.eventInf[1] &= ~1;
|
||||
CLEAR_EVENTINF(EVENTINF_10);
|
||||
}
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->actionFunc = EnKz_Wait;
|
||||
|
@ -454,8 +454,8 @@ void EnKz_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnKz* this = (EnKz*)thisx;
|
||||
s32 pad;
|
||||
|
||||
if (LINK_IS_ADULT && !(gSaveContext.infTable[19] & 0x100)) {
|
||||
gSaveContext.infTable[19] |= 0x100;
|
||||
if (LINK_IS_ADULT && !GET_INFTABLE(INFTABLE_138)) {
|
||||
SET_INFTABLE(INFTABLE_138);
|
||||
}
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
|
|
|
@ -97,24 +97,24 @@ u16 EnMa1_GetText(GlobalContext* globalCtx, Actor* thisx) {
|
|||
if (CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
|
||||
return 0x204A;
|
||||
}
|
||||
if (gSaveContext.eventChkInf[1] & 0x40) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_16)) {
|
||||
return 0x2049;
|
||||
}
|
||||
if (gSaveContext.eventChkInf[1] & 0x20) {
|
||||
if ((gSaveContext.infTable[8] & 0x20)) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_15)) {
|
||||
if (GET_INFTABLE(INFTABLE_85)) {
|
||||
return 0x2049;
|
||||
} else {
|
||||
return 0x2048;
|
||||
}
|
||||
}
|
||||
if (gSaveContext.eventChkInf[1] & 0x10) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
return 0x2047;
|
||||
}
|
||||
if (gSaveContext.eventChkInf[1] & 4) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_12)) {
|
||||
return 0x2044;
|
||||
}
|
||||
if (gSaveContext.infTable[8] & 0x10) {
|
||||
if (gSaveContext.infTable[8] & 0x800) {
|
||||
if (GET_INFTABLE(INFTABLE_84)) {
|
||||
if (GET_INFTABLE(INFTABLE_8B)) {
|
||||
return 0x2043;
|
||||
} else {
|
||||
return 0x2042;
|
||||
|
@ -130,23 +130,23 @@ s16 func_80AA0778(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case TEXT_STATE_CLOSING:
|
||||
switch (thisx->textId) {
|
||||
case 0x2041:
|
||||
gSaveContext.infTable[8] |= 0x10;
|
||||
gSaveContext.eventChkInf[1] |= 1;
|
||||
SET_INFTABLE(INFTABLE_84);
|
||||
SET_EVENTCHKINF(EVENTCHKINF_10);
|
||||
ret = 0;
|
||||
break;
|
||||
case 0x2043:
|
||||
ret = 1;
|
||||
break;
|
||||
case 0x2047:
|
||||
gSaveContext.eventChkInf[1] |= 0x20;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_15);
|
||||
ret = 0;
|
||||
break;
|
||||
case 0x2048:
|
||||
gSaveContext.infTable[8] |= 0x20;
|
||||
SET_INFTABLE(INFTABLE_85);
|
||||
ret = 0;
|
||||
break;
|
||||
case 0x2049:
|
||||
gSaveContext.eventChkInf[1] |= 0x40;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_16);
|
||||
ret = 0;
|
||||
break;
|
||||
case 0x2061:
|
||||
|
@ -188,24 +188,24 @@ s32 func_80AA08C4(EnMa1* this, GlobalContext* globalCtx) {
|
|||
return 0;
|
||||
}
|
||||
if (((globalCtx->sceneNum == SCENE_MARKET_NIGHT) || (globalCtx->sceneNum == SCENE_MARKET_DAY)) &&
|
||||
!(gSaveContext.eventChkInf[1] & 0x10) && !(gSaveContext.infTable[8] & 0x800)) {
|
||||
!GET_EVENTCHKINF(EVENTCHKINF_14) && !GET_INFTABLE(INFTABLE_8B)) {
|
||||
return 1;
|
||||
}
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT15) && !(gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
if (gSaveContext.infTable[8] & 0x800) {
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT15) && !GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
if (GET_INFTABLE(INFTABLE_8B)) {
|
||||
return 1;
|
||||
} else {
|
||||
gSaveContext.infTable[8] |= 0x800;
|
||||
SET_INFTABLE(INFTABLE_8B);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if ((globalCtx->sceneNum == SCENE_SOUKO) && IS_NIGHT && (gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
if ((globalCtx->sceneNum == SCENE_SOUKO) && IS_NIGHT && GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
return 1;
|
||||
}
|
||||
if (globalCtx->sceneNum != SCENE_SPOT20) {
|
||||
return 0;
|
||||
}
|
||||
if ((this->actor.shape.rot.z == 3) && IS_DAY && (gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
if ((this->actor.shape.rot.z == 3) && IS_DAY && GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -280,7 +280,7 @@ void EnMa1_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actor.targetMode = 6;
|
||||
this->unk_1E8.unk_00 = 0;
|
||||
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x10) || CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_14) || CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
|
||||
this->actionFunc = func_80AA0D88;
|
||||
EnMa1_ChangeAnim(this, ENMA1_ANIM_2);
|
||||
} else {
|
||||
|
@ -307,9 +307,9 @@ void func_80AA0D88(EnMa1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT15) && (gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
if ((globalCtx->sceneNum == SCENE_SPOT15) && GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (!(gSaveContext.eventChkInf[1] & 0x10) || CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
|
||||
} else if (!GET_EVENTCHKINF(EVENTCHKINF_14) || CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
|
||||
if (this->unk_1E8.unk_00 == 2) {
|
||||
this->actionFunc = func_80AA0EA0;
|
||||
globalCtx->msgCtx.stateTimer = 4;
|
||||
|
@ -331,7 +331,7 @@ void func_80AA0EFC(EnMa1* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_1E8.unk_00 == 3) {
|
||||
this->unk_1E8.unk_00 = 0;
|
||||
this->actionFunc = func_80AA0D88;
|
||||
gSaveContext.eventChkInf[1] |= 4;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_12);
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
}
|
||||
}
|
||||
|
@ -349,7 +349,7 @@ void func_80AA0F44(EnMa1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[1] & 0x40) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_16)) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_25;
|
||||
player->unk_6A8 = &this->actor;
|
||||
|
|
|
@ -74,13 +74,13 @@ u16 func_80AA19A0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
if (faceReaction != 0) {
|
||||
return faceReaction;
|
||||
}
|
||||
if (gSaveContext.eventChkInf[1] & 0x100) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
return 0x2056;
|
||||
}
|
||||
if (IS_NIGHT) {
|
||||
if (gSaveContext.infTable[8] & 0x1000) {
|
||||
if (GET_INFTABLE(INFTABLE_8C)) {
|
||||
return 0x2052;
|
||||
} else if (gSaveContext.infTable[8] & 0x4000) {
|
||||
} else if (GET_INFTABLE(INFTABLE_8E)) {
|
||||
return 0x2051;
|
||||
} else {
|
||||
return 0x2050;
|
||||
|
@ -96,11 +96,11 @@ s16 func_80AA1A38(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case TEXT_STATE_CLOSING:
|
||||
switch (thisx->textId) {
|
||||
case 0x2051:
|
||||
gSaveContext.infTable[8] |= 0x1000;
|
||||
SET_INFTABLE(INFTABLE_8C);
|
||||
ret = 2;
|
||||
break;
|
||||
case 0x2053:
|
||||
gSaveContext.infTable[8] |= 0x2000;
|
||||
SET_INFTABLE(INFTABLE_8D);
|
||||
ret = 0;
|
||||
break;
|
||||
default:
|
||||
|
@ -141,15 +141,15 @@ u16 func_80AA1B58(EnMa2* this, GlobalContext* globalCtx) {
|
|||
if (LINK_IS_CHILD) {
|
||||
return 0;
|
||||
}
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x100) && (globalCtx->sceneNum == SCENE_MALON_STABLE) && IS_DAY &&
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_18) && (globalCtx->sceneNum == SCENE_MALON_STABLE) && IS_DAY &&
|
||||
(this->actor.shape.rot.z == 5)) {
|
||||
return 1;
|
||||
}
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x100) && (globalCtx->sceneNum == SCENE_SPOT20) && IS_NIGHT &&
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_18) && (globalCtx->sceneNum == SCENE_SPOT20) && IS_NIGHT &&
|
||||
(this->actor.shape.rot.z == 6)) {
|
||||
return 2;
|
||||
}
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x100) || (globalCtx->sceneNum != SCENE_SPOT20)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_18) || (globalCtx->sceneNum != SCENE_SPOT20)) {
|
||||
return 0;
|
||||
}
|
||||
if ((this->actor.shape.rot.z == 7) && IS_DAY) {
|
||||
|
@ -229,7 +229,7 @@ void EnMa2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_80AA204C;
|
||||
break;
|
||||
case 3:
|
||||
if (gSaveContext.infTable[8] & 0x2000) {
|
||||
if (GET_INFTABLE(INFTABLE_8D)) {
|
||||
EnMa2_ChangeAnim(this, ENMA2_ANIM_0);
|
||||
} else {
|
||||
EnMa2_ChangeAnim(this, ENMA2_ANIM_3);
|
||||
|
@ -284,7 +284,7 @@ void func_80AA20E4(EnMa2* this, GlobalContext* globalCtx) {
|
|||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->unk_208 = 0x1E;
|
||||
gSaveContext.infTable[8] |= 0x4000;
|
||||
SET_INFTABLE(INFTABLE_8E);
|
||||
this->actionFunc = func_80AA21C8;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
} else {
|
||||
|
|
|
@ -75,11 +75,11 @@ u16 func_80AA2AA0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
Player* player = GET_PLAYER(globalCtx);
|
||||
s16* timer1ValuePtr; // weirdness with this necessary to match
|
||||
|
||||
if (!(gSaveContext.infTable[11] & 0x100)) {
|
||||
if (!GET_INFTABLE(INFTABLE_B8)) {
|
||||
return 0x2000;
|
||||
}
|
||||
timer1ValuePtr = &gSaveContext.timer1Value;
|
||||
if (gSaveContext.eventInf[0] & 0x400) {
|
||||
if (GET_EVENTINF(EVENTINF_0A)) {
|
||||
gSaveContext.timer1Value = gSaveContext.timer1Value;
|
||||
thisx->flags |= ACTOR_FLAG_16;
|
||||
if (gSaveContext.timer1Value >= 0xD3) {
|
||||
|
@ -89,7 +89,7 @@ u16 func_80AA2AA0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
HIGH_SCORE(HS_HORSE_RACE) = 0xB4;
|
||||
gSaveContext.timer1Value = *timer1ValuePtr;
|
||||
}
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x4000) && (gSaveContext.timer1Value < 0x32)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_1E) && (gSaveContext.timer1Value < 0x32)) {
|
||||
return 0x208F;
|
||||
} else if (gSaveContext.timer1Value < HIGH_SCORE(HS_HORSE_RACE)) {
|
||||
return 0x2012;
|
||||
|
@ -101,7 +101,7 @@ u16 func_80AA2AA0(GlobalContext* globalCtx, Actor* thisx) {
|
|||
(Actor_FindNearby(globalCtx, thisx, ACTOR_EN_HORSE, 1, 1200.0f) == NULL)) {
|
||||
return 0x2001;
|
||||
}
|
||||
if (!(gSaveContext.infTable[11] & 0x200)) {
|
||||
if (!GET_INFTABLE(INFTABLE_B9)) {
|
||||
return 0x2002;
|
||||
} else {
|
||||
return 0x2003;
|
||||
|
@ -118,15 +118,15 @@ s16 func_80AA2BD4(GlobalContext* globalCtx, Actor* thisx) {
|
|||
gSaveContext.nextCutsceneIndex = 0xFFF0;
|
||||
globalCtx->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST);
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.eventInf[0] |= 0x400;
|
||||
SET_EVENTINF(EVENTINF_0A);
|
||||
gSaveContext.timer1State = 0xF;
|
||||
}
|
||||
break;
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
gSaveContext.infTable[11] |= 0x200;
|
||||
SET_INFTABLE(INFTABLE_B9);
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
if (gSaveContext.eventChkInf[1] & 0x4000) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_1E)) {
|
||||
Message_ContinueTextbox(globalCtx, 0x2091);
|
||||
} else if (HIGH_SCORE(HS_HORSE_RACE) == 0) {
|
||||
Message_ContinueTextbox(globalCtx, 0x2092);
|
||||
|
@ -139,26 +139,26 @@ s16 func_80AA2BD4(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case TEXT_STATE_CLOSING:
|
||||
switch (thisx->textId) {
|
||||
case 0x2000:
|
||||
gSaveContext.infTable[11] |= 0x100;
|
||||
SET_INFTABLE(INFTABLE_B8);
|
||||
ret = 0;
|
||||
break;
|
||||
case 0x208F:
|
||||
gSaveContext.eventChkInf[1] |= 0x4000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_1E);
|
||||
case 0x2004:
|
||||
case 0x2012:
|
||||
if (HIGH_SCORE(HS_HORSE_RACE) > gSaveContext.timer1Value) {
|
||||
HIGH_SCORE(HS_HORSE_RACE) = gSaveContext.timer1Value;
|
||||
}
|
||||
case 0x208E:
|
||||
gSaveContext.eventInf[0] &= ~0x400;
|
||||
CLEAR_EVENTINF(EVENTINF_0A);
|
||||
thisx->flags &= ~ACTOR_FLAG_16;
|
||||
ret = 0;
|
||||
gSaveContext.timer1State = 0xA;
|
||||
break;
|
||||
case 0x2002:
|
||||
gSaveContext.infTable[11] |= 0x200;
|
||||
SET_INFTABLE(INFTABLE_B9);
|
||||
case 0x2003:
|
||||
if (!(gSaveContext.eventInf[0] & 0x400)) {
|
||||
if (!GET_EVENTINF(EVENTINF_0A)) {
|
||||
ret = 0;
|
||||
}
|
||||
break;
|
||||
|
@ -197,10 +197,10 @@ s32 func_80AA2EC8(EnMa3* this, GlobalContext* globalCtx) {
|
|||
if (LINK_IS_CHILD) {
|
||||
return 2;
|
||||
}
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
return 2;
|
||||
}
|
||||
if (gSaveContext.eventInf[0] & 0x400) {
|
||||
if (GET_EVENTINF(EVENTINF_0A)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -375,7 +375,7 @@ u16 EnMd_GetTextKokiriForest(GlobalContext* globalCtx, EnMd* this) {
|
|||
return 0x1045;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[0] & 0x10) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_04)) {
|
||||
return 0x1034;
|
||||
}
|
||||
|
||||
|
@ -383,7 +383,7 @@ u16 EnMd_GetTextKokiriForest(GlobalContext* globalCtx, EnMd* this) {
|
|||
return 0x1033;
|
||||
}
|
||||
|
||||
if (gSaveContext.infTable[0] & 0x1000) {
|
||||
if (GET_INFTABLE(INFTABLE_0C)) {
|
||||
return 0x1030;
|
||||
}
|
||||
|
||||
|
@ -394,7 +394,7 @@ u16 EnMd_GetTextKokiriHome(GlobalContext* globalCtx, EnMd* this) {
|
|||
this->unk_208 = 0;
|
||||
this->unk_209 = TEXT_STATE_NONE;
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 1) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
return 0x1028;
|
||||
}
|
||||
|
||||
|
@ -405,18 +405,18 @@ u16 EnMd_GetTextLostWoods(GlobalContext* globalCtx, EnMd* this) {
|
|||
this->unk_208 = 0;
|
||||
this->unk_209 = TEXT_STATE_NONE;
|
||||
|
||||
if (gSaveContext.eventChkInf[4] & 0x100) {
|
||||
if (gSaveContext.infTable[1] & 0x200) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_48)) {
|
||||
if (GET_INFTABLE(INFTABLE_19)) {
|
||||
return 0x1071;
|
||||
}
|
||||
return 0x1070;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[0] & 0x400) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_0A)) {
|
||||
return 0x1068;
|
||||
}
|
||||
|
||||
if (gSaveContext.infTable[1] & 0x20) {
|
||||
if (GET_INFTABLE(INFTABLE_15)) {
|
||||
return 0x1061;
|
||||
}
|
||||
|
||||
|
@ -453,17 +453,17 @@ s16 func_80AAAF04(GlobalContext* globalCtx, Actor* thisx) {
|
|||
case TEXT_STATE_CLOSING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x1028:
|
||||
gSaveContext.eventChkInf[0] |= 0x8000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_0F);
|
||||
break;
|
||||
case 0x102F:
|
||||
gSaveContext.eventChkInf[0] |= 4;
|
||||
gSaveContext.infTable[0] |= 0x1000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_02);
|
||||
SET_INFTABLE(INFTABLE_0C);
|
||||
break;
|
||||
case 0x1060:
|
||||
gSaveContext.infTable[1] |= 0x20;
|
||||
SET_INFTABLE(INFTABLE_15);
|
||||
break;
|
||||
case 0x1070:
|
||||
gSaveContext.infTable[1] |= 0x200;
|
||||
SET_INFTABLE(INFTABLE_19);
|
||||
break;
|
||||
case 0x1033:
|
||||
case 0x1067:
|
||||
|
@ -481,13 +481,13 @@ s16 func_80AAAF04(GlobalContext* globalCtx, Actor* thisx) {
|
|||
|
||||
u8 EnMd_ShouldSpawn(EnMd* this, GlobalContext* globalCtx) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT04) {
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x1000) && !(gSaveContext.eventChkInf[4] & 1)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_1C) && !GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_KOKIRI_HOME4) {
|
||||
if (((gSaveContext.eventChkInf[1] & 0x1000) != 0) || ((gSaveContext.eventChkInf[4] & 1) != 0)) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_1C) || GET_EVENTCHKINF(EVENTCHKINF_40)) {
|
||||
if (!LINK_IS_ADULT) {
|
||||
return 1;
|
||||
}
|
||||
|
@ -612,7 +612,7 @@ void func_80AAB5A4(EnMd* this, GlobalContext* globalCtx) {
|
|||
f32 temp;
|
||||
|
||||
if (globalCtx->sceneNum != SCENE_KOKIRI_HOME4) {
|
||||
temp = (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !(gSaveContext.eventChkInf[1] & 0x1000) &&
|
||||
temp = (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !GET_EVENTCHKINF(EVENTCHKINF_1C) &&
|
||||
(globalCtx->sceneNum == SCENE_SPOT04))
|
||||
? 100.0f
|
||||
: 400.0f;
|
||||
|
@ -646,10 +646,10 @@ void EnMd_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ELF, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, FAIRY_KOKIRI);
|
||||
|
||||
if (((globalCtx->sceneNum == SCENE_SPOT04) && !(gSaveContext.eventChkInf[0] & 0x10)) ||
|
||||
((globalCtx->sceneNum == SCENE_SPOT04) && (gSaveContext.eventChkInf[0] & 0x10) &&
|
||||
if (((globalCtx->sceneNum == SCENE_SPOT04) && !GET_EVENTCHKINF(EVENTCHKINF_04)) ||
|
||||
((globalCtx->sceneNum == SCENE_SPOT04) && GET_EVENTCHKINF(EVENTCHKINF_04) &&
|
||||
CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) ||
|
||||
((globalCtx->sceneNum == SCENE_SPOT10) && !(gSaveContext.eventChkInf[0] & 0x400))) {
|
||||
((globalCtx->sceneNum == SCENE_SPOT10) && !GET_EVENTCHKINF(EVENTCHKINF_0A))) {
|
||||
this->actor.home.pos = this->actor.world.pos;
|
||||
this->actionFunc = func_80AAB948;
|
||||
return;
|
||||
|
@ -709,16 +709,16 @@ void func_80AAB948(EnMd* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->unk_1E0.unk_00 == 2) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !(gSaveContext.eventChkInf[1] & 0x1000) &&
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !GET_EVENTCHKINF(EVENTCHKINF_1C) &&
|
||||
(globalCtx->sceneNum == SCENE_SPOT04)) {
|
||||
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
}
|
||||
|
||||
if (globalCtx->sceneNum == SCENE_SPOT04) {
|
||||
gSaveContext.eventChkInf[0] |= 0x10;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_04);
|
||||
}
|
||||
if (globalCtx->sceneNum == SCENE_SPOT10) {
|
||||
gSaveContext.eventChkInf[0] |= 0x400;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_0A);
|
||||
}
|
||||
|
||||
func_80AAA92C(this, 3);
|
||||
|
@ -777,10 +777,10 @@ void func_80AABD0C(EnMd* this, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !(gSaveContext.eventChkInf[1] & 0x1000) &&
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !GET_EVENTCHKINF(EVENTCHKINF_1C) &&
|
||||
(globalCtx->sceneNum == SCENE_SPOT04)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
gSaveContext.eventChkInf[1] |= 0x1000;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_1C);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ void EnMk_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->swimFlag = 0;
|
||||
this->actor.targetMode = 6;
|
||||
|
||||
if (gSaveContext.itemGetInf[1] & 1) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_10)) {
|
||||
this->flags |= 4;
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ void func_80AACA94(EnMk* this, GlobalContext* globalCtx) {
|
|||
this->actor.parent = NULL;
|
||||
this->actionFunc = func_80AACA40;
|
||||
func_80088AA0(240);
|
||||
gSaveContext.eventInf[1] &= ~1;
|
||||
CLEAR_EVENTINF(EVENTINF_10);
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_EYEDROPS, 10000.0f, 50.0f);
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ void func_80AACFA0(EnMk* this, GlobalContext* globalCtx) {
|
|||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
this->actor.parent = NULL;
|
||||
this->actionFunc = func_80AACA40;
|
||||
gSaveContext.itemGetInf[1] |= 1;
|
||||
SET_ITEMGETINF(ITEMGETINF_10);
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, GI_HEART_PIECE, 10000.0f, 50.0f);
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ void EnMk_Wait(EnMk* this, GlobalContext* globalCtx) {
|
|||
switch (playerExchangeItem) {
|
||||
case EXCH_ITEM_NONE:
|
||||
if (this->swimFlag >= 8) {
|
||||
if (gSaveContext.itemGetInf[1] & 1) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_10)) {
|
||||
player->actor.textId = 0x4075;
|
||||
this->actionFunc = func_80AACA40;
|
||||
} else {
|
||||
|
|
|
@ -228,7 +228,7 @@ s32 func_80AADAA0(EnMm* this, GlobalContext* globalCtx) {
|
|||
EnMm_ChangeAnim(this, RM_ANIM_HAPPY, &this->curAnimIndex);
|
||||
} else {
|
||||
player->actor.textId = 0x202C;
|
||||
gSaveContext.infTable[23] |= 0x1000;
|
||||
SET_INFTABLE(INFTABLE_17C);
|
||||
}
|
||||
sp1C = 2;
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ s32 func_80AADAA0(EnMm* this, GlobalContext* globalCtx) {
|
|||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
Player_UnsetMask(globalCtx);
|
||||
Item_Give(globalCtx, ITEM_SOLD_OUT);
|
||||
gSaveContext.itemGetInf[3] |= 0x800;
|
||||
SET_ITEMGETINF(ITEMGETINF_3B);
|
||||
Rupees_ChangeBy(500);
|
||||
player->actor.textId = 0x202E;
|
||||
sp1C = 2;
|
||||
|
@ -263,12 +263,12 @@ s32 EnMm_GetTextId(EnMm* this, GlobalContext* globalCtx) {
|
|||
|
||||
textId = Text_GetFaceReaction(globalCtx, 0x1C);
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
|
||||
if (textId == 0) {
|
||||
textId = 0x204D;
|
||||
}
|
||||
} else if (player->currentMask == PLAYER_MASK_BUNNY) {
|
||||
textId = (gSaveContext.infTable[23] & 0x1000) ? 0x202B : 0x202A;
|
||||
textId = GET_INFTABLE(INFTABLE_17C) ? 0x202B : 0x202A;
|
||||
} else if (textId == 0) {
|
||||
textId = 0x2029;
|
||||
}
|
||||
|
@ -427,7 +427,7 @@ void func_80AAE294(EnMm* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
|
||||
this->speedXZ = 10.0f;
|
||||
this->skelAnime.playSpeed = 2.0f;
|
||||
} else {
|
||||
|
@ -454,7 +454,7 @@ void func_80AAE294(EnMm* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
|
||||
dustPos.x = this->actor.world.pos.x;
|
||||
dustPos.y = this->actor.world.pos.y;
|
||||
dustPos.z = this->actor.world.pos.z;
|
||||
|
@ -475,7 +475,7 @@ void func_80AAE50C(EnMm* this, GlobalContext* globalCtx) {
|
|||
this->sitTimer = 0;
|
||||
this->actionFunc = func_80AAE294;
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
|
||||
EnMm_ChangeAnim(this, RM_ANIM_SPRINT, &this->curAnimIndex);
|
||||
this->mouthTexIndex = RM_MOUTH_CLOSED;
|
||||
} else {
|
||||
|
@ -523,7 +523,7 @@ void EnMm_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnMm_OverrideLimbDraw, EnMm_PostLimbDraw, this);
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
|
||||
s32 linkChildObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_LINK_CHILD);
|
||||
|
||||
if (linkChildObjBankIndex >= 0) {
|
||||
|
|
|
@ -100,10 +100,11 @@ void EnMm2_ChangeAnim(EnMm2* this, s32 index, s32* currentIndex) {
|
|||
}
|
||||
|
||||
void func_80AAEF70(EnMm2* this, GlobalContext* globalCtx) {
|
||||
if ((gSaveContext.eventChkInf[9] & 0xF) != 0xF) {
|
||||
if (!CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_90_91_92_93_INDEX],
|
||||
EVENTCHKINF_90_MASK | EVENTCHKINF_91_MASK | EVENTCHKINF_92_MASK | EVENTCHKINF_93_MASK)) {
|
||||
this->actor.textId = 0x6086;
|
||||
} else if (gSaveContext.infTable[23] & 0x8000) {
|
||||
if (gSaveContext.eventInf[1] & 1) {
|
||||
} else if (GET_INFTABLE(INFTABLE_17F)) {
|
||||
if (GET_EVENTINF(EVENTINF_10)) {
|
||||
this->actor.textId = 0x6082;
|
||||
} else if (gSaveContext.timer2State != 0) {
|
||||
this->actor.textId = 0x6076;
|
||||
|
@ -116,7 +117,7 @@ void func_80AAEF70(EnMm2* this, GlobalContext* globalCtx) {
|
|||
this->actor.textId = 0x6076;
|
||||
} else {
|
||||
this->actor.textId = 0x607D;
|
||||
gSaveContext.eventInf[1] &= ~1;
|
||||
CLEAR_EVENTINF(EVENTINF_10);
|
||||
HIGH_SCORE(HS_MARATHON) = 158;
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +150,7 @@ void EnMm2_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Actor_Kill(&this->actor);
|
||||
}
|
||||
if (this->actor.params == 1) {
|
||||
if (!(gSaveContext.infTable[23] & 0x8000) || !(gSaveContext.eventInf[1] & 1)) {
|
||||
if (!GET_INFTABLE(INFTABLE_17F) || !GET_EVENTINF(EVENTINF_10)) {
|
||||
osSyncPrintf(VT_FGCOL(CYAN) " マラソン 開始されていない \n" VT_RST "\n");
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
@ -194,7 +195,7 @@ void func_80AAF330(EnMm2* this, GlobalContext* globalCtx) {
|
|||
Message_CloseTextbox(globalCtx);
|
||||
}
|
||||
gSaveContext.timer2State = 0;
|
||||
gSaveContext.eventInf[1] &= ~1;
|
||||
CLEAR_EVENTINF(EVENTINF_10);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,7 +210,7 @@ void func_80AAF3C0(EnMm2* this, GlobalContext* globalCtx) {
|
|||
case 0:
|
||||
Message_ContinueTextbox(globalCtx, 0x607F);
|
||||
this->actor.textId = 0x607F;
|
||||
gSaveContext.eventInf[1] |= 1;
|
||||
SET_EVENTINF(EVENTINF_10);
|
||||
break;
|
||||
case 1:
|
||||
Message_ContinueTextbox(globalCtx, 0x6080);
|
||||
|
@ -249,7 +250,7 @@ void func_80AAF57C(EnMm2* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
func_80AAEF70(this, globalCtx);
|
||||
if ((func_80AAF224(this, globalCtx, func_80AAF3C0)) && (this->actor.textId == 0x607D)) {
|
||||
gSaveContext.infTable[23] |= 0x8000;
|
||||
SET_INFTABLE(INFTABLE_17F);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -277,8 +278,8 @@ void func_80AAF668(EnMm2* this, GlobalContext* globalCtx) {
|
|||
HIGH_SCORE(HS_MARATHON) = gSaveContext.timer2Value;
|
||||
}
|
||||
} else {
|
||||
LOG_HEX("((z_common_data.event_inf[1]) & (0x0001))", gSaveContext.eventInf[1] & 1, "../z_en_mm2.c", 541);
|
||||
if (!(gSaveContext.eventInf[1] & 1)) {
|
||||
LOG_HEX("((z_common_data.event_inf[1]) & (0x0001))", GET_EVENTINF(EVENTINF_10), "../z_en_mm2.c", 541);
|
||||
if (!GET_EVENTINF(EVENTINF_10)) {
|
||||
this->unk_1F4 |= 2;
|
||||
this->unk_1F4 &= ~1;
|
||||
EnMm2_ChangeAnim(this, RM2_ANIM_STAND, &this->previousAnimation);
|
||||
|
|
|
@ -57,13 +57,17 @@ void EnMu_SetupAction(EnMu* this, EnMuActionFunc actionFunc) {
|
|||
|
||||
void EnMu_Interact(EnMu* this, GlobalContext* globalCtx) {
|
||||
u8 textIdOffset[] = { 0x42, 0x43, 0x3F, 0x41, 0x3E };
|
||||
u8 bitmask[] = { 0x01, 0x02, 0x04, 0x08, 0x10 };
|
||||
u8 bitmask[] = {
|
||||
EVENTINF_20_MASK, EVENTINF_21_MASK, EVENTINF_22_MASK, EVENTINF_23_MASK, EVENTINF_24_MASK,
|
||||
};
|
||||
u8 textFlags;
|
||||
s32 randomIndex;
|
||||
s32 i;
|
||||
|
||||
textFlags = gSaveContext.eventInf[2] & 0x1F;
|
||||
gSaveContext.eventInf[2] &= ~0x1F;
|
||||
textFlags = gSaveContext.eventInf[EVENTINF_20_21_22_23_24_INDEX] &
|
||||
(EVENTINF_20_MASK | EVENTINF_21_MASK | EVENTINF_22_MASK | EVENTINF_23_MASK | EVENTINF_24_MASK);
|
||||
gSaveContext.eventInf[EVENTINF_20_21_22_23_24_INDEX] &=
|
||||
~(EVENTINF_20_MASK | EVENTINF_21_MASK | EVENTINF_22_MASK | EVENTINF_23_MASK | EVENTINF_24_MASK);
|
||||
randomIndex = (globalCtx->state.frames + (s32)(Rand_ZeroOne() * 5.0f)) % 5;
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
|
@ -90,8 +94,8 @@ void EnMu_Interact(EnMu* this, GlobalContext* globalCtx) {
|
|||
|
||||
textFlags |= bitmask[randomIndex];
|
||||
this->defFaceReaction = textIdOffset[randomIndex] | 0x7000;
|
||||
textFlags &= 0xFF;
|
||||
gSaveContext.eventInf[2] |= textFlags;
|
||||
textFlags &= EVENTINF_20_MASK | EVENTINF_21_MASK | EVENTINF_22_MASK | EVENTINF_23_MASK | EVENTINF_24_MASK | 0xE0;
|
||||
gSaveContext.eventInf[EVENTINF_20_21_22_23_24_INDEX] |= textFlags;
|
||||
}
|
||||
|
||||
u16 EnMu_GetFaceReaction(GlobalContext* globalCtx, Actor* thisx) {
|
||||
|
|
|
@ -563,7 +563,7 @@ void EnNb_InitKidnap(EnNb* this, GlobalContext* globalCtx) {
|
|||
EnNb_SetCurrentAnim(this, &gNabooruTrappedInVortexPushingGroundAnim, 0, 0.0f, 0);
|
||||
this->action = NB_KIDNAPPED;
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
gSaveContext.eventChkInf[9] |= 0x20;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_95);
|
||||
}
|
||||
|
||||
void EnNb_PlayCrySFX(EnNb* this, GlobalContext* globalCtx) {
|
||||
|
@ -1099,11 +1099,11 @@ void EnNb_LookUp(EnNb* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnNb_CrawlspaceSpawnCheck(EnNb* this, GlobalContext* globalCtx) {
|
||||
if (!(gSaveContext.eventChkInf[9] & 0x20) && LINK_IS_CHILD) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_95) && LINK_IS_CHILD) {
|
||||
EnNb_UpdatePath(this, globalCtx);
|
||||
|
||||
// looking into crawlspace
|
||||
if (!(gSaveContext.eventChkInf[9] & 0x10)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_94)) {
|
||||
EnNb_SetCurrentAnim(this, &gNabooruKneeingAtCrawlspaceAnim, 0, 0.0f, 0);
|
||||
this->action = NB_CROUCH_CRAWLSPACE;
|
||||
this->drawMode = NB_DRAW_DEFAULT;
|
||||
|
@ -1200,7 +1200,7 @@ void func_80AB3838(EnNb* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3;
|
||||
|
||||
if (!(gSaveContext.infTable[22] & 0x1000)) {
|
||||
if (!GET_INFTABLE(INFTABLE_16C)) {
|
||||
this->actor.textId = 0x601D;
|
||||
} else {
|
||||
this->actor.textId = 0x6024;
|
||||
|
@ -1212,7 +1212,7 @@ void func_80AB3838(EnNb* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnNb_SetupPathMovement(EnNb* this, GlobalContext* globalCtx) {
|
||||
EnNb_SetCurrentAnim(this, &gNabooruStandingToWalkingTransitionAnim, 2, -8.0f, 0);
|
||||
gSaveContext.eventChkInf[9] |= 0x10;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_94);
|
||||
this->action = NB_IN_PATH;
|
||||
this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3);
|
||||
}
|
||||
|
@ -1230,7 +1230,7 @@ void EnNb_SetTextIdAsChild(EnNb* this, GlobalContext* globalCtx) {
|
|||
EnNb_SetupPathMovement(this, globalCtx);
|
||||
} else {
|
||||
if (textId == 0x6027) {
|
||||
gSaveContext.infTable[22] |= 0x1000;
|
||||
SET_INFTABLE(INFTABLE_16C);
|
||||
}
|
||||
this->action = NB_IDLE_CRAWLSPACE;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,8 @@ static Vec3f sKakarikoPosList[] = {
|
|||
};
|
||||
|
||||
static s16 sKakarikoFlagList[] = {
|
||||
0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000,
|
||||
INFTABLE_199_MASK, INFTABLE_19A_MASK, INFTABLE_19B_MASK, INFTABLE_19C_MASK,
|
||||
INFTABLE_19D_MASK, INFTABLE_19E_MASK, INFTABLE_19F_MASK,
|
||||
};
|
||||
|
||||
static u8 sLowerRiverSpawned = false;
|
||||
|
@ -160,7 +161,7 @@ void EnNiw_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
fabsf(this->actor.world.pos.z - sKakarikoPosList[i].z) < 40.0f) {
|
||||
this->unk_2AA = i;
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) " 通常鶏index %d\n" VT_RST, this->unk_2AA);
|
||||
if (gSaveContext.infTable[25] & sKakarikoFlagList[i]) {
|
||||
if (gSaveContext.infTable[INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX] & sKakarikoFlagList[i]) {
|
||||
this->actor.world.pos.x = 300.0f;
|
||||
this->actor.world.pos.y = 100.0f;
|
||||
this->actor.world.pos.z = 1530.0f;
|
||||
|
@ -187,22 +188,22 @@ void EnNiw_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
if (gSaveContext.eventChkInf[1] & 0x10) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x10)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_14)) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (gSaveContext.eventChkInf[1] & 0x100) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (!(gSaveContext.eventChkInf[1] & 0x100)) {
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_18)) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
break;
|
||||
|
@ -225,7 +226,7 @@ void EnNiw_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case 0xD:
|
||||
case 0xE:
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit2);
|
||||
if (globalCtx->sceneNum == SCENE_LINK_HOME && !(gSaveContext.eventChkInf[1] & 0x4000)) {
|
||||
if (globalCtx->sceneNum == SCENE_LINK_HOME && !GET_EVENTCHKINF(EVENTCHKINF_1E)) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -140,7 +140,7 @@ void EnNiwGirl_Talk(EnNiwGirl* this, GlobalContext* globalCtx) {
|
|||
-10.0f);
|
||||
this->actor.flags |= ACTOR_FLAG_0;
|
||||
this->actor.textId = 0x7000;
|
||||
if ((gSaveContext.eventChkInf[8] & 1) && (this->unk_27A == 0)) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_80) && (this->unk_27A == 0)) {
|
||||
this->actor.textId = 0x70EA;
|
||||
}
|
||||
switch (Player_GetMask(globalCtx)) {
|
||||
|
|
|
@ -42,7 +42,8 @@ static s16 sMissingCuccoTextIds[] = {
|
|||
};
|
||||
|
||||
static s16 D_80ABB3B4[] = {
|
||||
0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000,
|
||||
INFTABLE_199_MASK, INFTABLE_19A_MASK, INFTABLE_19B_MASK, INFTABLE_19C_MASK,
|
||||
INFTABLE_19D_MASK, INFTABLE_19E_MASK, INFTABLE_19F_MASK,
|
||||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
|
@ -167,7 +168,7 @@ void func_80AB9F24(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
this->actor.draw = EnNiwLady_Draw;
|
||||
switch (this->unk_278) {
|
||||
case 0:
|
||||
if (!(gSaveContext.itemGetInf[0] & 0x1000) && !LINK_IS_ADULT) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_0C) && !LINK_IS_ADULT) {
|
||||
frames = Animation_GetLastFrame(&gObjOsAnim_A630);
|
||||
Animation_Change(&this->skelAnime, &gObjOsAnim_A630, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, 0.0f);
|
||||
} else {
|
||||
|
@ -206,7 +207,8 @@ void func_80ABA244(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
if ((fabsf(currentCucco->actor.world.pos.x - 330.0f) < 90.0f) &&
|
||||
(fabsf(currentCucco->actor.world.pos.z - 1610.0f) < 190.0f)) {
|
||||
if (this->unk_26C == 0) {
|
||||
gSaveContext.infTable[25] |= D_80ABB3B4[currentCucco->unk_2AA];
|
||||
gSaveContext.infTable[INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX] |=
|
||||
D_80ABB3B4[currentCucco->unk_2AA];
|
||||
if (BREG(1) != 0) {
|
||||
// "GET inside the chicken fence!"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆ 鶏柵内GET!☆ %x\n" VT_RST,
|
||||
|
@ -215,7 +217,7 @@ void func_80ABA244(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
this->cuccosInPen++;
|
||||
} else if (this->unk_26C == 0) {
|
||||
gSaveContext.infTable[25] &= ~D_80ABB3B4[currentCucco->unk_2AA];
|
||||
gSaveContext.infTable[INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX] &= ~D_80ABB3B4[currentCucco->unk_2AA];
|
||||
}
|
||||
}
|
||||
currentCucco = (EnNiw*)currentCucco->actor.next;
|
||||
|
@ -269,9 +271,13 @@ void func_80ABA244(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
this->unk_26C = 1;
|
||||
this->unk_262 = TEXT_STATE_EVENT;
|
||||
this->unk_26A = this->cuccosInPen;
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 柵内BIT変更前 ☆☆ %x\n" VT_RST, gSaveContext.infTable[25]);
|
||||
gSaveContext.infTable[25] &= 0x1FF;
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 柵内BIT変更後 ☆☆ %x\n" VT_RST, gSaveContext.infTable[25]);
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 柵内BIT変更前 ☆☆ %x\n" VT_RST,
|
||||
gSaveContext.infTable[INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX]);
|
||||
gSaveContext.infTable[INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX] &=
|
||||
(u16) ~(INFTABLE_199_MASK | INFTABLE_19A_MASK | INFTABLE_19B_MASK | INFTABLE_19C_MASK |
|
||||
INFTABLE_19D_MASK | INFTABLE_19E_MASK | INFTABLE_19F_MASK);
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 柵内BIT変更後 ☆☆ %x\n" VT_RST,
|
||||
gSaveContext.infTable[INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX]);
|
||||
osSyncPrintf("\n\n");
|
||||
this->actionFunc = func_80ABA654;
|
||||
return;
|
||||
|
@ -300,7 +306,7 @@ void func_80ABA654(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 爆弾 ☆☆☆☆☆ %d\n" VT_RST, this->unk_272);
|
||||
osSyncPrintf("\n\n");
|
||||
this->unk_26E = 0xB;
|
||||
if (!(gSaveContext.itemGetInf[0] & 0x1000)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_0C)) {
|
||||
this->actor.parent = NULL;
|
||||
this->getItemId = GI_BOTTLE;
|
||||
func_8002F434(&this->actor, globalCtx, GI_BOTTLE, 100.0f, 50.0f);
|
||||
|
@ -324,7 +330,7 @@ void func_80ABA778(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ アダルトメッセージチェック ☆☆☆☆☆ \n" VT_RST);
|
||||
this->unk_262 = TEXT_STATE_DONE;
|
||||
this->unk_273 = 0;
|
||||
if (!(gSaveContext.itemGetInf[2] & 0x1000)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_2C)) {
|
||||
if (this->unk_274 != 0) {
|
||||
this->unk_27A = 1;
|
||||
} else {
|
||||
|
@ -334,9 +340,9 @@ void func_80ABA778(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
this->unk_262 = TEXT_STATE_CHOICE;
|
||||
} else {
|
||||
this->unk_27A = 2;
|
||||
if (!(gSaveContext.itemGetInf[2] & 0x4000)) {
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_2E)) {
|
||||
this->unk_27A = 3;
|
||||
if (gSaveContext.eventChkInf[6] & 0x400) {
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_6A)) {
|
||||
this->unk_27A = 9;
|
||||
if (this->unk_277 != 0) {
|
||||
this->unk_27A = 10;
|
||||
|
@ -360,7 +366,7 @@ void func_80ABA878(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) {
|
||||
playerExchangeItemId = func_8002F368(globalCtx);
|
||||
if ((playerExchangeItemId == 6) && (gSaveContext.eventChkInf[6] & 0x400)) {
|
||||
if ((playerExchangeItemId == 6) && GET_EVENTCHKINF(EVENTCHKINF_6A)) {
|
||||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
player->actor.textId = sTradeItemTextIds[5];
|
||||
this->unk_26E = this->unk_27A + 21;
|
||||
|
@ -437,7 +443,7 @@ void func_80ABAC00(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
getItemId = this->getItemId;
|
||||
if (LINK_IS_ADULT) {
|
||||
getItemId = !(gSaveContext.itemGetInf[2] & 0x1000) ? GI_POCKET_EGG : GI_COJIRO;
|
||||
getItemId = !GET_ITEMGETINF(ITEMGETINF_2C) ? GI_POCKET_EGG : GI_COJIRO;
|
||||
}
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, 200.0f, 100.0f);
|
||||
}
|
||||
|
@ -449,14 +455,14 @@ void func_80ABAC84(EnNiwLady* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||
if (LINK_IS_ADULT) {
|
||||
if (!(gSaveContext.itemGetInf[2] & 0x1000)) {
|
||||
gSaveContext.itemGetInf[2] |= 0x1000;
|
||||
if (!GET_ITEMGETINF(ITEMGETINF_2C)) {
|
||||
SET_ITEMGETINF(ITEMGETINF_2C);
|
||||
} else {
|
||||
gSaveContext.itemGetInf[2] |= 0x4000;
|
||||
SET_ITEMGETINF(ITEMGETINF_2E);
|
||||
}
|
||||
this->actionFunc = func_80ABA778;
|
||||
} else {
|
||||
gSaveContext.itemGetInf[0] |= 0x1000;
|
||||
SET_ITEMGETINF(ITEMGETINF_0C);
|
||||
this->unk_262 = TEXT_STATE_DONE;
|
||||
this->actionFunc = func_80ABA244;
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue