diff --git a/include/functions.h b/include/functions.h index 3faf69b262..27ac405894 100644 --- a/include/functions.h +++ b/include/functions.h @@ -2818,21 +2818,20 @@ void Play_CameraChangeSetting(GlobalContext* globalCtx, s16 camId, s16 setting); void func_80169AFC(GlobalContext* globalCtx, s16 camId, s16 arg2); s16 Play_GetCsCamDataSetting(GlobalContext* globalCtx, s32 camId); Vec3s* Play_GetCsCamDataVec3s(GlobalContext* globalCtx, s32 camId); -s16 convert_scene_number_among_shared_scenes(s16 arg0); -void func_80169D40(GlobalContext* globalCtx); -void func_80169DCC(GlobalContext* globalCtx, s32 arg1, u16 arg2, s32 arg3, s32 arg4, Vec3f* arg5, s16 arg6); -void func_80169E6C(GlobalContext* globalCtx, s32 param_1, s32 param_2); -// void func_80169ECC(void); -void func_80169EFC(GlobalContext* globalCtx); -void func_80169F78(GlobalContext* globalCtx); -void func_80169FDC(GlobalContext* globalCtx); -// void func_80169FFC(void); -s32 FrameAdvance_IsEnabled(GlobalContext* globalCtx); -// UNK_TYPE4 func_8016A02C(s32 param_1, s32 param_2, s16* param_3); -// void func_8016A0AC(void); +s16 Play_GetOriginalSceneNumber(s16 sceneNum); +void Play_SaveCycleSceneFlags(GameState* gameState); +void Play_SetRespawnData(GameState* gameState, s32 respawnNumber, u16 sceneSetup, s32 roomIndex, s32 playerParams, Vec3f* pos, s16 yaw); +void Play_SetupRespawnPoint(GameState* gameState, s32 respawnNumber, s32 playerParams); +void func_80169EFC(GameState* gameState); +void func_80169F78(GameState* gameState); +void func_80169FDC(GameState* gameState); +s32 func_80169FFC(GameState* gameState); +s32 FrameAdvance_IsEnabled(GameState* gameState); +s32 func_8016A02C(GameState* gameState, Actor* actor, s16* yaw); +s32 Play_IsUnderwater(GlobalContext* globalCtx, Vec3f* pos); s32 func_8016A168(void); -// void func_8016A178(void); -void func_8016A268(GlobalContext* globalCtx, s32 param_2, s32 param_3, s32 param_4, s32 param_5, s32 param_6); +void Play_AssignPlayerActorCsIdsFromScene(GameState* gameState, s32 cutscene); +void func_8016A268(GameState* gameState, s16 arg1, u8 arg2, u8 arg3, u8 arg4, u8 arg5); void Play_Init(GameState* gameState); // void func_8016AC10(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10); // void func_8016AE1C(void); diff --git a/include/z64.h b/include/z64.h index 4c875ca7ec..189937fb71 100644 --- a/include/z64.h +++ b/include/z64.h @@ -1291,7 +1291,7 @@ struct GlobalContext { /* 0x18790 */ void (*unk_18790)(struct GlobalContext* globalCtx, s16 arg1, Actor* actor); /* 0x18794 */ void* unk_18794; //! @TODO: Determine function prototype /* 0x18798 */ s32 (*setPlayerTalkAnim)(struct GlobalContext* globalCtx, void* talkAnim, s32 arg2); - /* 0x1879C */ s16 unk_1879C[10]; + /* 0x1879C */ s16 playerActorCsIds[10]; /* 0x187B0 */ MtxF viewProjectionMtxF; /* 0x187F0 */ Vec3f unk_187F0; /* 0x187FC */ MtxF billboardMtxF; @@ -1319,7 +1319,7 @@ struct GlobalContext { /* 0x1887C */ s8 unk_1887C; /* 0x1887D */ s8 unk_1887D; /* 0x1887E */ s8 unk_1887E; - /* 0x1887F */ u8 unk_1887F; + /* 0x1887F */ u8 unk_1887F; // fadeTransition /* 0x18880 */ u8 unk_18880; /* 0x18884 */ CollisionCheckContext colChkCtx; /* 0x18B20 */ u16 envFlags[20]; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 064ee0a88c..08a230e162 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -2016,7 +2016,7 @@ s32 Actor_PickUp(Actor* actor, GlobalContext* globalCtx, s32 getItemId, f32 xzRa player->getItemDirection = absYawDiff; if ((getItemId > GI_NONE) && (getItemId < GI_MAX)) { - ActorCutscene_SetIntentToPlay(globalCtx->unk_1879C[1]); + ActorCutscene_SetIntentToPlay(globalCtx->playerActorCsIds[1]); } return true; @@ -2237,7 +2237,7 @@ void Actor_InitContext(GlobalContext* globalCtx, ActorContext* actorCtx, ActorEn s32 i; gSaveContext.weekEventReg[92] |= 0x80; - cycleFlags = &gSaveContext.cycleSceneFlags[convert_scene_number_among_shared_scenes(globalCtx->sceneNum)]; + cycleFlags = &gSaveContext.cycleSceneFlags[Play_GetOriginalSceneNumber(globalCtx->sceneNum)]; bzero(actorCtx, sizeof(ActorContext)); ActorOverlayTable_Init(); @@ -3037,7 +3037,7 @@ void Actor_CleanupContext(ActorContext* actorCtx, GlobalContext* globalCtx) { actorCtx->absoluteSpace = NULL; } - func_80169D40(globalCtx); + Play_SaveCycleSceneFlags(&globalCtx->state); ActorOverlayTable_Cleanup(); } diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index ddf21fe172..a08e3f822a 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -1145,7 +1145,7 @@ ColChkResetFunc sATResetFuncs[] = { s32 CollisionCheck_SetAT(GlobalContext* globalCtx, CollisionCheckContext* colCtxt, Collider* collider) { s32 index; - if (FrameAdvance_IsEnabled(globalCtx)) { + if (FrameAdvance_IsEnabled(&globalCtx->state)) { return -1; } sATResetFuncs[collider->shape](globalCtx, collider); @@ -1171,7 +1171,7 @@ s32 CollisionCheck_SetAT(GlobalContext* globalCtx, CollisionCheckContext* colCtx * will be inserted into the next slot. */ s32 CollisionCheck_SetAT_SAC(GlobalContext* globalCtx, CollisionCheckContext* colCtxt, Collider* collider, s32 index) { - if (FrameAdvance_IsEnabled(globalCtx)) { + if (FrameAdvance_IsEnabled(&globalCtx->state)) { return -1; } sATResetFuncs[collider->shape](globalCtx, collider); @@ -1205,7 +1205,7 @@ ColChkResetFunc sACResetFuncs[] = { s32 CollisionCheck_SetAC(GlobalContext* globalCtx, CollisionCheckContext* colCtxt, Collider* collider) { s32 index; - if (FrameAdvance_IsEnabled(globalCtx)) { + if (FrameAdvance_IsEnabled(&globalCtx->state)) { return -1; } sACResetFuncs[collider->shape](globalCtx, collider); @@ -1231,7 +1231,7 @@ s32 CollisionCheck_SetAC(GlobalContext* globalCtx, CollisionCheckContext* colCtx * will be inserted into the next slot */ s32 CollisionCheck_SetAC_SAC(GlobalContext* globalCtx, CollisionCheckContext* colCtxt, Collider* collider, s32 index) { - if (FrameAdvance_IsEnabled(globalCtx)) { + if (FrameAdvance_IsEnabled(&globalCtx->state)) { return -1; } sACResetFuncs[collider->shape](globalCtx, collider); @@ -1265,7 +1265,7 @@ ColChkResetFunc sOCResetFuncs[] = { s32 CollisionCheck_SetOC(GlobalContext* globalCtx, CollisionCheckContext* colCtxt, Collider* collider) { s32 index; - if (FrameAdvance_IsEnabled(globalCtx)) { + if (FrameAdvance_IsEnabled(&globalCtx->state)) { return -1; } sOCResetFuncs[collider->shape](globalCtx, collider); @@ -1291,7 +1291,7 @@ s32 CollisionCheck_SetOC(GlobalContext* globalCtx, CollisionCheckContext* colCtx * will be inserted into the next slot. */ s32 CollisionCheck_SetOC_SAC(GlobalContext* globalCtx, CollisionCheckContext* colCtxt, Collider* collider, s32 index) { - if (FrameAdvance_IsEnabled(globalCtx)) { + if (FrameAdvance_IsEnabled(&globalCtx->state)) { return -1; } sOCResetFuncs[collider->shape](globalCtx, collider); @@ -1323,7 +1323,7 @@ s32 CollisionCheck_SetOC_SAC(GlobalContext* globalCtx, CollisionCheckContext* co s32 CollisionCheck_SetOCLine(GlobalContext* globalCtx, CollisionCheckContext* colCtxt, OcLine* line) { s32 index; - if (FrameAdvance_IsEnabled(globalCtx)) { + if (FrameAdvance_IsEnabled(&globalCtx->state)) { return -1; } diff --git a/src/code/z_effect.c b/src/code/z_effect.c index dd696393ff..4c446b6501 100644 --- a/src/code/z_effect.c +++ b/src/code/z_effect.c @@ -124,7 +124,7 @@ void Effect_Add(GlobalContext* globalCtx, s32* pIndex, s32 type, u8 arg3, u8 arg *pIndex = TOTAL_EFFECT_COUNT; - if (FrameAdvance_IsEnabled(globalCtx) != true) { + if (FrameAdvance_IsEnabled(&globalCtx->state) != true) { slotFound = false; switch (type) { case EFFECT_SPARK: diff --git a/src/code/z_effect_soft_sprite.c b/src/code/z_effect_soft_sprite.c index 43307bbc8a..fd1d0212c7 100644 --- a/src/code/z_effect_soft_sprite.c +++ b/src/code/z_effect_soft_sprite.c @@ -152,7 +152,7 @@ s32 EffectSS_FindFreeSpace(s32 priority, s32* tableEntry) { void EffectSS_Copy(GlobalContext* globalCtx, EffectSs* effectsSs) { s32 index; - if (FrameAdvance_IsEnabled(globalCtx) != true) { + if (FrameAdvance_IsEnabled(&globalCtx->state) != true) { if (EffectSS_FindFreeSpace(effectsSs->priority, &index) == 0) { sEffectSsInfo.searchIndex = index + 1; sEffectSsInfo.data_table[index] = *effectsSs; diff --git a/src/code/z_game_over.c b/src/code/z_game_over.c index 15f3a66935..6b375ecf87 100644 --- a/src/code/z_game_over.c +++ b/src/code/z_game_over.c @@ -67,7 +67,7 @@ void GameOver_Update(GlobalContext* globalCtx) { break; case GAMEOVER_DEATH_FADE_OUT: if (func_801A8A50(1) != NA_BGM_GAME_OVER) { - func_80169F78(globalCtx); + func_80169F78(&globalCtx->state); if (gSaveContext.respawnFlag != -7) { gSaveContext.respawnFlag = -6; } diff --git a/src/code/z_play.c b/src/code/z_play.c index a14359be70..b5c2b15c89 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -110,34 +110,254 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_GetCsCamDataVec3s.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/convert_scene_number_among_shared_scenes.s") +/** + * Converts the number of a scene to its "original" equivalent, the default version of the area which the player first + * enters. + */ +s16 Play_GetOriginalSceneNumber(s16 sceneNum) { + // Inverted Stone Tower Temple -> Stone Tower Temple + if (sceneNum == SCENE_INISIE_R) { + return SCENE_INISIE_N; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169D40.s") + // Purified Southern Swamp -> Poisoned Sothern Swamp + if (sceneNum == SCENE_20SICHITAI2) { + return SCENE_20SICHITAI; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169DCC.s") + // Spring Mountain Village -> Winter Mountain Village + if (sceneNum == SCENE_10YUKIYAMANOMURA2) { + return SCENE_10YUKIYAMANOMURA; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169E6C.s") + // Spring Goron Village -> Winter Goron Village + if (sceneNum == SCENE_11GORONNOSATO2) { + return SCENE_11GORONNOSATO; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169ECC.s") + // Spring Path to Goron Village -> Winter Path to Goron Village + if (sceneNum == SCENE_17SETUGEN2) { + return SCENE_17SETUGEN; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169EFC.s") + // Inverted Stone Tower -> Stone Tower + if (sceneNum == SCENE_F41) { + return SCENE_F40; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169F78.s") + return sceneNum; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169FDC.s") +/** + * Copies the flags set in ActorContext over to the current scene's CycleSceneFlags, usually using the original scene + * number. Exception for Inverted Stone Tower Temple, which uses its own. + */ +void Play_SaveCycleSceneFlags(GameState* gameState) { + GlobalContext* globalCtx = (GlobalContext*)gameState; + CycleSceneFlags* cycleSceneFlags; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_80169FFC.s") + cycleSceneFlags = &gSaveContext.cycleSceneFlags[Play_GetOriginalSceneNumber(globalCtx->sceneNum)]; + cycleSceneFlags->chest = globalCtx->actorCtx.flags.chest; + cycleSceneFlags->swch0 = globalCtx->actorCtx.flags.switches[0]; + cycleSceneFlags->swch1 = globalCtx->actorCtx.flags.switches[1]; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/FrameAdvance_IsEnabled.s") + if (globalCtx->sceneNum == SCENE_INISIE_R) { // Inverted Stone Tower Temple + cycleSceneFlags = &gSaveContext.cycleSceneFlags[globalCtx->sceneNum]; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_8016A02C.s") + cycleSceneFlags->collectible = globalCtx->actorCtx.flags.collectible[0]; + cycleSceneFlags->clearedRoom = globalCtx->actorCtx.flags.clearedRoom; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_8016A0AC.s") +void Play_SetRespawnData(GameState* gameState, s32 respawnMode, u16 entranceIndex, s32 roomIndex, s32 playerParams, + Vec3f* pos, s16 yaw) { + GlobalContext* globalCtx = (GlobalContext*)gameState; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_8016A168.s") + gSaveContext.respawn[respawnMode].entranceIndex = Entrance_CreateIndex(entranceIndex >> 9, 0, entranceIndex & 0xF); + gSaveContext.respawn[respawnMode].roomIndex = roomIndex; + gSaveContext.respawn[respawnMode].pos = *pos; + gSaveContext.respawn[respawnMode].yaw = yaw; + gSaveContext.respawn[respawnMode].playerParams = playerParams; + gSaveContext.respawn[respawnMode].tempSwchFlags = globalCtx->actorCtx.flags.switches[2]; + gSaveContext.respawn[respawnMode].unk_18 = globalCtx->actorCtx.flags.collectible[1]; + gSaveContext.respawn[respawnMode].tempCollectFlags = globalCtx->actorCtx.flags.collectible[2]; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_8016A178.s") +void Play_SetupRespawnPoint(GameState* gameState, s32 respawnMode, s32 playerParams) { + GlobalContext* globalCtx = (GlobalContext*)gameState; + Player* player = GET_PLAYER(globalCtx); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_8016A268.s") + if (globalCtx->sceneNum != SCENE_KAKUSIANA) { // Grottos + Play_SetRespawnData(&globalCtx->state, respawnMode, (u16)((void)0, gSaveContext.entranceIndex), + globalCtx->roomCtx.currRoom.num, playerParams, &player->actor.world.pos, + player->actor.shape.rot.y); + } +} + +// Override respawn data in Sakon's Hideout +void func_80169ECC(GlobalContext* globalCtx) { + if (globalCtx->sceneNum == SCENE_SECOM) { + globalCtx->nextEntranceIndex = 0x2060; + gSaveContext.respawnFlag = -7; + } +} + +// Gameplay_TriggerVoidOut ? +// Used by Player, Ikana_Rotaryroom, Bji01, Kakasi, LiftNuts, Test4, Warptag, WarpUzu, Roomtimer +void func_80169EFC(GameState* gameState) { + GlobalContext* globalCtx = (GlobalContext*)gameState; + + gSaveContext.respawn[0].tempSwchFlags = globalCtx->actorCtx.flags.switches[2]; + gSaveContext.respawn[0].unk_18 = globalCtx->actorCtx.flags.collectible[1]; + gSaveContext.respawn[0].tempCollectFlags = globalCtx->actorCtx.flags.collectible[2]; + globalCtx->nextEntranceIndex = gSaveContext.respawn[0].entranceIndex; + gSaveContext.respawnFlag = 1; + func_80169ECC(globalCtx); + globalCtx->sceneLoadFlag = 0x14; + globalCtx->unk_1887F = 2; +} + +// Gameplay_LoadToLastEntrance ? +// Used by game_over and Test7 +void func_80169F78(GameState* gameState) { + GlobalContext* globalCtx = (GlobalContext*)gameState; + + globalCtx->nextEntranceIndex = gSaveContext.respawn[2].entranceIndex; + gSaveContext.respawnFlag = -1; + func_80169ECC(globalCtx); + globalCtx->sceneLoadFlag = 0x14; + globalCtx->unk_1887F = 2; +} + +// Gameplay_TriggerRespawn ? +// Used for void by Wallmaster, Deku Shrine doors. Also used by Player, Kaleido, DoorWarp1 +void func_80169FDC(GameState* gameState) { + func_80169F78(gameState); +} + +// Used by Kankyo to determine how to change the lighting, e.g. for game over. +s32 func_80169FFC(GameState* gameState) { + GlobalContext* globalCtx = (GlobalContext*)gameState; + + return globalCtx->roomCtx.currRoom.mesh->type0.type != 1; +} + +s32 FrameAdvance_IsEnabled(GameState* gameState) { + GlobalContext* globalCtx = (GlobalContext*)gameState; + + return globalCtx->frameAdvCtx.enabled != 0; +} + +// Unused, unchanged from OoT, which uses it only in one Camera function. +/** + * @brief Tests if \p actor is a door and the sides are different rooms. + * + * @param[in] gameState GameState, promoted to globalCtx inside. + * @param[in] actor Actor to test. + * @param[out] yaw Facing angle of the actor, or reverse if in the back room. + * @return true if \p actor is a door and the sides are in different rooms, false otherwise + */ +s32 func_8016A02C(GameState* gameState, Actor* actor, s16* yaw) { + GlobalContext* globalCtx = (GlobalContext*)gameState; + TransitionActorEntry* transitionActor; + s8 frontRoom; + + if (actor->category != ACTORCAT_DOOR) { + return false; + } + + transitionActor = &globalCtx->doorCtx.transitionActorList[(u16)actor->params >> 10]; + frontRoom = transitionActor->sides[0].room; + if (frontRoom == transitionActor->sides[1].room) { + return false; + } + + if (frontRoom == actor->room) { + *yaw = actor->shape.rot.y; + } else { + *yaw = actor->shape.rot.y + 0x8000; + } + + return true; +} + +// Unused +/** + * @brief Tests if \p pos is underwater. + * + * @param[in] globalCtx GlobalContext + * @param[in] pos position to test + * @return true if inside a waterbox and not above a void. + */ +s32 Play_IsUnderwater(GlobalContext* globalCtx, Vec3f* pos) { + WaterBox* waterBox; + CollisionPoly* poly; + Vec3f waterSurfacePos; + s32 bgId; + + waterSurfacePos = *pos; + + if ((WaterBox_GetSurface1(globalCtx, &globalCtx->colCtx, waterSurfacePos.x, waterSurfacePos.z, &waterSurfacePos.y, + &waterBox) == true) && + (pos->y < waterSurfacePos.y) && + (BgCheck_EntityRaycastFloor3(&globalCtx->colCtx, &poly, &bgId, &waterSurfacePos) != BGCHECK_Y_MIN)) { + return true; + } else { + return false; + } +} + +// z_demo and EnTest4 +// This data appears to be a boolean. It is only set by Play_Init. +s32 func_8016A168(void) { + return D_801D0D50; +} + +// A mapping from playerActorCsIds to sGlobalCamDataSettings indices. +extern s16 D_801D0D64[]; +// s16 D_801D0D64[] = { -3, -2, -4, -5, -7, -11, -8, -9, -6, -16 }; + +// Used by Player +/** + * Extract the common actor cutscene ids used by Player from the scene and set the actor cutscene ids in + * globalCtx->playerActorCsIds. If a playerActorCsId is not present in the scene, then that particular id is set + * to -1. Otherwise, if there is an ActorCutscene where csCamSceneDataId matches the appropriate element of D_801D0D64, + * set the corresponding playerActorCsId (and possibly change its priority for the zeroth one) + */ +void Play_AssignPlayerActorCsIdsFromScene(GameState* gameState, s32 startActorCsId) { + GlobalContext* globalCtx = (GlobalContext*)gameState; + s32 i; + s16* curPlayerActorCsId = globalCtx->playerActorCsIds; + s16* phi_s1 = D_801D0D64; + + for (i = 0; i < ARRAY_COUNT(globalCtx->playerActorCsIds); i++, curPlayerActorCsId++, phi_s1++) { + ActorCutscene* actorCutscene; + s32 curActorCsId; + + *curPlayerActorCsId = -1; + + for (curActorCsId = startActorCsId; curActorCsId != -1; curActorCsId = actorCutscene->additionalCutscene) { + actorCutscene = ActorCutscene_GetCutscene(curActorCsId); + + if (actorCutscene->csCamSceneDataId == *phi_s1) { + if ((actorCutscene->csCamSceneDataId == -3) && + (actorCutscene->priority == 700)) { // override ocarina cs priority + actorCutscene->priority = 550; + } + *curPlayerActorCsId = curActorCsId; + break; + } + } + } +} + +// These regs are used by Gameplay_Draw, and several actors, purpose as yet unclear. +void func_8016A268(GameState* gameState, s16 arg1, u8 arg2, u8 arg3, u8 arg4, u8 arg5) { + MREG(64) = arg1; + MREG(65) = arg2; + MREG(66) = arg3; + MREG(67) = arg4; + MREG(68) = arg5; +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_Init.s") diff --git a/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c b/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c index 13d8161e2b..a3b234392b 100644 --- a/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c +++ b/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c @@ -647,7 +647,7 @@ void func_80B814B8(BgIkanaRotaryroom* this, GlobalContext* globalCtx) { if (ActorCutscene_GetCurrentIndex() == this->dyna.actor.cutscene) { if (player->actor.bgCheckFlags & 0x100) { func_800B8E58(player, NA_SE_VO_LI_DAMAGE_S + player->ageProperties->unk_92); - func_80169EFC(globalCtx); + func_80169EFC(&globalCtx->state); func_800B8E58(player, NA_SE_VO_LI_TAKEN_AWAY + player->ageProperties->unk_92); globalCtx->unk_18845 = 1; play_sound(NA_SE_OC_ABYSS); diff --git a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c index 2017e960b5..b32140c83b 100644 --- a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c +++ b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c @@ -1566,7 +1566,7 @@ void DmStk_Update(Actor* thisx, GlobalContext* globalCtx) { } if ((globalCtx->actorCtx.unk5 & 2) && (globalCtx->msgCtx.msgMode != 0) && - (globalCtx->msgCtx.unk11F04 == 0x5E6) && !FrameAdvance_IsEnabled(globalCtx) && + (globalCtx->msgCtx.unk11F04 == 0x5E6) && !FrameAdvance_IsEnabled(&globalCtx->state) && (globalCtx->sceneLoadFlag == 0) && (ActorCutscene_GetCurrentIndex() == -1) && (globalCtx->csCtx.state == 0)) { time = gSaveContext.time; diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c index 85a7a9bc86..73d9911f99 100644 --- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -147,7 +147,7 @@ void DoorAna_WaitOpen(DoorAna* this, GlobalContext* globalCtx) { // unused in vanilla, the highest params bits can directly index an address entranceIndex = GET_DOORANA_DIRECT_ENTRANCE(this); - func_80169E6C(globalCtx, 3, 0x4FF); + Play_SetupRespawnPoint(&globalCtx->state, 3, 0x4FF); gSaveContext.respawn[3].pos.y = this->actor.world.pos.y; gSaveContext.respawn[3].yaw = this->actor.home.rot.y; diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index a1a738fee8..56f39772a6 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -376,7 +376,7 @@ void func_808B93A0(DoorWarp1* this, GlobalContext* globalCtx) { } void func_808B94A4(DoorWarp1* this, GlobalContext* globalCtx) { - if (!func_808B866C(this, globalCtx) && (ActorCutscene_GetCurrentIndex() != globalCtx->unk_1879C[8])) { + if (!func_808B866C(this, globalCtx) && (ActorCutscene_GetCurrentIndex() != globalCtx->playerActorCsIds[8])) { DoorWarp1_SetupAction(this, func_808B921C); } func_808BB8D4(this, globalCtx, 1); @@ -384,10 +384,10 @@ void func_808B94A4(DoorWarp1* this, GlobalContext* globalCtx) { } void func_808B9524(DoorWarp1* this, GlobalContext* globalCtx) { - if (!ActorCutscene_GetCanPlayNext(globalCtx->unk_1879C[9])) { - ActorCutscene_SetIntentToPlay(globalCtx->unk_1879C[9]); + if (!ActorCutscene_GetCanPlayNext(globalCtx->playerActorCsIds[9])) { + ActorCutscene_SetIntentToPlay(globalCtx->playerActorCsIds[9]); } else { - ActorCutscene_Start(globalCtx->unk_1879C[9], NULL); + ActorCutscene_Start(globalCtx->playerActorCsIds[9], NULL); DoorWarp1_SetupAction(this, func_808B958C); } } @@ -456,10 +456,10 @@ void func_808B977C(DoorWarp1* this, GlobalContext* globalCtx) { } void func_808B9840(DoorWarp1* this, GlobalContext* globalCtx) { - if (!ActorCutscene_GetCanPlayNext(globalCtx->unk_1879C[9])) { - ActorCutscene_SetIntentToPlay(globalCtx->unk_1879C[9]); + if (!ActorCutscene_GetCanPlayNext(globalCtx->playerActorCsIds[9])) { + ActorCutscene_SetIntentToPlay(globalCtx->playerActorCsIds[9]); } else { - ActorCutscene_Start(globalCtx->unk_1879C[9], NULL); + ActorCutscene_Start(globalCtx->playerActorCsIds[9], NULL); DoorWarp1_SetupAction(this, func_808B98A8); } } @@ -488,7 +488,7 @@ void func_808B98A8(DoorWarp1* this, GlobalContext* globalCtx) { Scene_SetExitFade(globalCtx); globalCtx->sceneLoadFlag = 0x14; } else { - func_80169FDC(globalCtx); + func_80169FDC(&globalCtx->state); } } } @@ -615,10 +615,10 @@ void func_808B9FD0(DoorWarp1* this, GlobalContext* globalCtx) { return; } - if (!ActorCutscene_GetCanPlayNext(globalCtx->unk_1879C[9])) { - ActorCutscene_SetIntentToPlay(globalCtx->unk_1879C[9]); + if (!ActorCutscene_GetCanPlayNext(globalCtx->playerActorCsIds[9])) { + ActorCutscene_SetIntentToPlay(globalCtx->playerActorCsIds[9]); } else { - ActorCutscene_Start(globalCtx->unk_1879C[9], NULL); + ActorCutscene_Start(globalCtx->playerActorCsIds[9], NULL); Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, &D_801DB4B8); Animation_ChangeImpl(&this->skelAnime, &object_warp1_Anim_001374, 1.0f, Animation_GetLastFrame(&object_warp1_Anim_001374.common), @@ -767,7 +767,7 @@ void func_808BA10C(DoorWarp1* this, GlobalContext* globalCtx) { Scene_SetExitFade(globalCtx); globalCtx->sceneLoadFlag = 0x14; } else { - func_80169FDC(globalCtx); + func_80169FDC(&globalCtx->state); } } diff --git a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c index 53bdc09953..8faf1cdba6 100644 --- a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c +++ b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c @@ -299,7 +299,7 @@ void func_809CD634(EnBji01* this, GlobalContext* globalCtx) { Audio_QueueSeqCmd(0xE0000101); globalCtx->nextEntranceIndex = 0x54A0; /* Termina Field from telescope */ gSaveContext.respawn[0].entranceIndex = globalCtx->nextEntranceIndex; - func_80169EFC(globalCtx); /* Load new entrance? */ + func_80169EFC(&globalCtx->state); /* Load new entrance? */ gSaveContext.respawnFlag = -2; this->actionFunc = EnBji01_DoNothing; } diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 9f4bdb7285..c04cd1e9ea 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -262,7 +262,7 @@ void func_80997E4C(EnGs* this, GlobalContext* globalCtx) { } void func_80997FF0(EnGs* this, GlobalContext* globalCtx) { - if (SubS_StartActorCutscene(&this->actor, globalCtx->unk_1879C[0], -1, SUBS_CUTSCENE_NORMAL)) { + if (SubS_StartActorCutscene(&this->actor, globalCtx->playerActorCsIds[0], -1, SUBS_CUTSCENE_NORMAL)) { func_80998040(this, globalCtx); } } @@ -339,7 +339,7 @@ void func_8099807C(EnGs* this, GlobalContext* globalCtx) { void func_80998300(EnGs* this, GlobalContext* globalCtx) { if (this->actor.cutscene != -1) { - ActorCutscene_Stop(globalCtx->unk_1879C[0]); + ActorCutscene_Stop(globalCtx->playerActorCsIds[0]); } } diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index f1d1737e45..2107be0b3f 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -934,9 +934,9 @@ void EnKakasi_DancingNightAway(EnKakasi* this, GlobalContext* globalCtx) { if (this->unk204 == 0) { player = GET_PLAYER(globalCtx); - func_80169DCC(globalCtx, 0, Entrance_CreateIndexFromSpawn(0), player->unk_3CE, 0xBFF, &player->unk_3C0, - player->unk_3CC); - func_80169EFC(globalCtx); + Play_SetRespawnData(&globalCtx->state, 0, Entrance_CreateIndexFromSpawn(0), player->unk_3CE, 0xBFF, + &player->unk_3C0, player->unk_3CC); + func_80169EFC(&globalCtx->state); if (0) {} if (gSaveContext.time > CLOCK_TIME(18, 0) || gSaveContext.time < CLOCK_TIME(6, 0)) { diff --git a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c index 8ce5507737..c87e30329f 100644 --- a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c +++ b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c @@ -58,7 +58,7 @@ void func_8096B104(EnOkarinaEffect* this, GlobalContext* globalCtx) { void func_8096B174(EnOkarinaEffect* this, GlobalContext* globalCtx) { DECR(this->unk144); if (!globalCtx->pauseCtx.state && !globalCtx->gameOverCtx.state && !globalCtx->msgCtx.unk11F10 && - !FrameAdvance_IsEnabled(globalCtx) && this->unk144 == 0) { + !FrameAdvance_IsEnabled(&globalCtx->state) && this->unk144 == 0) { EnOkarinaEffect_SetupAction(this, func_8096B1FC); } } diff --git a/src/overlays/actors/ovl_En_Test4/z_en_test4.c b/src/overlays/actors/ovl_En_Test4/z_en_test4.c index 7913231237..6886d2b29e 100644 --- a/src/overlays/actors/ovl_En_Test4/z_en_test4.c +++ b/src/overlays/actors/ovl_En_Test4/z_en_test4.c @@ -399,9 +399,9 @@ void func_80A42AB8(EnTest4* this, GlobalContext* globalCtx) { func_80A41FA4(this, globalCtx); } else { gSaveContext.unk_3F64 = 0.0f; - func_80169DCC(globalCtx, 0, Entrance_CreateIndexFromSpawn(0), player->unk_3CE, 0xBFF, - &player->unk_3C0, player->unk_3CC); - func_80169EFC(globalCtx); + Play_SetRespawnData(&globalCtx->state, 0, Entrance_CreateIndexFromSpawn(0), player->unk_3CE, 0xBFF, + &player->unk_3C0, player->unk_3CC); + func_80169EFC(&globalCtx->state); if (player->stateFlags1 & 0x800000) { EnHorse* rideActor = (EnHorse*)player->rideActor; @@ -440,16 +440,16 @@ void func_80A42AB8(EnTest4* this, GlobalContext* globalCtx) { if ((this->nextBellTime == CLOCK_TIME(0, 0)) && ((gSaveContext.inventory.items[SLOT_OCARINA] == ITEM_NONE) || (globalCtx->sceneNum == SCENE_CLOCKTOWER))) { - s32 phi_v0; + s32 playerParams; u32 entranceIndex = gSaveContext.entranceIndex; if ((globalCtx->actorCtx.unk5 & 2)) { - phi_v0 = 0xCFF; + playerParams = 0xCFF; } else { - phi_v0 = 0xBFF; + playerParams = 0xBFF; } - func_80169DCC(globalCtx, 1, entranceIndex, player->unk_3CE, phi_v0, &player->unk_3C0, - player->unk_3CC); + Play_SetRespawnData(&globalCtx->state, 1, entranceIndex, player->unk_3CE, playerParams, + &player->unk_3C0, player->unk_3CC); if ((globalCtx->sceneNum == SCENE_TENMON_DAI) || (globalCtx->sceneNum == SCENE_00KEIKOKU)) { globalCtx->nextEntranceIndex = 0x5400; diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index 98ea88f83b..22ebc78b57 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -74,7 +74,8 @@ void EnTorch2_Destroy(Actor* thisx, GlobalContext* globalCtx) { EnTorch2* this = THIS; Collider_DestroyCylinder(globalCtx, &this->collider); - func_80169DCC(globalCtx, this->actor.params + 3, 0xFF, 0, 0xBFF, &this->actor.world.pos, this->actor.shape.rot.y); + Play_SetRespawnData(&globalCtx->state, this->actor.params + 3, 0xFF, 0, 0xBFF, &this->actor.world.pos, + this->actor.shape.rot.y); globalCtx->actorCtx.unk254[this->actor.params] = 0; } diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.h b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.h index 70e5cd7cfb..744a7975c9 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.h +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.h @@ -14,19 +14,19 @@ typedef struct EnTorch2 { } EnTorch2; // size = 0x194 typedef enum { - TORCH2_PARAM_HUMAN, - TORCH2_PARAM_GORON, - TORCH2_PARAM_ZORA, - TORCH2_PARAM_DEKU, - TORCH2_PARAM_FIERCE_DEITY, + /* 0 */ TORCH2_PARAM_HUMAN, + /* 1 */ TORCH2_PARAM_GORON, + /* 2 */ TORCH2_PARAM_ZORA, + /* 3 */ TORCH2_PARAM_DEKU, + /* 4 */ TORCH2_PARAM_FIERCE_DEITY, } EnTorch2Param; typedef enum { - TORCH2_STATE_INITIALIZED, - TORCH2_STATE_FADING_IN, - TORCH2_STATE_SOLID, - TORCH2_STATE_IDLE, - TORCH2_STATE_DYING, + /* 0 */ TORCH2_STATE_INITIALIZED, + /* 1 */ TORCH2_STATE_FADING_IN, + /* 2 */ TORCH2_STATE_SOLID, + /* 3 */ TORCH2_STATE_IDLE, + /* 4 */ TORCH2_STATE_DYING, } EnTorch2State; extern const ActorInit En_Torch2_InitVars; diff --git a/src/overlays/actors/ovl_En_Tru/z_en_tru.c b/src/overlays/actors/ovl_En_Tru/z_en_tru.c index db7b7a1fc0..7a4a221700 100644 --- a/src/overlays/actors/ovl_En_Tru/z_en_tru.c +++ b/src/overlays/actors/ovl_En_Tru/z_en_tru.c @@ -944,7 +944,7 @@ s32 func_80A87B48(Actor* thisx, GlobalContext* globalCtx) { sp4C.z = 40.0f; Lib_Vec3f_TranslateAndRotateY(&this->actor.world.pos, sp3E, &sp4C, &sp40); func_80A85620(this->unk_394, &sp40, 2.0f, 0.08f, 60.0f); - func_8016A268(globalCtx, 1, 160, 160, 160, 0); + func_8016A268(&globalCtx->state, 1, 160, 160, 160, 0); this->unk_370 = 20; this->unk_372 = 10; this->unk_364++; diff --git a/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.c b/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.c index 3c19559afe..ffbb9526b8 100644 --- a/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.c +++ b/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.c @@ -113,7 +113,7 @@ void func_80A66278(EnWarpUzu* this, GlobalContext* globalCtx) { void func_80A66384(EnWarpUzu* this, GlobalContext* globalCtx) { globalCtx->nextEntranceIndex = 0x22A0; gSaveContext.respawn[0].entranceIndex = globalCtx->nextEntranceIndex; - func_80169EFC(globalCtx); + func_80169EFC(&globalCtx->state); gSaveContext.respawnFlag = -2; this->actionFunc = EnWarpUzu_DoNothing; } diff --git a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c index b15cb51194..3334164bcc 100644 --- a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c +++ b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c @@ -485,7 +485,7 @@ void EnWeatherTag_Update(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc(this, globalCtx); if ((globalCtx->actorCtx.unk5 & 2) && (globalCtx->msgCtx.msgMode != 0) && (globalCtx->msgCtx.unk11F04 == 0x5E6) && - (!FrameAdvance_IsEnabled(globalCtx)) && (globalCtx->sceneLoadFlag == 0) && + (!FrameAdvance_IsEnabled(&globalCtx->state)) && (globalCtx->sceneLoadFlag == 0) && (ActorCutscene_GetCurrentIndex() == -1) && (globalCtx->csCtx.state == 0)) { oldTime = gSaveContext.time; diff --git a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c index a1cc93b9fd..ff0c8d2700 100644 --- a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c +++ b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c @@ -68,7 +68,7 @@ void func_80973D3C(ObjRoomtimer* this, GlobalContext* globalCtx) { this->actionFunc = func_80973DE0; } else if (this->actor.params != 0x1FF && gSaveContext.unk_3DD0[4] == 0) { play_sound(NA_SE_OC_ABYSS); - func_80169EFC(globalCtx); + func_80169EFC(&globalCtx->state); Actor_MarkForDeath(&this->actor); } } diff --git a/tools/actorfixer.py b/tools/actorfixer.py index 2c18ac2d04..0d50455010 100755 --- a/tools/actorfixer.py +++ b/tools/actorfixer.py @@ -409,6 +409,11 @@ animdict = { "func_800A81F0": "EffectBlure_AddVertex", "func_800A8514": "EffectBlure_AddSpace", "Effect_GetParams": "Effect_GetByIndex", + "convert_scene_number_among_shared_scenes": "Play_GetOriginalSceneNumber", + "func_80169D40": "Play_SaveCycleSceneFlags", + "func_80169DCC": "Play_SetRespawnData", + "func_80169E6C": "Play_SetupRespawnPoint", + "func_8016A0AC": "Play_IsUnderwater", "func_800F5A8C": "Environment_LerpWeight", "func_801A3F54": "Audio_SetCutsceneFlag", "func_801518B0": "Message_StartTextbox", diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index 7236e45218..672d67bec6 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -3024,10 +3024,10 @@ 0x80169BF8:("func_80169BF8",), 0x80169C64:("Play_GetCsCamDataSetting",), 0x80169C84:("Play_GetCsCamDataVec3s",), - 0x80169CBC:("convert_scene_number_among_shared_scenes",), - 0x80169D40:("func_80169D40",), - 0x80169DCC:("func_80169DCC",), - 0x80169E6C:("func_80169E6C",), + 0x80169CBC:("Play_GetOriginalSceneNumber",), + 0x80169D40:("Play_SaveCycleSceneFlags",), + 0x80169DCC:("Play_SetRespawnData",), + 0x80169E6C:("Play_SetupRespawnPoint",), 0x80169ECC:("func_80169ECC",), 0x80169EFC:("func_80169EFC",), 0x80169F78:("func_80169F78",), @@ -3035,9 +3035,9 @@ 0x80169FFC:("func_80169FFC",), 0x8016A01C:("FrameAdvance_IsEnabled",), 0x8016A02C:("func_8016A02C",), - 0x8016A0AC:("func_8016A0AC",), + 0x8016A0AC:("Play_IsUnderwater",), 0x8016A168:("func_8016A168",), - 0x8016A178:("func_8016A178",), + 0x8016A178:("Play_AssignPlayerActorCsIdsFromScene",), 0x8016A268:("func_8016A268",), 0x8016A2C8:("Play_Init",), 0x8016AC10:("func_8016AC10",), diff --git a/tools/disasm/variables.txt b/tools/disasm/variables.txt index b01c5729d8..0e5151fedf 100644 --- a/tools/disasm/variables.txt +++ b/tools/disasm/variables.txt @@ -2179,7 +2179,7 @@ 0x801D0D58:("D_801D0D58","UNK_TYPE2","",0x2), 0x801D0D5C:("D_801D0D5C","UNK_TYPE2","",0x2), 0x801D0D60:("D_801D0D60","Input*","",0x4), - 0x801D0D64:("D_801D0D64","UNK_TYPE2","",0x2), + 0x801D0D64:("D_801D0D64","s16","[10]",0x14), 0x801D0D7A:("D_801D0D7A","UNK_TYPE1","",0x1), 0x801D0D80:("D_801D0D80","UNK_TYPE1","",0x1), 0x801D11F4:("D_801D11F4","UNK_TYPE1","",0x1), diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv index c93719e087..109d1df8af 100644 --- a/tools/sizes/code_functions.csv +++ b/tools/sizes/code_functions.csv @@ -2538,10 +2538,10 @@ asm/non_matchings/code/z_play/Play_CameraGetUID.s,Play_CameraGetUID,0x80169BC4,0 asm/non_matchings/code/z_play/func_80169BF8.s,func_80169BF8,0x80169BF8,0x1B asm/non_matchings/code/z_play/Play_GetCsCamDataSetting.s,Play_GetCsCamDataSetting,0x80169C64,0x8 asm/non_matchings/code/z_play/Play_GetCsCamDataVec3s.s,Play_GetCsCamDataVec3s,0x80169C84,0xE -asm/non_matchings/code/z_play/convert_scene_number_among_shared_scenes.s,convert_scene_number_among_shared_scenes,0x80169CBC,0x21 -asm/non_matchings/code/z_play/func_80169D40.s,func_80169D40,0x80169D40,0x23 -asm/non_matchings/code/z_play/func_80169DCC.s,func_80169DCC,0x80169DCC,0x28 -asm/non_matchings/code/z_play/func_80169E6C.s,func_80169E6C,0x80169E6C,0x18 +asm/non_matchings/code/z_play/Play_GetOriginalSceneNumber.s,Play_GetOriginalSceneNumber,0x80169CBC,0x21 +asm/non_matchings/code/z_play/Play_SaveCycleSceneFlags.s,Play_SaveCycleSceneFlags,0x80169D40,0x23 +asm/non_matchings/code/z_play/Play_SetRespawnData.s,Play_SetRespawnData,0x80169DCC,0x28 +asm/non_matchings/code/z_play/Play_SetupRespawnPoint.s,Play_SetupRespawnPoint,0x80169E6C,0x18 asm/non_matchings/code/z_play/func_80169ECC.s,func_80169ECC,0x80169ECC,0xC asm/non_matchings/code/z_play/func_80169EFC.s,func_80169EFC,0x80169EFC,0x1F asm/non_matchings/code/z_play/func_80169F78.s,func_80169F78,0x80169F78,0x19 @@ -2549,7 +2549,7 @@ asm/non_matchings/code/z_play/func_80169FDC.s,func_80169FDC,0x80169FDC,0x8 asm/non_matchings/code/z_play/func_80169FFC.s,func_80169FFC,0x80169FFC,0x8 asm/non_matchings/code/z_play/FrameAdvance_IsEnabled.s,FrameAdvance_IsEnabled,0x8016A01C,0x4 asm/non_matchings/code/z_play/func_8016A02C.s,func_8016A02C,0x8016A02C,0x20 -asm/non_matchings/code/z_play/func_8016A0AC.s,func_8016A0AC,0x8016A0AC,0x2F +asm/non_matchings/code/z_play/Play_IsUnderwater.s,Play_IsUnderwater,0x8016A0AC,0x2F asm/non_matchings/code/z_play/func_8016A168.s,func_8016A168,0x8016A168,0x4 asm/non_matchings/code/z_play/func_8016A178.s,func_8016A178,0x8016A178,0x3C asm/non_matchings/code/z_play/func_8016A268.s,func_8016A268,0x8016A268,0x18