mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-06 07:56:32 +00:00
sceneNum -> sceneId (#1338)
* sceneNum -> sceneId * forgot to save play * scene -> sceneId where appropriate * Missed 1 + format * Update src/code/z_sram.c Co-authored-by: mzxrules <mzxrules@gmail.com> * Update src/code/z_sram.c Co-authored-by: mzxrules <mzxrules@gmail.com> * PR * Fix Co-authored-by: mzxrules <mzxrules@gmail.com>
This commit is contained in:
parent
706d5596bf
commit
9c6461751d
83 changed files with 444 additions and 445 deletions
|
@ -10,7 +10,7 @@
|
|||
#define DO_ACTION_TEX_SIZE ((DO_ACTION_TEX_WIDTH * DO_ACTION_TEX_HEIGHT) / 2) // (sizeof(gCheckDoActionENGTex))
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 scene;
|
||||
/* 0x00 */ u8 sceneId;
|
||||
/* 0x01 */ u8 flags1;
|
||||
/* 0x02 */ u8 flags2;
|
||||
/* 0x03 */ u8 flags3;
|
||||
|
@ -404,7 +404,7 @@ void func_80082850(PlayState* play, s16 maxAlpha) {
|
|||
interfaceCtx->magicAlpha = alpha;
|
||||
}
|
||||
|
||||
switch (play->sceneNum) {
|
||||
switch (play->sceneId) {
|
||||
case SCENE_SPOT00:
|
||||
case SCENE_SPOT01:
|
||||
case SCENE_SPOT02:
|
||||
|
@ -625,11 +625,11 @@ void func_80083108(PlayState* play) {
|
|||
s16 sp28 = false;
|
||||
|
||||
if ((gSaveContext.cutsceneIndex < 0xFFF0) ||
|
||||
((play->sceneNum == SCENE_SPOT20) && (gSaveContext.cutsceneIndex == 0xFFF0))) {
|
||||
((play->sceneId == SCENE_SPOT20) && (gSaveContext.cutsceneIndex == 0xFFF0))) {
|
||||
gSaveContext.unk_13E7 = 0;
|
||||
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_23) || (play->shootingGalleryStatus > 1) ||
|
||||
((play->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38))) {
|
||||
((play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38))) {
|
||||
if (gSaveContext.equips.buttonItems[0] != ITEM_NONE) {
|
||||
gSaveContext.unk_13E7 = 1;
|
||||
|
||||
|
@ -644,7 +644,7 @@ void func_80083108(PlayState* play) {
|
|||
(gSaveContext.equips.buttonItems[0] != ITEM_NONE)) {
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.equips.buttonItems[0];
|
||||
|
||||
if ((play->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38)) {
|
||||
if ((play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38)) {
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_BOMBCHU;
|
||||
Interface_LoadItemIcon1(play, 0);
|
||||
} else {
|
||||
|
@ -675,7 +675,7 @@ void func_80083108(PlayState* play) {
|
|||
Interface_ChangeAlpha(8);
|
||||
} else if (play->shootingGalleryStatus > 1) {
|
||||
Interface_ChangeAlpha(8);
|
||||
} else if ((play->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38)) {
|
||||
} else if ((play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38)) {
|
||||
Interface_ChangeAlpha(8);
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_23) {
|
||||
Interface_ChangeAlpha(12);
|
||||
|
@ -685,9 +685,9 @@ void func_80083108(PlayState* play) {
|
|||
Interface_ChangeAlpha(12);
|
||||
}
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_KENJYANOMA) {
|
||||
} else if (play->sceneId == SCENE_KENJYANOMA) {
|
||||
Interface_ChangeAlpha(1);
|
||||
} else if (play->sceneNum == SCENE_TURIBORI) {
|
||||
} else if (play->sceneId == SCENE_TURIBORI) {
|
||||
gSaveContext.unk_13E7 = 2;
|
||||
if (play->interfaceCtx.unk_260 != 0) {
|
||||
if (gSaveContext.equips.buttonItems[0] != ITEM_FISHING_POLE) {
|
||||
|
@ -1021,7 +1021,7 @@ void func_80083108(PlayState* play) {
|
|||
(gSaveContext.equips.buttonItems[i] <= ITEM_POE)) &&
|
||||
!((gSaveContext.equips.buttonItems[i] >= ITEM_WEIRD_EGG) &&
|
||||
(gSaveContext.equips.buttonItems[i] <= ITEM_CLAIM_CHECK))) {
|
||||
if ((play->sceneNum != SCENE_TAKARAYA) ||
|
||||
if ((play->sceneId != SCENE_TAKARAYA) ||
|
||||
(gSaveContext.equips.buttonItems[i] != ITEM_LENS)) {
|
||||
if (gSaveContext.buttonStatus[i] == BTN_ENABLED) {
|
||||
sp28 = true;
|
||||
|
@ -1076,7 +1076,7 @@ void func_80083108(PlayState* play) {
|
|||
void Interface_SetSceneRestrictions(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
s16 i;
|
||||
u8 currentScene;
|
||||
u8 sceneId;
|
||||
|
||||
interfaceCtx->restrictions.hGauge = interfaceCtx->restrictions.bButton = interfaceCtx->restrictions.aButton =
|
||||
interfaceCtx->restrictions.bottles = interfaceCtx->restrictions.tradeItems =
|
||||
|
@ -1088,11 +1088,11 @@ void Interface_SetSceneRestrictions(PlayState* play) {
|
|||
i = 0;
|
||||
|
||||
// "Data settings related to button display scene_data_ID=%d\n"
|
||||
osSyncPrintf("ボタン表示関係データ設定 scene_data_ID=%d\n", play->sceneNum);
|
||||
osSyncPrintf("ボタン表示関係データ設定 scene_data_ID=%d\n", play->sceneId);
|
||||
|
||||
do {
|
||||
currentScene = (u8)play->sceneNum;
|
||||
if (sRestrictionFlags[i].scene == currentScene) {
|
||||
sceneId = (u8)play->sceneId;
|
||||
if (sRestrictionFlags[i].sceneId == sceneId) {
|
||||
interfaceCtx->restrictions.hGauge = (sRestrictionFlags[i].flags1 & 0xC0) >> 6;
|
||||
interfaceCtx->restrictions.bButton = (sRestrictionFlags[i].flags1 & 0x30) >> 4;
|
||||
interfaceCtx->restrictions.aButton = (sRestrictionFlags[i].flags1 & 0x0C) >> 2;
|
||||
|
@ -1122,7 +1122,7 @@ void Interface_SetSceneRestrictions(PlayState* play) {
|
|||
return;
|
||||
}
|
||||
i++;
|
||||
} while (sRestrictionFlags[i].scene != 0xFF);
|
||||
} while (sRestrictionFlags[i].sceneId != 0xFF);
|
||||
}
|
||||
|
||||
Gfx* Gfx_TextureIA8(Gfx* displayListHead, void* texture, s16 textureWidth, s16 textureHeight, s16 rectLeft, s16 rectTop,
|
||||
|
@ -2895,7 +2895,7 @@ void Interface_DrawAmmoCount(PlayState* play, s16 button, s16 alpha) {
|
|||
ammo = play->interfaceCtx.hbaAmmo;
|
||||
} else if ((button == 0) && (play->shootingGalleryStatus > 1)) {
|
||||
ammo = play->shootingGalleryStatus - 1;
|
||||
} else if ((button == 0) && (play->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38)) {
|
||||
} else if ((button == 0) && (play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38)) {
|
||||
ammo = play->bombchuBowlingStatus;
|
||||
if (ammo < 0) {
|
||||
ammo = 0;
|
||||
|
@ -3105,7 +3105,7 @@ void Interface_Draw(PlayState* play) {
|
|||
gDPSetEnvColor(OVERLAY_DISP++, 0, 80, 0, 255);
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, 26, 206, 16, 16, 1 << 10, 1 << 10);
|
||||
|
||||
switch (play->sceneNum) {
|
||||
switch (play->sceneId) {
|
||||
case SCENE_BMORI1:
|
||||
case SCENE_HIDAN:
|
||||
case SCENE_MIZUSIN:
|
||||
|
@ -3221,7 +3221,7 @@ void Interface_Draw(PlayState* play) {
|
|||
Interface_DrawItemIconTexture(play, interfaceCtx->iconItemSegment, 0);
|
||||
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_23) || (play->shootingGalleryStatus > 1) ||
|
||||
((play->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38))) {
|
||||
((play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38))) {
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE,
|
||||
0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
|
@ -3469,7 +3469,7 @@ void Interface_Draw(PlayState* play) {
|
|||
(play->gameOverCtx.state == GAMEOVER_INACTIVE) && (msgCtx->msgMode == MSGMODE_NONE) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_24) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF) && !Play_InCsMode(play) && (gSaveContext.minigameState != 1) &&
|
||||
(play->shootingGalleryStatus <= 1) && !((play->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38))) {
|
||||
(play->shootingGalleryStatus <= 1) && !((play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38))) {
|
||||
svar6 = 0;
|
||||
switch (gSaveContext.timer1State) {
|
||||
case 1:
|
||||
|
@ -3731,10 +3731,10 @@ void Interface_Draw(PlayState* play) {
|
|||
|
||||
if (gSaveContext.timer2Value <= 0) {
|
||||
if (!Flags_GetSwitch(play, 0x37) ||
|
||||
((play->sceneNum != SCENE_GANON_DEMO) &&
|
||||
(play->sceneNum != SCENE_GANON_FINAL) &&
|
||||
(play->sceneNum != SCENE_GANON_SONOGO) &&
|
||||
(play->sceneNum != SCENE_GANONTIKA_SONOGO))) {
|
||||
((play->sceneId != SCENE_GANON_DEMO) &&
|
||||
(play->sceneId != SCENE_GANON_FINAL) &&
|
||||
(play->sceneId != SCENE_GANON_SONOGO) &&
|
||||
(play->sceneId != SCENE_GANONTIKA_SONOGO))) {
|
||||
D_8015FFE6 = 40;
|
||||
gSaveContext.timer2State = 5;
|
||||
gSaveContext.cutsceneIndex = 0;
|
||||
|
@ -3891,9 +3891,9 @@ void Interface_Update(PlayState* play) {
|
|||
|
||||
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) {
|
||||
if ((gSaveContext.minigameState == 1) || !IS_CUTSCENE_LAYER ||
|
||||
((play->sceneNum == SCENE_SPOT20) && (gSaveContext.sceneLayer == 4))) {
|
||||
((play->sceneId == SCENE_SPOT20) && (gSaveContext.sceneLayer == 4))) {
|
||||
if ((msgCtx->msgMode == MSGMODE_NONE) ||
|
||||
((msgCtx->msgMode != MSGMODE_NONE) && (play->sceneNum == SCENE_BOWLING))) {
|
||||
((msgCtx->msgMode != MSGMODE_NONE) && (play->sceneId == SCENE_BOWLING))) {
|
||||
if (play->gameOverCtx.state == GAMEOVER_INACTIVE) {
|
||||
func_80083108(play);
|
||||
}
|
||||
|
@ -3949,7 +3949,7 @@ void Interface_Update(PlayState* play) {
|
|||
interfaceCtx->magicAlpha = alpha1;
|
||||
}
|
||||
|
||||
switch (play->sceneNum) {
|
||||
switch (play->sceneId) {
|
||||
case SCENE_SPOT00:
|
||||
case SCENE_SPOT01:
|
||||
case SCENE_SPOT02:
|
||||
|
@ -4228,7 +4228,7 @@ void Interface_Update(PlayState* play) {
|
|||
play->unk_11DE9 = true;
|
||||
}
|
||||
|
||||
if (play->sceneNum == SCENE_SPOT13) {
|
||||
if (play->sceneId == SCENE_SPOT13) {
|
||||
play->transitionType = TRANS_TYPE_SANDSTORM_PERSIST;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_SANDSTORM_PERSIST;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue