mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-13 20:44:41 -04:00
Decomp pull, some z_player and global changes (#6908)
This commit is contained in:
@@ -1694,7 +1694,7 @@ void func_800ED848(u8 inputEnabled) {
|
||||
sOcarinaInpEnabled = inputEnabled;
|
||||
}
|
||||
|
||||
void Audio_OcaSetInstrument(u8 arg0) {
|
||||
void AudioOcarina_SetInstrument(u8 arg0) {
|
||||
if (D_80130F10 == arg0) {
|
||||
return;
|
||||
}
|
||||
@@ -2191,14 +2191,14 @@ void func_800EE824(void) {
|
||||
D_80131C80++;
|
||||
} else {
|
||||
D_80131C80 = 3;
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
}
|
||||
D_80131C88 = 1200;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
Audio_SetSoundBanksMute(0);
|
||||
Audio_OcaSetInstrument(D_80131C84);
|
||||
AudioOcarina_SetInstrument(D_80131C84);
|
||||
Audio_OcaSetSongPlayback(OCARINA_SONG_SCARECROW_LONG + 1, 1);
|
||||
D_80131C84++;
|
||||
D_80131C80++;
|
||||
@@ -4223,12 +4223,12 @@ void Audio_StepFreqLerp(FreqLerp* lerp) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_800F47BC(void) {
|
||||
void Audio_SetBgmVolumeOffDuringFanfare(void) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 1, 0, 10);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 1, 0, 10);
|
||||
}
|
||||
|
||||
void func_800F47FC(void) {
|
||||
void Audio_SetBgmVolumeOnDuringFanfare(void) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 1, 0x7F, 3);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 1, 0x7F, 3);
|
||||
}
|
||||
@@ -5122,7 +5122,7 @@ void func_800F6C34(void) {
|
||||
sAudioExtraFilter = 0;
|
||||
sAudioBaseFilter2 = 0;
|
||||
sAudioExtraFilter2 = 0;
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
sRiverFreqScaleLerp.remainingFrames = 0;
|
||||
sWaterfallFreqScaleLerp.remainingFrames = 0;
|
||||
sRiverFreqScaleLerp.value = 1.0f;
|
||||
|
||||
@@ -2065,15 +2065,15 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
sDbCamAnim.unk_04 = 0;
|
||||
} else if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CLEFT)) {
|
||||
sDbCamAnim.unk_0A = 0;
|
||||
Interface_ChangeAlpha(2);
|
||||
ShrinkWindow_SetVal(0);
|
||||
Interface_ChangeHudVisibilityMode(2);
|
||||
Letterbox_SetSizeTarget(0);
|
||||
D_8016110C = 0;
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (func_800B91B0(cam, dbCamera) == 0) {
|
||||
Interface_ChangeAlpha(2);
|
||||
ShrinkWindow_SetVal(0);
|
||||
Interface_ChangeHudVisibilityMode(2);
|
||||
Letterbox_SetSizeTarget(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
@@ -2230,8 +2230,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
sDbCamAnim.unk_04 = 0.0f;
|
||||
sDbCamAnim.unk_0A = 1;
|
||||
sDbCamAnim.unk_0C = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
D_8016110C = 0;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
@@ -5,7 +5,7 @@ s32 D_8012CED0 = 0;
|
||||
s32 sShrinkWindowVal = 0;
|
||||
s32 sShrinkWindowCurrentVal = 0;
|
||||
|
||||
void ShrinkWindow_SetVal(s32 value) {
|
||||
void Letterbox_SetSizeTarget(s32 value) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableBlackBars"), 0)) {
|
||||
sShrinkWindowVal = 0;
|
||||
return;
|
||||
|
||||
@@ -1456,8 +1456,8 @@ void Actor_SwapHookshotAttachment(PlayState* play, Actor* actorA, Actor* actorB)
|
||||
}
|
||||
|
||||
void Actor_RequestHorseCameraSetting(PlayState* play, Player* player) {
|
||||
if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_4) && func_800C0CB8(play)) {
|
||||
Camera_ChangeSetting(Play_GetCamera(play, CAM_ID_MAIN), CAM_SET_HORSE);
|
||||
if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_4) && Play_CamIsNotFixed(play)) {
|
||||
Camera_RequestSetting(Play_GetCamera(play, CAM_ID_MAIN), CAM_SET_HORSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4087,7 +4087,7 @@ u16 SurfaceType_GetSfx(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId)
|
||||
/**
|
||||
* SurfaceType get terrain slope surface
|
||||
*/
|
||||
u32 SurfaceType_GetSlope(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
|
||||
u32 SurfaceType_GetFloorEffect(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
|
||||
return SurfaceType_GetData(colCtx, poly, bgId, 1) >> 4 & 3;
|
||||
}
|
||||
|
||||
|
||||
@@ -775,7 +775,7 @@ void Camera_UpdateInterface(s16 flags) {
|
||||
if (flags & SHRINKWIN_CURVAL) {
|
||||
ShrinkWindow_SetCurrentVal(sCameraShrinkWindowVal);
|
||||
} else {
|
||||
ShrinkWindow_SetVal(sCameraShrinkWindowVal);
|
||||
Letterbox_SetSizeTarget(sCameraShrinkWindowVal);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -786,7 +786,7 @@ void Camera_UpdateInterface(s16 flags) {
|
||||
}
|
||||
if (interfaceAlpha != sCameraInterfaceAlpha) {
|
||||
sCameraInterfaceAlpha = interfaceAlpha;
|
||||
Interface_ChangeAlpha(sCameraInterfaceAlpha);
|
||||
Interface_ChangeHudVisibilityMode(sCameraInterfaceAlpha);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7416,7 +7416,7 @@ s32 Camera_DbgChangeMode(Camera* camera) {
|
||||
}
|
||||
if (changeDir != 0) {
|
||||
sDbgModeIdx = (sDbgModeIdx + changeDir) % 6;
|
||||
if (Camera_ChangeSetting(camera, D_8011DAFC[sDbgModeIdx]) > 0) {
|
||||
if (Camera_RequestSetting(camera, D_8011DAFC[sDbgModeIdx]) > 0) {
|
||||
osSyncPrintf("camera: force change SET to %s!\n", sCameraSettingNames[D_8011DAFC[sDbgModeIdx]]);
|
||||
}
|
||||
}
|
||||
@@ -8023,7 +8023,7 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
|
||||
return setting;
|
||||
}
|
||||
|
||||
s32 Camera_ChangeSetting(Camera* camera, s16 setting) {
|
||||
s32 Camera_RequestSetting(Camera* camera, s16 setting) {
|
||||
return Camera_ChangeSettingFlags(camera, setting, 0);
|
||||
}
|
||||
|
||||
@@ -8225,14 +8225,14 @@ s32 Camera_ChangeDoorCam(Camera* camera, Actor* doorActor, s16 camDataIdx, f32 a
|
||||
}
|
||||
|
||||
if (camDataIdx == -1) {
|
||||
Camera_ChangeSetting(camera, CAM_SET_DOORC);
|
||||
Camera_RequestSetting(camera, CAM_SET_DOORC);
|
||||
osSyncPrintf(".... change default door camera (set %d)\n", CAM_SET_DOORC);
|
||||
} else {
|
||||
s32 setting = Camera_GetCamDataSetting(camera, camDataIdx);
|
||||
|
||||
camera->unk_14A |= 0x40;
|
||||
|
||||
if (Camera_ChangeSetting(camera, setting) >= 0) {
|
||||
if (Camera_RequestSetting(camera, setting) >= 0) {
|
||||
camera->camDataIdx = camDataIdx;
|
||||
camera->unk_14A |= 4;
|
||||
}
|
||||
|
||||
@@ -15,5 +15,5 @@ void SaveContext_Init(void) {
|
||||
gSaveContext.skyboxTime = 0;
|
||||
gSaveContext.dogIsLost = true;
|
||||
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
|
||||
gSaveContext.unk_13EE = 50;
|
||||
gSaveContext.prevHudVisibilityMode = 50;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ void func_801109B0(PlayState* play) {
|
||||
u8 timerId;
|
||||
|
||||
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
|
||||
gSaveContext.unk_13E8 = gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.nextHudVisibilityMode = gSaveContext.hudVisibilityMode = 0;
|
||||
|
||||
View_Init(&interfaceCtx->view, play->state.gfxCtx);
|
||||
|
||||
|
||||
@@ -195,8 +195,8 @@ u32 func_8006472C(PlayState* play, CutsceneContext* csCtx, f32 target) {
|
||||
}
|
||||
|
||||
void func_80064760(PlayState* play, CutsceneContext* csCtx) {
|
||||
Interface_ChangeAlpha(1);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
|
||||
if (func_8006472C(play, csCtx, 1.0f)) {
|
||||
Audio_SetCutsceneFlag(1);
|
||||
@@ -206,8 +206,8 @@ void func_80064760(PlayState* play, CutsceneContext* csCtx) {
|
||||
|
||||
void func_800647C0(PlayState* play, CutsceneContext* csCtx) {
|
||||
func_80068C3C(play, csCtx);
|
||||
Interface_ChangeAlpha(1);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
|
||||
if (func_8006472C(play, csCtx, 1.0f)) {
|
||||
Audio_SetCutsceneFlag(1);
|
||||
@@ -399,10 +399,10 @@ void func_80064824(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
|
||||
}
|
||||
break;
|
||||
case 28:
|
||||
play->unk_11DE9 = 1;
|
||||
play->haltAllActors = 1;
|
||||
break;
|
||||
case 29:
|
||||
play->unk_11DE9 = 0;
|
||||
play->haltAllActors = 0;
|
||||
break;
|
||||
case 30:
|
||||
Flags_SetEnv(play, 3);
|
||||
@@ -1698,7 +1698,7 @@ void Cutscene_Command_Textbox(PlayState* play, CutsceneContext* csCtx, CsCmdText
|
||||
}
|
||||
|
||||
if (csCtx->frames == originalCsFrames) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
D_8011E1C0 = 0;
|
||||
D_8011E1C4 = 0;
|
||||
}
|
||||
@@ -2165,8 +2165,8 @@ void func_80068ECC(PlayState* play, CutsceneContext* csCtx) {
|
||||
}
|
||||
|
||||
if (gSaveContext.cutsceneTrigger == 0) {
|
||||
Interface_ChangeAlpha(1);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
ShrinkWindow_SetCurrentVal(0x20);
|
||||
csCtx->state++;
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ void GameOver_Update(PlayState* play) {
|
||||
for (int buttonIndex = 0; buttonIndex < ARRAY_COUNT(gSaveContext.buttonStatus); buttonIndex++) {
|
||||
gSaveContext.buttonStatus[buttonIndex] = BTN_ENABLED;
|
||||
}
|
||||
gSaveContext.forceRisingButtonAlphas = gSaveContext.unk_13E8 = gSaveContext.unk_13EA =
|
||||
gSaveContext.unk_13EC = 0;
|
||||
gSaveContext.forceRisingButtonAlphas = gSaveContext.nextHudVisibilityMode = gSaveContext.hudVisibilityMode =
|
||||
gSaveContext.hudVisibilityModeTimer = 0;
|
||||
|
||||
Environment_InitGameOverLights(play);
|
||||
gGameOverTimer = 20;
|
||||
@@ -109,7 +109,7 @@ void GameOver_Update(PlayState* play) {
|
||||
gameOverCtx->state++;
|
||||
gGameOverTimer = 0;
|
||||
Environment_InitGameOverLights(play);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
return;
|
||||
|
||||
case GAMEOVER_REVIVE_RUMBLE:
|
||||
|
||||
@@ -25,7 +25,7 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
}
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
|
||||
gSaveContext.unk_13EE = gSaveContext.unk_13EA;
|
||||
gSaveContext.prevHudVisibilityMode = gSaveContext.hudVisibilityMode;
|
||||
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_L))
|
||||
CVarSetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 1);
|
||||
@@ -60,7 +60,7 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
R_UPDATE_RATE = 2;
|
||||
|
||||
if (ShrinkWindow_GetVal()) {
|
||||
ShrinkWindow_SetVal(0);
|
||||
Letterbox_SetSizeTarget(0);
|
||||
}
|
||||
|
||||
func_800F64E0(1);
|
||||
|
||||
@@ -2165,7 +2165,7 @@ void Environment_FadeInGameOverLights(PlayState* play) {
|
||||
sGameOverLightsIntensity += 2;
|
||||
}
|
||||
|
||||
if (func_800C0CB8(play)) {
|
||||
if (Play_CamIsNotFixed(play)) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (play->envCtx.adjAmbientColor[i] > -255) {
|
||||
play->envCtx.adjAmbientColor[i] -= 12;
|
||||
@@ -2212,7 +2212,7 @@ void Environment_FadeOutGameOverLights(PlayState* play) {
|
||||
sGameOverLightsIntensity, sGameOverLightsIntensity, sGameOverLightsIntensity, 255);
|
||||
}
|
||||
|
||||
if (func_800C0CB8(play)) {
|
||||
if (Play_CamIsNotFixed(play)) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
Math_SmoothStepToS(&play->envCtx.adjAmbientColor[i], 0, 5, 12, 1);
|
||||
Math_SmoothStepToS(&play->envCtx.adjLight1Color[i], 0, 5, 12, 1);
|
||||
@@ -2440,7 +2440,7 @@ void Environment_AdjustLights(PlayState* play, f32 arg1, f32 arg2, f32 arg3, f32
|
||||
f32 temp;
|
||||
s32 i;
|
||||
|
||||
if (play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_5 && func_800C0CB8(play)) {
|
||||
if (play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_5 && Play_CamIsNotFixed(play)) {
|
||||
arg1 = CLAMP_MIN(arg1, 0.0f);
|
||||
arg1 = CLAMP_MAX(arg1, 1.0f);
|
||||
|
||||
|
||||
@@ -142,13 +142,13 @@ void Message_UpdateOcarinaGame(PlayState* play) {
|
||||
play->msgCtx.msgMode++;
|
||||
|
||||
if (play->msgCtx.msgMode == MSGMODE_MEMORY_GAME_PLAYER_PLAYING) {
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetPlayingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
|
||||
func_800ECC04((1 << OCARINA_SONG_MEMORY_GAME) + 0x8000);
|
||||
msgCtx->textDrawPos = msgCtx->decodedTextLen;
|
||||
} else if (msgCtx->msgMode == MSGMODE_MEMORY_GAME_RIGHT_SKULLKID_PLAYING) {
|
||||
Audio_OcaSetInstrument(6);
|
||||
AudioOcarina_SetInstrument(6);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
|
||||
Audio_OcaSetSongPlayback(OCARINA_SONG_MEMORY_GAME + 1, 1);
|
||||
@@ -891,8 +891,8 @@ void Message_HandleOcarina(PlayState* play) {
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_SCARECROW_LONG_PLAYBACK) {
|
||||
// "Recording Playback / Recording Playback / Recording Playback / Recording Playback -> "
|
||||
osSyncPrintf("録音再生 録音再生 録音再生 録音再生 -> ");
|
||||
Audio_OcaSetInstrument(1);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
|
||||
sOcarinaNoteBufPos = sOcarinaNoteBufLen = 0;
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos;
|
||||
@@ -907,8 +907,8 @@ void Message_HandleOcarina(PlayState* play) {
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_SCARECROW_PLAYBACK) {
|
||||
// "8 Note Playback / 8 Note Playback / 8 Note Playback -> "
|
||||
osSyncPrintf("8音再生 8音再生 8音再生 -> ");
|
||||
Audio_OcaSetInstrument(1);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
|
||||
sOcarinaNoteBufPos = sOcarinaNoteBufLen = 0;
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos;
|
||||
@@ -2694,10 +2694,10 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
||||
sDisplayNextMessageAsEnglish = false;
|
||||
|
||||
if (msgCtx->msgMode == MSGMODE_NONE) {
|
||||
gSaveContext.unk_13EE = gSaveContext.unk_13EA;
|
||||
gSaveContext.prevHudVisibilityMode = gSaveContext.hudVisibilityMode;
|
||||
}
|
||||
if (YREG(15) == 0x10) {
|
||||
Interface_ChangeAlpha(5);
|
||||
Interface_ChangeHudVisibilityMode(5);
|
||||
}
|
||||
|
||||
sMessageHasSetSfx = D_8014B2F4 = sTextboxSkipped = sTextIsCredits = 0;
|
||||
@@ -2744,7 +2744,7 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
||||
textId == 0x2061 || // Learning Epona's Song
|
||||
textId == 0x5035 || // Guru-Guru in Windmill
|
||||
textId == 0x40AC) { // Ocarina Frog Minigame
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
}
|
||||
msgCtx->textId = textId;
|
||||
|
||||
@@ -2984,9 +2984,9 @@ void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
|
||||
msgCtx->textboxColorAlphaCurrent = msgCtx->textboxColorAlphaTarget;
|
||||
if (noStop == false) {
|
||||
Interface_LoadActionLabelB(play, DO_ACTION_STOP);
|
||||
noStop = gSaveContext.unk_13EA;
|
||||
Interface_ChangeAlpha(0xA);
|
||||
gSaveContext.unk_13EA = noStop;
|
||||
noStop = gSaveContext.hudVisibilityMode;
|
||||
Interface_ChangeHudVisibilityMode(0xA);
|
||||
gSaveContext.hudVisibilityMode = noStop;
|
||||
}
|
||||
// "Music Performance Start"
|
||||
osSyncPrintf("演奏開始\n");
|
||||
@@ -2997,14 +2997,14 @@ void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
|
||||
msgCtx->msgMode = MSGMODE_FROGS_START;
|
||||
msgCtx->textBoxType = TEXTBOX_TYPE_BLUE;
|
||||
} else if (ocarinaActionId == OCARINA_ACTION_MEMORY_GAME) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
Message_Decode(play);
|
||||
msgCtx->msgMode = MSGMODE_MEMORY_GAME_START;
|
||||
} else if (ocarinaActionId == OCARINA_ACTION_SCARECROW_LONG_PLAYBACK) {
|
||||
// "?????Recording Playback / Recording Playback / Recording Playback / Recording Playback -> "
|
||||
osSyncPrintf("?????録音再生 録音再生 録音再生 録音再生 -> ");
|
||||
Audio_OcaSetInstrument(1);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
|
||||
sOcarinaNoteBufPos = sOcarinaNoteBufLen = 0;
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos;
|
||||
@@ -3012,8 +3012,8 @@ void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
|
||||
msgCtx->stateTimer = 3;
|
||||
msgCtx->msgMode = MSGMODE_SCARECROW_LONG_PLAYBACK;
|
||||
Audio_OcaSetSongPlayback(OCARINA_SONG_SCARECROW_LONG + 1, 1);
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(1);
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
}
|
||||
for (k = 0, j = 0; j < 48; j++) {
|
||||
Font_LoadCharWide(&play->msgCtx.font, 0x8140, k);
|
||||
@@ -3362,7 +3362,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
case MSGMODE_OCARINA_STARTING:
|
||||
case MSGMODE_SONG_DEMONSTRATION_STARTING:
|
||||
case MSGMODE_SONG_PLAYBACK_STARTING:
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetPlayingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_01;
|
||||
@@ -3430,7 +3430,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
if (msgCtx->ocarinaAction == OCARINA_ACTION_CHECK_NOWARP) {
|
||||
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SARIAS ||
|
||||
msgCtx->ocarinaStaff->state == OCARINA_SONG_SCARECROW) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
@@ -3445,11 +3445,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
}
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_CHECK_SCARECROW) {
|
||||
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SCARECROW) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
@@ -3465,7 +3465,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
}
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY) {
|
||||
// "Ocarina_Free Correct Example Performance"
|
||||
@@ -3482,21 +3482,21 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
} else {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
|
||||
}
|
||||
} else if (msgCtx->ocarinaStaff->state == 0xFF) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->stateTimer = 10;
|
||||
msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
|
||||
} else if (isB_Held) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
Message_CloseTextbox(play);
|
||||
}
|
||||
@@ -3541,7 +3541,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
|
||||
msgCtx->stateTimer--;
|
||||
if (msgCtx->stateTimer == 0) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
if (msgCtx->msgMode == MSGMODE_OCARINA_CORRECT_PLAYBACK) {
|
||||
// "Correct Example Performance"
|
||||
osSyncPrintf("正解模範演奏=%x\n", msgCtx->lastPlayedSong);
|
||||
@@ -3615,7 +3615,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
case MSGMODE_SONG_PLAYED:
|
||||
msgCtx->stateTimer--;
|
||||
if (msgCtx->stateTimer == 0) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
osSyncPrintf("Na_StopOcarinaMode();\n");
|
||||
osSyncPrintf("Na_StopOcarinaMode();\n");
|
||||
@@ -3645,12 +3645,12 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
} else {
|
||||
Message_DrawText(play, &gfx);
|
||||
}
|
||||
Audio_OcaSetInstrument(1);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
Audio_OcaSetSongPlayback(msgCtx->lastPlayedSong + 1, 1);
|
||||
} else {
|
||||
Audio_OcaSetInstrument(1);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
}
|
||||
if (msgCtx->lastPlayedSong != OCARINA_SONG_SCARECROW) {
|
||||
Audio_PlayFanfare(sOcarinaSongFanfares[msgCtx->lastPlayedSong]);
|
||||
@@ -3672,15 +3672,15 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
// "ocarina_no=%d Song Chosen=%d"
|
||||
osSyncPrintf("ocarina_no=%d 選曲=%d\n", msgCtx->ocarinaAction, 0x16);
|
||||
if (msgCtx->ocarinaAction < OCARINA_ACTION_TEACH_SARIA) {
|
||||
Audio_OcaSetInstrument(4);
|
||||
AudioOcarina_SetInstrument(4);
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_TEACH_EPONA) {
|
||||
Audio_OcaSetInstrument(2);
|
||||
AudioOcarina_SetInstrument(2);
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_TEACH_LULLABY) {
|
||||
Audio_OcaSetInstrument(3);
|
||||
AudioOcarina_SetInstrument(3);
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_TEACH_STORMS) {
|
||||
Audio_OcaSetInstrument(5);
|
||||
AudioOcarina_SetInstrument(5);
|
||||
} else {
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
}
|
||||
// "Example Performance"
|
||||
osSyncPrintf("模範演奏=%x\n", msgCtx->ocarinaAction - OCARINA_ACTION_TEACH_MINUET);
|
||||
@@ -3726,7 +3726,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
}
|
||||
break;
|
||||
case MSGMODE_SONG_PLAYED_ACT_BEGIN:
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Message_ResetOcarinaNoteState();
|
||||
msgCtx->msgMode = MSGMODE_SONG_PLAYED_ACT;
|
||||
msgCtx->stateTimer = 2;
|
||||
@@ -3871,7 +3871,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
// "Scarecrow Recording Initialization"
|
||||
osSyncPrintf("案山子録音 初期化\n");
|
||||
Audio_OcaSetRecordingState(1);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetRecordingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
|
||||
sOcarinaNoteBufLen = 0;
|
||||
@@ -3957,7 +3957,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
if (msgCtx->stateTimer == 0) {
|
||||
if (msgCtx->ocarinaStaff->state == 0) {
|
||||
osSyncPrintf("bbbbbbbbbbb\n");
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_0F;
|
||||
Message_CloseTextbox(play);
|
||||
}
|
||||
@@ -3967,7 +3967,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
break;
|
||||
case MSGMODE_SCARECROW_RECORDING_START:
|
||||
Audio_OcaSetRecordingState(2);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->msgMode = MSGMODE_SCARECROW_RECORDING_ONGOING;
|
||||
if (gSaveContext.language == LANGUAGE_JPN && !sDisplayNextMessageAsEnglish) {
|
||||
Message_DrawTextJPN(play, &gfx);
|
||||
@@ -4016,13 +4016,13 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
break;
|
||||
case MSGMODE_SCARECROW_RECORDING_FAILED:
|
||||
osSyncPrintf("cccccccccccc\n");
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Message_StartTextbox(play, 0x40AD, NULL); // Bonooru doesn't remember your song
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
break;
|
||||
case MSGMODE_MEMORY_GAME_START:
|
||||
Audio_OcaSetInstrument(1);
|
||||
Audio_OcaSetInstrument(6);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
AudioOcarina_SetInstrument(6);
|
||||
Audio_OcaMemoryGameStart(gSaveContext.ocarinaGameRoundNum);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
|
||||
@@ -4078,7 +4078,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
if (msgCtx->ocarinaStaff->state == 0xFF) {
|
||||
// "Musical round failed!!!!!!!!!"
|
||||
osSyncPrintf("輪唱失敗!!!!!!!!!\n");
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->stateTimer = 10;
|
||||
@@ -4132,7 +4132,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
}
|
||||
break;
|
||||
case MSGMODE_FROGS_START:
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetPlayingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_01;
|
||||
@@ -4534,7 +4534,7 @@ void Message_Update(PlayState* play) {
|
||||
case MSGMODE_TEXT_NEXT_MSG:
|
||||
Message_Decode(play);
|
||||
if (sTextFade) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
}
|
||||
if (D_80153D74 != 0) {
|
||||
msgCtx->textDrawPos = msgCtx->decodedTextLen;
|
||||
@@ -4620,7 +4620,7 @@ void Message_Update(PlayState* play) {
|
||||
if (msgCtx->textId == 0x301F || msgCtx->textId == 0xA || msgCtx->textId == 0xC || msgCtx->textId == 0xCF ||
|
||||
msgCtx->textId == 0x21C || msgCtx->textId == 9 || msgCtx->textId == 0x4078 ||
|
||||
msgCtx->textId == 0x2015 || msgCtx->textId == 0x3040) {
|
||||
gSaveContext.unk_13EE = 0x32;
|
||||
gSaveContext.prevHudVisibilityMode = 0x32;
|
||||
}
|
||||
if (play->csCtx.state == 0) {
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
@@ -4631,11 +4631,12 @@ void Message_Update(PlayState* play) {
|
||||
(msgCtx->textId != 0x3055 && gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
osSyncPrintf("=== day_time=%x ", ((void)0, gSaveContext.cutsceneIndex));
|
||||
if (play->activeCamera == CAM_ID_MAIN) {
|
||||
if (gSaveContext.unk_13EE == 0 || gSaveContext.unk_13EE == 1 || gSaveContext.unk_13EE == 2) {
|
||||
gSaveContext.unk_13EE = 0x32;
|
||||
if (gSaveContext.prevHudVisibilityMode == 0 || gSaveContext.prevHudVisibilityMode == 1 ||
|
||||
gSaveContext.prevHudVisibilityMode == 2) {
|
||||
gSaveContext.prevHudVisibilityMode = 0x32;
|
||||
}
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(gSaveContext.unk_13EE);
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
Interface_ChangeHudVisibilityMode(gSaveContext.prevHudVisibilityMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -962,7 +962,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
|
||||
} break;
|
||||
case 9806:
|
||||
csCam->timer = -99;
|
||||
if (func_800C0CB8(play)) {
|
||||
if (Play_CamIsNotFixed(play)) {
|
||||
func_800C0808(play, camIdx, player, CAM_SET_TURN_AROUND);
|
||||
csCam->data2 = 0xC;
|
||||
} else {
|
||||
@@ -971,7 +971,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
|
||||
}
|
||||
break;
|
||||
case 9908:
|
||||
if (func_800C0CB8(play)) {
|
||||
if (Play_CamIsNotFixed(play)) {
|
||||
D_801231B4[0].eyeTargetInit.z = D_801231B4[1].eyeTargetInit.z = !LINK_IS_ADULT ? 100.0f : 120.0f;
|
||||
|
||||
if (player->stateFlags1 & PLAYER_STATE1_IN_WATER) {
|
||||
@@ -1187,7 +1187,7 @@ s16 OnePointCutscene_Init(PlayState* play, s16 csId, s16 timer, Actor* actor, s1
|
||||
OnePointCutscene_SetAsChild(play, vChildCamIdx, csCamIdx);
|
||||
vCsStatus = CAM_STAT_WAIT;
|
||||
} else {
|
||||
Interface_ChangeAlpha(2);
|
||||
Interface_ChangeHudVisibilityMode(2);
|
||||
}
|
||||
OnePointCutscene_SetAsChild(play, csCamIdx, parentCamIdx);
|
||||
|
||||
|
||||
+46
-44
@@ -196,11 +196,12 @@ static const char* actionsTbl[] = {
|
||||
};
|
||||
|
||||
// original name: "alpha_change"
|
||||
void Interface_ChangeAlpha(u16 alphaType) {
|
||||
if (alphaType != gSaveContext.unk_13EA) {
|
||||
osSyncPrintf("ALPHAーTYPE=%d LAST_TIME_TYPE=%d\n", alphaType, gSaveContext.unk_13EE);
|
||||
gSaveContext.unk_13EA = gSaveContext.unk_13E8 = alphaType;
|
||||
gSaveContext.unk_13EC = 1;
|
||||
void Interface_ChangeHudVisibilityMode(u16 hudVisibilityMode) {
|
||||
if (hudVisibilityMode != gSaveContext.hudVisibilityMode) {
|
||||
osSyncPrintf("ALPHAーTYPE=%d LAST_TIME_TYPE=%d\n", hudVisibilityMode,
|
||||
gSaveContext.prevHudVisibilityMode);
|
||||
gSaveContext.hudVisibilityMode = gSaveContext.nextHudVisibilityMode = hudVisibilityMode;
|
||||
gSaveContext.hudVisibilityModeTimer = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,13 +348,13 @@ void func_80082850(PlayState* play, s16 maxAlpha) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
s16 alpha = 255 - maxAlpha;
|
||||
|
||||
switch (gSaveContext.unk_13E8) {
|
||||
switch (gSaveContext.nextHudVisibilityMode) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 8:
|
||||
osSyncPrintf("a_alpha=%d, c_alpha=%d → ", interfaceCtx->aAlpha, interfaceCtx->cLeftAlpha);
|
||||
|
||||
if (gSaveContext.unk_13E8 == 8) {
|
||||
if (gSaveContext.nextHudVisibilityMode == 8) {
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = alpha;
|
||||
}
|
||||
@@ -852,28 +853,28 @@ void func_80083108(PlayState* play) {
|
||||
BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[5] = gSaveContext.buttonStatus[6] = gSaveContext.buttonStatus[7] =
|
||||
gSaveContext.buttonStatus[8] = BTN_DISABLED;
|
||||
Interface_ChangeAlpha(6);
|
||||
Interface_ChangeHudVisibilityMode(6);
|
||||
}
|
||||
|
||||
if (play->transitionMode != TRANS_MODE_OFF) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
} else if (gSaveContext.minigameState == 1) {
|
||||
Interface_ChangeAlpha(8);
|
||||
Interface_ChangeHudVisibilityMode(8);
|
||||
} else if (play->shootingGalleryStatus > 1) {
|
||||
Interface_ChangeAlpha(8);
|
||||
Interface_ChangeHudVisibilityMode(8);
|
||||
} else if ((play->sceneNum == SCENE_BOMBCHU_BOWLING_ALLEY) && Flags_GetSwitch(play, 0x38)) {
|
||||
Interface_ChangeAlpha(8);
|
||||
Interface_ChangeHudVisibilityMode(8);
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_ON_HORSE) {
|
||||
Interface_ChangeAlpha(12);
|
||||
Interface_ChangeHudVisibilityMode(12);
|
||||
}
|
||||
} else {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_ON_HORSE) {
|
||||
Interface_ChangeAlpha(12);
|
||||
Interface_ChangeHudVisibilityMode(12);
|
||||
}
|
||||
}
|
||||
// Don't hide the HUD in the Chamber of Sages when in Boss Rush.
|
||||
} else if (play->sceneNum == SCENE_CHAMBER_OF_THE_SAGES && !IS_BOSS_RUSH) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
} else if (play->sceneNum == SCENE_FISHING_POND) {
|
||||
gSaveContext.forceRisingButtonAlphas = 2;
|
||||
if (play->interfaceCtx.unk_260 != 0) {
|
||||
@@ -881,17 +882,17 @@ void func_80083108(PlayState* play) {
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.equips.buttonItems[0];
|
||||
GameInteractor_Should(VB_TEMP_B_STASH_SWORDLESS, true, play);
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_FISHING_POLE;
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
Interface_LoadItemIcon1(play, 0);
|
||||
Interface_ChangeAlpha(12);
|
||||
Interface_ChangeHudVisibilityMode(12);
|
||||
}
|
||||
|
||||
if (gSaveContext.unk_13EA != 12) {
|
||||
Interface_ChangeAlpha(12);
|
||||
if (gSaveContext.hudVisibilityMode != 12) {
|
||||
Interface_ChangeHudVisibilityMode(12);
|
||||
}
|
||||
} else if (gSaveContext.equips.buttonItems[0] == ITEM_FISHING_POLE) {
|
||||
gSaveContext.equips.buttonItems[0] = gSaveContext.buttonStatus[0];
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
|
||||
GameInteractor_Should(VB_TEMP_B_RESTORE_SWORDLESS, true);
|
||||
|
||||
@@ -903,17 +904,17 @@ void func_80083108(PlayState* play) {
|
||||
gSaveContext.buttonStatus[3] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[5] = gSaveContext.buttonStatus[6] = gSaveContext.buttonStatus[7] =
|
||||
gSaveContext.buttonStatus[8] = BTN_DISABLED;
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
} else {
|
||||
if (gSaveContext.buttonStatus[0] == BTN_ENABLED) {
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
}
|
||||
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[5] = gSaveContext.buttonStatus[6] = gSaveContext.buttonStatus[7] =
|
||||
gSaveContext.buttonStatus[8] = BTN_DISABLED;
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
}
|
||||
} else if (msgCtx->msgMode == MSGMODE_NONE) {
|
||||
if (GameInteractor_PacifistModeActive()) {
|
||||
@@ -961,10 +962,10 @@ void func_80083108(PlayState* play) {
|
||||
}
|
||||
|
||||
if (sp28) {
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
}
|
||||
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
} else if ((player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER) ||
|
||||
(player->stateFlags2 & PLAYER_STATE2_CRAWLING)) {
|
||||
if (gSaveContext.buttonStatus[0] != BTN_DISABLED) {
|
||||
@@ -976,8 +977,8 @@ void func_80083108(PlayState* play) {
|
||||
gSaveContext.buttonStatus[6] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[7] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[8] = BTN_DISABLED;
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
}
|
||||
} else if ((gSaveContext.eventInf[0] & 0xF) == 1) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_ON_HORSE) {
|
||||
@@ -1032,10 +1033,10 @@ void func_80083108(PlayState* play) {
|
||||
}
|
||||
|
||||
if (sp28) {
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
}
|
||||
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
} else {
|
||||
if (interfaceCtx->restrictions.bButton == 0) {
|
||||
if ((gSaveContext.equips.buttonItems[0] == ITEM_SLINGSHOT) ||
|
||||
@@ -1305,9 +1306,9 @@ void func_80083108(PlayState* play) {
|
||||
}
|
||||
|
||||
if (sp28) {
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
if ((play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) {
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
osSyncPrintf("???????? alpha_change( 50 ); ?????\n");
|
||||
} else {
|
||||
osSyncPrintf("game_play->fade_direction || game_play->fbdemo_wipe_modem");
|
||||
@@ -1751,7 +1752,7 @@ void func_80084BF4(PlayState* play, u16 flag) {
|
||||
gSaveContext.buttonStatus[3] = BTN_ENABLED;
|
||||
gSaveContext.buttonStatus[5] = gSaveContext.buttonStatus[6] = gSaveContext.buttonStatus[7] =
|
||||
gSaveContext.buttonStatus[8] = BTN_ENABLED;
|
||||
Interface_ChangeAlpha(7);
|
||||
Interface_ChangeHudVisibilityMode(7);
|
||||
} else {
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_ENABLED;
|
||||
@@ -4198,7 +4199,8 @@ void Interface_DrawItemButtons(PlayState* play) {
|
||||
// C-Up Button Texture, Color & Label (Navi Text)
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
|
||||
if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) {
|
||||
if ((gSaveContext.hudVisibilityMode == 1) || (gSaveContext.hudVisibilityMode == 2) ||
|
||||
(gSaveContext.hudVisibilityMode == 5)) {
|
||||
temp = 0;
|
||||
} else if ((player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER) ||
|
||||
(Player_GetEnvironmentalHazard(play) == 4) || (player->stateFlags2 & PLAYER_STATE2_CRAWLING)) {
|
||||
@@ -6520,7 +6522,7 @@ void Interface_Update(PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
switch (gSaveContext.unk_13E8) {
|
||||
switch (gSaveContext.nextHudVisibilityMode) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
@@ -6534,20 +6536,20 @@ void Interface_Update(PlayState* play) {
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
alpha = 255 - (gSaveContext.unk_13EC << 5);
|
||||
alpha = 255 - (gSaveContext.hudVisibilityModeTimer << 5);
|
||||
if (alpha < 0) {
|
||||
alpha = 0;
|
||||
}
|
||||
|
||||
func_80082850(play, alpha);
|
||||
gSaveContext.unk_13EC++;
|
||||
gSaveContext.hudVisibilityModeTimer++;
|
||||
|
||||
if (alpha == 0) {
|
||||
gSaveContext.unk_13E8 = 0;
|
||||
gSaveContext.nextHudVisibilityMode = 0;
|
||||
}
|
||||
break;
|
||||
case 50:
|
||||
alpha = 255 - (gSaveContext.unk_13EC << 5);
|
||||
alpha = 255 - (gSaveContext.hudVisibilityModeTimer << 5);
|
||||
if (alpha < 0) {
|
||||
alpha = 0;
|
||||
}
|
||||
@@ -6602,16 +6604,16 @@ void Interface_Update(PlayState* play) {
|
||||
break;
|
||||
}
|
||||
|
||||
gSaveContext.unk_13EC++;
|
||||
gSaveContext.hudVisibilityModeTimer++;
|
||||
if (alpha1 == 0xFF) {
|
||||
gSaveContext.unk_13E8 = 0;
|
||||
gSaveContext.nextHudVisibilityMode = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
case 52:
|
||||
gSaveContext.unk_13E8 = 1;
|
||||
gSaveContext.nextHudVisibilityMode = 1;
|
||||
func_80082850(play, 0);
|
||||
gSaveContext.unk_13E8 = 0;
|
||||
gSaveContext.nextHudVisibilityMode = 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -6862,12 +6864,12 @@ void Interface_Update(PlayState* play) {
|
||||
gSaveContext.nextDayTime = 0;
|
||||
play->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
play->unk_11DE9 = 1;
|
||||
play->haltAllActors = 1;
|
||||
} else {
|
||||
gSaveContext.nextDayTime = 0x8001;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
play->unk_11DE9 = 1;
|
||||
play->haltAllActors = 1;
|
||||
}
|
||||
|
||||
if (play->sceneNum == SCENE_HAUNTED_WASTELAND) {
|
||||
|
||||
@@ -526,7 +526,7 @@ void Play_Init(GameState* thisx) {
|
||||
play->transitionTrigger = TRANS_TRIGGER_END;
|
||||
play->unk_11E16 = 0xFF;
|
||||
play->bgCoverAlpha = 0;
|
||||
play->unk_11DE9 = false;
|
||||
play->haltAllActors = false;
|
||||
|
||||
if (gSaveContext.gameMode != GAMEMODE_TITLE_SCREEN) {
|
||||
if (gSaveContext.nextTransitionType == TRANS_NEXT_TYPE_DEFAULT) {
|
||||
@@ -793,7 +793,7 @@ void Play_Update(PlayState* play) {
|
||||
case TRANS_MODE_SETUP:
|
||||
if (play->transitionTrigger != TRANS_TRIGGER_END) {
|
||||
s16 sceneLayer = 0;
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
|
||||
if (gSaveContext.cutsceneIndex >= 0xFFF0) {
|
||||
sceneLayer = SCENE_LAYER_CUTSCENE_FIRST + (gSaveContext.cutsceneIndex & 0xF);
|
||||
@@ -1191,7 +1191,7 @@ void Play_Update(PlayState* play) {
|
||||
|
||||
PLAY_LOG(3637);
|
||||
|
||||
if (!play->unk_11DE9) {
|
||||
if (!play->haltAllActors) {
|
||||
Actor_UpdateAll(play, &play->actorCtx);
|
||||
}
|
||||
|
||||
@@ -2017,11 +2017,11 @@ s32 func_800C0808(PlayState* play, s16 camId, Player* player, s16 setting) {
|
||||
|
||||
camera = play->cameraPtrs[camIdx];
|
||||
Camera_InitPlayerSettings(camera, player);
|
||||
return Camera_ChangeSetting(camera, setting);
|
||||
return Camera_RequestSetting(camera, setting);
|
||||
}
|
||||
|
||||
s32 Play_CameraChangeSetting(PlayState* play, s16 camId, s16 setting) {
|
||||
return Camera_ChangeSetting(Play_GetCamera(play, camId), setting);
|
||||
return Camera_RequestSetting(Play_GetCamera(play, camId), setting);
|
||||
}
|
||||
|
||||
void func_800C08AC(PlayState* play, s16 camId, s16 arg2) {
|
||||
@@ -2141,7 +2141,7 @@ void Play_TriggerRespawn(PlayState* play) {
|
||||
Play_LoadToLastEntrance(play);
|
||||
}
|
||||
|
||||
s32 func_800C0CB8(PlayState* play) {
|
||||
s32 Play_CamIsNotFixed(PlayState* play) {
|
||||
return (play->roomCtx.curRoom.meshHeader->base.type != 1) && (YREG(15) != 0x20) && (YREG(15) != 0x30) &&
|
||||
(YREG(15) != 0x40) && (play->sceneNum != SCENE_CASTLE_COURTYARD_GUARDS_DAY);
|
||||
}
|
||||
|
||||
@@ -710,7 +710,7 @@ void Player_ReleaseLockOn(Player* this) {
|
||||
* TODO: Learn more about this and give a name to PLAYER_STATE1_19
|
||||
*/
|
||||
void Player_ClearZTargeting(Player* this) {
|
||||
if ((this->actor.bgCheckFlags & 1) ||
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) ||
|
||||
(this->stateFlags1 & (PLAYER_STATE1_CLIMBING_LADDER | PLAYER_STATE1_ON_HORSE | PLAYER_STATE1_IN_WATER)) ||
|
||||
(!(this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL)) &&
|
||||
((this->actor.world.pos.y - this->actor.floorHeight) < 100.0f))) {
|
||||
@@ -930,7 +930,7 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
|
||||
envHazard = PLAYER_ENV_HAZARD_HOTROOM - 1;
|
||||
} else if ((this->underwaterTimer > 80) &&
|
||||
((this->currentBoots == PLAYER_BOOTS_IRON) || (this->underwaterTimer >= 300))) { // Deep underwater
|
||||
envHazard = ((this->currentBoots == PLAYER_BOOTS_IRON) && (this->actor.bgCheckFlags & 1))
|
||||
envHazard = ((this->currentBoots == PLAYER_BOOTS_IRON) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND))
|
||||
? (PLAYER_ENV_HAZARD_UNDERWATER_FLOOR - 1)
|
||||
: (PLAYER_ENV_HAZARD_UNDERWATER_FREE - 1);
|
||||
} else if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { // Swimming
|
||||
|
||||
Reference in New Issue
Block a user