From 9c6461751d81191a94c45e2cf2cf654c583624e8 Mon Sep 17 00:00:00 2001 From: Derek Hensley Date: Sun, 31 Jul 2022 16:44:47 -0700 Subject: [PATCH] sceneNum -> sceneId (#1338) * sceneNum -> sceneId * forgot to save play * scene -> sceneId where appropriate * Missed 1 + format * Update src/code/z_sram.c Co-authored-by: mzxrules * Update src/code/z_sram.c Co-authored-by: mzxrules * PR * Fix Co-authored-by: mzxrules --- include/functions.h | 2 +- include/z64.h | 4 +- include/z64save.h | 4 +- src/code/z_actor.c | 6 +- src/code/z_bgcheck.c | 10 +-- src/code/z_camera.c | 8 +-- src/code/z_demo.c | 8 +-- src/code/z_horse.c | 62 +++++++++---------- src/code/z_kaleido_setup.c | 2 +- src/code/z_kankyo.c | 2 +- src/code/z_map_exp.c | 40 ++++++------ src/code/z_map_mark.c | 2 +- src/code/z_message_PAL.c | 8 +-- src/code/z_parameter.c | 52 ++++++++-------- src/code/z_play.c | 27 ++++---- src/code/z_room.c | 2 +- src/code/z_scene.c | 16 ++--- src/code/z_scene_table.c | 22 +++---- src/code/z_sram.c | 18 +++--- .../ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c | 45 +++++++------- .../ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c | 2 +- src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c | 6 +- .../ovl_Bg_Heavy_Block/z_bg_heavy_block.c | 2 +- .../actors/ovl_Bg_Ingate/z_bg_ingate.c | 2 +- .../z_bg_spot00_hanebasi.c | 2 +- .../z_bg_spot02_objects.c | 4 +- .../ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c | 2 +- .../z_bg_spot16_doughnut.c | 2 +- .../actors/ovl_Boss_Ganon/z_boss_ganon.c | 4 +- src/overlays/actors/ovl_Demo_6K/z_demo_6k.c | 4 +- .../actors/ovl_Demo_Effect/z_demo_effect.c | 14 ++--- .../actors/ovl_Demo_Kankyo/z_demo_kankyo.c | 16 ++--- .../actors/ovl_Door_Shutter/z_door_shutter.c | 12 ++-- .../actors/ovl_Door_Warp1/z_door_warp1.c | 16 ++--- src/overlays/actors/ovl_En_Cow/z_en_cow.c | 2 +- src/overlays/actors/ovl_En_Daiku/z_en_daiku.c | 14 ++--- .../z_en_daiku_kakariko.c | 2 +- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 4 +- src/overlays/actors/ovl_En_Door/z_en_door.c | 12 ++-- src/overlays/actors/ovl_En_Du/z_en_du.c | 6 +- src/overlays/actors/ovl_En_Elf/z_en_elf.c | 2 +- .../actors/ovl_En_Encount1/z_en_encount1.c | 10 +-- .../actors/ovl_En_Encount2/z_en_encount2.c | 16 ++--- .../actors/ovl_En_G_Switch/z_en_g_switch.c | 2 +- src/overlays/actors/ovl_En_Ge1/z_en_ge1.c | 2 +- src/overlays/actors/ovl_En_Ge2/z_en_ge2.c | 2 +- src/overlays/actors/ovl_En_Go/z_en_go.c | 8 +-- .../actors/ovl_En_Goroiwa/z_en_goroiwa.c | 2 +- .../actors/ovl_En_Heishi4/z_en_heishi4.c | 4 +- src/overlays/actors/ovl_En_Holl/z_en_holl.c | 2 +- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 36 +++++------ .../z_en_horse_game_check.c | 2 +- .../z_en_horse_link_child.c | 6 +- .../ovl_En_Horse_Normal/z_en_horse_normal.c | 14 ++--- src/overlays/actors/ovl_En_Hy/z_en_hy.c | 30 ++++----- src/overlays/actors/ovl_En_In/z_en_in.c | 10 +-- src/overlays/actors/ovl_En_Ko/z_en_ko.c | 8 +-- src/overlays/actors/ovl_En_Ma1/z_en_ma1.c | 10 +-- src/overlays/actors/ovl_En_Ma2/z_en_ma2.c | 6 +- src/overlays/actors/ovl_En_Md/z_en_md.c | 31 +++++----- src/overlays/actors/ovl_En_Niw/z_en_niw.c | 8 +-- .../actors/ovl_En_Niw_Lady/z_en_niw_lady.c | 2 +- .../ovl_En_Okarina_Tag/z_en_okarina_tag.c | 4 +- src/overlays/actors/ovl_En_Owl/z_en_owl.c | 2 +- .../ovl_En_River_Sound/z_en_river_sound.c | 2 +- src/overlays/actors/ovl_En_Rl/z_en_rl.c | 4 +- src/overlays/actors/ovl_En_Sa/z_en_sa.c | 34 +++++----- src/overlays/actors/ovl_En_Ta/z_en_ta.c | 8 +-- src/overlays/actors/ovl_En_Tg/z_en_tg.c | 2 +- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 2 +- src/overlays/actors/ovl_En_Toryo/z_en_toryo.c | 2 +- .../actors/ovl_En_Viewer/z_en_viewer.c | 8 +-- .../ovl_En_Wonder_Talk2/z_en_wonder_talk2.c | 2 +- src/overlays/actors/ovl_En_Xc/z_en_xc.c | 26 ++++---- src/overlays/actors/ovl_En_Zl3/z_en_zl3.c | 38 ++++++------ src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c | 4 +- .../actors/ovl_Obj_Hsblock/z_obj_hsblock.c | 2 +- .../actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c | 8 +-- .../ovl_Object_Kankyo/z_object_kankyo.c | 2 +- .../actors/ovl_player_actor/z_player.c | 36 +++++------ .../ovl_kaleido_scope/z_kaleido_map_PAL.c | 2 +- .../ovl_kaleido_scope/z_kaleido_scope_PAL.c | 12 ++-- .../misc/ovl_kaleido_scope/z_lmap_mark.c | 8 +-- 83 files changed, 444 insertions(+), 445 deletions(-) diff --git a/include/functions.h b/include/functions.h index d0d3e8e3a7..e628663f8d 100644 --- a/include/functions.h +++ b/include/functions.h @@ -835,7 +835,7 @@ void Flags_UnsetAllEnv(PlayState* play); void Flags_SetEnv(PlayState* play, s16 flag); void Flags_UnsetEnv(PlayState* play, s16 flag); s32 Flags_GetEnv(PlayState* play, s16 flag); -s32 func_8006CFC0(s32 scene); +s32 func_8006CFC0(s32 sceneId); void func_8006D074(PlayState* play); void func_8006D0AC(PlayState* play); void func_8006D0EC(PlayState* play, Player* player); diff --git a/include/z64.h b/include/z64.h index c58f05cbdc..506b73a5dc 100644 --- a/include/z64.h +++ b/include/z64.h @@ -1135,7 +1135,7 @@ typedef struct { typedef struct PlayState { /* 0x00000 */ GameState state; - /* 0x000A4 */ s16 sceneNum; + /* 0x000A4 */ s16 sceneId; /* 0x000A6 */ u8 sceneDrawConfig; /* 0x000A7 */ char unk_A7[0x9]; /* 0x000B0 */ void* sceneSegment; @@ -1361,7 +1361,7 @@ typedef struct { & (ENTRANCE_INFO_START_TRANS_TYPE_MASK >> ENTRANCE_INFO_START_TRANS_TYPE_SHIFT)) typedef struct { - /* 0x00 */ s8 scene; + /* 0x00 */ s8 sceneId; /* 0x01 */ s8 spawn; /* 0x02 */ u16 field; } EntranceInfo; // size = 0x4 diff --git a/include/z64save.h b/include/z64save.h index c79378221e..413e142b9b 100644 --- a/include/z64save.h +++ b/include/z64save.h @@ -59,7 +59,7 @@ typedef struct { } SavedSceneFlags; // size = 0x1C typedef struct { - /* 0x00 */ s16 scene; + /* 0x00 */ s16 sceneId; /* 0x02 */ Vec3s pos; /* 0x08 */ s16 angle; } HorseData; // size = 0x0A @@ -128,7 +128,7 @@ typedef struct { /* 0x004A */ ItemEquips adultEquips; /* 0x0054 */ u32 unk_54; // this may be incorrect, currently used for alignment /* 0x0058 */ char unk_58[0x0E]; - /* 0x0066 */ s16 savedSceneNum; + /* 0x0066 */ s16 savedSceneId; /* 0x0068 */ ItemEquips equips; /* 0x0074 */ Inventory inventory; /* 0x00D4 */ SavedSceneFlags sceneFlags[124]; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 75409861f5..ab310a446d 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1958,7 +1958,7 @@ void func_800304DC(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEnt SavedSceneFlags* savedSceneFlags; s32 i; - savedSceneFlags = &gSaveContext.sceneFlags[play->sceneNum]; + savedSceneFlags = &gSaveContext.sceneFlags[play->sceneId]; bzero(actorCtx, sizeof(*actorCtx)); @@ -3323,7 +3323,7 @@ Actor* Actor_GetProjectileActor(PlayState* play, Actor* refActor, f32 radius) { void Actor_SetTextWithPrefix(PlayState* play, Actor* actor, s16 baseTextId) { s16 prefix; - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_YDAN: case SCENE_YDAN_BOSS: case SCENE_MORIBOSSROOM: @@ -4515,7 +4515,7 @@ u32 func_80035BFC(PlayState* play, s16 arg1) { } break; case 16: - if (play->sceneNum == SCENE_SPOT15) { + if (play->sceneId == SCENE_SPOT15) { retTextId = 0x7002; } else if (Flags_GetInfTable(INFTABLE_6A)) { retTextId = 0x7004; diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c index ff11a33ac2..ceea255268 100644 --- a/src/code/z_bgcheck.c +++ b/src/code/z_bgcheck.c @@ -1451,7 +1451,7 @@ s32 BgCheck_IsSpotScene(PlayState* play) { s16* i; for (i = spotScenes; i < spotScenes + ARRAY_COUNT(spotScenes); i++) { - if (play->sceneNum == *i) { + if (play->sceneId == *i) { return true; } } @@ -1528,7 +1528,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader if ((R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT) || (R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_TOGGLE_VIEWPOINT) || (R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED) || (R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_MARKET)) { - if (play->sceneNum == SCENE_MALON_STABLE) { + if (play->sceneId == SCENE_MALON_STABLE) { // "/* BGCheck LonLon Size %dbyte */\n" osSyncPrintf("/* BGCheck LonLonサイズ %dbyte */\n", 0x3520); colCtx->memSize = 0x3520; @@ -1554,7 +1554,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader colCtx->subdivAmount.y = 4; colCtx->subdivAmount.z = 16; } else { - if (BgCheck_TryGetCustomMemsize(play->sceneNum, &customMemSize)) { + if (BgCheck_TryGetCustomMemsize(play->sceneId, &customMemSize)) { colCtx->memSize = customMemSize; } else { colCtx->memSize = 0x1CC00; @@ -1567,7 +1567,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader useCustomSubdivisions = false; for (i = 0; i < ARRAY_COUNT(sceneSubdivisionList); i++) { - if (play->sceneNum == sceneSubdivisionList[i].sceneId) { + if (play->sceneId == sceneSubdivisionList[i].sceneId) { colCtx->subdivAmount.x = sceneSubdivisionList[i].subdivAmount.x; colCtx->subdivAmount.y = sceneSubdivisionList[i].subdivAmount.y; colCtx->subdivAmount.z = sceneSubdivisionList[i].subdivAmount.z; @@ -4146,7 +4146,7 @@ f32 sZorasDomainWaterBoxMaxZ = -967.0f; */ s32 WaterBox_GetSurface1(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox) { - if (play->sceneNum == SCENE_SPOT07) { + if (play->sceneId == SCENE_SPOT07) { if (sZorasDomainWaterBoxMinX < x && x < sZorasDomainWaterBoxMaxX && sZorasDomainWaterBoxMinY < *ySurface && *ySurface < sZorasDomainWaterBoxMaxY && sZorasDomainWaterBoxMinZ < z && z < sZorasDomainWaterBoxMaxZ) { *outWaterBox = &sZorasDomainWaterBox; diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 8b7dac2601..950b67cde5 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -6562,7 +6562,7 @@ s32 Camera_Special7(Camera* camera) { yOffset = Player_GetHeight(camera->player); if (camera->animState == 0) { - if (camera->play->sceneNum == SCENE_JYASINZOU) { + if (camera->play->sceneId == SCENE_JYASINZOU) { // Spirit Temple rwData->index = 3; } else if (playerPosRot->pos.x < 1500.0f) { @@ -7264,7 +7264,7 @@ s32 Camera_UpdateWater(Camera* camera) { if (camera->waterDistortionTimer > 0) { camera->waterDistortionTimer--; camera->distortionFlags |= DISTORTION_UNDERWATER_STRONG; - } else if (camera->play->sceneNum == SCENE_TURIBORI) { + } else if (camera->play->sceneId == SCENE_TURIBORI) { camera->distortionFlags |= DISTORTION_UNDERWATER_FISHING; } else { camera->distortionFlags |= DISTORTION_UNDERWATER_WEAK; @@ -7616,7 +7616,7 @@ Vec3s Camera_Update(Camera* camera) { Camera_UpdateDistortion(camera); - if ((camera->play->sceneNum == SCENE_SPOT00) && (camera->fov < 59.0f)) { + if ((camera->play->sceneId == SCENE_SPOT00) && (camera->fov < 59.0f)) { View_SetScale(&camera->play->view, 0.79f); } else { View_SetScale(&camera->play->view, 1.0f); @@ -7860,7 +7860,7 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) { } } if (((setting == CAM_SET_MEADOW_BIRDS_EYE) || (setting == CAM_SET_MEADOW_UNUSED)) && LINK_IS_ADULT && - (camera->play->sceneNum == SCENE_SPOT05)) { + (camera->play->sceneId == SCENE_SPOT05)) { camera->unk_14A |= 0x10; return -5; } diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 9f4b21ddee..d25bd3ad36 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -489,7 +489,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB s32 temp = 0; if ((gSaveContext.gameMode != GAMEMODE_NORMAL) && (gSaveContext.gameMode != GAMEMODE_END_CREDITS) && - (play->sceneNum != SCENE_SPOT00) && (csCtx->frames > 20) && + (play->sceneId != SCENE_SPOT00) && (csCtx->frames > 20) && (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_A) || CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B) || CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START)) && @@ -1255,7 +1255,7 @@ void Cutscene_Command_TransitionFX(PlayState* play, CutsceneContext* csCtx, CsCm (gSaveContext.entranceIndex == ENTR_YOUSEI_IZUMI_YOKO_0))) { Audio_PlaySfxGeneral(NA_SE_EV_WHITE_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - } else if ((temp == 0.0f) && (play->sceneNum == SCENE_GANONTIKA)) { + } else if ((temp == 0.0f) && (play->sceneId == SCENE_GANONTIKA)) { func_800788CC(NA_SE_EV_WHITE_OUT); } } else { @@ -2093,12 +2093,12 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) { gSaveContext.cutsceneIndex = 0xFFF0; } else if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) && LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_C4) && - (gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TOKINOMA)) { + (gEntranceTable[((void)0, gSaveContext.entranceIndex)].sceneId == SCENE_TOKINOMA)) { Flags_SetEventChkInf(EVENTCHKINF_C4); gSaveContext.entranceIndex = ENTR_TOKINOMA_0; gSaveContext.cutsceneIndex = 0xFFF8; } else if (!Flags_GetEventChkInf(EVENTCHKINF_C7) && - (gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_GANON_DEMO)) { + (gEntranceTable[((void)0, gSaveContext.entranceIndex)].sceneId == SCENE_GANON_DEMO)) { Flags_SetEventChkInf(EVENTCHKINF_C7); gSaveContext.entranceIndex = ENTR_GANON_DEMO_0; gSaveContext.cutsceneIndex = 0xFFF0; diff --git a/src/code/z_horse.c b/src/code/z_horse.c index 49a021cdec..27cca3d2e9 100644 --- a/src/code/z_horse.c +++ b/src/code/z_horse.c @@ -2,12 +2,12 @@ #include "vt.h" #include "src/overlays/actors/ovl_En_Horse/z_en_horse.h" -s32 func_8006CFC0(s32 scene) { - s32 validScenes[] = { SCENE_SPOT00, SCENE_SPOT06, SCENE_SPOT09, SCENE_SPOT12, SCENE_SPOT20 }; +s32 func_8006CFC0(s32 sceneId) { + s32 validSceneIds[] = { SCENE_SPOT00, SCENE_SPOT06, SCENE_SPOT09, SCENE_SPOT12, SCENE_SPOT20 }; s32 i; - for (i = 0; i < ARRAY_COUNT(validScenes); i++) { - if (scene == validScenes[i]) { + for (i = 0; i < ARRAY_COUNT(validSceneIds); i++) { + if (sceneId == validSceneIds[i]) { return 1; } } @@ -16,7 +16,7 @@ s32 func_8006CFC0(s32 scene) { } void func_8006D074(PlayState* play) { - gSaveContext.horseData.scene = SCENE_SPOT00; + gSaveContext.horseData.sceneId = SCENE_SPOT00; gSaveContext.horseData.pos.x = -1840; gSaveContext.horseData.pos.y = 72; gSaveContext.horseData.pos.z = 5497; @@ -24,8 +24,8 @@ void func_8006D074(PlayState* play) { } void func_8006D0AC(PlayState* play) { - if (gSaveContext.horseData.scene == SCENE_SPOT06) { - gSaveContext.horseData.scene = SCENE_SPOT06; + if (gSaveContext.horseData.sceneId == SCENE_SPOT06) { + gSaveContext.horseData.sceneId = SCENE_SPOT06; gSaveContext.horseData.pos.x = -2065; gSaveContext.horseData.pos.y = -863; gSaveContext.horseData.pos.z = 1839; @@ -34,7 +34,7 @@ void func_8006D0AC(PlayState* play) { } typedef struct { - /* 0x00 */ s16 scene; + /* 0x00 */ s16 sceneId; /* 0x02 */ Vec3s pos; /* 0x08 */ s16 angle; /* 0x0A */ s16 type; @@ -57,12 +57,12 @@ void func_8006D0EC(PlayState* play, Player* player) { Actor_MountHorse(play, player, player->rideActor); func_8002DE74(play, player); - gSaveContext.horseData.scene = play->sceneNum; + gSaveContext.horseData.sceneId = play->sceneId; - if (play->sceneNum == SCENE_SPOT12) { + if (play->sceneId == SCENE_SPOT12) { player->rideActor->room = -1; } - } else if ((play->sceneNum == SCENE_SPOT12) && (gSaveContext.minigameState == 3)) { + } else if ((play->sceneId == SCENE_SPOT12) && (gSaveContext.minigameState == 3)) { Actor* horseActor; gSaveContext.minigameState = 0; horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 3586.0f, 1413.0f, -402.0f, 0, 0x4000, 0, 1); @@ -71,39 +71,39 @@ void func_8006D0EC(PlayState* play, Player* player) { Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1); ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 389); - } else if ((play->sceneNum == gSaveContext.horseData.scene) && + } else if ((play->sceneId == gSaveContext.horseData.sceneId) && (Flags_GetEventChkInf(EVENTCHKINF_18) || DREG(1) != 0)) { // "Set by existence of horse %d %d %d" - osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.scene, + osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.sceneId, Flags_GetEventChkInf(EVENTCHKINF_18), DREG(1)); - if (func_8006CFC0(gSaveContext.horseData.scene)) { + if (func_8006CFC0(gSaveContext.horseData.sceneId)) { Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, gSaveContext.horseData.pos.x, gSaveContext.horseData.pos.y, gSaveContext.horseData.pos.z, 0, gSaveContext.horseData.angle, 0, 1); ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 414); - if (play->sceneNum == SCENE_SPOT12) { + if (play->sceneId == SCENE_SPOT12) { horseActor->room = -1; } } else { osSyncPrintf(VT_COL(RED, WHITE)); // "Horse_SetNormal():%d set spot is no good." - osSyncPrintf("Horse_SetNormal():%d セットスポットまずいです。\n", gSaveContext.horseData.scene); + osSyncPrintf("Horse_SetNormal():%d セットスポットまずいです。\n", gSaveContext.horseData.sceneId); osSyncPrintf(VT_RST); func_8006D074(play); } - } else if ((play->sceneNum == SCENE_SPOT20) && !Flags_GetEventChkInf(EVENTCHKINF_18) && (DREG(1) == 0)) { + } else if ((play->sceneId == SCENE_SPOT20) && !Flags_GetEventChkInf(EVENTCHKINF_18) && (DREG(1) == 0)) { Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, 1); ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 443); } else if (Flags_GetEventChkInf(EVENTCHKINF_18) || (DREG(1) != 0)) { for (i = 0; i < ARRAY_COUNT(horseSpawns); i++) { HorseSpawn* horseSpawn = &horseSpawns[i]; - if (horseSpawn->scene == play->sceneNum) { + if (horseSpawn->sceneId == play->sceneId) { Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, horseSpawn->pos.x, horseSpawn->pos.y, horseSpawn->pos.z, 0, horseSpawn->angle, 0, horseSpawn->type); ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 466); - if (play->sceneNum == SCENE_SPOT12) { + if (play->sceneId == SCENE_SPOT12) { horseActor->room = -1; } @@ -111,14 +111,14 @@ void func_8006D0EC(PlayState* play, Player* player) { } } } else if (!Flags_GetEventChkInf(EVENTCHKINF_18)) { - if ((DREG(1) == 0) && (play->sceneNum == SCENE_SOUKO) && !IS_DAY) { + if ((DREG(1) == 0) && (play->sceneId == SCENE_SOUKO) && !IS_DAY) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -60.0f, 0, 0x7360, 0, 1); } } } typedef struct { - /* 0x00 */ s16 scene; + /* 0x00 */ s16 sceneId; /* 0x04 */ s32 cutsceneIndex; /* 0x08 */ Vec3s pos; /* 0x0E */ s16 angle; @@ -156,8 +156,8 @@ void func_8006D684(PlayState* play, Player* player) { Actor_MountHorse(play, player, player->rideActor); func_8002DE74(play, player); - gSaveContext.horseData.scene = play->sceneNum; - } else if ((play->sceneNum == SCENE_SPOT20) && (GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6) && + gSaveContext.horseData.sceneId = play->sceneId; + } else if ((play->sceneId == SCENE_SPOT20) && (GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6) && !Flags_GetEventChkInf(EVENTCHKINF_18) && (DREG(1) == 0)) { player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 894.0f, 0.0f, -2084.0f, 0, -0x7FFF, 0, 5); @@ -165,9 +165,9 @@ void func_8006D684(PlayState* play, Player* player) { Actor_MountHorse(play, player, player->rideActor); func_8002DE74(play, player); - gSaveContext.horseData.scene = play->sceneNum; + gSaveContext.horseData.sceneId = play->sceneId; - if (play->sceneNum == SCENE_SPOT12) { + if (play->sceneId == SCENE_SPOT12) { player->rideActor->room = -1; } } else { @@ -183,10 +183,10 @@ void func_8006D684(PlayState* play, Player* player) { }; for (i = 0; i < ARRAY_COUNT(D_8011F9B8); i++) { - if ((play->sceneNum == D_8011F9B8[i].scene) && + if ((play->sceneId == D_8011F9B8[i].sceneId) && (((void)0, gSaveContext.cutsceneIndex) == D_8011F9B8[i].cutsceneIndex)) { if (D_8011F9B8[i].type == 7) { - if ((play->sceneNum == SCENE_SPOT20) && (((void)0, gSaveContext.cutsceneIndex) == 0xFFF1)) { + if ((play->sceneId == SCENE_SPOT20) && (((void)0, gSaveContext.cutsceneIndex) == 0xFFF1)) { D_8011F9B8[i].pos.x = player->actor.world.pos.x; D_8011F9B8[i].pos.y = player->actor.world.pos.y; D_8011F9B8[i].pos.z = player->actor.world.pos.z; @@ -238,20 +238,20 @@ void func_8006D684(PlayState* play, Player* player) { void func_8006DC68(PlayState* play, Player* player) { if (LINK_IS_ADULT) { - if (!func_8006CFC0(gSaveContext.horseData.scene)) { + if (!func_8006CFC0(gSaveContext.horseData.sceneId)) { osSyncPrintf(VT_COL(RED, WHITE)); // "Horse_Set_Check():%d set spot is no good." - osSyncPrintf("Horse_Set_Check():%d セットスポットまずいです。\n", gSaveContext.horseData.scene); + osSyncPrintf("Horse_Set_Check():%d セットスポットまずいです。\n", gSaveContext.horseData.sceneId); osSyncPrintf(VT_RST); func_8006D074(play); } - if (func_8006CFC0(play->sceneNum)) { + if (func_8006CFC0(play->sceneId)) { if (IS_CUTSCENE_LAYER || ((gSaveContext.entranceIndex == ENTR_SPOT00_11 || gSaveContext.entranceIndex == ENTR_SPOT00_12 || gSaveContext.entranceIndex == ENTR_SPOT00_13 || gSaveContext.entranceIndex == ENTR_SPOT00_15) && (gSaveContext.respawnFlag == 0)) || - ((play->sceneNum == SCENE_SPOT20) && (GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6) && + ((play->sceneId == SCENE_SPOT20) && (GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6) && !Flags_GetEventChkInf(EVENTCHKINF_18) && (DREG(1) == 0))) { func_8006D684(play, player); } else { diff --git a/src/code/z_kaleido_setup.c b/src/code/z_kaleido_setup.c index b6314ece31..2becd626fd 100644 --- a/src/code/z_kaleido_setup.c +++ b/src/code/z_kaleido_setup.c @@ -17,7 +17,7 @@ void KaleidoSetup_Update(PlayState* play) { gSaveContext.cutsceneIndex < 0xFFF0 && gSaveContext.nextCutsceneIndex < 0xFFF0 && !Play_InCsMode(play) && play->shootingGalleryStatus <= 1 && gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY && gSaveContext.magicState != MAGIC_STATE_FILL && - (play->sceneNum != SCENE_BOWLING || !Flags_GetSwitch(play, 0x38))) { + (play->sceneId != SCENE_BOWLING || !Flags_GetSwitch(play, 0x38))) { if (CHECK_BTN_ALL(input->cur.button, BTN_L) && CHECK_BTN_ALL(input->press.button, BTN_CUP)) { if (BREG(0)) { diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index e35a1e3781..92ac0336f2 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -2361,7 +2361,7 @@ void Environment_DrawSandstorm(PlayState* play, u8 sandstormState) { switch (sandstormState) { case SANDSTORM_ACTIVE: - if ((play->sceneNum == SCENE_SPOT13) && (play->roomCtx.curRoom.num == 0)) { + if ((play->sceneId == SCENE_SPOT13) && (play->roomCtx.curRoom.num == 0)) { envA1 = 0; primA1 = (play->envCtx.sandstormEnvA > 128) ? 255 : play->envCtx.sandstormEnvA >> 1; } else { diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c index 6f9483247f..c8201c9d74 100644 --- a/src/code/z_map_exp.c +++ b/src/code/z_map_exp.c @@ -53,7 +53,7 @@ void Map_SetFloorPalettesData(PlayState* play, s16 floor) { interfaceCtx->mapPalette[31] = 1; } - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_YDAN: case SCENE_DDAN: case SCENE_BDAN: @@ -87,7 +87,7 @@ void Map_InitData(PlayState* play, s16 room) { InterfaceContext* interfaceCtx = &play->interfaceCtx; s16 extendedMapIndex; - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_SPOT00: case SCENE_SPOT01: case SCENE_SPOT02: @@ -109,19 +109,19 @@ void Map_InitData(PlayState* play, s16 room) { case SCENE_SPOT20: case SCENE_GANON_TOU: extendedMapIndex = mapIndex; - if (play->sceneNum == SCENE_SPOT02) { + if (play->sceneId == SCENE_SPOT02) { if (CHECK_QUEST_ITEM(QUEST_SONG_NOCTURNE)) { extendedMapIndex = 0x14; } - } else if (play->sceneNum == SCENE_SPOT06) { + } else if (play->sceneId == SCENE_SPOT06) { if ((LINK_AGE_IN_YEARS == YEARS_ADULT) && !CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER)) { extendedMapIndex = 0x15; } - } else if (play->sceneNum == SCENE_SPOT09) { + } else if (play->sceneId == SCENE_SPOT09) { if ((LINK_AGE_IN_YEARS == YEARS_ADULT) && !GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) { extendedMapIndex = 0x16; } - } else if (play->sceneNum == SCENE_SPOT12) { + } else if (play->sceneId == SCENE_SPOT12) { if (GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) { extendedMapIndex = 0x17; } @@ -175,10 +175,10 @@ void Map_InitRoomData(PlayState* play, s16 room) { InterfaceContext* interfaceCtx = &play->interfaceCtx; osSyncPrintf("*******\n*******\nroom_no=%d (%d)(%d)\n*******\n*******\n", room, - mapIndex, play->sceneNum); + mapIndex, play->sceneId); if (room >= 0) { - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_YDAN: case SCENE_DDAN: case SCENE_BDAN: @@ -233,11 +233,11 @@ void Map_Init(PlayState* play) { interfaceCtx->mapSegment = GameState_Alloc(&play->state, 0x1000, "../z_map_exp.c", 457); // "MAP texture initialization scene_data_ID=%d mapSegment=%x" - osSyncPrintf("\n\n\nMAP テクスチャ初期化 scene_data_ID=%d\nmapSegment=%x\n\n", play->sceneNum, + osSyncPrintf("\n\n\nMAP テクスチャ初期化 scene_data_ID=%d\nmapSegment=%x\n\n", play->sceneId, interfaceCtx->mapSegment, play); ASSERT(interfaceCtx->mapSegment != NULL, "parameter->mapSegment != NULL", "../z_map_exp.c", 459); - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_SPOT00: case SCENE_SPOT01: case SCENE_SPOT02: @@ -258,7 +258,7 @@ void Map_Init(PlayState* play) { case SCENE_SPOT18: case SCENE_SPOT20: case SCENE_GANON_TOU: - mapIndex = play->sceneNum - SCENE_SPOT00; + mapIndex = play->sceneId - SCENE_SPOT00; R_MAP_INDEX = gSaveContext.mapIndex = mapIndex; R_COMPASS_SCALE_X = gMapData->owCompassInfo[mapIndex][0]; R_COMPASS_SCALE_Y = gMapData->owCompassInfo[mapIndex][1]; @@ -293,9 +293,9 @@ void Map_Init(PlayState* play) { case SCENE_MIZUSIN_BS: case SCENE_JYASINBOSS: case SCENE_HAKADAN_BS: - mapIndex = (play->sceneNum >= SCENE_YDAN_BOSS) ? play->sceneNum - SCENE_YDAN_BOSS : play->sceneNum; + mapIndex = (play->sceneId >= SCENE_YDAN_BOSS) ? play->sceneId - SCENE_YDAN_BOSS : play->sceneId; R_MAP_INDEX = gSaveContext.mapIndex = mapIndex; - if ((play->sceneNum <= SCENE_ICE_DOUKUTO) || (play->sceneNum >= SCENE_YDAN_BOSS)) { + if ((play->sceneId <= SCENE_ICE_DOUKUTO) || (play->sceneId >= SCENE_YDAN_BOSS)) { R_COMPASS_SCALE_X = gMapData->dgnCompassInfo[mapIndex][0]; R_COMPASS_SCALE_Y = gMapData->dgnCompassInfo[mapIndex][1]; R_COMPASS_OFFSET_X = gMapData->dgnCompassInfo[mapIndex][2]; @@ -365,7 +365,7 @@ void Minimap_Draw(PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_map_exp.c", 626); if (play->pauseCtx.state < 4) { - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_YDAN: case SCENE_DDAN: case SCENE_BDAN: @@ -453,8 +453,8 @@ void Minimap_Draw(PlayState* play) { (R_OW_MINIMAP_Y + gMapData->owMinimapHeight[mapIndex]) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); - if (((play->sceneNum != SCENE_SPOT01) && (play->sceneNum != SCENE_SPOT04) && - (play->sceneNum != SCENE_SPOT08)) || + if (((play->sceneId != SCENE_SPOT01) && (play->sceneId != SCENE_SPOT04) && + (play->sceneId != SCENE_SPOT08)) || (LINK_AGE_IN_YEARS != YEARS_ADULT)) { if ((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) || ((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) && @@ -474,7 +474,7 @@ void Minimap_Draw(PlayState* play) { } } - if ((play->sceneNum == SCENE_SPOT08) && + if ((play->sceneId == SCENE_SPOT08) && (gSaveContext.infTable[INFTABLE_1AX_INDEX] & gBitFlags[INFTABLE_1A9_SHIFT])) { gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, @@ -521,7 +521,7 @@ void Map_Update(PlayState* play) { s16 i; if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) { - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_YDAN: case SCENE_DDAN: case SCENE_BDAN: @@ -583,9 +583,9 @@ void Map_Update(PlayState* play) { case SCENE_MIZUSIN_BS: case SCENE_JYASINBOSS: case SCENE_HAKADAN_BS: - VREG(30) = gMapData->bossFloor[play->sceneNum - SCENE_YDAN_BOSS]; + VREG(30) = gMapData->bossFloor[play->sceneId - SCENE_YDAN_BOSS]; R_MAP_TEX_INDEX = - R_MAP_TEX_INDEX_BASE + gMapData->floorTexIndexOffset[play->sceneNum - SCENE_YDAN_BOSS][VREG(30)]; + R_MAP_TEX_INDEX_BASE + gMapData->floorTexIndexOffset[play->sceneId - SCENE_YDAN_BOSS][VREG(30)]; break; } } diff --git a/src/code/z_map_mark.c b/src/code/z_map_mark.c index a267f7e567..564ddc01e4 100644 --- a/src/code/z_map_mark.c +++ b/src/code/z_map_mark.c @@ -132,7 +132,7 @@ void MapMark_DrawForDungeon(PlayState* play) { } void MapMark_Draw(PlayState* play) { - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_YDAN: case SCENE_DDAN: case SCENE_BDAN: diff --git a/src/code/z_message_PAL.c b/src/code/z_message_PAL.c index b9e9c420db..dc9f6622ab 100644 --- a/src/code/z_message_PAL.c +++ b/src/code/z_message_PAL.c @@ -3097,7 +3097,7 @@ void Message_Update(PlayState* play) { if (D_8014B2F4 >= 4) { var = true; } - } else if (R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_DEFAULT || play->sceneNum == SCENE_HAIRAL_NIWA) { + } else if (R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_DEFAULT || play->sceneId == SCENE_HAIRAL_NIWA) { var = true; } else if (D_8014B2F4 >= 4 || msgCtx->talkActor == NULL) { var = true; @@ -3123,14 +3123,14 @@ void Message_Update(PlayState* play) { var = msgCtx->textBoxType; if (!msgCtx->textBoxPos) { // variable position - if (R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_DEFAULT || play->sceneNum == SCENE_HAIRAL_NIWA) { + if (R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_DEFAULT || play->sceneId == SCENE_HAIRAL_NIWA) { if (averageY < XREG(92)) { R_TEXTBOX_Y_TARGET = sTextboxLowerYPositions[var]; } else { R_TEXTBOX_Y_TARGET = sTextboxUpperYPositions[var]; } - } else if (play->sceneNum == SCENE_MARKET_DAY || play->sceneNum == SCENE_MARKET_NIGHT || - play->sceneNum == SCENE_MARKET_RUINS) { + } else if (play->sceneId == SCENE_MARKET_DAY || play->sceneId == SCENE_MARKET_NIGHT || + play->sceneId == SCENE_MARKET_RUINS) { if (averageY < XREG(93)) { R_TEXTBOX_Y_TARGET = sTextboxLowerYPositions[var]; } else { diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 2f696f2e20..d5c88e7c51 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -10,7 +10,7 @@ #define DO_ACTION_TEX_SIZE ((DO_ACTION_TEX_WIDTH * DO_ACTION_TEX_HEIGHT) / 2) // (sizeof(gCheckDoActionENGTex)) typedef struct { - /* 0x00 */ u8 scene; + /* 0x00 */ u8 sceneId; /* 0x01 */ u8 flags1; /* 0x02 */ u8 flags2; /* 0x03 */ u8 flags3; @@ -404,7 +404,7 @@ void func_80082850(PlayState* play, s16 maxAlpha) { interfaceCtx->magicAlpha = alpha; } - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_SPOT00: case SCENE_SPOT01: case SCENE_SPOT02: @@ -625,11 +625,11 @@ void func_80083108(PlayState* play) { s16 sp28 = false; if ((gSaveContext.cutsceneIndex < 0xFFF0) || - ((play->sceneNum == SCENE_SPOT20) && (gSaveContext.cutsceneIndex == 0xFFF0))) { + ((play->sceneId == SCENE_SPOT20) && (gSaveContext.cutsceneIndex == 0xFFF0))) { gSaveContext.unk_13E7 = 0; if ((player->stateFlags1 & PLAYER_STATE1_23) || (play->shootingGalleryStatus > 1) || - ((play->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38))) { + ((play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38))) { if (gSaveContext.equips.buttonItems[0] != ITEM_NONE) { gSaveContext.unk_13E7 = 1; @@ -644,7 +644,7 @@ void func_80083108(PlayState* play) { (gSaveContext.equips.buttonItems[0] != ITEM_NONE)) { gSaveContext.buttonStatus[0] = gSaveContext.equips.buttonItems[0]; - if ((play->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38)) { + if ((play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38)) { gSaveContext.equips.buttonItems[0] = ITEM_BOMBCHU; Interface_LoadItemIcon1(play, 0); } else { @@ -675,7 +675,7 @@ void func_80083108(PlayState* play) { Interface_ChangeAlpha(8); } else if (play->shootingGalleryStatus > 1) { Interface_ChangeAlpha(8); - } else if ((play->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38)) { + } else if ((play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38)) { Interface_ChangeAlpha(8); } else if (player->stateFlags1 & PLAYER_STATE1_23) { Interface_ChangeAlpha(12); @@ -685,9 +685,9 @@ void func_80083108(PlayState* play) { Interface_ChangeAlpha(12); } } - } else if (play->sceneNum == SCENE_KENJYANOMA) { + } else if (play->sceneId == SCENE_KENJYANOMA) { Interface_ChangeAlpha(1); - } else if (play->sceneNum == SCENE_TURIBORI) { + } else if (play->sceneId == SCENE_TURIBORI) { gSaveContext.unk_13E7 = 2; if (play->interfaceCtx.unk_260 != 0) { if (gSaveContext.equips.buttonItems[0] != ITEM_FISHING_POLE) { @@ -1021,7 +1021,7 @@ void func_80083108(PlayState* play) { (gSaveContext.equips.buttonItems[i] <= ITEM_POE)) && !((gSaveContext.equips.buttonItems[i] >= ITEM_WEIRD_EGG) && (gSaveContext.equips.buttonItems[i] <= ITEM_CLAIM_CHECK))) { - if ((play->sceneNum != SCENE_TAKARAYA) || + if ((play->sceneId != SCENE_TAKARAYA) || (gSaveContext.equips.buttonItems[i] != ITEM_LENS)) { if (gSaveContext.buttonStatus[i] == BTN_ENABLED) { sp28 = true; @@ -1076,7 +1076,7 @@ void func_80083108(PlayState* play) { void Interface_SetSceneRestrictions(PlayState* play) { InterfaceContext* interfaceCtx = &play->interfaceCtx; s16 i; - u8 currentScene; + u8 sceneId; interfaceCtx->restrictions.hGauge = interfaceCtx->restrictions.bButton = interfaceCtx->restrictions.aButton = interfaceCtx->restrictions.bottles = interfaceCtx->restrictions.tradeItems = @@ -1088,11 +1088,11 @@ void Interface_SetSceneRestrictions(PlayState* play) { i = 0; // "Data settings related to button display scene_data_ID=%d\n" - osSyncPrintf("ボタン表示関係データ設定 scene_data_ID=%d\n", play->sceneNum); + osSyncPrintf("ボタン表示関係データ設定 scene_data_ID=%d\n", play->sceneId); do { - currentScene = (u8)play->sceneNum; - if (sRestrictionFlags[i].scene == currentScene) { + sceneId = (u8)play->sceneId; + if (sRestrictionFlags[i].sceneId == sceneId) { interfaceCtx->restrictions.hGauge = (sRestrictionFlags[i].flags1 & 0xC0) >> 6; interfaceCtx->restrictions.bButton = (sRestrictionFlags[i].flags1 & 0x30) >> 4; interfaceCtx->restrictions.aButton = (sRestrictionFlags[i].flags1 & 0x0C) >> 2; @@ -1122,7 +1122,7 @@ void Interface_SetSceneRestrictions(PlayState* play) { return; } i++; - } while (sRestrictionFlags[i].scene != 0xFF); + } while (sRestrictionFlags[i].sceneId != 0xFF); } Gfx* Gfx_TextureIA8(Gfx* displayListHead, void* texture, s16 textureWidth, s16 textureHeight, s16 rectLeft, s16 rectTop, @@ -2895,7 +2895,7 @@ void Interface_DrawAmmoCount(PlayState* play, s16 button, s16 alpha) { ammo = play->interfaceCtx.hbaAmmo; } else if ((button == 0) && (play->shootingGalleryStatus > 1)) { ammo = play->shootingGalleryStatus - 1; - } else if ((button == 0) && (play->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38)) { + } else if ((button == 0) && (play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38)) { ammo = play->bombchuBowlingStatus; if (ammo < 0) { ammo = 0; @@ -3105,7 +3105,7 @@ void Interface_Draw(PlayState* play) { gDPSetEnvColor(OVERLAY_DISP++, 0, 80, 0, 255); OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, 26, 206, 16, 16, 1 << 10, 1 << 10); - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_BMORI1: case SCENE_HIDAN: case SCENE_MIZUSIN: @@ -3221,7 +3221,7 @@ void Interface_Draw(PlayState* play) { Interface_DrawItemIconTexture(play, interfaceCtx->iconItemSegment, 0); if ((player->stateFlags1 & PLAYER_STATE1_23) || (play->shootingGalleryStatus > 1) || - ((play->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38))) { + ((play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38))) { gDPPipeSync(OVERLAY_DISP++); gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); @@ -3469,7 +3469,7 @@ void Interface_Draw(PlayState* play) { (play->gameOverCtx.state == GAMEOVER_INACTIVE) && (msgCtx->msgMode == MSGMODE_NONE) && !(player->stateFlags2 & PLAYER_STATE2_24) && (play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF) && !Play_InCsMode(play) && (gSaveContext.minigameState != 1) && - (play->shootingGalleryStatus <= 1) && !((play->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38))) { + (play->shootingGalleryStatus <= 1) && !((play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38))) { svar6 = 0; switch (gSaveContext.timer1State) { case 1: @@ -3731,10 +3731,10 @@ void Interface_Draw(PlayState* play) { if (gSaveContext.timer2Value <= 0) { if (!Flags_GetSwitch(play, 0x37) || - ((play->sceneNum != SCENE_GANON_DEMO) && - (play->sceneNum != SCENE_GANON_FINAL) && - (play->sceneNum != SCENE_GANON_SONOGO) && - (play->sceneNum != SCENE_GANONTIKA_SONOGO))) { + ((play->sceneId != SCENE_GANON_DEMO) && + (play->sceneId != SCENE_GANON_FINAL) && + (play->sceneId != SCENE_GANON_SONOGO) && + (play->sceneId != SCENE_GANONTIKA_SONOGO))) { D_8015FFE6 = 40; gSaveContext.timer2State = 5; gSaveContext.cutsceneIndex = 0; @@ -3891,9 +3891,9 @@ void Interface_Update(PlayState* play) { if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) { if ((gSaveContext.minigameState == 1) || !IS_CUTSCENE_LAYER || - ((play->sceneNum == SCENE_SPOT20) && (gSaveContext.sceneLayer == 4))) { + ((play->sceneId == SCENE_SPOT20) && (gSaveContext.sceneLayer == 4))) { if ((msgCtx->msgMode == MSGMODE_NONE) || - ((msgCtx->msgMode != MSGMODE_NONE) && (play->sceneNum == SCENE_BOWLING))) { + ((msgCtx->msgMode != MSGMODE_NONE) && (play->sceneId == SCENE_BOWLING))) { if (play->gameOverCtx.state == GAMEOVER_INACTIVE) { func_80083108(play); } @@ -3949,7 +3949,7 @@ void Interface_Update(PlayState* play) { interfaceCtx->magicAlpha = alpha1; } - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_SPOT00: case SCENE_SPOT01: case SCENE_SPOT02: @@ -4228,7 +4228,7 @@ void Interface_Update(PlayState* play) { play->unk_11DE9 = true; } - if (play->sceneNum == SCENE_SPOT13) { + if (play->sceneId == SCENE_SPOT13) { play->transitionType = TRANS_TYPE_SANDSTORM_PERSIST; gSaveContext.nextTransitionType = TRANS_TYPE_SANDSTORM_PERSIST; } diff --git a/src/code/z_play.c b/src/code/z_play.c index c32ef6b63e..b0bce16225 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -13,7 +13,7 @@ FaultClient D_801614B8; s16 sTransitionFillTimer; u64 D_801614D0[0xA00]; -void Play_SpawnScene(PlayState* this, s32 sceneNum, s32 spawn); +void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn); // This macro prints the number "1" with a file and line number if R_ENABLE_PLAY_LOGS is enabled. // For example, it can be used to trace the play state execution at a high level. @@ -305,7 +305,7 @@ void Play_Init(GameState* thisx) { // save the base scene layer (before accounting for the special cases below) to use later for the transition type baseSceneLayer = gSaveContext.sceneLayer; - if ((gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_SPOT00) && !LINK_IS_ADULT && + if ((gEntranceTable[((void)0, gSaveContext.entranceIndex)].sceneId == SCENE_SPOT00) && !LINK_IS_ADULT && !IS_CUTSCENE_LAYER) { if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) && CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE)) { @@ -313,20 +313,21 @@ void Play_Init(GameState* thisx) { } else { gSaveContext.sceneLayer = 0; } - } else if ((gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_SPOT04) && LINK_IS_ADULT && + } else if ((gEntranceTable[((void)0, gSaveContext.entranceIndex)].sceneId == SCENE_SPOT04) && LINK_IS_ADULT && !IS_CUTSCENE_LAYER) { gSaveContext.sceneLayer = GET_EVENTCHKINF(EVENTCHKINF_48) ? 3 : 2; } Play_SpawnScene(this, - gEntranceTable[((void)0, gSaveContext.entranceIndex) + ((void)0, gSaveContext.sceneLayer)].scene, + gEntranceTable[((void)0, gSaveContext.entranceIndex) + ((void)0, gSaveContext.sceneLayer)].sceneId, gEntranceTable[((void)0, gSaveContext.entranceIndex) + ((void)0, gSaveContext.sceneLayer)].spawn); osSyncPrintf("\nSCENE_NO=%d COUNTER=%d\n", ((void)0, gSaveContext.entranceIndex), gSaveContext.sceneLayer); // When entering Gerudo Valley in the credits, trigger the GC emulator to play the ending movie. // The emulator constantly checks whether PC is 0x81000000, so this works even though it's not a valid address. - if ((gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_SPOT09) && gSaveContext.sceneLayer == 6) { + if ((gEntranceTable[((void)0, gSaveContext.entranceIndex)].sceneId == SCENE_SPOT09) && + gSaveContext.sceneLayer == 6) { osSyncPrintf("エンディングはじまるよー\n"); // "The ending starts" ((void (*)(void))0x81000000)(); osSyncPrintf("出戻り?\n"); // "Return?" @@ -1415,12 +1416,12 @@ void Play_InitScene(PlayState* this, s32 spawn) { Play_InitEnvironment(this, this->skyboxId); } -void Play_SpawnScene(PlayState* this, s32 sceneNum, s32 spawn) { - SceneTableEntry* scene = &gSceneTable[sceneNum]; +void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn) { + SceneTableEntry* scene = &gSceneTable[sceneId]; scene->unk_13 = 0; this->loadedScene = scene; - this->sceneNum = sceneNum; + this->sceneId = sceneId; this->sceneDrawConfig = scene->drawConfig; osSyncPrintf("\nSCENE SIZE %fK\n", (scene->sceneFile.vromEnd - scene->sceneFile.vromStart) / 1024.0f); @@ -1662,7 +1663,7 @@ s16 func_800C09D8(PlayState* this, s16 camId, s16 arg2) { } void Play_SaveSceneFlags(PlayState* this) { - SavedSceneFlags* savedSceneFlags = &gSaveContext.sceneFlags[this->sceneNum]; + SavedSceneFlags* savedSceneFlags = &gSaveContext.sceneFlags[this->sceneId]; savedSceneFlags->chest = this->actorCtx.flags.chest; savedSceneFlags->swch = this->actorCtx.flags.swch; @@ -1688,7 +1689,7 @@ void Play_SetupRespawnPoint(PlayState* this, s32 respawnMode, s32 playerParams) s32 entranceIndex; s8 roomIndex; - if ((this->sceneNum != SCENE_YOUSEI_IZUMI_TATE) && (this->sceneNum != SCENE_KAKUSIANA)) { + if ((this->sceneId != SCENE_YOUSEI_IZUMI_TATE) && (this->sceneId != SCENE_KAKUSIANA)) { roomIndex = this->roomCtx.curRoom.num; entranceIndex = gSaveContext.entranceIndex; Play_SetRespawnData(this, respawnMode, entranceIndex, roomIndex, playerParams, &player->actor.world.pos, @@ -1709,8 +1710,8 @@ void Play_LoadToLastEntrance(PlayState* this) { gSaveContext.respawnFlag = -1; this->transitionTrigger = TRANS_TRIGGER_START; - if ((this->sceneNum == SCENE_GANON_SONOGO) || (this->sceneNum == SCENE_GANON_FINAL) || - (this->sceneNum == SCENE_GANONTIKA_SONOGO) || (this->sceneNum == SCENE_GANON_DEMO)) { + if ((this->sceneId == SCENE_GANON_SONOGO) || (this->sceneId == SCENE_GANON_FINAL) || + (this->sceneId == SCENE_GANONTIKA_SONOGO) || (this->sceneId == SCENE_GANON_DEMO)) { this->nextEntranceIndex = ENTR_GANON_FINAL_0; Item_Give(this, ITEM_SWORD_MASTER); } else if ((gSaveContext.entranceIndex == ENTR_SPOT00_11) || (gSaveContext.entranceIndex == ENTR_SPOT00_12) || @@ -1733,7 +1734,7 @@ s32 Play_CamIsNotFixed(PlayState* this) { // but the scene mesh header handles all shop cases regardless return (this->roomCtx.curRoom.meshHeader->base.type != MESH_HEADER_TYPE_1) && (R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_FIXED_TOGGLE_VIEWPOINT) && (R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_FIXED) && - (R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_FIXED_MARKET) && (this->sceneNum != SCENE_HAIRAL_NIWA); + (R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_FIXED_MARKET) && (this->sceneId != SCENE_HAIRAL_NIWA); } s32 FrameAdvance_IsEnabled(PlayState* this) { diff --git a/src/code/z_room.c b/src/code/z_room.c index c43450f624..3a6b33d4ea 100644 --- a/src/code/z_room.c +++ b/src/code/z_room.c @@ -590,7 +590,7 @@ void func_80097534(PlayState* play, RoomContext* roomCtx) { func_80031B14(play, &play->actorCtx); Actor_SpawnTransitionActors(play, &play->actorCtx); Map_InitRoomData(play, roomCtx->curRoom.num); - if (!((play->sceneNum >= SCENE_SPOT00) && (play->sceneNum <= SCENE_SPOT20))) { + if (!((play->sceneId >= SCENE_SPOT00) && (play->sceneId <= SCENE_SPOT20))) { Map_SavePlayerInitialInfo(play); } Audio_SetEnvReverb(play->roomCtx.curRoom.echo); diff --git a/src/code/z_scene.c b/src/code/z_scene.c index 1b360385c2..fc2d32295a 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -38,19 +38,19 @@ void Object_InitBank(PlayState* play, ObjectContext* objectCtx) { u32 spaceSize; s32 i; - if (play2->sceneNum == SCENE_SPOT00) { + if (play2->sceneId == SCENE_SPOT00) { spaceSize = 1024000; - } else if (play2->sceneNum == SCENE_GANON_DEMO) { + } else if (play2->sceneId == SCENE_GANON_DEMO) { if (gSaveContext.sceneLayer != 4) { spaceSize = 1177600; } else { spaceSize = 1024000; } - } else if (play2->sceneNum == SCENE_JYASINBOSS) { + } else if (play2->sceneId == SCENE_JYASINBOSS) { spaceSize = 1075200; - } else if (play2->sceneNum == SCENE_KENJYANOMA) { + } else if (play2->sceneId == SCENE_KENJYANOMA) { spaceSize = 1075200; - } else if (play2->sceneNum == SCENE_GANON_BOSS) { + } else if (play2->sceneId == SCENE_GANON_BOSS) { spaceSize = 1075200; } else { spaceSize = 1024000; @@ -453,14 +453,14 @@ void Scene_CommandMiscSettings(PlayState* play, SceneCmd* cmd) { R_SCENE_CAM_TYPE = cmd->miscSettings.sceneCamType; gSaveContext.worldMapArea = cmd->miscSettings.area; - if ((play->sceneNum == SCENE_SHOP1) || (play->sceneNum == SCENE_SYATEKIJYOU)) { + if ((play->sceneId == SCENE_SHOP1) || (play->sceneId == SCENE_SYATEKIJYOU)) { if (LINK_AGE_IN_YEARS == YEARS_ADULT) { gSaveContext.worldMapArea = 1; } } - if (((play->sceneNum >= SCENE_SPOT00) && (play->sceneNum <= SCENE_GANON_TOU)) || - ((play->sceneNum >= SCENE_ENTRA) && (play->sceneNum <= SCENE_SHRINE_R))) { + if (((play->sceneId >= SCENE_SPOT00) && (play->sceneId <= SCENE_GANON_TOU)) || + ((play->sceneId >= SCENE_ENTRA) && (play->sceneId <= SCENE_SHRINE_R))) { if (gSaveContext.cutsceneIndex < 0xFFF0) { gSaveContext.worldMapAreaData |= gBitFlags[gSaveContext.worldMapArea]; osSyncPrintf("000 area_arrival=%x (%d)\n", gSaveContext.worldMapAreaData, diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index 3d99aa6187..67d071ece8 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -24,11 +24,11 @@ #include "overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.h" // Entrance Table definition -#define DEFINE_ENTRANCE(_0, scene, spawn, continueBgm, displayTitleCard, endTransType, startTransType) \ - { scene, spawn, \ - (((continueBgm) ? ENTRANCE_INFO_CONTINUE_BGM_FLAG : 0) | \ - ((displayTitleCard) ? ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG : 0) | \ - (((endTransType) << ENTRANCE_INFO_END_TRANS_TYPE_SHIFT) & ENTRANCE_INFO_END_TRANS_TYPE_MASK) | \ +#define DEFINE_ENTRANCE(_0, sceneId, spawn, continueBgm, displayTitleCard, endTransType, startTransType) \ + { sceneId, spawn, \ + (((continueBgm) ? ENTRANCE_INFO_CONTINUE_BGM_FLAG : 0) | \ + ((displayTitleCard) ? ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG : 0) | \ + (((endTransType) << ENTRANCE_INFO_END_TRANS_TYPE_SHIFT) & ENTRANCE_INFO_END_TRANS_TYPE_MASK) | \ (((startTransType) << ENTRANCE_INFO_START_TRANS_TYPE_SHIFT) & ENTRANCE_INFO_START_TRANS_TYPE_MASK)) }, EntranceInfo gEntranceTable[] = { @@ -378,7 +378,7 @@ void Scene_DrawConfigHakadan(PlayState* play) { gameplayFrames = play->gameplayFrames; - if (play->sceneNum == SCENE_HAKADAN_BS) { + if (play->sceneId == SCENE_HAKADAN_BS) { gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 2) % 128, 0, 32, 32, 1, (gameplayFrames * 2) % 128, 0, 32, 32)); @@ -533,7 +533,7 @@ void Scene_DrawConfigHairalNiwa(PlayState* play) { (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); - if (play->sceneNum == SCENE_HAIRAL_NIWA) { + if (play->sceneId == SCENE_HAIRAL_NIWA) { gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 10) % 256, 32, 64)); } @@ -558,7 +558,7 @@ void Scene_DrawConfigGanonCastleExterior(PlayState* play) { gameplayFrames = play->gameplayFrames; - if (play->sceneNum == SCENE_GANON_TOU) { + if (play->sceneId == SCENE_GANON_TOU) { gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 64, 64)); gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 255 - (gameplayFrames * 1) % 256, 64, 64, 1, @@ -636,8 +636,8 @@ void Scene_DrawConfigGanonFinal(PlayState* play) { CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6004); if (Flags_GetSwitch(play, 0x37)) { - if ((play->sceneNum == SCENE_GANON_DEMO) || (play->sceneNum == SCENE_GANON_FINAL) || - (play->sceneNum == SCENE_GANON_SONOGO) || (play->sceneNum == SCENE_GANONTIKA_SONOGO)) { + if ((play->sceneId == SCENE_GANON_DEMO) || (play->sceneId == SCENE_GANON_FINAL) || + (play->sceneId == SCENE_GANON_SONOGO) || (play->sceneId == SCENE_GANONTIKA_SONOGO)) { func_8009BEEC(play); } } @@ -1468,7 +1468,7 @@ void Scene_DrawConfigBdan(PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7712); gameplayFrames = play->gameplayFrames; - if (play->sceneNum == SCENE_BDAN) { + if (play->sceneId == SCENE_BDAN) { gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames % 128, (gameplayFrames * 2) % 128, 32, 32, 1, 127 - gameplayFrames % 128, diff --git a/src/code/z_sram.c b/src/code/z_sram.c index 4afaff3067..4aa722e66c 100644 --- a/src/code/z_sram.c +++ b/src/code/z_sram.c @@ -27,7 +27,7 @@ typedef struct { /* 0x2E */ ItemEquips adultEquips; /* 0x38 */ u32 unk_38; // this may be incorrect, currently used for alignement /* 0x3C */ char unk_3C[0x0E]; - /* 0x4A */ s16 savedSceneNum; + /* 0x4A */ s16 savedSceneId; } SavePlayerData; // size = 0x4C typedef struct { @@ -126,7 +126,7 @@ static SavePlayerData sNewSavePlayerData = { }, // adultEquips 0, // unk_38 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // unk_3C - 0x34, // savedSceneNum + SCENE_LINK_HOME, // savedSceneId }; static ItemEquips sNewSaveEquips = { @@ -171,7 +171,7 @@ void Sram_InitNewSave(void) { gSaveContext.inventory = sNewSaveInventory; temp->checksum = sNewSaveChecksum; - gSaveContext.horseData.scene = SCENE_SPOT00; + gSaveContext.horseData.sceneId = SCENE_SPOT00; gSaveContext.horseData.pos.x = -1840; gSaveContext.horseData.pos.y = 72; gSaveContext.horseData.pos.z = 5497; @@ -211,7 +211,7 @@ static SavePlayerData sDebugSavePlayerData = { }, // adultEquips 0, // unk_38 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // unk_3C - 0x51, // savedSceneNum + SCENE_SPOT00, // savedSceneId }; static ItemEquips sDebugSaveEquips = { @@ -274,7 +274,7 @@ void Sram_InitDebugSave(void) { gSaveContext.inventory = sDebugSaveInventory; temp->checksum = sDebugSaveChecksum; - gSaveContext.horseData.scene = SCENE_SPOT00; + gSaveContext.horseData.sceneId = SCENE_SPOT00; gSaveContext.horseData.pos.x = -1840; gSaveContext.horseData.pos.y = 72; gSaveContext.horseData.pos.z = 5497; @@ -327,10 +327,10 @@ void Sram_OpenSave(SramContext* sramCtx) { MemCpy(&gSaveContext, sramCtx->readBuff + i, sizeof(Save)); osSyncPrintf(VT_FGCOL(YELLOW)); - osSyncPrintf("SCENE_DATA_ID = %d SceneNo = %d\n", gSaveContext.savedSceneNum, + osSyncPrintf("SCENE_DATA_ID = %d SceneNo = %d\n", gSaveContext.savedSceneId, ((void)0, gSaveContext.entranceIndex)); - switch (gSaveContext.savedSceneNum) { + switch (gSaveContext.savedSceneId) { case SCENE_YDAN: case SCENE_DDAN: case SCENE_BDAN: @@ -345,7 +345,7 @@ void Sram_OpenSave(SramContext* sramCtx) { case SCENE_MEN: case SCENE_GERUDOWAY: case SCENE_GANONTIKA: - gSaveContext.entranceIndex = sDungeonEntrances[gSaveContext.savedSceneNum]; + gSaveContext.entranceIndex = sDungeonEntrances[gSaveContext.savedSceneId]; break; case SCENE_YDAN_BOSS: @@ -389,7 +389,7 @@ void Sram_OpenSave(SramContext* sramCtx) { break; default: - if (gSaveContext.savedSceneNum != SCENE_LINK_HOME) { + if (gSaveContext.savedSceneId != SCENE_LINK_HOME) { gSaveContext.entranceIndex = (LINK_AGE_IN_YEARS == YEARS_CHILD) ? ENTR_LINK_HOME_0 : ENTR_TOKINOMA_7; } else { gSaveContext.entranceIndex = ENTR_LINK_HOME_0; diff --git a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c index d679375ebc..fb2f482c11 100644 --- a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c +++ b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c @@ -80,7 +80,7 @@ void BgDyYoseizo_Init(Actor* thisx, PlayState* play2) { this->grownHeight = this->vanishHeight + 40.0f; this->actor.focus.pos = this->actor.world.pos; - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { // "Great Fairy Fountain" osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 大妖精の泉 ☆☆☆☆☆ %d\n" VT_RST, play->curSpawn); SkelAnime_InitFlex(play, &this->skelAnime, &gGreatFairySkel, &gGreatFairySittingTransitionAnim, @@ -139,7 +139,7 @@ void BgDyYoseizo_SpawnEffects(BgDyYoseizo* this, PlayState* play, s16 type) { scale = 0.2f; pos.x = this->actor.world.pos.x + Rand_CenteredFloat(10.0f); - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { pos.y = this->actor.world.pos.y + spawnPosVariation + 50.0f + ((Rand_ZeroOne() - 0.5f) * (spawnPosVariation * 0.1f)); pos.z = this->actor.world.pos.z + 30.0f; @@ -180,7 +180,7 @@ void BgDyYoseizo_Bob(BgDyYoseizo* this, PlayState* play) { void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) { if (Flags_GetSwitch(play, 0x38)) { play->msgCtx.ocarinaMode = OCARINA_MODE_04; - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { if (!gSaveContext.isMagicAcquired && (this->fountainType != FAIRY_UPGRADE_MAGIC)) { Actor_Kill(&this->actor); return; @@ -204,7 +204,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) { osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ もうど ☆☆☆☆☆ %d\n" VT_RST, play->msgCtx.ocarinaMode); givingReward = false; - if (play->sceneNum != SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId != SCENE_DAIYOUSEI_IZUMI) { switch (this->fountainType) { case FAIRY_SPELL_FARORES_WIND: if (!GET_ITEMGETINF(ITEMGETINF_18)) { @@ -253,7 +253,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) { if (givingReward) { if (!IS_CUTSCENE_LAYER) { - if (play->sceneNum != SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId != SCENE_DAIYOUSEI_IZUMI) { switch (this->fountainType) { case FAIRY_SPELL_FARORES_WIND: play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGreatFairyFaroresWindCs); @@ -291,7 +291,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) { play->envCtx.lightSettingOverride = 2; - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { OnePointCutscene_Init(play, 8603, -99, NULL, CAM_ID_MAIN); } else { OnePointCutscene_Init(play, 8604, -99, NULL, CAM_ID_MAIN); @@ -304,7 +304,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) { // Sets animations for spingrow void BgDyYoseizo_SetupSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { this->frameCount = Animation_GetLastFrame(&gGreatFairySittingTransitionAnim); Animation_Change(&this->skelAnime, &gGreatFairySittingTransitionAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_ONCE, -10.0f); @@ -362,7 +362,7 @@ void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { func_8002DF54(play, &this->actor, 1); - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { this->frameCount = Animation_GetLastFrame(&gGreatFairySittingAnim); Animation_Change(&this->skelAnime, &gGreatFairySittingAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_LOOP, -10.0f); @@ -400,7 +400,7 @@ void BgDyYoseizo_GreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { } void BgDyYoseizo_SetupHealPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { this->frameCount = Animation_GetLastFrame(&gGreatFairyGivingUpgradeAnim); Animation_Change(&this->skelAnime, &gGreatFairyGivingUpgradeAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_ONCE, -10.0f); @@ -430,7 +430,7 @@ void BgDyYoseizo_HealPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if ((this->frameCount <= curFrame) && !(this->animationChanged)) { - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { this->frameCount = Animation_GetLastFrame(&gGreatFairyAfterUpgradeAnim); Animation_Change(&this->skelAnime, &gGreatFairyAfterUpgradeAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_LOOP, -10.0f); @@ -446,7 +446,7 @@ void BgDyYoseizo_HealPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { beamPos.y = player->actor.world.pos.y + 200.0f; beamPos.z = player->actor.world.pos.z; - beamParams = ((play->sceneNum == SCENE_DAIYOUSEI_IZUMI) ? 0 : 1); + beamParams = ((play->sceneId == SCENE_DAIYOUSEI_IZUMI) ? 0 : 1); this->beam = (EnDyExtra*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_DY_EXTRA, beamPos.x, beamPos.y, beamPos.z, 0, 0, 0, beamParams); @@ -508,7 +508,7 @@ void BgDyYoseizo_SayFarewell_NoReward(BgDyYoseizo* this, PlayState* play) { } void BgDyYoseizo_SetupSpinShrink(BgDyYoseizo* this, PlayState* play) { - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { this->frameCount = Animation_GetLastFrame(&gGreatFairyJewelFountainSpinShrinkAnim); Animation_Change(&this->skelAnime, &gGreatFairyJewelFountainSpinShrinkAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_ONCE, -10.0f); @@ -572,7 +572,7 @@ void BgDyYoseizo_SetupSpinGrow_Reward(BgDyYoseizo* this, PlayState* play) { func_8002DF54(play, &this->actor, 1); this->finishedSpinGrow = false; - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { this->frameCount = Animation_GetLastFrame(&gGreatFairySittingTransitionAnim); Animation_Change(&this->skelAnime, &gGreatFairySittingTransitionAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_ONCE, -10.0f); @@ -615,7 +615,7 @@ void BgDyYoseizo_SpinGrowSetupGive_Reward(BgDyYoseizo* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if ((this->frameCount <= curFrame) && !this->animationChanged) { - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { this->frameCount = Animation_GetLastFrame(&gGreatFairySittingAnim); Animation_Change(&this->skelAnime, &gGreatFairySittingAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_LOOP, -10.0f); @@ -630,7 +630,7 @@ void BgDyYoseizo_SpinGrowSetupGive_Reward(BgDyYoseizo* this, PlayState* play) { if ((play->csCtx.state != CS_STATE_IDLE) && ((play->csCtx.npcActions[0] != NULL) && (play->csCtx.npcActions[0]->action == 3))) { this->finishedSpinGrow = this->animationChanged = false; - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { this->frameCount = Animation_GetLastFrame(&gGreatFairyGivingUpgradeAnim); Animation_Change(&this->skelAnime, &gGreatFairyGivingUpgradeAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_ONCE, -10.0f); @@ -670,7 +670,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if ((this->frameCount <= curFrame) && !this->animationChanged) { - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { this->frameCount = Animation_GetLastFrame(&gGreatFairyAfterUpgradeAnim); Animation_Change(&this->skelAnime, &gGreatFairyAfterUpgradeAnim, 1.0f, 0.0f, this->frameCount, ANIMMODE_LOOP, -10.0f); @@ -689,7 +689,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) { if ((play->csCtx.npcActions[0]->action >= 4) && (play->csCtx.npcActions[0]->action < 7)) { actionIndex = play->csCtx.npcActions[0]->action - 4; - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { actionIndex++; BgDyYoseizo_SpawnEffects(this, play, actionIndex); @@ -703,7 +703,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) { BgDyYoseizo_SpawnEffects(this, play, 0); } - if ((play->sceneNum == SCENE_DAIYOUSEI_IZUMI) && (play->csCtx.npcActions[0]->action >= 10) && + if ((play->sceneId == SCENE_DAIYOUSEI_IZUMI) && (play->csCtx.npcActions[0]->action >= 10) && (play->csCtx.npcActions[0]->action < 13)) { actionIndex = play->csCtx.npcActions[0]->action - 10; @@ -739,7 +739,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) { } } - if ((play->sceneNum != SCENE_DAIYOUSEI_IZUMI) && (play->csCtx.npcActions[0]->action >= 14) && + if ((play->sceneId != SCENE_DAIYOUSEI_IZUMI) && (play->csCtx.npcActions[0]->action >= 14) && (play->csCtx.npcActions[0]->action < 17)) { actionIndex = play->csCtx.npcActions[0]->action - 14; @@ -773,13 +773,12 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) { } } - if ((play->sceneNum != SCENE_DAIYOUSEI_IZUMI) && (play->csCtx.npcActions[0]->action == 17) && - (this->item != NULL)) { + if ((play->sceneId != SCENE_DAIYOUSEI_IZUMI) && (play->csCtx.npcActions[0]->action == 17) && (this->item != NULL)) { Actor_Kill(&this->item->actor); this->item = NULL; } - if ((play->sceneNum == SCENE_DAIYOUSEI_IZUMI) && (play->csCtx.npcActions[0]->action == 18)) { + if ((play->sceneId == SCENE_DAIYOUSEI_IZUMI) && (play->csCtx.npcActions[0]->action == 18)) { this->giveDefenseHearts = true; } @@ -820,7 +819,7 @@ void BgDyYoseizo_Update(Actor* thisx, PlayState* play2) { if (play->csCtx.state != CS_STATE_IDLE) { sfx = 0; - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) { if ((play->csCtx.frames == 32) || (play->csCtx.frames == 291) || (play->csCtx.frames == 426) || (play->csCtx.frames == 851)) { sfx = 1; diff --git a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c index dc4801e8d1..f54b714916 100644 --- a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c +++ b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c @@ -43,7 +43,7 @@ void BgGateShutter_Init(Actor* thisx, PlayState* play) { this->somePos.x = thisx->world.pos.x; this->somePos.y = thisx->world.pos.y; this->somePos.z = thisx->world.pos.z; - if ((GET_INFTABLE(INFTABLE_76) || GET_EVENTCHKINF(EVENTCHKINF_45)) && (play->sceneNum == SCENE_SPOT01)) { + if ((GET_INFTABLE(INFTABLE_76) || GET_EVENTCHKINF(EVENTCHKINF_45)) && (play->sceneId == SCENE_SPOT01)) { thisx->world.pos.x = -89.0f; thisx->world.pos.z = -1375.0f; } diff --git a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c index 0c84019793..06ab4f165f 100644 --- a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c +++ b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c @@ -68,7 +68,7 @@ void func_8087B7E8(BgHaka* this, PlayState* play) { Player* player = GET_PLAYER(play); if (this->dyna.unk_150 != 0.0f) { - if (play->sceneNum == SCENE_SPOT02 && !LINK_IS_ADULT && IS_DAY) { + if (play->sceneId == SCENE_SPOT02 && !LINK_IS_ADULT && IS_DAY) { this->dyna.unk_150 = 0.0f; player->stateFlags2 &= ~PLAYER_STATE2_4; if (!Play_InCsMode(play)) { @@ -77,7 +77,7 @@ void func_8087B7E8(BgHaka* this, PlayState* play) { this->actionFunc = func_8087BAE4; } } else if (0.0f < this->dyna.unk_150 || - (play->sceneNum == SCENE_SPOT06 && !LINK_IS_ADULT && !Flags_GetSwitch(play, 0x23))) { + (play->sceneId == SCENE_SPOT06 && !LINK_IS_ADULT && !Flags_GetSwitch(play, 0x23))) { this->dyna.unk_150 = 0.0f; player->stateFlags2 &= ~PLAYER_STATE2_4; } else { @@ -104,7 +104,7 @@ void func_8087B938(BgHaka* this, PlayState* play) { player->stateFlags2 &= ~PLAYER_STATE2_4; if (this->dyna.actor.params == 1) { func_80078884(NA_SE_SY_CORRECT_CHIME); - } else if (!IS_DAY && play->sceneNum == SCENE_SPOT02) { + } else if (!IS_DAY && play->sceneId == SCENE_SPOT02) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_POH, this->dyna.actor.home.pos.x, this->dyna.actor.home.pos.y, this->dyna.actor.home.pos.z, 0, this->dyna.actor.shape.rot.y, 0, 1); } diff --git a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c index e11a99b4a4..4f9abc8ace 100644 --- a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c +++ b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c @@ -88,7 +88,7 @@ void BgHeavyBlock_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f); this->pieceFlags = 0; - if (play->sceneNum == SCENE_GANON_TOU) { + if (play->sceneId == SCENE_GANON_TOU) { thisx->params &= 0xFF00; thisx->params |= 4; } diff --git a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c index c9c77e5e2a..037ac6d6e3 100644 --- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c +++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c @@ -44,7 +44,7 @@ void BgInGate_Init(Actor* thisx, PlayState* play) { this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); - if ((play->sceneNum != SCENE_SPOT20 || !LINK_IS_ADULT) || + if ((play->sceneId != SCENE_SPOT20 || !LINK_IS_ADULT) || (GET_EVENTCHKINF(EVENTCHKINF_18) && (gSaveContext.cutsceneIndex != 0xFFF0))) { Actor_Kill(&this->dyna.actor); return; diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index 905f8acec1..a66ec1b271 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -207,7 +207,7 @@ void BgSpot00Hanebasi_Update(Actor* thisx, PlayState* play) { this->actionFunc(this, play); if (this->dyna.actor.params == DT_DRAWBRIDGE) { - if (play->sceneNum == SCENE_SPOT00) { + if (play->sceneId == SCENE_SPOT00) { if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) && CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !GET_EVENTCHKINF(EVENTCHKINF_80) && LINK_IS_CHILD) { Player* player = GET_PLAYER(play); diff --git a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c index 39e2ff3f6e..61568c26c5 100644 --- a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c @@ -76,7 +76,7 @@ void BgSpot02Objects_Init(Actor* thisx, PlayState* play) { CollisionHeader_GetVirtual(&object_spot02_objects_Col_0128D8, &colHeader); thisx->flags |= ACTOR_FLAG_22; } else { - if (play->sceneNum == SCENE_SPOT02) { + if (play->sceneId == SCENE_SPOT02) { this->actionFunc = func_808AC908; } else { this->actionFunc = func_808AC8FC; @@ -87,7 +87,7 @@ void BgSpot02Objects_Init(Actor* thisx, PlayState* play) { this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader); - if ((GET_EVENTCHKINF(EVENTCHKINF_1D) && (play->sceneNum == SCENE_SPOT02) && (thisx->params == 2)) || + if ((GET_EVENTCHKINF(EVENTCHKINF_1D) && (play->sceneId == SCENE_SPOT02) && (thisx->params == 2)) || (LINK_IS_ADULT && (thisx->params == 1))) { Actor_Kill(thisx); } diff --git a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c index f5833a8e39..fe8f81721f 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c +++ b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c @@ -95,7 +95,7 @@ s32 func_808B3AAC(BgSpot15Rrbox* this, PlayState* play) { s16 rotY; Actor* actor = &this->dyna.actor; - if (play->sceneNum == SCENE_SOUKO) { + if (play->sceneId == SCENE_SOUKO) { return true; } else if (func_808B3A40(this, play)) { return false; diff --git a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c index 4294777fde..0a0ab9a3aa 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c @@ -56,7 +56,7 @@ void BgSpot16Doughnut_Init(Actor* thisx, PlayState* play) { } else { // Scales this actor for scenes where it is featured in the background, // Death Mountain itself falls into the default case. - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_SPOT01: Actor_SetScale(&this->actor, 0.04f); break; diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index b522e6565f..141f111357 100644 --- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -364,8 +364,8 @@ void BossGanon_Init(Actor* thisx, PlayState* play2) { this->organAlpha = 255; } else { cond = Flags_GetSwitch(play, 0x37) && - ((play->sceneNum == SCENE_GANON_DEMO) || (play->sceneNum == SCENE_GANON_FINAL) || - (play->sceneNum == SCENE_GANON_SONOGO) || (play->sceneNum == SCENE_GANONTIKA_SONOGO)); + ((play->sceneId == SCENE_GANON_DEMO) || (play->sceneId == SCENE_GANON_FINAL) || + (play->sceneId == SCENE_GANON_SONOGO) || (play->sceneId == SCENE_GANONTIKA_SONOGO)); if (!cond) { BossGanon_SetupTowerCutscene(this, play); diff --git a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c index 4dbb754143..6d3d1004df 100644 --- a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c +++ b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c @@ -299,7 +299,7 @@ void func_8096712C(Demo6K* this, PlayState* play) { this->timer2++; - if ((play->sceneNum == SCENE_GANONTIKA) && (play->csCtx.frames < D_8096932C[this->actor.params - 3])) { + if ((play->sceneId == SCENE_GANONTIKA) && (play->csCtx.frames < D_8096932C[this->actor.params - 3])) { func_8002F974(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG); } } @@ -331,7 +331,7 @@ void func_80967244(Demo6K* this, PlayState* play) { envColor.g = sEnvColors[this->unk_293].g; envColor.b = sEnvColors[this->unk_293].b; - if (play->sceneNum == SCENE_TOKINOMA) { + if (play->sceneId == SCENE_TOKINOMA) { scale = 6000; } else if (play->csCtx.frames < 419) { scale = 6000; diff --git a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index 6eef8528d8..195b13fc13 100644 --- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -144,7 +144,7 @@ void DemoEffect_InitJewel(PlayState* play, DemoEffect* this) { } else { this->initUpdateFunc = DemoEffect_UpdateJewelAdult; } - if (play->sceneNum == SCENE_TOKINOMA) { + if (play->sceneId == SCENE_TOKINOMA) { Actor_SetScale(&this->actor, 0.35f); } else { Actor_SetScale(&this->actor, 0.10f); @@ -492,7 +492,7 @@ void DemoEffect_Init(Actor* thisx, PlayState* play2) { this->jewel.isPositionInit = 0; DemoEffect_InitJewel(play, this); Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_BOSS); - if ((play->sceneNum == SCENE_BDAN) && GET_INFTABLE(INFTABLE_145)) { + if ((play->sceneId == SCENE_BDAN) && GET_INFTABLE(INFTABLE_145)) { Actor_Kill(&this->actor); return; } @@ -1068,11 +1068,11 @@ void DemoEffect_UpdateLightEffect(DemoEffect* this, PlayState* play) { break; } - if (play->sceneNum == SCENE_SPOT04 && gSaveContext.sceneLayer == 6 && play->csCtx.frames == 197) { + if (play->sceneId == SCENE_SPOT04 && gSaveContext.sceneLayer == 6 && play->csCtx.frames == 197) { Audio_PlayActorSfx2(&this->actor, NA_SE_EV_WHITE_OUT); } - if (play->sceneNum == SCENE_SPOT16 && gSaveContext.sceneLayer == 5) { + if (play->sceneId == SCENE_SPOT16 && gSaveContext.sceneLayer == 5) { if (!DemoEffect_CheckCsAction(this, play, 1)) { Audio_PlayActorSfx2(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG); } @@ -1083,7 +1083,7 @@ void DemoEffect_UpdateLightEffect(DemoEffect* this, PlayState* play) { if (0) {} } - if (play->sceneNum == SCENE_SPOT08 && gSaveContext.sceneLayer == 4) { + if (play->sceneId == SCENE_SPOT08 && gSaveContext.sceneLayer == 4) { if (!DemoEffect_CheckCsAction(this, play, 1)) { Audio_PlayActorSfx2(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG); } @@ -1095,7 +1095,7 @@ void DemoEffect_UpdateLightEffect(DemoEffect* this, PlayState* play) { if (0) {} } - if (play->sceneNum == SCENE_TOKINOMA && gSaveContext.sceneLayer == 14) { + if (play->sceneId == SCENE_TOKINOMA && gSaveContext.sceneLayer == 14) { if (1) {} if (play->csCtx.npcActions[this->csActionId]->action == 2) { @@ -1103,7 +1103,7 @@ void DemoEffect_UpdateLightEffect(DemoEffect* this, PlayState* play) { } } - if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI || play->sceneNum == SCENE_YOUSEI_IZUMI_YOKO) { + if (play->sceneId == SCENE_DAIYOUSEI_IZUMI || play->sceneId == SCENE_YOUSEI_IZUMI_YOKO) { if (play->csCtx.npcActions[this->csActionId]->action == 2) { Audio_PlayActorSfx2(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG); } diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c index a8dfabfa2b..2256ef7e55 100644 --- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c +++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c @@ -193,7 +193,7 @@ void DemoKankyo_Init(Actor* thisx, PlayState* play) { switch (this->actor.params) { case DEMOKANKYO_BLUE_RAIN: case DEMOKANKYO_BLUE_RAIN_2: - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_HIRAL_DEMO: play->roomCtx.curRoom.segment = NULL; D_8098CF80 = 10; @@ -318,7 +318,7 @@ void DemoKankyo_SetupType(DemoKankyo* this, PlayState* play) { this->warpTimer--; } if (this->warpTimer == 1) { - if (play->sceneNum == SCENE_TOKINOMA) { + if (play->sceneId == SCENE_TOKINOMA) { D_8098CF84 = 25; if (!LINK_IS_ADULT) { play->csCtx.segment = gChildWarpInToTCS; @@ -340,7 +340,7 @@ void DemoKankyo_SetupType(DemoKankyo* this, PlayState* play) { } break; case DEMOKANKYO_WARP_IN: - if (play->sceneNum == SCENE_TOKINOMA) { + if (play->sceneId == SCENE_TOKINOMA) { if (!LINK_IS_ADULT) { play->csCtx.segment = gChildWarpOutToTCS; } else { @@ -432,7 +432,7 @@ void DemoKankyo_Draw(Actor* thisx, PlayState* play) { switch (this->actor.params) { case DEMOKANKYO_BLUE_RAIN: case DEMOKANKYO_BLUE_RAIN_2: - if (play->sceneNum == SCENE_TOKINOMA) { + if (play->sceneId == SCENE_TOKINOMA) { if (!Flags_GetEnv(play, 1)) { break; } else if (!Actor_IsFacingAndNearPlayer(&this->actor, 300.0f, 0x7530)) { @@ -485,7 +485,7 @@ void DemoKankyo_Draw(Actor* thisx, PlayState* play) { void func_80989B54(Actor* thisx, PlayState* play, s16 i) { DemoKankyo* this = (DemoKankyo*)thisx; - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_HIRAL_DEMO: this->unk_150[i].unk_0.x = (Rand_ZeroOne() - 0.5f) * 500.0f; this->unk_150[i].unk_0.y = 500.0f; @@ -531,7 +531,7 @@ void DemoKankyo_DrawRain(Actor* thisx, PlayState* play) { dz = play->view.at.z - play->view.eye.z; norm = sqrtf(SQ(dx) + SQ(dy) + SQ(dz)); - if (play->sceneNum != SCENE_TOKINOMA) { + if (play->sceneId != SCENE_TOKINOMA) { this->unk_150[i].unk_C.x = play->view.eye.x + (dx / norm) * 350.0f; this->unk_150[i].unk_C.y = play->view.eye.y + (dy / norm) * 80.0f; this->unk_150[i].unk_C.z = play->view.eye.z + (dz / norm) * 350.0f; @@ -597,7 +597,7 @@ void DemoKankyo_DrawRain(Actor* thisx, PlayState* play) { for (j = 0; j < 5; j++) { s32 pad1; - if (play->sceneNum != SCENE_TOKINOMA) { + if (play->sceneId != SCENE_TOKINOMA) { if (this->unk_150[i].unk_0.x >= 0.0f) { translateX = -j * 1500.0f; } else { @@ -796,7 +796,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) { &this->unk_150[i].unk_1C) != 0) { this->unk_150[i].unk_22++; } - if (play->sceneNum == SCENE_TOKINOMA && play->csCtx.frames == 25) { + if (play->sceneId == SCENE_TOKINOMA && play->csCtx.frames == 25) { this->unk_150[i].unk_22++; } } else { diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index 489224a9cd..77cc315c5e 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -129,7 +129,7 @@ static InitChainEntry sInitChain[] = { }; typedef struct { - s16 sceneNum; + s16 sceneId; u8 index; } ShutterSceneInfo; @@ -143,8 +143,8 @@ static ShutterSceneInfo sSceneInfo[] = { }; typedef struct { - s16 dungeonScene; - s16 bossScene; + s16 dungeonSceneId; + s16 bossSceneId; u8 index; } BossDoorInfo; @@ -234,7 +234,7 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) { ShutterSceneInfo* phi_v1; for (phi_v1 = &sSceneInfo[0], i = 0; i < ARRAY_COUNT(sSceneInfo) - 1; i++, phi_v1++) { - if (play->sceneNum == phi_v1->sceneNum) { + if (play->sceneId == phi_v1->sceneId) { break; } } @@ -243,7 +243,7 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) { BossDoorInfo* phi_v1_2; for (phi_v1_2 = &D_80998288[0], i = 0; i < ARRAY_COUNT(D_80998288) - 1; i++, phi_v1_2++) { - if (play->sceneNum == phi_v1_2->dungeonScene || play->sceneNum == phi_v1_2->bossScene) { + if (play->sceneId == phi_v1_2->dungeonSceneId || play->sceneId == phi_v1_2->bossSceneId) { break; } } @@ -475,7 +475,7 @@ void func_80996EE8(DoorShutter* this, PlayState* play) { } else if (func_809968D4(this, play)) { Player* player = GET_PLAYER(play); // Jabu navi text for switch doors is different - player->naviTextId = (play->sceneNum == SCENE_BDAN) ? -0x20B : -0x202; + player->naviTextId = (play->sceneId == SCENE_BDAN) ? -0x20B : -0x202; } } } 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 0c8b8034fd..6f4e3a6ded 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -493,7 +493,7 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) { osSyncPrintf("\n\n\nじかんがきたからおーしまい fade_direction=[%d]", play->transitionTrigger, TRANS_TRIGGER_START); - if (play->sceneNum == SCENE_DDAN_BOSS) { + if (play->sceneId == SCENE_DDAN_BOSS) { if (!Flags_GetEventChkInf(EVENTCHKINF_25)) { Flags_SetEventChkInf(EVENTCHKINF_25); Item_Give(play, ITEM_GORON_RUBY); @@ -503,7 +503,7 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) { play->nextEntranceIndex = ENTR_SPOT16_5; gSaveContext.nextCutsceneIndex = 0; } - } else if (play->sceneNum == SCENE_YDAN_BOSS) { + } else if (play->sceneId == SCENE_YDAN_BOSS) { if (!Flags_GetEventChkInf(EVENTCHKINF_07)) { Flags_SetEventChkInf(EVENTCHKINF_07); Flags_SetEventChkInf(EVENTCHKINF_09); @@ -514,7 +514,7 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) { play->nextEntranceIndex = ENTR_SPOT04_11; gSaveContext.nextCutsceneIndex = 0; } - } else if (play->sceneNum == SCENE_BDAN_BOSS) { + } else if (play->sceneId == SCENE_BDAN_BOSS) { play->nextEntranceIndex = ENTR_SPOT08_0; gSaveContext.nextCutsceneIndex = 0; } @@ -702,7 +702,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) { this->warpTimer++; if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == 0xFFEF) { - if (play->sceneNum == SCENE_MORIBOSSROOM) { + if (play->sceneId == SCENE_MORIBOSSROOM) { if (!GET_EVENTCHKINF(EVENTCHKINF_48)) { SET_EVENTCHKINF(EVENTCHKINF_48); Item_Give(play, ITEM_MEDALLION_FOREST); @@ -717,7 +717,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) { } gSaveContext.nextCutsceneIndex = 0; } - } else if (play->sceneNum == SCENE_FIRE_BS) { + } else if (play->sceneId == SCENE_FIRE_BS) { if (!GET_EVENTCHKINF(EVENTCHKINF_49)) { SET_EVENTCHKINF(EVENTCHKINF_49); Item_Give(play, ITEM_MEDALLION_FIRE); @@ -731,7 +731,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) { } gSaveContext.nextCutsceneIndex = 0; } - } else if (play->sceneNum == SCENE_MIZUSIN_BS) { + } else if (play->sceneId == SCENE_MIZUSIN_BS) { if (!GET_EVENTCHKINF(EVENTCHKINF_4A)) { SET_EVENTCHKINF(EVENTCHKINF_4A); Item_Give(play, ITEM_MEDALLION_WATER); @@ -746,7 +746,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) { } gSaveContext.nextCutsceneIndex = 0; } - } else if (play->sceneNum == SCENE_JYASINBOSS) { + } else if (play->sceneId == SCENE_JYASINBOSS) { if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) { Item_Give(play, ITEM_MEDALLION_SPIRIT); play->nextEntranceIndex = ENTR_KENJYANOMA_0; @@ -760,7 +760,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) { } gSaveContext.nextCutsceneIndex = 0; } - } else if (play->sceneNum == SCENE_HAKADAN_BS) { + } else if (play->sceneId == SCENE_HAKADAN_BS) { if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW)) { Item_Give(play, ITEM_MEDALLION_SHADOW); play->nextEntranceIndex = ENTR_KENJYANOMA_0; diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/src/overlays/actors/ovl_En_Cow/z_en_cow.c index 162d8f2bd3..389d154b71 100644 --- a/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -116,7 +116,7 @@ void EnCow_Init(Actor* thisx, PlayState* play) { Collider_SetCylinder(play, &this->colliders[1], &this->actor, &sCylinderInit); func_809DEE9C(this); this->actionFunc = func_809DF96C; - if (play->sceneNum == SCENE_LINK_HOME) { + if (play->sceneId == SCENE_LINK_HOME) { if (!LINK_IS_ADULT) { Actor_Kill(&this->actor); return; diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index a36b8a1e36..a90f2285ee 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -162,9 +162,9 @@ void EnDaiku_Init(Actor* thisx, PlayState* play) { isFree = true; } - if (isFree == true && play->sceneNum == SCENE_GERUDOWAY) { + if (isFree == true && play->sceneId == SCENE_GERUDOWAY) { noKill = false; - } else if (isFree == false && play->sceneNum == SCENE_TENT) { + } else if (isFree == false && play->sceneId == SCENE_TENT) { noKill = false; } @@ -195,7 +195,7 @@ void EnDaiku_Init(Actor* thisx, PlayState* play) { this->initRot = this->actor.world.rot; this->initPos = this->actor.world.pos; - if (play->sceneNum == SCENE_GERUDOWAY) { + if (play->sceneId == SCENE_GERUDOWAY) { EnDaiku_ChangeAnim(this, ENDAIKU_ANIM_STAND, &this->currentAnimIndex); this->stateFlags |= ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2; this->actionFunc = EnDaiku_Jailed; @@ -223,7 +223,7 @@ s32 EnDaiku_UpdateTalking(EnDaiku* this, PlayState* play) { s32 newTalkState = ENDAIKU_STATE_TALKING; if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) { - if (play->sceneNum == SCENE_GERUDOWAY) { + if (play->sceneId == SCENE_GERUDOWAY) { if (Message_ShouldAdvance(play)) { if (this->actor.textId == 0x6007) { Flags_SetSwitch(play, this->startFightSwitchFlag); @@ -233,7 +233,7 @@ s32 EnDaiku_UpdateTalking(EnDaiku* this, PlayState* play) { newTalkState = ENDAIKU_STATE_NO_TALK; } } - } else if (play->sceneNum == SCENE_TENT) { + } else if (play->sceneId == SCENE_TENT) { if (Message_ShouldAdvance(play)) { switch (this->actor.textId) { case 0x6061: @@ -266,7 +266,7 @@ void EnDaiku_UpdateText(EnDaiku* this, PlayState* play) { Actor_GetScreenPos(play, &this->actor, &sp2E, &sp2C); if (sp2E >= 0 && sp2E <= 320 && sp2C >= 0 && sp2C <= 240 && this->talkState == ENDAIKU_STATE_CAN_TALK && func_8002F2CC(&this->actor, play, 100.0f) == 1) { - if (play->sceneNum == SCENE_GERUDOWAY) { + if (play->sceneId == SCENE_GERUDOWAY) { if (this->stateFlags & ENDAIKU_STATEFLAG_GERUDODEFEATED) { freedCount = 0; for (carpenterType = 0; carpenterType < 4; carpenterType++) { @@ -294,7 +294,7 @@ void EnDaiku_UpdateText(EnDaiku* this, PlayState* play) { (ENDAIKU_STATEFLAG_GERUDOFIGHTING | ENDAIKU_STATEFLAG_GERUDODEFEATED))) { this->actor.textId = 0x6007; } - } else if (play->sceneNum == SCENE_TENT) { + } else if (play->sceneId == SCENE_TENT) { switch (this->actor.params & 3) { case 0: if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) { diff --git a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c index b4368bfd98..429a2c57a2 100644 --- a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c +++ b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c @@ -129,7 +129,7 @@ void EnDaikuKakariko_Init(Actor* thisx, PlayState* play) { s32 pad; if (LINK_AGE_IN_YEARS == YEARS_CHILD) { - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_SPOT01: if (IS_DAY) { this->flags |= 1; diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index 36fa05156b..6357a3104e 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -181,7 +181,7 @@ s8 EnDog_CanFollow(EnDog* this, PlayState* play) { return 2; } - if (play->sceneNum == SCENE_MARKET_DAY) { + if (play->sceneId == SCENE_MARKET_DAY) { return 0; } @@ -266,7 +266,7 @@ void EnDog_Init(Actor* thisx, PlayState* play) { this->actor.gravity = -1.0f; this->path = Path_GetByIndex(play, (this->actor.params & 0x00F0) >> 4, 0xF); - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_MARKET_NIGHT: if ((!gSaveContext.dogIsLost) && (((this->actor.params & 0x0F00) >> 8) == 1)) { Actor_Kill(&this->actor); diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.c b/src/overlays/actors/ovl_En_Door/z_en_door.c index 72eaa67c82..ddbdd5ed5b 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -45,7 +45,7 @@ const ActorInit En_Door_InitVars = { }; typedef struct { - /* 0x00 */ s16 sceneNum; + /* 0x00 */ s16 sceneId; /* 0x02 */ u8 dListIndex; /* 0x04 */ s16 objectId; } EnDoorInfo; @@ -120,7 +120,7 @@ void EnDoor_Init(Actor* thisx, PlayState* play2) { SkelAnime_Init(play, &this->skelAnime, &gDoorSkel, &gDoorAdultOpeningLeftAnim, this->jointTable, this->morphTable, 5); for (i = 0; i < ARRAY_COUNT(sDoorInfo) - 2; i++, objectInfo++) { - if (play->sceneNum == objectInfo->sceneNum) { + if (play->sceneId == objectInfo->sceneId) { break; } } @@ -301,8 +301,8 @@ void EnDoor_Open(EnDoor* this, PlayState* play) { this->actionFunc = EnDoor_Idle; this->playerIsOpening = false; } else if (Animation_OnFrame(&this->skelAnime, sDoorAnimOpenFrames[this->openAnim])) { - Audio_PlayActorSfx2(&this->actor, (play->sceneNum == SCENE_HAKADAN || play->sceneNum == SCENE_HAKADANCH || - play->sceneNum == SCENE_HIDAN) + Audio_PlayActorSfx2(&this->actor, (play->sceneId == SCENE_HAKADAN || play->sceneId == SCENE_HAKADANCH || + play->sceneId == SCENE_HIDAN) ? NA_SE_EV_IRON_DOOR_OPEN : NA_SE_OC_DOOR_OPEN); if (this->skelAnime.playSpeed < 1.5f) { @@ -312,8 +312,8 @@ void EnDoor_Open(EnDoor* this, PlayState* play) { } } } else if (Animation_OnFrame(&this->skelAnime, sDoorAnimCloseFrames[this->openAnim])) { - Audio_PlayActorSfx2(&this->actor, (play->sceneNum == SCENE_HAKADAN || play->sceneNum == SCENE_HAKADANCH || - play->sceneNum == SCENE_HIDAN) + Audio_PlayActorSfx2(&this->actor, (play->sceneId == SCENE_HAKADAN || play->sceneId == SCENE_HAKADANCH || + play->sceneId == SCENE_HIDAN) ? NA_SE_EV_IRON_DOOR_CLOSE : NA_SE_EV_DOOR_CLOSE); } diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c index abaad8d227..143594ab46 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -154,9 +154,9 @@ s16 func_809FDCDC(PlayState* play, Actor* actor) { } s32 func_809FDDB4(EnDu* this, PlayState* play) { - if (play->sceneNum == SCENE_SPOT18 && LINK_IS_CHILD) { + if (play->sceneId == SCENE_SPOT18 && LINK_IS_CHILD) { return 1; - } else if (play->sceneNum == SCENE_HIDAN && !GET_INFTABLE(INFTABLE_11A) && LINK_IS_ADULT) { + } else if (play->sceneId == SCENE_HIDAN && !GET_INFTABLE(INFTABLE_11A) && LINK_IS_ADULT) { return 1; } return 0; @@ -298,7 +298,7 @@ void EnDu_Init(Actor* thisx, PlayState* play) { play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDarunia01Cs); gSaveContext.cutsceneTrigger = 1; EnDu_SetupAction(this, func_809FE890); - } else if (play->sceneNum == SCENE_HIDAN) { + } else if (play->sceneId == SCENE_HIDAN) { EnDu_SetupAction(this, func_809FE638); } else if (!LINK_IS_ADULT) { EnDu_SetupAction(this, func_809FE3C0); diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/src/overlays/actors/ovl_En_Elf/z_en_elf.c index 8c292bc73b..6679c8b59c 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -862,7 +862,7 @@ void func_80A03CF8(EnElf* this, PlayState* play) { func_80A02C98(this, &nextPos, 0.2f); } - if ((play->sceneNum == SCENE_LINK_HOME) && (gSaveContext.sceneLayer == 4)) { + if ((play->sceneId == SCENE_LINK_HOME) && (gSaveContext.sceneLayer == 4)) { // play dash sound effect as Navi enters Links house in the intro if (1) {} if (play->csCtx.frames == 55) { diff --git a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c index 96bd56c04b..7e5e1085a3 100644 --- a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c +++ b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c @@ -69,7 +69,7 @@ void EnEncount1_Init(Actor* thisx, PlayState* play) { case SPAWNER_LEEVER: this->timer = 30; this->maxCurSpawns = 5; - if (play->sceneNum == SCENE_SPOT13) { // Haunted Wasteland + if (play->sceneId == SCENE_SPOT13) { // Haunted Wasteland this->reduceLeevers = true; this->maxCurSpawns = 3; } @@ -81,7 +81,7 @@ void EnEncount1_Init(Actor* thisx, PlayState* play) { break; case SPAWNER_STALCHILDREN: case SPAWNER_WOLFOS: - if (play->sceneNum == SCENE_SPOT00) { // Hyrule Field + if (play->sceneId == SCENE_SPOT00) { // Hyrule Field this->maxTotalSpawns = 10000; } this->updateFunc = EnEncount1_SpawnStalchildOrWolfos; @@ -225,7 +225,7 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, PlayState* play) { s32 bgId; f32 floorY; - if (play->sceneNum != SCENE_SPOT00) { + if (play->sceneId != SCENE_SPOT00) { if ((fabsf(player->actor.world.pos.y - this->actor.world.pos.y) > 100.0f) || (this->actor.xzDistToPlayer > this->spawnRange)) { this->outOfRangeTimer++; @@ -240,7 +240,7 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, PlayState* play) { spawnPos = this->actor.world.pos; if ((this->curNumSpawn < this->maxCurSpawns) && (this->totalNumSpawn < this->maxTotalSpawns)) { while ((this->curNumSpawn < this->maxCurSpawns) && (this->totalNumSpawn < this->maxTotalSpawns)) { - if (play->sceneNum == SCENE_SPOT00) { + if (play->sceneId == SCENE_SPOT00) { if ((player->unk_89E == SURFACE_SFX_TYPE_0) || (player->actor.floorBgId != BGCHECK_SCENE) || !(player->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (player->stateFlags1 & PLAYER_STATE1_27)) { @@ -298,7 +298,7 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, PlayState* play) { if (this->curNumSpawn >= this->maxCurSpawns) { this->fieldSpawnTimer = 100; } - if (play->sceneNum != SCENE_SPOT00) { + if (play->sceneId != SCENE_SPOT00) { this->totalNumSpawn++; } } else { diff --git a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c index db3c4dc213..0cb0eb0df0 100644 --- a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c +++ b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c @@ -37,7 +37,7 @@ const ActorInit En_Encount2_InitVars = { void EnEncount2_Init(Actor* thisx, PlayState* play) { EnEncount2* this = (EnEncount2*)thisx; - if (play->sceneNum != SCENE_SPOT16) { + if (play->sceneId != SCENE_SPOT16) { this->isNotDeathMountain = true; } @@ -73,10 +73,10 @@ void EnEncount2_Wait(EnEncount2* this, PlayState* play) { spawnerState = ENCOUNT2_ACTIVE_DEATH_MOUNTAIN; } } else if ((this->actor.xzDistToPlayer < 700.0f) && (Flags_GetSwitch(play, 0x37))) { - s16 scene = play->sceneNum; + s16 sceneId = play->sceneId; - if (((scene == SCENE_GANON_DEMO) || (scene == SCENE_GANON_FINAL) || (scene == SCENE_GANON_SONOGO) || - (scene == SCENE_GANONTIKA_SONOGO)) && + if (((sceneId == SCENE_GANON_DEMO) || (sceneId == SCENE_GANON_FINAL) || (sceneId == SCENE_GANON_SONOGO) || + (sceneId == SCENE_GANONTIKA_SONOGO)) && (!this->collapseSpawnerInactive)) { spawnerState = ENCOUNT2_ACTIVE_GANONS_TOWER; } @@ -153,10 +153,10 @@ void EnEncount2_SpawnRocks(EnEncount2* this, PlayState* play) { Audio_PlayActorSfx2(&this->actor, NA_SE_EV_VOLCANO - SFX_FLAG); } else if ((this->actor.xzDistToPlayer < 700.0f) && (Flags_GetSwitch(play, 0x37) != 0)) { - s16 scene = play->sceneNum; + s16 sceneId = play->sceneId; - if (((scene == SCENE_GANON_DEMO) || (scene == SCENE_GANON_FINAL) || (scene == SCENE_GANON_SONOGO) || - (scene == SCENE_GANONTIKA_SONOGO)) && + if (((sceneId == SCENE_GANON_DEMO) || (sceneId == SCENE_GANON_FINAL) || (sceneId == SCENE_GANON_SONOGO) || + (sceneId == SCENE_GANONTIKA_SONOGO)) && (!this->collapseSpawnerInactive)) { maxRocks = 1; spawnerState = ENCOUNT2_ACTIVE_GANONS_TOWER; @@ -325,7 +325,7 @@ void EnEncount2_UpdateEffects(EnEncount2* this, PlayState* play) { Math_ApproachF(&effect->pos.z, targetPos.z, 0.3f, 30.0f); Math_ApproachF(&effect->moveDirection.y, -20.0f, 0.9f, 1.0f); - if (play->sceneNum != SCENE_SPOT16) { + if (play->sceneId != SCENE_SPOT16) { if (effect->pos.y < (player->actor.floorHeight - 50.0f)) { effect->isAlive = 0; } diff --git a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c index 602258ec59..c04316f984 100644 --- a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c +++ b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c @@ -222,7 +222,7 @@ void EnGSwitch_SilverRupeeTracker(EnGSwitch* this, PlayState* play) { osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 時はまさに世紀末〜 ☆☆☆☆☆ %d\n" VT_RST, this->switchFlag); // "Last!" osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ らすとぉ! ☆☆☆☆☆ \n" VT_RST); - if ((play->sceneNum == SCENE_MEN) && (this->actor.room == 2)) { + if ((play->sceneId == SCENE_MEN) && (this->actor.room == 2)) { Flags_SetTempClear(play, this->actor.room); } else { func_80078884(NA_SE_SY_CORRECT_CHIME); diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index 7d8930bdf6..f7963b17dd 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -102,7 +102,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->actor, 0.01f); // In Gerudo Valley - this->actor.uncullZoneForward = ((play->sceneNum == SCENE_SPOT09) ? 1000.0f : 1200.0f); + this->actor.uncullZoneForward = ((play->sceneId == SCENE_SPOT09) ? 1000.0f : 1200.0f); switch (this->actor.params & 0xFF) { diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index 3ed34c8c6e..49641c753a 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -123,7 +123,7 @@ void EnGe2_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); - if (play->sceneNum == SCENE_SPOT09) { + if (play->sceneId == SCENE_SPOT09) { this->actor.uncullZoneForward = 1000.0f; } else { this->actor.uncullZoneForward = 1200.0f; diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index 5386ee8eb7..7f60ae24b8 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -359,16 +359,16 @@ void EnGo_ChangeAnim(EnGo* this, s32 index) { s32 EnGo_IsActorSpawned(EnGo* this, PlayState* play) { if (((this->actor.params) & 0xF0) == 0x90) { return true; - } else if (play->sceneNum == SCENE_HIDAN && !Flags_GetSwitch(play, (this->actor.params) >> 8) && LINK_IS_ADULT && + } else if (play->sceneId == SCENE_HIDAN && !Flags_GetSwitch(play, (this->actor.params) >> 8) && LINK_IS_ADULT && (this->actor.params & 0xF0) == 0x10) { return true; - } else if (play->sceneNum == SCENE_SPOT18 && LINK_IS_ADULT && (this->actor.params & 0xF0) == 0x00) { + } else if (play->sceneId == SCENE_SPOT18 && LINK_IS_ADULT && (this->actor.params & 0xF0) == 0x00) { return true; - } else if (play->sceneNum == SCENE_SPOT16 && LINK_IS_CHILD && + } else if (play->sceneId == SCENE_SPOT16 && LINK_IS_CHILD && ((this->actor.params & 0xF0) == 0x20 || (this->actor.params & 0xF0) == 0x30 || (this->actor.params & 0xF0) == 0x40)) { return true; - } else if (play->sceneNum == SCENE_SPOT18 && LINK_IS_CHILD && + } else if (play->sceneId == SCENE_SPOT18 && LINK_IS_CHILD && ((this->actor.params & 0xF0) == 0x50 || (this->actor.params & 0xF0) == 0x60 || (this->actor.params & 0xF0) == 0x70)) { return true; diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index ee71cc80a9..eff775f2da 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -126,7 +126,7 @@ s32 EnGoroiwa_Vec3fNormalize(Vec3f* ret, Vec3f* a) { } void EnGoroiwa_SetSpeed(EnGoroiwa* this, PlayState* play) { - if (play->sceneNum == SCENE_SPOT04) { + if (play->sceneId == SCENE_SPOT04) { this->isInKokiri = true; R_EN_GOROIWA_SPEED = 920; } else { diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index 877baef7b0..5c37367cd3 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -191,13 +191,13 @@ void func_80A56614(EnHeishi4* this, PlayState* play) { this->actionFunc = func_80A56B40; return; } - if (play->sceneNum == SCENE_MIHARIGOYA) { + if (play->sceneId == SCENE_MIHARIGOYA) { if (IS_DAY) { this->actor.textId = 0x7004; } else { this->actor.textId = 0x709A; } - } else if (play->sceneNum != SCENE_MARKET_NIGHT) { + } else if (play->sceneId != SCENE_MARKET_NIGHT) { if (IS_DAY) { this->actor.textId = 0x7002; } else { diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/src/overlays/actors/ovl_En_Holl/z_en_holl.c index 3e0065b07f..a6cb5d6fe4 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -119,7 +119,7 @@ void EnHoll_SwapRooms(PlayState* play) { // Horizontal Planes void func_80A58DD4(EnHoll* this, PlayState* play) { Player* player = GET_PLAYER(play); - s32 phi_t0 = ((play->sceneNum == SCENE_JYASINZOU) ? 1 : 0) & 0xFFFFFFFF; + s32 phi_t0 = ((play->sceneId == SCENE_JYASINZOU) ? 1 : 0) & 0xFFFFFFFF; Vec3f vec; f32 absZ; s32 transitionActorIdx; diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 55035b2f74..42340622c7 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -148,7 +148,7 @@ static ColliderJntSphInit sJntSphInit = { static CollisionCheckInfoInit D_80A65F38 = { 10, 35, 100, MASS_HEAVY }; typedef struct { - s16 scene; + s16 sceneId; Vec3s pos; s16 angle; } EnHorseSpawnpoint; @@ -455,7 +455,7 @@ s32 EnHorse_BgCheckBridgeJumpPoint(EnHorse* this, PlayState* play) { f32 xMax; s32 i; - if (play->sceneNum != SCENE_SPOT09) { + if (play->sceneId != SCENE_SPOT09) { return false; } if (this->actor.speedXZ < 12.8f) { @@ -678,9 +678,9 @@ s32 EnHorse_Spawn(EnHorse* this, PlayState* play) { Vec3f spawnPos; for (i = 0; i < 169; i++) { - if (sHorseSpawns[i].scene == play->sceneNum) { + if (sHorseSpawns[i].sceneId == play->sceneId) { player = GET_PLAYER(play); - if (play->sceneNum != SCENE_SPOT20 || + if (play->sceneId != SCENE_SPOT20 || //! Same flag checked twice (Flags_GetEventChkInf(EVENTCHKINF_18) && (GET_EVENTINF_HORSES_STATE() != EVENTINF_HORSES_STATE_6 || Flags_GetEventChkInf(EVENTCHKINF_18))) || @@ -693,7 +693,7 @@ s32 EnHorse_Spawn(EnHorse* this, PlayState* play) { spawnPos.z = sHorseSpawns[i].pos.z; dist = Math3D_Vec3f_DistXYZ(&player->actor.world.pos, &spawnPos); - if (play->sceneNum) {} + if (play->sceneId) {} if (!(minDist < dist) && !func_80A5BBBC(play, this, &spawnPos)) { minDist = dist; this->actor.world.pos.x = sHorseSpawns[i].pos.x; @@ -785,9 +785,9 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { this->actor.params = 1; } - if (play->sceneNum == SCENE_SOUKO) { + if (play->sceneId == SCENE_SOUKO) { this->stateFlags = ENHORSE_UNRIDEABLE; - } else if (play->sceneNum == SCENE_SPOT12 && this->type == HORSE_HNI) { + } else if (play->sceneId == SCENE_SPOT12 && this->type == HORSE_HNI) { this->stateFlags = ENHORSE_FLAG_18 | ENHORSE_UNRIDEABLE; } else { if (this->actor.params == 3) { @@ -807,7 +807,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { } } - if (play->sceneNum == SCENE_SPOT20 && GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6 && + if (play->sceneId == SCENE_SPOT20 && GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6 && !Flags_GetEventChkInf(EVENTCHKINF_18) && !DREG(1)) { this->stateFlags |= ENHORSE_FLAG_25; } @@ -828,7 +828,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { this->actor.focus.pos.y += 70.0f; this->playerControlled = false; - if ((play->sceneNum == SCENE_SPOT20) && !IS_CUTSCENE_LAYER) { + if ((play->sceneId == SCENE_SPOT20) && !IS_CUTSCENE_LAYER) { if (this->type == HORSE_HNI) { if (this->actor.world.rot.z == 0 || !IS_DAY) { Actor_Kill(&this->actor); @@ -846,7 +846,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { Actor_Kill(&this->actor); return; } - } else if (play->sceneNum == SCENE_MALON_STABLE) { + } else if (play->sceneId == SCENE_MALON_STABLE) { if (IS_DAY || Flags_GetEventChkInf(EVENTCHKINF_18) || DREG(1) != 0 || !LINK_IS_ADULT) { Actor_Kill(&this->actor); return; @@ -882,12 +882,12 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { } else if (this->actor.params == 8) { EnHorse_InitHorsebackArchery(this); Interface_InitHorsebackArchery(play); - } else if (play->sceneNum == SCENE_SPOT20 && !Flags_GetEventChkInf(EVENTCHKINF_18) && !DREG(1)) { + } else if (play->sceneId == SCENE_SPOT20 && !Flags_GetEventChkInf(EVENTCHKINF_18) && !DREG(1)) { EnHorse_InitFleePlayer(this); } else { - if (play->sceneNum == SCENE_SOUKO) { + if (play->sceneId == SCENE_SOUKO) { EnHorse_ResetIdleAnimation(this); - } else if (play->sceneNum == SCENE_SPOT12 && this->type == HORSE_HNI) { + } else if (play->sceneId == SCENE_SPOT12 && this->type == HORSE_HNI) { EnHorse_ResetIdleAnimation(this); } else { EnHorse_StartIdleRidable(this); @@ -1748,7 +1748,7 @@ void EnHorse_Inactive(EnHorse* this, PlayState* play2) { Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); this->stateFlags &= ~ENHORSE_INACTIVE; - gSaveContext.horseData.scene = play->sceneNum; + gSaveContext.horseData.sceneId = play->sceneId; // Focus the camera on Epona Camera_SetParam(play->cameraPtrs[CAM_ID_MAIN], 8, this); @@ -3091,7 +3091,7 @@ void EnHorse_BgCheckSlowMoving(EnHorse* this, PlayState* play) { CollisionPoly* colPoly; s32 bgId; - if (play->sceneNum == SCENE_SPOT20) { + if (play->sceneId == SCENE_SPOT20) { yOffset = 19.0f; } else { yOffset = 40.0f; @@ -3128,7 +3128,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { Vec3f intersect; Vec3f obstacleTop; - Actor_UpdateBgCheckInfo(play, &this->actor, play->sceneNum == SCENE_SPOT20 ? 19.0f : 40.0f, 35.0f, 100.0f, + Actor_UpdateBgCheckInfo(play, &this->actor, play->sceneId == SCENE_SPOT20 ? 19.0f : 40.0f, 35.0f, 100.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_4); @@ -3552,7 +3552,7 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->cyl1.base); CollisionCheck_SetOC(play, &play->colChkCtx, &this->cyl2.base); if ((player->stateFlags1 & PLAYER_STATE1_0) && player->rideActor != NULL) { - if (play->sceneNum != SCENE_SPOT20 || (play->sceneNum == SCENE_SPOT20 && (thisx->world.pos.z < -2400.0f))) { + if (play->sceneId != SCENE_SPOT20 || (play->sceneId == SCENE_SPOT20 && (thisx->world.pos.z < -2400.0f))) { EnHorse_UpdateConveyors(this, play); } } @@ -3571,7 +3571,7 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { this->stateFlags &= ~ENHORSE_FLAG_24; } - if (play->sceneNum == SCENE_SPOT09 && !GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) { + if (play->sceneId == SCENE_SPOT09 && !GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) { EnHorse_CheckBridgeJumps(this, play); } diff --git a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c index 0e96f3fb3e..ba0b382f40 100644 --- a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c +++ b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c @@ -444,7 +444,7 @@ void EnHorseGameCheck_Init(Actor* thisx, PlayState* play) { s32 pad; EnHorseGameCheckBase* this = (EnHorseGameCheckBase*)thisx; - if ((play->sceneNum == SCENE_SPOT20) && (Flags_GetEventChkInf(EVENTCHKINF_18) || DREG(1))) { + if ((play->sceneId == SCENE_SPOT20) && (Flags_GetEventChkInf(EVENTCHKINF_18) || DREG(1))) { this->actor.params = HORSEGAME_MALON_RACE; } if (sInitFuncs[this->actor.params] != NULL) { diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c index dcda3067df..fcd84eb335 100644 --- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c +++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c @@ -164,7 +164,7 @@ void EnHorseLinkChild_Init(Actor* thisx, PlayState* play) { if (IS_CUTSCENE_LAYER) { func_80A69EC0(this); - } else if (play->sceneNum == SCENE_SPOT20) { + } else if (play->sceneId == SCENE_SPOT20) { if (!Flags_GetEventChkInf(EVENTCHKINF_14)) { Actor_Kill(&this->actor); return; @@ -359,7 +359,7 @@ void func_80A6A068(EnHorseLinkChild* this, PlayState* play) { } if ((GET_EVENTCHKINF(EVENTCHKINF_16) && (DREG(53) != 0)) || - ((play->sceneNum == SCENE_SPOT20) && (gSaveContext.cutsceneIndex == 0xFFF1))) { + ((play->sceneId == SCENE_SPOT20) && (gSaveContext.cutsceneIndex == 0xFFF1))) { func_80A6A4DC(this); } else { this->unk_2A0 = GET_EVENTCHKINF(EVENTCHKINF_16); @@ -559,7 +559,7 @@ void EnHorseLinkChild_Update(Actor* thisx, PlayState* play) { UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_4); - if ((play->sceneNum == SCENE_SPOT20) && (this->actor.world.pos.z < -2400.0f)) { + if ((play->sceneId == SCENE_SPOT20) && (this->actor.world.pos.z < -2400.0f)) { this->actor.world.pos.z = -2400.0f; } diff --git a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c index 1cd06ab78a..a3d0c2a05c 100644 --- a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c +++ b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c @@ -201,7 +201,7 @@ void EnHorseNormal_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->cloneCollider); Collider_SetCylinder(play, &this->cloneCollider, &this->actor, &sCylinderInit2); CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit); - if (play->sceneNum == SCENE_SPOT20) { + if (play->sceneId == SCENE_SPOT20) { if (this->actor.world.rot.z == 0 || !IS_DAY) { Actor_Kill(&this->actor); return; @@ -235,7 +235,7 @@ void EnHorseNormal_Init(Actor* thisx, PlayState* play) { func_80A6C6B0(this); return; } - } else if (play->sceneNum == SCENE_MALON_STABLE) { + } else if (play->sceneId == SCENE_MALON_STABLE) { if (IS_DAY) { Actor_Kill(&this->actor); return; @@ -245,7 +245,7 @@ void EnHorseNormal_Init(Actor* thisx, PlayState* play) { func_80A6C6B0(this); return; } - } else if (play->sceneNum == SCENE_SPOT12) { + } else if (play->sceneId == SCENE_SPOT12) { if (this->actor.world.pos.x == 3707.0f && this->actor.world.pos.y == 1413.0f && this->actor.world.pos.z == -665.0f) { Skin_Init(play, &this->skin, &gHorseNormalSkel, &gHorseNormalIdleAnim); @@ -583,7 +583,7 @@ void EnHorseNormal_Update(Actor* thisx, PlayState* play) { Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 35.0f, 100.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_4); - if (play->sceneNum == SCENE_SPOT20 && this->actor.world.pos.z < -2400.0f) { + if (play->sceneId == SCENE_SPOT20 && this->actor.world.pos.z < -2400.0f) { this->actor.world.pos.z = -2400.0f; } this->actor.focus.pos = this->actor.world.pos; @@ -654,7 +654,7 @@ void EnHorseNormal_Draw(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_en_horse_normal.c", 2224); - if (play->sceneNum != SCENE_SPOT20 || play->sceneNum != SCENE_MALON_STABLE) { + if (play->sceneId != SCENE_SPOT20 || play->sceneId != SCENE_MALON_STABLE) { func_80A6C8E0(this, play); } Gfx_SetupDL_25Opa(play->state.gfxCtx); @@ -668,7 +668,7 @@ void EnHorseNormal_Draw(Actor* thisx, PlayState* play) { f32 distFromGround = this->actor.world.pos.y - this->actor.floorHeight; f32 temp_f0_4; - if (play->sceneNum == SCENE_MALON_STABLE) { + if (play->sceneId == SCENE_MALON_STABLE) { if (this->actor.world.pos.x == 355.0f && this->actor.world.pos.y == 0.0f && this->actor.world.pos.z == -245.0f) { clonePos.x = 235.0f; @@ -682,7 +682,7 @@ void EnHorseNormal_Draw(Actor* thisx, PlayState* play) { clonePos.z = 100.0f; cloneRotY = 0x7FFF; } - } else if (play->sceneNum == SCENE_SPOT20) { + } else if (play->sceneId == SCENE_SPOT20) { if (this->actor.world.pos.x == -730.0f && this->actor.world.pos.y == 0.0f && this->actor.world.pos.z == -1100.0f) { clonePos.x = 780.0f; diff --git a/src/overlays/actors/ovl_En_Hy/z_en_hy.c b/src/overlays/actors/ovl_En_Hy/z_en_hy.c index 19e0ccfdf3..1d2191f3d9 100644 --- a/src/overlays/actors/ovl_En_Hy/z_en_hy.c +++ b/src/overlays/actors/ovl_En_Hy/z_en_hy.c @@ -428,9 +428,9 @@ u16 func_80A6F810(PlayState* play, Actor* thisx) { switch (this->actor.params & 0x7F) { case ENHY_TYPE_AOB: - if (play->sceneNum == SCENE_KAKARIKO) { + if (play->sceneId == SCENE_KAKARIKO) { return (this->unk_330 & EVENTCHKINF_6B_MASK) ? 0x508D : (GET_INFTABLE(INFTABLE_CB) ? 0x508C : 0x508B); - } else if (play->sceneNum == SCENE_MARKET_DAY) { + } else if (play->sceneId == SCENE_MARKET_DAY) { return GET_EVENTINF(EVENTINF_30) ? 0x709B : 0x709C; } else if (gSaveContext.dogIsLost) { s16 followingDog = (gSaveContext.dogParams & 0xF00) >> 8; @@ -451,9 +451,9 @@ u16 func_80A6F810(PlayState* play, Actor* thisx) { return GET_INFTABLE(INFTABLE_C0) ? 0x7017 : 0x7016; } case ENHY_TYPE_AHG_2: - if (play->sceneNum == SCENE_KAKARIKO) { + if (play->sceneId == SCENE_KAKARIKO) { return 0x5086; - } else if (play->sceneNum == SCENE_SPOT01) { + } else if (play->sceneId == SCENE_SPOT01) { return 0x5085; } else if (GET_EVENTCHKINF(EVENTCHKINF_80)) { return GET_INFTABLE(INFTABLE_C3) ? 0x701A : 0x7047; @@ -476,9 +476,9 @@ u16 func_80A6F810(PlayState* play, Actor* thisx) { case ENHY_TYPE_BBA: return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x704A : (GET_INFTABLE(INFTABLE_C6) ? 0x7022 : 0x7021); case ENHY_TYPE_BJI_7: - if (play->sceneNum == SCENE_KAKARIKO) { + if (play->sceneId == SCENE_KAKARIKO) { return 0x5088; - } else if (play->sceneNum == SCENE_SPOT01) { + } else if (play->sceneId == SCENE_SPOT01) { return 0x5087; } else { return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x704D : (GET_INFTABLE(INFTABLE_C7) ? 0x7028 : 0x7027); @@ -490,17 +490,17 @@ u16 func_80A6F810(PlayState* play, Actor* thisx) { return GET_INFTABLE(INFTABLE_C8) ? 0x701E : 0x701D; } case ENHY_TYPE_BOJ_9: - if (play->sceneNum == SCENE_KAKARIKO) { + if (play->sceneId == SCENE_KAKARIKO) { return GET_EVENTCHKINF(EVENTCHKINF_AA) ? 0x5082 : 0x5081; - } else if (play->sceneNum == SCENE_SPOT01) { + } else if (play->sceneId == SCENE_SPOT01) { return CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) ? 0x5080 : 0x507F; } else { return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x7049 : (GET_INFTABLE(INFTABLE_CA) ? 0x7020 : 0x701F); } case ENHY_TYPE_BOJ_10: - if (play->sceneNum == SCENE_LABO) { + if (play->sceneId == SCENE_LABO) { return GET_EVENTCHKINF(EVENTCHKINF_AA) ? 0x507E : 0x507D; - } else if (play->sceneNum == SCENE_SPOT01) { + } else if (play->sceneId == SCENE_SPOT01) { return CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) ? 0x507C : 0x507B; } else { return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x7046 : (GET_INFTABLE(INFTABLE_CD) ? 0x7019 : 0x7018); @@ -508,7 +508,7 @@ u16 func_80A6F810(PlayState* play, Actor* thisx) { case ENHY_TYPE_CNE_11: return GET_INFTABLE(INFTABLE_8B) ? (GET_INFTABLE(INFTABLE_CC) ? 0x7014 : 0x70A4) : 0x7014; case ENHY_TYPE_BOJ_12: - if (play->sceneNum == SCENE_SPOT01) { + if (play->sceneId == SCENE_SPOT01) { return !IS_DAY ? 0x5084 : 0x5083; } else { return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x7044 : 0x7015; @@ -799,7 +799,7 @@ void func_80A70978(EnHy* this, PlayState* play) { } s32 EnHy_ShouldSpawn(EnHy* this, PlayState* play) { - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_SPOT01: if (!((this->actor.params & 0x7F) == ENHY_TYPE_BOJ_9 || (this->actor.params & 0x7F) == ENHY_TYPE_BOJ_10 || (this->actor.params & 0x7F) == ENHY_TYPE_BOJ_12 || (this->actor.params & 0x7F) == ENHY_TYPE_AHG_2 || @@ -903,12 +903,12 @@ void EnHy_InitImpl(EnHy* this, PlayState* play) { CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit); Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, sModelInfo[this->actor.params & 0x7F].animInfoIndex); - if ((play->sceneNum == SCENE_MARKET_ALLEY) || (play->sceneNum == SCENE_MARKET_DAY)) { + if ((play->sceneId == SCENE_MARKET_ALLEY) || (play->sceneId == SCENE_MARKET_DAY)) { this->actor.flags &= ~ACTOR_FLAG_4; this->actor.uncullZoneScale = 0.0f; } - if (play->sceneNum == SCENE_KAKARIKO) { + if (play->sceneId == SCENE_KAKARIKO) { this->unk_330 = gSaveContext.eventChkInf[EVENTCHKINF_6B_INDEX]; } @@ -927,7 +927,7 @@ void EnHy_InitImpl(EnHy* this, PlayState* play) { this->actionFunc = func_80A712C0; break; case ENHY_TYPE_AOB: - if (play->sceneNum == SCENE_MARKET_DAY) { + if (play->sceneId == SCENE_MARKET_DAY) { this->actionFunc = func_80A710F8; break; } diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index 87a2ac0981..80d28c4123 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -363,15 +363,15 @@ s32 func_80A7975C(EnIn* this, PlayState* play) { } s32 func_80A79830(EnIn* this, PlayState* play) { - if (play->sceneNum == SCENE_SPOT20 && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 1 && + if (play->sceneId == SCENE_SPOT20 && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 1 && !GET_EVENTCHKINF(EVENTCHKINF_14)) { return 1; } - if (play->sceneNum == SCENE_MALON_STABLE && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 3 && + if (play->sceneId == SCENE_MALON_STABLE && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 3 && GET_EVENTCHKINF(EVENTCHKINF_14)) { return 1; } - if (play->sceneNum == SCENE_MALON_STABLE && LINK_IS_CHILD && IS_NIGHT) { + if (play->sceneId == SCENE_MALON_STABLE && LINK_IS_CHILD && IS_NIGHT) { if ((this->actor.shape.rot.z == 2) && !GET_EVENTCHKINF(EVENTCHKINF_14)) { return 1; } @@ -379,7 +379,7 @@ s32 func_80A79830(EnIn* this, PlayState* play) { return 1; } } - if (play->sceneNum == SCENE_SPOT20 && LINK_IS_ADULT && IS_DAY) { + if (play->sceneId == SCENE_SPOT20 && LINK_IS_ADULT && IS_DAY) { if ((this->actor.shape.rot.z == 5) && !GET_EVENTCHKINF(EVENTCHKINF_18)) { return 2; } @@ -387,7 +387,7 @@ s32 func_80A79830(EnIn* this, PlayState* play) { return 4; } } - if (play->sceneNum == SCENE_SOUKO && LINK_IS_ADULT && IS_NIGHT) { + if (play->sceneId == SCENE_SOUKO && LINK_IS_ADULT && IS_NIGHT) { if (this->actor.shape.rot.z == 6 && !GET_EVENTCHKINF(EVENTCHKINF_18)) { return 3; } diff --git a/src/overlays/actors/ovl_En_Ko/z_en_ko.c b/src/overlays/actors/ovl_En_Ko/z_en_ko.c index 296b42863e..13e76d5b99 100644 --- a/src/overlays/actors/ovl_En_Ko/z_en_ko.c +++ b/src/overlays/actors/ovl_En_Ko/z_en_ko.c @@ -947,7 +947,7 @@ void func_80A9877C(EnKo* this, PlayState* play) { } } if (func_800343CC(play, &this->actor, &this->unk_1E8.unk_00, this->lookDist, func_80A97610, func_80A97738) && - ENKO_TYPE == ENKO_TYPE_CHILD_FADO && play->sceneNum == SCENE_SPOT10) { + ENKO_TYPE == ENKO_TYPE_CHILD_FADO && play->sceneId == SCENE_SPOT10) { this->actor.textId = INV_CONTENT(ITEM_TRADE_ADULT) > ITEM_ODD_POTION ? 0x10B9 : 0x10DF; if (func_8002F368(play) == ENKO_TYPE_CHILD_9) { @@ -960,7 +960,7 @@ void func_80A9877C(EnKo* this, PlayState* play) { // Checks if the Kokiri should spawn based on quest progress s32 EnKo_CanSpawn(EnKo* this, PlayState* play) { - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_SPOT04: if (ENKO_TYPE >= ENKO_TYPE_CHILD_7 && ENKO_TYPE != ENKO_TYPE_CHILD_FADO) { return false; @@ -1068,7 +1068,7 @@ s32 EnKo_GetForestQuestState2(EnKo* this) { void func_80A98DB4(EnKo* this, PlayState* play) { f32 dist; - if (play->sceneNum != SCENE_SPOT10 && play->sceneNum != SCENE_SPOT04) { + if (play->sceneId != SCENE_SPOT10 && play->sceneId != SCENE_SPOT04) { this->modelAlpha = 255.0f; return; } @@ -1087,7 +1087,7 @@ void func_80A98DB4(EnKo* this, PlayState* play) { } s32 func_80A98ECC(EnKo* this, PlayState* play) { - if (play->sceneNum == SCENE_SPOT10 && ENKO_TYPE == ENKO_TYPE_CHILD_FADO) { + if (play->sceneId == SCENE_SPOT10 && ENKO_TYPE == ENKO_TYPE_CHILD_FADO) { return func_80A97E18(this, play); } switch (EnKo_GetForestQuestState(this)) { diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c index b36359584d..039969f0e6 100644 --- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -187,11 +187,11 @@ s32 func_80AA08C4(EnMa1* this, PlayState* play) { if (!LINK_IS_CHILD) { return 0; } - if (((play->sceneNum == SCENE_MARKET_NIGHT) || (play->sceneNum == SCENE_MARKET_DAY)) && + if (((play->sceneId == SCENE_MARKET_NIGHT) || (play->sceneId == SCENE_MARKET_DAY)) && !GET_EVENTCHKINF(EVENTCHKINF_14) && !GET_INFTABLE(INFTABLE_8B)) { return 1; } - if ((play->sceneNum == SCENE_SPOT15) && !GET_EVENTCHKINF(EVENTCHKINF_14)) { + if ((play->sceneId == SCENE_SPOT15) && !GET_EVENTCHKINF(EVENTCHKINF_14)) { if (GET_INFTABLE(INFTABLE_8B)) { return 1; } else { @@ -199,10 +199,10 @@ s32 func_80AA08C4(EnMa1* this, PlayState* play) { return 0; } } - if ((play->sceneNum == SCENE_SOUKO) && IS_NIGHT && GET_EVENTCHKINF(EVENTCHKINF_14)) { + if ((play->sceneId == SCENE_SOUKO) && IS_NIGHT && GET_EVENTCHKINF(EVENTCHKINF_14)) { return 1; } - if (play->sceneNum != SCENE_SPOT20) { + if (play->sceneId != SCENE_SPOT20) { return 0; } if ((this->actor.shape.rot.z == 3) && IS_DAY && GET_EVENTCHKINF(EVENTCHKINF_14)) { @@ -307,7 +307,7 @@ void func_80AA0D88(EnMa1* this, PlayState* play) { } } - if ((play->sceneNum == SCENE_SPOT15) && GET_EVENTCHKINF(EVENTCHKINF_14)) { + if ((play->sceneId == SCENE_SPOT15) && GET_EVENTCHKINF(EVENTCHKINF_14)) { Actor_Kill(&this->actor); } else if (!GET_EVENTCHKINF(EVENTCHKINF_14) || CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) { if (this->unk_1E8.unk_00 == 2) { diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c index 0559f6ff9b..417c45e4aa 100644 --- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c +++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c @@ -141,15 +141,15 @@ u16 func_80AA1B58(EnMa2* this, PlayState* play) { if (LINK_IS_CHILD) { return 0; } - if (!GET_EVENTCHKINF(EVENTCHKINF_18) && (play->sceneNum == SCENE_MALON_STABLE) && IS_DAY && + if (!GET_EVENTCHKINF(EVENTCHKINF_18) && (play->sceneId == SCENE_MALON_STABLE) && IS_DAY && (this->actor.shape.rot.z == 5)) { return 1; } - if (!GET_EVENTCHKINF(EVENTCHKINF_18) && (play->sceneNum == SCENE_SPOT20) && IS_NIGHT && + if (!GET_EVENTCHKINF(EVENTCHKINF_18) && (play->sceneId == SCENE_SPOT20) && IS_NIGHT && (this->actor.shape.rot.z == 6)) { return 2; } - if (!GET_EVENTCHKINF(EVENTCHKINF_18) || (play->sceneNum != SCENE_SPOT20)) { + if (!GET_EVENTCHKINF(EVENTCHKINF_18) || (play->sceneId != SCENE_SPOT20)) { return 0; } if ((this->actor.shape.rot.z == 7) && IS_DAY) { diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.c b/src/overlays/actors/ovl_En_Md/z_en_md.c index 2b16b5e215..0a719c1e62 100644 --- a/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -450,7 +450,7 @@ u16 EnMd_GetTextLostWoods(PlayState* play, EnMd* this) { u16 EnMd_GetText(PlayState* play, Actor* thisx) { EnMd* this = (EnMd*)thisx; - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_SPOT04: return EnMd_GetTextKokiriForest(play, this); case SCENE_KOKIRI_HOME4: @@ -505,13 +505,13 @@ s16 func_80AAAF04(PlayState* play, Actor* thisx) { } u8 EnMd_ShouldSpawn(EnMd* this, PlayState* play) { - if (play->sceneNum == SCENE_SPOT04) { + if (play->sceneId == SCENE_SPOT04) { if (!GET_EVENTCHKINF(EVENTCHKINF_1C) && !GET_EVENTCHKINF(EVENTCHKINF_40)) { return 1; } } - if (play->sceneNum == SCENE_KOKIRI_HOME4) { + if (play->sceneId == SCENE_KOKIRI_HOME4) { if (GET_EVENTCHKINF(EVENTCHKINF_1C) || GET_EVENTCHKINF(EVENTCHKINF_40)) { if (!LINK_IS_ADULT) { return 1; @@ -519,7 +519,7 @@ u8 EnMd_ShouldSpawn(EnMd* this, PlayState* play) { } } - if (play->sceneNum == SCENE_SPOT10) { + if (play->sceneId == SCENE_SPOT10) { return 1; } @@ -636,9 +636,9 @@ u8 EnMd_SetMovedPos(EnMd* this, PlayState* play) { void func_80AAB5A4(EnMd* this, PlayState* play) { f32 temp; - if (play->sceneNum != SCENE_KOKIRI_HOME4) { + if (play->sceneId != SCENE_KOKIRI_HOME4) { temp = (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !GET_EVENTCHKINF(EVENTCHKINF_1C) && - (play->sceneNum == SCENE_SPOT04)) + (play->sceneId == SCENE_SPOT04)) ? 100.0f : 400.0f; this->alpha = func_80034DD4(&this->actor, play, this->alpha, temp); @@ -671,16 +671,16 @@ void EnMd_Init(Actor* thisx, PlayState* play) { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_ELF, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, FAIRY_KOKIRI); - if (((play->sceneNum == SCENE_SPOT04) && !GET_EVENTCHKINF(EVENTCHKINF_04)) || - ((play->sceneNum == SCENE_SPOT04) && GET_EVENTCHKINF(EVENTCHKINF_04) && + if (((play->sceneId == SCENE_SPOT04) && !GET_EVENTCHKINF(EVENTCHKINF_04)) || + ((play->sceneId == SCENE_SPOT04) && GET_EVENTCHKINF(EVENTCHKINF_04) && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) || - ((play->sceneNum == SCENE_SPOT10) && !GET_EVENTCHKINF(EVENTCHKINF_0A))) { + ((play->sceneId == SCENE_SPOT10) && !GET_EVENTCHKINF(EVENTCHKINF_0A))) { this->actor.home.pos = this->actor.world.pos; this->actionFunc = func_80AAB948; return; } - if (play->sceneNum != SCENE_KOKIRI_HOME4) { + if (play->sceneId != SCENE_KOKIRI_HOME4) { EnMd_SetMovedPos(this, play); } @@ -735,14 +735,14 @@ void func_80AAB948(EnMd* this, PlayState* play) { if (this->unk_1E0.unk_00 == 2) { if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !GET_EVENTCHKINF(EVENTCHKINF_1C) && - (play->sceneNum == SCENE_SPOT04)) { + (play->sceneId == SCENE_SPOT04)) { play->msgCtx.msgMode = MSGMODE_PAUSED; } - if (play->sceneNum == SCENE_SPOT04) { + if (play->sceneId == SCENE_SPOT04) { SET_EVENTCHKINF(EVENTCHKINF_04); } - if (play->sceneNum == SCENE_SPOT10) { + if (play->sceneId == SCENE_SPOT10) { SET_EVENTCHKINF(EVENTCHKINF_0A); } @@ -759,7 +759,7 @@ void func_80AAB948(EnMd* this, PlayState* play) { func_80034F54(play, this->unk_214, this->unk_236, ENMD_LIMB_MAX); } - if ((this->unk_1E0.unk_00 == 0) && (play->sceneNum == SCENE_SPOT10)) { + if ((this->unk_1E0.unk_00 == 0) && (play->sceneId == SCENE_SPOT10)) { if (player->stateFlags2 & PLAYER_STATE2_24) { player->stateFlags2 |= PLAYER_STATE2_25; player->unk_6A8 = &this->actor; @@ -802,8 +802,7 @@ void func_80AABD0C(EnMd* this, PlayState* play) { return; } - if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !GET_EVENTCHKINF(EVENTCHKINF_1C) && - (play->sceneNum == SCENE_SPOT04)) { + if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !GET_EVENTCHKINF(EVENTCHKINF_1C) && (play->sceneId == SCENE_SPOT04)) { Message_CloseTextbox(play); SET_EVENTCHKINF(EVENTCHKINF_1C); Actor_Kill(&this->actor); diff --git a/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/src/overlays/actors/ovl_En_Niw/z_en_niw.c index 8c62080793..a5784f0c67 100644 --- a/src/overlays/actors/ovl_En_Niw/z_en_niw.c +++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.c @@ -155,7 +155,7 @@ void EnNiw_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gCuccoSkel, &gCuccoAnim, this->jointTable, this->morphTable, 16); - if (play->sceneNum == SCENE_SPOT01) { + if (play->sceneId == SCENE_SPOT01) { for (i = 0; i < ARRAY_COUNT(sKakarikoPosList); i++) { if (fabsf(this->actor.world.pos.x - sKakarikoPosList[i].x) < 40.0f && fabsf(this->actor.world.pos.z - sKakarikoPosList[i].z) < 40.0f) { @@ -228,7 +228,7 @@ void EnNiw_Init(Actor* thisx, PlayState* play) { case 0xD: case 0xE: Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit2); - if (play->sceneNum == SCENE_LINK_HOME && !GET_EVENTCHKINF(EVENTCHKINF_1E)) { + if (play->sceneId == SCENE_LINK_HOME && !GET_EVENTCHKINF(EVENTCHKINF_1E)) { Actor_Kill(&this->actor); } break; @@ -974,12 +974,12 @@ void EnNiw_Update(Actor* thisx, PlayState* play) { Actor_SetFocus(&this->actor, this->unk_304); Actor_MoveForward(&this->actor); - if (this->actionFunc != func_80AB6EB4 && this->actionFunc != func_80AB6450 && play->sceneNum != SCENE_SPOT03) { + if (this->actionFunc != func_80AB6EB4 && this->actionFunc != func_80AB6450 && play->sceneId != SCENE_SPOT03) { Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 60.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_4); } - if (play->sceneNum == SCENE_SPOT03) { + if (play->sceneId == SCENE_SPOT03) { Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 60.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_4); diff --git a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c index e19d1bc2ff..8fe5b1c59d 100644 --- a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c +++ b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c @@ -77,7 +77,7 @@ void EnNiwLady_Init(Actor* thisx, PlayState* play) { return; } this->unk_278 = 0; - if (play->sceneNum == SCENE_LABO) { + if (play->sceneId == SCENE_LABO) { this->unk_278 = 1; } if ((this->unk_278 != 0) && IS_DAY) { diff --git a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c index 3ef0699fcd..93256c3f0b 100644 --- a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c +++ b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c @@ -149,10 +149,10 @@ void func_80ABF0CC(EnOkarinaTag* this, PlayState* play) { if (this->switchFlag >= 0) { Flags_SetSwitch(play, this->switchFlag); } - if (play->sceneNum == SCENE_MIZUSIN) { + if (play->sceneId == SCENE_MIZUSIN) { play->msgCtx.msgMode = MSGMODE_PAUSED; } - if ((play->sceneNum != SCENE_DAIYOUSEI_IZUMI) && (play->sceneNum != SCENE_YOUSEI_IZUMI_YOKO)) { + if ((play->sceneId != SCENE_DAIYOUSEI_IZUMI) && (play->sceneId != SCENE_YOUSEI_IZUMI_YOKO)) { play->msgCtx.ocarinaMode = OCARINA_MODE_04; } func_80078884(NA_SE_SY_CORRECT_CHIME); diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index 2b3c27da4f..32e70bbdec 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -1059,7 +1059,7 @@ s32 func_80ACC5CC(EnOwl* this) { s32 func_80ACC624(EnOwl* this, PlayState* play) { s32 switchFlag = (this->actor.params & 0xFC0) >> 6; - if (play->sceneNum != SCENE_SPOT11) { + if (play->sceneId != SCENE_SPOT11) { return true; } else if (switchFlag == 0xA) { return true; diff --git a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c index c7733b843a..c55be8f1a1 100644 --- a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c +++ b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c @@ -227,7 +227,7 @@ void EnRiverSound_Update(Actor* thisx, PlayState* play) { } } else if ((thisx->params == RS_GORON_CITY_SARIAS_SONG) || (thisx->params == RS_GREAT_FAIRY)) { func_8002DBD0(&player->actor, &thisx->home.pos, &thisx->world.pos); - } else if (play->sceneNum == SCENE_DDAN_BOSS && Flags_GetClear(play, thisx->room)) { + } else if (play->sceneId == SCENE_DDAN_BOSS && Flags_GetClear(play, thisx->room)) { Actor_Kill(thisx); } } diff --git a/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/src/overlays/actors/ovl_En_Rl/z_en_rl.c index 988371865e..f2d928f391 100644 --- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c +++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c @@ -116,9 +116,9 @@ void func_80AE7590(EnRl* this, PlayState* play) { s32 pad; Player* player; Vec3f pos; - s16 sceneNum = play->sceneNum; + s16 sceneId = play->sceneId; - if (gSaveContext.sceneLayer == 4 && sceneNum == SCENE_KENJYANOMA && play->csCtx.state != CS_STATE_IDLE && + if (gSaveContext.sceneLayer == 4 && sceneId == SCENE_KENJYANOMA && play->csCtx.state != CS_STATE_IDLE && play->csCtx.npcActions[6] != NULL && play->csCtx.npcActions[6]->action == 2 && !this->lightMedallionGiven) { player = GET_PLAYER(play); pos.x = player->actor.world.pos.x; diff --git a/src/overlays/actors/ovl_En_Sa/z_en_sa.c b/src/overlays/actors/ovl_En_Sa/z_en_sa.c index ddb87a377c..64972d87c0 100644 --- a/src/overlays/actors/ovl_En_Sa/z_en_sa.c +++ b/src/overlays/actors/ovl_En_Sa/z_en_sa.c @@ -217,7 +217,7 @@ s16 func_80AF56F4(PlayState* play, Actor* thisx) { } void func_80AF57D8(EnSa* this, PlayState* play) { - if (play->sceneNum != SCENE_SPOT05 || ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) < 0x1555 || + if (play->sceneId != SCENE_SPOT05 || ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) < 0x1555 || this->unk_1E0.unk_00 != 0) { func_800343CC(play, &this->actor, &this->unk_1E0.unk_00, this->collider.dim.radius + 30.0f, func_80AF55E0, func_80AF56F4); @@ -381,21 +381,21 @@ void EnSa_ChangeAnim(EnSa* this, s32 index) { s32 func_80AF5DFC(EnSa* this, PlayState* play) { if (gSaveContext.cutsceneIndex >= 0xFFF0 && gSaveContext.cutsceneIndex != 0xFFFD) { - if (play->sceneNum == SCENE_SPOT04) { + if (play->sceneId == SCENE_SPOT04) { return 4; } - if (play->sceneNum == SCENE_SPOT05) { + if (play->sceneId == SCENE_SPOT05) { return 5; } } - if (play->sceneNum == SCENE_KOKIRI_HOME5 && !LINK_IS_ADULT && + if (play->sceneId == SCENE_KOKIRI_HOME5 && !LINK_IS_ADULT && INV_CONTENT(ITEM_OCARINA_FAIRY) == ITEM_OCARINA_FAIRY && !GET_EVENTCHKINF(EVENTCHKINF_40)) { return 1; } - if (play->sceneNum == SCENE_SPOT05 && GET_EVENTCHKINF(EVENTCHKINF_40)) { + if (play->sceneId == SCENE_SPOT05 && GET_EVENTCHKINF(EVENTCHKINF_40)) { return CHECK_QUEST_ITEM(QUEST_SONG_SARIA) ? 2 : 5; } - if (play->sceneNum == SCENE_SPOT04 && !CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) { + if (play->sceneId == SCENE_SPOT04 && !CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) { if (GET_INFTABLE(INFTABLE_00)) { return 1; } @@ -408,17 +408,17 @@ void func_80AF5F34(EnSa* this, PlayState* play) { Player* player = GET_PLAYER(play); s16 phi_a3 = 0; - if (play->sceneNum == SCENE_SPOT04) { + if (play->sceneId == SCENE_SPOT04) { phi_a3 = (this->actionFunc == func_80AF68E4) ? 1 : 4; } - if (play->sceneNum == SCENE_SPOT05) { + if (play->sceneId == SCENE_SPOT05) { phi_a3 = (this->skelAnime.animation == &gSariaPlayingOcarinaAnim) ? 1 : 3; } - if (play->sceneNum == SCENE_SPOT05 && this->actionFunc == func_80AF6448 && + if (play->sceneId == SCENE_SPOT05 && this->actionFunc == func_80AF6448 && this->skelAnime.animation == &gSariaStopPlayingOcarinaAnim) { phi_a3 = 1; } - if (play->sceneNum == SCENE_SPOT05 && this->actionFunc == func_80AF68E4 && + if (play->sceneId == SCENE_SPOT05 && this->actionFunc == func_80AF68E4 && this->skelAnime.animation == &gSariaOcarinaToMouthAnim) { phi_a3 = 1; } @@ -538,7 +538,7 @@ void EnSa_Destroy(Actor* thisx, PlayState* play) { } void func_80AF6448(EnSa* this, PlayState* play) { - if (play->sceneNum == SCENE_SPOT04) { + if (play->sceneId == SCENE_SPOT04) { if (this->unk_1E0.unk_00 != 0) { switch (this->actor.textId) { case 0x1002: @@ -607,7 +607,7 @@ void func_80AF6448(EnSa* this, PlayState* play) { EnSa_ChangeAnim(this, ENSA_ANIM1_6); } } - if (this->unk_1E0.unk_00 != 0 && play->sceneNum == SCENE_SPOT05) { + if (this->unk_1E0.unk_00 != 0 && play->sceneId == SCENE_SPOT05) { Animation_Change(&this->skelAnime, &gSariaStopPlayingOcarinaAnim, 1.0f, 0.0f, 10.0f, ANIMMODE_ONCE, -10.0f); this->actionFunc = func_80AF67D0; } @@ -690,7 +690,7 @@ void func_80AF68E4(EnSa* this, PlayState* play) { this->actor.velocity.x = (endPos.x - startPos.x) / temp_f0; this->actor.velocity.y = (endPos.y - startPos.y) / temp_f0; gravity = this->actor.gravity; - if (play->sceneNum == SCENE_SPOT05) { + if (play->sceneId == SCENE_SPOT05) { gravity = 0.0f; } this->actor.velocity.y += gravity; @@ -703,12 +703,12 @@ void func_80AF68E4(EnSa* this, PlayState* play) { } void func_80AF6B20(EnSa* this, PlayState* play) { - if (play->sceneNum == SCENE_SPOT05) { + if (play->sceneId == SCENE_SPOT05) { Item_Give(play, ITEM_SONG_SARIA); EnSa_ChangeAnim(this, ENSA_ANIM1_6); } - if (play->sceneNum == SCENE_SPOT04) { + if (play->sceneId == SCENE_SPOT04) { EnSa_ChangeAnim(this, ENSA_ANIM1_4); this->actor.world.pos = this->actor.home.pos; this->actor.world.rot = this->unk_21A; @@ -748,7 +748,7 @@ void EnSa_Update(Actor* thisx, PlayState* play) { func_8002D7EC(&this->actor); } - if (play->sceneNum != SCENE_SPOT05) { + if (play->sceneId != SCENE_SPOT05) { Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2); } @@ -777,7 +777,7 @@ s32 EnSa_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po Matrix_RotateX(BINANG_TO_RAD_ALT(sp18.x), MTXMODE_APPLY); } - if (play->sceneNum == SCENE_SPOT05 && limbIndex == 15) { + if (play->sceneId == SCENE_SPOT05 && limbIndex == 15) { *dList = gSariaRightHandAndOcarinaDL; } diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/src/overlays/actors/ovl_En_Ta/z_en_ta.c index 2db4bd704a..a9efb726e0 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -144,7 +144,7 @@ void EnTa_Init(Actor* thisx, PlayState* play2) { Actor_Kill(&this->actor); } else if (!LINK_IS_ADULT) { Actor_Kill(&this->actor); - } else if (play->sceneNum == SCENE_MALON_STABLE && !IS_DAY) { + } else if (play->sceneId == SCENE_MALON_STABLE && !IS_DAY) { Actor_Kill(&this->actor); osSyncPrintf(VT_FGCOL(CYAN) " 夜はいない \n" VT_RST); } else { @@ -156,7 +156,7 @@ void EnTa_Init(Actor* thisx, PlayState* play2) { break; default: osSyncPrintf(VT_FGCOL(CYAN) " その他のタロン \n" VT_RST); - if (play->sceneNum == SCENE_SPOT15) { + if (play->sceneId == SCENE_SPOT15) { if (GET_EVENTCHKINF(EVENTCHKINF_14)) { Actor_Kill(&this->actor); } else if (GET_EVENTCHKINF(EVENTCHKINF_13)) { @@ -171,7 +171,7 @@ void EnTa_Init(Actor* thisx, PlayState* play2) { this->currentAnimation = &gTalonSleepAnim; this->actor.shape.shadowScale = 54.0f; } - } else if (play->sceneNum == SCENE_SOUKO) { + } else if (play->sceneId == SCENE_SOUKO) { osSyncPrintf(VT_FGCOL(CYAN) " ロンロン牧場の倉庫 の タロン\n" VT_RST); if (!GET_EVENTCHKINF(EVENTCHKINF_14)) { Actor_Kill(&this->actor); @@ -234,7 +234,7 @@ void EnTa_Destroy(Actor* thisx, PlayState* play) { Collider_DestroyCylinder(play, &this->collider); - if (this->actor.params != 1 && this->actor.params != 2 && play->sceneNum == SCENE_SOUKO) { + if (this->actor.params != 1 && this->actor.params != 2 && play->sceneId == SCENE_SOUKO) { gSaveContext.timer1State = 0; } diff --git a/src/overlays/actors/ovl_En_Tg/z_en_tg.c b/src/overlays/actors/ovl_En_Tg/z_en_tg.c index eac43e717b..e2558ca3b4 100644 --- a/src/overlays/actors/ovl_En_Tg/z_en_tg.c +++ b/src/overlays/actors/ovl_En_Tg/z_en_tg.c @@ -61,7 +61,7 @@ u16 EnTg_GetTextId(PlayState* play, Actor* thisx) { return temp; } // Use a different set of dialogue in Kakariko Village (Adult) - if (play->sceneNum == SCENE_SPOT01) { + if (play->sceneId == SCENE_SPOT01) { if (this->nextDialogue % 2 != 0) { phi = 0x5089; } else { diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index d56cb76da1..f710ed5765 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -492,7 +492,7 @@ void EnTk_Init(Actor* thisx, PlayState* play) { CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit); if (gSaveContext.dayTime <= CLOCK_TIME(18, 0) || gSaveContext.dayTime >= CLOCK_TIME(21, 0) || LINK_IS_ADULT || - play->sceneNum != SCENE_SPOT02) { + play->sceneId != SCENE_SPOT02) { Actor_Kill(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c index 86651bac21..bad8b6de17 100644 --- a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c +++ b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c @@ -95,7 +95,7 @@ void EnToryo_Init(Actor* thisx, PlayState* play) { EnToryo* this = (EnToryo*)thisx; s32 pad; - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_SPOT09: if (LINK_AGE_IN_YEARS == YEARS_ADULT) { this->stateFlags |= 1; diff --git a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c index 56cbfcbd85..cdc209d0c1 100644 --- a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c +++ b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c @@ -381,7 +381,7 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) { break; } } else if (type == ENVIEWER_TYPE_2_ZELDA) { - if (play->sceneNum == SCENE_SPOT00) { // Hyrule Field + if (play->sceneId == SCENE_SPOT00) { // Hyrule Field switch (this->state) { case 0: if (play->csCtx.state != CS_STATE_IDLE) { @@ -581,7 +581,7 @@ void EnViewer_DrawHorse(EnViewer* this, PlayState* play) { } s32 EnViewer_ZeldaOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - if (play->sceneNum == SCENE_SPOT00) { // Hyrule Field + if (play->sceneId == SCENE_SPOT00) { // Hyrule Field if (limbIndex == 2) { *dList = gChildZeldaCutsceneDressDL; } @@ -607,7 +607,7 @@ s32 EnViewer_ZeldaOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, void EnViewer_ZeldaPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { s32 pad; - if (play->sceneNum == SCENE_TOKINOMA) { + if (play->sceneId == SCENE_TOKINOMA) { if (limbIndex == 16) { OPEN_DISPS(play->state.gfxCtx, "../z_en_viewer.c", 1568); gSPDisplayList(POLY_OPA_DISP++, gChildZeldaOcarinaOfTimeDL); @@ -618,7 +618,7 @@ void EnViewer_ZeldaPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec void EnViewer_DrawZelda(EnViewer* this, PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_en_viewer.c", 1583); - if (play->sceneNum == SCENE_SPOT00) { // Hyrule Field + if (play->sceneId == SCENE_SPOT00) { // Hyrule Field if (play->csCtx.frames < 771) { gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gChildZeldaEyeInTex)); gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gChildZeldaEyeOutTex)); diff --git a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c index f3f9ba5788..620b15a30a 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c @@ -84,7 +84,7 @@ void EnWonderTalk2_Init(Actor* thisx, PlayState* play) { Actor_Kill(&this->actor); return; } - if ((this->talkMode == 1) && (play->sceneNum == SCENE_MEN) && (this->switchFlag != 0x08) && + if ((this->talkMode == 1) && (play->sceneId == SCENE_MEN) && (this->switchFlag != 0x08) && (this->switchFlag != 0x16) && (this->switchFlag != 0x2F)) { this->unk_15A = false; diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/src/overlays/actors/ovl_En_Xc/z_en_xc.c index c3445fb7d4..bce7ce9612 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -397,9 +397,9 @@ void EnXc_SetNutThrowSFX(EnXc* this, PlayState* play) { void EnXc_SetLandingSFX(EnXc* this, PlayState* play) { u32 sfxId; - s16 sceneNum = play->sceneNum; + s16 sceneId = play->sceneId; - if ((gSaveContext.sceneLayer != 4) || (sceneNum != SCENE_SPOT11)) { + if ((gSaveContext.sceneLayer != 4) || (sceneId != SCENE_SPOT11)) { if (Animation_OnFrame(&this->skelAnime, 11.0f)) { sfxId = SFX_FLAG; sfxId += SurfaceType_GetSfxId(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId); @@ -410,11 +410,11 @@ void EnXc_SetLandingSFX(EnXc* this, PlayState* play) { void EnXc_SetColossusAppearSFX(EnXc* this, PlayState* play) { static Vec3f sXyzDist; - s16 sceneNum; + s16 sceneId; if (gSaveContext.sceneLayer == 4) { - sceneNum = play->sceneNum; - if (sceneNum == SCENE_SPOT11) { + sceneId = play->sceneId; + if (sceneId == SCENE_SPOT11) { CutsceneContext* csCtx = &play->csCtx; u16 frameCount = csCtx->frames; f32 wDest[2]; @@ -436,9 +436,9 @@ void EnXc_SetColossusAppearSFX(EnXc* this, PlayState* play) { } void func_80B3D118(PlayState* play) { - s16 sceneNum; + s16 sceneId; - if ((gSaveContext.sceneLayer != 4) || (sceneNum = play->sceneNum, sceneNum != SCENE_SPOT11)) { + if ((gSaveContext.sceneLayer != 4) || (sceneId = play->sceneId, sceneId != SCENE_SPOT11)) { func_800788CC(NA_SE_PL_SKIP); } } @@ -452,9 +452,9 @@ void EnXc_SetColossusWindSFX(PlayState* play) { static f32 sMaxSpeed = 0.0f; static Vec3f D_80B42DB0; s32 pad; - s16 sceneNum = play->sceneNum; + s16 sceneId = play->sceneId; - if (sceneNum == SCENE_SPOT11) { + if (sceneId == SCENE_SPOT11) { CutsceneContext* csCtx = &play->csCtx; u16 frameCount = csCtx->frames; @@ -520,9 +520,9 @@ void EnXc_DestroyFlame(EnXc* this) { void EnXc_InitFlame(EnXc* this, PlayState* play) { static s32 D_80B41DA8 = 1; s32 pad; - s16 sceneNum = play->sceneNum; + s16 sceneId = play->sceneId; - if (sceneNum == SCENE_SPOT17) { + if (sceneId == SCENE_SPOT17) { CsCmdActorAction* npcAction = EnXc_GetCsCmd(play, 0); if (npcAction != NULL) { s32 action = npcAction->action; @@ -861,10 +861,10 @@ void EnXc_SetupDisappear(EnXc* this, PlayState* play) { CsCmdActorAction* npcAction = play->csCtx.npcActions[4]; if (npcAction != NULL && npcAction->action == 9) { - s16 sceneNum = play->sceneNum; + s16 sceneId = play->sceneId; // Sheik fades away if end of Bolero CS, kill actor otherwise - if (sceneNum == SCENE_SPOT17) { + if (sceneId == SCENE_SPOT17) { this->action = SHEIK_ACTION_FADE; this->drawMode = SHEIK_DRAW_NOTHING; this->actor.shape.shadowAlpha = 0; diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c index eae543d6a9..0ca2474fc1 100644 --- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -1673,12 +1673,12 @@ void func_80B57298(EnZl3* this) { } u16 func_80B572F0(PlayState* play) { - s16 sceneNum = play->sceneNum; + s16 sceneId = play->sceneId; u16 ret; - if (sceneNum == SCENE_GANON_SONOGO) { + if (sceneId == SCENE_GANON_SONOGO) { ret = 0x71A8; - } else if (sceneNum == SCENE_GANON_FINAL) { + } else if (sceneId == SCENE_GANON_FINAL) { ret = 0x71A9; } else { ret = 0x71AB; @@ -1768,9 +1768,9 @@ s32 func_80B575D0(EnZl3* this, PlayState* play) { } s32 func_80B575F0(EnZl3* this, PlayState* play) { - s16 sceneNum = play->sceneNum; + s16 sceneId = play->sceneId; - if ((sceneNum == SCENE_GANON_SONOGO) && (func_80B54DB4(this) == 0x26)) { + if ((sceneId == SCENE_GANON_SONOGO) && (func_80B54DB4(this) == 0x26)) { s32 unk_314 = this->unk_314; if (unk_314 == 1) { @@ -1781,9 +1781,9 @@ s32 func_80B575F0(EnZl3* this, PlayState* play) { } void func_80B5764C(EnZl3* this, PlayState* play) { - s16 sceneNum = play->sceneNum; + s16 sceneId = play->sceneId; - if ((sceneNum == SCENE_GANON_SONOGO) && (func_80B54DB4(this) == 0x26)) { + if ((sceneId == SCENE_GANON_SONOGO) && (func_80B54DB4(this) == 0x26)) { s32 unk_314 = this->unk_314 + 1; if ((unk_314 == 1) && !Play_InCsMode(play)) { @@ -1839,12 +1839,12 @@ void func_80B57858(PlayState* play) { s32 func_80B57890(EnZl3* this, PlayState* play) { s8 pad[2]; u8 curSpawn = play->curSpawn; - s16 sceneNum = play->sceneNum; + s16 sceneId = play->sceneId; s32 result = func_80B54DB4(this); if (play) {} // Needed to match, this if can be almost anywhere and it still matches - if (sceneNum == SCENE_GANON_SONOGO) { + if (sceneId == SCENE_GANON_SONOGO) { if ((result == 0x24) && (curSpawn == 0)) { return 1; } @@ -1860,10 +1860,10 @@ s32 func_80B57890(EnZl3* this, PlayState* play) { if ((result == 0x28) && (curSpawn == 6)) { return 1; } - } else if (sceneNum == SCENE_GANON_FINAL) { + } else if (sceneId == SCENE_GANON_FINAL) { if ((result == 0x20) && (curSpawn == 0) && Flags_GetSwitch(play, 0x37)) { - if ((play->sceneNum == SCENE_GANON_DEMO) || (play->sceneNum == SCENE_GANON_FINAL) || - (play->sceneNum == SCENE_GANON_SONOGO) || (play->sceneNum == SCENE_GANONTIKA_SONOGO)) { + if ((play->sceneId == SCENE_GANON_DEMO) || (play->sceneId == SCENE_GANON_FINAL) || + (play->sceneId == SCENE_GANON_SONOGO) || (play->sceneId == SCENE_GANONTIKA_SONOGO)) { return 1; } } @@ -1876,7 +1876,7 @@ s32 func_80B57890(EnZl3* this, PlayState* play) { if ((result == 0x23) && (curSpawn == 6)) { return 1; } - } else if (sceneNum == SCENE_GANONTIKA_SONOGO) { + } else if (sceneId == SCENE_GANONTIKA_SONOGO) { if ((result == 0x29) && (curSpawn == 0)) { return 1; } @@ -2485,8 +2485,8 @@ s32 func_80B5944C(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s s32 func_80B59698(EnZl3* this, PlayState* play) { s32 cond = Flags_GetSwitch(play, 0x37) && - ((play->sceneNum == SCENE_GANON_DEMO) || (play->sceneNum == SCENE_GANON_FINAL) || - (play->sceneNum == SCENE_GANON_SONOGO) || (play->sceneNum == SCENE_GANONTIKA_SONOGO)); + ((play->sceneId == SCENE_GANON_DEMO) || (play->sceneId == SCENE_GANON_FINAL) || + (play->sceneId == SCENE_GANON_SONOGO) || (play->sceneId == SCENE_GANONTIKA_SONOGO)); if (cond) { u8 curSpawn = play->curSpawn; @@ -2501,8 +2501,8 @@ s32 func_80B59698(EnZl3* this, PlayState* play) { s32 func_80B59768(EnZl3* this, PlayState* play) { s32 cond = Flags_GetSwitch(play, 0x37) && - ((play->sceneNum == SCENE_GANON_DEMO) || (play->sceneNum == SCENE_GANON_FINAL) || - (play->sceneNum == SCENE_GANON_SONOGO) || (play->sceneNum == SCENE_GANONTIKA_SONOGO)); + ((play->sceneId == SCENE_GANON_DEMO) || (play->sceneId == SCENE_GANON_FINAL) || + (play->sceneId == SCENE_GANON_SONOGO) || (play->sceneId == SCENE_GANONTIKA_SONOGO)); if (cond) { u8 curSpawn = play->curSpawn; @@ -2559,8 +2559,8 @@ void func_80B59828(EnZl3* this, PlayState* play) { func_80B54EA4(this, play); cond = Flags_GetSwitch(play, 0x37) && - ((play->sceneNum == SCENE_GANON_DEMO) || (play->sceneNum == SCENE_GANON_FINAL) || - (play->sceneNum == SCENE_GANON_SONOGO) || (play->sceneNum == SCENE_GANONTIKA_SONOGO)); + ((play->sceneId == SCENE_GANON_DEMO) || (play->sceneId == SCENE_GANON_FINAL) || + (play->sceneId == SCENE_GANON_SONOGO) || (play->sceneId == SCENE_GANONTIKA_SONOGO)); if (cond) { func_80B53614(this, play); } diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index 448192bb76..083c67a663 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -752,7 +752,7 @@ void ObjBean_SetupWaitForPlayer(ObjBean* this) { void ObjBean_WaitForPlayer(ObjBean* this, PlayState* play) { if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { ObjBean_SetupFly(this); - if (play->sceneNum == SCENE_SPOT10) { // Lost woods + if (play->sceneId == SCENE_SPOT10) { // Lost woods Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BEAN_LOST_WOODS); } else { Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BEAN_GENERIC); @@ -788,7 +788,7 @@ void ObjBean_Fly(ObjBean* this, PlayState* play) { func_8002F974(&this->dyna.actor, NA_SE_PL_PLANT_MOVE - SFX_FLAG); - if (play->sceneNum == SCENE_SPOT10) { + if (play->sceneId == SCENE_SPOT10) { Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BEAN_LOST_WOODS); } else { Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BEAN_GENERIC); diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c index c7a6882092..0345459ee4 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c @@ -155,7 +155,7 @@ void ObjHsblock_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_obj_hsblock.c", 369), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - if (play->sceneNum == SCENE_HIDAN) { + if (play->sceneId == SCENE_HIDAN) { color = &sFireTempleColor; } else { defaultColor.r = mREG(13); diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index a8f37d88f8..60b80fd0ce 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -52,7 +52,7 @@ static Color_RGB8 sColors[][4] = { { { 232, 210, 176 }, { 232, 210, 176 }, { 232, 210, 176 }, { 232, 210, 176 } }, // gerudo training grounds }; -static s16 sScenes[] = { +static s16 sSceneIds[] = { SCENE_YDAN, SCENE_DDAN, SCENE_BMORI1, SCENE_HIDAN, SCENE_MIZUSIN, SCENE_JYASINZOU, SCENE_HAKADAN, SCENE_GANON, SCENE_MEN, }; @@ -249,8 +249,8 @@ void ObjOshihiki_SetColor(ObjOshihiki* this, PlayState* play) { paramsColorIdx = (this->dyna.actor.params >> 6) & 3; - for (i = 0; i < ARRAY_COUNT(sScenes); i++) { - if (sScenes[i] == play->sceneNum) { + for (i = 0; i < ARRAY_COUNT(sSceneIds); i++) { + if (sSceneIds[i] == play->sceneId) { break; } } @@ -648,7 +648,7 @@ void ObjOshihiki_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_obj_oshihiki.c", 1308), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_YDAN: case SCENE_DDAN: case SCENE_BMORI1: diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index 1a57aece48..6c2797ef59 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -191,7 +191,7 @@ void ObjectKankyo_Fairies(ObjectKankyo* this, PlayState* play) { player = GET_PLAYER(play); - if (play->sceneNum == SCENE_SPOT04 && gSaveContext.sceneLayer == 7) { + if (play->sceneId == SCENE_SPOT04 && gSaveContext.sceneLayer == 7) { dist = Math3D_Vec3f_DistXYZ(&this->prevEyePos, &play->view.eye); this->prevEyePos.x = play->view.eye.x; diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 022033ddd2..d2f3f7f14d 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -3781,13 +3781,13 @@ s32 func_808382DC(Player* this, PlayState* play) { } else { // Special case for getting crushed in Forest Temple's Checkboard Ceiling Hall or Shadow Temple's // Falling Spike Trap Room, to respawn the player in a specific place - if (((play->sceneNum == SCENE_BMORI1) && (play->roomCtx.curRoom.num == 15)) || - ((play->sceneNum == SCENE_HAKADAN) && (play->roomCtx.curRoom.num == 10))) { + if (((play->sceneId == SCENE_BMORI1) && (play->roomCtx.curRoom.num == 15)) || + ((play->sceneId == SCENE_HAKADAN) && (play->roomCtx.curRoom.num == 10))) { static SpecialRespawnInfo checkboardCeilingRespawn = { { 1992.0f, 403.0f, -3432.0f }, 0 }; static SpecialRespawnInfo fallingSpikeTrapRespawn = { { 1200.0f, -1343.0f, 3850.0f }, 0 }; SpecialRespawnInfo* respawnInfo; - if (play->sceneNum == SCENE_BMORI1) { + if (play->sceneId == SCENE_BMORI1) { respawnInfo = &checkboardCeilingRespawn; } else { respawnInfo = &fallingSpikeTrapRespawn; @@ -4224,8 +4224,8 @@ s32 func_80839034(PlayState* play, Player* this, CollisionPoly* poly, u32 bgId) if ((this->actor.world.pos.y < -4000.0f) || (((this->unk_A7A == FLOOR_PROPERTY_5) || (this->unk_A7A == FLOOR_PROPERTY_12)) && ((D_80853600 < 100.0f) || (this->fallDistance > 400.0f) || - ((play->sceneNum != SCENE_HAKADAN) && (this->fallDistance > 200.0f)))) || - ((play->sceneNum == SCENE_GANON_FINAL) && (this->fallDistance > 320.0f))) { + ((play->sceneId != SCENE_HAKADAN) && (this->fallDistance > 200.0f)))) || + ((play->sceneId == SCENE_GANON_FINAL) && (this->fallDistance > 320.0f))) { if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { if (this->unk_A7A == FLOOR_PROPERTY_5) { @@ -6117,7 +6117,7 @@ s32 func_8083E5A8(Player* this, PlayState* play) { iREG(67) = false; - if ((Item_CheckObtainability(giEntry->itemId) == ITEM_NONE) || (play->sceneNum == SCENE_BOWLING)) { + if ((Item_CheckObtainability(giEntry->itemId) == ITEM_NONE) || (play->sceneId == SCENE_BOWLING)) { func_808323B4(play, this); func_8083AE40(this, giEntry->objectId); @@ -9154,7 +9154,7 @@ void func_80846648(PlayState* play, Player* this) { void func_80846660(PlayState* play, Player* this) { func_80835C58(play, this, func_8084F710, 0); - if ((play->sceneNum == SCENE_SPOT06) && IS_CUTSCENE_LAYER) { + if ((play->sceneId == SCENE_SPOT06) && IS_CUTSCENE_LAYER) { this->unk_84F = 1; } this->stateFlags1 |= PLAYER_STATE1_29; @@ -9346,8 +9346,8 @@ void Player_Init(Actor* thisx, PlayState* play2) { if (!IS_CUTSCENE_LAYER && (gEntranceTable[((void)0, gSaveContext.entranceIndex) + ((void)0, gSaveContext.sceneLayer)].field & ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG) && - ((play->sceneNum != SCENE_DDAN) || GET_EVENTCHKINF(EVENTCHKINF_B0)) && - ((play->sceneNum != SCENE_NIGHT_SHOP) || GET_EVENTCHKINF(EVENTCHKINF_25))) { + ((play->sceneId != SCENE_DDAN) || GET_EVENTCHKINF(EVENTCHKINF_B0)) && + ((play->sceneId != SCENE_NIGHT_SHOP) || GET_EVENTCHKINF(EVENTCHKINF_25))) { TitleCard_InitPlaceName(play, &play->actorCtx.titleCtx, this->giObjectSegment, 160, 120, 144, 24, 20); } } @@ -9360,8 +9360,8 @@ void Player_Init(Actor* thisx, PlayState* play2) { gSaveContext.respawn[RESPAWN_MODE_DOWN].data = 1; - if (play->sceneNum <= SCENE_GANONTIKA_SONOGO) { - gSaveContext.infTable[INFTABLE_1AX_INDEX] |= gBitFlags[play->sceneNum]; + if (play->sceneId <= SCENE_GANONTIKA_SONOGO) { + gSaveContext.infTable[INFTABLE_1AX_INDEX] |= gBitFlags[play->sceneId]; } initMode = (thisx->params & 0xF00) >> 8; @@ -9961,7 +9961,7 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) { Audio_SetBgmEnemyVolume(sqrtf(play->actorCtx.targetCtx.bgmEnemy->xyzDistToPlayerSq)); } - if (play->sceneNum != SCENE_TURIBORI) { + if (play->sceneId != SCENE_TURIBORI) { Audio_SetSequenceMode(seqMode); } } @@ -10077,7 +10077,7 @@ void func_80848C74(PlayState* play, Player* this) { if (spawnedFlame) { func_8002F7DC(&this->actor, NA_SE_EV_TORCH - SFX_FLAG); - if (play->sceneNum == SCENE_JYASINBOSS) { + if (play->sceneId == SCENE_JYASINBOSS) { dmgCooldown = 0; } else { dmgCooldown = 7; @@ -12682,7 +12682,7 @@ void func_8084F710(Player* this, PlayState* play) { this->unk_850 = 1; } } else { - if ((play->sceneNum == SCENE_SPOT04) && func_8083ADD4(play, this)) { + if ((play->sceneId == SCENE_SPOT04) && func_8083ADD4(play, this)) { return; } func_80853080(this, play); @@ -12691,7 +12691,7 @@ void func_8084F710(Player* this, PlayState* play) { Math_SmoothStepToF(&this->actor.velocity.y, 2.0f, 0.3f, 8.0f, 0.5f); } - if ((play->sceneNum == SCENE_KENJYANOMA) && func_8083ADD4(play, this)) { + if ((play->sceneId == SCENE_KENJYANOMA) && func_8083ADD4(play, this)) { return; } @@ -12708,7 +12708,7 @@ void func_8084F88C(Player* this, PlayState* play) { if ((this->unk_850++ > 8) && (play->transitionTrigger == TRANS_TRIGGER_OFF)) { if (this->unk_84F != 0) { - if (play->sceneNum == SCENE_ICE_DOUKUTO) { + if (play->sceneId == SCENE_ICE_DOUKUTO) { Play_TriggerRespawn(play); play->nextEntranceIndex = ENTR_ICE_DOUKUTO_0; } else if (this->unk_84F < 0) { @@ -13738,7 +13738,7 @@ void func_80851828(PlayState* play, Player* this, CsCmdActorAction* arg2) { func_80845BA0(play, this, &sp1C, 10); - if (play->sceneNum == SCENE_BDAN_BOSS) { + if (play->sceneId == SCENE_BDAN_BOSS) { if (this->unk_850 == 0) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) { return; @@ -14217,7 +14217,7 @@ void func_80852944(PlayState* play, Player* this, CsCmdActorAction* arg2) { void func_808529D0(PlayState* play, Player* this, CsCmdActorAction* arg2) { this->actor.world.pos.x = arg2->startPos.x; this->actor.world.pos.y = arg2->startPos.y; - if ((play->sceneNum == SCENE_SPOT04) && !LINK_IS_ADULT) { + if ((play->sceneId == SCENE_SPOT04) && !LINK_IS_ADULT) { this->actor.world.pos.y -= 1.0f; } this->actor.world.pos.z = arg2->startPos.z; diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c index 98897e76db..d0a5edf29c 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c @@ -305,7 +305,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) { KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gGoldSkulltulaIconTex, 24, 24, 8); } - if ((play->sceneNum >= SCENE_YDAN) && (play->sceneNum <= SCENE_TAKARAYA)) { + if ((play->sceneId >= SCENE_YDAN) && (play->sceneId <= SCENE_TAKARAYA)) { stepR = (mapBgPulseR - mapBgPulseColors[mapBgPulseStage][0]) / mapBgPulseTimer; stepG = (mapBgPulseG - mapBgPulseColors[mapBgPulseStage][1]) / mapBgPulseTimer; stepB = (mapBgPulseB - mapBgPulseColors[mapBgPulseStage][2]) / mapBgPulseTimer; diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index b77afa0ce0..491a583795 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -2455,13 +2455,13 @@ void KaleidoScope_UpdateDungeonMap(PlayState* play) { KaleidoScope_LoadDungeonMap(play); Map_SetFloorPalettesData(play, pauseCtx->dungeonMapSlot - 3); - if ((play->sceneNum >= SCENE_YDAN) && (play->sceneNum <= SCENE_TAKARAYA)) { + if ((play->sceneId >= SCENE_YDAN) && (play->sceneId <= SCENE_TAKARAYA)) { if ((VREG(30) + 3) == pauseCtx->cursorPoint[PAUSE_MAP]) { KaleidoScope_OverridePalIndexCI4(interfaceCtx->mapSegment, 2040, interfaceCtx->mapPaletteIndex, 14); } } - if ((play->sceneNum >= SCENE_YDAN) && (play->sceneNum <= SCENE_TAKARAYA)) { + if ((play->sceneId >= SCENE_YDAN) && (play->sceneId <= SCENE_TAKARAYA)) { if ((VREG(30) + 3) == pauseCtx->cursorPoint[PAUSE_MAP]) { KaleidoScope_OverridePalIndexCI4(interfaceCtx->mapSegment + 0x800, 2040, interfaceCtx->mapPaletteIndex, 14); } @@ -2552,7 +2552,7 @@ void KaleidoScope_Update(PlayState* play) { pauseCtx->iconItemAltSegment = (void*)ALIGN16((uintptr_t)pauseCtx->iconItem24Segment + size); - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_YDAN: case SCENE_DDAN: case SCENE_BDAN: @@ -3061,7 +3061,7 @@ void KaleidoScope_Update(PlayState* play) { &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); Play_SaveSceneFlags(play); - gSaveContext.savedSceneNum = play->sceneNum; + gSaveContext.savedSceneId = play->sceneId; Sram_WriteSave(&play->sramCtx); pauseCtx->unk_1EC = 4; D_8082B25C = 3; @@ -3300,7 +3300,7 @@ void KaleidoScope_Update(PlayState* play) { &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); pauseCtx->promptChoice = 0; Play_SaveSceneFlags(play); - gSaveContext.savedSceneNum = play->sceneNum; + gSaveContext.savedSceneId = play->sceneId; Sram_WriteSave(&play->sramCtx); pauseCtx->state = 0xF; D_8082B25C = 3; @@ -3461,7 +3461,7 @@ void KaleidoScope_Update(PlayState* play) { func_800981B8(&play->objectCtx); func_800418D0(&play->colCtx, play); - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_YDAN: case SCENE_DDAN: case SCENE_BDAN: diff --git a/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark.c b/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark.c index ce19d3fe3c..049c7445fb 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark.c @@ -60,8 +60,8 @@ void PauseMapMark_DrawForDungeon(PlayState* play) { break; } - if ((mapMarkData->markType == PAUSE_MAP_MARK_BOSS) && (play->sceneNum >= SCENE_YDAN_BOSS) && - (play->sceneNum <= SCENE_GANON_FINAL)) { + if ((mapMarkData->markType == PAUSE_MAP_MARK_BOSS) && (play->sceneId >= SCENE_YDAN_BOSS) && + (play->sceneId <= SCENE_GANON_FINAL)) { if (gBossMarkState == 0) { Math_ApproachF(&gBossMarkScale, 1.5f, 1.0f, 0.041f); if (gBossMarkScale == 1.5f) { @@ -98,7 +98,7 @@ void PauseMapMark_DrawForDungeon(PlayState* play) { if (Flags_GetTreasure(play, markPoint->chestFlag)) { display = false; } else { - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_YDAN_BOSS: case SCENE_DDAN_BOSS: case SCENE_BDAN_BOSS: @@ -150,7 +150,7 @@ void PauseMapMark_DrawForDungeon(PlayState* play) { void PauseMapMark_Draw(PlayState* play) { PauseMapMark_Init(play); - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_YDAN: case SCENE_DDAN: case SCENE_BDAN: