mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
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
This commit is contained in:
+4
-4
@@ -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);
|
||||
|
||||
+1
-1
@@ -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];
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+27
-27
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
+13
-13
@@ -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) {
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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);
|
||||
|
||||
+13
-13
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -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;
|
||||
}
|
||||
|
||||
+8
-8
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+644
-631
File diff suppressed because it is too large
Load Diff
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user