mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-13 04:29:30 -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
|
||||
|
||||
@@ -354,19 +354,19 @@ void BgBdanObjects_ElevatorOscillate(BgBdanObjects* this, PlayState* play) {
|
||||
if (this->switchFlag == 0) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
this->cameraSetting = play->cameraPtrs[CAM_ID_MAIN]->setting;
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_NORMAL2);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_NORMAL2);
|
||||
func_8005AD1C(play->cameraPtrs[CAM_ID_MAIN], 4);
|
||||
this->switchFlag = 10;
|
||||
}
|
||||
} else {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_NORMAL2);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_NORMAL2);
|
||||
if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->switchFlag != 0) {
|
||||
this->switchFlag--;
|
||||
}
|
||||
}
|
||||
if (this->switchFlag == 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], this->cameraSetting);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], this->cameraSetting);
|
||||
func_8005ACFC(play->cameraPtrs[CAM_ID_MAIN], 4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,7 +404,7 @@ void BgDyYoseizo_GreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) {
|
||||
|
||||
if ((this->dialogState == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
|
||||
Message_CloseTextbox(play);
|
||||
Interface_ChangeAlpha(5);
|
||||
Interface_ChangeHudVisibilityMode(5);
|
||||
this->actionFunc = BgDyYoseizo_SetupHealPlayer_NoReward;
|
||||
}
|
||||
|
||||
@@ -724,7 +724,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) {
|
||||
case FAIRY_UPGRADE_MAGIC:
|
||||
gSaveContext.isMagicAcquired = true;
|
||||
gSaveContext.magicFillTarget = MAGIC_NORMAL_METER;
|
||||
Interface_ChangeAlpha(9);
|
||||
Interface_ChangeHudVisibilityMode(9);
|
||||
break;
|
||||
case FAIRY_UPGRADE_DOUBLE_MAGIC:
|
||||
if (!gSaveContext.isMagicAcquired) {
|
||||
@@ -733,11 +733,11 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) {
|
||||
gSaveContext.isDoubleMagicAcquired = true;
|
||||
gSaveContext.magicFillTarget = MAGIC_DOUBLE_METER;
|
||||
gSaveContext.magicLevel = 0;
|
||||
Interface_ChangeAlpha(9);
|
||||
Interface_ChangeHudVisibilityMode(9);
|
||||
break;
|
||||
case FAIRY_UPGRADE_HALF_DAMAGE:
|
||||
gSaveContext.isDoubleDefenseAcquired = true;
|
||||
Interface_ChangeAlpha(9);
|
||||
Interface_ChangeHudVisibilityMode(9);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -771,7 +771,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) {
|
||||
|
||||
this->itemSpawned = true;
|
||||
gSaveContext.healthAccumulator = MAX_HEALTH;
|
||||
Interface_ChangeAlpha(9);
|
||||
Interface_ChangeHudVisibilityMode(9);
|
||||
gSaveContext.itemGetInf[1] |= sItemGetFlags[actionIndex];
|
||||
Item_Give(play, sItemIds[actionIndex]);
|
||||
}
|
||||
|
||||
@@ -130,10 +130,10 @@ void BgHidanFslift_Update(Actor* thisx, PlayState* play) {
|
||||
if (this->cameraSetting == 0) {
|
||||
this->cameraSetting = 3;
|
||||
}
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->cameraSetting != 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->cameraSetting = 0;
|
||||
}
|
||||
|
||||
@@ -268,10 +268,10 @@ void func_8088B79C(BgHidanRock* this, PlayState* play) {
|
||||
if (this->unk_169 == 0) {
|
||||
this->unk_169 = 3;
|
||||
}
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_169 != 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_169 = 0;
|
||||
}
|
||||
@@ -321,10 +321,10 @@ void func_8088B990(BgHidanRock* this, PlayState* play) {
|
||||
if (this->unk_169 == 0) {
|
||||
this->unk_169 = 3;
|
||||
}
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_169 != 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_169 = 0;
|
||||
}
|
||||
|
||||
@@ -113,10 +113,10 @@ void BgHidanSyoku_Update(Actor* thisx, PlayState* play) {
|
||||
if (this->unk_168 == 0) {
|
||||
this->unk_168 = 3;
|
||||
}
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_168 != 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_168 = 0;
|
||||
}
|
||||
|
||||
@@ -190,9 +190,9 @@ void BgJya1flift_Update(Actor* thisx, PlayState* play2) {
|
||||
tempIsRiding = DynaPolyActor_IsPlayerOnTop(&this->dyna) ? true : false;
|
||||
if ((this->actionFunc == BgJya1flift_Move) || (this->actionFunc == BgJya1flift_DelayMove)) {
|
||||
if (tempIsRiding) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!tempIsRiding && this->isLinkRiding) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
}
|
||||
this->isLinkRiding = tempIsRiding;
|
||||
|
||||
@@ -147,10 +147,10 @@ void BgJyaLift_Update(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
if ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ABOVE) &&
|
||||
((this->unk_16B & DYNA_INTERACT_PLAYER_ABOVE) == 0)) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DIRECTED_YAW);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DIRECTED_YAW);
|
||||
} else if (((this->dyna.interactFlags) & 4) == 0 && ((this->unk_16B & 4)) &&
|
||||
(play->cameraPtrs[CAM_ID_MAIN]->setting == CAM_SET_DIRECTED_YAW)) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_16B = this->dyna.interactFlags;
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ void func_808A3C8C(BgMoriHineri* this, PlayState* play) {
|
||||
|
||||
f0 = 1100.0f - (player->actor.world.pos.z - this->dyna.actor.world.pos.z);
|
||||
this->dyna.actor.shape.rot.z = CLAMP(f0, 0.0f, 1000.0f) * 16.384f;
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON1);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON1);
|
||||
if (this->dyna.actor.params != 0) {
|
||||
this->dyna.actor.shape.rot.z = -this->dyna.actor.shape.rot.z;
|
||||
}
|
||||
|
||||
@@ -209,11 +209,11 @@ void BgMoriRakkatenjo_Update(Actor* thisx, PlayState* play) {
|
||||
osSyncPrintf("camera changed (mori rakka tenjyo) ... \n");
|
||||
sCamSetting = play->cameraPtrs[CAM_ID_MAIN]->setting;
|
||||
Camera_SetCameraData(play->cameraPtrs[CAM_ID_MAIN], 1, &this->dyna.actor, NULL, 0, 0, 0);
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FOREST_BIRDS_EYE);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FOREST_BIRDS_EYE);
|
||||
}
|
||||
} else if (sCamSetting != CAM_SET_NONE) {
|
||||
osSyncPrintf("camera changed (previous) ... \n");
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON1);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON1);
|
||||
sCamSetting = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,9 +63,9 @@ void BgSstFloor_Update(BgSstFloor* thisx, PlayState* play) {
|
||||
colHeader->vtxList = SEGMENTED_TO_VIRTUAL(colHeader->vtxList);
|
||||
|
||||
if (DynaPolyActor_IsPlayerAbove(&this->dyna) && (this->dyna.actor.yDistToPlayer < 1000.0f)) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BOSS_BONGO);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BOSS_BONGO);
|
||||
} else {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna) && (player->fallDistance > 1000.0f)) {
|
||||
|
||||
@@ -934,7 +934,7 @@ void BossDodongo_Roll(BossDodongo* this, PlayState* play) {
|
||||
Math_SmoothStepToF(&this->actor.world.pos.z, sp5C->z, 1.0f, this->unk_1E4, 0.0f);
|
||||
this->unk_1C4 += 2000;
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->unk_228 = 7700.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_K_ROLL - SFX_FLAG);
|
||||
|
||||
|
||||
@@ -797,7 +797,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
||||
|
||||
if (this->csTimer == 20) {
|
||||
Player_SetCsActionWithHaltedActors(play, &this->actor, 0x17);
|
||||
Interface_ChangeAlpha(11); // show hearts only
|
||||
Interface_ChangeHudVisibilityMode(11); // show hearts only
|
||||
}
|
||||
|
||||
if (this->csTimer == 25) {
|
||||
@@ -805,7 +805,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->csTimer == 100) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
}
|
||||
|
||||
if (this->csTimer == 120) {
|
||||
@@ -4142,7 +4142,7 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
|
||||
spBA = 4;
|
||||
}
|
||||
|
||||
if ((spBA != 0) || (this->actor.bgCheckFlags & 1)) {
|
||||
if ((spBA != 0) || (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
f32 sp58;
|
||||
f32 sp54;
|
||||
f32 phi_f20;
|
||||
|
||||
@@ -1076,7 +1076,7 @@ void func_808FFCFC(BossGanon2* this, PlayState* play) {
|
||||
this->unk_311 = false;
|
||||
func_80900580(this, play);
|
||||
Audio_StopSfxById(NA_SE_EN_MGANON_UNARI);
|
||||
} else if ((this->actor.bgCheckFlags & 8) && func_808FFA24(this, play)) {
|
||||
} else if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) && func_808FFA24(this, play)) {
|
||||
this->unk_311 = false;
|
||||
func_80900580(this, play);
|
||||
Audio_StopSfxById(NA_SE_EN_MGANON_UNARI);
|
||||
@@ -2057,7 +2057,7 @@ void BossGanon2_Update(Actor* thisx, PlayState* play) {
|
||||
this->actor.shape.rot = this->actor.world.rot;
|
||||
if (this->unk_335 != 0) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 60.0f, 60.0f, 100.0f, 5);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (this->actor.velocity.y < -5.0f) {
|
||||
Actor_RequestQuakeAndRumble(&this->actor, play, 5, 20);
|
||||
Sfx_PlaySfxCentered(NA_SE_IT_BOMB_EXPLOSION);
|
||||
|
||||
@@ -889,7 +889,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.world.rot.y, Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(play)->actor),
|
||||
2, 0x7D0);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actionState = 130;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
Animation_Change(&this->skelanime, &gGohmaInitialLandingAnim, 1.0f, 0.0f,
|
||||
@@ -1441,7 +1441,7 @@ void BossGoma_FallJump(BossGoma* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.world.rot.y, Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(play)->actor), 2,
|
||||
0x7D0);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
BossGoma_SetupFloorLand(this);
|
||||
this->actor.velocity.y = 0.0f;
|
||||
BossGoma_PlayEffectsAndSfx(this, play, 0, 8);
|
||||
@@ -1458,7 +1458,7 @@ void BossGoma_FallStruckDown(BossGoma* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.world.rot.y, Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(play)->actor), 3,
|
||||
0x7D0);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
BossGoma_SetupFloorLandStruckDown(this);
|
||||
this->actor.velocity.y = 0.0f;
|
||||
BossGoma_PlayEffectsAndSfx(this, play, 0, 8);
|
||||
@@ -1651,11 +1651,11 @@ void BossGoma_FloorMain(BossGoma* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
BossGoma_SetupWallClimb(this);
|
||||
}
|
||||
|
||||
@@ -1702,7 +1702,7 @@ void BossGoma_CeilingMoveToCenter(BossGoma* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.shape.rot.x, -0x8000, 3, 0x3E8);
|
||||
|
||||
// avoid walking into a wall?
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
angle = this->actor.shape.rot.y + 0x8000;
|
||||
|
||||
if (angle < this->actor.wallYaw) {
|
||||
|
||||
@@ -817,8 +817,8 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
||||
tent_shake:
|
||||
case MO_TENT_SHAKE:
|
||||
if (this->timers[0] == 138) {
|
||||
ShrinkWindow_SetVal(0);
|
||||
Interface_ChangeAlpha(0xB);
|
||||
Letterbox_SetSizeTarget(0);
|
||||
Interface_ChangeHudVisibilityMode(0xB);
|
||||
}
|
||||
if ((this->timers[0] % 8) == 0) {
|
||||
play->damagePlayer(play, -1);
|
||||
|
||||
@@ -453,7 +453,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
|
||||
}
|
||||
|
||||
Math_Vec3f_Copy(&sCameraAt, &player->actor.world.pos);
|
||||
if (player->actor.bgCheckFlags & 2) {
|
||||
if (player->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
if (!this->ready) {
|
||||
sFloor->dyna.actor.params = BONGOFLOOR_HIT;
|
||||
this->ready = true;
|
||||
@@ -1652,7 +1652,7 @@ void BossSst_HandPunch(BossSst* this, PlayState* play) {
|
||||
|
||||
this->actor.world.pos.x += this->actor.speedXZ * Math_SinS(this->actor.shape.rot.y);
|
||||
this->actor.world.pos.z += this->actor.speedXZ * Math_CosS(this->actor.shape.rot.y);
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
BossSst_HandSetupRetreat(this);
|
||||
} else if (this->colliderJntSph.base.atFlags & AT_HIT) {
|
||||
Player_PlaySfx(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT);
|
||||
|
||||
@@ -1368,7 +1368,7 @@ void BossTw_HitByBeam(BossTw* this, PlayState* play) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 50.0f, 50.0f, 100.0f, 4);
|
||||
this->actor.world.pos.y += 50.0f;
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
||||
@@ -5333,7 +5333,7 @@ void BossTw_TwinrovaStun(BossTw* this, PlayState* play) {
|
||||
Animation_MorphToLoop(&this->skelAnime, &gTwinrovaStunLoopAnim, 0.0f);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -1491,7 +1491,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
|
||||
this->unk_1AC += 0xC31;
|
||||
this->unk_1A0 = (Math_CosS(this->unk_1AC) * 0.1f) + 1.0f;
|
||||
this->unk_1A4 = (Math_SinS(this->unk_1AC) * 0.05f) + 1.0f;
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actor.bgCheckFlags &= ~8;
|
||||
this->actor.world.rot.y = (s16)Rand_CenteredFloat(30 * (0x10000 / 360)) + this->actor.wallYaw;
|
||||
}
|
||||
|
||||
@@ -724,7 +724,7 @@ void func_8098652C(DemoIm* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80986570(DemoIm* this, PlayState* play) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 7.0f) && (this->actor.bgCheckFlags & 1)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 7.0f) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
u32 sfxId = SFX_FLAG;
|
||||
|
||||
sfxId += SurfaceType_GetSfx(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
|
||||
@@ -336,7 +336,7 @@ void DemoKankyo_SetupType(DemoKankyo* this, PlayState* play) {
|
||||
play->csCtx.segment = gAdultWarpInCS;
|
||||
}
|
||||
}
|
||||
if (func_800C0CB8(play) != 0) {
|
||||
if (Play_CamIsNotFixed(play) != 0) {
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
DemoKankyo_SetupAction(this, DemoKankyo_DoNothing);
|
||||
|
||||
@@ -350,7 +350,7 @@ void EnAnubice_Die(EnAnubice* this, PlayState* play) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 128, 0, 8);
|
||||
EffectSsEnFire_SpawnVec3f(play, &this->actor, &fireEffectPos, 100, 0, 0, -1);
|
||||
|
||||
if ((this->animLastFrame <= curFrame) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((this->animLastFrame <= curFrame) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
Math_ApproachF(&this->actor.shape.yOffset, -4230.0f, 0.5f, 300.0f);
|
||||
if (this->actor.shape.yOffset < -2000.0f) {
|
||||
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xC0);
|
||||
|
||||
@@ -214,7 +214,7 @@ void func_809B5670(EnAttackNiw* this, PlayState* play) {
|
||||
Actor_SetFocus(&this->actor, this->unk_2E4);
|
||||
Actor_GetScreenPos(play, &this->actor, &sp4E, &sp4C);
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->unk_2D4 = this->actor.yawTowardsPlayer;
|
||||
this->unk_2D0 = this->actor.world.rot.x - 3000.0f;
|
||||
this->unk_2DC = 0.0f;
|
||||
@@ -229,7 +229,7 @@ void func_809B5670(EnAttackNiw* this, PlayState* play) {
|
||||
} else if (((this->actor.projectedPos.z > 0.0f) && (fabsf(sp34.x - this->actor.world.pos.x) < 50.0f) &&
|
||||
(fabsf(sp34.y - this->actor.world.pos.y) < 50.0f) &&
|
||||
(fabsf(sp34.z - this->actor.world.pos.z) < 50.0f)) ||
|
||||
(this->actor.bgCheckFlags & 1)) {
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
|
||||
this->unk_2D4 = this->actor.yawTowardsPlayer;
|
||||
this->unk_2D0 = this->actor.world.rot.x - 2000.0f;
|
||||
@@ -255,7 +255,7 @@ void func_809B59B0(EnAttackNiw* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (this->unk_25A == 0) {
|
||||
this->unk_25A = 3;
|
||||
this->actor.velocity.y = 3.5f;
|
||||
@@ -277,13 +277,13 @@ void func_809B59B0(EnAttackNiw* this, PlayState* play) {
|
||||
Math_ApproachF(&this->unk_2DC, 10000.0f, 1.0f, 1000.0f);
|
||||
Math_ApproachF(&this->actor.speedXZ, this->unk_2E0, 0.9f, 1.0f);
|
||||
if ((this->actor.gravity == -2.0f) && (this->unk_262 == 0) &&
|
||||
((this->actor.bgCheckFlags & 8) || (this->unk_25C == 0))) {
|
||||
((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || (this->unk_25C == 0))) {
|
||||
this->unk_2E0 = 0.0f;
|
||||
this->actor.gravity = 0.0f;
|
||||
this->unk_2DC = 0.0f;
|
||||
this->unk_2D0 = this->actor.world.rot.x - 5000.0f;
|
||||
this->actionFunc = func_809B5C18;
|
||||
} else if (this->actor.bgCheckFlags & 1) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
func_809B5268(this, play, 5);
|
||||
} else {
|
||||
func_809B5268(this, play, 2);
|
||||
|
||||
@@ -207,7 +207,7 @@ void EnBa_SetupFallAsBlob(EnBa* this) {
|
||||
* Action function of the pink fleshy blobs that spawn and fall to the floor when a tentacle dies
|
||||
*/
|
||||
void EnBa_FallAsBlob(EnBa* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.scale.y -= 0.001f;
|
||||
this->actor.scale.x += 0.0005f;
|
||||
this->actor.scale.z += 0.0005f;
|
||||
|
||||
@@ -516,7 +516,7 @@ void EnBb_SetupDamage(EnBb* this) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BUBLE_DAMAGE);
|
||||
if (this->actor.params > ENBB_GREEN) {
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
if ((this->actor.bgCheckFlags & 8) == 0) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) == 0) {
|
||||
this->actor.speedXZ = -7.0f;
|
||||
}
|
||||
this->actor.shape.yOffset = 1500.0f;
|
||||
@@ -635,7 +635,7 @@ void EnBb_Blue(EnBb* this, PlayState* play) {
|
||||
}
|
||||
thisYawToWall = this->actor.wallYaw - this->actor.world.rot.y;
|
||||
moveYawToWall = this->actor.wallYaw - this->vMoveAngleY;
|
||||
if ((this->targetActor == NULL) && (this->actor.bgCheckFlags & 8) &&
|
||||
if ((this->targetActor == NULL) && (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) &&
|
||||
(ABS(thisYawToWall) > 0x4000 || ABS(moveYawToWall) > 0x4000)) {
|
||||
this->vMoveAngleY = this->actor.wallYaw + this->actor.wallYaw - this->actor.world.rot.y - 0x8000;
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->vMoveAngleY, 1, 0xBB8, 0);
|
||||
@@ -693,7 +693,7 @@ void EnBb_Down(EnBb* this, PlayState* play) {
|
||||
s16 yawDiff = this->actor.world.rot.y - this->actor.wallYaw;
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
if (ABS(yawDiff) > 0x4000) {
|
||||
this->actor.world.rot.y = this->actor.wallYaw + this->actor.wallYaw - this->actor.world.rot.y - 0x8000;
|
||||
}
|
||||
@@ -811,7 +811,7 @@ void EnBb_Red(EnBb* this, PlayState* play) {
|
||||
this->bobPhase += Rand_ZeroOne();
|
||||
Math_SmoothStepToF(&this->flameScaleY, 80.0f, 1.0f, 10.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->flameScaleX, 100.0f, 1.0f, 10.0f, 0.0f);
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
yawDiff = this->actor.world.rot.y - this->actor.wallYaw;
|
||||
if (ABS(yawDiff) > 0x4000) {
|
||||
this->actor.world.rot.y =
|
||||
@@ -819,7 +819,7 @@ void EnBb_Red(EnBb* this, PlayState* play) {
|
||||
}
|
||||
this->actor.bgCheckFlags &= ~8;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
floorType = SurfaceType_GetFloorType(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
if ((floorType == 2) || (floorType == 3) || (floorType == 9)) {
|
||||
this->moveMode = BBMOVE_HIDDEN;
|
||||
@@ -1107,13 +1107,13 @@ void EnBb_SetupStunned(EnBb* this) {
|
||||
void EnBb_Stunned(EnBb* this, PlayState* play) {
|
||||
s16 yawDiff = this->actor.world.rot.y - this->actor.wallYaw;
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
if (ABS(yawDiff) > 0x4000) {
|
||||
this->actor.world.rot.y = this->actor.wallYaw + this->actor.wallYaw - this->actor.world.rot.y - 0x8000;
|
||||
}
|
||||
this->actor.bgCheckFlags &= ~8;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
if (this->actor.velocity.y < -14.0f) {
|
||||
this->actor.velocity.y *= -0.4f;
|
||||
|
||||
@@ -647,7 +647,7 @@ void func_809BE26C(EnBigokuta* this, PlayState* play) {
|
||||
}
|
||||
if (this->unk_198 == 0 && Math_StepToF(&this->actor.scale.y, 0.0f, 0.001f)) {
|
||||
Flags_SetClear(play, this->actor.room);
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
func_8005ACFC(play->cameraPtrs[CAM_ID_MAIN], 4);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 50, NA_SE_EN_OCTAROCK_BUBLE);
|
||||
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xB0);
|
||||
@@ -785,7 +785,7 @@ void EnBigokuta_Update(Actor* thisx, PlayState* play2) {
|
||||
this->actionFunc(this, play);
|
||||
func_809BD2E4(this);
|
||||
func_809BE568(this);
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BIG_OCTO);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BIG_OCTO);
|
||||
func_8005AD1C(play->cameraPtrs[CAM_ID_MAIN], 4);
|
||||
|
||||
if (this->cylinder[0].base.atFlags & AT_ON) {
|
||||
|
||||
@@ -323,7 +323,7 @@ void EnBili_UpdateFloating(EnBili* this) {
|
||||
this->actor.world.pos.y = this->actor.home.pos.y + (sinf(this->timer * (M_PI / 16)) * 3.0f);
|
||||
|
||||
// Turn around if touching wall
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actor.world.rot.y = this->actor.wallYaw;
|
||||
}
|
||||
}
|
||||
@@ -525,7 +525,7 @@ void EnBili_Stunned(EnBili* this, PlayState* play) {
|
||||
this->timer--;
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
}
|
||||
|
||||
@@ -543,7 +543,7 @@ void EnBili_Frozen(EnBili* this, PlayState* play) {
|
||||
this->actor.gravity = -1.0f;
|
||||
}
|
||||
|
||||
if ((this->actor.bgCheckFlags & 1) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
|
||||
this->actor.colorFilterTimer = 0;
|
||||
EnBili_SetupDie(this);
|
||||
} else {
|
||||
|
||||
@@ -156,7 +156,7 @@ void EnBom_Move(EnBom* this, PlayState* play) {
|
||||
}
|
||||
|
||||
// rebound bomb off the wall it hits
|
||||
if ((this->actor.speedXZ != 0.0f) && (this->actor.bgCheckFlags & 8)) {
|
||||
if ((this->actor.speedXZ != 0.0f) && (this->actor.bgCheckFlags & BGCHECKFLAG_WALL)) {
|
||||
if (ABS((s16)(this->actor.wallYaw - this->actor.world.rot.y)) > 0x4000) {
|
||||
this->actor.world.rot.y = ((this->actor.wallYaw - this->actor.world.rot.y) + this->actor.wallYaw) - 0x8000;
|
||||
}
|
||||
@@ -166,11 +166,11 @@ void EnBom_Move(EnBom* this, PlayState* play) {
|
||||
this->actor.bgCheckFlags &= ~8;
|
||||
}
|
||||
|
||||
if (!(this->actor.bgCheckFlags & 1)) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
Math_StepToF(&this->actor.speedXZ, 0.0f, 0.08f);
|
||||
} else {
|
||||
Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f);
|
||||
if ((this->actor.bgCheckFlags & 2) && (this->actor.velocity.y < -3.0f)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) && (this->actor.velocity.y < -3.0f)) {
|
||||
Actor_PlaySfx_SurfaceBomb(play, &this->actor);
|
||||
this->actor.velocity.y *= -0.3f;
|
||||
this->actor.bgCheckFlags &= ~2;
|
||||
|
||||
@@ -234,11 +234,11 @@ void EnBombf_Move(EnBombf* this, PlayState* play) {
|
||||
|
||||
this->flowerBombScale = 1.0f;
|
||||
|
||||
if (!(this->actor.bgCheckFlags & 1)) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.025f, 0.0f);
|
||||
} else {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 1.5f, 0.0f);
|
||||
if ((this->actor.bgCheckFlags & 2) && (this->actor.velocity.y < -6.0f)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) && (this->actor.velocity.y < -6.0f)) {
|
||||
Actor_PlaySfx_SurfaceBomb(play, &this->actor);
|
||||
this->actor.velocity.y *= -0.5f;
|
||||
} else if (this->timer >= 4) {
|
||||
|
||||
@@ -284,7 +284,7 @@ void func_809CEA24(EnBw* this, PlayState* play) {
|
||||
}
|
||||
this->unk_222 = (Rand_ZeroOne() * 200.0f) + 200.0f;
|
||||
}
|
||||
} else if ((this->actor.speedXZ != 0.0f) && (this->actor.bgCheckFlags & 8)) {
|
||||
} else if ((this->actor.speedXZ != 0.0f) && (this->actor.bgCheckFlags & BGCHECKFLAG_WALL)) {
|
||||
if (this->unk_236 != this->actor.wallYaw) {
|
||||
sp64 = 1;
|
||||
this->unk_236 = this->actor.wallYaw;
|
||||
@@ -367,7 +367,8 @@ void func_809CEA24(EnBw* this, PlayState* play) {
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (((sp64 == 0) && !(this->actor.bgCheckFlags & 8)) || Actor_IsFacingPlayer(&this->actor, 0x1C70)) {
|
||||
if (((sp64 == 0) && !(this->actor.bgCheckFlags & BGCHECKFLAG_WALL)) ||
|
||||
Actor_IsFacingPlayer(&this->actor, 0x1C70)) {
|
||||
if (Actor_IsFacingPlayer(&this->actor, 0x1C70)) {
|
||||
this->unk_238 = -this->unk_238;
|
||||
}
|
||||
@@ -495,7 +496,7 @@ void func_809CFC4C(EnBw* this, PlayState* play) {
|
||||
this->unk_221 = 4;
|
||||
this->unk_258 += this->unk_25C;
|
||||
Math_SmoothStepToF(&this->unk_260, 0.075f, 1.0f, 0.005f, 0.0f);
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 30.0f, 11, 4.0f, 0, 0, false);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
}
|
||||
@@ -681,7 +682,7 @@ void func_809D0424(EnBw* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_809D0584(EnBw* this, PlayState* play) {
|
||||
if ((this->actor.bgCheckFlags & 0x10) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((this->actor.bgCheckFlags & 0x10) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->unk_230 = 0;
|
||||
this->actor.scale.y -= 0.009f;
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 30.0f, 11, 4.0f, 0, 0, false);
|
||||
@@ -729,7 +730,8 @@ void func_809D0584(EnBw* this, PlayState* play) {
|
||||
this->unk_248 = 0.0f;
|
||||
}
|
||||
}
|
||||
if ((play->actorCtx.unk_02 != 0) && (this->actor.xzDistToPlayer <= 400.0f) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((play->actorCtx.unk_02 != 0) && (this->actor.xzDistToPlayer <= 400.0f) &&
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
if (this->unk_220 == 5) {
|
||||
this->unk_23C = 0;
|
||||
func_809CFF10(this);
|
||||
|
||||
@@ -241,7 +241,7 @@ void EnCrow_FlyIdle(EnCrow* this, PlayState* play) {
|
||||
skelanimeUpdated = Animation_OnFrame(&this->skelAnime, 0.0f);
|
||||
this->actor.speedXZ = (Rand_ZeroOne() * 1.5f) + 3.0f;
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->aimRotY = this->actor.wallYaw;
|
||||
} else if (Actor_WorldDistXZToPoint(&this->actor, &this->actor.home.pos) > 300.0f) {
|
||||
this->aimRotY = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
|
||||
@@ -276,7 +276,7 @@ void EnCrow_FlyIdle(EnCrow* this, PlayState* play) {
|
||||
this->aimRotX = CLAMP(this->aimRotX, -0x1000, 0x1000);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, -0x100, 0x400);
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ void EnCrow_Damaged(EnCrow* this, PlayState* play) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, 0x4000, 0x200);
|
||||
this->actor.shape.rot.z += 0x1780;
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 1) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
|
||||
EffectSsDeadDb_Spawn(play, &this->actor.world.pos, &sZeroVecAccel, &sZeroVecAccel,
|
||||
this->actor.scale.x * 10000.0f, 0, 255, 255, 255, 255, 255, 0, 0, 1, 9, 1);
|
||||
EnCrow_SetupDie(this);
|
||||
@@ -378,7 +378,7 @@ void EnCrow_Die(EnCrow* this, PlayState* play) {
|
||||
void EnCrow_TurnAway(EnCrow* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->aimRotY = this->actor.wallYaw;
|
||||
} else {
|
||||
this->aimRotY = this->actor.yawTowardsPlayer + 0x8000;
|
||||
|
||||
@@ -961,7 +961,8 @@ void EnDekubaba_PrunedSomersault(EnDekubaba* this, PlayState* play) {
|
||||
EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, this->size * 3.0f, 0, this->size * 12.0f,
|
||||
this->size * 5.0f, 1, HAHEN_OBJECT_DEFAULT, 10, NULL);
|
||||
|
||||
if ((this->actor.scale.x > 0.005f) && ((this->actor.bgCheckFlags & 2) || (this->actor.bgCheckFlags & 8))) {
|
||||
if ((this->actor.scale.x > 0.005f) &&
|
||||
((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) || (this->actor.bgCheckFlags & BGCHECKFLAG_WALL))) {
|
||||
this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 0.0f;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE);
|
||||
@@ -969,7 +970,7 @@ void EnDekubaba_PrunedSomersault(EnDekubaba* this, PlayState* play) {
|
||||
this->size * 5.0f, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
this->timer = 1;
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ void EnDekunuts_Run(EnDekunuts* this, PlayState* play) {
|
||||
if (Math_SmoothStepToS(&this->actor.world.rot.y, this->runDirection, 1, 0xE38, 0xB6) == 0) {
|
||||
if (this->actor.bgCheckFlags & 0x20) {
|
||||
this->runDirection = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->runDirection = this->actor.wallYaw;
|
||||
} else if (this->runAwayCount == 0) {
|
||||
diffRotInit = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
|
||||
|
||||
@@ -406,7 +406,7 @@ void EnDh_Burrow(EnDh* this, PlayState* play) {
|
||||
|
||||
void EnDh_SetupDamage(EnDh* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_dh_Anim_003D6C, -6.0f);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = -1.0f;
|
||||
}
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEADHAND_DAMAGE);
|
||||
|
||||
@@ -102,7 +102,7 @@ void EnDntJiji_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnDntJiji_SetFlower(EnDntJiji* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->flowerPos = this->actor.world.pos;
|
||||
this->actionFunc = EnDntJiji_SetupWait;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ void EnDntJiji_Walk(EnDntJiji* this, PlayState* play) {
|
||||
this->sfxTimer = 5;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_WALK);
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 8) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->actor.velocity.y = 9.0f;
|
||||
this->actor.speedXZ = 3.0f;
|
||||
}
|
||||
@@ -351,7 +351,7 @@ void EnDntJiji_Return(EnDntJiji* this, PlayState* play) {
|
||||
dz = this->flowerPos.z - this->actor.world.pos.z;
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, Math_FAtan2F(dx, dz) * (0x8000 / M_PI), 1, 0xBB8, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
if ((this->actor.bgCheckFlags & 8) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->actor.velocity.y = 9.0f;
|
||||
this->actor.speedXZ = 3.0f;
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ void EnDntNomal_WaitForObject(EnDntNomal* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnDntNomal_SetFlower(EnDntNomal* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->flowerPos = this->actor.world.pos;
|
||||
if (this->type == ENDNTNOMAL_TARGET) {
|
||||
this->actionFunc = EnDntNomal_SetupTargetWait;
|
||||
@@ -551,7 +551,7 @@ void EnDntNomal_StageCelebrate(EnDntNomal* this, PlayState* play) {
|
||||
} else if ((this->timer5 & 3) == 0) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_WALK);
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 8) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->actor.velocity.y = 7.5f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ s32 EnDodojr_UpdateBounces(EnDodojr* this, PlayState* play) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
this->dustPos = this->actor.world.pos;
|
||||
EnDodojr_SpawnLargeDust(this, play, 10);
|
||||
@@ -456,7 +456,7 @@ void EnDodojr_CrawlTowardsTarget(EnDodojr* this, PlayState* play) {
|
||||
this->actionFunc = EnDodojr_JumpAttackBounce;
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_DOWN);
|
||||
EnDodojr_SetupDespawn(this);
|
||||
this->actionFunc = EnDodojr_Despawn;
|
||||
|
||||
@@ -775,7 +775,7 @@ void EnDodongo_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 60.0f, 70.0f, 0x1D);
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DOWN);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ void EnEiyer_Glide(EnEiyer* this, PlayState* play) {
|
||||
Math_StepToF(&this->actor.speedXZ, 1.5f, 0.03f);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->targetYaw = this->actor.wallYaw;
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ void EnEiyer_DiveAttack(EnEiyer* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
this->actor.speedXZ *= 1.1f;
|
||||
|
||||
if (this->actor.bgCheckFlags & 8 || this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & 8 || this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
EnEiyer_SetupLand(this);
|
||||
}
|
||||
|
||||
@@ -498,11 +498,11 @@ void EnEiyer_Land(EnEiyer* this, PlayState* play) {
|
||||
Math_StepToF(&this->actor.speedXZ, 7.0f, 1.0f);
|
||||
|
||||
if (this->timer == -1) {
|
||||
if (this->actor.bgCheckFlags & 8 || this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & 8 || this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->timer = 10;
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 30, NA_SE_EN_OCTAROCK_SINK);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
EffectSsGSplash_Spawn(play, &this->actor.world.pos, NULL, NULL, 1, 700);
|
||||
}
|
||||
}
|
||||
@@ -529,7 +529,7 @@ void EnEiyer_Hurt(EnEiyer* this, PlayState* play) {
|
||||
Math_ApproachF(&this->basePos.y, this->actor.floorHeight + 80.0f + 5.0f, 0.5f, this->actor.speedXZ);
|
||||
this->actor.world.pos.y = this->basePos.y - 5.0f;
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->targetYaw = this->actor.wallYaw;
|
||||
} else {
|
||||
this->targetYaw = this->actor.yawTowardsPlayer + 0x8000;
|
||||
@@ -592,7 +592,7 @@ void EnEiyer_Stunned(EnEiyer* this, PlayState* play) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_EIER_FLUTTER);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
}
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@ void EnFd_SpinAndGrow(EnFd* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnFd_JumpToGround(EnFd* this, PlayState* play) {
|
||||
if ((this->actor.bgCheckFlags & 1) && !(this->actor.velocity.y > 0.0f)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && !(this->actor.velocity.y > 0.0f)) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
|
||||
@@ -303,7 +303,7 @@ void EnFhgFire_LightningShock(EnFhgFire* this, PlayState* play) {
|
||||
}
|
||||
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 50.0f, 50.0f, 100.0f, 1);
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ void EnFireRock_Fall(EnFireRock* this, PlayState* play) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 1) && (this->timer == 0)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (this->timer == 0)) {
|
||||
switch (this->type) {
|
||||
case FIRE_ROCK_SPAWNED_FALLING1:
|
||||
case FIRE_ROCK_SPAWNED_FALLING2:
|
||||
|
||||
@@ -404,7 +404,7 @@ void EnFirefly_FlyIdle(EnFirefly* this, PlayState* play) {
|
||||
this->targetPitch = 0x2154;
|
||||
}
|
||||
} else {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->targetPitch = 0x954;
|
||||
} else if ((this->actor.bgCheckFlags & 0x10) || (this->maxAltitude < this->actor.world.pos.y)) {
|
||||
this->targetPitch = 0x2154;
|
||||
@@ -412,7 +412,7 @@ void EnFirefly_FlyIdle(EnFirefly* this, PlayState* play) {
|
||||
}
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, this->targetPitch, 0x100);
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallYaw, 2, 0xC00, 0x300);
|
||||
}
|
||||
if ((this->timer == 0) && (this->actor.xzDistToPlayer < 200.0f) && (Player_GetMask(play) != PLAYER_MASK_SKULL) &&
|
||||
@@ -437,7 +437,7 @@ void EnFirefly_Fall(EnFirefly* this, PlayState* play) {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 1) || (this->timer == 0)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->timer == 0)) {
|
||||
EnFirefly_SetupDie(this);
|
||||
}
|
||||
}
|
||||
@@ -465,7 +465,7 @@ void EnFirefly_DiveAttack(EnFirefly* this, PlayState* play) {
|
||||
this->timer--;
|
||||
}
|
||||
Math_StepToF(&this->actor.speedXZ, 4.0f, 0.5f);
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallYaw, 2, 0xC00, 0x300);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, this->targetPitch, 0x100);
|
||||
} else if (Actor_IsFacingPlayer(&this->actor, 0x2800)) {
|
||||
@@ -484,7 +484,7 @@ void EnFirefly_DiveAttack(EnFirefly* this, PlayState* play) {
|
||||
if (this->actor.xzDistToPlayer > 80.0f) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 2, 0xC00, 0x300);
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->targetPitch = 0x954;
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 0x10) || (this->maxAltitude < this->actor.world.pos.y)) {
|
||||
@@ -527,14 +527,14 @@ void EnFirefly_FlyAway(EnFirefly* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
Math_StepToF(&this->actor.speedXZ, 3.0f, 0.3f);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->targetPitch = 0x954;
|
||||
} else if ((this->actor.bgCheckFlags & 0x10) || (this->maxAltitude < this->actor.world.pos.y)) {
|
||||
this->targetPitch = 0x2154;
|
||||
} else {
|
||||
this->targetPitch = 0x954;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallYaw, 2, 0xC00, 0x300);
|
||||
} else {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos),
|
||||
@@ -561,7 +561,7 @@ void EnFirefly_Stunned(EnFirefly* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnFirefly_FrozenFall(EnFirefly* this, PlayState* play) {
|
||||
if ((this->actor.bgCheckFlags & 1) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
|
||||
this->actor.colorFilterTimer = 0;
|
||||
EnFirefly_SetupDie(this);
|
||||
} else {
|
||||
|
||||
@@ -381,7 +381,7 @@ void EnFish_Dropped_Fall(EnFish* this, PlayState* play) {
|
||||
this->actor.shape.rot.z = this->actor.world.rot.z;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) { // On floor
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { // On floor
|
||||
this->timer = 400;
|
||||
EnFish_Dropped_SetupFlopOnGround(this);
|
||||
} else if (this->actor.bgCheckFlags & 0x20) { // In water
|
||||
@@ -470,7 +470,7 @@ void EnFish_Dropped_FlopOnGround(EnFish* this, PlayState* play) {
|
||||
}
|
||||
} else if (this->actor.bgCheckFlags & 0x20) { // In water
|
||||
EnFish_Dropped_SetupSwimAway(this);
|
||||
} else if (this->actor.bgCheckFlags & 1) { // On floor
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { // On floor
|
||||
EnFish_Dropped_SetupFlopOnGround(this);
|
||||
}
|
||||
}
|
||||
@@ -493,7 +493,7 @@ void EnFish_Dropped_SwimAway(EnFish* this, PlayState* play) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 2.8f, 0.1f, 0.4f, 0.0f);
|
||||
|
||||
// If touching wall or not in water, turn back and slow down for one frame.
|
||||
if ((this->actor.bgCheckFlags & 8) || !(this->actor.bgCheckFlags & 0x20)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || !(this->actor.bgCheckFlags & 0x20)) {
|
||||
this->actor.home.rot.y = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos);
|
||||
this->actor.speedXZ *= 0.5f;
|
||||
}
|
||||
@@ -505,7 +505,7 @@ void EnFish_Dropped_SwimAway(EnFish* this, PlayState* play) {
|
||||
this->actor.shape.rot = this->actor.world.rot;
|
||||
|
||||
// Raise if on a floor.
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_StepToF(&this->actor.world.pos.y, this->actor.home.pos.y - 4.0f, 2.0f);
|
||||
} else {
|
||||
Math_StepToF(&this->actor.world.pos.y, this->actor.home.pos.y - 10.0f, 2.0f);
|
||||
|
||||
@@ -492,7 +492,7 @@ void EnFloormas_BigWalk(EnFloormas* this, PlayState* play) {
|
||||
|
||||
if ((this->actor.xzDistToPlayer < 320.0f) && (Actor_IsFacingPlayer(&this->actor, 0x4000))) {
|
||||
EnFloormas_SetupRun(this);
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
// set target rotation to the colliding wall's rotation
|
||||
this->actionTarget = this->actor.wallYaw;
|
||||
EnFloormas_SetupTurn(this);
|
||||
@@ -521,7 +521,7 @@ void EnFloormas_Run(EnFloormas* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 0x71C);
|
||||
|
||||
if ((this->actor.xzDistToPlayer < 280.0f) && Actor_IsFacingPlayer(&this->actor, 0x2000) &&
|
||||
!(this->actor.bgCheckFlags & 8)) {
|
||||
!(this->actor.bgCheckFlags & BGCHECKFLAG_WALL)) {
|
||||
EnFloormas_SetupHover(this, play);
|
||||
} else if (this->actor.xzDistToPlayer > 400.0f) {
|
||||
EnFloormas_SetupBigWalk(this);
|
||||
@@ -612,7 +612,7 @@ void EnFloormas_Charge(EnFloormas* this, PlayState* play) {
|
||||
EnFloormas_Slide(this, play);
|
||||
}
|
||||
|
||||
if ((this->actor.bgCheckFlags & 8) || (this->actionTimer == 0)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || (this->actionTimer == 0)) {
|
||||
EnFloormas_SetupLand(this);
|
||||
}
|
||||
}
|
||||
@@ -621,7 +621,7 @@ void EnFloormas_Land(EnFloormas* this, PlayState* play) {
|
||||
s32 isOnGround;
|
||||
|
||||
isOnGround = this->actor.bgCheckFlags & 1;
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
if (this->actor.params != MERGE_MASTER) {
|
||||
EnFloormas_MakeVulnerable(this);
|
||||
}
|
||||
@@ -634,7 +634,7 @@ void EnFloormas_Land(EnFloormas* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
||||
@@ -668,7 +668,7 @@ void EnFloormas_Land(EnFloormas* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnFloormas_Split(EnFloormas* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
this->smActionTimer = 50;
|
||||
@@ -677,7 +677,7 @@ void EnFloormas_Split(EnFloormas* this, PlayState* play) {
|
||||
Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLOORMASTER_SM_LAND);
|
||||
}
|
||||
}
|
||||
@@ -692,7 +692,7 @@ void EnFloormas_SmWalk(EnFloormas* this, PlayState* play) {
|
||||
|
||||
if (this->smActionTimer == 0) {
|
||||
EnFloormas_SetupSmDecideAction(this);
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actionTarget = this->actor.wallYaw;
|
||||
EnFloormas_SetupTurn(this);
|
||||
} else if (this->actor.xzDistToPlayer < 120.0f) {
|
||||
@@ -754,7 +754,7 @@ void EnFloormas_JumpAtLink(EnFloormas* this, PlayState* play) {
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 20.0f)) {
|
||||
this->actor.speedXZ = 5.0f;
|
||||
this->actor.velocity.y = 7.0f;
|
||||
} else if (this->actor.bgCheckFlags & 2) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actionTimer = 0x32;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLOORMASTER_SM_LAND);
|
||||
@@ -839,7 +839,7 @@ void EnFloormas_SmSlaveJumpAtMaster(EnFloormas* this, PlayState* play) {
|
||||
} else if (this->actor.child->params == MERGE_MASTER) {
|
||||
primFloormas = this->actor.child;
|
||||
} else {
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actor.params = 0x10;
|
||||
EnFloormas_SetupLand(this);
|
||||
}
|
||||
@@ -855,7 +855,7 @@ void EnFloormas_SmSlaveJumpAtMaster(EnFloormas* this, PlayState* play) {
|
||||
(fabsf(this->actor.world.pos.z - primFloormas->world.pos.z) < 10.0f)) {
|
||||
EnFloormas_SetupSmWait(this);
|
||||
this->collider.base.ocFlags1 |= OC1_ON;
|
||||
} else if (this->actor.bgCheckFlags & 2) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLOORMASTER_SM_LAND);
|
||||
EnFloormas_SetupLand(this);
|
||||
|
||||
@@ -877,7 +877,7 @@ void EnFr_OcarinaMistake(EnFr* this, PlayState* play) {
|
||||
Message_CloseTextbox(play);
|
||||
this->reward = GI_NONE;
|
||||
Sfx_PlaySfxCentered(NA_SE_SY_OCARINA_ERROR);
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
sEnFrPointers.flags = 12;
|
||||
EnFr_DeactivateButterfly();
|
||||
this->actionFunc = EnFr_Deactivate;
|
||||
@@ -947,7 +947,7 @@ void EnFr_SetupReward(EnFr* this, PlayState* play, u8 unkCondition) {
|
||||
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
|
||||
}
|
||||
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
play->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->actionFunc = EnFr_PrintTextBox;
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ void EnFu_TeachSong(EnFu* this, PlayState* play) {
|
||||
// if dialog state is 2, start song demonstration
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
this->behaviorFlags &= ~FU_WAIT;
|
||||
Audio_OcaSetInstrument(4); // seems to be related to setting instrument type
|
||||
AudioOcarina_SetInstrument(4); // seems to be related to setting instrument type
|
||||
func_8010BD58(play, OCARINA_ACTION_TEACH_STORMS);
|
||||
this->actionFunc = EnFu_WaitForPlayback;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ static AnimationInfo sAnimationInfo[] = {
|
||||
s32 EnFw_DoBounce(EnFw* this, s32 totalBounces, f32 yVelocity) {
|
||||
s16 temp_v1;
|
||||
|
||||
if (!(this->actor.bgCheckFlags & 1) || (this->actor.velocity.y > 0.0f)) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.velocity.y > 0.0f)) {
|
||||
// not on the ground or moving upwards.
|
||||
return false;
|
||||
}
|
||||
@@ -273,7 +273,7 @@ void EnFw_Run(EnFw* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!(this->actor.bgCheckFlags & 1) || this->actor.velocity.y > 0.0f) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || this->actor.velocity.y > 0.0f) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0, this->damageTimer);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ void EnFz_SpawnIceSmokeActiveState(EnFz* this) {
|
||||
void EnFz_ApplyDamage(EnFz* this, PlayState* play) {
|
||||
Vec3f vec;
|
||||
|
||||
if (this->isMoving && ((this->actor.bgCheckFlags & 8) ||
|
||||
if (this->isMoving && ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) ||
|
||||
(Actor_TestFloorInDirection(&this->actor, play, 60.0f, this->actor.world.rot.y) == 0))) {
|
||||
this->actor.bgCheckFlags &= ~8;
|
||||
this->isMoving = false;
|
||||
|
||||
@@ -372,7 +372,7 @@ void EnGeldB_Wait(EnGeldB* this, PlayState* play) {
|
||||
func_800F5ACC(NA_BGM_MINI_BOSS);
|
||||
}
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DOWN);
|
||||
this->skelAnime.playSpeed = 1.0f;
|
||||
this->actor.world.pos.y = this->actor.floorHeight;
|
||||
@@ -676,9 +676,9 @@ void EnGeldB_Circle(EnGeldB* this, PlayState* play) {
|
||||
this->actor.speedXZ = 8.0f;
|
||||
}
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 8) ||
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) ||
|
||||
!Actor_TestFloorInDirection(&this->actor, play, this->actor.speedXZ, this->actor.shape.rot.y + 0x3E80)) {
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
if (this->actor.speedXZ >= 0.0f) {
|
||||
phi_v1 = this->actor.shape.rot.y + 0x3E80;
|
||||
} else {
|
||||
@@ -775,9 +775,9 @@ void EnGeldB_SpinDodge(EnGeldB* this, PlayState* play) {
|
||||
s32 nextKeyFrame;
|
||||
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x3A98;
|
||||
if ((this->actor.bgCheckFlags & 8) ||
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) ||
|
||||
!Actor_TestFloorInDirection(&this->actor, play, this->actor.speedXZ, this->actor.shape.rot.y + 0x3E80)) {
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
if (this->actor.speedXZ >= 0.0f) {
|
||||
phi_v1 = this->actor.shape.rot.y + 0x3E80;
|
||||
} else {
|
||||
@@ -1007,7 +1007,7 @@ void EnGeldB_RollBack(EnGeldB* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnGeldB_SetupStunned(EnGeldB* this) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if ((this->damageEffect != GELDB_DMG_FREEZE) || (this->action == GELDB_SPIN_ATTACK)) {
|
||||
@@ -1022,16 +1022,16 @@ void EnGeldB_SetupStunned(EnGeldB* this) {
|
||||
}
|
||||
|
||||
void EnGeldB_Stunned(EnGeldB* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (this->actor.speedXZ < 0.0f) {
|
||||
this->actor.speedXZ += 0.05f;
|
||||
}
|
||||
this->invisible = false;
|
||||
}
|
||||
if ((this->actor.colorFilterTimer == 0) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((this->actor.colorFilterTimer == 0) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
if (this->actor.colChkInfo.health == 0) {
|
||||
EnGeldB_SetupDefeated(this);
|
||||
} else {
|
||||
@@ -1042,7 +1042,7 @@ void EnGeldB_Stunned(EnGeldB* this, PlayState* play) {
|
||||
|
||||
void EnGeldB_SetupDamaged(EnGeldB* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gGerudoRedDamageAnim, -4.0f);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->invisible = false;
|
||||
this->actor.speedXZ = -4.0f;
|
||||
} else {
|
||||
@@ -1058,10 +1058,10 @@ void EnGeldB_SetupDamaged(EnGeldB* this) {
|
||||
void EnGeldB_Damaged(EnGeldB* this, PlayState* play) {
|
||||
s16 angleToWall;
|
||||
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (this->actor.speedXZ < 0.0f) {
|
||||
this->actor.speedXZ += 0.05f;
|
||||
}
|
||||
@@ -1069,9 +1069,10 @@ void EnGeldB_Damaged(EnGeldB* this, PlayState* play) {
|
||||
}
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0x1194, 0);
|
||||
if (!EnGeldB_DodgeRanged(play, this) && !EnGeldB_ReactToPlayer(play, this, 0) &&
|
||||
SkelAnime_Update(&this->skelAnime) && (this->actor.bgCheckFlags & 1)) {
|
||||
SkelAnime_Update(&this->skelAnime) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
angleToWall = this->actor.wallYaw - this->actor.shape.rot.y;
|
||||
if ((this->actor.bgCheckFlags & 8) && (ABS(angleToWall) < 0x2EE0) && (this->actor.xzDistToPlayer < 90.0f)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) && (ABS(angleToWall) < 0x2EE0) &&
|
||||
(this->actor.xzDistToPlayer < 90.0f)) {
|
||||
EnGeldB_SetupJump(this);
|
||||
} else if (!EnGeldB_DodgeRanged(play, this)) {
|
||||
if ((this->actor.xzDistToPlayer <= 45.0f) && !Actor_OtherIsTargeted(play, &this->actor) &&
|
||||
@@ -1224,9 +1225,9 @@ void EnGeldB_Sidestep(EnGeldB* this, PlayState* play) {
|
||||
this->actor.speedXZ -= 0.125f;
|
||||
}
|
||||
|
||||
if ((this->actor.bgCheckFlags & 8) ||
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) ||
|
||||
!Actor_TestFloorInDirection(&this->actor, play, this->actor.speedXZ, this->actor.shape.rot.y + 0x3E80)) {
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
if (this->actor.speedXZ >= 0.0f) {
|
||||
phi_v1 = this->actor.shape.rot.y + 0x3E80;
|
||||
} else {
|
||||
@@ -1317,7 +1318,7 @@ void EnGeldB_Sidestep(EnGeldB* this, PlayState* play) {
|
||||
void EnGeldB_SetupDefeated(EnGeldB* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gGerudoRedDefeatAnim, -4.0f);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->invisible = false;
|
||||
this->actor.speedXZ = -6.0f;
|
||||
} else {
|
||||
@@ -1331,10 +1332,10 @@ void EnGeldB_SetupDefeated(EnGeldB* this) {
|
||||
}
|
||||
|
||||
void EnGeldB_Defeated(EnGeldB* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.5f, 0.0f);
|
||||
this->invisible = false;
|
||||
}
|
||||
|
||||
@@ -433,13 +433,13 @@ s32 EnGo_IsCameraModified(EnGo* this, PlayState* play) {
|
||||
|
||||
xyzDistSq = (this->actor.scale.x / 0.01f) * SQ(100.0f);
|
||||
if ((this->actor.params & 0xF0) == 0x90) {
|
||||
Camera_ChangeSetting(mainCam, CAM_SET_DIRECTED_YAW);
|
||||
Camera_RequestSetting(mainCam, CAM_SET_DIRECTED_YAW);
|
||||
xyzDistSq *= 4.8f;
|
||||
}
|
||||
|
||||
if (fabsf(this->actor.xyzDistToPlayerSq) > xyzDistSq) {
|
||||
if (mainCam->setting == CAM_SET_DIRECTED_YAW) {
|
||||
Camera_ChangeSetting(mainCam, CAM_SET_NORMAL0);
|
||||
Camera_RequestSetting(mainCam, CAM_SET_NORMAL0);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
@@ -546,7 +546,7 @@ s32 EnGo_SpawnDust(EnGo* this, u8 initialTimer, f32 scale, f32 scaleStep, s32 nu
|
||||
}
|
||||
|
||||
s32 EnGo_IsRollingOnGround(EnGo* this, s16 unkArg1, f32 unkArg2) {
|
||||
if ((this->actor.bgCheckFlags & 1) == 0 || this->actor.velocity.y > 0.0f) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) == 0 || this->actor.velocity.y > 0.0f) {
|
||||
return false;
|
||||
} else if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
return true;
|
||||
|
||||
@@ -991,7 +991,7 @@ s32 EnGo2_IsWakingUp(EnGo2* this) {
|
||||
}
|
||||
|
||||
s32 EnGo2_IsRollingOnGround(EnGo2* this, s16 arg1, f32 arg2, s16 arg3) {
|
||||
if ((this->actor.bgCheckFlags & 1) == 0 || this->actor.velocity.y > 0.0f) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) == 0 || this->actor.velocity.y > 0.0f) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1167,10 +1167,10 @@ s32 EnGo2_IsCameraModified(EnGo2* this, PlayState* play) {
|
||||
|
||||
if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) {
|
||||
if (EnGo2_IsWakingUp(this)) {
|
||||
Camera_ChangeSetting(camera, CAM_SET_DIRECTED_YAW);
|
||||
Camera_RequestSetting(camera, CAM_SET_DIRECTED_YAW);
|
||||
func_8005AD1C(camera, 4);
|
||||
} else if (!EnGo2_IsWakingUp(this) && (camera->setting == CAM_SET_DIRECTED_YAW)) {
|
||||
Camera_ChangeSetting(camera, CAM_SET_DUNGEON1);
|
||||
Camera_RequestSetting(camera, CAM_SET_DUNGEON1);
|
||||
func_8005ACFC(camera, 4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ void EnGoma_EggFallToGround(EnGoma* this, PlayState* play) {
|
||||
|
||||
switch (this->hatchState) {
|
||||
case 0:
|
||||
if (this->actor.bgCheckFlags & 1) { // floor
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { // floor
|
||||
if (this->actor.params < 6) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_BJR_EGG1);
|
||||
} else {
|
||||
@@ -266,7 +266,7 @@ void EnGoma_EggFallToGround(EnGoma* this, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_ApproachZeroF(&this->actor.speedXZ, 0.2f, 0.05f);
|
||||
}
|
||||
this->eggPitch += (this->actor.speedXZ * 0.1f);
|
||||
@@ -348,7 +348,7 @@ void EnGoma_SetupHurt(EnGoma* this, PlayState* play) {
|
||||
void EnGoma_Hurt(EnGoma* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_ApproachZeroF(&this->actor.speedXZ, 1.0f, 2.0f);
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ void EnGoma_SetupDie(EnGoma* this) {
|
||||
void EnGoma_Die(EnGoma* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_ApproachZeroF(&this->actor.speedXZ, 1.0f, 2.0f);
|
||||
}
|
||||
|
||||
@@ -485,7 +485,7 @@ void EnGoma_SetupLand(EnGoma* this) {
|
||||
void EnGoma_Land(EnGoma* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_ApproachZeroF(&this->actor.speedXZ, 1.0f, 2.0f);
|
||||
}
|
||||
if (this->actionTimer == 0) {
|
||||
@@ -511,7 +511,7 @@ void EnGoma_Jump(EnGoma* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
Math_ApproachF(&this->actor.speedXZ, 10.0f, 0.5f, 5.0f);
|
||||
|
||||
if (this->actor.velocity.y <= 0.0f && (this->actor.bgCheckFlags & 1)) {
|
||||
if (this->actor.velocity.y <= 0.0f && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
EnGoma_SetupLand(this);
|
||||
if (this->actor.params < 6) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_BJR_LAND2);
|
||||
@@ -548,7 +548,7 @@ void EnGoma_ChasePlayer(EnGoma* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 3, 2000);
|
||||
Math_ApproachS(&this->actor.shape.rot.y, this->actor.world.rot.y, 2, 3000);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
}
|
||||
if (this->actor.xzDistToPlayer <= 150.0f) {
|
||||
@@ -577,7 +577,7 @@ void EnGoma_Stunned(EnGoma* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
Math_ApproachZeroF(&this->actor.speedXZ, 0.5f, 2.0f);
|
||||
}
|
||||
@@ -885,7 +885,7 @@ void EnGoma_BossLimb(EnGoma* this, PlayState* play) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 50.0f, 50.0f, 100.0f, 4);
|
||||
this->actor.world.pos.y += 5.0f;
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
} else if (this->actionTimer < 250) {
|
||||
this->actor.shape.rot.y += 2000;
|
||||
|
||||
@@ -642,7 +642,7 @@ void EnGoroiwa_SetupMoveAndFallToGround(EnGoroiwa* this) {
|
||||
|
||||
void EnGoroiwa_MoveAndFallToGround(EnGoroiwa* this, PlayState* play) {
|
||||
EnGoroiwa_MoveAndFall(this, play);
|
||||
if ((this->actor.bgCheckFlags & 1) && this->actor.velocity.y < 0.0f) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && this->actor.velocity.y < 0.0f) {
|
||||
if ((this->stateFlags & ENGOROIWA_PLAYER_IN_THE_WAY) && (this->actor.home.rot.z & 1) == 1) {
|
||||
EnGoroiwa_ReverseDirection(this);
|
||||
EnGoroiwa_FaceNextWaypoint(this, play);
|
||||
|
||||
@@ -359,7 +359,7 @@ void EnHintnuts_Run(EnHintnuts* this, PlayState* play) {
|
||||
if (Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_196, 1, 0xE38, 0xB6) == 0) {
|
||||
if (this->actor.bgCheckFlags & 0x20) {
|
||||
this->unk_196 = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->unk_196 = this->actor.wallYaw;
|
||||
} else if (this->animFlagAndTimer == 0) {
|
||||
diffRotInit = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
|
||||
@@ -411,7 +411,7 @@ void EnHintnuts_Leave(EnHintnuts* this, PlayState* play) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 6.0f)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_WALK);
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
temp_a1 = this->actor.wallYaw;
|
||||
} else {
|
||||
temp_a1 = this->actor.yawTowardsPlayer - Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) - 0x8000;
|
||||
|
||||
@@ -431,7 +431,7 @@ void EnHonotrap_FlameChase(EnHonotrap* this, PlayState* play) {
|
||||
this->actor.speedXZ *= 0.1f;
|
||||
this->actor.velocity.y *= 0.1f;
|
||||
EnHonotrap_SetupFlameVanish(this);
|
||||
} else if ((this->actor.bgCheckFlags & 8) || (this->timer <= 0)) {
|
||||
} else if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || (this->timer <= 0)) {
|
||||
EnHonotrap_SetupFlameVanish(this);
|
||||
} else {
|
||||
EnHonotrap_FlameCollisionCheck(this, play);
|
||||
|
||||
@@ -1755,7 +1755,7 @@ void EnHorse_Inactive(EnHorse* this, PlayState* play2) {
|
||||
|
||||
// Focus the camera on Epona
|
||||
Camera_SetParam(play->cameraPtrs[0], 8, this);
|
||||
Camera_ChangeSetting(play->cameraPtrs[0], 0x38);
|
||||
Camera_RequestSetting(play->cameraPtrs[0], 0x38);
|
||||
Camera_SetCameraData(play->cameraPtrs[0], 4, NULL, NULL, 0x51, 0, 0);
|
||||
}
|
||||
}
|
||||
@@ -1829,7 +1829,7 @@ void EnHorse_Idle(EnHorse* this, PlayState* play) {
|
||||
this->followTimer = 0;
|
||||
EnHorse_SetFollowAnimation(this, play);
|
||||
Camera_SetParam(play->cameraPtrs[0], 8, this);
|
||||
Camera_ChangeSetting(play->cameraPtrs[0], 0x38);
|
||||
Camera_RequestSetting(play->cameraPtrs[0], 0x38);
|
||||
Camera_SetCameraData(play->cameraPtrs[0], 4, NULL, NULL, 0x51, 0, 0);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -398,7 +398,7 @@ void EnHorseNormal_Wander(EnHorseNormal* this, PlayState* play) {
|
||||
this->actor.speedXZ = 8.0f;
|
||||
phi_t0 = 6;
|
||||
}
|
||||
if (Rand_ZeroOne() < 0.1f || (this->unk_21E == 0 && ((this->actor.bgCheckFlags & 8) ||
|
||||
if (Rand_ZeroOne() < 0.1f || (this->unk_21E == 0 && ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) ||
|
||||
(this->bodyCollider.base.ocFlags1 & OC1_HIT) ||
|
||||
(this->headCollider.base.ocFlags1 & OC1_HIT)))) {
|
||||
this->unk_21E += (Rand_ZeroOne() * 30.0f) - 15.0f;
|
||||
|
||||
@@ -385,7 +385,7 @@ void func_80A74BA4(EnIk* this, PlayState* play) {
|
||||
sp2E = 9;
|
||||
}
|
||||
temp_a1 = this->actor.wallYaw - this->actor.shape.rot.y;
|
||||
if ((this->actor.bgCheckFlags & 8) && (ABS(temp_a1) >= 0x4000)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) && (ABS(temp_a1) >= 0x4000)) {
|
||||
temp_a1 = (this->actor.yawTowardsPlayer > 0) ? this->actor.wallYaw - 0x4000 : this->actor.wallYaw + 0x4000;
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, temp_a1, 1, phi_a3, 0);
|
||||
} else {
|
||||
|
||||
@@ -436,7 +436,7 @@ void func_80A79BAC(EnIn* this, PlayState* play, s32 index, u32 transitionType) {
|
||||
play->transitionType = transitionType;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
Player_SetCsActionWithHaltedActors(play, &this->actor, 8);
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
if (index == 0) {
|
||||
AREG(6) = 0;
|
||||
}
|
||||
@@ -473,8 +473,8 @@ void func_80A79C78(EnIn* this, PlayState* play) {
|
||||
}
|
||||
player->actor.freezeTimer = 10;
|
||||
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Interface_ChangeAlpha(2);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
Interface_ChangeHudVisibilityMode(2);
|
||||
}
|
||||
|
||||
static s32 D_80A7B998 = 0;
|
||||
@@ -795,8 +795,8 @@ void func_80A7AA40(EnIn* this, PlayState* play) {
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
this->unk_1FC = 0;
|
||||
play->csCtx.frames = 0;
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Interface_ChangeAlpha(2);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
Interface_ChangeHudVisibilityMode(2);
|
||||
this->actionFunc = func_80A7ABD4;
|
||||
}
|
||||
|
||||
@@ -861,7 +861,7 @@ void func_80A7AE84(EnIn* this, PlayState* play) {
|
||||
Play_ChangeCameraStatus(play, this->activeCamId, CAM_STAT_ACTIVE);
|
||||
Play_ClearCamera(play, this->camId);
|
||||
Player_SetCsActionWithHaltedActors(play, &this->actor, 7);
|
||||
Interface_ChangeAlpha(0x32);
|
||||
Interface_ChangeHudVisibilityMode(0x32);
|
||||
this->actionFunc = func_80A7AEF0;
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +265,8 @@ void EnInsect_SlowDown(EnInsect* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (((this->insectFlags & 4) && this->lifeTimer <= 0) ||
|
||||
((sp2E == 2 || sp2E == 3) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4)) {
|
||||
((sp2E == 2 || sp2E == 3) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
|
||||
D_80A7DEB8 >= 4)) {
|
||||
EnInsect_SetupDig(this);
|
||||
} else if ((this->insectFlags & 1) && (this->actor.bgCheckFlags & 0x40)) {
|
||||
EnInsect_SetupWalkOnWater(this);
|
||||
@@ -308,7 +309,8 @@ void EnInsect_Crawl(EnInsect* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (((this->insectFlags & 4) && this->lifeTimer <= 0) ||
|
||||
((sp34 == 2 || sp34 == 3) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4)) {
|
||||
((sp34 == 2 || sp34 == 3) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
|
||||
D_80A7DEB8 >= 4)) {
|
||||
EnInsect_SetupDig(this);
|
||||
} else if ((this->insectFlags & 1) && (this->actor.bgCheckFlags & 0x40)) {
|
||||
EnInsect_SetupWalkOnWater(this);
|
||||
@@ -640,7 +642,7 @@ void EnInsect_Dropped(EnInsect* this, PlayState* play) {
|
||||
|
||||
Actor_SetScale(&this->actor, CLAMP_MAX(thisTemp->actor.scale.x + 0.0008f, 0.01f));
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, this->unk_324, 0.1f, 0.5f, 0.0f);
|
||||
Math_ScaledStepToS(&this->actor.world.rot.y, this->unk_328, 2000);
|
||||
sp50 = Math_ScaledStepToS(&this->actor.world.rot.x, 0, 2000);
|
||||
@@ -668,7 +670,7 @@ void EnInsect_Dropped(EnInsect* this, PlayState* play) {
|
||||
}
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (!(this->insectFlags & 0x40) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & 1)) {
|
||||
if (!(this->insectFlags & 0x40) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MUSI_LAND);
|
||||
this->insectFlags |= 0x40;
|
||||
}
|
||||
@@ -693,7 +695,7 @@ void EnInsect_Dropped(EnInsect* this, PlayState* play) {
|
||||
if (sp40 < 9.0f) {
|
||||
EnInsect_SetupDig(this);
|
||||
} else if (this->actionTimer <= 0 || this->lifeTimer <= 0 ||
|
||||
((this->insectFlags & 1) && (this->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4 &&
|
||||
((this->insectFlags & 1) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && D_80A7DEB8 >= 4 &&
|
||||
(sp3A == 2 || sp3A == 3))) {
|
||||
EnInsect_SetupDig(this);
|
||||
} else {
|
||||
@@ -742,7 +744,7 @@ void EnInsect_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
if (this->insectFlags & 0x100) {
|
||||
if (this->insectFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
EnInsect_UpdateCrawlSfx(this);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -149,11 +149,11 @@ void EnIshi_SpawnFragmentsSmall(EnIshi* this, PlayState* play) {
|
||||
pos.y = this->actor.world.pos.y + (Rand_ZeroOne() * 5.0f) + 5.0f;
|
||||
pos.z = this->actor.world.pos.z + (Rand_ZeroOne() - 0.5f) * 8.0f;
|
||||
Math_Vec3f_Copy(&velocity, &this->actor.velocity);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
velocity.x *= 0.8f;
|
||||
velocity.y *= -0.8f;
|
||||
velocity.z *= 0.8f;
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
velocity.x *= -0.8f;
|
||||
velocity.y *= 0.8f;
|
||||
velocity.z *= -0.8f;
|
||||
@@ -221,11 +221,11 @@ void EnIshi_SpawnDustSmall(EnIshi* this, PlayState* play) {
|
||||
Vec3f pos;
|
||||
|
||||
Math_Vec3f_Copy(&pos, &this->actor.world.pos);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
pos.x += 2.0f * this->actor.velocity.x;
|
||||
pos.y -= 2.0f * this->actor.velocity.y;
|
||||
pos.z += 2.0f * this->actor.velocity.z;
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
pos.x -= 2.0f * this->actor.velocity.x;
|
||||
pos.y += 2.0f * this->actor.velocity.y;
|
||||
pos.z -= 2.0f * this->actor.velocity.z;
|
||||
@@ -237,11 +237,11 @@ void EnIshi_SpawnDustLarge(EnIshi* this, PlayState* play) {
|
||||
Vec3f pos;
|
||||
|
||||
Math_Vec3f_Copy(&pos, &this->actor.world.pos);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
pos.x += 2.0f * this->actor.velocity.x;
|
||||
pos.y -= 2.0f * this->actor.velocity.y;
|
||||
pos.z += 2.0f * this->actor.velocity.z;
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
pos.x -= 2.0f * this->actor.velocity.x;
|
||||
pos.y += 2.0f * this->actor.velocity.y;
|
||||
pos.z -= 2.0f * this->actor.velocity.z;
|
||||
|
||||
@@ -190,7 +190,7 @@ void EnJs_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (SurfaceType_GetSfx(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) == 1) {
|
||||
Math_ApproachF(&this->actor.shape.yOffset, sREG(80) + -2000.0f, 1.0f, (sREG(81) / 10.0f) + 50.0f);
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ void func_80A8F320(EnKakasi* this, PlayState* play, s16 arg) {
|
||||
|
||||
if (this->unk_19A != 0) {
|
||||
this->actor.gravity = -1.0f;
|
||||
if (this->unk_19A == 8 && (this->actor.bgCheckFlags & 1)) {
|
||||
if (this->unk_19A == 8 && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->actor.velocity.y = 3.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_IT_KAKASHI_JUMP);
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ void func_80A90EBC(EnKakasi3* this, PlayState* play, s32 arg) {
|
||||
|
||||
if (this->unk_19A != 0) {
|
||||
this->actor.gravity = -1.0f;
|
||||
if (this->unk_19A == 8 && (this->actor.bgCheckFlags & 1)) {
|
||||
if (this->unk_19A == 8 && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->actor.velocity.y = 3.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_IT_KAKASHI_JUMP);
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) {
|
||||
this->actor.yDistToWater = tempYDistToWater;
|
||||
|
||||
osSyncPrintf(VT_RST);
|
||||
onGround = (this->actor.bgCheckFlags & 1);
|
||||
onGround = (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND);
|
||||
if (this->spinXFlag) {
|
||||
this->spinRot.x += this->spinVel.x;
|
||||
this->spinVel.x -= 0x800;
|
||||
@@ -483,7 +483,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) {
|
||||
if (this->spinVel.z < -0xC00) {
|
||||
this->spinVel.z = -0xC00;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actor.speedXZ *= -0.5f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_WOODPLATE_BOUND);
|
||||
}
|
||||
@@ -595,13 +595,13 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) {
|
||||
this->spinVel.y = this->actor.speedXZ * -1000.0f;
|
||||
}
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
if (this->actor.speedXZ != 0.0f) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 10.0f, 50.0f, 5);
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actor.speedXZ *= -0.5f;
|
||||
if (this->spinVel.y > 0) {
|
||||
this->spinVel.y = -0x7D0;
|
||||
|
||||
@@ -330,14 +330,15 @@ void EnKarebaba_Dying(EnKarebaba* this, PlayState* play) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, 0x4800, 0x71C);
|
||||
EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 3.0f, 0, 12, 5, 1, HAHEN_OBJECT_DEFAULT, 10, NULL);
|
||||
|
||||
if (this->actor.scale.x > 0.005f && ((this->actor.bgCheckFlags & 2) || (this->actor.bgCheckFlags & 8))) {
|
||||
if (this->actor.scale.x > 0.005f &&
|
||||
((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) || (this->actor.bgCheckFlags & BGCHECKFLAG_WALL))) {
|
||||
this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 0.0f;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE);
|
||||
EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 3.0f, 0, 12, 5, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
this->actor.params = 1;
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@ void EnMa1_IdleTeachSong(EnMa1* this, PlayState* play) {
|
||||
void EnMa1_StartTeachSong(EnMa1* this, PlayState* play) {
|
||||
GET_PLAYER(play)->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
Audio_OcaSetInstrument(2);
|
||||
AudioOcarina_SetInstrument(2);
|
||||
func_8010BD58(play, OCARINA_ACTION_TEACH_EPONA);
|
||||
this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
|
||||
this->actionFunc = EnMa1_TeachSong;
|
||||
|
||||
@@ -745,7 +745,7 @@ void EnMb_SpearPatrolEndCharge(EnMb* this, PlayState* play) {
|
||||
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 1.5f, 0.0f);
|
||||
|
||||
if (this->actor.speedXZ > 1.0f) {
|
||||
|
||||
@@ -379,7 +379,7 @@ void func_80AB6100(EnNiw* this, PlayState* play, s32 arg2) {
|
||||
if (this->timer4 == 0) {
|
||||
this->timer4 = 3;
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.velocity.y = 3.5f;
|
||||
}
|
||||
}
|
||||
@@ -394,7 +394,7 @@ void func_80AB6100(EnNiw* this, PlayState* play, s32 arg2) {
|
||||
factor = -D_80AB860C[arg2];
|
||||
}
|
||||
if (arg2 == 1) {
|
||||
if (this->timer6 == 0 || this->actor.bgCheckFlags & 8) {
|
||||
if (this->timer6 == 0 || this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->timer6 = 150;
|
||||
if (this->timer8 == 0) {
|
||||
this->timer8 = 70;
|
||||
@@ -552,7 +552,7 @@ void func_80AB6570(EnNiw* this, PlayState* play) {
|
||||
this->unk_2B8.z = this->unk_2AC.z + posZ;
|
||||
} else {
|
||||
this->timer4 = 4;
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.velocity.y = 3.5f;
|
||||
}
|
||||
@@ -650,7 +650,7 @@ void func_80AB6BF8(EnNiw* this, PlayState* play) {
|
||||
|
||||
void func_80AB6D08(EnNiw* this, PlayState* play) {
|
||||
if (this->path == 0) {
|
||||
if (!(this->actor.bgCheckFlags & 1)) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
return;
|
||||
}
|
||||
if (this->actor.params == 0xE) {
|
||||
@@ -671,7 +671,7 @@ void func_80AB6D08(EnNiw* this, PlayState* play) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.velocity.y = 4.0f;
|
||||
} else {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->sfxTimer1 = 0;
|
||||
this->actor.velocity.y = 4.0f;
|
||||
this->unk_2A6 = 1;
|
||||
@@ -730,21 +730,21 @@ void func_80AB6F04(EnNiw* this, PlayState* play) {
|
||||
pos.y += this->actor.yDistToWater;
|
||||
EffectSsGRipple_Spawn(play, &pos, 100, 500, 30);
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actor.velocity.y = 10.0f;
|
||||
this->actor.speedXZ = 1.0f;
|
||||
}
|
||||
} else {
|
||||
this->actor.gravity = -2.0f;
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actor.velocity.y = 10.0f;
|
||||
this->actor.speedXZ = 1.0f;
|
||||
this->actor.gravity = 0.0f;
|
||||
} else {
|
||||
this->actor.speedXZ = 4.0f;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.gravity = -2.0f;
|
||||
this->timer6 = 100;
|
||||
this->timer4 = 0;
|
||||
@@ -856,7 +856,7 @@ void func_80AB7328(EnNiw* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AB7420(EnNiw* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->unk_2A4 = (s16)Rand_ZeroFloat(3.99f) + 5;
|
||||
this->actionFunc = EnNiw_ResetAction;
|
||||
}
|
||||
|
||||
@@ -118,8 +118,9 @@ void func_80ABBBA8(EnNutsball* this, PlayState* play) {
|
||||
|
||||
this->actor.home.rot.z += 0x2AA8;
|
||||
|
||||
if ((this->actor.bgCheckFlags & 8) || (this->actor.bgCheckFlags & 1) || (this->collider.base.atFlags & AT_HIT) ||
|
||||
(this->collider.base.acFlags & AC_HIT) || (this->collider.base.ocFlags1 & OC1_HIT)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) ||
|
||||
(this->collider.base.atFlags & AT_HIT) || (this->collider.base.acFlags & AC_HIT) ||
|
||||
(this->collider.base.ocFlags1 & OC1_HIT)) {
|
||||
// Checking if the player is using a shield that reflects projectiles
|
||||
// And if so, reflects the projectile on impact
|
||||
if ((player->currentShield == PLAYER_SHIELD_DEKU) ||
|
||||
|
||||
@@ -255,7 +255,7 @@ void EnNy_TurnToStone(EnNy* this, PlayState* play) {
|
||||
phi_f0 -= 2.0f;
|
||||
if (phi_f0 <= 0.25f) {
|
||||
phi_f0 = 0.25f;
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
if (!(this->unk_1F0 < this->actor.yDistToWater)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
}
|
||||
|
||||
@@ -490,9 +490,9 @@ void EnOkuta_ProjectileFly(EnOkuta* this, PlayState* play) {
|
||||
this->actor.speedXZ -= 0.1f;
|
||||
this->actor.speedXZ = CLAMP_MIN(this->actor.speedXZ, 1.0f);
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 8) || (this->actor.bgCheckFlags & 1) || (this->collider.base.atFlags & AT_HIT) ||
|
||||
this->collider.base.acFlags & AC_HIT || this->collider.base.ocFlags1 & OC1_HIT ||
|
||||
this->actor.floorHeight == BGCHECK_Y_MIN) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) ||
|
||||
(this->collider.base.atFlags & AT_HIT) || this->collider.base.acFlags & AC_HIT ||
|
||||
this->collider.base.ocFlags1 & OC1_HIT || this->actor.floorHeight == BGCHECK_Y_MIN) {
|
||||
if ((player->currentShield == PLAYER_SHIELD_DEKU ||
|
||||
(player->currentShield == PLAYER_SHIELD_HYLIAN && LINK_IS_ADULT)) &&
|
||||
this->collider.base.atFlags & AT_HIT && this->collider.base.atFlags & AT_TYPE_ENEMY &&
|
||||
@@ -657,12 +657,12 @@ void EnOkuta_Update(Actor* thisx, PlayState* play2) {
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Math_Vec3f_Copy(&sp38, &this->actor.world.pos);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 15.0f, 30.0f, 5);
|
||||
if ((this->actor.bgCheckFlags & 8) &&
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) &&
|
||||
SurfaceType_IsIgnoredByProjectiles(&play->colCtx, this->actor.wallPoly, this->actor.wallBgId)) {
|
||||
sp34 = true;
|
||||
this->actor.bgCheckFlags &= ~8;
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 1) &&
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
|
||||
SurfaceType_IsIgnoredByProjectiles(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId)) {
|
||||
sp34 = true;
|
||||
this->actor.bgCheckFlags &= ~1;
|
||||
|
||||
@@ -682,7 +682,7 @@ void EnOssan_EndInteraction(PlayState* play, EnOssan* this) {
|
||||
play->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_DISABLE_DRAW;
|
||||
Play_SetViewpoint(play, 1);
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
this->drawCursor = 0;
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
@@ -1402,7 +1402,7 @@ void EnOssan_GiveItemWithFanfare(PlayState* play, EnOssan* this) {
|
||||
play->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_DISABLE_DRAW;
|
||||
Play_SetViewpoint(play, 1);
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
this->drawCursor = 0;
|
||||
EnOssan_UpdateCameraDirection(this, play, 0.0f);
|
||||
this->stateFlag = OSSAN_STATE_GIVE_ITEM_FANFARE;
|
||||
|
||||
@@ -109,7 +109,7 @@ void func_80ACE13C(EnPart* this, PlayState* play) {
|
||||
if ((this->actor.params == 12) || (this->actor.params == 13)) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, 15.0f, 0.0f, 0x1D);
|
||||
|
||||
if ((this->actor.bgCheckFlags & 1) || (this->actor.world.pos.y <= this->actor.floorHeight)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.world.pos.y <= this->actor.floorHeight)) {
|
||||
this->action = 4;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.gravity = 0.0f;
|
||||
|
||||
@@ -570,7 +570,7 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* this, PlayState* play) {
|
||||
this->colQuad.base.acFlags = this->colQuad.base.acFlags & ~AC_BOUNCED;
|
||||
EnPeehat_SetStateAttackRecoil(this);
|
||||
} else if ((this->colQuad.base.atFlags & AT_HIT) || (this->colCylinder.base.acFlags & AC_HIT) ||
|
||||
(this->actor.bgCheckFlags & 1)) {
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
this->colQuad.base.atFlags &= ~AT_HIT;
|
||||
if (!(this->colCylinder.base.acFlags & AC_HIT) && &player->actor == this->colQuad.base.at) {
|
||||
@@ -580,7 +580,7 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* this, PlayState* play) {
|
||||
this->actor.world.rot.y -= 0x2000;
|
||||
}
|
||||
this->unk_2D4 = 40;
|
||||
} else if (this->colCylinder.base.acFlags & AC_HIT || this->actor.bgCheckFlags & 1) {
|
||||
} else if (this->colCylinder.base.acFlags & AC_HIT || this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Vec3f zeroVec = { 0, 0, 0 };
|
||||
s32 i;
|
||||
for (i = 4; i >= 0; i--) {
|
||||
@@ -592,7 +592,7 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
if (&player->actor != this->colQuad.base.at || this->colCylinder.base.acFlags & AC_HIT) {
|
||||
if (!(this->actor.bgCheckFlags & 1)) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
EffectSsDeadSound_SpawnStationary(play, &this->actor.projectedPos, NA_SE_EN_PIHAT_SM_DEAD, 1, 1, 40);
|
||||
}
|
||||
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x20);
|
||||
|
||||
@@ -613,7 +613,7 @@ void EnPoField_SoulIdle(EnPoField* this, PlayState* play) {
|
||||
if (this->actionTimer != 0) {
|
||||
this->actionTimer--;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 6.0f, 0, 1, 1, 15, OBJECT_PO_FIELD, 10,
|
||||
gPoeFieldLanternDL);
|
||||
func_80AD42B0(this);
|
||||
|
||||
@@ -627,7 +627,7 @@ void func_80ADA530(EnPoSisters* this, PlayState* play) {
|
||||
} else if (this->unk_19A == 0 && Math_StepToF(&this->actor.speedXZ, 0.0f, 0.2f) != 0) {
|
||||
func_80AD9368(this);
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
Math_ScaledStepToS(&this->actor.world.rot.y, Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos),
|
||||
0x71C);
|
||||
} else if (Actor_WorldDistXZToPoint(&this->actor, &this->actor.home.pos) > 300.0f) {
|
||||
@@ -739,7 +739,7 @@ void func_80ADAC70(EnPoSisters* this, PlayState* play) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 0.0f) && this->unk_19A != 0) {
|
||||
this->unk_19A--;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
this->unk_199 |= 2;
|
||||
func_80AD9718(this);
|
||||
|
||||
@@ -724,7 +724,7 @@ void EnPoh_Death(EnPoh* this, PlayState* play) {
|
||||
if (this->unk_198 != 0) {
|
||||
this->unk_198--;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
objId = (this->infoIdx == EN_POH_INFO_COMPOSER) ? OBJECT_PO_COMPOSER : OBJECT_POH;
|
||||
EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 6.0f, 0, 1, 1, 15, objId, 10,
|
||||
this->info->lanternDisplayList);
|
||||
|
||||
@@ -618,7 +618,7 @@ void EnRd_Crouch(EnRd* this, PlayState* play) {
|
||||
void EnRd_SetupDamaged(EnRd* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gGibdoRedeadDamageAnim, -6.0f);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = -2.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ void EnReeba_Move(EnReeba* this, PlayState* play) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actionfunc = EnReeba_SetupSink;
|
||||
} else if ((this->moveTimer == 0) || (this->actor.xzDistToPlayer < 30.0f) ||
|
||||
(this->actor.xzDistToPlayer > 400.0f) || (this->actor.bgCheckFlags & 8)) {
|
||||
(this->actor.xzDistToPlayer > 400.0f) || (this->actor.bgCheckFlags & BGCHECKFLAG_WALL)) {
|
||||
this->actionfunc = EnReeba_SetupSink;
|
||||
} else if (this->sfxTimer == 0) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIVA_MOVE);
|
||||
@@ -290,7 +290,7 @@ void EnReeba_MoveBig(EnReeba* this, PlayState* play) {
|
||||
surfaceType = SurfaceType_GetFloorType(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
|
||||
if (((surfaceType != 4) && (surfaceType != 7)) || (this->actor.xzDistToPlayer > 400.0f) ||
|
||||
(this->actor.bgCheckFlags & 8)) {
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_WALL)) {
|
||||
this->actionfunc = EnReeba_SetupSink;
|
||||
} else {
|
||||
if ((this->actor.xzDistToPlayer < 70.0f) && (this->bigLeeverTimer == 0)) {
|
||||
|
||||
@@ -921,7 +921,7 @@ void func_80AEC9C4(EnRu1* this) {
|
||||
}
|
||||
|
||||
void func_80AECA18(EnRu1* this) {
|
||||
if (!(this->actor.bgCheckFlags & 1)) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->action = 13;
|
||||
this->walkingFrame = 0.0f;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
@@ -1343,7 +1343,7 @@ void func_80AEDB30(EnRu1* this, PlayState* play) {
|
||||
s32 temp_a0;
|
||||
s32 phi_v1;
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
velocityY = &this->actor.velocity.y;
|
||||
dynaPolyActor = DynaPoly_GetActor(&play->colCtx, this->actor.floorBgId);
|
||||
if (*velocityY <= 0.0f) {
|
||||
@@ -1392,7 +1392,7 @@ void func_80AEDB30(EnRu1* this, PlayState* play) {
|
||||
func_80AED4FC(this);
|
||||
}
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
speedXZ = &this->actor.speedXZ;
|
||||
if (*speedXZ != 0.0f) {
|
||||
rotY = this->actor.world.rot.y;
|
||||
@@ -1526,7 +1526,7 @@ void func_80AEE2F8(EnRu1* this, PlayState* play) {
|
||||
DynaPolyActor* dynaPolyActor;
|
||||
s32 floorBgId;
|
||||
|
||||
if ((this->actor.bgCheckFlags & 1) && (this->actor.floorBgId != BGCHECK_SCENE)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (this->actor.floorBgId != BGCHECK_SCENE)) {
|
||||
floorBgId = this->actor.floorBgId;
|
||||
dynaPolyActor = DynaPoly_GetActor(&play->colCtx, floorBgId);
|
||||
if ((dynaPolyActor != NULL) && (dynaPolyActor->actor.id == ACTOR_BG_BDAN_SWITCH)) {
|
||||
@@ -1545,7 +1545,7 @@ s32 func_80AEE394(EnRu1* this, PlayState* play) {
|
||||
DynaPolyActor* dynaPolyActor;
|
||||
s32 floorBgId;
|
||||
|
||||
if ((this->actor.bgCheckFlags & 1) && this->actor.floorBgId != BGCHECK_SCENE) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && this->actor.floorBgId != BGCHECK_SCENE) {
|
||||
colCtx = &play->colCtx;
|
||||
floorBgId = this->actor.floorBgId; // necessary match, can't move this out of this block unfortunately
|
||||
dynaPolyActor = DynaPoly_GetActor(colCtx, floorBgId);
|
||||
@@ -1575,7 +1575,7 @@ void func_80AEE488(EnRu1* this, PlayState* play) {
|
||||
this->roomNum3 = curRoomNum;
|
||||
this->action = 31;
|
||||
func_80AED520(this, play);
|
||||
} else if ((!func_80AEE394(this, play)) && (!(this->actor.bgCheckFlags & 1))) {
|
||||
} else if ((!func_80AEE394(this, play)) && (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND))) {
|
||||
this->actor.minVelocityY = -((kREG(24) * 0.01f) + 6.8f);
|
||||
this->actor.gravity = -((kREG(23) * 0.01f) + 1.3f);
|
||||
this->action = 28;
|
||||
@@ -1584,7 +1584,8 @@ void func_80AEE488(EnRu1* this, PlayState* play) {
|
||||
|
||||
void func_80AEE568(EnRu1* this, PlayState* play) {
|
||||
if (!func_80AEE394(this, play)) {
|
||||
if ((this->actor.bgCheckFlags & 1) && (this->actor.speedXZ == 0.0f) && (this->actor.minVelocityY == 0.0f)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (this->actor.speedXZ == 0.0f) &&
|
||||
(this->actor.minVelocityY == 0.0f)) {
|
||||
func_80AEE02C(this);
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
this->action = 27;
|
||||
@@ -1688,7 +1689,7 @@ void func_80AEE7C4(EnRu1* this, PlayState* play) {
|
||||
}
|
||||
|
||||
s32 func_80AEEAC8(EnRu1* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
func_80AEE02C(this);
|
||||
Actor_OfferCarry(&this->actor, play);
|
||||
this->action = 27;
|
||||
|
||||
@@ -275,7 +275,7 @@ void EnSb_TurnAround(EnSb* this, PlayState* play) {
|
||||
|
||||
void EnSb_Lunge(EnSb* this, PlayState* play) {
|
||||
Math_StepToF(&this->actor.speedXZ, 0.0f, 0.2f);
|
||||
if ((this->actor.velocity.y <= -0.1f) || ((this->actor.bgCheckFlags & 2))) {
|
||||
if ((this->actor.velocity.y <= -0.1f) || ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH))) {
|
||||
if (!(this->actor.yDistToWater > 0.0f)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
}
|
||||
@@ -308,7 +308,7 @@ void EnSb_Bounce(EnSb* this, PlayState* play) {
|
||||
}
|
||||
EnSb_SpawnBubbles(play, this);
|
||||
EnSb_SetupLunge(this);
|
||||
} else if (this->actor.bgCheckFlags & 1) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.bgCheckFlags &= ~2;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->timer = 1;
|
||||
@@ -321,12 +321,12 @@ void EnSb_Bounce(EnSb* this, PlayState* play) {
|
||||
void EnSb_Cooldown(EnSb* this, PlayState* play) {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.bgCheckFlags &= ~1;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
} else {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.bgCheckFlags &= ~1;
|
||||
this->actionFunc = EnSb_WaitClosed;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
|
||||
@@ -344,7 +344,7 @@ void func_80AFD508(EnSkb* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnSkb_SetupStunned(EnSkb* this) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
|
||||
@@ -354,15 +354,15 @@ void EnSkb_SetupStunned(EnSkb* this) {
|
||||
}
|
||||
|
||||
void func_80AFD59C(EnSkb* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (this->actor.speedXZ < 0.0f) {
|
||||
this->actor.speedXZ += 0.05f;
|
||||
}
|
||||
}
|
||||
if ((this->actor.colorFilterTimer == 0) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((this->actor.colorFilterTimer == 0) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
if (this->actor.colChkInfo.health == 0) {
|
||||
func_80AFD7B4(this, play);
|
||||
} else {
|
||||
@@ -373,7 +373,7 @@ void func_80AFD59C(EnSkb* this, PlayState* play) {
|
||||
|
||||
void func_80AFD644(EnSkb* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gStalchildDamagedAnim, -4.0f);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = -4.0f;
|
||||
}
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
@@ -391,17 +391,17 @@ void func_80AFD6CC(EnSkb* this, PlayState* play) {
|
||||
if ((*new_var) != 0) {
|
||||
this->breakFlags = (*new_var) | 2;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actor.speedXZ = 0;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (this->actor.speedXZ < 0.0f) {
|
||||
this->actor.speedXZ += 0.05f;
|
||||
}
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0x1194, 0);
|
||||
if (SkelAnime_Update(&this->skelAnime) && (this->actor.bgCheckFlags & 1)) {
|
||||
if (SkelAnime_Update(&this->skelAnime) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
func_80AFCD60(this);
|
||||
}
|
||||
}
|
||||
@@ -411,7 +411,7 @@ void func_80AFD7B4(EnSkb* this, PlayState* play) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gStalchildDyingAnim, -4.0f);
|
||||
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = -6.0f;
|
||||
}
|
||||
this->actionState = 1;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user