mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-30 08:56:25 -04: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:
+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);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
+10
-10
@@ -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;
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user