From 3a723efb15c4d3e044edda7979b1cde5588c0aeb Mon Sep 17 00:00:00 2001 From: Derek Hensley Date: Thu, 29 Sep 2022 19:22:59 -0700 Subject: [PATCH] SceneNum -> SceneId (#1036) * sceneNum -> sceneId * horse data scene -> sceneId * Clean up scene table * format * PR comments * Some more * It helps if you actually save the file * PR * Remove comment * Format * Conflicts --- include/functions.h | 8 +- include/variables.h | 2 +- include/z64.h | 2 +- include/z64save.h | 4 +- include/z64scene.h | 2 +- include/z64schedule.h | 12 +- src/code/code_8012EC80.c | 54 +- src/code/z_actor.c | 6 +- src/code/z_bgcheck.c | 14 +- src/code/z_elf_message.c | 4 +- src/code/z_map_exp.c | 26 +- src/code/z_message.c | 2 +- src/code/z_message_nes.c | 2 +- src/code/z_parameter.c | 14 +- src/code/z_play.c | 26 +- src/code/z_player_lib.c | 2 +- src/code/z_room.c | 3 +- src/code/z_scene.c | 16 +- src/code/z_scene_table.c | 1275 +++++++++-------- src/code/z_schedule.c | 8 +- src/code/z_snap.c | 4 +- src/code/z_sram_NES.c | 20 +- src/code/z_vr_box.c | 2 +- src/overlays/actors/ovl_Dm_Ah/z_dm_ah.c | 2 +- src/overlays/actors/ovl_Dm_An/z_dm_an.c | 2 +- .../actors/ovl_Dm_Char00/z_dm_char00.c | 6 +- .../actors/ovl_Dm_Char02/z_dm_char02.c | 2 +- .../actors/ovl_Dm_Char05/z_dm_char05.c | 4 +- src/overlays/actors/ovl_Dm_Gm/z_dm_gm.c | 2 +- .../actors/ovl_Dm_Opstage/z_dm_opstage.c | 2 +- src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c | 28 +- .../actors/ovl_Door_Shutter/z_door_shutter.c | 10 +- .../actors/ovl_Door_Spiral/z_door_spiral.c | 4 +- .../actors/ovl_Door_Warp1/z_door_warp1.c | 46 +- src/overlays/actors/ovl_En_Baba/z_en_baba.c | 4 +- src/overlays/actors/ovl_En_Bat/z_en_bat.c | 2 +- .../actors/ovl_En_Bigokuta/z_en_bigokuta.c | 2 +- src/overlays/actors/ovl_En_Dai/z_en_dai.c | 2 +- src/overlays/actors/ovl_En_Dg/z_en_dg.c | 12 +- .../actors/ovl_En_Dinofos/z_en_dinofos.c | 10 +- src/overlays/actors/ovl_En_Dnk/z_en_dnk.c | 2 +- src/overlays/actors/ovl_En_Dnp/z_en_dnp.c | 4 +- src/overlays/actors/ovl_En_Door/z_en_door.c | 4 +- src/overlays/actors/ovl_En_Elf/z_en_elf.c | 4 +- .../actors/ovl_En_Elfgrp/z_en_elfgrp.c | 12 +- src/overlays/actors/ovl_En_Fall/z_en_fall.c | 9 +- src/overlays/actors/ovl_En_Fish/z_en_fish.c | 5 +- src/overlays/actors/ovl_En_Gg2/z_en_gg2.c | 18 +- src/overlays/actors/ovl_En_Gk/z_en_gk.c | 8 +- src/overlays/actors/ovl_En_Gm/z_en_gm.c | 4 +- src/overlays/actors/ovl_En_Go/z_en_go.c | 6 +- .../actors/ovl_En_Hanabi/z_en_hanabi.c | 2 +- src/overlays/actors/ovl_En_Holl/z_en_holl.c | 6 +- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 16 +- src/overlays/actors/ovl_En_Jg/z_en_jg.c | 2 +- .../actors/ovl_En_Kakasi/z_en_kakasi.c | 6 +- src/overlays/actors/ovl_En_Kbt/z_en_kbt.c | 4 +- src/overlays/actors/ovl_En_Kgy/z_en_kgy.c | 16 +- src/overlays/actors/ovl_En_Mk/z_en_mk.c | 2 +- src/overlays/actors/ovl_En_Osn/z_en_osn.c | 4 +- src/overlays/actors/ovl_En_Pm/z_en_pm.c | 2 +- .../actors/ovl_En_Rail_Skb/z_en_rail_skb.c | 2 +- src/overlays/actors/ovl_En_Skb/z_en_skb.c | 2 +- src/overlays/actors/ovl_En_Ssh/z_en_ssh.c | 2 +- src/overlays/actors/ovl_En_Sth/z_en_sth.c | 12 +- .../actors/ovl_En_Suttari/z_en_suttari.c | 10 +- .../ovl_En_Syateki_Man/z_en_syateki_man.c | 12 +- src/overlays/actors/ovl_En_Test4/z_en_test4.c | 4 +- src/overlays/actors/ovl_En_Test7/z_en_test7.c | 2 +- .../actors/ovl_En_Time_Tag/z_en_time_tag.c | 2 +- src/overlays/actors/ovl_En_Toto/z_en_toto.c | 20 +- src/overlays/actors/ovl_En_Trt2/z_en_trt2.c | 4 +- .../ovl_En_Weather_Tag/z_en_weather_tag.c | 3 +- src/overlays/actors/ovl_En_Zog/z_en_zog.c | 2 +- .../actors/ovl_En_Zoraegg/z_en_zoraegg.c | 6 +- src/overlays/actors/ovl_Obj_Demo/z_obj_demo.c | 4 +- .../ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c | 2 +- .../actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c | 4 +- .../actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.c | 5 +- .../actors/ovl_Obj_Nozoki/z_obj_nozoki.c | 2 +- .../actors/ovl_Obj_Switch/z_obj_switch.c | 10 +- .../ovl_Obj_Tokei_Step/z_obj_tokei_step.c | 2 +- .../actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c | 16 +- .../actors/ovl_Obj_Tsubo/z_obj_tsubo.c | 2 +- .../actors/ovl_Obj_Wturn/z_obj_wturn.c | 6 +- .../ovl_Object_Kankyo/z_object_kankyo.c | 2 +- tools/disasm/functions.txt | 6 +- tools/disasm/variables.txt | 4 +- tools/namefixer.py | 1 + tools/sizes/code_functions.csv | 6 +- 90 files changed, 975 insertions(+), 964 deletions(-) diff --git a/include/functions.h b/include/functions.h index 8396d4a418..05fd4ed453 100644 --- a/include/functions.h +++ b/include/functions.h @@ -2087,7 +2087,7 @@ s32 Inventory_GetBtnBItem(PlayState* play); void Inventory_ChangeEquipment(s16 value); u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment); void Inventory_ChangeUpgrade(s16 upgrade, u32 value); -s32 Inventory_IsMapVisible(s16 sceneNum); +s32 Inventory_IsMapVisible(s16 sceneId); void Inventory_SetMapVisibility(s16 tingleIndex); void Inventory_SaveDekuPlaygroundHighScore(s16 timerId); void Inventory_IncrementSkullTokenCount(s16 sceneIndex); @@ -2173,8 +2173,8 @@ void Scene_DrawConfig5(PlayState* play); void Scene_DrawConfigMatAnimManualStep(PlayState* play); void Scene_DrawConfigGreatBayTemple(PlayState* play); EntranceTableEntry* Entrance_GetTableEntry(u16 entrance); -s32 Entrance_GetSceneNum(u16 entrance); -s32 Entrance_GetSceneNumAbsolute(u16 entrance); +s32 Entrance_GetSceneId(u16 entrance); +s32 Entrance_GetSceneIdAbsolute(u16 entrance); s32 Entrance_GetSpawnNum(u16 entrance); s32 Entrance_GetTransitionFlags(u16 entrance); s32 Schedule_RunScript(PlayState* play, u8* script, ScheduleOutput* output); @@ -2557,7 +2557,7 @@ s32 Play_ChangeCameraSetting(PlayState* play, s16 camId, s16 setting); void func_80169AFC(PlayState* play, s16 camId, s16 arg2); u16 Play_GetActorCsCamSetting(PlayState* play, s32 csCamDataIndex); Vec3s* Play_GetActorCsCamFuncData(PlayState* play, s32 csCamDataIndex); -s16 Play_GetOriginalSceneNumber(s16 sceneNum); +s16 Play_GetOriginalSceneId(s16 sceneId); void Play_SaveCycleSceneFlags(GameState* gameState); void Play_SetRespawnData(GameState* gameState, s32 respawnNumber, u16 sceneSetup, s32 roomIndex, s32 playerParams, Vec3f* pos, s16 yaw); void Play_SetupRespawnPoint(GameState* gameState, s32 respawnNumber, s32 playerParams); diff --git a/include/variables.h b/include/variables.h index 1ee739c4af..07e80b2ca4 100644 --- a/include/variables.h +++ b/include/variables.h @@ -1312,7 +1312,7 @@ extern u32 gGsFlagsShift[]; extern void* gItemIcons[]; extern u8 gItemSlots[]; extern s16 gItemPrices[]; -extern u16 gScenesPerRegion[11][27]; +extern u16 gSceneIdsPerRegion[11][27]; extern u32 D_801C2410[]; extern s16 gPlayerFormObjectIndices[8]; extern RomFile gObjectTable[643]; diff --git a/include/z64.h b/include/z64.h index e161b723f9..69e89d629f 100644 --- a/include/z64.h +++ b/include/z64.h @@ -1084,7 +1084,7 @@ typedef struct { struct PlayState { /* 0x00000 */ GameState state; - /* 0x000A4 */ s16 sceneNum; + /* 0x000A4 */ s16 sceneId; /* 0x000A6 */ u8 sceneConfig; /* 0x000A7 */ char unk_A7[0x9]; /* 0x000B0 */ void* sceneSegment; diff --git a/include/z64save.h b/include/z64save.h index fc24aa5b6b..15984d45c3 100644 --- a/include/z64save.h +++ b/include/z64save.h @@ -165,7 +165,7 @@ typedef struct Inventory { } Inventory; // size = 0x88 typedef struct HorseData { - /* 0x0 */ s16 scene; // "spot_no" + /* 0x0 */ s16 sceneId; // "spot_no" /* 0x2 */ Vec3s pos; // "horse_x", "horse_y" and "horse_z" /* 0x8 */ s16 yaw; // "horse_a" } HorseData; // size = 0xA @@ -226,7 +226,7 @@ typedef struct SavePlayerData { /* 0x20 */ u8 unk_20; // "first_memory" /* 0x22 */ u16 owlActivationFlags; // "memory_warp_point" /* 0x24 */ u8 unk_24; // "last_warp_pt" - /* 0x26 */ s16 savedSceneNum; // "scene_data_ID" + /* 0x26 */ s16 savedSceneId; // "scene_data_ID" } SavePlayerData; // size = 0x28 typedef struct Save { diff --git a/include/z64scene.h b/include/z64scene.h index 180405f30b..6b8849381b 100644 --- a/include/z64scene.h +++ b/include/z64scene.h @@ -316,7 +316,7 @@ typedef struct { } EntranceEntry; // size = 0x2 typedef struct { - /* 0x0 */ s8 sceneNum; + /* 0x0 */ s8 sceneId; /* 0x1 */ s8 spawnNum; /* 0x2 */ u16 flags; } EntranceTableEntry; // size = 0x4 diff --git a/include/z64schedule.h b/include/z64schedule.h index cff6224f4f..69906e584c 100644 --- a/include/z64schedule.h +++ b/include/z64schedule.h @@ -42,8 +42,8 @@ typedef enum { /* 0x07 */ SCHEDULE_CMD_ID_NOP, // No-Op /* 0x08 */ SCHEDULE_CMD_ID_CHECK_MISC_S, // Special check based on items or masks and branches if check passes, short range branch /* 0x09 */ SCHEDULE_CMD_ID_RET_VAL_S, // Ends script and returns byte value - /* 0x0A */ SCHEDULE_CMD_ID_CHECK_NOT_IN_SCENE_S, // Checks if the current scene is not SceneNum and branches if so, short range branch - /* 0x0B */ SCHEDULE_CMD_ID_CHECK_NOT_IN_SCENE_L, // Checks if the current scene is not SceneNum and branches if so, long range branch + /* 0x0A */ SCHEDULE_CMD_ID_CHECK_NOT_IN_SCENE_S, // Checks if the current scene is not SceneId and branches if so, short range branch + /* 0x0B */ SCHEDULE_CMD_ID_CHECK_NOT_IN_SCENE_L, // Checks if the current scene is not SceneId and branches if so, long range branch /* 0x0C */ SCHEDULE_CMD_ID_CHECK_NOT_IN_DAY_S, // Checks if the current day is not Day and branches if so, short range branch /* 0x0D */ SCHEDULE_CMD_ID_CHECK_NOT_IN_DAY_L, // Checks if the current day is not Day and branches if so, long range branch /* 0x0E */ SCHEDULE_CMD_ID_RET_TIME, // Returns 2 time values @@ -130,15 +130,15 @@ typedef struct { typedef struct { /* 0x0 */ ScheduleCmdBase base; - /* 0x1 */ u8 sceneH; - /* 0x2 */ u8 sceneL; + /* 0x1 */ u8 sceneIdH; + /* 0x2 */ u8 sceneIdL; /* 0x3 */ s8 offset; } ScheduleCmdCheckNotInSceneS; // size = 0x4 typedef struct { /* 0x0 */ ScheduleCmdBase base; - /* 0x1 */ u8 sceneH; - /* 0x2 */ u8 sceneL; + /* 0x1 */ u8 sceneIdH; + /* 0x2 */ u8 sceneIdL; /* 0x3 */ u8 offsetH; /* 0x4 */ u8 offsetL; } ScheduleCmdCheckNotInSceneL; // size = 0x5 diff --git a/src/code/code_8012EC80.c b/src/code/code_8012EC80.c index a29a8279eb..278ef0830d 100644 --- a/src/code/code_8012EC80.c +++ b/src/code/code_8012EC80.c @@ -365,7 +365,7 @@ s16 gItemPrices[] = { }; // Used to map scene indexes to their region in Termina -u16 gScenesPerRegion[11][27] = { +u16 gSceneIdsPerRegion[11][27] = { // Great Bay { SCENE_30GYOSON, @@ -522,7 +522,7 @@ void Inventory_ChangeUpgrade(s16 upgrade, u32 value) { gSaveContext.save.inventory.upgrades = upgrades; } -s32 Inventory_IsMapVisible(s16 sceneNum) { +s32 Inventory_IsMapVisible(s16 sceneId) { s16 index = 0; /** @@ -530,30 +530,30 @@ s32 Inventory_IsMapVisible(s16 sceneNum) { * increment to the next index of scenesVisible so that every scene gets a unique flag in scenesVisible, * 224 bits were allocated to this although there are only 112 scenes */ - if (sceneNum >= 0x20) { - if (sceneNum < 0x40) { + if (sceneId >= 0x20) { + if (sceneId < 0x40) { index = 1; - } else if (sceneNum < 0x60) { + } else if (sceneId < 0x60) { index = 2; - } else if (sceneNum < 0x80) { + } else if (sceneId < 0x80) { index = 3; - } else if (sceneNum < 0xA0) { + } else if (sceneId < 0xA0) { index = 4; - } else if (sceneNum < 0xC0) { + } else if (sceneId < 0xC0) { index = 5; - } else if (sceneNum < 0xE0) { + } else if (sceneId < 0xE0) { index = 6; } } - if (gSaveContext.save.scenesVisible[index] & gBitFlags[sceneNum - (index << 5)]) { + if (gSaveContext.save.scenesVisible[index] & gBitFlags[sceneId - (index << 5)]) { return true; } return false; } -static u16 sScenesPerTingleMap[6][12] = { +static u16 sSceneIdsPerTingleMap[6][12] = { { // Clock Town Tingle Map SCENE_00KEIKOKU, @@ -630,11 +630,11 @@ static u16 sScenesPerTingleMap[6][12] = { void Inventory_SetMapVisibility(s16 tingleIndex) { s16 i = 0; s16 index = 0; - u16(*tingleMapSceneIndices)[] = &sScenesPerTingleMap[tingleIndex]; + u16(*tingleMapSceneIds)[] = &sSceneIdsPerTingleMap[tingleIndex]; if ((tingleIndex >= 0) && (tingleIndex < 6)) { while (true) { - if ((*tingleMapSceneIndices)[i] == 0xFFFF) { + if ((*tingleMapSceneIds)[i] == 0xFFFF) { break; } @@ -643,38 +643,38 @@ void Inventory_SetMapVisibility(s16 tingleIndex) { * increment to the next index of scenesVisible so that every scene gets a unique flag in scenesVisible, * 224 bits were allocated to this although there are only 112 scenes */ - if (((s16)(*tingleMapSceneIndices)[i]) < 0x20) { + if (((s16)(*tingleMapSceneIds)[i]) < 0x20) { index = 0; - } else if (((s16)(*tingleMapSceneIndices)[i]) < 0x40) { + } else if (((s16)(*tingleMapSceneIds)[i]) < 0x40) { index = 1; - } else if (((s16)(*tingleMapSceneIndices)[i]) < 0x60) { + } else if (((s16)(*tingleMapSceneIds)[i]) < 0x60) { index = 2; - } else if (((s16)(*tingleMapSceneIndices)[i]) < 0x80) { + } else if (((s16)(*tingleMapSceneIds)[i]) < 0x80) { index = 3; - } else if (((s16)(*tingleMapSceneIndices)[i]) < 0xA0) { + } else if (((s16)(*tingleMapSceneIds)[i]) < 0xA0) { index = 4; - } else if (((s16)(*tingleMapSceneIndices)[i]) < 0xC0) { + } else if (((s16)(*tingleMapSceneIds)[i]) < 0xC0) { index = 5; - } else if (((s16)(*tingleMapSceneIndices)[i]) < 0xE0) { + } else if (((s16)(*tingleMapSceneIds)[i]) < 0xE0) { index = 6; } gSaveContext.save.scenesVisible[index] = - gSaveContext.save.scenesVisible[index] | gBitFlags[(s16)(*tingleMapSceneIndices)[i] - (index << 5)]; + gSaveContext.save.scenesVisible[index] | gBitFlags[(s16)(*tingleMapSceneIds)[i] - (index << 5)]; i++; } - if ((*tingleMapSceneIndices) == sScenesPerTingleMap[0]) { + if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[0]) { gSaveContext.save.mapsVisible |= 3; - } else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[1]) { + } else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[1]) { gSaveContext.save.mapsVisible |= 0x1C; - } else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[2]) { + } else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[2]) { gSaveContext.save.mapsVisible |= 0xE0; - } else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[3]) { + } else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[3]) { gSaveContext.save.mapsVisible |= 0x100; - } else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[4]) { + } else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[4]) { gSaveContext.save.mapsVisible |= 0x1E00; - } else if ((*tingleMapSceneIndices) == sScenesPerTingleMap[5]) { + } else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[5]) { gSaveContext.save.mapsVisible |= 0x6000; } } diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 0195ac6508..e82e5d2b9c 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -2235,7 +2235,7 @@ void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* acto s32 i; gSaveContext.save.weekEventReg[92] |= 0x80; - cycleFlags = &gSaveContext.cycleSceneFlags[Play_GetOriginalSceneNumber(play->sceneNum)]; + cycleFlags = &gSaveContext.cycleSceneFlags[Play_GetOriginalSceneId(play->sceneId)]; bzero(actorCtx, sizeof(ActorContext)); ActorOverlayTable_Init(); @@ -2252,8 +2252,8 @@ void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* acto actorCtx->sceneFlags.chest = cycleFlags->chest; actorCtx->sceneFlags.switches[0] = cycleFlags->switch0; actorCtx->sceneFlags.switches[1] = cycleFlags->switch1; - if (play->sceneNum == SCENE_INISIE_R) { - cycleFlags = &gSaveContext.cycleSceneFlags[play->sceneNum]; + if (play->sceneId == SCENE_INISIE_R) { + cycleFlags = &gSaveContext.cycleSceneFlags[play->sceneId]; } actorCtx->sceneFlags.collectible[0] = cycleFlags->collectible; actorCtx->sceneFlags.clearedRoom = cycleFlags->clearedRoom; diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c index f9b23ac791..130fdc9706 100644 --- a/src/code/z_bgcheck.c +++ b/src/code/z_bgcheck.c @@ -47,7 +47,7 @@ u8 D_801B46C0[] = { /* 0x0E */ 1 }; -s16 sSmallMemScenes[] = { +s16 sSmallMemSceneIds[] = { SCENE_F01, }; @@ -1463,10 +1463,10 @@ u32 BgCheck_InitStaticLookup(CollisionContext* colCtx, PlayState* play, StaticLo * Returns whether the current scene should reserve less memory for it's collision lookup */ s32 BgCheck_IsSmallMemScene(PlayState* play) { - s16* i; + s16* sceneId; - for (i = sSmallMemScenes; i < sSmallMemScenes + ARRAY_COUNT(sSmallMemScenes); i++) { - if (play->sceneNum == *i) { + for (sceneId = sSmallMemSceneIds; sceneId < sSmallMemSceneIds + ARRAY_COUNT(sSmallMemSceneIds); sceneId++) { + if (play->sceneId == *sceneId) { return true; } } @@ -1505,7 +1505,7 @@ s32 BgCheck_GetSpecialSceneMaxObjects(PlayState* play, s32* maxNodes, s32* maxPo s32 i; for (i = 0; i < ARRAY_COUNT(sCustomDynapolyMem); i++) { - if (play->sceneNum == sCustomDynapolyMem[i].sceneId) { + if (play->sceneId == sCustomDynapolyMem[i].sceneId) { *maxNodes = sCustomDynapolyMem[i].maxNodes; *maxPolygons = sCustomDynapolyMem[i].maxPolygons; *maxVertices = sCustomDynapolyMem[i].maxVertices; @@ -1542,7 +1542,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader s32 useCustomSubdivisions; s32 i; - if (BgCheck_TryGetCustomMemsize(play->sceneNum, &customMemSize)) { + if (BgCheck_TryGetCustomMemsize(play->sceneId, &customMemSize)) { colCtx->memSize = customMemSize; } else { colCtx->memSize = 0x23000; @@ -1555,7 +1555,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader useCustomSubdivisions = false; for (i = 0; i < ARRAY_COUNT(sSceneSubdivisionList); i++) { - if (play->sceneNum == sSceneSubdivisionList[i].sceneId) { + if (play->sceneId == sSceneSubdivisionList[i].sceneId) { colCtx->subdivAmount.x = sSceneSubdivisionList[i].subdivAmount.x; colCtx->subdivAmount.y = sSceneSubdivisionList[i].subdivAmount.y; colCtx->subdivAmount.z = sSceneSubdivisionList[i].subdivAmount.z; diff --git a/src/code/z_elf_message.c b/src/code/z_elf_message.c index 25d6f8ca89..11e4a2743c 100644 --- a/src/code/z_elf_message.c +++ b/src/code/z_elf_message.c @@ -20,7 +20,7 @@ u16 ElfMessage_GetFirstCycleHint(PlayState* play) { if (gSaveContext.save.weekEventReg[9] & 1) { return 0x21E; } - if (play->sceneNum == SCENE_YOUSEI_IZUMI) { + if (play->sceneId == SCENE_YOUSEI_IZUMI) { return 0; } return 0x21D; @@ -29,7 +29,7 @@ u16 ElfMessage_GetFirstCycleHint(PlayState* play) { return 0x21F; } if (INV_CONTENT(ITEM_DEED_LAND) == ITEM_DEED_LAND) { - if (play->sceneNum != SCENE_OKUJOU) { + if (play->sceneId != SCENE_OKUJOU) { return 0x244; } return 0; diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c index ffad44e6ed..2b5eb1aac9 100644 --- a/src/code/z_map_exp.c +++ b/src/code/z_map_exp.c @@ -5,7 +5,7 @@ s16 sMinimapInitPosX = 0; s16 sMinimapInitPosZ = 0; s16 sMinimapInitDir = 0; -s32 sDungeonAndBossScenes[] = { +s32 sDungeonAndBossSceneIds[] = { SCENE_MITURIN, SCENE_HAKUGIN, SCENE_SEA, SCENE_INISIE_N, SCENE_INISIE_R, SCENE_MITURIN_BS, SCENE_HAKUGIN_BS, SCENE_SEA_BS, SCENE_INISIE_BS, }; @@ -17,8 +17,8 @@ s32 sDungeonAndBossScenes[] = { s32 Map_GetDungeonOrBossAreaIndex(PlayState* play) { s32 i; - for (i = 0; i < ARRAY_COUNT(sDungeonAndBossScenes); i++) { - if (Play_GetOriginalSceneNumber(play->sceneNum) == sDungeonAndBossScenes[i]) { + for (i = 0; i < ARRAY_COUNT(sDungeonAndBossSceneIds); i++) { + if (Play_GetOriginalSceneId(play->sceneId) == sDungeonAndBossSceneIds[i]) { return i; } } @@ -45,7 +45,7 @@ s32 func_8010A0A4(PlayState* play) { return true; } -s32 sDungeonScenes[] = { +s32 sDungeonSceneIds[] = { SCENE_MITURIN, SCENE_HAKUGIN, SCENE_SEA, SCENE_INISIE_N, SCENE_INISIE_R, }; @@ -56,8 +56,8 @@ s32 sDungeonScenes[] = { s32 Map_GetDungeonAreaIndex(PlayState* play) { s32 i; - for (i = 0; i < ARRAY_COUNT(sDungeonScenes); i++) { - if (Play_GetOriginalSceneNumber(play->sceneNum) == sDungeonScenes[i]) { + for (i = 0; i < ARRAY_COUNT(sDungeonSceneIds); i++) { + if (Play_GetOriginalSceneId(play->sceneId) == sDungeonSceneIds[i]) { return i; } } @@ -76,7 +76,7 @@ s32 Map_IsInDungeonArea(PlayState* play) { return true; } -s32 sBossScenes[] = { +s32 sBossSceneIds[] = { SCENE_MITURIN_BS, // DUNGEON_INDEX_WOODFALL_TEMPLE SCENE_HAKUGIN_BS, // DUNGEON_INDEX_SNOWHEAD_TEMPLE SCENE_SEA_BS, // DUNGEON_INDEX_GREAT_BAY_TEMPLE @@ -90,8 +90,8 @@ s32 sBossScenes[] = { s32 Map_GetBossAreaIndex(PlayState* play) { s32 i; - for (i = 0; i < ARRAY_COUNT(sBossScenes); i++) { - if (Play_GetOriginalSceneNumber(play->sceneNum) == sBossScenes[i]) { + for (i = 0; i < ARRAY_COUNT(sBossSceneIds); i++) { + if (Play_GetOriginalSceneId(play->sceneId) == sBossSceneIds[i]) { return i; } } @@ -120,7 +120,7 @@ s32 func_8010A238(PlayState* play) { s32 i; for (i = 0; i < ARRAY_COUNT(D_801BF5A4); i++) { - if (Play_GetOriginalSceneNumber(play->sceneNum) == D_801BF5A4[i]) { + if (Play_GetOriginalSceneId(play->sceneId) == D_801BF5A4[i]) { return i; } } @@ -156,7 +156,7 @@ void Map_InitRoomData(PlayState* play, s16 room) { if (room >= 0) { if (Map_IsInDungeonOrBossArea(play)) { - gSaveContext.save.permanentSceneFlags[Play_GetOriginalSceneNumber(play->sceneNum)].rooms |= gBitFlags[room]; + gSaveContext.save.permanentSceneFlags[Play_GetOriginalSceneId(play->sceneId)].rooms |= gBitFlags[room]; interfaceCtx->mapRoomNum = room; interfaceCtx->dungeonOrBossAreaMapIndex = mapIndex; } @@ -189,7 +189,7 @@ void Map_Init(PlayState* play) { if (Map_IsInDungeonOrBossArea(play)) { dungeonIndex = Map_GetDungeonOrBossAreaIndex(play); gSaveContext.mapIndex = dungeonIndex; - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_MITURIN_BS: dungeonIndex = DUNGEON_INDEX_WOODFALL_TEMPLE; break; @@ -243,7 +243,7 @@ void Map_Update(PlayState* play) { if (Map_IsInDungeonArea(play)) { floor = func_80109124(player->actor.world.pos.y); if (floor != -1) { - gSaveContext.save.permanentSceneFlags[Play_GetOriginalSceneNumber(play->sceneNum)].unk_14 |= + gSaveContext.save.permanentSceneFlags[Play_GetOriginalSceneId(play->sceneId)].unk_14 |= gBitFlags[FLOOR_INDEX_MAX - floor]; XREG(94) = FLOOR_INDEX_MAX - floor; if (interfaceCtx->mapRoomNum != sLastRoomNum) { diff --git a/src/code/z_message.c b/src/code/z_message.c index 4b4ac82a51..cb00d8cd2e 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -267,7 +267,7 @@ void func_8014D62C(PlayState* play, s32* arg1, f32* arg2, s16* arg3) { s16 phi_v0; s16 phi_s0; - if ((func_8010A0A4(play) != 0) || (play->sceneNum == 0x4F)) { + if ((func_8010A0A4(play) != 0) || (play->sceneId == SCENE_SECOM)) { phi_v0 = 0xA; } else { phi_v0 = pauseCtx->cursorPoint[PAUSE_WORLD_MAP]; diff --git a/src/code/z_message_nes.c b/src/code/z_message_nes.c index 1ac301f207..fef293b46f 100644 --- a/src/code/z_message_nes.c +++ b/src/code/z_message_nes.c @@ -254,7 +254,7 @@ void Message_LoadAreaTextNES(PlayState* play, s32* offset, f32* arg2, s16* decod s16 currentArea; s16 stringLimit; - if ((func_8010A0A4(play) != 0) || (play->sceneNum == SCENE_SECOM)) { + if ((func_8010A0A4(play) != 0) || (play->sceneId == SCENE_SECOM)) { currentArea = 10; } else { currentArea = play->pauseCtx.cursorPoint[PAUSE_WORLD_MAP]; diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index ef108c43aa..eb110c0c7d 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -621,7 +621,7 @@ void Interface_UpdateHudAlphas(PlayState* play, s16 dimmingAlpha) { interfaceCtx->magicAlpha = risingAlpha; } - if (play->sceneNum == SCENE_SPOT00) { + if (play->sceneId == SCENE_SPOT00) { if (interfaceCtx->minimapAlpha < 170) { interfaceCtx->minimapAlpha = risingAlpha; } else { @@ -1173,7 +1173,7 @@ u8 Item_Give(PlayState* play, u8 item) { if (item == ITEM_SKULL_TOKEN) { SET_QUEST_ITEM(item - ITEM_SKULL_TOKEN + QUEST_SKULL_TOKEN); - Inventory_IncrementSkullTokenCount(play->sceneNum); + Inventory_IncrementSkullTokenCount(play->sceneId); return ITEM_NONE; } else if (item == ITEM_TINGLE_MAP) { @@ -2863,7 +2863,7 @@ void Interface_DrawTimers(PlayState* play) { if (sTimerId == TIMER_ID_MOON_CRASH) { gSaveContext.save.day = 4; - if ((play->sceneNum == SCENE_OKUJOU) && (gSaveContext.sceneSetupIndex == 3)) { + if ((play->sceneId == SCENE_OKUJOU) && (gSaveContext.sceneSetupIndex == 3)) { play->nextEntrance = ENTRANCE(TERMINA_FIELD, 1); gSaveContext.nextCutsceneIndex = 0xFFF0; play->transitionTrigger = TRANS_TRIGGER_START; @@ -2892,7 +2892,7 @@ void Interface_DrawTimers(PlayState* play) { gSaveContext.timerStopTimes[sTimerId] = SECONDS_TO_TIMER(120); gSaveContext.timerCurTimes[sTimerId] = SECONDS_TO_TIMER(120); } - } else if ((gSaveContext.eventInf[3] & 0x10) && (play->sceneNum == SCENE_DEKUTES) && + } else if ((gSaveContext.eventInf[3] & 0x10) && (play->sceneId == SCENE_DEKUTES) && (gSaveContext.timerStopTimes[sTimerId] >= SECONDS_TO_TIMER(120))) { gSaveContext.timerCurTimes[sTimerId] = SECONDS_TO_TIMER(120); } @@ -3001,7 +3001,7 @@ void Interface_DrawTimers(PlayState* play) { if (osTime >= SECONDS_TO_TIMER(120)) { osTime = SECONDS_TO_TIMER(120); } - } else if ((gSaveContext.eventInf[3] & 0x10) && (play->sceneNum == SCENE_DEKUTES) && + } else if ((gSaveContext.eventInf[3] & 0x10) && (play->sceneId == SCENE_DEKUTES) && (osTime >= SECONDS_TO_TIMER(120))) { osTime = SECONDS_TO_TIMER(120); } @@ -3018,7 +3018,7 @@ void Interface_DrawTimers(PlayState* play) { play_sound(NA_SE_SY_WARNING_COUNT_E); sTimerBeepSfxSeconds = sTimerDigits[4]; } - } else if ((gSaveContext.eventInf[3] & 0x10) && (play->sceneNum == SCENE_DEKUTES)) { + } else if ((gSaveContext.eventInf[3] & 0x10) && (play->sceneId == SCENE_DEKUTES)) { if ((((void)0, gSaveContext.timerCurTimes[sTimerId]) > (gSaveContext.save.dekuPlaygroundHighScores[CURRENT_DAY - 1] - SECONDS_TO_TIMER(9))) && (sTimerBeepSfxSeconds != sTimerDigits[4])) { @@ -3056,7 +3056,7 @@ void Interface_DrawTimers(PlayState* play) { } else { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, 255); } - } else if ((gSaveContext.eventInf[3] & 0x10) && (play->sceneNum == SCENE_DEKUTES)) { + } else if ((gSaveContext.eventInf[3] & 0x10) && (play->sceneId == SCENE_DEKUTES)) { if (((void)0, gSaveContext.timerCurTimes[sTimerId]) >= gSaveContext.save.dekuPlaygroundHighScores[CURRENT_DAY - 1]) { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 50, 0, 255); diff --git a/src/code/z_play.c b/src/code/z_play.c index 5a60a615e2..bb04f23c00 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -302,38 +302,38 @@ Vec3s* Play_GetActorCsCamFuncData(PlayState* this, s32 csCamDataIndex) { * Converts the number of a scene to its "original" equivalent, the default version of the area which the player first * enters. */ -s16 Play_GetOriginalSceneNumber(s16 sceneNum) { +s16 Play_GetOriginalSceneId(s16 sceneId) { // Inverted Stone Tower Temple -> Stone Tower Temple - if (sceneNum == SCENE_INISIE_R) { + if (sceneId == SCENE_INISIE_R) { return SCENE_INISIE_N; } // Purified Southern Swamp -> Poisoned Sothern Swamp - if (sceneNum == SCENE_20SICHITAI2) { + if (sceneId == SCENE_20SICHITAI2) { return SCENE_20SICHITAI; } // Spring Mountain Village -> Winter Mountain Village - if (sceneNum == SCENE_10YUKIYAMANOMURA2) { + if (sceneId == SCENE_10YUKIYAMANOMURA2) { return SCENE_10YUKIYAMANOMURA; } // Spring Goron Village -> Winter Goron Village - if (sceneNum == SCENE_11GORONNOSATO2) { + if (sceneId == SCENE_11GORONNOSATO2) { return SCENE_11GORONNOSATO; } // Spring Path to Goron Village -> Winter Path to Goron Village - if (sceneNum == SCENE_17SETUGEN2) { + if (sceneId == SCENE_17SETUGEN2) { return SCENE_17SETUGEN; } // Inverted Stone Tower -> Stone Tower - if (sceneNum == SCENE_F41) { + if (sceneId == SCENE_F41) { return SCENE_F40; } - return sceneNum; + return sceneId; } /** @@ -344,13 +344,13 @@ void Play_SaveCycleSceneFlags(GameState* thisx) { PlayState* this = (PlayState*)thisx; CycleSceneFlags* cycleSceneFlags; - cycleSceneFlags = &gSaveContext.cycleSceneFlags[Play_GetOriginalSceneNumber(this->sceneNum)]; + cycleSceneFlags = &gSaveContext.cycleSceneFlags[Play_GetOriginalSceneId(this->sceneId)]; cycleSceneFlags->chest = this->actorCtx.sceneFlags.chest; cycleSceneFlags->switch0 = this->actorCtx.sceneFlags.switches[0]; cycleSceneFlags->switch1 = this->actorCtx.sceneFlags.switches[1]; - if (this->sceneNum == SCENE_INISIE_R) { // Inverted Stone Tower Temple - cycleSceneFlags = &gSaveContext.cycleSceneFlags[this->sceneNum]; + if (this->sceneId == SCENE_INISIE_R) { // Inverted Stone Tower Temple + cycleSceneFlags = &gSaveContext.cycleSceneFlags[this->sceneId]; } cycleSceneFlags->collectible = this->actorCtx.sceneFlags.collectible[0]; @@ -375,7 +375,7 @@ void Play_SetupRespawnPoint(GameState* thisx, s32 respawnMode, s32 playerParams) PlayState* this = (PlayState*)thisx; Player* player = GET_PLAYER(this); - if (this->sceneNum != SCENE_KAKUSIANA) { // Grottos + if (this->sceneId != SCENE_KAKUSIANA) { // Grottos Play_SetRespawnData(&this->state, respawnMode, (u16)((void)0, gSaveContext.save.entrance), this->roomCtx.curRoom.num, playerParams, &player->actor.world.pos, player->actor.shape.rot.y); @@ -384,7 +384,7 @@ void Play_SetupRespawnPoint(GameState* thisx, s32 respawnMode, s32 playerParams) // Override respawn data in Sakon's Hideout void func_80169ECC(PlayState* this) { - if (this->sceneNum == SCENE_SECOM) { + if (this->sceneId == SCENE_SECOM) { this->nextEntrance = ENTRANCE(IKANA_CANYON, 6); gSaveContext.respawnFlag = -7; } diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 3da84fe780..0888be7c53 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -30,7 +30,7 @@ void func_80127B64(struct_801F58B0 arg0[], UNK_TYPE arg1, Vec3f* arg2); s32 func_801226E0(PlayState* play, s32 arg1) { if (arg1 == 0) { Play_SetupRespawnPoint(&play->state, RESPAWN_MODE_DOWN, 0xBFF); - if (play->sceneNum == SCENE_KAKUSIANA) { + if (play->sceneId == SCENE_KAKUSIANA) { return 1; } } diff --git a/src/code/z_room.c b/src/code/z_room.c index e0c2a035d9..e198e95ed3 100644 --- a/src/code/z_room.c +++ b/src/code/z_room.c @@ -111,8 +111,7 @@ s32 Room_HandleLoadCallbacks(PlayState* play, RoomContext* roomCtx) { func_80123140(play, GET_PLAYER(play)); Actor_SpawnTransitionActors(play, &play->actorCtx); - if (((play->sceneNum != SCENE_IKANA) || (roomCtx->curRoom.num != 1)) && - (play->sceneNum != SCENE_IKNINSIDE)) { + if (((play->sceneId != SCENE_IKANA) || (roomCtx->curRoom.num != 1)) && (play->sceneId != SCENE_IKNINSIDE)) { play->envCtx.lightSettingOverride = 0xFF; play->envCtx.unk_E0 = 0; } diff --git a/src/code/z_scene.c b/src/code/z_scene.c index 75616e8a50..a3a4e331dd 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -28,12 +28,12 @@ void Object_InitBank(GameState* gameState, ObjectContext* objectCtx) { u32 spaceSize; s32 i; - if (play->sceneNum == SCENE_CLOCKTOWER || play->sceneNum == SCENE_TOWN || play->sceneNum == SCENE_BACKTOWN || - play->sceneNum == SCENE_ICHIBA) { + if (play->sceneId == SCENE_CLOCKTOWER || play->sceneId == SCENE_TOWN || play->sceneId == SCENE_BACKTOWN || + play->sceneId == SCENE_ICHIBA) { spaceSize = OBJECT_SPACE_SIZE_CLOCK_TOWN; - } else if (play->sceneNum == SCENE_MILK_BAR) { + } else if (play->sceneId == SCENE_MILK_BAR) { spaceSize = OBJECT_SPACE_SIZE_MILK_BAR; - } else if (play->sceneNum == SCENE_00KEIKOKU) { + } else if (play->sceneId == SCENE_00KEIKOKU) { spaceSize = OBJECT_SPACE_SIZE_TERMINA_FIELD; } else { spaceSize = OBJECT_SPACE_SIZE_DEFAULT; @@ -497,23 +497,23 @@ void Scene_HeaderCmdSetAreaVisitedFlag(PlayState* play, SceneCmd* cmd) { s16 i = 0; while (true) { - if (gScenesPerRegion[i][j] == 0xFFFF) { + if (gSceneIdsPerRegion[i][j] == 0xFFFF) { i++; j = 0; - if (i == ARRAY_COUNT(gScenesPerRegion)) { + if (i == ARRAY_COUNT(gSceneIdsPerRegion)) { break; } } - if (play->sceneNum == gScenesPerRegion[i][j]) { + if (play->sceneId == gSceneIdsPerRegion[i][j]) { break; } j++; } - if (i < ARRAY_COUNT(gScenesPerRegion)) { + if (i < ARRAY_COUNT(gSceneIdsPerRegion)) { gSaveContext.save.mapsVisited = (gBitFlags[i] | gSaveContext.save.mapsVisited) | gSaveContext.save.mapsVisited; } } diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index 108689978a..ed45499663 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -123,15 +123,15 @@ SceneTableEntry gSceneTable[] = { }; static EntranceTableEntry sMayorsResidenceEntrance0[] = { - { 0x12, 0x00, 0x4102 }, + { SCENE_SONCHONOIE, 0, 0x4102 }, }; static EntranceTableEntry sMayorsResidenceEntrance1[] = { - { 0x12, 0x01, 0x4102 }, + { SCENE_SONCHONOIE, 1, 0x4102 }, }; static EntranceTableEntry sMayorsResidenceEntrance2[] = { - { 0x12, 0x02, 0x4102 }, + { SCENE_SONCHONOIE, 2, 0x4102 }, }; static EntranceTableEntry* sMayorsResidenceEntranceTable[] = { @@ -141,7 +141,7 @@ static EntranceTableEntry* sMayorsResidenceEntranceTable[] = { }; static EntranceTableEntry sMajorasLairEntrance0[] = { - { 0xF5, 0x00, 0x0387 }, + { -SCENE_LAST_BS, 0, 0x0387 }, }; static EntranceTableEntry* sMajorasLairEntranceTable[] = { @@ -149,7 +149,7 @@ static EntranceTableEntry* sMajorasLairEntranceTable[] = { }; static EntranceTableEntry sMagicHagsPotionShopEntrance0[] = { - { 0x0A, 0x00, 0x4102 }, + { SCENE_WITCH_SHOP, 0, 0x4102 }, }; static EntranceTableEntry* sMagicHagsPotionShopEntranceTable[] = { @@ -157,11 +157,11 @@ static EntranceTableEntry* sMagicHagsPotionShopEntranceTable[] = { }; static EntranceTableEntry sRanchHouseEntrance0[] = { - { 0x10, 0x00, 0x0102 }, + { SCENE_OMOYA, 0, 0x0102 }, }; static EntranceTableEntry sRanchHouseEntrance1[] = { - { 0x10, 0x01, 0x4102 }, + { SCENE_OMOYA, 1, 0x4102 }, }; static EntranceTableEntry* sRanchHouseEntranceTable[] = { @@ -170,7 +170,7 @@ static EntranceTableEntry* sRanchHouseEntranceTable[] = { }; static EntranceTableEntry sHoneyAndDarlingsShopEntrance0[] = { - { 0x11, 0x00, 0x4102 }, + { SCENE_BOWLING, 0, 0x4102 }, }; static EntranceTableEntry* sHoneyAndDarlingsShopEntranceTable[] = { @@ -178,11 +178,11 @@ static EntranceTableEntry* sHoneyAndDarlingsShopEntranceTable[] = { }; static EntranceTableEntry sBeneathTheGraveryardEntrance0[] = { - { 0xF4, 0x00, 0x4102 }, + { -SCENE_HAKASHITA, 0, 0x4102 }, }; static EntranceTableEntry sBeneathTheGraveryardEntrance1[] = { - { 0xF4, 0x01, 0x4102 }, + { -SCENE_HAKASHITA, 1, 0x4102 }, }; static EntranceTableEntry* sBeneathTheGraveryardEntranceTable[] = { @@ -191,47 +191,47 @@ static EntranceTableEntry* sBeneathTheGraveryardEntranceTable[] = { }; static EntranceTableEntry sSouthernSwampClearedEntrance0[] = { - { 0x00, 0x00, 0xCA14 }, + { SCENE_20SICHITAI2, 0, 0xCA14 }, }; static EntranceTableEntry sSouthernSwampClearedEntrance1[] = { - { 0x00, 0x01, 0x4102 }, + { SCENE_20SICHITAI2, 1, 0x4102 }, }; static EntranceTableEntry sSouthernSwampClearedEntrance2[] = { - { 0x00, 0x02, 0xC102 }, + { SCENE_20SICHITAI2, 2, 0xC102 }, }; static EntranceTableEntry sSouthernSwampClearedEntrance3[] = { - { 0x00, 0x03, 0x4102 }, + { SCENE_20SICHITAI2, 3, 0x4102 }, }; static EntranceTableEntry sSouthernSwampClearedEntrance4[] = { - { 0x00, 0x04, 0x4102 }, + { SCENE_20SICHITAI2, 4, 0x4102 }, }; static EntranceTableEntry sSouthernSwampClearedEntrance5[] = { - { 0x00, 0x05, 0x4102 }, + { SCENE_20SICHITAI2, 5, 0x4102 }, }; static EntranceTableEntry sSouthernSwampClearedEntrance6[] = { - { 0x00, 0x06, 0x0102 }, + { SCENE_20SICHITAI2, 6, 0x0102 }, }; static EntranceTableEntry sSouthernSwampClearedEntrance7[] = { - { 0x00, 0x07, 0x4102 }, + { SCENE_20SICHITAI2, 7, 0x4102 }, }; static EntranceTableEntry sSouthernSwampClearedEntrance8[] = { - { 0x00, 0x08, 0x4102 }, + { SCENE_20SICHITAI2, 8, 0x4102 }, }; static EntranceTableEntry sSouthernSwampClearedEntrance9[] = { - { 0x00, 0x09, 0x4A14 }, + { SCENE_20SICHITAI2, 9, 0x4A14 }, }; static EntranceTableEntry sSouthernSwampClearedEntrance10[] = { - { 0x00, 0x0A, 0x4A14 }, + { SCENE_20SICHITAI2, 10, 0x4A14 }, }; static EntranceTableEntry* sSouthernSwampClearedEntranceTable[] = { @@ -242,19 +242,19 @@ static EntranceTableEntry* sSouthernSwampClearedEntranceTable[] = { }; static EntranceTableEntry sCuriosityShopEntrance0[] = { - { 0x0D, 0x00, 0x4102 }, + { SCENE_AYASHIISHOP, 0, 0x4102 }, }; static EntranceTableEntry sCuriosityShopEntrance1[] = { - { 0x0D, 0x01, 0x0102 }, + { SCENE_AYASHIISHOP, 1, 0x0102 }, }; static EntranceTableEntry sCuriosityShopEntrance2[] = { - { 0x0D, 0x02, 0x8A95 }, + { SCENE_AYASHIISHOP, 2, 0x8A95 }, }; static EntranceTableEntry sCuriosityShopEntrance3[] = { - { 0x0D, 0x03, 0x8102 }, + { SCENE_AYASHIISHOP, 3, 0x8102 }, }; static EntranceTableEntry* sCuriosityShopEntranceTable[] = { @@ -265,113 +265,113 @@ static EntranceTableEntry* sCuriosityShopEntranceTable[] = { }; static EntranceTableEntry sIkanaCanyonEntrance0[] = { - { 0x13, 0x00, 0xCA14 }, { 0x13, 0x00, 0x8A14 }, { 0x13, 0x00, 0x0A14 }, - { 0x13, 0x00, 0x4A14 }, { 0x13, 0x00, 0x8102 }, + { SCENE_IKANA, 0, 0xCA14 }, { SCENE_IKANA, 0, 0x8A14 }, { SCENE_IKANA, 0, 0x0A14 }, + { SCENE_IKANA, 0, 0x4A14 }, { SCENE_IKANA, 0, 0x8102 }, }; static EntranceTableEntry sIkanaCanyonEntrance1[] = { - { 0x13, 0x01, 0x4102 }, - { 0x13, 0x01, 0x4102 }, - { 0x13, 0x01, 0xCA14 }, - { 0x13, 0x01, 0x4102 }, + { SCENE_IKANA, 1, 0x4102 }, + { SCENE_IKANA, 1, 0x4102 }, + { SCENE_IKANA, 1, 0xCA14 }, + { SCENE_IKANA, 1, 0x4102 }, }; static EntranceTableEntry sIkanaCanyonEntrance2[] = { - { 0x13, 0x02, 0x4102 }, - { 0x13, 0x02, 0x4102 }, - { 0x13, 0x02, 0x4102 }, - { 0x13, 0x02, 0x4102 }, + { SCENE_IKANA, 2, 0x4102 }, + { SCENE_IKANA, 2, 0x4102 }, + { SCENE_IKANA, 2, 0x4102 }, + { SCENE_IKANA, 2, 0x4102 }, }; static EntranceTableEntry sIkanaCanyonEntrance3[] = { - { 0x13, 0x03, 0x4102 }, - { 0x13, 0x03, 0x4102 }, - { 0x13, 0x03, 0x4102 }, - { 0x13, 0x03, 0x4102 }, + { SCENE_IKANA, 3, 0x4102 }, + { SCENE_IKANA, 3, 0x4102 }, + { SCENE_IKANA, 3, 0x4102 }, + { SCENE_IKANA, 3, 0x4102 }, }; static EntranceTableEntry sIkanaCanyonEntrance4[] = { - { 0x13, 0x04, 0x4A14 }, - { 0x13, 0x04, 0x4A14 }, - { 0x13, 0x04, 0x4A14 }, - { 0x13, 0x04, 0x4A14 }, + { SCENE_IKANA, 4, 0x4A14 }, + { SCENE_IKANA, 4, 0x4A14 }, + { SCENE_IKANA, 4, 0x4A14 }, + { SCENE_IKANA, 4, 0x4A14 }, }; static EntranceTableEntry sIkanaCanyonEntrance5[] = { - { 0x13, 0x05, 0x4102 }, - { 0x13, 0x05, 0x4102 }, - { 0x13, 0x05, 0x4102 }, - { 0x13, 0x05, 0x4102 }, + { SCENE_IKANA, 5, 0x4102 }, + { SCENE_IKANA, 5, 0x4102 }, + { SCENE_IKANA, 5, 0x4102 }, + { SCENE_IKANA, 5, 0x4102 }, }; static EntranceTableEntry sIkanaCanyonEntrance6[] = { - { 0x13, 0x06, 0x4102 }, - { 0x13, 0x06, 0x4102 }, - { 0x13, 0x06, 0x4102 }, - { 0x13, 0x06, 0x4102 }, + { SCENE_IKANA, 6, 0x4102 }, + { SCENE_IKANA, 6, 0x4102 }, + { SCENE_IKANA, 6, 0x4102 }, + { SCENE_IKANA, 6, 0x4102 }, }; static EntranceTableEntry sIkanaCanyonEntrance7[] = { - { 0x13, 0x07, 0x4A14 }, - { 0x13, 0x07, 0x4A14 }, - { 0x13, 0x07, 0x4A14 }, - { 0x13, 0x07, 0x4A14 }, + { SCENE_IKANA, 7, 0x4A14 }, + { SCENE_IKANA, 7, 0x4A14 }, + { SCENE_IKANA, 7, 0x4A14 }, + { SCENE_IKANA, 7, 0x4A14 }, }; static EntranceTableEntry sIkanaCanyonEntrance8[] = { - { 0x13, 0x08, 0x4102 }, - { 0x13, 0x08, 0x4102 }, - { 0x13, 0x08, 0x4102 }, - { 0x13, 0x08, 0x4102 }, + { SCENE_IKANA, 8, 0x4102 }, + { SCENE_IKANA, 8, 0x4102 }, + { SCENE_IKANA, 8, 0x4102 }, + { SCENE_IKANA, 8, 0x4102 }, }; static EntranceTableEntry sIkanaCanyonEntrance9[] = { - { 0x13, 0x09, 0x4A14 }, - { 0x13, 0x09, 0x4A14 }, - { 0x13, 0x09, 0x4A14 }, - { 0x13, 0x09, 0x4A14 }, + { SCENE_IKANA, 9, 0x4A14 }, + { SCENE_IKANA, 9, 0x4A14 }, + { SCENE_IKANA, 9, 0x4A14 }, + { SCENE_IKANA, 9, 0x4A14 }, }; static EntranceTableEntry sIkanaCanyonEntrance10[] = { - { 0x13, 0x0A, 0x4A14 }, - { 0x13, 0x0A, 0x4A14 }, - { 0x13, 0x0A, 0x4A14 }, - { 0x13, 0x0A, 0x4A14 }, + { SCENE_IKANA, 10, 0x4A14 }, + { SCENE_IKANA, 10, 0x4A14 }, + { SCENE_IKANA, 10, 0x4A14 }, + { SCENE_IKANA, 10, 0x4A14 }, }; static EntranceTableEntry sIkanaCanyonEntrance11[] = { - { 0x13, 0x0B, 0x4102 }, - { 0x13, 0x0B, 0x4102 }, - { 0x13, 0x0B, 0x4102 }, - { 0x13, 0x0B, 0x4102 }, + { SCENE_IKANA, 11, 0x4102 }, + { SCENE_IKANA, 11, 0x4102 }, + { SCENE_IKANA, 11, 0x4102 }, + { SCENE_IKANA, 11, 0x4102 }, }; static EntranceTableEntry sIkanaCanyonEntrance12[] = { - { 0x13, 0x0C, 0x4102 }, - { 0x13, 0x0C, 0x4102 }, - { 0x13, 0x0C, 0x4102 }, - { 0x13, 0x0C, 0x4102 }, + { SCENE_IKANA, 12, 0x4102 }, + { SCENE_IKANA, 12, 0x4102 }, + { SCENE_IKANA, 12, 0x4102 }, + { SCENE_IKANA, 12, 0x4102 }, }; static EntranceTableEntry sIkanaCanyonEntrance13[] = { - { 0x13, 0x0D, 0x8102 }, - { 0x13, 0x0D, 0x8102 }, - { 0x13, 0x0D, 0x8102 }, - { 0x13, 0x0D, 0x8102 }, + { SCENE_IKANA, 13, 0x8102 }, + { SCENE_IKANA, 13, 0x8102 }, + { SCENE_IKANA, 13, 0x8102 }, + { SCENE_IKANA, 13, 0x8102 }, }; static EntranceTableEntry sIkanaCanyonEntrance14[] = { - { 0x13, 0x0E, 0x8102 }, - { 0x13, 0x0E, 0x8102 }, - { 0x13, 0x0E, 0x8102 }, - { 0x13, 0x0E, 0x8102 }, + { SCENE_IKANA, 14, 0x8102 }, + { SCENE_IKANA, 14, 0x8102 }, + { SCENE_IKANA, 14, 0x8102 }, + { SCENE_IKANA, 14, 0x8102 }, }; static EntranceTableEntry sIkanaCanyonEntrance15[] = { - { 0x13, 0x0F, 0x8102 }, - { 0x13, 0x0F, 0x8102 }, - { 0x13, 0x0F, 0x8102 }, - { 0x13, 0x0F, 0x0183 }, + { SCENE_IKANA, 15, 0x8102 }, + { SCENE_IKANA, 15, 0x8102 }, + { SCENE_IKANA, 15, 0x8102 }, + { SCENE_IKANA, 15, 0x0183 }, }; static EntranceTableEntry* sIkanaCanyonEntranceTable[] = { @@ -382,66 +382,66 @@ static EntranceTableEntry* sIkanaCanyonEntranceTable[] = { }; static EntranceTableEntry sPiratesFortressEntrance0[] = { - { 0x14, 0x00, 0x8102 }, - { 0x14, 0x00, 0x8102 }, - { 0x14, 0x00, 0x8102 }, + { SCENE_KAIZOKU, 0, 0x8102 }, + { SCENE_KAIZOKU, 0, 0x8102 }, + { SCENE_KAIZOKU, 0, 0x8102 }, }; static EntranceTableEntry sPiratesFortressEntrance1[] = { - { 0x14, 0x01, 0x8102 }, - { 0x14, 0x01, 0x8102 }, + { SCENE_KAIZOKU, 1, 0x8102 }, + { SCENE_KAIZOKU, 1, 0x8102 }, }; static EntranceTableEntry sPiratesFortressEntrance2[] = { - { 0x14, 0x02, 0x8102 }, + { SCENE_KAIZOKU, 2, 0x8102 }, }; static EntranceTableEntry sPiratesFortressEntrance3[] = { - { 0x14, 0x03, 0x8102 }, + { SCENE_KAIZOKU, 3, 0x8102 }, }; static EntranceTableEntry sPiratesFortressEntrance4[] = { - { 0x14, 0x04, 0x8102 }, + { SCENE_KAIZOKU, 4, 0x8102 }, }; static EntranceTableEntry sPiratesFortressEntrance5[] = { - { 0x14, 0x05, 0x8102 }, + { SCENE_KAIZOKU, 5, 0x8102 }, }; static EntranceTableEntry sPiratesFortressEntrance6[] = { - { 0x14, 0x06, 0x8102 }, + { SCENE_KAIZOKU, 6, 0x8102 }, }; static EntranceTableEntry sPiratesFortressEntrance7[] = { - { 0x14, 0x07, 0x8102 }, + { SCENE_KAIZOKU, 7, 0x8102 }, }; static EntranceTableEntry sPiratesFortressEntrance8[] = { - { 0x14, 0x08, 0x8102 }, + { SCENE_KAIZOKU, 8, 0x8102 }, }; static EntranceTableEntry sPiratesFortressEntrance9[] = { - { 0x14, 0x09, 0x8102 }, + { SCENE_KAIZOKU, 9, 0x8102 }, }; static EntranceTableEntry sPiratesFortressEntrance10[] = { - { 0x14, 0x0A, 0x8A95 }, + { SCENE_KAIZOKU, 10, 0x8A95 }, }; static EntranceTableEntry sPiratesFortressEntrance11[] = { - { 0x14, 0x0B, 0x8102 }, + { SCENE_KAIZOKU, 11, 0x8102 }, }; static EntranceTableEntry sPiratesFortressEntrance12[] = { - { 0x14, 0x0C, 0x8102 }, + { SCENE_KAIZOKU, 12, 0x8102 }, }; static EntranceTableEntry sPiratesFortressEntrance13[] = { - { 0x14, 0x0D, 0x8102 }, + { SCENE_KAIZOKU, 13, 0x8102 }, }; static EntranceTableEntry sPiratesFortressEntrance14[] = { - { 0x14, 0x0E, 0x8102 }, + { SCENE_KAIZOKU, 14, 0x8102 }, }; static EntranceTableEntry* sPiratesFortressEntranceTable[] = { @@ -452,8 +452,8 @@ static EntranceTableEntry* sPiratesFortressEntranceTable[] = { }; static EntranceTableEntry sMilkBarEntrance0[] = { - { 0x15, 0x00, 0x4102 }, { 0x15, 0x00, 0x8102 }, { 0x15, 0x00, 0x8102 }, - { 0x15, 0x00, 0x8102 }, { 0x15, 0x00, 0x8102 }, + { SCENE_MILK_BAR, 0, 0x4102 }, { SCENE_MILK_BAR, 0, 0x8102 }, { SCENE_MILK_BAR, 0, 0x8102 }, + { SCENE_MILK_BAR, 0, 0x8102 }, { SCENE_MILK_BAR, 0, 0x8102 }, }; static EntranceTableEntry* sMilkBarEntranceTable[] = { @@ -461,11 +461,11 @@ static EntranceTableEntry* sMilkBarEntranceTable[] = { }; static EntranceTableEntry sStoneTowerTempleEntrance0[] = { - { 0xEA, 0x00, 0xC102 }, + { -SCENE_INISIE_N, 0, 0xC102 }, }; static EntranceTableEntry sStoneTowerTempleEntrance1[] = { - { 0xEA, 0x01, 0x4102 }, + { -SCENE_INISIE_N, 1, 0x4102 }, }; static EntranceTableEntry* sStoneTowerTempleEntranceTable[] = { @@ -474,11 +474,11 @@ static EntranceTableEntry* sStoneTowerTempleEntranceTable[] = { }; static EntranceTableEntry sTreasureChestShopEntrance0[] = { - { 0x17, 0x00, 0x4102 }, + { SCENE_TAKARAYA, 0, 0x4102 }, }; static EntranceTableEntry sTreasureChestShopEntrance1[] = { - { 0x17, 0x01, 0x0102 }, + { SCENE_TAKARAYA, 1, 0x0102 }, }; static EntranceTableEntry* sTreasureChestShopEntranceTable[] = { @@ -487,15 +487,15 @@ static EntranceTableEntry* sTreasureChestShopEntranceTable[] = { }; static EntranceTableEntry sStoneTowerTempleInvertedEntrance0[] = { - { 0xE8, 0x00, 0xC102 }, + { -SCENE_INISIE_R, 0, 0xC102 }, }; static EntranceTableEntry sStoneTowerTempleInvertedEntrance1[] = { - { 0xE8, 0x01, 0x8102 }, + { -SCENE_INISIE_R, 1, 0x8102 }, }; static EntranceTableEntry sStoneTowerTempleInvertedEntrance2[] = { - { 0xE8, 0x02, 0x8102 }, + { -SCENE_INISIE_R, 2, 0x8102 }, }; static EntranceTableEntry* sStoneTowerTempleInvertedEntranceTable[] = { @@ -505,22 +505,22 @@ static EntranceTableEntry* sStoneTowerTempleInvertedEntranceTable[] = { }; static EntranceTableEntry sClockTowerRooftopEntrance0[] = { - { 0xE7, 0x00, 0x0102 }, - { 0xE7, 0x00, 0x8102 }, - { 0xE7, 0x00, 0x0102 }, - { 0xE7, 0x00, 0x0102 }, + { -SCENE_OKUJOU, 0, 0x0102 }, + { -SCENE_OKUJOU, 0, 0x8102 }, + { -SCENE_OKUJOU, 0, 0x0102 }, + { -SCENE_OKUJOU, 0, 0x0102 }, }; static EntranceTableEntry sClockTowerRooftopEntrance1[] = { - { 0xE7, 0x01, 0x0102 }, - { 0xE7, 0x01, 0x0102 }, - { 0xE7, 0x01, 0x0102 }, + { -SCENE_OKUJOU, 1, 0x0102 }, + { -SCENE_OKUJOU, 1, 0x0102 }, + { -SCENE_OKUJOU, 1, 0x0102 }, }; static EntranceTableEntry sClockTowerRooftopEntrance2[] = { - { 0xE7, 0x02, 0x858B }, - { 0xE7, 0x02, 0x858B }, - { 0xE7, 0x02, 0x8102 }, + { -SCENE_OKUJOU, 2, 0x858B }, + { -SCENE_OKUJOU, 2, 0x858B }, + { -SCENE_OKUJOU, 2, 0x8102 }, }; static EntranceTableEntry* sClockTowerRooftopEntranceTable[] = { @@ -530,24 +530,24 @@ static EntranceTableEntry* sClockTowerRooftopEntranceTable[] = { }; static EntranceTableEntry sOpeningDungeonEntrance0[] = { - { 0xE6, 0x00, 0x0102 }, - { 0xE6, 0x00, 0x8102 }, + { -SCENE_OPENINGDAN, 0, 0x0102 }, + { -SCENE_OPENINGDAN, 0, 0x8102 }, }; static EntranceTableEntry sOpeningDungeonEntrance1[] = { - { 0xE6, 0x01, 0x0102 }, + { -SCENE_OPENINGDAN, 1, 0x0102 }, }; static EntranceTableEntry sOpeningDungeonEntrance2[] = { - { 0xE6, 0x02, 0x0102 }, + { -SCENE_OPENINGDAN, 2, 0x0102 }, }; static EntranceTableEntry sOpeningDungeonEntrance3[] = { - { 0xE6, 0x03, 0x0102 }, + { -SCENE_OPENINGDAN, 3, 0x0102 }, }; static EntranceTableEntry sOpeningDungeonEntrance4[] = { - { 0xE6, 0x04, 0x058B }, + { -SCENE_OPENINGDAN, 4, 0x058B }, }; static EntranceTableEntry* sOpeningDungeonEntranceTable[] = { @@ -556,15 +556,15 @@ static EntranceTableEntry* sOpeningDungeonEntranceTable[] = { }; static EntranceTableEntry sWoodfallTempleEntrance0[] = { - { 0xE5, 0x00, 0x4102 }, + { -SCENE_MITURIN, 0, 0x4102 }, }; static EntranceTableEntry sWoodfallTempleEntrance1[] = { - { 0xE5, 0x01, 0x0102 }, + { -SCENE_MITURIN, 1, 0x0102 }, }; static EntranceTableEntry sWoodfallTempleEntrance2[] = { - { 0xE5, 0x02, 0x0102 }, + { -SCENE_MITURIN, 2, 0x0102 }, }; static EntranceTableEntry* sWoodfallTempleEntranceTable[] = { @@ -574,13 +574,13 @@ static EntranceTableEntry* sWoodfallTempleEntranceTable[] = { }; static EntranceTableEntry sPathToMountainVillageEntrance0[] = { - { 0x1C, 0x00, 0x8A14 }, - { 0x1C, 0x00, 0x8A14 }, + { SCENE_13HUBUKINOMITI, 0, 0x8A14 }, + { SCENE_13HUBUKINOMITI, 0, 0x8A14 }, }; static EntranceTableEntry sPathToMountainVillageEntrance1[] = { - { 0x1C, 0x01, 0x8A14 }, - { 0x1C, 0x01, 0x8A14 }, + { SCENE_13HUBUKINOMITI, 1, 0x8A14 }, + { SCENE_13HUBUKINOMITI, 1, 0x8A14 }, }; static EntranceTableEntry* sPathToMountainVillageEntranceTable[] = { @@ -589,31 +589,31 @@ static EntranceTableEntry* sPathToMountainVillageEntranceTable[] = { }; static EntranceTableEntry sIkanaCastleEntrance0[] = { - { 0xE3, 0x00, 0x4102 }, + { -SCENE_CASTLE, 0, 0x4102 }, }; static EntranceTableEntry sIkanaCastleEntrance1[] = { - { 0xE3, 0x01, 0x4102 }, + { -SCENE_CASTLE, 1, 0x4102 }, }; static EntranceTableEntry sIkanaCastleEntrance2[] = { - { 0xE3, 0x02, 0x8102 }, + { -SCENE_CASTLE, 2, 0x8102 }, }; static EntranceTableEntry sIkanaCastleEntrance3[] = { - { 0xE3, 0x03, 0x8102 }, + { -SCENE_CASTLE, 3, 0x8102 }, }; static EntranceTableEntry sIkanaCastleEntrance4[] = { - { 0xE3, 0x04, 0x8102 }, + { -SCENE_CASTLE, 4, 0x8102 }, }; static EntranceTableEntry sIkanaCastleEntrance5[] = { - { 0xE3, 0x05, 0x8102 }, + { -SCENE_CASTLE, 5, 0x8102 }, }; static EntranceTableEntry sIkanaCastleEntrance6[] = { - { 0xE3, 0x06, 0x8102 }, + { -SCENE_CASTLE, 6, 0x8102 }, }; static EntranceTableEntry* sIkanaCastleEntranceTable[] = { @@ -622,11 +622,11 @@ static EntranceTableEntry* sIkanaCastleEntranceTable[] = { }; static EntranceTableEntry sDekuScrubPlaygroundEntrance0[] = { - { 0x1E, 0x00, 0x0102 }, + { SCENE_DEKUTES, 0, 0x0102 }, }; static EntranceTableEntry sDekuScrubPlaygroundEntrance1[] = { - { 0x1E, 0x01, 0x0102 }, + { SCENE_DEKUTES, 1, 0x0102 }, }; static EntranceTableEntry* sDekuScrubPlaygroundEntranceTable[] = { @@ -635,7 +635,7 @@ static EntranceTableEntry* sDekuScrubPlaygroundEntranceTable[] = { }; static EntranceTableEntry sOdolwasLairEntrance0[] = { - { 0xE1, 0x00, 0x8102 }, + { -SCENE_MITURIN_BS, 0, 0x8102 }, }; static EntranceTableEntry* sOdolwasLairEntranceTable[] = { @@ -643,11 +643,11 @@ static EntranceTableEntry* sOdolwasLairEntranceTable[] = { }; static EntranceTableEntry sTownShootingGalleryEntrance0[] = { - { 0x20, 0x00, 0x4102 }, + { SCENE_SYATEKI_MIZU, 0, 0x4102 }, }; static EntranceTableEntry sTownShootingGalleryEntrance1[] = { - { 0x20, 0x01, 0x0102 }, + { SCENE_SYATEKI_MIZU, 1, 0x0102 }, }; static EntranceTableEntry* sTownShootingGalleryEntranceTable[] = { @@ -656,11 +656,11 @@ static EntranceTableEntry* sTownShootingGalleryEntranceTable[] = { }; static EntranceTableEntry sSnowheadTempleEntrance0[] = { - { 0xDF, 0x00, 0x4102 }, + { -SCENE_HAKUGIN, 0, 0x4102 }, }; static EntranceTableEntry sSnowheadTempleEntrance1[] = { - { 0xDF, 0x01, 0x4102 }, + { -SCENE_HAKUGIN, 1, 0x4102 }, }; static EntranceTableEntry* sSnowheadTempleEntranceTable[] = { @@ -669,31 +669,31 @@ static EntranceTableEntry* sSnowheadTempleEntranceTable[] = { }; static EntranceTableEntry sMilkRoadEntrance0[] = { - { 0x22, 0x00, 0xCA14 }, + { SCENE_ROMANYMAE, 0, 0xCA14 }, }; static EntranceTableEntry sMilkRoadEntrance1[] = { - { 0x22, 0x01, 0x4A14 }, + { SCENE_ROMANYMAE, 1, 0x4A14 }, }; static EntranceTableEntry sMilkRoadEntrance2[] = { - { 0x22, 0x02, 0x4A14 }, + { SCENE_ROMANYMAE, 2, 0x4A14 }, }; static EntranceTableEntry sMilkRoadEntrance3[] = { - { 0x22, 0x03, 0x4A14 }, + { SCENE_ROMANYMAE, 3, 0x4A14 }, }; static EntranceTableEntry sMilkRoadEntrance4[] = { - { 0x22, 0x04, 0x4A14 }, + { SCENE_ROMANYMAE, 4, 0x4A14 }, }; static EntranceTableEntry sMilkRoadEntrance5[] = { - { 0x22, 0x05, 0x0102 }, + { SCENE_ROMANYMAE, 5, 0x0102 }, }; static EntranceTableEntry sMilkRoadEntrance6[] = { - { 0x22, 0x06, 0x0102 }, + { SCENE_ROMANYMAE, 6, 0x0102 }, }; static EntranceTableEntry* sMilkRoadEntranceTable[] = { @@ -702,67 +702,67 @@ static EntranceTableEntry* sMilkRoadEntranceTable[] = { }; static EntranceTableEntry sPiratesFortressInteriorEntrance0[] = { - { 0x23, 0x00, 0x8102 }, + { SCENE_PIRATE, 0, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance1[] = { - { 0x23, 0x01, 0x8102 }, + { SCENE_PIRATE, 1, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance2[] = { - { 0x23, 0x02, 0x8102 }, + { SCENE_PIRATE, 2, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance3[] = { - { 0x23, 0x03, 0x8102 }, + { SCENE_PIRATE, 3, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance4[] = { - { 0x23, 0x04, 0x8102 }, + { SCENE_PIRATE, 4, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance5[] = { - { 0x23, 0x05, 0x8102 }, + { SCENE_PIRATE, 5, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance6[] = { - { 0x23, 0x06, 0x8102 }, + { SCENE_PIRATE, 6, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance7[] = { - { 0x23, 0x07, 0x8102 }, + { SCENE_PIRATE, 7, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance8[] = { - { 0x23, 0x08, 0x8102 }, + { SCENE_PIRATE, 8, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance9[] = { - { 0x23, 0x09, 0x8993 }, + { SCENE_PIRATE, 9, 0x8993 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance10[] = { - { 0x23, 0x0A, 0x8102 }, + { SCENE_PIRATE, 10, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance11[] = { - { 0x23, 0x0B, 0x8102 }, + { SCENE_PIRATE, 11, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance12[] = { - { 0x23, 0x0C, 0x8102 }, + { SCENE_PIRATE, 12, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance13[] = { - { 0x23, 0x0D, 0x8102 }, + { SCENE_PIRATE, 13, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance14[] = { - { 0x23, 0x0E, 0x8102 }, + { SCENE_PIRATE, 14, 0x8102 }, }; static EntranceTableEntry sPiratesFortressInteriorEntrance15[] = { - { 0x23, 0x0F, 0x8102 }, + { SCENE_PIRATE, 15, 0x8102 }, }; static EntranceTableEntry* sPiratesFortressInteriorEntranceTable[] = { @@ -775,7 +775,7 @@ static EntranceTableEntry* sPiratesFortressInteriorEntranceTable[] = { }; static EntranceTableEntry sSwampShootingGalleryEntrance0[] = { - { 0x24, 0x00, 0x4102 }, + { SCENE_SYATEKI_MORI, 0, 0x4102 }, }; static EntranceTableEntry* sSwampShootingGalleryEntranceTable[] = { @@ -783,11 +783,11 @@ static EntranceTableEntry* sSwampShootingGalleryEntranceTable[] = { }; static EntranceTableEntry sPinnacleRockEntrance0[] = { - { 0x25, 0x00, 0x4A14 }, + { SCENE_SINKAI, 0, 0x4A14 }, }; static EntranceTableEntry sPinnacleRockEntrance1[] = { - { 0x25, 0x01, 0x0A14 }, + { SCENE_SINKAI, 1, 0x0A14 }, }; static EntranceTableEntry* sPinnacleRockEntranceTable[] = { @@ -796,44 +796,44 @@ static EntranceTableEntry* sPinnacleRockEntranceTable[] = { }; static EntranceTableEntry sFairyFountainEntrance0[] = { - { 0x26, 0x00, 0x4102 }, - { 0x26, 0x00, 0x8102 }, + { SCENE_YOUSEI_IZUMI, 0, 0x4102 }, + { SCENE_YOUSEI_IZUMI, 0, 0x8102 }, }; static EntranceTableEntry sFairyFountainEntrance1[] = { - { 0x26, 0x01, 0x4102 }, + { SCENE_YOUSEI_IZUMI, 1, 0x4102 }, }; static EntranceTableEntry sFairyFountainEntrance2[] = { - { 0x26, 0x02, 0x4102 }, + { SCENE_YOUSEI_IZUMI, 2, 0x4102 }, }; static EntranceTableEntry sFairyFountainEntrance3[] = { - { 0x26, 0x03, 0x4102 }, + { SCENE_YOUSEI_IZUMI, 3, 0x4102 }, }; static EntranceTableEntry sFairyFountainEntrance4[] = { - { 0x26, 0x04, 0x4102 }, + { SCENE_YOUSEI_IZUMI, 4, 0x4102 }, }; static EntranceTableEntry sFairyFountainEntrance5[] = { - { 0x26, 0x05, 0x8183 }, + { SCENE_YOUSEI_IZUMI, 5, 0x8183 }, }; static EntranceTableEntry sFairyFountainEntrance6[] = { - { 0x26, 0x06, 0x858B }, + { SCENE_YOUSEI_IZUMI, 6, 0x858B }, }; static EntranceTableEntry sFairyFountainEntrance7[] = { - { 0x26, 0x07, 0x858B }, + { SCENE_YOUSEI_IZUMI, 7, 0x858B }, }; static EntranceTableEntry sFairyFountainEntrance8[] = { - { 0x26, 0x08, 0x858B }, + { SCENE_YOUSEI_IZUMI, 8, 0x858B }, }; static EntranceTableEntry sFairyFountainEntrance9[] = { - { 0x26, 0x09, 0x858B }, + { SCENE_YOUSEI_IZUMI, 9, 0x858B }, }; static EntranceTableEntry* sFairyFountainEntranceTable[] = { @@ -843,7 +843,7 @@ static EntranceTableEntry* sFairyFountainEntranceTable[] = { }; static EntranceTableEntry sSwampSpiderHouseEntrance0[] = { - { 0xD9, 0x00, 0x4102 }, + { -SCENE_KINSTA1, 0, 0x4102 }, }; static EntranceTableEntry* sSwampSpiderHouseEntranceTable[] = { @@ -851,7 +851,7 @@ static EntranceTableEntry* sSwampSpiderHouseEntranceTable[] = { }; static EntranceTableEntry sOceansideSpiderHouseEntrance0[] = { - { 0xD8, 0x00, 0x4102 }, + { -SCENE_KINDAN2, 0, 0x4102 }, }; static EntranceTableEntry* sOceansideSpiderHouseEntranceTable[] = { @@ -859,15 +859,15 @@ static EntranceTableEntry* sOceansideSpiderHouseEntranceTable[] = { }; static EntranceTableEntry sAstralObservatoryEntrance0[] = { - { 0x29, 0x00, 0x0102 }, + { SCENE_TENMON_DAI, 0, 0x0102 }, }; static EntranceTableEntry sAstralObservatoryEntrance1[] = { - { 0x29, 0x01, 0x4102 }, + { SCENE_TENMON_DAI, 1, 0x4102 }, }; static EntranceTableEntry sAstralObservatoryEntrance2[] = { - { 0x29, 0x02, 0x8115 }, + { SCENE_TENMON_DAI, 2, 0x8115 }, }; static EntranceTableEntry* sAstralObservatoryEntranceTable[] = { @@ -877,7 +877,7 @@ static EntranceTableEntry* sAstralObservatoryEntranceTable[] = { }; static EntranceTableEntry sMoonDekuTrialEntrance0[] = { - { 0xD6, 0x00, 0x0387 }, + { -SCENE_LAST_DEKU, 0, 0x0387 }, }; static EntranceTableEntry* sMoonDekuTrialEntranceTable[] = { @@ -885,47 +885,47 @@ static EntranceTableEntry* sMoonDekuTrialEntranceTable[] = { }; static EntranceTableEntry sDekuPalaceEntrance0[] = { - { 0x2B, 0x00, 0x4102 }, + { SCENE_22DEKUCITY, 0, 0x4102 }, }; static EntranceTableEntry sDekuPalaceEntrance1[] = { - { 0x2B, 0x01, 0x8A14 }, + { SCENE_22DEKUCITY, 1, 0x8A14 }, }; static EntranceTableEntry sDekuPalaceEntrance2[] = { - { 0x2B, 0x02, 0xC102 }, + { SCENE_22DEKUCITY, 2, 0xC102 }, }; static EntranceTableEntry sDekuPalaceEntrance3[] = { - { 0x2B, 0x03, 0xC102 }, + { SCENE_22DEKUCITY, 3, 0xC102 }, }; static EntranceTableEntry sDekuPalaceEntrance4[] = { - { 0x2B, 0x04, 0x4102 }, + { SCENE_22DEKUCITY, 4, 0x4102 }, }; static EntranceTableEntry sDekuPalaceEntrance5[] = { - { 0x2B, 0x05, 0x4102 }, + { SCENE_22DEKUCITY, 5, 0x4102 }, }; static EntranceTableEntry sDekuPalaceEntrance6[] = { - { 0x2B, 0x06, 0x4102 }, + { SCENE_22DEKUCITY, 6, 0x4102 }, }; static EntranceTableEntry sDekuPalaceEntrance7[] = { - { 0x2B, 0x07, 0x4102 }, + { SCENE_22DEKUCITY, 7, 0x4102 }, }; static EntranceTableEntry sDekuPalaceEntrance8[] = { - { 0x2B, 0x08, 0x4102 }, + { SCENE_22DEKUCITY, 8, 0x4102 }, }; static EntranceTableEntry sDekuPalaceEntrance9[] = { - { 0x2B, 0x09, 0x4102 }, + { SCENE_22DEKUCITY, 9, 0x4102 }, }; static EntranceTableEntry sDekuPalaceEntrance10[] = { - { 0x2B, 0x0A, 0x4102 }, + { SCENE_22DEKUCITY, 10, 0x4102 }, }; static EntranceTableEntry* sDekuPalaceEntranceTable[] = { @@ -935,7 +935,7 @@ static EntranceTableEntry* sDekuPalaceEntranceTable[] = { }; static EntranceTableEntry sMountainSmithyEntrance0[] = { - { 0x2C, 0x00, 0x4102 }, + { SCENE_KAJIYA, 0, 0x4102 }, }; static EntranceTableEntry* sMountainSmithyEntranceTable[] = { @@ -943,79 +943,81 @@ static EntranceTableEntry* sMountainSmithyEntranceTable[] = { }; static EntranceTableEntry sTerminaFieldEntrance0[] = { - { 0x2D, 0x00, 0x4102 }, { 0xD3, 0x00, 0x0A14 }, { 0xD3, 0x00, 0x0A14 }, { 0xD3, 0x00, 0x058B }, - { 0x2D, 0x00, 0x0A14 }, { 0x2D, 0x00, 0x0A14 }, { 0x2D, 0x00, 0x058B }, { 0x2D, 0x00, 0x8102 }, - { 0x2D, 0x00, 0x0102 }, { 0x2D, 0x00, 0x8102 }, + { SCENE_00KEIKOKU, 0, 0x4102 }, { -SCENE_00KEIKOKU, 0, 0x0A14 }, { -SCENE_00KEIKOKU, 0, 0x0A14 }, + { -SCENE_00KEIKOKU, 0, 0x058B }, { SCENE_00KEIKOKU, 0, 0x0A14 }, { SCENE_00KEIKOKU, 0, 0x0A14 }, + { SCENE_00KEIKOKU, 0, 0x058B }, { SCENE_00KEIKOKU, 0, 0x8102 }, { SCENE_00KEIKOKU, 0, 0x0102 }, + { SCENE_00KEIKOKU, 0, 0x8102 }, }; static EntranceTableEntry sTerminaFieldEntrance1[] = { - { 0x2D, 0x01, 0xCA14 }, { 0x2D, 0x01, 0x0A14 }, { 0x2D, 0x01, 0x058B }, { 0xD3, 0x01, 0x858B }, - { 0x2D, 0x01, 0x0A14 }, { 0x2D, 0x01, 0x0A14 }, { 0x2D, 0x01, 0x058B }, { 0x2D, 0x01, 0x858B }, - { 0x2D, 0x01, 0x0102 }, { 0x2D, 0x01, 0x8102 }, + { SCENE_00KEIKOKU, 1, 0xCA14 }, { SCENE_00KEIKOKU, 1, 0x0A14 }, { SCENE_00KEIKOKU, 1, 0x058B }, + { -SCENE_00KEIKOKU, 1, 0x858B }, { SCENE_00KEIKOKU, 1, 0x0A14 }, { SCENE_00KEIKOKU, 1, 0x0A14 }, + { SCENE_00KEIKOKU, 1, 0x058B }, { SCENE_00KEIKOKU, 1, 0x858B }, { SCENE_00KEIKOKU, 1, 0x0102 }, + { SCENE_00KEIKOKU, 1, 0x8102 }, }; static EntranceTableEntry sTerminaFieldEntrance2[] = { - { 0x2D, 0x02, 0xCA14 }, { 0xD3, 0x02, 0x0A14 }, { 0xD3, 0x02, 0x0A14 }, - { 0xD3, 0x02, 0x058B }, { 0x2D, 0x02, 0x0A14 }, { 0x2D, 0x02, 0x0A14 }, + { SCENE_00KEIKOKU, 2, 0xCA14 }, { -SCENE_00KEIKOKU, 2, 0x0A14 }, { -SCENE_00KEIKOKU, 2, 0x0A14 }, + { -SCENE_00KEIKOKU, 2, 0x058B }, { SCENE_00KEIKOKU, 2, 0x0A14 }, { SCENE_00KEIKOKU, 2, 0x0A14 }, }; static EntranceTableEntry sTerminaFieldEntrance3[] = { - { 0x2D, 0x03, 0xCA14 }, { 0xD3, 0x03, 0x0A14 }, { 0xD3, 0x03, 0x0A14 }, - { 0xD3, 0x03, 0x058B }, { 0x2D, 0x03, 0x0A14 }, { 0x2D, 0x03, 0x0A14 }, + { SCENE_00KEIKOKU, 3, 0xCA14 }, { -SCENE_00KEIKOKU, 3, 0x0A14 }, { -SCENE_00KEIKOKU, 3, 0x0A14 }, + { -SCENE_00KEIKOKU, 3, 0x058B }, { SCENE_00KEIKOKU, 3, 0x0A14 }, { SCENE_00KEIKOKU, 3, 0x0A14 }, }; static EntranceTableEntry sTerminaFieldEntrance4[] = { - { 0x2D, 0x04, 0xCA14 }, { 0xD3, 0x04, 0x0A14 }, { 0xD3, 0x04, 0x0A14 }, - { 0xD3, 0x04, 0x058B }, { 0x2D, 0x04, 0x0A14 }, { 0x2D, 0x04, 0x0A14 }, + { SCENE_00KEIKOKU, 4, 0xCA14 }, { -SCENE_00KEIKOKU, 4, 0x0A14 }, { -SCENE_00KEIKOKU, 4, 0x0A14 }, + { -SCENE_00KEIKOKU, 4, 0x058B }, { SCENE_00KEIKOKU, 4, 0x0A14 }, { SCENE_00KEIKOKU, 4, 0x0A14 }, }; static EntranceTableEntry sTerminaFieldEntrance5[] = { - { 0x2D, 0x05, 0xCA14 }, { 0xD3, 0x05, 0x0A14 }, { 0xD3, 0x05, 0x0A14 }, - { 0xD3, 0x05, 0x858B }, { 0x2D, 0x05, 0x0A14 }, { 0x2D, 0x05, 0x0A14 }, + { SCENE_00KEIKOKU, 5, 0xCA14 }, { -SCENE_00KEIKOKU, 5, 0x0A14 }, { -SCENE_00KEIKOKU, 5, 0x0A14 }, + { -SCENE_00KEIKOKU, 5, 0x858B }, { SCENE_00KEIKOKU, 5, 0x0A14 }, { SCENE_00KEIKOKU, 5, 0x0A14 }, }; static EntranceTableEntry sTerminaFieldEntrance6[] = { - { 0x2D, 0x06, 0x4102 }, { 0xD3, 0x06, 0x0A14 }, { 0xD3, 0x06, 0x0A14 }, - { 0xD3, 0x06, 0x858B }, { 0x2D, 0x06, 0x0A14 }, { 0x2D, 0x06, 0x0A14 }, + { SCENE_00KEIKOKU, 6, 0x4102 }, { -SCENE_00KEIKOKU, 6, 0x0A14 }, { -SCENE_00KEIKOKU, 6, 0x0A14 }, + { -SCENE_00KEIKOKU, 6, 0x858B }, { SCENE_00KEIKOKU, 6, 0x0A14 }, { SCENE_00KEIKOKU, 6, 0x0A14 }, }; static EntranceTableEntry sTerminaFieldEntrance7[] = { - { 0x2D, 0x07, 0x4102 }, { 0xD3, 0x07, 0x0A14 }, { 0xD3, 0x07, 0x0A14 }, - { 0xD3, 0x07, 0x858B }, { 0x2D, 0x07, 0x0A14 }, { 0x2D, 0x07, 0x0A14 }, + { SCENE_00KEIKOKU, 7, 0x4102 }, { -SCENE_00KEIKOKU, 7, 0x0A14 }, { -SCENE_00KEIKOKU, 7, 0x0A14 }, + { -SCENE_00KEIKOKU, 7, 0x858B }, { SCENE_00KEIKOKU, 7, 0x0A14 }, { SCENE_00KEIKOKU, 7, 0x0A14 }, }; static EntranceTableEntry sTerminaFieldEntrance8[] = { - { 0x2D, 0x08, 0x4102 }, { 0xD3, 0x08, 0x0A14 }, { 0xD3, 0x08, 0x0A14 }, - { 0xD3, 0x08, 0x058B }, { 0x2D, 0x08, 0x0A14 }, { 0x2D, 0x08, 0x0A14 }, + { SCENE_00KEIKOKU, 8, 0x4102 }, { -SCENE_00KEIKOKU, 8, 0x0A14 }, { -SCENE_00KEIKOKU, 8, 0x0A14 }, + { -SCENE_00KEIKOKU, 8, 0x058B }, { SCENE_00KEIKOKU, 8, 0x0A14 }, { SCENE_00KEIKOKU, 8, 0x0A14 }, }; static EntranceTableEntry sTerminaFieldEntrance9[] = { - { 0x2D, 0x09, 0x4102 }, { 0xD3, 0x09, 0x0A14 }, { 0xD3, 0x09, 0x0A14 }, - { 0xD3, 0x09, 0x058B }, { 0x2D, 0x09, 0x0A14 }, { 0x2D, 0x09, 0x0A14 }, + { SCENE_00KEIKOKU, 9, 0x4102 }, { -SCENE_00KEIKOKU, 9, 0x0A14 }, { -SCENE_00KEIKOKU, 9, 0x0A14 }, + { -SCENE_00KEIKOKU, 9, 0x058B }, { SCENE_00KEIKOKU, 9, 0x0A14 }, { SCENE_00KEIKOKU, 9, 0x0A14 }, }; static EntranceTableEntry sTerminaFieldEntrance10[] = { - { 0x2D, 0x0A, 0x8A95 }, { 0xD3, 0x0A, 0x0A14 }, { 0xD3, 0x0A, 0x0A14 }, - { 0xD3, 0x0A, 0x058B }, { 0x2D, 0x0A, 0x0A14 }, { 0x2D, 0x0A, 0x0A95 }, + { SCENE_00KEIKOKU, 10, 0x8A95 }, { -SCENE_00KEIKOKU, 10, 0x0A14 }, { -SCENE_00KEIKOKU, 10, 0x0A14 }, + { -SCENE_00KEIKOKU, 10, 0x058B }, { SCENE_00KEIKOKU, 10, 0x0A14 }, { SCENE_00KEIKOKU, 10, 0x0A95 }, }; static EntranceTableEntry sTerminaFieldEntrance11[] = { - { 0x2D, 0x0B, 0x4A14 }, { 0xD3, 0x0B, 0x0A14 }, { 0xD3, 0x0B, 0x0A14 }, - { 0xD3, 0x0B, 0x058B }, { 0x2D, 0x0B, 0x0A14 }, { 0x2D, 0x0B, 0x0A14 }, + { SCENE_00KEIKOKU, 11, 0x4A14 }, { -SCENE_00KEIKOKU, 11, 0x0A14 }, { -SCENE_00KEIKOKU, 11, 0x0A14 }, + { -SCENE_00KEIKOKU, 11, 0x058B }, { SCENE_00KEIKOKU, 11, 0x0A14 }, { SCENE_00KEIKOKU, 11, 0x0A14 }, }; static EntranceTableEntry sTerminaFieldEntrance12[] = { - { 0x2D, 0x0C, 0x0A14 }, { 0xD3, 0x0C, 0x0A14 }, { 0xD3, 0x0C, 0x0A14 }, - { 0xD3, 0x0C, 0x058B }, { 0x2D, 0x0C, 0x0A14 }, { 0x2D, 0x0C, 0x0A14 }, + { SCENE_00KEIKOKU, 12, 0x0A14 }, { -SCENE_00KEIKOKU, 12, 0x0A14 }, { -SCENE_00KEIKOKU, 12, 0x0A14 }, + { -SCENE_00KEIKOKU, 12, 0x058B }, { SCENE_00KEIKOKU, 12, 0x0A14 }, { SCENE_00KEIKOKU, 12, 0x0A14 }, }; static EntranceTableEntry sTerminaFieldEntrance13[] = { - { 0x2D, 0x0D, 0x0A14 }, { 0xD3, 0x0D, 0x0A14 }, { 0xD3, 0x0D, 0x0A14 }, - { 0xD3, 0x0D, 0x058B }, { 0x2D, 0x0D, 0x0A14 }, { 0x2D, 0x0D, 0x0A14 }, + { SCENE_00KEIKOKU, 13, 0x0A14 }, { -SCENE_00KEIKOKU, 13, 0x0A14 }, { -SCENE_00KEIKOKU, 13, 0x0A14 }, + { -SCENE_00KEIKOKU, 13, 0x058B }, { SCENE_00KEIKOKU, 13, 0x0A14 }, { SCENE_00KEIKOKU, 13, 0x0A14 }, }; static EntranceTableEntry sTerminaFieldEntrance14[] = { - { 0x2D, 0x0E, 0x858B }, + { SCENE_00KEIKOKU, 14, 0x858B }, }; static EntranceTableEntry* sTerminaFieldEntranceTable[] = { @@ -1026,7 +1028,7 @@ static EntranceTableEntry* sTerminaFieldEntranceTable[] = { }; static EntranceTableEntry sPostOfficeEntrance0[] = { - { 0x2E, 0x00, 0x4102 }, + { SCENE_POSTHOUSE, 0, 0x4102 }, }; static EntranceTableEntry* sPostOfficeEntranceTable[] = { @@ -1034,7 +1036,7 @@ static EntranceTableEntry* sPostOfficeEntranceTable[] = { }; static EntranceTableEntry sMarineResearchLabEntrance0[] = { - { 0x2F, 0x00, 0x4102 }, + { SCENE_LABO, 0, 0x4102 }, }; static EntranceTableEntry* sMarineResearchLabEntranceTable[] = { @@ -1042,11 +1044,11 @@ static EntranceTableEntry* sMarineResearchLabEntranceTable[] = { }; static EntranceTableEntry sDampesHouseEntrance0[] = { - { 0x30, 0x00, 0x4102 }, + { SCENE_DANPEI2TEST, 0, 0x4102 }, }; static EntranceTableEntry sDampesHouseEntrance1[] = { - { 0x30, 0x01, 0x0102 }, + { SCENE_DANPEI2TEST, 1, 0x0102 }, }; static EntranceTableEntry* sDampesHouseEntranceTable[] = { @@ -1055,23 +1057,23 @@ static EntranceTableEntry* sDampesHouseEntranceTable[] = { }; static EntranceTableEntry sGoronShrineEntrance0[] = { - { 0x32, 0x00, 0x4102 }, - { 0x32, 0x00, 0x4102 }, + { SCENE_16GORON_HOUSE, 0, 0x4102 }, + { SCENE_16GORON_HOUSE, 0, 0x4102 }, }; static EntranceTableEntry sGoronShrineEntrance1[] = { - { 0x32, 0x01, 0x0102 }, - { 0x32, 0x01, 0x0102 }, + { SCENE_16GORON_HOUSE, 1, 0x0102 }, + { SCENE_16GORON_HOUSE, 1, 0x0102 }, }; static EntranceTableEntry sGoronShrineEntrance2[] = { - { 0x32, 0x02, 0x058B }, - { 0x32, 0x02, 0x058B }, + { SCENE_16GORON_HOUSE, 2, 0x058B }, + { SCENE_16GORON_HOUSE, 2, 0x058B }, }; static EntranceTableEntry sGoronShrineEntrance3[] = { - { 0x32, 0x03, 0x0102 }, - { 0x32, 0x03, 0x0102 }, + { SCENE_16GORON_HOUSE, 3, 0x0102 }, + { SCENE_16GORON_HOUSE, 3, 0x0102 }, }; static EntranceTableEntry* sGoronShrineEntranceTable[] = { @@ -1082,40 +1084,40 @@ static EntranceTableEntry* sGoronShrineEntranceTable[] = { }; static EntranceTableEntry sZoraHallEntrance0[] = { - { 0x33, 0x00, 0x4993 }, - { 0x33, 0x00, 0x8102 }, + { SCENE_33ZORACITY, 0, 0x4993 }, + { SCENE_33ZORACITY, 0, 0x8102 }, }; static EntranceTableEntry sZoraHallEntrance1[] = { - { 0x33, 0x01, 0x4102 }, + { SCENE_33ZORACITY, 1, 0x4102 }, }; static EntranceTableEntry sZoraHallEntrance2[] = { - { 0x33, 0x02, 0x4102 }, + { SCENE_33ZORACITY, 2, 0x4102 }, }; static EntranceTableEntry sZoraHallEntrance3[] = { - { 0x33, 0x03, 0x4102 }, + { SCENE_33ZORACITY, 3, 0x4102 }, }; static EntranceTableEntry sZoraHallEntrance4[] = { - { 0x33, 0x04, 0x4102 }, + { SCENE_33ZORACITY, 4, 0x4102 }, }; static EntranceTableEntry sZoraHallEntrance5[] = { - { 0x33, 0x05, 0x4102 }, + { SCENE_33ZORACITY, 5, 0x4102 }, }; static EntranceTableEntry sZoraHallEntrance6[] = { - { 0x33, 0x06, 0x4102 }, + { SCENE_33ZORACITY, 6, 0x4102 }, }; static EntranceTableEntry sZoraHallEntrance7[] = { - { 0x33, 0x07, 0x058B }, + { SCENE_33ZORACITY, 7, 0x058B }, }; static EntranceTableEntry sZoraHallEntrance8[] = { - { 0x33, 0x08, 0x8183 }, + { SCENE_33ZORACITY, 8, 0x8183 }, }; static EntranceTableEntry* sZoraHallEntranceTable[] = { @@ -1124,11 +1126,11 @@ static EntranceTableEntry* sZoraHallEntranceTable[] = { }; static EntranceTableEntry sTradingPostEntrance0[] = { - { 0x34, 0x00, 0x4102 }, + { SCENE_8ITEMSHOP, 0, 0x4102 }, }; static EntranceTableEntry sTradingPostEntrance1[] = { - { 0x34, 0x01, 0x0102 }, + { SCENE_8ITEMSHOP, 1, 0x0102 }, }; static EntranceTableEntry* sTradingPostEntranceTable[] = { @@ -1137,52 +1139,52 @@ static EntranceTableEntry* sTradingPostEntranceTable[] = { }; static EntranceTableEntry sRomaniRanchEntrance0[] = { - { 0x35, 0x00, 0x4A14 }, { 0x35, 0x00, 0x0A14 }, { 0x35, 0x00, 0x8102 }, { 0x35, 0x00, 0x858B }, - { 0x35, 0x00, 0x858B }, { 0x35, 0x00, 0x0102 }, { 0x35, 0x00, 0x8102 }, + { SCENE_F01, 0, 0x4A14 }, { SCENE_F01, 0, 0x0A14 }, { SCENE_F01, 0, 0x8102 }, { SCENE_F01, 0, 0x858B }, + { SCENE_F01, 0, 0x858B }, { SCENE_F01, 0, 0x0102 }, { SCENE_F01, 0, 0x8102 }, }; static EntranceTableEntry sRomaniRanchEntrance1[] = { - { 0x35, 0x01, 0x0A14 }, + { SCENE_F01, 1, 0x0A14 }, }; static EntranceTableEntry sRomaniRanchEntrance2[] = { - { 0x35, 0x02, 0x0102 }, + { SCENE_F01, 2, 0x0102 }, }; static EntranceTableEntry sRomaniRanchEntrance3[] = { - { 0x35, 0x03, 0x0102 }, + { SCENE_F01, 3, 0x0102 }, }; static EntranceTableEntry sRomaniRanchEntrance4[] = { - { 0x35, 0x04, 0x8102 }, + { SCENE_F01, 4, 0x8102 }, }; static EntranceTableEntry sRomaniRanchEntrance5[] = { - { 0x35, 0x05, 0x8102 }, + { SCENE_F01, 5, 0x8102 }, }; static EntranceTableEntry sRomaniRanchEntrance6[] = { - { 0x35, 0x06, 0x0A14 }, + { SCENE_F01, 6, 0x0A14 }, }; static EntranceTableEntry sRomaniRanchEntrance7[] = { - { 0x35, 0x07, 0x0A14 }, + { SCENE_F01, 7, 0x0A14 }, }; static EntranceTableEntry sRomaniRanchEntrance8[] = { - { 0x35, 0x08, 0x0A14 }, + { SCENE_F01, 8, 0x0A14 }, }; static EntranceTableEntry sRomaniRanchEntrance9[] = { - { 0x35, 0x09, 0x0102 }, + { SCENE_F01, 9, 0x0102 }, }; static EntranceTableEntry sRomaniRanchEntrance10[] = { - { 0x35, 0x0A, 0x0102 }, + { SCENE_F01, 10, 0x0102 }, }; static EntranceTableEntry sRomaniRanchEntrance11[] = { - { 0x35, 0x0B, 0x0102 }, + { SCENE_F01, 11, 0x0102 }, }; static EntranceTableEntry* sRomaniRanchEntranceTable[] = { @@ -1192,23 +1194,23 @@ static EntranceTableEntry* sRomaniRanchEntranceTable[] = { }; static EntranceTableEntry sTwinmoldsLairEntrance0[] = { - { 0xCA, 0x00, 0x0102 }, + { -SCENE_INISIE_BS, 0, 0x0102 }, }; static EntranceTableEntry sTwinmoldsLairEntrance1[] = { - { 0xCA, 0x01, 0x0102 }, + { -SCENE_INISIE_BS, 1, 0x0102 }, }; static EntranceTableEntry sTwinmoldsLairEntrance2[] = { - { 0xCA, 0x02, 0x0102 }, + { -SCENE_INISIE_BS, 2, 0x0102 }, }; static EntranceTableEntry sTwinmoldsLairEntrance3[] = { - { 0xCA, 0x03, 0x0102 }, + { -SCENE_INISIE_BS, 3, 0x0102 }, }; static EntranceTableEntry sTwinmoldsLairEntrance4[] = { - { 0xCA, 0x04, 0x0102 }, + { -SCENE_INISIE_BS, 4, 0x0102 }, }; static EntranceTableEntry* sTwinmoldsLairEntranceTable[] = { @@ -1217,74 +1219,74 @@ static EntranceTableEntry* sTwinmoldsLairEntranceTable[] = { }; static EntranceTableEntry sGreatBayCoastEntrance0[] = { - { 0x37, 0x00, 0xCA14 }, - { 0x37, 0x00, 0xCA14 }, - { 0x37, 0x00, 0x8102 }, + { SCENE_30GYOSON, 0, 0xCA14 }, + { SCENE_30GYOSON, 0, 0xCA14 }, + { SCENE_30GYOSON, 0, 0x8102 }, }; static EntranceTableEntry sGreatBayCoastEntrance1[] = { - { 0x37, 0x01, 0xCA14 }, - { 0x37, 0x01, 0xCA14 }, + { SCENE_30GYOSON, 1, 0xCA14 }, + { SCENE_30GYOSON, 1, 0xCA14 }, }; static EntranceTableEntry sGreatBayCoastEntrance2[] = { - { 0x37, 0x02, 0x4993 }, - { 0x37, 0x02, 0x4993 }, + { SCENE_30GYOSON, 2, 0x4993 }, + { SCENE_30GYOSON, 2, 0x4993 }, }; static EntranceTableEntry sGreatBayCoastEntrance3[] = { - { 0x37, 0x03, 0x4A14 }, - { 0x37, 0x03, 0x4A14 }, + { SCENE_30GYOSON, 3, 0x4A14 }, + { SCENE_30GYOSON, 3, 0x4A14 }, }; static EntranceTableEntry sGreatBayCoastEntrance4[] = { - { 0x37, 0x04, 0x4102 }, - { 0x37, 0x04, 0x4102 }, + { SCENE_30GYOSON, 4, 0x4102 }, + { SCENE_30GYOSON, 4, 0x4102 }, }; static EntranceTableEntry sGreatBayCoastEntrance5[] = { - { 0x37, 0x05, 0x4993 }, - { 0x37, 0x05, 0x4993 }, + { SCENE_30GYOSON, 5, 0x4993 }, + { SCENE_30GYOSON, 5, 0x4993 }, }; static EntranceTableEntry sGreatBayCoastEntrance6[] = { - { 0x37, 0x06, 0x4993 }, - { 0x37, 0x06, 0x4993 }, + { SCENE_30GYOSON, 6, 0x4993 }, + { SCENE_30GYOSON, 6, 0x4993 }, }; static EntranceTableEntry sGreatBayCoastEntrance7[] = { - { 0x37, 0x07, 0x4102 }, - { 0x37, 0x07, 0x4102 }, + { SCENE_30GYOSON, 7, 0x4102 }, + { SCENE_30GYOSON, 7, 0x4102 }, }; static EntranceTableEntry sGreatBayCoastEntrance8[] = { - { 0x37, 0x08, 0x4102 }, - { 0x37, 0x08, 0x4102 }, + { SCENE_30GYOSON, 8, 0x4102 }, + { SCENE_30GYOSON, 8, 0x4102 }, }; static EntranceTableEntry sGreatBayCoastEntrance9[] = { - { 0x37, 0x09, 0x058B }, - { 0x37, 0x09, 0x058B }, + { SCENE_30GYOSON, 9, 0x058B }, + { SCENE_30GYOSON, 9, 0x058B }, }; static EntranceTableEntry sGreatBayCoastEntrance10[] = { - { 0x37, 0x0A, 0x858B }, - { 0x37, 0x0A, 0x858B }, + { SCENE_30GYOSON, 10, 0x858B }, + { SCENE_30GYOSON, 10, 0x858B }, }; static EntranceTableEntry sGreatBayCoastEntrance11[] = { - { 0x37, 0x0B, 0x0A14 }, - { 0x37, 0x0B, 0x0A14 }, + { SCENE_30GYOSON, 11, 0x0A14 }, + { SCENE_30GYOSON, 11, 0x0A14 }, }; static EntranceTableEntry sGreatBayCoastEntrance12[] = { - { 0x37, 0x0C, 0x0A14 }, - { 0x37, 0x0C, 0x0A14 }, + { SCENE_30GYOSON, 12, 0x0A14 }, + { SCENE_30GYOSON, 12, 0x0A14 }, }; static EntranceTableEntry sGreatBayCoastEntrance13[] = { - { 0x37, 0x0D, 0x0A14 }, - { 0x37, 0x0D, 0x0A14 }, + { SCENE_30GYOSON, 13, 0x0A14 }, + { SCENE_30GYOSON, 13, 0x0A14 }, }; static EntranceTableEntry* sGreatBayCoastEntranceTable[] = { @@ -1295,53 +1297,53 @@ static EntranceTableEntry* sGreatBayCoastEntranceTable[] = { }; static EntranceTableEntry sZoraCapeEntrance0[] = { - { 0x38, 0x00, 0x8A14 }, - { 0x38, 0x00, 0x8A14 }, + { SCENE_31MISAKI, 0, 0x8A14 }, + { SCENE_31MISAKI, 0, 0x8A14 }, }; static EntranceTableEntry sZoraCapeEntrance1[] = { - { 0x38, 0x01, 0x4993 }, - { 0x38, 0x01, 0x4993 }, + { SCENE_31MISAKI, 1, 0x4993 }, + { SCENE_31MISAKI, 1, 0x4993 }, }; static EntranceTableEntry sZoraCapeEntrance2[] = { - { 0x38, 0x02, 0x4102 }, - { 0x38, 0x02, 0x4102 }, + { SCENE_31MISAKI, 2, 0x4102 }, + { SCENE_31MISAKI, 2, 0x4102 }, }; static EntranceTableEntry sZoraCapeEntrance3[] = { - { 0x38, 0x03, 0x0993 }, - { 0x38, 0x03, 0x0993 }, + { SCENE_31MISAKI, 3, 0x0993 }, + { SCENE_31MISAKI, 3, 0x0993 }, }; static EntranceTableEntry sZoraCapeEntrance4[] = { - { 0x38, 0x04, 0x4102 }, - { 0x38, 0x04, 0x4102 }, + { SCENE_31MISAKI, 4, 0x4102 }, + { SCENE_31MISAKI, 4, 0x4102 }, }; static EntranceTableEntry sZoraCapeEntrance5[] = { - { 0x38, 0x05, 0x0102 }, - { 0x38, 0x05, 0x0102 }, + { SCENE_31MISAKI, 5, 0x0102 }, + { SCENE_31MISAKI, 5, 0x0102 }, }; static EntranceTableEntry sZoraCapeEntrance6[] = { - { 0x38, 0x06, 0x0A14 }, - { 0x38, 0x06, 0x0A14 }, + { SCENE_31MISAKI, 6, 0x0A14 }, + { SCENE_31MISAKI, 6, 0x0A14 }, }; static EntranceTableEntry sZoraCapeEntrance7[] = { - { 0x38, 0x07, 0x0A14 }, - { 0x38, 0x07, 0x0A14 }, + { SCENE_31MISAKI, 7, 0x0A14 }, + { SCENE_31MISAKI, 7, 0x0A14 }, }; static EntranceTableEntry sZoraCapeEntrance8[] = { - { 0x38, 0x08, 0x0A14 }, - { 0x38, 0x08, 0x0A14 }, + { SCENE_31MISAKI, 8, 0x0A14 }, + { SCENE_31MISAKI, 8, 0x0A14 }, }; static EntranceTableEntry sZoraCapeEntrance9[] = { - { 0x38, 0x09, 0x0A14 }, - { 0x38, 0x09, 0x0A14 }, + { SCENE_31MISAKI, 9, 0x0A14 }, + { SCENE_31MISAKI, 9, 0x0A14 }, }; static EntranceTableEntry* sZoraCapeEntranceTable[] = { @@ -1350,7 +1352,7 @@ static EntranceTableEntry* sZoraCapeEntranceTable[] = { }; static EntranceTableEntry sLotteryShopEntrance0[] = { - { 0x39, 0x00, 0x4102 }, + { SCENE_TAKARAKUJI, 0, 0x4102 }, }; static EntranceTableEntry* sLotteryShopEntranceTable[] = { @@ -1358,31 +1360,31 @@ static EntranceTableEntry* sLotteryShopEntranceTable[] = { }; static EntranceTableEntry sPiratesFortressExteriorEntrance0[] = { - { 0x3B, 0x00, 0x4993 }, + { SCENE_TORIDE, 0, 0x4993 }, }; static EntranceTableEntry sPiratesFortressExteriorEntrance1[] = { - { 0x3B, 0x01, 0x8102 }, + { SCENE_TORIDE, 1, 0x8102 }, }; static EntranceTableEntry sPiratesFortressExteriorEntrance2[] = { - { 0x3B, 0x02, 0x8993 }, + { SCENE_TORIDE, 2, 0x8993 }, }; static EntranceTableEntry sPiratesFortressExteriorEntrance3[] = { - { 0x3B, 0x03, 0x8993 }, + { SCENE_TORIDE, 3, 0x8993 }, }; static EntranceTableEntry sPiratesFortressExteriorEntrance4[] = { - { 0x3B, 0x04, 0x8102 }, + { SCENE_TORIDE, 4, 0x8102 }, }; static EntranceTableEntry sPiratesFortressExteriorEntrance5[] = { - { 0x3B, 0x05, 0x8102 }, + { SCENE_TORIDE, 5, 0x8102 }, }; static EntranceTableEntry sPiratesFortressExteriorEntrance6[] = { - { 0x3B, 0x06, 0x8102 }, + { SCENE_TORIDE, 6, 0x8102 }, }; static EntranceTableEntry* sPiratesFortressExteriorEntranceTable[] = { @@ -1392,7 +1394,7 @@ static EntranceTableEntry* sPiratesFortressExteriorEntranceTable[] = { }; static EntranceTableEntry sFishermansHutEntrance0[] = { - { 0x3C, 0x00, 0x4102 }, + { SCENE_FISHERMAN, 0, 0x4102 }, }; static EntranceTableEntry* sFishermansHutEntranceTable[] = { @@ -1400,7 +1402,7 @@ static EntranceTableEntry* sFishermansHutEntranceTable[] = { }; static EntranceTableEntry sGoronShopEntrance0[] = { - { 0x3D, 0x00, 0x4102 }, + { SCENE_GORONSHOP, 0, 0x4102 }, }; static EntranceTableEntry* sGoronShopEntranceTable[] = { @@ -1408,20 +1410,20 @@ static EntranceTableEntry* sGoronShopEntranceTable[] = { }; static EntranceTableEntry sDekuKingsChamberEntrance0[] = { - { 0xC2, 0x00, 0xC102 }, - { 0xC2, 0x00, 0x8102 }, + { -SCENE_DEKU_KING, 0, 0xC102 }, + { -SCENE_DEKU_KING, 0, 0x8102 }, }; static EntranceTableEntry sDekuKingsChamberEntrance1[] = { - { 0xC2, 0x01, 0xC102 }, + { -SCENE_DEKU_KING, 1, 0xC102 }, }; static EntranceTableEntry sDekuKingsChamberEntrance2[] = { - { 0xC2, 0x02, 0x858B }, + { -SCENE_DEKU_KING, 2, 0x858B }, }; static EntranceTableEntry sDekuKingsChamberEntrance3[] = { - { 0xC2, 0x03, 0x0102 }, + { -SCENE_DEKU_KING, 3, 0x0102 }, }; static EntranceTableEntry* sDekuKingsChamberEntranceTable[] = { @@ -1432,7 +1434,7 @@ static EntranceTableEntry* sDekuKingsChamberEntranceTable[] = { }; static EntranceTableEntry sMoonGoronTrialEntrance0[] = { - { 0xC1, 0x00, 0x0387 }, + { -SCENE_LAST_GORON, 0, 0x0387 }, }; static EntranceTableEntry* sMoonGoronTrialEntranceTable[] = { @@ -1440,15 +1442,15 @@ static EntranceTableEntry* sMoonGoronTrialEntranceTable[] = { }; static EntranceTableEntry sRoadToSouthernSwampEntrance0[] = { - { 0x40, 0x00, 0x8A14 }, + { SCENE_24KEMONOMITI, 0, 0x8A14 }, }; static EntranceTableEntry sRoadToSouthernSwampEntrance1[] = { - { 0x40, 0x01, 0x8A14 }, + { SCENE_24KEMONOMITI, 1, 0x8A14 }, }; static EntranceTableEntry sRoadToSouthernSwampEntrance2[] = { - { 0x40, 0x02, 0x0102 }, + { SCENE_24KEMONOMITI, 2, 0x0102 }, }; static EntranceTableEntry* sRoadToSouthernSwampEntranceTable[] = { @@ -1458,11 +1460,11 @@ static EntranceTableEntry* sRoadToSouthernSwampEntranceTable[] = { }; static EntranceTableEntry sDoggyRacetrackEntrance0[] = { - { 0x41, 0x00, 0xC102 }, + { SCENE_F01_B, 0, 0xC102 }, }; static EntranceTableEntry sDoggyRacetrackEntrance1[] = { - { 0x41, 0x01, 0x0A14 }, + { SCENE_F01_B, 1, 0x0A14 }, }; static EntranceTableEntry* sDoggyRacetrackEntranceTable[] = { @@ -1471,12 +1473,12 @@ static EntranceTableEntry* sDoggyRacetrackEntranceTable[] = { }; static EntranceTableEntry sCuccoShackEntrance0[] = { - { 0x42, 0x00, 0xC102 }, - { 0x42, 0x00, 0x8102 }, + { SCENE_F01C, 0, 0xC102 }, + { SCENE_F01C, 0, 0x8102 }, }; static EntranceTableEntry sCuccoShackEntrance1[] = { - { 0x42, 0x01, 0x0A14 }, + { SCENE_F01C, 1, 0x0A14 }, }; static EntranceTableEntry* sCuccoShackEntranceTable[] = { @@ -1485,28 +1487,28 @@ static EntranceTableEntry* sCuccoShackEntranceTable[] = { }; static EntranceTableEntry sIkanaGraveyardEntrance0[] = { - { 0x43, 0x00, 0x4A14 }, - { 0x43, 0x00, 0x8102 }, + { SCENE_BOTI, 0, 0x4A14 }, + { SCENE_BOTI, 0, 0x8102 }, }; static EntranceTableEntry sIkanaGraveyardEntrance1[] = { - { 0x43, 0x01, 0x4102 }, + { SCENE_BOTI, 1, 0x4102 }, }; static EntranceTableEntry sIkanaGraveyardEntrance2[] = { - { 0x43, 0x02, 0x4102 }, + { SCENE_BOTI, 2, 0x4102 }, }; static EntranceTableEntry sIkanaGraveyardEntrance3[] = { - { 0x43, 0x03, 0x4102 }, + { SCENE_BOTI, 3, 0x4102 }, }; static EntranceTableEntry sIkanaGraveyardEntrance4[] = { - { 0x43, 0x04, 0x4102 }, + { SCENE_BOTI, 4, 0x4102 }, }; static EntranceTableEntry sIkanaGraveyardEntrance5[] = { - { 0x43, 0x05, 0x058B }, + { SCENE_BOTI, 5, 0x058B }, }; static EntranceTableEntry* sIkanaGraveyardEntranceTable[] = { @@ -1515,7 +1517,7 @@ static EntranceTableEntry* sIkanaGraveyardEntranceTable[] = { }; static EntranceTableEntry sGohtsLairEntrance0[] = { - { 0xBC, 0x00, 0x8102 }, + { -SCENE_HAKUGIN_BS, 0, 0x8102 }, }; static EntranceTableEntry* sGohtsLairEntranceTable[] = { @@ -1523,47 +1525,47 @@ static EntranceTableEntry* sGohtsLairEntranceTable[] = { }; static EntranceTableEntry sSouthernSwampPoisonedEntrance0[] = { - { 0x45, 0x00, 0xCA14 }, + { SCENE_20SICHITAI, 0, 0xCA14 }, }; static EntranceTableEntry sSouthernSwampPoisonedEntrance1[] = { - { 0x45, 0x01, 0x4102 }, + { SCENE_20SICHITAI, 1, 0x4102 }, }; static EntranceTableEntry sSouthernSwampPoisonedEntrance2[] = { - { 0x45, 0x02, 0xC102 }, + { SCENE_20SICHITAI, 2, 0xC102 }, }; static EntranceTableEntry sSouthernSwampPoisonedEntrance3[] = { - { 0x45, 0x03, 0x4102 }, + { SCENE_20SICHITAI, 3, 0x4102 }, }; static EntranceTableEntry sSouthernSwampPoisonedEntrance4[] = { - { 0x45, 0x04, 0x4102 }, + { SCENE_20SICHITAI, 4, 0x4102 }, }; static EntranceTableEntry sSouthernSwampPoisonedEntrance5[] = { - { 0x45, 0x05, 0x4102 }, + { SCENE_20SICHITAI, 5, 0x4102 }, }; static EntranceTableEntry sSouthernSwampPoisonedEntrance6[] = { - { 0x45, 0x06, 0x0102 }, + { SCENE_20SICHITAI, 6, 0x0102 }, }; static EntranceTableEntry sSouthernSwampPoisonedEntrance7[] = { - { 0x45, 0x07, 0x4102 }, + { SCENE_20SICHITAI, 7, 0x4102 }, }; static EntranceTableEntry sSouthernSwampPoisonedEntrance8[] = { - { 0x45, 0x08, 0x4102 }, + { SCENE_20SICHITAI, 8, 0x4102 }, }; static EntranceTableEntry sSouthernSwampPoisonedEntrance9[] = { - { 0x45, 0x09, 0x4A14 }, + { SCENE_20SICHITAI, 9, 0x4A14 }, }; static EntranceTableEntry sSouthernSwampPoisonedEntrance10[] = { - { 0x45, 0x0A, 0x4A14 }, + { SCENE_20SICHITAI, 10, 0x4A14 }, }; static EntranceTableEntry* sSouthernSwampPoisonedEntranceTable[] = { @@ -1574,33 +1576,33 @@ static EntranceTableEntry* sSouthernSwampPoisonedEntranceTable[] = { }; static EntranceTableEntry sWoodfallEntrance0[] = { - { 0x46, 0x00, 0xC102 }, - { 0x46, 0x00, 0x0183 }, - { 0x46, 0x00, 0xC102 }, + { SCENE_21MITURINMAE, 0, 0xC102 }, + { SCENE_21MITURINMAE, 0, 0x0183 }, + { SCENE_21MITURINMAE, 0, 0xC102 }, }; static EntranceTableEntry sWoodfallEntrance1[] = { - { 0x46, 0x01, 0x4102 }, - { 0x46, 0x01, 0x0183 }, - { 0x46, 0x01, 0x4102 }, + { SCENE_21MITURINMAE, 1, 0x4102 }, + { SCENE_21MITURINMAE, 1, 0x0183 }, + { SCENE_21MITURINMAE, 1, 0x4102 }, }; static EntranceTableEntry sWoodfallEntrance2[] = { - { 0x46, 0x02, 0x4102 }, - { 0x46, 0x02, 0x0183 }, - { 0x46, 0x02, 0x4102 }, + { SCENE_21MITURINMAE, 2, 0x4102 }, + { SCENE_21MITURINMAE, 2, 0x0183 }, + { SCENE_21MITURINMAE, 2, 0x4102 }, }; static EntranceTableEntry sWoodfallEntrance3[] = { - { 0x46, 0x03, 0x4102 }, - { 0x46, 0x03, 0x0183 }, - { 0x46, 0x03, 0x4102 }, + { SCENE_21MITURINMAE, 3, 0x4102 }, + { SCENE_21MITURINMAE, 3, 0x0183 }, + { SCENE_21MITURINMAE, 3, 0x4102 }, }; static EntranceTableEntry sWoodfallEntrance4[] = { - { 0x46, 0x04, 0x4102 }, - { 0x46, 0x04, 0x0183 }, - { 0x46, 0x04, 0x4102 }, + { SCENE_21MITURINMAE, 4, 0x4102 }, + { SCENE_21MITURINMAE, 4, 0x0183 }, + { SCENE_21MITURINMAE, 4, 0x4102 }, }; static EntranceTableEntry* sWoodfallEntranceTable[] = { @@ -1608,11 +1610,11 @@ static EntranceTableEntry* sWoodfallEntranceTable[] = { }; static EntranceTableEntry sMoonZoraTrialEntrance0[] = { - { 0xB9, 0x00, 0x0387 }, + { -SCENE_LAST_ZORA, 0, 0x0387 }, }; static EntranceTableEntry sMoonZoraTrialEntrance1[] = { - { 0xB9, 0x01, 0x0102 }, + { -SCENE_LAST_ZORA, 1, 0x0102 }, }; static EntranceTableEntry* sMoonZoraTrialEntranceTable[] = { @@ -1621,24 +1623,24 @@ static EntranceTableEntry* sMoonZoraTrialEntranceTable[] = { }; static EntranceTableEntry sGoronVillageSpringEntrance0[] = { - { 0x48, 0x00, 0xC102 }, - { 0x48, 0x00, 0x8102 }, + { SCENE_11GORONNOSATO2, 0, 0xC102 }, + { SCENE_11GORONNOSATO2, 0, 0x8102 }, }; static EntranceTableEntry sGoronVillageSpringEntrance1[] = { - { 0x48, 0x01, 0x4102 }, + { SCENE_11GORONNOSATO2, 1, 0x4102 }, }; static EntranceTableEntry sGoronVillageSpringEntrance2[] = { - { 0x48, 0x02, 0x4102 }, + { SCENE_11GORONNOSATO2, 2, 0x4102 }, }; static EntranceTableEntry sGoronVillageSpringEntrance3[] = { - { 0x48, 0x03, 0x4102 }, + { SCENE_11GORONNOSATO2, 3, 0x4102 }, }; static EntranceTableEntry sGoronVillageSpringEntrance4[] = { - { 0x48, 0x04, 0x0A14 }, + { SCENE_11GORONNOSATO2, 4, 0x0A14 }, }; static EntranceTableEntry* sGoronVillageSpringEntranceTable[] = { @@ -1647,15 +1649,15 @@ static EntranceTableEntry* sGoronVillageSpringEntranceTable[] = { }; static EntranceTableEntry sGreatBayTempleEntrance0[] = { - { 0xB7, 0x00, 0x4102 }, + { -SCENE_SEA, 0, 0x4102 }, }; static EntranceTableEntry sGreatBayTempleEntrance1[] = { - { 0xB7, 0x01, 0x0102 }, + { -SCENE_SEA, 1, 0x0102 }, }; static EntranceTableEntry sGreatBayTempleEntrance2[] = { - { 0xB7, 0x02, 0x0102 }, + { -SCENE_SEA, 2, 0x0102 }, }; static EntranceTableEntry* sGreatBayTempleEntranceTable[] = { @@ -1665,19 +1667,19 @@ static EntranceTableEntry* sGreatBayTempleEntranceTable[] = { }; static EntranceTableEntry sWaterfallRapidsEntrance0[] = { - { 0x4A, 0x00, 0x4102 }, + { SCENE_35TAKI, 0, 0x4102 }, }; static EntranceTableEntry sWaterfallRapidsEntrance1[] = { - { 0x4A, 0x01, 0x0A14 }, + { SCENE_35TAKI, 1, 0x0A14 }, }; static EntranceTableEntry sWaterfallRapidsEntrance2[] = { - { 0x4A, 0x02, 0x0A14 }, + { SCENE_35TAKI, 2, 0x0A14 }, }; static EntranceTableEntry sWaterfallRapidsEntrance3[] = { - { 0x4A, 0x03, 0x0A14 }, + { SCENE_35TAKI, 3, 0x0A14 }, }; static EntranceTableEntry* sWaterfallRapidsEntranceTable[] = { @@ -1688,11 +1690,11 @@ static EntranceTableEntry* sWaterfallRapidsEntranceTable[] = { }; static EntranceTableEntry sBeneathTheWellEntrance0[] = { - { 0xB5, 0x00, 0x4102 }, + { -SCENE_REDEAD, 0, 0x4102 }, }; static EntranceTableEntry sBeneathTheWellEntrance1[] = { - { 0xB5, 0x01, 0x4102 }, + { -SCENE_REDEAD, 1, 0x4102 }, }; static EntranceTableEntry* sBeneathTheWellEntranceTable[] = { @@ -1701,31 +1703,31 @@ static EntranceTableEntry* sBeneathTheWellEntranceTable[] = { }; static EntranceTableEntry sZoraHallRoomsEntrance0[] = { - { 0x4C, 0x00, 0x0102 }, + { SCENE_BANDROOM, 0, 0x0102 }, }; static EntranceTableEntry sZoraHallRoomsEntrance1[] = { - { 0x4C, 0x01, 0x0102 }, + { SCENE_BANDROOM, 1, 0x0102 }, }; static EntranceTableEntry sZoraHallRoomsEntrance2[] = { - { 0x4C, 0x02, 0x0102 }, + { SCENE_BANDROOM, 2, 0x0102 }, }; static EntranceTableEntry sZoraHallRoomsEntrance3[] = { - { 0x4C, 0x03, 0x0102 }, + { SCENE_BANDROOM, 3, 0x0102 }, }; static EntranceTableEntry sZoraHallRoomsEntrance4[] = { - { 0x4C, 0x04, 0x858B }, + { SCENE_BANDROOM, 4, 0x858B }, }; static EntranceTableEntry sZoraHallRoomsEntrance5[] = { - { 0x4C, 0x05, 0x0102 }, + { SCENE_BANDROOM, 5, 0x0102 }, }; static EntranceTableEntry sZoraHallRoomsEntrance6[] = { - { 0x4C, 0x06, 0x0102 }, + { SCENE_BANDROOM, 6, 0x0102 }, }; static EntranceTableEntry* sZoraHallRoomsEntranceTable[] = { @@ -1734,23 +1736,23 @@ static EntranceTableEntry* sZoraHallRoomsEntranceTable[] = { }; static EntranceTableEntry sGoronVillageWinterEntrance0[] = { - { 0x4D, 0x00, 0xC102 }, + { SCENE_11GORONNOSATO, 0, 0xC102 }, }; static EntranceTableEntry sGoronVillageWinterEntrance1[] = { - { 0x4D, 0x01, 0x4102 }, + { SCENE_11GORONNOSATO, 1, 0x4102 }, }; static EntranceTableEntry sGoronVillageWinterEntrance2[] = { - { 0x4D, 0x02, 0x4102 }, + { SCENE_11GORONNOSATO, 2, 0x4102 }, }; static EntranceTableEntry sGoronVillageWinterEntrance3[] = { - { 0x4D, 0x03, 0x4102 }, + { SCENE_11GORONNOSATO, 3, 0x4102 }, }; static EntranceTableEntry sGoronVillageWinterEntrance4[] = { - { 0x4D, 0x04, 0x0A14 }, + { SCENE_11GORONNOSATO, 4, 0x0A14 }, }; static EntranceTableEntry* sGoronVillageWinterEntranceTable[] = { @@ -1759,11 +1761,11 @@ static EntranceTableEntry* sGoronVillageWinterEntranceTable[] = { }; static EntranceTableEntry sGoronGraveryardEntrance0[] = { - { 0x4E, 0x00, 0x4102 }, + { SCENE_GORON_HAKA, 0, 0x4102 }, }; static EntranceTableEntry sGoronGraveryardEntrance1[] = { - { 0x4E, 0x01, 0x058B }, + { SCENE_GORON_HAKA, 1, 0x058B }, }; static EntranceTableEntry* sGoronGraveryardEntranceTable[] = { @@ -1772,7 +1774,7 @@ static EntranceTableEntry* sGoronGraveryardEntranceTable[] = { }; static EntranceTableEntry sSakonsHideoutEntrance0[] = { - { 0x4F, 0x00, 0x4102 }, + { SCENE_SECOM, 0, 0x4102 }, }; static EntranceTableEntry* sSakonsHideoutEntranceTable[] = { @@ -1780,39 +1782,39 @@ static EntranceTableEntry* sSakonsHideoutEntranceTable[] = { }; static EntranceTableEntry sMountainVillageWinterEntrance0[] = { - { 0x50, 0x00, 0x4A14 }, + { SCENE_10YUKIYAMANOMURA, 0, 0x4A14 }, }; static EntranceTableEntry sMountainVillageWinterEntrance1[] = { - { 0x50, 0x01, 0x4102 }, + { SCENE_10YUKIYAMANOMURA, 1, 0x4102 }, }; static EntranceTableEntry sMountainVillageWinterEntrance2[] = { - { 0x50, 0x02, 0xCA14 }, + { SCENE_10YUKIYAMANOMURA, 2, 0xCA14 }, }; static EntranceTableEntry sMountainVillageWinterEntrance3[] = { - { 0x50, 0x03, 0x4102 }, + { SCENE_10YUKIYAMANOMURA, 3, 0x4102 }, }; static EntranceTableEntry sMountainVillageWinterEntrance4[] = { - { 0x50, 0x04, 0xCA14 }, + { SCENE_10YUKIYAMANOMURA, 4, 0xCA14 }, }; static EntranceTableEntry sMountainVillageWinterEntrance5[] = { - { 0x50, 0x05, 0x4102 }, + { SCENE_10YUKIYAMANOMURA, 5, 0x4102 }, }; static EntranceTableEntry sMountainVillageWinterEntrance6[] = { - { 0x50, 0x06, 0x4A14 }, + { SCENE_10YUKIYAMANOMURA, 6, 0x4A14 }, }; static EntranceTableEntry sMountainVillageWinterEntrance7[] = { - { 0x50, 0x07, 0x4A14 }, + { SCENE_10YUKIYAMANOMURA, 7, 0x4A14 }, }; static EntranceTableEntry sMountainVillageWinterEntrance8[] = { - { 0x50, 0x08, 0x4A14 }, + { SCENE_10YUKIYAMANOMURA, 8, 0x4A14 }, }; static EntranceTableEntry* sMountainVillageWinterEntranceTable[] = { @@ -1822,15 +1824,15 @@ static EntranceTableEntry* sMountainVillageWinterEntranceTable[] = { }; static EntranceTableEntry sGhostHutEntrance0[] = { - { 0x51, 0x00, 0x4102 }, + { SCENE_TOUGITES, 0, 0x4102 }, }; static EntranceTableEntry sGhostHutEntrance1[] = { - { 0x51, 0x01, 0x0102 }, + { SCENE_TOUGITES, 1, 0x0102 }, }; static EntranceTableEntry sGhostHutEntrance2[] = { - { 0x51, 0x02, 0x0102 }, + { SCENE_TOUGITES, 2, 0x0102 }, }; static EntranceTableEntry* sGhostHutEntranceTable[] = { @@ -1840,15 +1842,15 @@ static EntranceTableEntry* sGhostHutEntranceTable[] = { }; static EntranceTableEntry sDekuShrineEntrance0[] = { - { 0x52, 0x00, 0x4102 }, + { SCENE_DANPEI, 0, 0x4102 }, }; static EntranceTableEntry sDekuShrineEntrance1[] = { - { 0x52, 0x01, 0x0102 }, + { SCENE_DANPEI, 1, 0x0102 }, }; static EntranceTableEntry sDekuShrineEntrance2[] = { - { 0x52, 0x02, 0x0102 }, + { SCENE_DANPEI, 2, 0x0102 }, }; static EntranceTableEntry* sDekuShrineEntranceTable[] = { @@ -1858,15 +1860,15 @@ static EntranceTableEntry* sDekuShrineEntranceTable[] = { }; static EntranceTableEntry sRoadToIkanaEntrance0[] = { - { 0x53, 0x00, 0x8A14 }, + { SCENE_IKANAMAE, 0, 0x8A14 }, }; static EntranceTableEntry sRoadToIkanaEntrance1[] = { - { 0x53, 0x01, 0x8A14 }, + { SCENE_IKANAMAE, 1, 0x8A14 }, }; static EntranceTableEntry sRoadToIkanaEntrance2[] = { - { 0x53, 0x02, 0x0A14 }, + { SCENE_IKANAMAE, 2, 0x0A14 }, }; static EntranceTableEntry* sRoadToIkanaEntranceTable[] = { @@ -1876,7 +1878,7 @@ static EntranceTableEntry* sRoadToIkanaEntranceTable[] = { }; static EntranceTableEntry sMusicBoxHouseEntrance0[] = { - { 0x55, 0x00, 0x4102 }, + { SCENE_MUSICHOUSE, 0, 0x4102 }, }; static EntranceTableEntry* sMusicBoxHouseEntranceTable[] = { @@ -1884,8 +1886,8 @@ static EntranceTableEntry* sMusicBoxHouseEntranceTable[] = { }; static EntranceTableEntry sIgosDuIkanasLairEntrance0[] = { - { 0xAA, 0x00, 0x8102 }, - { 0xAA, 0x00, 0x8102 }, + { -SCENE_IKNINSIDE, 0, 0x8102 }, + { -SCENE_IKNINSIDE, 0, 0x8102 }, }; static EntranceTableEntry* sIgosDuIkanasLairEntranceTable[] = { @@ -1893,7 +1895,7 @@ static EntranceTableEntry* sIgosDuIkanasLairEntranceTable[] = { }; static EntranceTableEntry sSwordmansSchoolEntrance0[] = { - { 0x54, 0x00, 0x4102 }, + { SCENE_DOUJOU, 0, 0x4102 }, }; static EntranceTableEntry* sSwordmansSchoolEntranceTable[] = { @@ -1901,15 +1903,15 @@ static EntranceTableEntry* sSwordmansSchoolEntranceTable[] = { }; static EntranceTableEntry sTouristInformationEntrance0[] = { - { 0x57, 0x00, 0x4102 }, + { SCENE_MAP_SHOP, 0, 0x4102 }, }; static EntranceTableEntry sTouristInformationEntrance1[] = { - { 0x57, 0x01, 0x0102 }, + { SCENE_MAP_SHOP, 1, 0x0102 }, }; static EntranceTableEntry sTouristInformationEntrance2[] = { - { 0x57, 0x02, 0x0102 }, + { SCENE_MAP_SHOP, 2, 0x0102 }, }; static EntranceTableEntry* sTouristInformationEntranceTable[] = { @@ -1919,19 +1921,19 @@ static EntranceTableEntry* sTouristInformationEntranceTable[] = { }; static EntranceTableEntry sStoneTowerEntrance0[] = { - { 0x58, 0x00, 0x4102 }, + { SCENE_F40, 0, 0x4102 }, }; static EntranceTableEntry sStoneTowerEntrance1[] = { - { 0x58, 0x01, 0xCA14 }, + { SCENE_F40, 1, 0xCA14 }, }; static EntranceTableEntry sStoneTowerEntrance2[] = { - { 0x58, 0x02, 0xC102 }, + { SCENE_F40, 2, 0xC102 }, }; static EntranceTableEntry sStoneTowerEntrance3[] = { - { 0x58, 0x03, 0x4A14 }, + { SCENE_F40, 3, 0x4A14 }, }; static EntranceTableEntry* sStoneTowerEntranceTable[] = { @@ -1942,11 +1944,11 @@ static EntranceTableEntry* sStoneTowerEntranceTable[] = { }; static EntranceTableEntry sStoneTowerInvertedEntrance0[] = { - { 0x59, 0x00, 0x4A14 }, + { SCENE_F41, 0, 0x4A14 }, }; static EntranceTableEntry sStoneTowerInvertedEntrance1[] = { - { 0x59, 0x01, 0xC102 }, + { SCENE_F41, 1, 0xC102 }, }; static EntranceTableEntry* sStoneTowerInvertedEntranceTable[] = { @@ -1955,40 +1957,40 @@ static EntranceTableEntry* sStoneTowerInvertedEntranceTable[] = { }; static EntranceTableEntry sMountainVillageSpringEntrance0[] = { - { 0x5A, 0x00, 0x4A14 }, - { 0x5A, 0x00, 0x4A14 }, + { SCENE_10YUKIYAMANOMURA2, 0, 0x4A14 }, + { SCENE_10YUKIYAMANOMURA2, 0, 0x4A14 }, }; static EntranceTableEntry sMountainVillageSpringEntrance1[] = { - { 0x5A, 0x01, 0x4102 }, + { SCENE_10YUKIYAMANOMURA2, 1, 0x4102 }, }; static EntranceTableEntry sMountainVillageSpringEntrance2[] = { - { 0x5A, 0x02, 0xCA14 }, + { SCENE_10YUKIYAMANOMURA2, 2, 0xCA14 }, }; static EntranceTableEntry sMountainVillageSpringEntrance3[] = { - { 0x5A, 0x03, 0x4102 }, + { SCENE_10YUKIYAMANOMURA2, 3, 0x4102 }, }; static EntranceTableEntry sMountainVillageSpringEntrance4[] = { - { 0x5A, 0x04, 0xCA14 }, + { SCENE_10YUKIYAMANOMURA2, 4, 0xCA14 }, }; static EntranceTableEntry sMountainVillageSpringEntrance5[] = { - { 0x5A, 0x05, 0x4102 }, + { SCENE_10YUKIYAMANOMURA2, 5, 0x4102 }, }; static EntranceTableEntry sMountainVillageSpringEntrance6[] = { - { 0x5A, 0x06, 0xCA14 }, + { SCENE_10YUKIYAMANOMURA2, 6, 0xCA14 }, }; static EntranceTableEntry sMountainVillageSpringEntrance7[] = { - { 0x5A, 0x07, 0x458B }, + { SCENE_10YUKIYAMANOMURA2, 7, 0x458B }, }; static EntranceTableEntry sMountainVillageSpringEntrance8[] = { - { 0x5A, 0x08, 0x4A14 }, + { SCENE_10YUKIYAMANOMURA2, 8, 0x4A14 }, }; static EntranceTableEntry* sMountainVillageSpringEntranceTable[] = { @@ -1998,13 +2000,13 @@ static EntranceTableEntry* sMountainVillageSpringEntranceTable[] = { }; static EntranceTableEntry sPathToSnowheadEntrance0[] = { - { 0x5B, 0x00, 0xCA14 }, - { 0x5B, 0x00, 0xCA14 }, + { SCENE_14YUKIDAMANOMITI, 0, 0xCA14 }, + { SCENE_14YUKIDAMANOMITI, 0, 0xCA14 }, }; static EntranceTableEntry sPathToSnowheadEntrance1[] = { - { 0x5B, 0x01, 0xCA14 }, - { 0x5B, 0x01, 0xCA14 }, + { SCENE_14YUKIDAMANOMITI, 1, 0xCA14 }, + { SCENE_14YUKIDAMANOMITI, 1, 0xCA14 }, }; static EntranceTableEntry* sPathToSnowheadEntranceTable[] = { @@ -2013,23 +2015,23 @@ static EntranceTableEntry* sPathToSnowheadEntranceTable[] = { }; static EntranceTableEntry sSnowheadEntrance0[] = { - { 0x5C, 0x00, 0xCA14 }, - { 0x5C, 0x00, 0xCA14 }, + { SCENE_12HAKUGINMAE, 0, 0xCA14 }, + { SCENE_12HAKUGINMAE, 0, 0xCA14 }, }; static EntranceTableEntry sSnowheadEntrance1[] = { - { 0x5C, 0x01, 0x4102 }, - { 0x5C, 0x01, 0x4102 }, + { SCENE_12HAKUGINMAE, 1, 0x4102 }, + { SCENE_12HAKUGINMAE, 1, 0x4102 }, }; static EntranceTableEntry sSnowheadEntrance2[] = { - { 0x5C, 0x02, 0x4102 }, - { 0x5C, 0x02, 0x4102 }, + { SCENE_12HAKUGINMAE, 2, 0x4102 }, + { SCENE_12HAKUGINMAE, 2, 0x4102 }, }; static EntranceTableEntry sSnowheadEntrance3[] = { - { 0x5C, 0x03, 0x4102 }, - { 0x5C, 0x03, 0x4102 }, + { SCENE_12HAKUGINMAE, 3, 0x4102 }, + { SCENE_12HAKUGINMAE, 3, 0x4102 }, }; static EntranceTableEntry* sSnowheadEntranceTable[] = { @@ -2040,15 +2042,15 @@ static EntranceTableEntry* sSnowheadEntranceTable[] = { }; static EntranceTableEntry sPathToGoronVillageWinterEntrance0[] = { - { 0x5D, 0x00, 0x8A14 }, + { SCENE_17SETUGEN, 0, 0x8A14 }, }; static EntranceTableEntry sPathToGoronVillageWinterEntrance1[] = { - { 0x5D, 0x01, 0x8102 }, + { SCENE_17SETUGEN, 1, 0x8102 }, }; static EntranceTableEntry sPathToGoronVillageWinterEntrance2[] = { - { 0x5D, 0x02, 0x0102 }, + { SCENE_17SETUGEN, 2, 0x0102 }, }; static EntranceTableEntry* sPathToGoronVillageWinterEntranceTable[] = { @@ -2058,15 +2060,15 @@ static EntranceTableEntry* sPathToGoronVillageWinterEntranceTable[] = { }; static EntranceTableEntry sPathToGoronVillageSpringEntrance0[] = { - { 0x5E, 0x00, 0x8A14 }, + { SCENE_17SETUGEN2, 0, 0x8A14 }, }; static EntranceTableEntry sPathToGoronVillageSpringEntrance1[] = { - { 0x5E, 0x01, 0x8102 }, + { SCENE_17SETUGEN2, 1, 0x8102 }, }; static EntranceTableEntry sPathToGoronVillageSpringEntrance2[] = { - { 0x5E, 0x02, 0x0102 }, + { SCENE_17SETUGEN2, 2, 0x0102 }, }; static EntranceTableEntry* sPathToGoronVillageSpringEntranceTable[] = { @@ -2076,11 +2078,11 @@ static EntranceTableEntry* sPathToGoronVillageSpringEntranceTable[] = { }; static EntranceTableEntry sGyorgsLairEntrance0[] = { - { 0xA1, 0x00, 0x8102 }, + { -SCENE_SEA_BS, 0, 0x8102 }, }; static EntranceTableEntry sGyorgsLairEntrance1[] = { - { 0xA1, 0x01, 0x8102 }, + { -SCENE_SEA_BS, 1, 0x8102 }, }; static EntranceTableEntry* sGyorgsLairEntranceTable[] = { @@ -2089,7 +2091,7 @@ static EntranceTableEntry* sGyorgsLairEntranceTable[] = { }; static EntranceTableEntry sSecretShrineEntrance0[] = { - { 0xA0, 0x00, 0x4102 }, + { -SCENE_RANDOM, 0, 0x4102 }, }; static EntranceTableEntry* sSecretShrineEntranceTable[] = { @@ -2097,28 +2099,28 @@ static EntranceTableEntry* sSecretShrineEntranceTable[] = { }; static EntranceTableEntry sStockPotInnEntrance0[] = { - { 0x61, 0x00, 0x4102 }, - { 0x61, 0x00, 0x8102 }, + { SCENE_YADOYA, 0, 0x4102 }, + { SCENE_YADOYA, 0, 0x8102 }, }; static EntranceTableEntry sStockPotInnEntrance1[] = { - { 0x61, 0x01, 0x4102 }, + { SCENE_YADOYA, 1, 0x4102 }, }; static EntranceTableEntry sStockPotInnEntrance2[] = { - { 0x61, 0x02, 0x0102 }, + { SCENE_YADOYA, 2, 0x0102 }, }; static EntranceTableEntry sStockPotInnEntrance3[] = { - { 0x61, 0x03, 0x0102 }, + { SCENE_YADOYA, 3, 0x0102 }, }; static EntranceTableEntry sStockPotInnEntrance4[] = { - { 0x61, 0x04, 0x0102 }, + { SCENE_YADOYA, 4, 0x0102 }, }; static EntranceTableEntry sStockPotInnEntrance5[] = { - { 0x61, 0x05, 0x0102 }, + { SCENE_YADOYA, 5, 0x0102 }, }; static EntranceTableEntry* sStockPotInnEntranceTable[] = { @@ -2127,7 +2129,7 @@ static EntranceTableEntry* sStockPotInnEntranceTable[] = { }; static EntranceTableEntry sGreatBayCutsceneEntrance0[] = { - { 0x62, 0x00, 0x4102 }, + { SCENE_KONPEKI_ENT, 0, 0x4102 }, }; static EntranceTableEntry* sGreatBayCutsceneEntranceTable[] = { @@ -2135,31 +2137,31 @@ static EntranceTableEntry* sGreatBayCutsceneEntranceTable[] = { }; static EntranceTableEntry sClockTowerInteriorEntrance0[] = { - { 0x63, 0x00, 0x0102 }, + { SCENE_INSIDETOWER, 0, 0x0102 }, }; static EntranceTableEntry sClockTowerInteriorEntrance1[] = { - { 0x63, 0x01, 0x0102 }, + { SCENE_INSIDETOWER, 1, 0x0102 }, }; static EntranceTableEntry sClockTowerInteriorEntrance2[] = { - { 0x63, 0x02, 0x058B }, + { SCENE_INSIDETOWER, 2, 0x058B }, }; static EntranceTableEntry sClockTowerInteriorEntrance3[] = { - { 0x63, 0x03, 0x0102 }, + { SCENE_INSIDETOWER, 3, 0x0102 }, }; static EntranceTableEntry sClockTowerInteriorEntrance4[] = { - { 0x63, 0x04, 0x058B }, + { SCENE_INSIDETOWER, 4, 0x058B }, }; static EntranceTableEntry sClockTowerInteriorEntrance5[] = { - { 0x63, 0x05, 0x0102 }, + { SCENE_INSIDETOWER, 5, 0x0102 }, }; static EntranceTableEntry sClockTowerInteriorEntrance6[] = { - { 0x63, 0x06, 0x858B }, + { SCENE_INSIDETOWER, 6, 0x858B }, }; static EntranceTableEntry* sClockTowerInteriorEntranceTable[] = { @@ -2169,7 +2171,7 @@ static EntranceTableEntry* sClockTowerInteriorEntranceTable[] = { }; static EntranceTableEntry sWoodsOfMysteryEntrance0[] = { - { 0x64, 0x00, 0x4102 }, + { SCENE_26SARUNOMORI, 0, 0x4102 }, }; static EntranceTableEntry* sWoodsOfMysteryEntranceTable[] = { @@ -2177,24 +2179,24 @@ static EntranceTableEntry* sWoodsOfMysteryEntranceTable[] = { }; static EntranceTableEntry sLostWoodsEntrance0[] = { - { 0x9B, 0x00, 0x858B }, - { 0x9B, 0x00, 0x8183 }, - { 0x9B, 0x00, 0x858B }, - { 0x9B, 0x00, 0x8102 }, + { -SCENE_LOST_WOODS, 0, 0x858B }, + { -SCENE_LOST_WOODS, 0, 0x8183 }, + { -SCENE_LOST_WOODS, 0, 0x858B }, + { -SCENE_LOST_WOODS, 0, 0x8102 }, }; static EntranceTableEntry sLostWoodsEntrance1[] = { - { 0x9B, 0x01, 0x058B }, - { 0x9B, 0x01, 0x058B }, - { 0x9B, 0x01, 0x058B }, - { 0x9B, 0x01, 0x058B }, + { -SCENE_LOST_WOODS, 1, 0x058B }, + { -SCENE_LOST_WOODS, 1, 0x058B }, + { -SCENE_LOST_WOODS, 1, 0x058B }, + { -SCENE_LOST_WOODS, 1, 0x058B }, }; static EntranceTableEntry sLostWoodsEntrance2[] = { - { 0x9B, 0x02, 0x058B }, - { 0x9B, 0x02, 0x058B }, - { 0x9B, 0x02, 0x058B }, - { 0x9B, 0x02, 0x058B }, + { -SCENE_LOST_WOODS, 2, 0x058B }, + { -SCENE_LOST_WOODS, 2, 0x058B }, + { -SCENE_LOST_WOODS, 2, 0x058B }, + { -SCENE_LOST_WOODS, 2, 0x058B }, }; static EntranceTableEntry* sLostWoodsEntranceTable[] = { @@ -2204,7 +2206,7 @@ static EntranceTableEntry* sLostWoodsEntranceTable[] = { }; static EntranceTableEntry sMoonLinkTrialEntrance0[] = { - { 0x66, 0x00, 0x0387 }, + { SCENE_LAST_LINK, 0, 0x0387 }, }; static EntranceTableEntry* sMoonLinkTrialEntranceTable[] = { @@ -2212,7 +2214,7 @@ static EntranceTableEntry* sMoonLinkTrialEntranceTable[] = { }; static EntranceTableEntry sTheMoonEntrance0[] = { - { 0x67, 0x00, 0x0387 }, + { SCENE_SOUGEN, 0, 0x0387 }, }; static EntranceTableEntry* sTheMoonEntranceTable[] = { @@ -2220,11 +2222,11 @@ static EntranceTableEntry* sTheMoonEntranceTable[] = { }; static EntranceTableEntry sBombShopEntrance0[] = { - { 0x68, 0x00, 0x4102 }, + { SCENE_BOMYA, 0, 0x4102 }, }; static EntranceTableEntry sBombShopEntrance1[] = { - { 0x68, 0x01, 0x0102 }, + { SCENE_BOMYA, 1, 0x0102 }, }; static EntranceTableEntry* sBombShopEntranceTable[] = { @@ -2233,9 +2235,10 @@ static EntranceTableEntry* sBombShopEntranceTable[] = { }; static EntranceTableEntry sGiantsChamberEntrance0[] = { - { 0x69, 0x00, 0x0102 }, { 0x69, 0x00, 0x0102 }, { 0x69, 0x00, 0x0102 }, { 0x69, 0x00, 0x0102 }, - { 0x69, 0x00, 0x0102 }, { 0x69, 0x00, 0x0102 }, { 0x69, 0x00, 0x0102 }, { 0x69, 0x00, 0x0102 }, - { 0x69, 0x00, 0x0102 }, { 0x69, 0x00, 0x0102 }, { 0x69, 0x00, 0x0102 }, + { SCENE_KYOJINNOMA, 0, 0x0102 }, { SCENE_KYOJINNOMA, 0, 0x0102 }, { SCENE_KYOJINNOMA, 0, 0x0102 }, + { SCENE_KYOJINNOMA, 0, 0x0102 }, { SCENE_KYOJINNOMA, 0, 0x0102 }, { SCENE_KYOJINNOMA, 0, 0x0102 }, + { SCENE_KYOJINNOMA, 0, 0x0102 }, { SCENE_KYOJINNOMA, 0, 0x0102 }, { SCENE_KYOJINNOMA, 0, 0x0102 }, + { SCENE_KYOJINNOMA, 0, 0x0102 }, { SCENE_KYOJINNOMA, 0, 0x0102 }, }; static EntranceTableEntry* sGiantsChamberEntranceTable[] = { @@ -2243,27 +2246,27 @@ static EntranceTableEntry* sGiantsChamberEntranceTable[] = { }; static EntranceTableEntry sGormanTrackEntrance0[] = { - { 0x6A, 0x00, 0x4A14 }, + { SCENE_KOEPONARACE, 0, 0x4A14 }, }; static EntranceTableEntry sGormanTrackEntrance1[] = { - { 0x6A, 0x01, 0x4A14 }, + { SCENE_KOEPONARACE, 1, 0x4A14 }, }; static EntranceTableEntry sGormanTrackEntrance2[] = { - { 0x6A, 0x02, 0x4A14 }, + { SCENE_KOEPONARACE, 2, 0x4A14 }, }; static EntranceTableEntry sGormanTrackEntrance3[] = { - { 0x6A, 0x03, 0x4A14 }, + { SCENE_KOEPONARACE, 3, 0x4A14 }, }; static EntranceTableEntry sGormanTrackEntrance4[] = { - { 0x6A, 0x04, 0x0102 }, + { SCENE_KOEPONARACE, 4, 0x0102 }, }; static EntranceTableEntry sGormanTrackEntrance5[] = { - { 0x6A, 0x05, 0x0A14 }, + { SCENE_KOEPONARACE, 5, 0x0A14 }, }; static EntranceTableEntry* sGormanTrackEntranceTable[] = { @@ -2272,18 +2275,18 @@ static EntranceTableEntry* sGormanTrackEntranceTable[] = { }; static EntranceTableEntry sGoronRacetrackEntrance0[] = { - { 0x6B, 0x00, 0x4102 }, - { 0x6B, 0x00, 0x4102 }, + { SCENE_GORONRACE, 0, 0x4102 }, + { SCENE_GORONRACE, 0, 0x4102 }, }; static EntranceTableEntry sGoronRacetrackEntrance1[] = { - { 0x6B, 0x01, 0x8A14 }, - { 0x6B, 0x01, 0x8A14 }, + { SCENE_GORONRACE, 1, 0x8A14 }, + { SCENE_GORONRACE, 1, 0x8A14 }, }; static EntranceTableEntry sGoronRacetrackEntrance2[] = { - { 0x6B, 0x02, 0x0A14 }, - { 0x6B, 0x02, 0x0A14 }, + { SCENE_GORONRACE, 2, 0x0A14 }, + { SCENE_GORONRACE, 2, 0x0A14 }, }; static EntranceTableEntry* sGoronRacetrackEntranceTable[] = { @@ -2293,57 +2296,57 @@ static EntranceTableEntry* sGoronRacetrackEntranceTable[] = { }; static EntranceTableEntry sEastClockTownEntrance0[] = { - { 0x6C, 0x00, 0x4102 }, - { 0x6C, 0x00, 0x8102 }, - { 0x6C, 0x00, 0x058B }, + { SCENE_TOWN, 0, 0x4102 }, + { SCENE_TOWN, 0, 0x8102 }, + { SCENE_TOWN, 0, 0x058B }, }; static EntranceTableEntry sEastClockTownEntrance1[] = { - { 0x6C, 0x01, 0xCA14 }, + { SCENE_TOWN, 1, 0xCA14 }, }; static EntranceTableEntry sEastClockTownEntrance2[] = { - { 0x6C, 0x02, 0x4102 }, + { SCENE_TOWN, 2, 0x4102 }, }; static EntranceTableEntry sEastClockTownEntrance3[] = { - { 0x6C, 0x03, 0xC102 }, + { SCENE_TOWN, 3, 0xC102 }, }; static EntranceTableEntry sEastClockTownEntrance4[] = { - { 0x6C, 0x04, 0x4102 }, + { SCENE_TOWN, 4, 0x4102 }, }; static EntranceTableEntry sEastClockTownEntrance5[] = { - { 0x6C, 0x05, 0xC102 }, + { SCENE_TOWN, 5, 0xC102 }, }; static EntranceTableEntry sEastClockTownEntrance6[] = { - { 0x6C, 0x06, 0x4102 }, + { SCENE_TOWN, 6, 0x4102 }, }; static EntranceTableEntry sEastClockTownEntrance7[] = { - { 0x6C, 0x07, 0x4102 }, + { SCENE_TOWN, 7, 0x4102 }, }; static EntranceTableEntry sEastClockTownEntrance8[] = { - { 0x6C, 0x08, 0x4102 }, + { SCENE_TOWN, 8, 0x4102 }, }; static EntranceTableEntry sEastClockTownEntrance9[] = { - { 0x6C, 0x09, 0x4102 }, + { SCENE_TOWN, 9, 0x4102 }, }; static EntranceTableEntry sEastClockTownEntrance10[] = { - { 0x6C, 0x0A, 0x4102 }, + { SCENE_TOWN, 10, 0x4102 }, }; static EntranceTableEntry sEastClockTownEntrance11[] = { - { 0x6C, 0x0B, 0x4102 }, + { SCENE_TOWN, 11, 0x4102 }, }; static EntranceTableEntry sEastClockTownEntrance12[] = { - { 0x6C, 0x0C, 0x4102 }, + { SCENE_TOWN, 12, 0x4102 }, }; static EntranceTableEntry* sEastClockTownEntranceTable[] = { @@ -2354,44 +2357,44 @@ static EntranceTableEntry* sEastClockTownEntranceTable[] = { }; static EntranceTableEntry sWestClockTownEntrance0[] = { - { 0x6D, 0x00, 0x4102 }, - { 0x6D, 0x00, 0x8102 }, + { SCENE_ICHIBA, 0, 0x4102 }, + { SCENE_ICHIBA, 0, 0x8102 }, }; static EntranceTableEntry sWestClockTownEntrance1[] = { - { 0x6D, 0x01, 0xC102 }, + { SCENE_ICHIBA, 1, 0xC102 }, }; static EntranceTableEntry sWestClockTownEntrance2[] = { - { 0x6D, 0x02, 0xCA14 }, + { SCENE_ICHIBA, 2, 0xCA14 }, }; static EntranceTableEntry sWestClockTownEntrance3[] = { - { 0x6D, 0x03, 0x4102 }, + { SCENE_ICHIBA, 3, 0x4102 }, }; static EntranceTableEntry sWestClockTownEntrance4[] = { - { 0x6D, 0x04, 0x4102 }, + { SCENE_ICHIBA, 4, 0x4102 }, }; static EntranceTableEntry sWestClockTownEntrance5[] = { - { 0x6D, 0x05, 0x4102 }, + { SCENE_ICHIBA, 5, 0x4102 }, }; static EntranceTableEntry sWestClockTownEntrance6[] = { - { 0x6D, 0x06, 0x4102 }, + { SCENE_ICHIBA, 6, 0x4102 }, }; static EntranceTableEntry sWestClockTownEntrance7[] = { - { 0x6D, 0x07, 0x4102 }, + { SCENE_ICHIBA, 7, 0x4102 }, }; static EntranceTableEntry sWestClockTownEntrance8[] = { - { 0x6D, 0x08, 0x4102 }, + { SCENE_ICHIBA, 8, 0x4102 }, }; static EntranceTableEntry sWestClockTownEntrance9[] = { - { 0x6D, 0x09, 0x4A14 }, + { SCENE_ICHIBA, 9, 0x4A14 }, }; static EntranceTableEntry* sWestClockTownEntranceTable[] = { @@ -2401,36 +2404,36 @@ static EntranceTableEntry* sWestClockTownEntranceTable[] = { }; static EntranceTableEntry sNorthClockTownEntrance0[] = { - { 0x6E, 0x00, 0x4102 }, - { 0x6E, 0x00, 0x458B }, + { SCENE_BACKTOWN, 0, 0x4102 }, + { SCENE_BACKTOWN, 0, 0x458B }, }; static EntranceTableEntry sNorthClockTownEntrance1[] = { - { 0x6E, 0x01, 0xC102 }, + { SCENE_BACKTOWN, 1, 0xC102 }, }; static EntranceTableEntry sNorthClockTownEntrance2[] = { - { 0x6E, 0x02, 0xC102 }, + { SCENE_BACKTOWN, 2, 0xC102 }, }; static EntranceTableEntry sNorthClockTownEntrance3[] = { - { 0x6E, 0x03, 0x4102 }, + { SCENE_BACKTOWN, 3, 0x4102 }, }; static EntranceTableEntry sNorthClockTownEntrance4[] = { - { 0x6E, 0x04, 0x4102 }, + { SCENE_BACKTOWN, 4, 0x4102 }, }; static EntranceTableEntry sNorthClockTownEntrance5[] = { - { 0x6E, 0x05, 0x8A14 }, + { SCENE_BACKTOWN, 5, 0x8A14 }, }; static EntranceTableEntry sNorthClockTownEntrance6[] = { - { 0x6E, 0x06, 0x8A14 }, + { SCENE_BACKTOWN, 6, 0x8A14 }, }; static EntranceTableEntry sNorthClockTownEntrance7[] = { - { 0x6E, 0x07, 0x8A14 }, + { SCENE_BACKTOWN, 7, 0x8A14 }, }; static EntranceTableEntry* sNorthClockTownEntranceTable[] = { @@ -2439,51 +2442,51 @@ static EntranceTableEntry* sNorthClockTownEntranceTable[] = { }; static EntranceTableEntry sSouthClockTownEntrance0[] = { - { 0x6F, 0x00, 0x4102 }, - { 0x6F, 0x00, 0x8102 }, - { 0x6F, 0x00, 0x0A14 }, - { 0x6F, 0x00, 0x0102 }, + { SCENE_CLOCKTOWER, 0, 0x4102 }, + { SCENE_CLOCKTOWER, 0, 0x8102 }, + { SCENE_CLOCKTOWER, 0, 0x0A14 }, + { SCENE_CLOCKTOWER, 0, 0x0102 }, }; static EntranceTableEntry sSouthClockTownEntrance1[] = { - { 0x6F, 0x01, 0x4102 }, - { 0x6F, 0x01, 0x8102 }, + { SCENE_CLOCKTOWER, 1, 0x4102 }, + { SCENE_CLOCKTOWER, 1, 0x8102 }, }; static EntranceTableEntry sSouthClockTownEntrance2[] = { - { 0x6F, 0x02, 0xC102 }, + { SCENE_CLOCKTOWER, 2, 0xC102 }, }; static EntranceTableEntry sSouthClockTownEntrance3[] = { - { 0x6F, 0x03, 0xCA14 }, + { SCENE_CLOCKTOWER, 3, 0xCA14 }, }; static EntranceTableEntry sSouthClockTownEntrance4[] = { - { 0x6F, 0x04, 0xC102 }, + { SCENE_CLOCKTOWER, 4, 0xC102 }, }; static EntranceTableEntry sSouthClockTownEntrance5[] = { - { 0x6F, 0x05, 0xC102 }, + { SCENE_CLOCKTOWER, 5, 0xC102 }, }; static EntranceTableEntry sSouthClockTownEntrance6[] = { - { 0x6F, 0x06, 0xCA14 }, + { SCENE_CLOCKTOWER, 6, 0xCA14 }, }; static EntranceTableEntry sSouthClockTownEntrance7[] = { - { 0x6F, 0x07, 0xCA14 }, + { SCENE_CLOCKTOWER, 7, 0xCA14 }, }; static EntranceTableEntry sSouthClockTownEntrance8[] = { - { 0x6F, 0x08, 0x4A14 }, + { SCENE_CLOCKTOWER, 8, 0x4A14 }, }; static EntranceTableEntry sSouthClockTownEntrance9[] = { - { 0x6F, 0x09, 0x4A14 }, + { SCENE_CLOCKTOWER, 9, 0x4A14 }, }; static EntranceTableEntry sSouthClockTownEntrance10[] = { - { 0x6F, 0x0A, 0x058B }, + { SCENE_CLOCKTOWER, 10, 0x058B }, }; static EntranceTableEntry* sSouthClockTownEntranceTable[] = { @@ -2493,15 +2496,15 @@ static EntranceTableEntry* sSouthClockTownEntranceTable[] = { }; static EntranceTableEntry sLaundryPoolEntrance0[] = { - { 0x70, 0x00, 0xCA14 }, + { SCENE_ALLEY, 0, 0xCA14 }, }; static EntranceTableEntry sLaundryPoolEntrance1[] = { - { 0x70, 0x01, 0x4A14 }, + { SCENE_ALLEY, 1, 0x4A14 }, }; static EntranceTableEntry sLaundryPoolEntrance2[] = { - { 0x70, 0x02, 0x4102 }, + { SCENE_ALLEY, 2, 0x4102 }, }; static EntranceTableEntry* sLaundryPoolEntranceTable[] = { @@ -2511,71 +2514,71 @@ static EntranceTableEntry* sLaundryPoolEntranceTable[] = { }; static EntranceTableEntry sGrottosEntrance0[] = { - { 0x07, 0x00, 0x0102 }, + { SCENE_KAKUSIANA, 0, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance1[] = { - { 0x07, 0x01, 0x0102 }, + { SCENE_KAKUSIANA, 1, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance2[] = { - { 0x07, 0x02, 0x0102 }, + { SCENE_KAKUSIANA, 2, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance3[] = { - { 0x07, 0x03, 0x0102 }, + { SCENE_KAKUSIANA, 3, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance4[] = { - { 0x07, 0x04, 0x0102 }, + { SCENE_KAKUSIANA, 4, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance5[] = { - { 0x07, 0x05, 0x0102 }, + { SCENE_KAKUSIANA, 5, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance6[] = { - { 0x07, 0x06, 0x0102 }, + { SCENE_KAKUSIANA, 6, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance7[] = { - { 0x07, 0x07, 0x0102 }, + { SCENE_KAKUSIANA, SCENE_KAKUSIANA, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance8[] = { - { 0x07, 0x08, 0x0102 }, + { SCENE_KAKUSIANA, 8, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance9[] = { - { 0x07, 0x09, 0x0102 }, + { SCENE_KAKUSIANA, 9, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance10[] = { - { 0x07, 0x0A, 0x0102 }, + { SCENE_KAKUSIANA, 10, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance11[] = { - { 0x07, 0x0B, 0x0102 }, + { SCENE_KAKUSIANA, 11, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance12[] = { - { 0x07, 0x0C, 0x0102 }, + { SCENE_KAKUSIANA, 12, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance13[] = { - { 0x07, 0x0D, 0x0102 }, + { SCENE_KAKUSIANA, 13, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance14[] = { - { 0x07, 0x0E, 0x0102 }, + { SCENE_KAKUSIANA, 14, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance15[] = { - { 0x07, 0x0F, 0x0102 }, + { SCENE_KAKUSIANA, 15, 0x0102 }, }; static EntranceTableEntry sGrottosEntrance16[] = { - { 0x07, 0x10, 0x0102 }, + { SCENE_KAKUSIANA, 16, 0x0102 }, }; static EntranceTableEntry* sGrottosEntranceTable[] = { @@ -2586,63 +2589,73 @@ static EntranceTableEntry* sGrottosEntranceTable[] = { }; static EntranceTableEntry sCutsceneEntrance0[] = { - { 0xF8, 0x00, 0x0102 }, { 0xF8, 0x00, 0x0102 }, { 0xF8, 0x00, 0x8102 }, { 0xF8, 0x00, 0x0102 }, - { 0xF8, 0x00, 0x058B }, { 0xF8, 0x00, 0x058B }, { 0xF8, 0x00, 0x058B }, { 0xF8, 0x00, 0x058B }, - { 0xF8, 0x00, 0x0183 }, { 0xF8, 0x00, 0x0183 }, { 0xF8, 0x00, 0x8102 }, { 0xF8, 0x00, 0x0102 }, + { -SCENE_SPOT00, 0, 0x0102 }, { -SCENE_SPOT00, 0, 0x0102 }, { -SCENE_SPOT00, 0, 0x8102 }, + { -SCENE_SPOT00, 0, 0x0102 }, { -SCENE_SPOT00, 0, 0x058B }, { -SCENE_SPOT00, 0, 0x058B }, + { -SCENE_SPOT00, 0, 0x058B }, { -SCENE_SPOT00, 0, 0x058B }, { -SCENE_SPOT00, 0, 0x0183 }, + { -SCENE_SPOT00, 0, 0x0183 }, { -SCENE_SPOT00, 0, 0x8102 }, { -SCENE_SPOT00, 0, 0x0102 }, }; static EntranceTableEntry sCutsceneEntrance1[] = { - { 0xF8, 0x01, 0x0183 }, { 0xF8, 0x01, 0x0102 }, { 0xF8, 0x01, 0x8102 }, { 0xF8, 0x01, 0x0102 }, - { 0xF8, 0x01, 0x8102 }, { 0xF8, 0x01, 0x058B }, { 0xF8, 0x01, 0x058B }, { 0xF8, 0x01, 0x058B }, - { 0xF8, 0x01, 0x058B }, { 0xF8, 0x01, 0x8102 }, { 0xF8, 0x01, 0x8102 }, { 0xF8, 0x01, 0x0102 }, + { -SCENE_SPOT00, 1, 0x0183 }, { -SCENE_SPOT00, 1, 0x0102 }, { -SCENE_SPOT00, 1, 0x8102 }, + { -SCENE_SPOT00, 1, 0x0102 }, { -SCENE_SPOT00, 1, 0x8102 }, { -SCENE_SPOT00, 1, 0x058B }, + { -SCENE_SPOT00, 1, 0x058B }, { -SCENE_SPOT00, 1, 0x058B }, { -SCENE_SPOT00, 1, 0x058B }, + { -SCENE_SPOT00, 1, 0x8102 }, { -SCENE_SPOT00, 1, 0x8102 }, { -SCENE_SPOT00, 1, 0x0102 }, }; static EntranceTableEntry sCutsceneEntrance2[] = { - { 0xF8, 0x02, 0x0183 }, { 0xF8, 0x02, 0x0102 }, { 0xF8, 0x02, 0x8102 }, { 0xF8, 0x02, 0x0102 }, - { 0xF8, 0x02, 0x8102 }, { 0xF8, 0x02, 0x058B }, { 0xF8, 0x02, 0x058B }, { 0xF8, 0x02, 0x058B }, - { 0xF8, 0x02, 0x058B }, { 0xF8, 0x02, 0x858B }, { 0xF8, 0x02, 0x8102 }, + { -SCENE_SPOT00, 2, 0x0183 }, { -SCENE_SPOT00, 2, 0x0102 }, { -SCENE_SPOT00, 2, 0x8102 }, + { -SCENE_SPOT00, 2, 0x0102 }, { -SCENE_SPOT00, 2, 0x8102 }, { -SCENE_SPOT00, 2, 0x058B }, + { -SCENE_SPOT00, 2, 0x058B }, { -SCENE_SPOT00, 2, 0x058B }, { -SCENE_SPOT00, 2, 0x058B }, + { -SCENE_SPOT00, 2, 0x858B }, { -SCENE_SPOT00, 2, 0x8102 }, }; static EntranceTableEntry sCutsceneEntrance3[] = { - { 0xF8, 0x03, 0x0183 }, { 0xF8, 0x03, 0x0102 }, { 0xF8, 0x03, 0x8102 }, { 0xF8, 0x03, 0x0102 }, - { 0xF8, 0x03, 0x058B }, { 0xF8, 0x03, 0x058B }, { 0xF8, 0x03, 0x058B }, { 0xF8, 0x03, 0x058B }, - { 0xF8, 0x03, 0x058B }, { 0xF8, 0x03, 0x058B }, { 0xF8, 0x03, 0x8102 }, + { -SCENE_SPOT00, 3, 0x0183 }, { -SCENE_SPOT00, 3, 0x0102 }, { -SCENE_SPOT00, 3, 0x8102 }, + { -SCENE_SPOT00, 3, 0x0102 }, { -SCENE_SPOT00, 3, 0x058B }, { -SCENE_SPOT00, 3, 0x058B }, + { -SCENE_SPOT00, 3, 0x058B }, { -SCENE_SPOT00, 3, 0x058B }, { -SCENE_SPOT00, 3, 0x058B }, + { -SCENE_SPOT00, 3, 0x058B }, { -SCENE_SPOT00, 3, 0x8102 }, }; static EntranceTableEntry sCutsceneEntrance4[] = { - { 0xF8, 0x04, 0x0183 }, { 0xF8, 0x04, 0x0102 }, { 0xF8, 0x04, 0x8102 }, { 0xF8, 0x04, 0x0102 }, - { 0xF8, 0x04, 0x058B }, { 0xF8, 0x04, 0x058B }, { 0xF8, 0x04, 0x058B }, { 0xF8, 0x04, 0x058B }, - { 0xF8, 0x04, 0x058B }, { 0xF8, 0x04, 0x058B }, { 0xF8, 0x04, 0x8102 }, + { -SCENE_SPOT00, 4, 0x0183 }, { -SCENE_SPOT00, 4, 0x0102 }, { -SCENE_SPOT00, 4, 0x8102 }, + { -SCENE_SPOT00, 4, 0x0102 }, { -SCENE_SPOT00, 4, 0x058B }, { -SCENE_SPOT00, 4, 0x058B }, + { -SCENE_SPOT00, 4, 0x058B }, { -SCENE_SPOT00, 4, 0x058B }, { -SCENE_SPOT00, 4, 0x058B }, + { -SCENE_SPOT00, 4, 0x058B }, { -SCENE_SPOT00, 4, 0x8102 }, }; static EntranceTableEntry sCutsceneEntrance5[] = { - { 0xF8, 0x05, 0x0183 }, { 0xF8, 0x05, 0x0102 }, { 0xF8, 0x05, 0x8102 }, { 0xF8, 0x05, 0x0102 }, - { 0xF8, 0x05, 0x058B }, { 0xF8, 0x05, 0x058B }, { 0xF8, 0x05, 0x058B }, { 0xF8, 0x05, 0x058B }, - { 0xF8, 0x05, 0x058B }, { 0xF8, 0x05, 0x858B }, { 0xF8, 0x05, 0x8102 }, + { -SCENE_SPOT00, 5, 0x0183 }, { -SCENE_SPOT00, 5, 0x0102 }, { -SCENE_SPOT00, 5, 0x8102 }, + { -SCENE_SPOT00, 5, 0x0102 }, { -SCENE_SPOT00, 5, 0x058B }, { -SCENE_SPOT00, 5, 0x058B }, + { -SCENE_SPOT00, 5, 0x058B }, { -SCENE_SPOT00, 5, 0x058B }, { -SCENE_SPOT00, 5, 0x058B }, + { -SCENE_SPOT00, 5, 0x858B }, { -SCENE_SPOT00, 5, 0x8102 }, }; static EntranceTableEntry sCutsceneEntrance6[] = { - { 0xF8, 0x06, 0x0183 }, { 0xF8, 0x06, 0x0102 }, { 0xF8, 0x06, 0x8102 }, { 0xF8, 0x06, 0x0102 }, - { 0xF8, 0x06, 0x058B }, { 0xF8, 0x06, 0x058B }, { 0xF8, 0x06, 0x058B }, { 0xF8, 0x06, 0x058B }, - { 0xF8, 0x06, 0x058B }, { 0xF8, 0x06, 0x858B }, { 0xF8, 0x06, 0x8102 }, + { -SCENE_SPOT00, 6, 0x0183 }, { -SCENE_SPOT00, 6, 0x0102 }, { -SCENE_SPOT00, 6, 0x8102 }, + { -SCENE_SPOT00, 6, 0x0102 }, { -SCENE_SPOT00, 6, 0x058B }, { -SCENE_SPOT00, 6, 0x058B }, + { -SCENE_SPOT00, 6, 0x058B }, { -SCENE_SPOT00, 6, 0x058B }, { -SCENE_SPOT00, 6, 0x058B }, + { -SCENE_SPOT00, 6, 0x858B }, { -SCENE_SPOT00, 6, 0x8102 }, }; static EntranceTableEntry sCutsceneEntrance7[] = { - { 0xF8, 0x07, 0x0183 }, { 0xF8, 0x07, 0x0102 }, { 0xF8, 0x07, 0x8102 }, { 0xF8, 0x07, 0x0102 }, - { 0xF8, 0x07, 0x058B }, { 0xF8, 0x07, 0x058B }, { 0xF8, 0x07, 0x058B }, { 0xF8, 0x07, 0x058B }, - { 0xF8, 0x07, 0x058B }, { 0xF8, 0x07, 0x858B }, { 0xF8, 0x07, 0x8102 }, + { -SCENE_SPOT00, 7, 0x0183 }, { -SCENE_SPOT00, 7, 0x0102 }, { -SCENE_SPOT00, 7, 0x8102 }, + { -SCENE_SPOT00, 7, 0x0102 }, { -SCENE_SPOT00, 7, 0x058B }, { -SCENE_SPOT00, 7, 0x058B }, + { -SCENE_SPOT00, 7, 0x058B }, { -SCENE_SPOT00, 7, 0x058B }, { -SCENE_SPOT00, 7, 0x058B }, + { -SCENE_SPOT00, 7, 0x858B }, { -SCENE_SPOT00, 7, 0x8102 }, }; static EntranceTableEntry sCutsceneEntrance8[] = { - { 0xF8, 0x08, 0x0183 }, { 0xF8, 0x08, 0x0102 }, { 0xF8, 0x08, 0x8102 }, { 0xF8, 0x08, 0x0102 }, - { 0xF8, 0x08, 0x058B }, { 0xF8, 0x08, 0x058B }, { 0xF8, 0x08, 0x058B }, { 0xF8, 0x08, 0x058B }, - { 0xF8, 0x08, 0x058B }, { 0xF8, 0x08, 0x858B }, { 0xF8, 0x08, 0x8102 }, + { -SCENE_SPOT00, 8, 0x0183 }, { -SCENE_SPOT00, 8, 0x0102 }, { -SCENE_SPOT00, 8, 0x8102 }, + { -SCENE_SPOT00, 8, 0x0102 }, { -SCENE_SPOT00, 8, 0x058B }, { -SCENE_SPOT00, 8, 0x058B }, + { -SCENE_SPOT00, 8, 0x058B }, { -SCENE_SPOT00, 8, 0x058B }, { -SCENE_SPOT00, 8, 0x058B }, + { -SCENE_SPOT00, 8, 0x858B }, { -SCENE_SPOT00, 8, 0x8102 }, }; static EntranceTableEntry sCutsceneEntrance9[] = { - { 0xF8, 0x09, 0x0183 }, { 0xF8, 0x09, 0x0102 }, { 0xF8, 0x09, 0x8102 }, { 0xF8, 0x09, 0x0102 }, - { 0xF8, 0x09, 0x058B }, { 0xF8, 0x09, 0x058B }, { 0xF8, 0x09, 0x058B }, { 0xF8, 0x09, 0x058B }, - { 0xF8, 0x09, 0x058B }, { 0xF8, 0x09, 0x858B }, { 0xF8, 0x09, 0x8102 }, + { -SCENE_SPOT00, 9, 0x0183 }, { -SCENE_SPOT00, 9, 0x0102 }, { -SCENE_SPOT00, 9, 0x8102 }, + { -SCENE_SPOT00, 9, 0x0102 }, { -SCENE_SPOT00, 9, 0x058B }, { -SCENE_SPOT00, 9, 0x058B }, + { -SCENE_SPOT00, 9, 0x058B }, { -SCENE_SPOT00, 9, 0x058B }, { -SCENE_SPOT00, 9, 0x058B }, + { -SCENE_SPOT00, 9, 0x858B }, { -SCENE_SPOT00, 9, 0x8102 }, }; static EntranceTableEntry* sCutsceneEntranceTable[] = { @@ -2783,19 +2796,19 @@ EntranceTableEntry* Entrance_GetTableEntry(u16 entrance) { /** * Returns the scene index from a given entrance index. */ -s32 Entrance_GetSceneNum(u16 entrance) { +s32 Entrance_GetSceneId(u16 entrance) { EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entrance); - return tableEntry->sceneNum; + return tableEntry->sceneId; } /** * Returns the absolute value scene index (since for some reason some of them are negative) from a given entrance index. */ -s32 Entrance_GetSceneNumAbsolute(u16 entrance) { +s32 Entrance_GetSceneIdAbsolute(u16 entrance) { EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entrance); - return ABS_ALT(tableEntry->sceneNum); + return ABS_ALT(tableEntry->sceneId); } /** diff --git a/src/code/z_schedule.c b/src/code/z_schedule.c index cfc6293ba4..6a24926316 100644 --- a/src/code/z_schedule.c +++ b/src/code/z_schedule.c @@ -130,9 +130,9 @@ s32 Schedule_ReturnValueS(PlayState* play, u8** script, ScheduleOutput* output) s32 Schedule_CheckNotInSceneS(PlayState* play, u8** script, ScheduleOutput* output) { ScheduleCmdCheckNotInSceneS* cmd = (ScheduleCmdCheckNotInSceneS*)*script; - s16 scene = (cmd->sceneH << 8) | cmd->sceneL; + s16 sceneId = (cmd->sceneIdH << 8) | cmd->sceneIdL; - if (scene != play->sceneNum) { + if (sceneId != play->sceneId) { *script += cmd->offset; } @@ -141,9 +141,9 @@ s32 Schedule_CheckNotInSceneS(PlayState* play, u8** script, ScheduleOutput* outp s32 Schedule_CheckNotInSceneL(PlayState* play, u8** script, ScheduleOutput* output) { ScheduleCmdCheckNotInSceneL* cmd = (ScheduleCmdCheckNotInSceneL*)*script; - s16 scene = (cmd->sceneH << 8) | cmd->sceneL; + s16 sceneId = (cmd->sceneIdH << 8) | cmd->sceneIdL; - if (scene != play->sceneNum) { + if (sceneId != play->sceneId) { *script = *script + (s16)((cmd->offsetH << 8) | cmd->offsetL); } diff --git a/src/code/z_snap.c b/src/code/z_snap.c index 7a234ca225..5d37e3eac7 100644 --- a/src/code/z_snap.c +++ b/src/code/z_snap.c @@ -21,7 +21,7 @@ s32 Snap_RecordPictographedActors(PlayState* play) { gSaveContext.save.pictoFlags0 = 0; gSaveContext.save.pictoFlags1 = 0; - if (play->sceneNum == SCENE_20SICHITAI) { + if (play->sceneId == SCENE_20SICHITAI) { Snap_SetFlag(PICTOGRAPH_IN_SWAMP); } @@ -30,7 +30,7 @@ s32 Snap_RecordPictographedActors(PlayState* play) { seen = 0; // Actors which must be pictographed in a specific scene - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_20SICHITAI: if ((actor->id == ACTOR_EN_MNK) || (actor->id == ACTOR_EN_BIGOKUTA)) { seen = PICTO_SEEN_IN_SCENE; diff --git a/src/code/z_sram_NES.c b/src/code/z_sram_NES.c index 5d018a9951..73b0a0af09 100644 --- a/src/code/z_sram_NES.c +++ b/src/code/z_sram_NES.c @@ -248,7 +248,7 @@ void Sram_ClearFlagsAtDawnOfTheFirstDay(void) { * Used by Song of Time (when clicking "Yes") and (indirectly) by the "Dawn of the New Day" cutscene */ void Sram_SaveEndOfCycle(PlayState* play) { - s16 sceneNum; + s16 sceneId; s32 j; s32 i; u8 slot; @@ -264,13 +264,13 @@ void Sram_SaveEndOfCycle(PlayState* play) { gSaveContext.save.playerData.deaths = 999; } - sceneNum = Play_GetOriginalSceneNumber(play->sceneNum); + sceneId = Play_GetOriginalSceneId(play->sceneId); Play_SaveCycleSceneFlags(&play->state); - play->actorCtx.sceneFlags.chest &= D_801C5FC0[sceneNum][2]; - play->actorCtx.sceneFlags.switches[0] &= D_801C5FC0[sceneNum][0]; - play->actorCtx.sceneFlags.switches[1] &= D_801C5FC0[sceneNum][1]; - play->actorCtx.sceneFlags.collectible[0] &= D_801C5FC0[sceneNum][3]; + play->actorCtx.sceneFlags.chest &= D_801C5FC0[sceneId][2]; + play->actorCtx.sceneFlags.switches[0] &= D_801C5FC0[sceneId][0]; + play->actorCtx.sceneFlags.switches[1] &= D_801C5FC0[sceneId][1]; + play->actorCtx.sceneFlags.collectible[0] &= D_801C5FC0[sceneId][3]; play->actorCtx.sceneFlags.clearedRoom = 0; for (i = 0; i < SCENE_MAX; i++) { @@ -608,7 +608,7 @@ SavePlayerData sSaveDefaultPlayerData = { 0xFF, // unk_20 0x0000, // owlActivationFlags 0xFF, // unk_24 - SCENE_SPOT00, // savedSceneNum + SCENE_SPOT00, // savedSceneId }; ItemEquips sSaveDefaultItemEquips = { @@ -679,7 +679,7 @@ void Sram_InitNewSave(void) { Lib_MemCpy(&gSaveContext.save.inventory, &sSaveDefaultInventory, sizeof(Inventory)); Lib_MemCpy(&gSaveContext.save.checksum, &sSaveDefaultChecksum, sizeof(gSaveContext.save.checksum)); - gSaveContext.save.horseData.scene = SCENE_F01; + gSaveContext.save.horseData.sceneId = SCENE_F01; gSaveContext.save.horseData.pos.x = -1420; gSaveContext.save.horseData.pos.y = 257; gSaveContext.save.horseData.pos.z = -1285; @@ -708,7 +708,7 @@ SavePlayerData sSaveDebugPlayerData = { 0xFF, // unk_20 0, // owlActivationFlags 0xFF, // unk_24 - SCENE_SPOT00, // savedSceneNum + SCENE_SPOT00, // savedSceneId }; ItemEquips sSaveDebugItemEquips = { @@ -839,7 +839,7 @@ void Sram_InitDebugSave(void) { gSaveContext.save.hasTatl = true; - gSaveContext.save.horseData.scene = SCENE_F01; + gSaveContext.save.horseData.sceneId = SCENE_F01; gSaveContext.save.horseData.pos.x = -1420; gSaveContext.save.horseData.pos.y = 257; gSaveContext.save.horseData.pos.z = -1285; diff --git a/src/code/z_vr_box.c b/src/code/z_vr_box.c index 7975b1c857..6dd46633c9 100644 --- a/src/code/z_vr_box.c +++ b/src/code/z_vr_box.c @@ -75,7 +75,7 @@ void func_801431E8(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyType) skyboxCtx->envB = 40; // Inverted Stone Tower Temple and Inverted Stone Tower - if ((play->sceneNum == SCENE_F41) || (play->sceneNum == SCENE_INISIE_R)) { + if ((play->sceneId == SCENE_F41) || (play->sceneId == SCENE_INISIE_R)) { skyboxCtx->rotZ = 3.15000009537f; } } diff --git a/src/overlays/actors/ovl_Dm_Ah/z_dm_ah.c b/src/overlays/actors/ovl_Dm_Ah/z_dm_ah.c index 541a4d93da..58d27d448b 100644 --- a/src/overlays/actors/ovl_Dm_Ah/z_dm_ah.c +++ b/src/overlays/actors/ovl_Dm_Ah/z_dm_ah.c @@ -162,7 +162,7 @@ void DmAh_Init(Actor* thisx, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_1; Actor_SetScale(&this->actor, 0.01f); this->unk_27C |= 1; - if ((play->sceneNum == SCENE_YADOYA) && (play->curSpawn == 4)) { + if ((play->sceneId == SCENE_YADOYA) && (play->curSpawn == 4)) { this->unk_280 = func_80C1D78C(play); func_80C1D410(this, 1); this->actionFunc = func_80C1D92C; diff --git a/src/overlays/actors/ovl_Dm_An/z_dm_an.c b/src/overlays/actors/ovl_Dm_An/z_dm_an.c index 4cd28f454c..5e03eb74c1 100644 --- a/src/overlays/actors/ovl_Dm_An/z_dm_an.c +++ b/src/overlays/actors/ovl_Dm_An/z_dm_an.c @@ -183,7 +183,7 @@ void func_80C1C958(DmAn* this, PlayState* play) { this->unk_2AE |= 1; this->actor.draw = func_80C1D0B0; - if ((play->sceneNum == SCENE_YADOYA) && (play->curSpawn == 4)) { + if ((play->sceneId == SCENE_YADOYA) && (play->curSpawn == 4)) { this->unk_2B4 = func_80C1C8E8(play); func_80C1C4D8(this, play, 1); this->actionFunc = func_80C1CC80; diff --git a/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c b/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c index 87b1e52b90..cd130e218f 100644 --- a/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c +++ b/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c @@ -449,7 +449,7 @@ void func_80AA5E2C(DmChar00* this, PlayState* play) { void func_80AA5EBC(DmChar00* this, PlayState* play) { if (play->csCtx.state != 0) { - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_LOST_WOODS: if (gSaveContext.sceneSetupIndex == 1) { func_80AA561C(this, play); @@ -527,7 +527,7 @@ void DmChar00_Init(Actor* thisx, PlayState* play) { s32 pad; DmChar00* this = THIS; - if ((play->sceneNum == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) { + if ((play->sceneId == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) { Actor_MarkForDeath(thisx); } @@ -914,7 +914,7 @@ void DmChar00_Draw(Actor* thisx, PlayState* play2) { s32 pad; Gfx* gfx = GRAPH_ALLOC(play->state.gfxCtx, sizeof(Gfx) * 4); - if ((play->csCtx.state == 0) && ((play->sceneNum != SCENE_OPENINGDAN) || (gSaveContext.sceneSetupIndex != 0) || + if ((play->csCtx.state == 0) && ((play->sceneId != SCENE_OPENINGDAN) || (gSaveContext.sceneSetupIndex != 0) || (play->roomCtx.curRoom.num != 0) || (play->csCtx.currentCsIndex != 1) || (DMCHAR00_GET(&this->actor) != DMCHAR00_0))) { return; diff --git a/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c b/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c index 5a66958169..da67e6f1cd 100644 --- a/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c +++ b/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c @@ -75,7 +75,7 @@ void DmChar02_PlaySfxForDroppingOcarinaCutscene(DmChar02* this, PlayState* play) } void DmChar02_PlaySfxForCutscenes(DmChar02* this, PlayState* play) { - if ((play->csCtx.state != 0) && (play->sceneNum == SCENE_OKUJOU) && (play->csCtx.currentCsIndex == 1)) { + if ((play->csCtx.state != 0) && (play->sceneId == SCENE_OKUJOU) && (play->csCtx.currentCsIndex == 1)) { DmChar02_PlaySfxForDroppingOcarinaCutscene(this, play); } } diff --git a/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c b/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c index 44e5732add..c0cb242812 100644 --- a/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c +++ b/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c @@ -544,7 +544,7 @@ void func_80AAD4A8(DmChar05* this, PlayState* play) { } } } else if (DMCHAR05_GET(&this->actor) == DMCHAR05_3) { - if (play->sceneNum == SCENE_OKUJOU) { + if (play->sceneId == SCENE_OKUJOU) { if (gSaveContext.sceneSetupIndex == 2) { if (play->csCtx.currentCsIndex == 0) { func_80AAD3F8(this, play); @@ -552,7 +552,7 @@ void func_80AAD4A8(DmChar05* this, PlayState* play) { func_80AAD450(this, play); } } - } else if (play->sceneNum == SCENE_SPOT00) { + } else if (play->sceneId == SCENE_SPOT00) { if (gSaveContext.sceneSetupIndex == 9) { if ((play->csCtx.currentCsIndex == 0) && (play->csCtx.frames == 255)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_EVIL_POWER); diff --git a/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.c b/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.c index b51f4df8dd..1ed25ede25 100644 --- a/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.c +++ b/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.c @@ -183,7 +183,7 @@ void func_80C248A8(DmGm* this, PlayState* play) { this->unk_2AE |= 1; this->actor.draw = func_80C25000; - if ((play->sceneNum == SCENE_YADOYA) && (play->curSpawn == 4)) { + if ((play->sceneId == SCENE_YADOYA) && (play->curSpawn == 4)) { this->unk_2B4 = func_80C24838(play); func_80C24428(this, play, 1); this->actionFunc = func_80C24BD0; diff --git a/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.c b/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.c index 4e3915af0c..910293b77f 100644 --- a/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.c +++ b/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.c @@ -95,7 +95,7 @@ void DmOpstage_Update(Actor* thisx, PlayState* play) { DmOpstage* this = THIS; this->actionFunc(this, play); - if ((play->sceneNum == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 0) && (play->csCtx.frames == 480)) { + if ((play->sceneId == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 0) && (play->csCtx.frames == 480)) { // This actor is responsible for playing the fairy sound during the exposition in the intro, // during the transition to Lost Woods, before Ocarina gets stolen. func_8019F128(NA_SE_EV_NAVY_FLY_REBIRTH); diff --git a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c index f149a97d63..5988d1913e 100644 --- a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c +++ b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c @@ -917,7 +917,7 @@ void DmStk_PlaySfxForMoonWarpCutsceneVersion2(DmStk* this, PlayState* play) { */ void DmStk_PlaySfxForCutscenes(DmStk* this, PlayState* play) { if (play->csCtx.state != 0) { - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_LOST_WOODS: if (gSaveContext.sceneSetupIndex == 1) { DmStk_PlaySfxForIntroCutsceneFirstPart(this, play); @@ -1028,13 +1028,13 @@ void DmStk_Init(Actor* thisx, PlayState* play) { this->fogG = play->lightCtx.unk8; this->fogB = play->lightCtx.unk9; - if ((play->sceneNum == SCENE_LOST_WOODS) && (gSaveContext.sceneSetupIndex == 1)) { + if ((play->sceneId == SCENE_LOST_WOODS) && (gSaveContext.sceneSetupIndex == 1)) { this->alpha = 0; this->fogN = 0; this->fogF = 1000; this->fogScale = 1.0f; this->actionFunc = DmStk_DoNothing; - } else if (play->sceneNum == SCENE_OKUJOU) { + } else if (play->sceneId == SCENE_OKUJOU) { this->alpha = 255; this->fogN = 996; this->fogF = 1000; @@ -1088,7 +1088,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) { Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); - } else if ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 0)) { + } else if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 0)) { if (!(play->actorCtx.flags & ACTORCTX_FLAG_1)) { Actor_MarkForDeath(&this->actor); } @@ -1101,7 +1101,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) { this->animIndex = SK_ANIM_BENT_OVER_HEAD_TWITCH; this->actionFunc = DmStk_WaitForTelescope; } else { - if ((play->sceneNum == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) { + if ((play->sceneId == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) { Actor_MarkForDeath(&this->actor); } @@ -1127,8 +1127,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->actor, 0.01f); - if ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 3) && - (play->csCtx.currentCsIndex > 0)) { + if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 3) && (play->csCtx.currentCsIndex > 0)) { play->envCtx.unk_17 = 15; play->envCtx.unk_18 = 15; } @@ -1316,7 +1315,7 @@ void DmStk_UpdateCutscenes(DmStk* this, PlayState* play) { if (play->csCtx.frames == play->csCtx.actorActions[actorActionIndex]->startFrame) { if (this->csAction != play->csCtx.actorActions[actorActionIndex]->action) { this->csAction = play->csCtx.actorActions[actorActionIndex]->action; - if (play->sceneNum == SCENE_CLOCKTOWER) { + if (play->sceneId == SCENE_CLOCKTOWER) { this->handType = SK_HAND_TYPE_HOLDING_FLUTE; } else { this->handType = SK_HAND_TYPE_DEFAULT; @@ -1685,7 +1684,7 @@ void DmStk_UpdateCutscenes(DmStk* this, PlayState* play) { this->handType = SK_HAND_TYPE_HOLDING_MAJORAS_MASK; } else if (((this->animIndex >= SK_ANIM_HUDDLE_WITH_FAIRIES) && (this->animIndex <= SK_ANIM_DRAW)) || ((this->animIndex >= SK_ANIM_PLAY_FLUTE) && (this->animIndex <= SK_ANIM_CARTWHEEL)) || - ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 7))) { + ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 7))) { this->maskType = SK_MASK_TYPE_NO_MASK; if ((this->animIndex == SK_ANIM_HOLD_UP_MASK_START) || (this->animIndex == SK_ANIM_HOLD_UP_MASK_LOOP)) { this->handType = SK_HAND_TYPE_HOLDING_MAJORAS_MASK_AND_FLUTE; @@ -1777,7 +1776,7 @@ void DmStk_Update(Actor* thisx, PlayState* play) { this->actionFunc(this, play); - if (play->sceneNum == SCENE_OKUJOU) { + if (play->sceneId == SCENE_OKUJOU) { DmStk_UpdateCollision(this, play); } @@ -1824,8 +1823,7 @@ void DmStk_Update(Actor* thisx, PlayState* play) { } } - if ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 3) && - (play->csCtx.currentCsIndex > 0)) { + if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 3) && (play->csCtx.currentCsIndex > 0)) { play->envCtx.unk_17 = 15; play->envCtx.unk_18 = 15; } @@ -1888,7 +1886,7 @@ void DmStk_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot break; case SK_MASK_TYPE_NORMAL: - if ((play->sceneNum == SCENE_LOST_WOODS) && (gSaveContext.sceneSetupIndex == 1) && + if ((play->sceneId == SCENE_LOST_WOODS) && (gSaveContext.sceneSetupIndex == 1) && (play->csCtx.frames < 1400)) { if (this->fogN == this->fogF) { this->fogF = this->fogN; @@ -1950,7 +1948,7 @@ void DmStk_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot case SK_HAND_TYPE_HOLDING_OCARINA: gSPDisplayList(POLY_OPA_DISP++, gSkullKidOcarinaHoldingRightHand); - if ((play->sceneNum == SCENE_LOST_WOODS) && (gSaveContext.sceneSetupIndex == 1)) { + if ((play->sceneId == SCENE_LOST_WOODS) && (gSaveContext.sceneSetupIndex == 1)) { gSPDisplayList(POLY_OPA_DISP++, gSkullKidOcarinaOfTimeDL); } break; @@ -1988,7 +1986,7 @@ void DmStk_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot break; case SK_HAND_TYPE_HOLDING_OCARINA: - if ((play->sceneNum != SCENE_LOST_WOODS) || (gSaveContext.sceneSetupIndex != 1)) { + if ((play->sceneId != SCENE_LOST_WOODS) || (gSaveContext.sceneSetupIndex != 1)) { gSPDisplayList(POLY_OPA_DISP++, gSkullKidOcarinaOfTimeDL); } gSPDisplayList(POLY_OPA_DISP++, gSkullKidTwoFingersExtendedLeftHand); 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 4aa36cfdda..6bf8adc727 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -100,7 +100,7 @@ static InitChainEntry sInitChain[] = { }; typedef struct { - /* 0x00 */ s16 sceneNum; + /* 0x00 */ s16 sceneId; /* 0x02 */ u8 index; } ShutterSceneInfo; // size = 0x4 @@ -114,8 +114,8 @@ ShutterSceneInfo D_808A2258[] = { }; typedef struct { - /* 0x00 */ s16 dungeonScene; - /* 0x02 */ s16 bossScene; + /* 0x00 */ s16 dungeonSceneId; + /* 0x02 */ s16 bossSceneId; /* 0x04 */ u8 index; } BossDoorInfo; // size = 0x6 @@ -209,7 +209,7 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) { ShutterSceneInfo* shutterSceneInfo = &D_808A2258[0]; for (i = 0; i < ARRAY_COUNT(D_808A2258) - 1; i++, shutterSceneInfo++) { - if (play->sceneNum == shutterSceneInfo->sceneNum) { + if (play->sceneId == shutterSceneInfo->sceneId) { break; } } @@ -222,7 +222,7 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) { BossDoorInfo* bossDoorInfo = &D_808A22A0[0]; for (i = 0; i < ARRAY_COUNT(D_808A22A0) - 1; i++, bossDoorInfo++) { - if ((play->sceneNum == bossDoorInfo->dungeonScene) || (play->sceneNum == bossDoorInfo->bossScene)) { + if ((play->sceneId == bossDoorInfo->dungeonSceneId) || (play->sceneId == bossDoorInfo->bossSceneId)) { break; } } diff --git a/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.c b/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.c index 93cd492e6e..be9b5c0931 100644 --- a/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.c +++ b/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.c @@ -54,7 +54,7 @@ typedef struct { // Maps scenes to SpiralObjectType typedef struct { - /* 0x00 */ s16 sceneNum; + /* 0x00 */ s16 sceneId; /* 0x02 */ u8 objectType; } SpiralSceneInfo; @@ -147,7 +147,7 @@ s32 DoorSpiral_GetObjectType(PlayState* play) { s32 type; for (i = 0; i < ARRAY_COUNT(spiralSceneInfo); sceneInfo++, i++) { - if (play->sceneNum == sceneInfo->sceneNum) { + if (play->sceneId == sceneInfo->sceneId) { break; } } 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 ba1c846b9a..03531bb312 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -75,13 +75,13 @@ void DoorWarp1_SetupAction(DoorWarp1* this, DoorWarp1ActionFunc actionFunc) { s32 func_808B849C(DoorWarp1* this, PlayState* play) { s32 ret = 0; - if ((play->sceneNum == SCENE_MITURIN_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA)) { + if ((play->sceneId == SCENE_MITURIN_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA)) { ret = 1; - } else if ((play->sceneNum == SCENE_HAKUGIN_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_GOHT)) { + } else if ((play->sceneId == SCENE_HAKUGIN_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_GOHT)) { ret = 2; - } else if ((play->sceneNum == SCENE_SEA_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_GYORG)) { + } else if ((play->sceneId == SCENE_SEA_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_GYORG)) { ret = 3; - } else if ((play->sceneNum == SCENE_INISIE_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_TWINMOLD)) { + } else if ((play->sceneId == SCENE_INISIE_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_TWINMOLD)) { ret = 4; } return ret; @@ -161,8 +161,8 @@ void DoorWarp1_Init(Actor* thisx, PlayState* play) { break; } - if ((play->sceneNum == SCENE_MITURIN_BS) || (play->sceneNum == SCENE_HAKUGIN_BS) || - (play->sceneNum == SCENE_INISIE_BS) || (play->sceneNum == SCENE_SEA_BS)) { + if ((play->sceneId == SCENE_MITURIN_BS) || (play->sceneId == SCENE_HAKUGIN_BS) || + (play->sceneId == SCENE_INISIE_BS) || (play->sceneId == SCENE_SEA_BS)) { func_800FE484(); play->interfaceCtx.restrictions.unk_312 = 1; play->interfaceCtx.restrictions.songOfSoaring = 1; @@ -268,7 +268,7 @@ void func_808B8E78(DoorWarp1* this, PlayState* play) { this->unk_1A8 = 0.0f; this->unk_1AC = 0.0f; this->unk_1A4 = 700.0f; - if (play->sceneNum == SCENE_INISIE_N) { + if (play->sceneId == SCENE_INISIE_N) { DoorWarp1_SetupAction(this, func_808B96A0); } else if (gSaveContext.save.weekEventReg[86] & 0x80) { this->unk_1D4 = 0; @@ -307,12 +307,12 @@ void func_808B90CC(DoorWarp1* this, PlayState* play) { s16 sp2E = 0; f32 phi_f0 = 0.0f; - if (play->sceneNum == SCENE_MITURIN) { + if (play->sceneId == SCENE_MITURIN) { sp2E = -10; phi_f0 = -5.0f; - } else if (play->sceneNum == SCENE_HAKUGIN) { + } else if (play->sceneId == SCENE_HAKUGIN) { sp2E = -20; - } else if (play->sceneNum == SCENE_SEA) { + } else if (play->sceneId == SCENE_SEA) { sp2E = -20; } @@ -551,7 +551,7 @@ void func_808B9CE8(DoorWarp1* this, PlayState* play) { return; } - switch (play->sceneNum) { + switch (play->sceneId) { case SCENE_MITURIN_BS: gSaveContext.save.unk_ECC[0] = (((void)0, gSaveContext.save.unk_ECC[0]) & 0xFFFFFF00) | (((u8)gSaveContext.save.unk_ECC[1]) & 0xFF); @@ -635,16 +635,16 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) { u8 phi_a0; s32 phi_v0_3; - if ((play->sceneNum == SCENE_MITURIN_BS) || (play->sceneNum == SCENE_HAKUGIN_BS) || - (play->sceneNum == SCENE_INISIE_BS) || (play->sceneNum == SCENE_SEA_BS)) { - D_801F4DE2 = play->sceneNum; - if (play->sceneNum == SCENE_MITURIN_BS) { + if ((play->sceneId == SCENE_MITURIN_BS) || (play->sceneId == SCENE_HAKUGIN_BS) || + (play->sceneId == SCENE_INISIE_BS) || (play->sceneId == SCENE_SEA_BS)) { + D_801F4DE2 = play->sceneId; + if (play->sceneId == SCENE_MITURIN_BS) { phi_v0_2 = 0; - } else if (play->sceneNum == SCENE_HAKUGIN_BS) { + } else if (play->sceneId == SCENE_HAKUGIN_BS) { phi_v0_2 = 1; - } else if (play->sceneNum == SCENE_INISIE_BS) { + } else if (play->sceneId == SCENE_INISIE_BS) { phi_v0_2 = 2; - } else if (play->sceneNum == SCENE_SEA_BS) { + } else if (play->sceneId == SCENE_SEA_BS) { phi_v0_2 = 3; } else { phi_v0_2 = 0; @@ -882,7 +882,7 @@ void func_808BAAF4(DoorWarp1* this, PlayState* play) { f32 phi_f2; phi_f2 = 200.0f; - if (play->sceneNum == SCENE_SEA) { + if (play->sceneId == SCENE_SEA) { phi_f2 = 85.0f; } @@ -1039,12 +1039,12 @@ void func_808BB4F4(DoorWarp1* this, PlayState* play2) { return; } - if (play->sceneNum != SCENE_MITURIN) { - if (play->sceneNum == SCENE_HAKUGIN) { + if (play->sceneId != SCENE_MITURIN) { + if (play->sceneId == SCENE_HAKUGIN) { sp60 = 1; - } else if (play->sceneNum == SCENE_SEA) { + } else if (play->sceneId == SCENE_SEA) { sp60 = 2; - } else if (play->sceneNum == SCENE_INISIE_R) { + } else if (play->sceneId == SCENE_INISIE_R) { sp60 = 3; } } diff --git a/src/overlays/actors/ovl_En_Baba/z_en_baba.c b/src/overlays/actors/ovl_En_Baba/z_en_baba.c index 4d783942dd..dcbbee65d6 100644 --- a/src/overlays/actors/ovl_En_Baba/z_en_baba.c +++ b/src/overlays/actors/ovl_En_Baba/z_en_baba.c @@ -503,12 +503,12 @@ void EnBaba_FinishInit(EnBaba* this, PlayState* play) { this->stateFlags |= BOMB_SHOP_LADY_STATE_DRAW_SHADOW; this->actor.flags |= ACTOR_FLAG_1; - if (play->sceneNum == SCENE_BOMYA) { + if (play->sceneId == SCENE_BOMYA) { this->stateFlags |= BOMB_SHOP_LADY_STATE_VISIBLE; this->animIndex = BOMB_SHOP_LADY_ANIM_IDLE; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnBaba_Idle; - } else if (play->sceneNum == SCENE_BACKTOWN) { + } else if (play->sceneId == SCENE_BACKTOWN) { if ((BOMB_SHOP_LADY_GET_TYPE(&this->actor) == BOMB_SHOP_LADY_TYPE_FOLLOW_SCHEDULE) && (gSaveContext.save.entrance != ENTRANCE(NORTH_CLOCK_TOWN, 7)) && (BOMB_SHOP_LADY_GET_PATH_INDEX(&this->actor) != 0x3F)) { diff --git a/src/overlays/actors/ovl_En_Bat/z_en_bat.c b/src/overlays/actors/ovl_En_Bat/z_en_bat.c index fe1eb9fd84..5bec14e3e9 100644 --- a/src/overlays/actors/ovl_En_Bat/z_en_bat.c +++ b/src/overlays/actors/ovl_En_Bat/z_en_bat.c @@ -178,7 +178,7 @@ void EnBat_Destroy(Actor* thisx, PlayState* play) { } s32 EnBat_IsGraveyardOnSecondDay(PlayState* play) { - if ((CURRENT_DAY == 2) && (play->sceneNum == SCENE_BOTI)) { + if ((CURRENT_DAY == 2) && (play->sceneId == SCENE_BOTI)) { return true; } else { return false; diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c index 4f8f28f3c7..ba7273f598 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -485,7 +485,7 @@ s32 EnBigokuta_IsNearSwampBoat(EnBigokuta* this, PlayState* play) { void EnBigokuta_CheckOneHitKill(EnBigokuta* this, PlayState* play) { if ((this->bodyCollider.base.acFlags & AC_ON) && ((this->bodyCollider.base.acFlags & AC_HIT) || - ((play->sceneNum == SCENE_20SICHITAI || play->sceneNum == SCENE_20SICHITAI2) && + ((play->sceneId == SCENE_20SICHITAI || play->sceneId == SCENE_20SICHITAI2) && EnBigokuta_IsNearSwampBoat(this, play)))) { Enemy_StartFinishingBlow(play, &this->picto.actor); diff --git a/src/overlays/actors/ovl_En_Dai/z_en_dai.c b/src/overlays/actors/ovl_En_Dai/z_en_dai.c index 31e3264092..6abf4da13e 100644 --- a/src/overlays/actors/ovl_En_Dai/z_en_dai.c +++ b/src/overlays/actors/ovl_En_Dai/z_en_dai.c @@ -176,7 +176,7 @@ s32 func_80B3E5DC(EnDai* this, s32 arg1) { s32 func_80B3E69C(EnDai* this, PlayState* play) { s32 ret = false; - if ((play->csCtx.state != 0) && (play->sceneNum == SCENE_12HAKUGINMAE) && (play->csCtx.currentCsIndex == 0) && + if ((play->csCtx.state != 0) && (play->sceneId == SCENE_12HAKUGINMAE) && (play->csCtx.currentCsIndex == 0) && !(gSaveContext.save.weekEventReg[30] & 1)) { if (!(this->unk_1CE & 0x10)) { Flags_SetSwitch(play, 20); diff --git a/src/overlays/actors/ovl_En_Dg/z_en_dg.c b/src/overlays/actors/ovl_En_Dg/z_en_dg.c index ef93a501a6..de2c586e9b 100644 --- a/src/overlays/actors/ovl_En_Dg/z_en_dg.c +++ b/src/overlays/actors/ovl_En_Dg/z_en_dg.c @@ -335,11 +335,11 @@ void EnDg_MoveAlongPath(EnDg* this, PlayState* play) { } if ((this->index == ENDG_INDEX_SWAMP_SPIDER_HOUSE) || - ((this->index == ENDG_INDEX_ROMANI_RANCH) && (play->sceneNum == SCENE_OMOYA))) { + ((this->index == ENDG_INDEX_ROMANI_RANCH) && (play->sceneId == SCENE_OMOYA))) { Math_ApproachF(&this->actor.speedXZ, 1.0f, 0.2f, 1.0f); } else if (this->index == ENDG_INDEX_ROMANI_RANCH) { Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f); - } else if (play->sceneNum == SCENE_CLOCKTOWER) { + } else if (play->sceneId == SCENE_CLOCKTOWER) { Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f); } else if (sRacetrackDogInfo[this->index].textId & 0x11) { Math_ApproachF(&this->actor.speedXZ, 1.0f, 0.2f, 1.0f); @@ -397,11 +397,11 @@ void EnDg_PlaySfxGrowl(EnDg* this, f32 frame) { void EnDg_SetupIdleMove(EnDg* this, PlayState* play) { if (!(this->actor.bgCheckFlags & 0x20)) { if ((this->index == ENDG_INDEX_SWAMP_SPIDER_HOUSE) || - ((this->index == ENDG_INDEX_ROMANI_RANCH) && (play->sceneNum == SCENE_OMOYA))) { + ((this->index == ENDG_INDEX_ROMANI_RANCH) && (play->sceneId == SCENE_OMOYA))) { EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK); } else if (this->index == ENDG_INDEX_ROMANI_RANCH) { EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); - } else if (play->sceneNum == SCENE_CLOCKTOWER) { + } else if (play->sceneId == SCENE_CLOCKTOWER) { EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); } else if (sRacetrackDogInfo[this->index].textId & 0x11) { EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK); @@ -1319,7 +1319,7 @@ void EnDg_Init(Actor* thisx, PlayState* play) { this->index = ENDG_GET_INDEX(&this->actor); this->behavior = DOG_BEHAVIOR_INITIAL; this->grabState = DOG_GRAB_STATE_NONE; - if (play->sceneNum == SCENE_F01_B) { + if (play->sceneId == SCENE_F01_B) { this->sitAfterThrowTimer = 100; EnDg_UpdateTextId(this); } @@ -1340,7 +1340,7 @@ void EnDg_Update(Actor* thisx, PlayState* play) { Vec3f floorRot = { 0.0f, 0.0f, 0.0f }; this->selectedDogIndex = sSelectedRacetrackDogInfo.index; - if (!(player->stateFlags1 & 0x20) || (play->sceneNum != SCENE_CLOCKTOWER)) { + if (!(player->stateFlags1 & 0x20) || (play->sceneId != SCENE_CLOCKTOWER)) { if (EnDg_ShouldReactToNonHumanPlayer(this, play)) { EnDg_ChooseActionForForm(this, play); } else if (this->behavior != DOG_BEHAVIOR_DEFAULT) { diff --git a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c index 65c11e0352..c17acf8cc9 100644 --- a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c +++ b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c @@ -551,7 +551,7 @@ void func_8089B580(EnDinofos* this, PlayState* play) { } if (this->skelAnime.curFrame > 35.0f) { - if ((play->sceneNum == SCENE_MITURIN) && Animation_OnFrame(&this->skelAnime, 38.0f)) { + if ((play->sceneId == SCENE_MITURIN) && Animation_OnFrame(&this->skelAnime, 38.0f)) { play->envCtx.lightSettingOverride = 11; } @@ -562,7 +562,7 @@ void func_8089B580(EnDinofos* this, PlayState* play) { } } - if ((play->sceneNum == SCENE_MITURIN) && Animation_OnFrame(&this->skelAnime, 55.0f)) { + if ((play->sceneId == SCENE_MITURIN) && Animation_OnFrame(&this->skelAnime, 55.0f)) { play->envCtx.lightSettingOverride = 0xFF; } @@ -1053,7 +1053,7 @@ void func_8089CB10(EnDinofos* this, PlayState* play) { worldSphere->center.z = this->limbPos[10].z; } - if (play->sceneNum == SCENE_MITURIN) { + if (play->sceneId == SCENE_MITURIN) { play->envCtx.lightSettingOverride = 11; } @@ -1114,7 +1114,7 @@ void func_8089CBEC(EnDinofos* this, PlayState* play) { void func_8089CF00(EnDinofos* this, PlayState* play) { Animation_PlayOnce(&this->skelAnime, &object_dinofos_Anim_0017B8); this->colliderJntSph.base.atFlags &= ~AT_ON; - if (play->sceneNum == SCENE_MITURIN) { + if (play->sceneId == SCENE_MITURIN) { play->envCtx.lightSettingOverride = 255; } this->actionFunc = func_8089CF70; @@ -1285,7 +1285,7 @@ s32 func_8089D60C(EnDinofos* this, PlayState* play) { func_8089ACEC(this, play); func_8089AD70(this); - if (play->sceneNum == SCENE_MITURIN) { + if (play->sceneId == SCENE_MITURIN) { play->envCtx.lightSettingOverride = 255; } diff --git a/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c b/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c index 7afd4e2242..0086742925 100644 --- a/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c +++ b/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c @@ -447,7 +447,7 @@ void func_80A52074(EnDnk* this, PlayState* play) { } void func_80A52134(EnDnk* this, PlayState* play) { - if ((play->csCtx.state != 0) && (ENDNK_GET_3C(&this->actor) == 4) && (play->sceneNum == SCENE_SPOT00) && + if ((play->csCtx.state != 0) && (ENDNK_GET_3C(&this->actor) == 4) && (play->sceneId == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 2)) { func_80A52074(this, play); } diff --git a/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c b/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c index 667a20b9bd..63371ee2fa 100644 --- a/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c +++ b/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c @@ -250,7 +250,7 @@ void func_80B3D11C(EnDnp* this, PlayState* play) { s32 temp_v0; s32 val; - if (!(gSaveContext.save.weekEventReg[29] & 0x40) && (play->sceneNum == SCENE_MITURIN) && + if (!(gSaveContext.save.weekEventReg[29] & 0x40) && (play->sceneId == SCENE_MITURIN) && (play->csCtx.currentCsIndex == 0)) { this->unk_322 |= 0x20; gSaveContext.save.weekEventReg[29] |= 0x40; @@ -373,7 +373,7 @@ void EnDnp_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->actor, 0.0085f); SubS_UpdateFlags(&this->unk_322, 3, 7); this->unk_322 |= 0x400; - if ((play->sceneNum == SCENE_MITURIN) && (gSaveContext.save.weekEventReg[29] & 0x40)) { + if ((play->sceneId == SCENE_MITURIN) && (gSaveContext.save.weekEventReg[29] & 0x40)) { this->unk_322 |= 0x20; func_80B3CC38(this, 1); } 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 d9bc5cee1c..892eab09c7 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -290,7 +290,7 @@ const ActorInit En_Door_InitVars = { }; typedef struct { - /* 0x00 */ s16 sceneNum; + /* 0x00 */ s16 sceneId; /* 0x02 */ u8 dListIndex; /* 0x04 */ s16 objectId; } EnDoorInfo; @@ -405,7 +405,7 @@ void EnDoor_Init(Actor* thisx, PlayState* play2) { objectInfo = &sObjInfo[17 + this->switchFlag]; } else { for (i = 0; i < ARRAY_COUNT(sObjInfo) - 34; i++, objectInfo++) { - if (play->sceneNum == objectInfo->sceneNum) { + if (play->sceneId == objectInfo->sceneId) { break; } } 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 c7ea4f5b00..f551373676 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -903,13 +903,13 @@ void func_8088E850(EnElf* this, PlayState* play) { func_8088D660(this, &nextPos, 0.2f); } - if ((play->sceneNum == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 0) && + if ((play->sceneId == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 0) && (play->csCtx.currentCsIndex == 0) && ((play->csCtx.frames == 149) || (play->csCtx.frames == 381) || (play->csCtx.frames == 591))) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH); } - if ((play->sceneNum == SCENE_SECOM) && (gSaveContext.sceneSetupIndex == 0) && + if ((play->sceneId == SCENE_SECOM) && (gSaveContext.sceneSetupIndex == 0) && (play->csCtx.currentCsIndex == 4) && (play->csCtx.frames == 95)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH); } diff --git a/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c b/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c index 61457bf508..897641a9ef 100644 --- a/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c +++ b/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c @@ -205,13 +205,13 @@ s32 func_80A39C1C(PlayState* play, s32 arg1) { } if (arg1 == 0) { - if (gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 1) { + if (gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 1) { return 25; } return 24; } - temp_v1 = (gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 >> (((arg1 - 1) * 5) + 1)) & 0x1F; + temp_v1 = (gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 >> (((arg1 - 1) * 5) + 1)) & 0x1F; if (temp_v1 < 10) { temp_v1 = 10; } else if (temp_v1 > 25) { @@ -227,13 +227,13 @@ void func_80A39CD4(PlayState* play, s32 arg1, s32 arg2) { if (arg1 == 0) { if (arg2 == 25) { - gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 |= 1; + gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 |= 1; } else { - gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 &= ~1; + gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 &= ~1; } } else { - gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 &= ~(0x1F << ((arg1 * 5) - 4)); - gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 |= arg2 << ((arg1 * 5) - 4); + gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 &= ~(0x1F << ((arg1 * 5) - 4)); + gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 |= arg2 << ((arg1 * 5) - 4); } } diff --git a/src/overlays/actors/ovl_En_Fall/z_en_fall.c b/src/overlays/actors/ovl_En_Fall/z_en_fall.c index fc1bdce227..54ea52a459 100644 --- a/src/overlays/actors/ovl_En_Fall/z_en_fall.c +++ b/src/overlays/actors/ovl_En_Fall/z_en_fall.c @@ -315,7 +315,8 @@ void EnFall_Setup(EnFall* this, PlayState* play) { void EnFall_CrashingMoon_HandleGiantsCutscene(EnFall* this, PlayState* play) { static s32 sGiantsCutsceneState = 0; - if (play->sceneNum == SCENE_00KEIKOKU && gSaveContext.sceneSetupIndex == 1 && play->csCtx.currentCsIndex == 0) { + if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 1) && + (play->csCtx.currentCsIndex == 0)) { switch (sGiantsCutsceneState) { case 0: if (play->csCtx.state != 0) { @@ -408,7 +409,7 @@ void EnFall_StoppedClosedMouthMoon_PerformCutsceneActions(EnFall* this, PlayStat } } - if (play->sceneNum == SCENE_OKUJOU && gSaveContext.sceneSetupIndex == 2) { + if (play->sceneId == SCENE_OKUJOU && gSaveContext.sceneSetupIndex == 2) { switch (play->csCtx.currentCsIndex) { case 0: switch (play->csCtx.frames) { @@ -452,7 +453,7 @@ void EnFall_StoppedClosedMouthMoon_PerformCutsceneActions(EnFall* this, PlayStat } void EnFall_ClockTowerOrTitleScreenMoon_PerformCutsceneActions(EnFall* this, PlayState* play) { - if (play->csCtx.state != 0 && play->sceneNum == SCENE_OKUJOU) { + if (play->csCtx.state != 0 && play->sceneId == SCENE_OKUJOU) { func_800B9010(&this->actor, NA_SE_EV_MOON_FALL - SFX_FLAG); } } @@ -574,7 +575,7 @@ void EnFall_Fireball_SetPerVertexAlpha(f32 fireballAlpha) { void EnFall_Fireball_Update(Actor* thisx, PlayState* play) { EnFall* this = THIS; - if (play->sceneNum == SCENE_00KEIKOKU && gSaveContext.sceneSetupIndex == 0 && play->csCtx.currentCsIndex == 2) { + if (play->sceneId == SCENE_00KEIKOKU && gSaveContext.sceneSetupIndex == 0 && play->csCtx.currentCsIndex == 2) { play->skyboxCtx.rotY -= 0.05f; } diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c index 268768660b..d5dc5469ae 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -167,7 +167,7 @@ Actor* func_8091D944(EnFish* this, PlayState* play) { } s32 func_8091DA14(EnFish* this, PlayState* play) { - return play->sceneNum == SCENE_LABO && func_8091D944(this, play); + return (play->sceneId == SCENE_LABO) && func_8091D944(this, play); } void EnFish_Init(Actor* thisx, PlayState* play) { @@ -853,7 +853,8 @@ void func_8091F5A4(Actor* thisx, PlayState* play) { func_8091D7C4(this); Actor_MoveWithGravity(&this->actor); if (this->unk_248 != 0) { - u32 temp = (play->sceneNum ^ SCENE_LABO) != 0; + u32 temp = (play->sceneId != SCENE_LABO); + phi_f0 = BREG(1) + 10.0f; if (temp) { diff --git a/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c b/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c index ebbaaca7f0..a9aaedaa18 100644 --- a/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c +++ b/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c @@ -213,15 +213,15 @@ void func_80B3B294(EnGg2* this, PlayState* play) { Vec3s sp30; if (this->unk_2F1 == 0) { - if (play->sceneNum == SCENE_11GORONNOSATO) { + if (play->sceneId == SCENE_11GORONNOSATO) { gSaveContext.save.weekEventReg[20] |= 4; gSaveContext.save.weekEventReg[20] &= (u8)~8; gSaveContext.save.weekEventReg[20] &= (u8)~0x10; - } else if (play->sceneNum == SCENE_17SETUGEN) { + } else if (play->sceneId == SCENE_17SETUGEN) { gSaveContext.save.weekEventReg[20] &= (u8)~4; gSaveContext.save.weekEventReg[20] |= 8; gSaveContext.save.weekEventReg[20] &= (u8)~0x10; - } else if (play->sceneNum == SCENE_10YUKIYAMANOMURA) { + } else if (play->sceneId == SCENE_10YUKIYAMANOMURA) { gSaveContext.save.weekEventReg[20] &= (u8)~4; gSaveContext.save.weekEventReg[20] &= (u8)~8; gSaveContext.save.weekEventReg[20] |= 0x10; @@ -239,15 +239,15 @@ void func_80B3B294(EnGg2* this, PlayState* play) { this->unk_1DC++; } else { this->unk_2F1 = 1; - if (play->sceneNum == SCENE_11GORONNOSATO) { + if (play->sceneId == SCENE_11GORONNOSATO) { gSaveContext.save.weekEventReg[20] |= 4; gSaveContext.save.weekEventReg[20] &= (u8)~8; gSaveContext.save.weekEventReg[20] &= (u8)~0x10; - } else if (play->sceneNum == SCENE_17SETUGEN) { + } else if (play->sceneId == SCENE_17SETUGEN) { gSaveContext.save.weekEventReg[20] &= (u8)~4; gSaveContext.save.weekEventReg[20] |= 8; gSaveContext.save.weekEventReg[20] &= (u8)~0x10; - } else if (play->sceneNum == SCENE_10YUKIYAMANOMURA) { + } else if (play->sceneId == SCENE_10YUKIYAMANOMURA) { gSaveContext.save.weekEventReg[20] &= (u8)~4; gSaveContext.save.weekEventReg[20] &= (u8)~8; gSaveContext.save.weekEventReg[20] |= 0x10; @@ -380,14 +380,14 @@ void EnGg2_Init(Actor* thisx, PlayState* play2) { this->unk_2EC = 20; this->unk_2EA = 0; - if (play->sceneNum == SCENE_11GORONNOSATO) { + if (play->sceneId == SCENE_11GORONNOSATO) { gSaveContext.save.weekEventReg[20] &= (u8)~4; gSaveContext.save.weekEventReg[20] &= (u8)~8; gSaveContext.save.weekEventReg[20] &= (u8)~0x10; this->unk_2EE = 0; Actor_ChangeAnimationByInfo(&this->skelAnime, D_80B3BF00, 0); this->actionFunc = func_80B3AFB0; - } else if (play->sceneNum == SCENE_17SETUGEN) { + } else if (play->sceneId == SCENE_17SETUGEN) { if ((gSaveContext.save.weekEventReg[20] & 4) && !(gSaveContext.save.weekEventReg[20] & 8) && !(gSaveContext.save.weekEventReg[20] & 0x10)) { gSaveContext.save.weekEventReg[20] &= (u8)~4; @@ -397,7 +397,7 @@ void EnGg2_Init(Actor* thisx, PlayState* play2) { } else { Actor_MarkForDeath(&this->actor); } - } else if (play->sceneNum == SCENE_10YUKIYAMANOMURA) { + } else if (play->sceneId == SCENE_10YUKIYAMANOMURA) { if (!(gSaveContext.save.weekEventReg[20] & 4) && (gSaveContext.save.weekEventReg[20] & 8) && !(gSaveContext.save.weekEventReg[20] & 0x10)) { gSaveContext.save.weekEventReg[20] &= (u8)~8; diff --git a/src/overlays/actors/ovl_En_Gk/z_en_gk.c b/src/overlays/actors/ovl_En_Gk/z_en_gk.c index 9f3f424d5e..601faff4b3 100644 --- a/src/overlays/actors/ovl_En_Gk/z_en_gk.c +++ b/src/overlays/actors/ovl_En_Gk/z_en_gk.c @@ -118,7 +118,7 @@ Color_RGBA8 D_80B533A4 = { 50, 150, 150, 0 }; u16 func_80B50410(EnGk* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (play->sceneNum == SCENE_17SETUGEN2) { + if (play->sceneId == SCENE_17SETUGEN2) { if (player->transformation == PLAYER_FORM_GORON) { if (!(gSaveContext.save.weekEventReg[40] & 0x80)) { switch (this->unk_31C) { @@ -164,7 +164,7 @@ u16 func_80B50410(EnGk* this, PlayState* play) { this->unk_1E4 |= 1; return 0xE81; } - } else if (play->sceneNum == SCENE_GORONRACE) { + } else if (play->sceneId == SCENE_GORONRACE) { if (player->transformation == PLAYER_FORM_GORON) { if (!(gSaveContext.save.weekEventReg[41] & 4)) { if (this->unk_31C == 0xE88) { @@ -1018,7 +1018,7 @@ void EnGk_Init(Actor* thisx, PlayState* play) { if (ENGK_GET_F(&this->actor) == ENGK_F_1) { this->unk_2E4 = 5; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); - if (play->sceneNum == SCENE_17SETUGEN2) { + if (play->sceneId == SCENE_17SETUGEN2) { if (Flags_GetSwitch(play, ENGK_GET_3F00(&this->actor))) { Actor_MarkForDeath(&this->actor); } else { @@ -1026,7 +1026,7 @@ void EnGk_Init(Actor* thisx, PlayState* play) { this->path = SubS_GetPathByIndex(play, ENGK_GET_F0(&this->actor), 0xF); this->actionFunc = func_80B51760; } - } else if (play->sceneNum == SCENE_GORONRACE) { + } else if (play->sceneId == SCENE_GORONRACE) { if (gSaveContext.save.weekEventReg[33] & 0x80) { if (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) { this->actionFunc = func_80B51760; diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c index 6e36d11306..b10f78ac30 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -762,7 +762,7 @@ s32 func_8094EFC4(EnGm* this, PlayState* play) { if (play->csCtx.state != 0) { if (this->unk_3F8 == 0) { - if ((play->sceneNum == SCENE_MILK_BAR) && (gSaveContext.sceneSetupIndex == 2)) { + if ((play->sceneId == SCENE_MILK_BAR) && (gSaveContext.sceneSetupIndex == 2)) { func_8094E054(this, play, 0); this->unk_258 = 255; } @@ -771,7 +771,7 @@ s32 func_8094EFC4(EnGm* this, PlayState* play) { } ret = true; } else if (this->unk_3F8 != 0) { - if (play->sceneNum == SCENE_MILK_BAR) { + if (play->sceneId == SCENE_MILK_BAR) { this->unk_400 = 0; } this->unk_3F8 = 0; 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 e5775d1296..5fc1d4c70c 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -537,7 +537,7 @@ s32 func_80A1222C(EnGo* this, PlayState* play) { if (((player->transformation == PLAYER_FORM_GORON) && (play->msgCtx.ocarinaMode == 3) && (play->msgCtx.lastPlayedSong == OCARINA_SONG_GORON_LULLABY) && (this->unk_3EC == 0) && (this->actor.xzDistToPlayer < 400.0f)) || - (!(gSaveContext.save.weekEventReg[22] & 4) && (play->sceneNum == SCENE_16GORON_HOUSE) && + (!(gSaveContext.save.weekEventReg[22] & 4) && (play->sceneId == SCENE_16GORON_HOUSE) && (gSaveContext.sceneSetupIndex == 0) && (this->unk_3EC == 0) && (play->csCtx.currentCsIndex == 1))) { ret = true; } @@ -710,7 +710,7 @@ s32 func_80A12868(EnGo* this, PlayState* play) { s32 func_80A12954(EnGo* this, PlayState* play) { if ((ENGO_GET_F(&this->actor) == ENGO_F_4) && (play->csCtx.state != 0) && (this->actor.draw != NULL) && - (play->sceneNum == SCENE_10YUKIYAMANOMURA2) && (gSaveContext.sceneSetupIndex == 1) && + (play->sceneId == SCENE_10YUKIYAMANOMURA2) && (gSaveContext.sceneSetupIndex == 1) && (play->csCtx.currentCsIndex == 0)) { if (this->unk_3F0 == 0) { this->actor.flags &= ~ACTOR_FLAG_1; @@ -1411,7 +1411,7 @@ void func_80A144F4(EnGo* this, PlayState* play) { void func_80A145AC(EnGo* this, PlayState* play) { if ((ENGO_GET_70(&this->actor) == ENGO_70_1) && - (((play->sceneNum == SCENE_10YUKIYAMANOMURA2) && (gSaveContext.sceneSetupIndex == 1) && + (((play->sceneId == SCENE_10YUKIYAMANOMURA2) && (gSaveContext.sceneSetupIndex == 1) && (play->csCtx.currentCsIndex == 0)) || !(gSaveContext.save.weekEventReg[21] & 8))) { this->actor.child = func_80A13400(this, play); diff --git a/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c b/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c index de0880e963..cf32db0bc0 100644 --- a/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c +++ b/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c @@ -330,7 +330,7 @@ void func_80B23934(EnHanabi* this, PlayState* play) { } } - if ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 7) && + if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 7) && (play->csCtx.currentCsIndex == 0) && (play->csCtx.frames == 610)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_KYOJIN_GROAN); } 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 7aa060a961..0e58e2b858 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -170,7 +170,7 @@ void EnHoll_VisibleIdle(EnHoll* this, PlayState* play) { EnHoll_SetPlayerSide(play, this, &transformedPlayerPos); playerDistFromCentralPlane = fabsf(transformedPlayerPos.z); - if (play->sceneNum == SCENE_IKANA) { + if (play->sceneId == SCENE_IKANA) { enHollBottom = EN_HOLL_BOTTOM_IKANA; enHollHalfwidth = EN_HOLL_HALFWIDTH_IKANA; } @@ -209,7 +209,7 @@ void EnHoll_VisibleIdle(EnHoll* this, PlayState* play) { } } } - } else if ((this->type == EN_HOLL_TYPE_DEFAULT) && (play->sceneNum == SCENE_26SARUNOMORI) && + } else if ((this->type == EN_HOLL_TYPE_DEFAULT) && (play->sceneId == SCENE_26SARUNOMORI) && (sInstancePlayingSound == NULL)) { sInstancePlayingSound = this; } @@ -225,7 +225,7 @@ void EnHoll_TransparentIdle(EnHoll* this, PlayState* play) { Actor_OffsetOfPointInActorCoords(&this->actor, &transformedPlayerPos, useViewEye ? &play->view.eye : &player->actor.world.pos); - enHollTop = (play->sceneNum == SCENE_PIRATE) ? EN_HOLL_TOP_PIRATE : EN_HOLL_TOP_DEFAULT; + enHollTop = (play->sceneId == SCENE_PIRATE) ? EN_HOLL_TOP_PIRATE : EN_HOLL_TOP_DEFAULT; if ((transformedPlayerPos.y > EN_HOLL_BOTTOM_DEFAULT) && (transformedPlayerPos.y < enHollTop) && (fabsf(transformedPlayerPos.x) < EN_HOLL_HALFWIDTH_TRANSPARENT)) { 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 259594d560..4388c7c739 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -792,7 +792,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { this->stateFlags = 0; } - if (((play->sceneNum == SCENE_KOEPONARACE) && (GET_RACE_FLAGS == 1)) || + if (((play->sceneId == SCENE_KOEPONARACE) && (GET_RACE_FLAGS == 1)) || ((gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 0)) && Cutscene_GetSceneSetupIndex(play))) { this->stateFlags |= ENHORSE_FLAG_25; } @@ -878,7 +878,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { func_80112AFC(play); } else if (thisx->params == ENHORSE_14) { func_808846F0(this, play); - if ((play->sceneNum == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) { + if ((play->sceneId == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) { Actor_MarkForDeath(&this->actor); } } else if (thisx->params == ENHORSE_16) { @@ -3498,7 +3498,7 @@ void EnHorse_ObstructMovement(EnHorse* this, PlayState* play, s32 obstacleType, this->unk_1EC |= 0x80; this->actor.world.pos = this->actor.prevPos; this->actor.speedXZ = 0.0f; - } else if ((play->sceneNum != SCENE_KOEPONARACE) || (this->unk_1EC & 2)) { + } else if ((play->sceneId != SCENE_KOEPONARACE) || (this->unk_1EC & 2)) { this->unk_1EC &= ~2; this->actor.world.pos = this->lastPos; this->stateFlags |= ENHORSE_OBSTACLE; @@ -3822,7 +3822,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { } if (((movingFast == false) && (intersectDist < 80.0f)) || ((movingFast == true) && (intersectDist < 150.0f))) { - if ((play->sceneNum != SCENE_KOEPONARACE) && (Math_CosS(sp7E) < 0.9f) && (this->playerControlled == true)) { + if ((play->sceneId != SCENE_KOEPONARACE) && (Math_CosS(sp7E) < 0.9f) && (this->playerControlled == true)) { if (movingFast == false) { this->stateFlags |= ENHORSE_FORCE_REVERSING; } else if (movingFast == true) { @@ -3876,7 +3876,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { COLPOLY_GET_NORMAL(obstacleFloor->normal.z), obstacleFloor->dist, &this->actor.world.pos) > 40.0f)) { if ((movingFast == true) && (this->playerControlled == true) && (this->action != ENHORSE_ACTION_STOPPING) && - (play->sceneNum != SCENE_KOEPONARACE)) { + (play->sceneId != SCENE_KOEPONARACE)) { this->stateFlags |= ENHORSE_FORCE_REVERSING; EnHorse_StartBraking(this, play); } @@ -3888,7 +3888,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { if ((temp_f0 < 0.81915206f) || SurfaceType_IsHorseBlocked(&play->colCtx, obstacleFloor, bgId) || (func_800C99D4(&play->colCtx, obstacleFloor, bgId) == 7)) { if ((Math_CosS(sp7E) < 0.9f) && (movingFast == true) && (this->playerControlled == true) && - (this->action != ENHORSE_ACTION_STOPPING) && (play->sceneNum != SCENE_KOEPONARACE)) { + (this->action != ENHORSE_ACTION_STOPPING) && (play->sceneId != SCENE_KOEPONARACE)) { this->stateFlags |= ENHORSE_FORCE_REVERSING; EnHorse_StartBraking(this, play); } @@ -3951,13 +3951,13 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { if ((temp_f0 < 0.81915206f) || SurfaceType_IsHorseBlocked(&play->colCtx, obstacleFloor, bgId) || (func_800C99D4(&play->colCtx, obstacleFloor, bgId) == 7)) { if ((movingFast == true) && (this->playerControlled == true) && (this->action != ENHORSE_ACTION_STOPPING) && - (play->sceneNum != SCENE_KOEPONARACE)) { + (play->sceneId != SCENE_KOEPONARACE)) { this->stateFlags |= ENHORSE_FORCE_REVERSING; EnHorse_StartBraking(this, play); } } else if (behindObstacleHeight < -70.0f) { if ((movingFast == true) && (this->playerControlled == true) && (this->action != ENHORSE_ACTION_STOPPING) && - (play->sceneNum != SCENE_KOEPONARACE)) { + (play->sceneId != SCENE_KOEPONARACE)) { this->stateFlags |= ENHORSE_FORCE_REVERSING; EnHorse_StartBraking(this, play); } diff --git a/src/overlays/actors/ovl_En_Jg/z_en_jg.c b/src/overlays/actors/ovl_En_Jg/z_en_jg.c index bb5ec72ee1..b7ad5c9ddc 100644 --- a/src/overlays/actors/ovl_En_Jg/z_en_jg.c +++ b/src/overlays/actors/ovl_En_Jg/z_en_jg.c @@ -948,7 +948,7 @@ void EnJg_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->actor, 0.01f); if (!EN_JG_IS_IN_GORON_SHRINE(thisx)) { - if ((play->sceneNum == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 7) && + if ((play->sceneId == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 7) && (play->csCtx.currentCsIndex == 0)) { // This is the elder that appears in the cutscene for learning the full Goron Lullaby. this->animIndex = EN_JG_ANIM_IDLE; diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index 6d7cc29eac..3acbece163 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -238,10 +238,10 @@ void EnKakasi_CheckAnimationSfx(EnKakasi* this) { void EnKakasi_CheckPlayerPosition(EnKakasi* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (play->sceneNum == SCENE_8ITEMSHOP) { + if (play->sceneId == SCENE_8ITEMSHOP) { player->actor.world.pos.x = -50.0f; player->actor.world.pos.z = 155.0f; - } else if (play->sceneNum == SCENE_TENMON_DAI) { + } else if (play->sceneId == SCENE_TENMON_DAI) { player->actor.world.pos.x = 60.0f; player->actor.world.pos.z = -190.0f; } @@ -998,7 +998,7 @@ void EnKakasi_DiggingAway(EnKakasi* this, PlayState* play) { tempWorldPos.x += randPlusMinusPoint5Scaled(2.0f); tempWorldPos.z += randPlusMinusPoint5Scaled(2.0f); - if (play->sceneNum == SCENE_8ITEMSHOP) { + if (play->sceneId == SCENE_8ITEMSHOP) { EffectSsGSplash_Spawn(play, &tempWorldPos, 0, 0, 0, randPlusMinusPoint5Scaled(100.0f) + 200.0f); SoundSource_PlaySfxAtFixedWorldPos(play, &tempWorldPos, 0x32, NA_SE_EV_BOMB_DROP_WATER); diff --git a/src/overlays/actors/ovl_En_Kbt/z_en_kbt.c b/src/overlays/actors/ovl_En_Kbt/z_en_kbt.c index ad85d9edb7..78d9032076 100644 --- a/src/overlays/actors/ovl_En_Kbt/z_en_kbt.c +++ b/src/overlays/actors/ovl_En_Kbt/z_en_kbt.c @@ -71,12 +71,12 @@ void EnKbt_Destroy(Actor* thisx, PlayState* play) { } s32 func_80B33E64(PlayState* play) { - return gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 1; + return gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 1; } s32 func_80B33E8C(PlayState* play) { if ((CURRENT_DAY == 3) || - ((CURRENT_DAY == 2) && (gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 2))) { + ((CURRENT_DAY == 2) && (gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 2))) { return true; } return false; diff --git a/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c b/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c index de2d1c207f..c9349b2c55 100644 --- a/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c +++ b/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c @@ -151,33 +151,33 @@ ObjIcePoly* EnKgy_FindIceBlock(PlayState* play) { } void func_80B40C74(PlayState* play) { - gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 |= 1; + gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 |= 1; if (CURRENT_DAY == 1) { - gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 |= 2; + gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 |= 2; } else { - gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 &= ~2; + gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 &= ~2; } } void func_80B40D00(PlayState* play) { - gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 |= 4; + gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 |= 4; } void func_80B40D30(PlayState* play) { - gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 &= ~7; + gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 &= ~7; } s32 func_80B40D64(PlayState* play) { - return gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 1; + return gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 1; } s32 func_80B40D8C(PlayState* play) { - return gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 4; + return gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 4; } s32 func_80B40DB4(PlayState* play) { if ((CURRENT_DAY == 3) || - ((CURRENT_DAY == 2) && (gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 2))) { + ((CURRENT_DAY == 2) && (gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 2))) { return true; } return false; diff --git a/src/overlays/actors/ovl_En_Mk/z_en_mk.c b/src/overlays/actors/ovl_En_Mk/z_en_mk.c index cb25445b9d..dc5e755793 100644 --- a/src/overlays/actors/ovl_En_Mk/z_en_mk.c +++ b/src/overlays/actors/ovl_En_Mk/z_en_mk.c @@ -120,7 +120,7 @@ void EnMk_Destroy(Actor* thisx, PlayState* play) { } s32 func_80959524(PlayState* play) { - return gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 7; + return gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 7; } void func_8095954C(EnMk* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Osn/z_en_osn.c b/src/overlays/actors/ovl_En_Osn/z_en_osn.c index b2fee9d8d4..fd3146032c 100644 --- a/src/overlays/actors/ovl_En_Osn/z_en_osn.c +++ b/src/overlays/actors/ovl_En_Osn/z_en_osn.c @@ -731,7 +731,7 @@ void func_80AD16A8(EnOsn* this, PlayState* play) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->unk_1EC); } - if ((this->unk_1EC == 5) && (play->sceneNum == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 0xB) && + if ((this->unk_1EC == 5) && (play->sceneId == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 0xB) && (play->csCtx.frames == 400)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_VO_OMVO00); } @@ -795,7 +795,7 @@ void EnOsn_Init(Actor* thisx, PlayState* play) { this->unk_1EA |= 1; } this->unk_1F0 = 1; - if (play->sceneNum == SCENE_INSIDETOWER) { + if (play->sceneId == SCENE_INSIDETOWER) { if ((gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 2)) || (gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 6))) { this->actionFunc = func_80AD16A8; diff --git a/src/overlays/actors/ovl_En_Pm/z_en_pm.c b/src/overlays/actors/ovl_En_Pm/z_en_pm.c index 3995207e9e..75bcbc8e80 100644 --- a/src/overlays/actors/ovl_En_Pm/z_en_pm.c +++ b/src/overlays/actors/ovl_En_Pm/z_en_pm.c @@ -1017,7 +1017,7 @@ s32 func_80AF86F0(EnPm* this, PlayState* play) { s32 func_80AF87C4(EnPm* this, PlayState* play) { s32 ret = false; - if ((play->csCtx.state != 0) && (play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 9) && + if ((play->csCtx.state != 0) && (play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 9) && (play->curSpawn == 1)) { if (!this->unk_380) { func_80AF7E98(this, 0); diff --git a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c index 56201271b4..088e06149b 100644 --- a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c +++ b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c @@ -296,7 +296,7 @@ void EnRailSkb_Init(Actor* thisx, PlayState* play) { this->unk_3F8 = 0; } - if ((play->sceneNum == SCENE_BOTI) && (gSaveContext.sceneSetupIndex == 1) && (play->csCtx.currentCsIndex == 0)) { + if ((play->sceneId == SCENE_BOTI) && (gSaveContext.sceneSetupIndex == 1) && (play->csCtx.currentCsIndex == 0)) { this->actor.flags |= ACTOR_FLAG_100000; } diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/src/overlays/actors/ovl_En_Skb/z_en_skb.c index 62cb638d94..ea4f7be32b 100644 --- a/src/overlays/actors/ovl_En_Skb/z_en_skb.c +++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.c @@ -230,7 +230,7 @@ void EnSkb_Init(Actor* thisx, PlayState* play) { this->unk_3D6 = ENSKB_GET_F0(&this->actor); this->actor.floorHeight = this->actor.world.pos.y; - if ((play->sceneNum == SCENE_BOTI) && (gSaveContext.sceneSetupIndex == 1) && (play->csCtx.currentCsIndex == 0)) { + if ((play->sceneId == SCENE_BOTI) && (gSaveContext.sceneSetupIndex == 1) && (play->csCtx.currentCsIndex == 0)) { this->actor.flags |= ACTOR_FLAG_100000; } diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index 6e79155393..408ca1b2f2 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -654,7 +654,7 @@ void EnSsh_Init(Actor* thisx, PlayState* play) { this->actor.gravity = 0.0f; this->initialYaw = this->actor.world.rot.y; EnSsh_SetupAction(this, EnSsh_Start); - if (Inventory_GetSkullTokenCount(play->sceneNum) >= 30) { + if (Inventory_GetSkullTokenCount(play->sceneId) >= 30) { Actor_MarkForDeath(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/src/overlays/actors/ovl_En_Sth/z_en_sth.c index 4354e7f58d..1d9ddf4e96 100644 --- a/src/overlays/actors/ovl_En_Sth/z_en_sth.c +++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.c @@ -113,7 +113,7 @@ void EnSth_Init(Actor* thisx, PlayState* play) { break; case ENSTH_F_2: - if (Inventory_GetSkullTokenCount(play->sceneNum) >= 30) { + if (Inventory_GetSkullTokenCount(play->sceneId) >= 30) { this->actionFunc = func_80B67DA0; } else { Actor_MarkForDeath(&this->actor); @@ -148,7 +148,7 @@ void EnSth_Init(Actor* thisx, PlayState* play) { break; case ENSTH_F_5: - if (!(gSaveContext.save.weekEventReg[13] & 0x20) || (Inventory_GetSkullTokenCount(play->sceneNum) < 30)) { + if (!(gSaveContext.save.weekEventReg[13] & 0x20) || (Inventory_GetSkullTokenCount(play->sceneId) < 30)) { Actor_MarkForDeath(&this->actor); return; } @@ -446,7 +446,7 @@ void func_80B67984(EnSth* this, PlayState* play) { sp1E = 0x918; } func_80B670A4(this, 2); - } else if (Inventory_GetSkullTokenCount(play->sceneNum) >= 30) { + } else if (Inventory_GetSkullTokenCount(play->sceneId) >= 30) { if (INV_CONTENT(ITEM_MASK_TRUTH) == ITEM_MASK_TRUTH) { this->unk_29C |= 4; sp1E = 0x919; @@ -559,7 +559,7 @@ void func_80B67DA0(EnSth* this, PlayState* play) { void func_80B67E20(Actor* thisx, PlayState* play) { EnSth* this = THIS; - if (Inventory_GetSkullTokenCount(play->sceneNum) >= 30) { + if (Inventory_GetSkullTokenCount(play->sceneId) >= 30) { this->actor.update = func_80B680A8; this->actor.draw = func_80B6849C; this->actor.flags |= ACTOR_FLAG_1; @@ -580,7 +580,7 @@ void EnSth_Update(Actor* thisx, PlayState* play) { Animation_PlayLoop(&this->skelAnime, &ovl_En_Sth_Anim_0045B4); this->unk_29A = 1; if ((gSaveContext.save.weekEventReg[34] & 0x10) || (gSaveContext.save.weekEventReg[34] & 0x20) || - (gSaveContext.save.weekEventReg[34] & 0x40) || (Inventory_GetSkullTokenCount(play->sceneNum) >= 30)) { + (gSaveContext.save.weekEventReg[34] & 0x40) || (Inventory_GetSkullTokenCount(play->sceneId) >= 30)) { func_80B670A4(this, 3); } } else { @@ -610,7 +610,7 @@ void EnSth_Update(Actor* thisx, PlayState* play) { break; } - if ((ENSTH_GET_F(&this->actor) == ENSTH_F_4) && (Inventory_GetSkullTokenCount(play->sceneNum) < 30)) { + if ((ENSTH_GET_F(&this->actor) == ENSTH_F_4) && (Inventory_GetSkullTokenCount(play->sceneId) < 30)) { this->actor.update = func_80B67E20; this->actor.draw = NULL; this->actor.flags &= ~ACTOR_FLAG_1; diff --git a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c index fbacce266f..bbce2ee6ca 100644 --- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c +++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c @@ -942,7 +942,7 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) { this->morphTable, 16); this->actor.draw = EnSuttari_Draw; this->actor.flags |= ACTOR_FLAG_1; - if (play->sceneNum == SCENE_IKANA) { + if (play->sceneId == SCENE_IKANA) { this->flags1 |= 1; if (gSaveContext.save.day == 1 || gSaveContext.save.day == 2) { this->animIndex = 2; @@ -958,7 +958,7 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) { this->actionFunc = func_80BACEE0; return; } - } else if (play->sceneNum == SCENE_BACKTOWN) { + } else if (play->sceneId == SCENE_BACKTOWN) { if (gSaveContext.save.time >= CLOCK_TIME(0, 20) && gSaveContext.save.time < CLOCK_TIME(6, 00)) { Actor_MarkForDeath(&this->actor); } @@ -974,7 +974,7 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = func_80BAD004; return; - } else if (play->sceneNum == SCENE_ICHIBA) { + } else if (play->sceneId == SCENE_ICHIBA) { if (gSaveContext.save.weekEventReg[33] & 8) { Actor_MarkForDeath(&this->actor); return; @@ -984,7 +984,7 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) { this->flags1 |= 2; this->actionFunc = func_80BAD5F8; return; - } else if (play->sceneNum == SCENE_AYASHIISHOP) { + } else if (play->sceneId == SCENE_AYASHIISHOP) { if (gSaveContext.save.weekEventReg[33] & 8) { Actor_MarkForDeath(&this->actor); return; @@ -1461,7 +1461,7 @@ void EnSuttari_Init(Actor* thisx, PlayState* play) { void EnSuttari_Destroy(Actor* thisx, PlayState* play) { EnSuttari* this = THIS; - if ((play->sceneNum == SCENE_BACKTOWN) && !(this->flags2 & 4)) { + if ((play->sceneId == SCENE_BACKTOWN) && !(this->flags2 & 4)) { Audio_QueueSeqCmd(0x101400FF); } Collider_DestroyCylinder(play, &this->collider); diff --git a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c index 5433aeec7a..a504ab5212 100644 --- a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c +++ b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c @@ -179,7 +179,7 @@ void EnSyatekiMan_Init(Actor* thisx, PlayState* play) { this->actor.targetMode = 1; Actor_SetScale(&this->actor, 0.01f); - if (play->sceneNum == SCENE_SYATEKI_MORI) { + if (play->sceneId == SCENE_SYATEKI_MORI) { SkelAnime_InitFlex(play, &this->skelAnime, &gBurlyGuySkel, &gSwampShootingGalleryManHeadScratchLoopAnim, this->jointTable, this->morphTable, BURLY_GUY_LIMB_MAX); } else { @@ -205,7 +205,7 @@ void EnSyatekiMan_Init(Actor* thisx, PlayState* play) { this->eyeIndex = 0; this->blinkTimer = 0; - if (play->sceneNum == SCENE_SYATEKI_MORI) { + if (play->sceneId == SCENE_SYATEKI_MORI) { this->path = path; EnSyatekiMan_Swamp_SpawnTargetActors(this, play, sSwampTargetActorLists[this->swampTargetActorListIndex], actorListLength); @@ -247,9 +247,9 @@ s32 EnSyatekiMan_MovePlayerToPos(PlayState* play, Vec3f pos) { } void EnSyatekiMan_SetupIdle(EnSyatekiMan* this, PlayState* play) { - if (play->sceneNum == SCENE_SYATEKI_MORI) { + if (play->sceneId == SCENE_SYATEKI_MORI) { this->actionFunc = EnSyatekiMan_Swamp_Idle; - } else if (play->sceneNum == SCENE_SYATEKI_MIZU) { + } else if (play->sceneId == SCENE_SYATEKI_MIZU) { this->actionFunc = EnSyatekiMan_Town_Idle; } } @@ -1447,7 +1447,7 @@ void EnSyatekiMan_Update(Actor* thisx, PlayState* play) { s32 EnSyatekiMan_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { EnSyatekiMan* this = THIS; - if ((play->sceneNum == SCENE_SYATEKI_MIZU) && (limbIndex == BURLY_GUY_LIMB_HEAD)) { + if ((play->sceneId == SCENE_SYATEKI_MIZU) && (limbIndex == BURLY_GUY_LIMB_HEAD)) { *dList = gTownShootingGalleryManHeadDL; } @@ -1481,7 +1481,7 @@ void EnSyatekiMan_Draw(Actor* thisx, PlayState* play) { EnSyatekiMan* this = THIS; s32 pad; - if (play->sceneNum == SCENE_SYATEKI_MIZU) { + if (play->sceneId == SCENE_SYATEKI_MIZU) { sEyeTextures[0] = gTownShootingGalleryManEyeOpenTex; sEyeTextures[1] = gTownShootingGalleryManEyeClosedTex; sEyeTextures[2] = gTownShootingGalleryManEyeClosedTex; diff --git a/src/overlays/actors/ovl_En_Test4/z_en_test4.c b/src/overlays/actors/ovl_En_Test4/z_en_test4.c index f33a1f693a..805a6f8bf8 100644 --- a/src/overlays/actors/ovl_En_Test4/z_en_test4.c +++ b/src/overlays/actors/ovl_En_Test4/z_en_test4.c @@ -436,7 +436,7 @@ void func_80A42AB8(EnTest4* this, PlayState* play) { if (CURRENT_DAY == 3) { if ((this->nextBellTime == CLOCK_TIME(0, 0)) && ((gSaveContext.save.inventory.items[SLOT_OCARINA] == ITEM_NONE) || - (play->sceneNum == SCENE_CLOCKTOWER))) { + (play->sceneId == SCENE_CLOCKTOWER))) { s32 playerParams; u32 entrance = gSaveContext.save.entrance; @@ -448,7 +448,7 @@ void func_80A42AB8(EnTest4* this, PlayState* play) { Play_SetRespawnData(&play->state, RESPAWN_MODE_RETURN, entrance, player->unk_3CE, playerParams, &player->unk_3C0, player->unk_3CC); - if ((play->sceneNum == SCENE_TENMON_DAI) || (play->sceneNum == SCENE_00KEIKOKU)) { + if ((play->sceneId == SCENE_TENMON_DAI) || (play->sceneId == SCENE_00KEIKOKU)) { play->nextEntrance = ENTRANCE(TERMINA_FIELD, 0); } else { play->nextEntrance = ENTRANCE(SOUTH_CLOCK_TOWN, 0); diff --git a/src/overlays/actors/ovl_En_Test7/z_en_test7.c b/src/overlays/actors/ovl_En_Test7/z_en_test7.c index 03b10590ca..fcbb0223b6 100644 --- a/src/overlays/actors/ovl_En_Test7/z_en_test7.c +++ b/src/overlays/actors/ovl_En_Test7/z_en_test7.c @@ -658,7 +658,7 @@ void func_80AF2350(EnTest7* this, PlayState* play) { this->unk_148.unk_10 -= 0x2EE0; - if (play->sceneNum == SCENE_SECOM) { + if (play->sceneId == SCENE_SECOM) { play->nextEntrance = ENTRANCE(IKANA_CANYON, 6); } else if (ENTEST7_GET(&this->actor) == ENTEST7_26) { func_80169F78(&play->state); diff --git a/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c b/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c index 0a013410be..04e44bb168 100644 --- a/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c +++ b/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c @@ -284,7 +284,7 @@ void func_80ACA840(EnTimeTag* this, PlayState* play) { s16 temp_ft4; s16 temp_hi; - if ((play->sceneNum != SCENE_YADOYA) || (INV_CONTENT(ITEM_ROOM_KEY) != ITEM_ROOM_KEY)) { + if ((play->sceneId != SCENE_YADOYA) || (INV_CONTENT(ITEM_ROOM_KEY) != ITEM_ROOM_KEY)) { temp_ft4 = gSaveContext.save.time * (24.0f / 0x10000); // TIME_TO_HOURS_F temp_hi = (s32)TIME_TO_MINUTES_F(gSaveContext.save.time) % 60; if (gSaveContext.save.weekEventReg[63] & 1) { diff --git a/src/overlays/actors/ovl_En_Toto/z_en_toto.c b/src/overlays/actors/ovl_En_Toto/z_en_toto.c index 6dda48fc7f..a55c899eff 100644 --- a/src/overlays/actors/ovl_En_Toto/z_en_toto.c +++ b/src/overlays/actors/ovl_En_Toto/z_en_toto.c @@ -184,15 +184,15 @@ void EnToto_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); - if (play->sceneNum == SCENE_MILK_BAR && - (gSaveContext.save.time >= CLOCK_TIME(6, 0) && gSaveContext.save.time < CLOCK_TIME(21, 30))) { + if ((play->sceneId == SCENE_MILK_BAR) && (gSaveContext.save.time >= CLOCK_TIME(6, 0)) && + (gSaveContext.save.time < CLOCK_TIME(21, 30))) { Actor_MarkForDeath(&this->actor); return; } ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); this->actor.bgCheckFlags |= 0x400; SkelAnime_InitFlex(play, &this->skelAnime, &object_zm_Skel_00A978, - ((play->sceneNum == SCENE_SONCHONOIE) ? &object_zm_Anim_003AA8 : &object_zm_Anim_00C880), + ((play->sceneId == SCENE_SONCHONOIE) ? &object_zm_Anim_003AA8 : &object_zm_Anim_00C880), this->jointTable, this->morphTable, 18); func_80BA36C0(this, play, 0); this->actor.shape.rot.x = 0; @@ -220,7 +220,7 @@ void func_80BA383C(EnToto* this, PlayState* play) { void func_80BA3930(EnToto* this, PlayState* play) { AnimationHeader* animationHeader = &object_zm_Anim_00C880; - if (play->sceneNum == SCENE_SONCHONOIE) { + if (play->sceneId == SCENE_SONCHONOIE) { animationHeader = &object_zm_Anim_003AA8; } Animation_MorphToLoop(&this->skelAnime, animationHeader, -4.0f); @@ -242,7 +242,7 @@ void func_80BA39C8(EnToto* this, PlayState* play) { func_80BA383C(this, play); if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { func_80BA36C0(this, play, 1); - if (play->sceneNum != SCENE_SONCHONOIE) { + if (play->sceneId != SCENE_SONCHONOIE) { Flags_SetSwitch(play, this->actor.params & 0x7F); } else if (player->transformation == PLAYER_FORM_DEKU) { Flags_SetSwitch(play, this->actor.home.rot.x); @@ -252,9 +252,9 @@ void func_80BA39C8(EnToto* this, PlayState* play) { } //! @TODO: 0xED02 nor 0xED01 match CLOCK_TIME macro - if ((play->sceneNum == SCENE_MILK_BAR && - !(gSaveContext.save.time >= CLOCK_TIME(6, 0) && gSaveContext.save.time < 0xED02)) || - (play->sceneNum != SCENE_MILK_BAR && func_80BA397C(this, 0x2000))) { + if (((play->sceneId == SCENE_MILK_BAR) && + !((gSaveContext.save.time >= CLOCK_TIME(6, 0)) && (gSaveContext.save.time < 0xED02))) || + ((play->sceneId != SCENE_MILK_BAR) && func_80BA397C(this, 0x2000))) { if (this->unk2B6 != 0) { this->text = D_80BA5044; this->actor.flags |= ACTOR_FLAG_10000; @@ -262,7 +262,7 @@ void func_80BA39C8(EnToto* this, PlayState* play) { } else { this->actor.flags &= ~ACTOR_FLAG_10000; func_800B8614(&this->actor, play, 50.0f); - if (play->sceneNum == SCENE_SONCHONOIE) { + if (play->sceneId == SCENE_SONCHONOIE) { if (player->transformation == PLAYER_FORM_DEKU) { if (!Flags_GetSwitch(play, this->actor.home.rot.x)) { this->text = D_80BA5068; @@ -286,7 +286,7 @@ void func_80BA39C8(EnToto* this, PlayState* play) { } void func_80BA3BFC(EnToto* this, PlayState* play) { - if (play->sceneNum == SCENE_SONCHONOIE) { + if (play->sceneId == SCENE_SONCHONOIE) { Animation_MorphToPlayOnce(&this->skelAnime, &object_zm_Anim_000C80, -4.0f); this->unk2B4 = 0; } else { diff --git a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c index 1f521d250a..ac6a4f4763 100644 --- a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c +++ b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c @@ -752,7 +752,7 @@ void func_80AD4DB4(EnTrt2* this, PlayState* play) { return; } - if ((play->sceneNum == SCENE_20SICHITAI) || (play->sceneNum == SCENE_20SICHITAI2)) { + if ((play->sceneId == SCENE_20SICHITAI) || (play->sceneId == SCENE_20SICHITAI2)) { if (gSaveContext.save.day == 2) { if (!(gSaveContext.save.weekEventReg[15] & 0x80)) { gSaveContext.save.weekEventReg[15] |= 0x80; @@ -790,7 +790,7 @@ void func_80AD4FE4(EnTrt2* this, PlayState* play) { D_80AD5910[this->unk_3B2](this, play); Actor_MoveWithGravity(&this->actor); - if (play->sceneNum != SCENE_20SICHITAI) { + if (play->sceneId != SCENE_20SICHITAI) { Actor_UpdateBgCheckInfo(play, &this->actor, 26.0f, 10.0f, 0.0f, 5); } diff --git a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c index 092c693f2c..ec6f12aeb5 100644 --- a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c +++ b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c @@ -351,8 +351,7 @@ void func_80966FEC(EnWeatherTag* this, PlayState* play) { D_801F4E7A = distance; } - // unique pirates fortress behavior? - if ((play->sceneNum == SCENE_KAIZOKU) && (play->actorCtx.flags & ACTORCTX_FLAG_1)) { + if ((play->sceneId == SCENE_KAIZOKU) && (play->actorCtx.flags & ACTORCTX_FLAG_1)) { EnWeatherTag_SetupAction(this, func_80967060); } } diff --git a/src/overlays/actors/ovl_En_Zog/z_en_zog.c b/src/overlays/actors/ovl_En_Zog/z_en_zog.c index 508734a9b8..bda36c0b6b 100644 --- a/src/overlays/actors/ovl_En_Zog/z_en_zog.c +++ b/src/overlays/actors/ovl_En_Zog/z_en_zog.c @@ -207,7 +207,7 @@ void EnZog_Init(Actor* thisx, PlayState* play) { if ((ENZOG_GET_F(&this->actor) != ENZOG_F_2) && (INV_CONTENT(ITEM_MASK_ZORA) == ITEM_MASK_ZORA) && ((play->csCtx.currentCsIndex != 2) || (gSaveContext.sceneSetupIndex != 0) || - (play->sceneNum != SCENE_30GYOSON))) { + (play->sceneId != SCENE_30GYOSON))) { Actor_MarkForDeath(&this->actor); return; } diff --git a/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.c b/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.c index f20b953ba3..fba4baf7a4 100644 --- a/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.c +++ b/src/overlays/actors/ovl_En_Zoraegg/z_en_zoraegg.c @@ -206,13 +206,13 @@ void EnZoraegg_Destroy(Actor* thisx, PlayState* play) { } s32 func_80B319A8(PlayState* play) { - return gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 & 7; + return gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 & 7; } void func_80B319D0(PlayState* play, s32 arg1) { if ((arg1 < 8) && (arg1 >= 0)) { - gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 &= ~7; - gSaveContext.save.permanentSceneFlags[play->sceneNum].unk_14 |= arg1; + gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 &= ~7; + gSaveContext.save.permanentSceneFlags[play->sceneId].unk_14 |= arg1; } } diff --git a/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.c b/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.c index 5783118de0..6c6d6e02ad 100644 --- a/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.c +++ b/src/overlays/actors/ovl_Obj_Demo/z_obj_demo.c @@ -60,7 +60,7 @@ void ObjDemo_Init(Actor* thisx, PlayState* play) { } void func_80983634(PlayState* play) { - if ((play->sceneNum == SCENE_CASTLE) && (func_801A8A50(0) == NA_BGM_IKANA_CASTLE)) { + if ((play->sceneId == SCENE_CASTLE) && (func_801A8A50(0) == NA_BGM_IKANA_CASTLE)) { Audio_QueueSeqCmd(0x100100FF); } } @@ -88,7 +88,7 @@ void func_80983704(ObjDemo* this, PlayState* play) { } else { ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, &this->actor); } - if (play->sceneNum == SCENE_CASTLE) { + if (play->sceneId == SCENE_CASTLE) { Audio_QueueSeqCmd(NA_BGM_IKANA_CASTLE | 0x8000); } this->actor.cutscene = ActorCutscene_GetAdditionalCutscene(this->actor.cutscene); diff --git a/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c b/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c index 249e7ffde4..19d35ffffb 100644 --- a/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c +++ b/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c @@ -409,7 +409,7 @@ void func_80A54CEC(ObjHugebombiwa* this, PlayState* play) { ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, &this->actor); Flags_SetSwitch(play, ENHUGEBOMBIWA_GET_7F(&this->actor)); if (!(ENHUGEBOMBIWA_GET_100(&this->actor)) && - ((play->sceneNum == SCENE_17SETUGEN) || (play->sceneNum == SCENE_17SETUGEN2))) { + ((play->sceneId == SCENE_17SETUGEN) || (play->sceneId == SCENE_17SETUGEN2))) { gSaveContext.save.weekEventReg[19] |= 2; } diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c index 0210b5ba78..2ba1e4352d 100644 --- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c +++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c @@ -116,7 +116,7 @@ void ObjIcePoly_Init(Actor* thisx, PlayState* play) { thisx->shape.rot.z = -0x500; if (((this->unk_149 != OBJICEPOLY_FF_FF) && Flags_GetSwitch(play, this->unk_149)) || - ((play->sceneNum == SCENE_KAJIYA) && (gSaveContext.save.weekEventReg[33] & 0x80))) { + ((play->sceneId == SCENE_KAJIYA) && (gSaveContext.save.weekEventReg[33] & 0x80))) { Actor_MarkForDeath(thisx); return; } @@ -205,7 +205,7 @@ void func_80931A38(ObjIcePoly* this, PlayState* play) { this->actionFunc = func_80931E58; this->actor.focus.rot.y = this->actor.yawTowardsPlayer; - if (play->sceneNum == SCENE_00KEIKOKU) { + if (play->sceneId == SCENE_00KEIKOKU) { Actor* actor = NULL; do { diff --git a/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.c b/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.c index 497d9a219a..7758fc5bc9 100644 --- a/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.c +++ b/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.c @@ -36,11 +36,10 @@ void ObjJgGakki_Init(Actor* thisx, PlayState* play2) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); SkelAnime_Init(play, &this->skelAnime, &gGoronElderDrumSkel, NULL, NULL, NULL, 0); - if (((play->sceneNum == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 7)) && - (play->csCtx.currentCsIndex == 0)) { + if (((play->sceneId == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 7)) && (play->csCtx.currentCsIndex == 0)) { Animation_Change(&this->skelAnime, &gGoronElderDrumTakeOutAnim, 1.0f, frameCount, frameCount, ANIMMODE_ONCE, 0.0f); - } else if ((play->sceneNum == SCENE_17SETUGEN) || (play->sceneNum == SCENE_10YUKIYAMANOMURA)) { + } else if ((play->sceneId == SCENE_17SETUGEN) || (play->sceneId == SCENE_10YUKIYAMANOMURA)) { Animation_Change(&this->skelAnime, &gGoronElderDrumTakeOutAnim, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, 0.0f); } else { Actor_MarkForDeath(&this->actor); diff --git a/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c b/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c index 4c56bb794e..7cc7add22e 100644 --- a/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c +++ b/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c @@ -71,7 +71,7 @@ void ObjNozoki_Init(Actor* thisx, PlayState* play) { this->dyna.actor.shape.rot.z = 0; this->unk_15F = this->dyna.actor.cutscene; - if (play->sceneNum == SCENE_AYASHIISHOP) { + if (play->sceneId == SCENE_AYASHIISHOP) { this->unk_15C = 4; ObjNozoki_SetupAction(this, func_80BA3230); this->dyna.actor.colChkInfo.cylRadius = -40; diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index 02743db291..c31168f724 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -348,7 +348,7 @@ void ObjSwitch_Init(Actor* thisx, PlayState* play) { DynaPolyActor_LoadMesh(play, &this->dyna, &gFloorSwitchCol); } if (type == OBJSWITCH_TYPE_FLOOR) { - if (play->sceneNum == SCENE_SECOM) { + if (play->sceneId == SCENE_SECOM) { this->floorSwitchUpScale = 33.0f / 200.0f / 3.0f; this->floorSwitchDownScale = 33.0f / 2000.0f / 3.0f; } else { @@ -357,7 +357,7 @@ void ObjSwitch_Init(Actor* thisx, PlayState* play) { } } if (type == OBJSWITCH_TYPE_FLOOR || type == OBJSWITCH_TYPE_FLOOR_LARGE) { - if (play->sceneNum == SCENE_SECOM) { + if (play->sceneId == SCENE_SECOM) { Color_RGB8* color = &sSakonHideoutColor[OBJ_SWITCH_GET_COLOR_ID(&this->dyna.actor)]; this->color.r = color->r; @@ -584,7 +584,7 @@ void ObjSwitch_FloorSwitchDown(ObjSwitch* this, PlayState* play) { case OBJSWITCH_SUBTYPE_ONCE: case OBJSWITCH_SUBTYPE_SYNC: if (!Flags_GetSwitch(play, OBJ_SWITCH_GET_SWITCH_FLAG(&this->dyna.actor))) { - if (play->sceneNum == SCENE_SECOM && DynaPolyActor_IsInSwitchPressedState(&this->dyna)) { + if ((play->sceneId == SCENE_SECOM) && DynaPolyActor_IsInSwitchPressedState(&this->dyna)) { ObjSwitch_SetSwitchFlagState(this, play, true); } else { ObjSwitch_FloorSwitchRiseUpInit(this); @@ -595,7 +595,7 @@ void ObjSwitch_FloorSwitchDown(ObjSwitch* this, PlayState* play) { case OBJSWITCH_SUBTYPE_RESET: case OBJSWITCH_SUBTYPE_RESET_INVERTED: if (!DynaPolyActor_IsInSwitchPressedState(&this->dyna) && - (!Player_InCsMode(play) || play->sceneNum == SCENE_SECOM)) { + (!Player_InCsMode(play) || (play->sceneId == SCENE_SECOM))) { if (this->floorSwitchReleaseTimer <= 0) { if (subType == OBJSWITCH_SUBTYPE_RESET) { ObjSwitch_SetSwitchFlagState(this, play, false); @@ -607,7 +607,7 @@ void ObjSwitch_FloorSwitchDown(ObjSwitch* this, PlayState* play) { } } } else { - if (play->sceneNum == SCENE_SECOM) { + if (play->sceneId == SCENE_SECOM) { this->floorSwitchReleaseTimer = 2; } else { this->floorSwitchReleaseTimer = 6; diff --git a/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.c b/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.c index 780c31c9a0..62cb402758 100644 --- a/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.c +++ b/src/overlays/actors/ovl_Obj_Tokei_Step/z_obj_tokei_step.c @@ -193,7 +193,7 @@ void ObjTokeiStep_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, 0); - if ((play->sceneNum == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 2) && + if ((play->sceneId == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 2) && (play->csCtx.currentCsIndex == 0)) { DynaPolyActor_LoadMesh(play, &this->dyna, &gClocktowerPanelCol); ObjTokeiStep_InitSteps(this); diff --git a/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c b/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c index 74c121656a..34d43d354b 100644 --- a/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c +++ b/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c @@ -121,9 +121,9 @@ void ObjTokeidai_ExteriorGear_Init(ObjTokeidai* this, PlayState* play) { this->opaDList = gClockTowerExteriorGearDL; ObjTokeidai_SetupClockOrExteriorGear(this); - if (((play->sceneNum == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 2) && + if (((play->sceneId == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 2) && (play->csCtx.currentCsIndex == 0)) || - ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 2) && + ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 2) && (play->csCtx.currentCsIndex == 0))) { ObjTokeidai_SetupTowerOpening(this); } else if ((CURRENT_DAY == 3 && gSaveContext.save.time < CLOCK_TIME(6, 0)) || CURRENT_DAY >= 4) { @@ -140,9 +140,9 @@ void ObjTokeidai_TowerClock_Init(ObjTokeidai* this, PlayState* play) { this->actor.draw = ObjTokeidai_Clock_Draw; ObjTokeidai_Clock_Init(this); - if (((play->sceneNum == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 2) && + if (((play->sceneId == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 2) && (play->csCtx.currentCsIndex == 0)) || - ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 2) && + ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 2) && (play->csCtx.currentCsIndex == 0))) { ObjTokeidai_SetupTowerOpening(this); } else if ((CURRENT_DAY == 3 && gSaveContext.save.time < CLOCK_TIME(6, 0)) || CURRENT_DAY >= 4) { @@ -175,9 +175,9 @@ void ObjTokeidai_Counterweight_Init(ObjTokeidai* this, PlayState* play) { this->spotlightIntensity = 0; } - if (((play->sceneNum == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 2) && + if (((play->sceneId == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 2) && (play->csCtx.currentCsIndex == 0)) || - ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 2) && + ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 2) && (play->csCtx.currentCsIndex == 0))) { this->spotlightIntensity = 0; ObjTokeidai_SetupTowerOpening(this); @@ -448,9 +448,9 @@ void ObjTokeidai_TowerOpening_EndCutscene(ObjTokeidai* this, PlayState* play) { if (Cutscene_CheckActorAction(play, 132) != 0 && play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 132)]->action == 5) { gSaveContext.save.weekEventReg[8] |= 0x40; - if (((play->sceneNum == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 2) && + if (((play->sceneId == SCENE_CLOCKTOWER) && (gSaveContext.sceneSetupIndex == 2) && (play->csCtx.currentCsIndex == 0)) || - ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 2) && + ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 2) && (play->csCtx.currentCsIndex == 0))) { Audio_SetCutsceneFlag(false); gSaveContext.save.cutscene = 0; diff --git a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index 20c1728035..9d635d7eb1 100644 --- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -162,7 +162,7 @@ void func_80927818(ObjTsubo* this, PlayState* play, s32 arg2) { } s32 ObjTsubo_IsSceneNotGohtOrTwinmold(ObjTsubo* this, PlayState* play) { - return (play->sceneNum != SCENE_HAKUGIN_BS) && (play->sceneNum != SCENE_INISIE_BS); + return (play->sceneId != SCENE_HAKUGIN_BS) && (play->sceneId != SCENE_INISIE_BS); } void func_8092788C(ObjTsubo* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c index 83e06a1a37..aea3bc7f1a 100644 --- a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c +++ b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c @@ -42,8 +42,8 @@ void func_808A7968(ObjWturn* this, PlayState* play) { if (play->msgCtx.ocarinaMode >= 28 && play->msgCtx.ocarinaMode < 39) { Flags_UnsetSwitch(play, this->actor.params); Actor_MarkForDeath(&this->actor); - } else if ((Flags_GetSwitch(play, this->actor.params) && (play->sceneNum == SCENE_F40)) || - (!Flags_GetSwitch(play, this->actor.params) && (play->sceneNum == SCENE_F41))) { + } else if ((Flags_GetSwitch(play, this->actor.params) && (play->sceneId == SCENE_F40)) || + (!Flags_GetSwitch(play, this->actor.params) && (play->sceneId == SCENE_F41))) { func_808A7A24(this); } } @@ -112,7 +112,7 @@ void func_808A7C78(ObjWturn* this, PlayState* play) { play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextCutsceneIndex = 0; - if (play->sceneNum == SCENE_F40) { + if (play->sceneId == SCENE_F40) { play->nextEntrance = ENTRANCE(STONE_TOWER_INVERTED, 0); } else { play->nextEntrance = ENTRANCE(STONE_TOWER, 1); 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 4057ff8175..264167db52 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -588,7 +588,7 @@ void func_808DD970(Actor* thisx, PlayState* play2) { ObjectKankyo* this = THIS; f32 tempA; - if (play->sceneNum == SCENE_KYOJINNOMA) { + if (play->sceneId == SCENE_KYOJINNOMA) { phi_f26 = 1.0f; } else { tempA = Camera_GetWaterYPos(GET_ACTIVE_CAM(play)); diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index 4526760d5e..825059e332 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -2495,8 +2495,8 @@ 0x80131F90:("Scene_DrawConfigMatAnimManualStep",), 0x80131FC0:("Scene_DrawConfigGreatBayTemple",), 0x801322C0:("Entrance_GetTableEntry",), - 0x8013230C:("Entrance_GetSceneNum",), - 0x80132338:("Entrance_GetSceneNumAbsolute",), + 0x8013230C:("Entrance_GetSceneId",), + 0x80132338:("Entrance_GetSceneIdAbsolute",), 0x80132374:("Entrance_GetSpawnNum",), 0x801323A0:("Entrance_GetTransitionFlags",), 0x801323D0:("Schedule_CheckFlagS",), @@ -3024,7 +3024,7 @@ 0x80169BF8:("func_80169BF8",), 0x80169C64:("Play_GetActorCsCamSetting",), 0x80169C84:("Play_GetActorCsCamFuncData",), - 0x80169CBC:("Play_GetOriginalSceneNumber",), + 0x80169CBC:("Play_GetOriginalSceneId",), 0x80169D40:("Play_SaveCycleSceneFlags",), 0x80169DCC:("Play_SetRespawnData",), 0x80169E6C:("Play_SetupRespawnPoint",), diff --git a/tools/disasm/variables.txt b/tools/disasm/variables.txt index 55609668b9..daa1356f21 100644 --- a/tools/disasm/variables.txt +++ b/tools/disasm/variables.txt @@ -1342,8 +1342,8 @@ 0x801C1E6C:("gItemIcons","UNK_PTR","[131]",0x20C), 0x801C2078:("gItemSlots","u8","[80]",0x50), 0x801C20C8:("gItemPrices","UNK_TYPE1","",0x1), - 0x801C212C:("gScenesPerRegion","SceneIdList","[]",0x252), - 0x801C2380:("sScenesPerTingleMap","u16","[]",0x90), + 0x801C212C:("gSceneIdsPerRegion","SceneIdList","[]",0x252), + 0x801C2380:("sSceneIdsPerTingleMap","u16","[]",0x90), 0x801C2410:("D_801C2410","UNK_TYPE1","",0x1), 0x801C2650:("tatlMessageFiles","RomFile","[2]",0x10), 0x801C2660:("sceneTextureFiles","RomFile","[9]",0x48), diff --git a/tools/namefixer.py b/tools/namefixer.py index 4152c8d979..eab13f0b95 100755 --- a/tools/namefixer.py +++ b/tools/namefixer.py @@ -729,6 +729,7 @@ wordReplace = { "play->actorCtx.unk3": "play->actorCtx.lensActive", "play->actorCtx.unk4": "play->actorCtx.lensMaskSize", "play->nextEntranceIndex": "play->nextEntrance", + "play->sceneNum": "play->sceneId", "gSaveContext.unk_3DC8": "gSaveContext.timerOsTime", "gSaveContext.unk_3DD0": "gSaveContext.timerStates", diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv index 52cb53a608..ecdba5264a 100644 --- a/tools/sizes/code_functions.csv +++ b/tools/sizes/code_functions.csv @@ -2009,8 +2009,8 @@ asm/non_matchings/code/z_scene_proc/Scene_DrawConfig5.s,Scene_DrawConfig5,0x8013 asm/non_matchings/code/z_scene_proc/Scene_DrawConfigMatAnimManualStep.s,Scene_DrawConfigMatAnimManualStep,0x80131F90,0xC asm/non_matchings/code/z_scene_proc/Scene_DrawConfigGreatBayTemple.s,Scene_DrawConfigGreatBayTemple,0x80131FC0,0xC0 asm/non_matchings/code/z_scene_table/Entrance_GetTableEntry.s,Entrance_GetTableEntry,0x801322C0,0x13 -asm/non_matchings/code/z_scene_table/Entrance_GetSceneNum.s,Entrance_GetSceneNum,0x8013230C,0xB -asm/non_matchings/code/z_scene_table/Entrance_GetSceneNumAbsolute.s,Entrance_GetSceneNumAbsolute,0x80132338,0xF +asm/non_matchings/code/z_scene_table/Entrance_GetSceneId.s,Entrance_GetSceneId,0x8013230C,0xB +asm/non_matchings/code/z_scene_table/Entrance_GetSceneIdAbsolute.s,Entrance_GetSceneIdAbsolute,0x80132338,0xF asm/non_matchings/code/z_scene_table/Entrance_GetSpawnNum.s,Entrance_GetSpawnNum,0x80132374,0xB asm/non_matchings/code/z_scene_table/Entrance_GetTransitionFlags.s,Entrance_GetTransitionFlags,0x801323A0,0xC asm/non_matchings/code/code_801323D0/func_801323D0.s,func_801323D0,0x801323D0,0x16 @@ -2538,7 +2538,7 @@ asm/non_matchings/code/z_play/Play_GetCameraUID.s,Play_GetCameraUID,0x80169BC4,0 asm/non_matchings/code/z_play/func_80169BF8.s,func_80169BF8,0x80169BF8,0x1B asm/non_matchings/code/z_play/Play_GetActorCsCamSetting.s,Play_GetActorCsCamSetting,0x80169C64,0x8 asm/non_matchings/code/z_play/Play_GetActorCsCamFuncData.s,Play_GetActorCsCamFuncData,0x80169C84,0xE -asm/non_matchings/code/z_play/Play_GetOriginalSceneNumber.s,Play_GetOriginalSceneNumber,0x80169CBC,0x21 +asm/non_matchings/code/z_play/Play_GetOriginalSceneId.s,Play_GetOriginalSceneId,0x80169CBC,0x21 asm/non_matchings/code/z_play/Play_SaveCycleSceneFlags.s,Play_SaveCycleSceneFlags,0x80169D40,0x23 asm/non_matchings/code/z_play/Play_SetRespawnData.s,Play_SetRespawnData,0x80169DCC,0x28 asm/non_matchings/code/z_play/Play_SetupRespawnPoint.s,Play_SetupRespawnPoint,0x80169E6C,0x18