1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-14 21:40:03 +00:00

[ntsc-1.0/1.1] Match actor changes introduced in PAL 1.0 (#2227)

This commit is contained in:
cadmic 2024-09-25 20:11:38 -07:00 committed by GitHub
parent 43c3971aaf
commit 19621c6a3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 202 additions and 14 deletions

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_hidan_hamstep.h"
#include "versions.h"
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
#include "quake.h"
@ -379,9 +380,11 @@ void func_80888A58(BgHidanHamstep* this, PlayState* play) {
Rumble_Request(SQ(100.0f), 255, 20, 150);
func_808884C8(this, play);
#if OOT_VERSION >= PAL_1_0
if (PARAMS_GET_U(this->dyna.actor.params, 0, 8) == 5) {
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
}
#endif
PRINTF("B(%d)\n", this->dyna.actor.params);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_mori_hineri.h"
#include "versions.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_box/object_box.h"
#include "assets/objects/object_mori_hineri1/object_mori_hineri1.h"
@ -203,7 +204,9 @@ void func_808A3E54(BgMoriHineri* this, PlayState* play) {
this->moriHineriObjectSlot = objectSlot;
this->dyna.actor.params ^= 1;
sSubCamId = SUB_CAM_ID_DONE;
#if OOT_VERSION >= PAL_1_0
Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR);
#endif
} else {
this->dyna.actor.draw = NULL;
this->actionFunc = func_808A3D58;

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_treemouth.h"
#include "versions.h"
#include "assets/objects/object_spot04_objects/object_spot04_objects.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
@ -235,7 +236,12 @@ void BgTreemouth_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
if (!IS_CUTSCENE_LAYER || LINK_IS_ADULT) {
#if OOT_VERSION < PAL_1_0
if (!IS_CUTSCENE_LAYER)
#else
if (!IS_CUTSCENE_LAYER || LINK_IS_ADULT)
#endif
{
if (GET_EVENTCHKINF(EVENTCHKINF_07)) {
alpha = 2150;
}

View file

@ -847,6 +847,9 @@ void DemoEffect_UpdateTriforceSpot(DemoEffect* this, PlayState* play) {
*/
void DemoEffect_UpdateLightRingShrinking(DemoEffect* this, PlayState* play) {
if (this->lightRing.timer < this->lightRing.timerIncrement) {
#if OOT_VERSION < PAL_1_0
this->lightRing.timer = 0;
#endif
Actor_Kill(&this->actor);
this->lightRing.timer = 0;
} else {
@ -960,10 +963,18 @@ void DemoEffect_InitCreationFireball(DemoEffect* this, PlayState* play) {
Actor* parent = this->actor.parent;
this->actor.world.rot.y = parent->shape.rot.y;
this->fireBall.timer = FRAMERATE_CONST(50, 42);
this->actor.speed = FRAMERATE_CONST(1.5f, 1.8f);
#if OOT_VERSION < PAL_1_0
this->actor.gravity = -0.03f;
this->actor.minVelocityY = -1.5f;
#else
this->actor.minVelocityY = FRAMERATE_CONST(-1.5f, -2.5f);
this->actor.gravity = FRAMERATE_CONST(-0.03f, -0.05f);
#endif
this->updateFunc = DemoEffect_UpdateCreationFireball;
}

View file

@ -1,4 +1,5 @@
#include "z_demo_kankyo.h"
#include "versions.h"
#include "z64cutscene_commands.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_efc_star_field/object_efc_star_field.h"
@ -14,7 +15,7 @@ void DemoKankyo_Draw(Actor* thisx, PlayState* play);
void DemoKankyo_SetupType(DemoKankyo* this, PlayState* play);
void DemoKankyo_UpdateClouds(DemoKankyo* this, PlayState* play);
void DemoKankyo_UpdateRock(DemoKankyo* this, PlayState* play);
void DemoKankyo_DoNothing2(DemoKankyo* this, PlayState* play);
void DemoKankyo_UpdateWarpIn(DemoKankyo* this, PlayState* play);
void DemoKankyo_UpdateDoorOfTime(DemoKankyo* this, PlayState* play);
void DemoKankyo_DoNothing(DemoKankyo* this, PlayState* play);
void DemoKankyo_KillDoorOfTimeCollision(DemoKankyo* this, PlayState* play);
@ -355,7 +356,7 @@ void DemoKankyo_SetupType(DemoKankyo* this, PlayState* play) {
}
}
gSaveContext.cutsceneTrigger = 1;
DemoKankyo_SetupAction(this, DemoKankyo_DoNothing2);
DemoKankyo_SetupAction(this, DemoKankyo_UpdateWarpIn);
break;
case DEMOKANKYO_BLUE_RAIN:
case DEMOKANKYO_SPARKLES:
@ -367,7 +368,11 @@ void DemoKankyo_SetupType(DemoKankyo* this, PlayState* play) {
void DemoKankyo_DoNothing(DemoKankyo* this, PlayState* play) {
}
void DemoKankyo_DoNothing2(DemoKankyo* this, PlayState* play) {
void DemoKankyo_UpdateWarpIn(DemoKankyo* this, PlayState* play) {
#if OOT_VERSION < PAL_1_0
Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
#endif
DemoKankyo_SetupAction(this, DemoKankyo_DoNothing);
}
@ -798,8 +803,10 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) {
this->unk_150[i].unk_22++;
}
} else {
#if OOT_VERSION >= PAL_1_0
Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP_OUT - SFX_FLAG, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
#endif
if (func_800BB2B4(&camPos, &sWarpRoll, &sWarpFoV, sWarpInCameraPoints, &this->unk_150[i].unk_20,
&this->unk_150[i].unk_1C) != 0) {
this->unk_150[i].unk_22++;

View file

@ -5,6 +5,7 @@
*/
#include "z_en_bw.h"
#include "versions.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_bw/object_bw.h"
@ -137,7 +138,9 @@ void EnBw_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 40.0f);
this->actor.colChkInfo.damageTable = &sDamageTable;
this->actor.colChkInfo.health = 6;
#if OOT_VERSION >= PAL_1_0
this->actor.colChkInfo.mass = MASS_HEAVY;
#endif
this->actor.focus.pos = this->actor.world.pos;
func_809CE9A8(this);
this->color1.a = this->color1.r = 255;

View file

@ -5,6 +5,7 @@
*/
#include "z_en_dha.h"
#include "versions.h"
#include "overlays/actors/ovl_En_Dh/z_en_dh.h"
#include "assets/objects/object_dh/object_dh.h"
@ -245,7 +246,9 @@ void EnDha_Wait(EnDha* this, PlayState* play) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
#endif
}
if (this->actor.home.rot.z != 0) {
@ -285,7 +288,9 @@ void EnDha_Wait(EnDha* this, PlayState* play) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
#endif
}
this->actor.home.rot.z = 1;
@ -306,7 +311,9 @@ void EnDha_TakeDamage(EnDha* this, PlayState* play) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
#endif
}
Math_SmoothStepToS(&this->limbAngleX[1], 0, 1, 2000, 0);
@ -344,7 +351,9 @@ void EnDha_Die(EnDha* this, PlayState* play) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
#endif
}
Math_SmoothStepToS(&this->limbAngleX[1], 0, 1, 0x7D0, 0);

View file

@ -240,7 +240,12 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) {
this->targetVtx[3].z = targetZ - 24.0f;
SkelAnime_Update(&this->skelAnime);
if ((this->targetQuad.base.acFlags & AC_HIT) || BREG(0)) {
#if OOT_VERSION < PAL_1_0
if (this->targetQuad.base.acFlags & AC_HIT)
#else
if ((this->targetQuad.base.acFlags & AC_HIT) || BREG(0))
#endif
{
this->targetQuad.base.acFlags &= ~AC_HIT;
dx = fabsf(targetX - this->targetQuad.elem.acDmgInfo.hitPos.x);

View file

@ -572,7 +572,11 @@ s16 EnGo2_UpdateTalkStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
u8 dialogState = this->dialogState;
switch (EnGo2_GetDialogState(this, play)) {
#if OOT_VERSION < PAL_1_0
case TEXT_STATE_CLOSING:
#else
case TEXT_STATE_DONE:
#endif
if (this->actor.textId == 0x305E) {
if (!gSaveContext.save.info.playerData.bgsFlag) {
EnGo2_GetItem(this, play, GI_SWORD_BIGGORON);
@ -1790,7 +1794,9 @@ void EnGo2_ReverseRolling(EnGo2* this, PlayState* play) {
void EnGo2_SetupGetItem(EnGo2* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
#if OOT_VERSION >= PAL_1_0
this->actor.parent = NULL;
#endif
this->actionFunc = EnGo2_SetGetItem;
} else {
Actor_OfferGetItem(&this->actor, play, this->getItemId, this->actor.xzDistToPlayer + 1.0f,
@ -1980,9 +1986,13 @@ void EnGo2_Update(Actor* thisx, PlayState* play) {
EnGo2_RollForward(this);
Actor_UpdateBgCheckInfo(play, &this->actor, this->collider.dim.height * 0.5f, this->collider.dim.radius * 0.6f,
0.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
#if OOT_VERSION < PAL_1_0
func_80A44AB0(this, play);
#else
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
func_80A44AB0(this, play);
}
#endif
this->actionFunc(this, play);
if (this->unk_211 == true) {
func_80034F54(play, this->unk_226, this->unk_24A, 18);

View file

@ -5,6 +5,7 @@
*/
#include "z_en_horse.h"
#include "versions.h"
#include "overlays/actors/ovl_En_In/z_en_in.h"
#include "assets/objects/object_horse/object_horse.h"
#include "assets/objects/object_hni/object_hni.h"
@ -699,8 +700,10 @@ s32 EnHorse_Spawn(EnHorse* this, PlayState* play) {
this->actor.world.rot.y = sHorseSpawns[i].angle;
this->actor.shape.rot.y = Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(play)->actor);
spawn = true;
#if OOT_VERSION >= PAL_1_0
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &this->actor.world.pos,
&this->actor.projectedPos, &this->actor.projectedW);
#endif
}
}
}
@ -1738,8 +1741,10 @@ void EnHorse_Inactive(EnHorse* this, PlayState* play2) {
if (R_EPONAS_SONG_PLAYED && this->type == HORSE_EPONA) {
R_EPONAS_SONG_PLAYED = false;
if (EnHorse_Spawn(this, play) != 0) {
#if OOT_VERSION >= PAL_1_0
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
#endif
this->stateFlags &= ~ENHORSE_INACTIVE;
gSaveContext.save.info.horseData.sceneId = play->sceneId;
@ -1814,8 +1819,10 @@ void EnHorse_Idle(EnHorse* this, PlayState* play) {
R_EPONAS_SONG_PLAYED = false;
if (!func_80A5BBBC(play, this, &this->actor.world.pos)) {
if (EnHorse_Spawn(this, play)) {
#if OOT_VERSION >= PAL_1_0
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
#endif
this->followTimer = 0;
EnHorse_SetFollowAnimation(this, play);
Camera_SetViewParam(play->cameraPtrs[CAM_ID_MAIN], CAM_VIEW_TARGET, &this->actor);
@ -1928,6 +1935,12 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) {
this->skin.skelAnime.playSpeed = 1.0f;
this->stateFlags &= ~ENHORSE_LAND2_SOUND;
this->unk_21C = this->unk_228;
#if OOT_VERSION < PAL_1_0
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
#endif
} else if (this->stateFlags & ENHORSE_TURNING_TO_PLAYER) {
this->actor.world.rot.y += this->followPlayerTurnSpeed;
this->actor.shape.rot.y = this->actor.world.rot.y;

View file

@ -1,4 +1,5 @@
#include "z_en_in.h"
#include "versions.h"
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
#include "assets/objects/object_in/object_in.h"
@ -933,6 +934,15 @@ void EnIn_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
if (this->actionFunc != func_80A7A304) {
func_80A79AB4(this, play);
#if OOT_VERSION < PAL_1_0
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState,
((this->actor.attentionRangeType == 6) ? 80.0f : 320.0f) + this->collider.dim.radius,
EnIn_GetTextId, EnIn_UpdateTalkState);
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
this->unk_1FA = this->unk_1F8;
this->unk_1F8 = Message_GetState(&play->msgCtx);
}
#else
if ((gSaveContext.subTimerSeconds < 6) && (gSaveContext.subTimerState != SUBTIMER_STATE_OFF) &&
this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
if (Actor_TalkOfferAccepted(&this->actor, play)) {}
@ -945,6 +955,7 @@ void EnIn_Update(Actor* thisx, PlayState* play) {
this->unk_1F8 = Message_GetState(&play->msgCtx);
}
}
#endif
func_80A795C8(this, play);
}
}

View file

@ -5,6 +5,7 @@
*/
#include "z_en_kz.h"
#include "versions.h"
#include "assets/objects/object_kz/object_kz.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@ -120,6 +121,27 @@ s16 EnKz_UpdateTalkState(PlayState* play, Actor* thisx) {
s16 talkState = NPC_TALK_STATE_TALKING;
switch (Message_GetState(&play->msgCtx)) {
case TEXT_STATE_NONE:
case TEXT_STATE_DONE_HAS_NEXT:
break;
#if OOT_VERSION < PAL_1_0
case TEXT_STATE_CLOSING:
talkState = NPC_TALK_STATE_IDLE;
switch (this->actor.textId) {
case 0x4012:
SET_INFTABLE(INFTABLE_139);
FALLTHROUGH;
case 0x401B:
talkState = NPC_TALK_STATE_ACTION;
break;
case 0x401F:
SET_INFTABLE(INFTABLE_139);
break;
}
break;
#else
case TEXT_STATE_CLOSING:
break;
case TEXT_STATE_DONE:
talkState = NPC_TALK_STATE_IDLE;
switch (this->actor.textId) {
@ -135,6 +157,7 @@ s16 EnKz_UpdateTalkState(PlayState* play, Actor* thisx) {
break;
}
break;
#endif
case TEXT_STATE_DONE_FADING:
if (this->actor.textId != 0x4014) {
if (this->actor.textId == 0x401B && !this->sfxPlayed) {
@ -154,7 +177,9 @@ s16 EnKz_UpdateTalkState(PlayState* play, Actor* thisx) {
}
if (this->actor.textId == 0x4014) {
if (play->msgCtx.choiceIndex == 0) {
#if OOT_VERSION >= PAL_1_0
EnKz_SetupGetItem(this, play);
#endif
talkState = NPC_TALK_STATE_ACTION;
} else {
this->actor.textId = 0x4016;
@ -167,9 +192,13 @@ s16 EnKz_UpdateTalkState(PlayState* play, Actor* thisx) {
talkState = NPC_TALK_STATE_ACTION;
}
break;
case TEXT_STATE_NONE:
case TEXT_STATE_DONE_HAS_NEXT:
case TEXT_STATE_CLOSING:
#if OOT_VERSION < PAL_1_0
case TEXT_STATE_DONE:
if (Message_ShouldAdvance(play)) {
talkState = NPC_TALK_STATE_ITEM_GIVEN;
}
break;
#endif
case TEXT_STATE_SONG_DEMO_DONE:
case TEXT_STATE_8:
case TEXT_STATE_9:
@ -206,6 +235,7 @@ s32 EnKz_UpdateTalking(PlayState* play, Actor* thisx, s16* talkState, f32 intera
return true;
}
#if OOT_VERSION >= PAL_1_0
if (*talkState != NPC_TALK_STATE_IDLE) {
*talkState = updateTalkState(play, thisx);
return false;
@ -219,12 +249,20 @@ s32 EnKz_UpdateTalking(PlayState* play, Actor* thisx, s16* talkState, f32 intera
}
thisx->flags |= ACTOR_FLAG_ATTENTION_ENABLED;
#endif
Actor_GetScreenPos(play, thisx, &x, &y);
if (!((x >= -30) && (x < 361) && (y >= -10) && (y < 241))) {
return false;
}
#if OOT_VERSION < PAL_1_0
if (*talkState != NPC_TALK_STATE_IDLE) {
*talkState = updateTalkState(play, thisx);
return false;
}
#endif
xzDistToPlayer = thisx->xzDistToPlayer;
thisx->xzDistToPlayer = Math_Vec3f_DistXZ(&thisx->home.pos, &player->actor.world.pos);
if (Actor_OfferTalk(thisx, play, interactRange) == 0) {
@ -239,6 +277,17 @@ s32 EnKz_UpdateTalking(PlayState* play, Actor* thisx, s16* talkState, f32 intera
void func_80A9CB18(EnKz* this, PlayState* play) {
Player* player = GET_PLAYER(play);
f32 yaw;
#if OOT_VERSION < PAL_1_0
yaw = Math_Vec3f_Yaw(&this->actor.home.pos, &player->actor.world.pos);
yaw -= this->actor.shape.rot.y;
if (fabsf(yaw) > 1820.0f) {
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
return;
}
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
#endif
if (EnKz_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, 340.0f, EnKz_GetTextId,
EnKz_UpdateTalkState)) {
@ -259,11 +308,15 @@ void func_80A9CB18(EnKz* this, PlayState* play) {
this->actor.textId = 0x4014;
this->sfxPlayed = false;
player->actor.textId = this->actor.textId;
#if OOT_VERSION >= PAL_1_0
this->isTrading = true;
#endif
return;
}
#if OOT_VERSION >= PAL_1_0
this->isTrading = false;
#endif
if (GET_INFTABLE(INFTABLE_139)) {
this->actor.textId = CHECK_QUEST_ITEM(QUEST_SONG_SERENADE) ? 0x4045 : 0x401A;
player->actor.textId = this->actor.textId;
@ -420,6 +473,9 @@ void EnKz_StopMweep(EnKz* this, PlayState* play) {
void EnKz_Wait(EnKz* this, PlayState* play) {
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
#if OOT_VERSION < PAL_1_0
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
#endif
this->actionFunc = EnKz_SetupGetItem;
EnKz_SetupGetItem(this, play);
} else {
@ -437,7 +493,11 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
this->actionFunc = EnKz_StartTimer;
} else {
#if OOT_VERSION < PAL_1_0
getItemId = func_8002F368(play) == EXCH_ITEM_PRESCRIPTION ? GI_EYEBALL_FROG : GI_TUNIC_ZORA;
#else
getItemId = this->isTrading == true ? GI_EYEBALL_FROG : GI_TUNIC_ZORA;
#endif
yRange = fabsf(this->actor.yDistToPlayer) + 1.0f;
xzRange = this->actor.xzDistToPlayer + 1.0f;
Actor_OfferGetItem(&this->actor, play, getItemId, xzRange, yRange);
@ -445,7 +505,12 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
}
void EnKz_StartTimer(EnKz* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
#if OOT_VERSION < PAL_1_0
if (this->interactInfo.talkState == NPC_TALK_STATE_ITEM_GIVEN)
#else
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play))
#endif
{
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYEBALL_FROG) {
Interface_SetSubTimer(180);
CLEAR_EVENTINF(EVENTINF_MARATHON_ACTIVE);
@ -467,9 +532,13 @@ void EnKz_Update(Actor* thisx, PlayState* play) {
SkelAnime_Update(&this->skelanime);
EnKz_UpdateEyes(this);
Actor_MoveXZGravity(&this->actor);
#if OOT_VERSION < PAL_1_0
func_80A9CB18(this, play);
#else
if (this->actionFunc != EnKz_StartTimer) {
func_80A9CB18(this, play);
}
#endif
this->actionFunc(this, play);
}

View file

@ -335,6 +335,7 @@ void EnMa3_Update(Actor* thisx, PlayState* play) {
EnMa3_UpdateEyes(this);
this->actionFunc(this, play);
func_80AA2E54(this, play);
#if !OOT_PAL_N64
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 150.0f,
EnMa3_GetTextId, EnMa3_UpdateTalkState);
@ -342,6 +343,8 @@ void EnMa3_Update(Actor* thisx, PlayState* play) {
EnMa3_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 150.0f,
EnMa3_GetTextId, EnMa3_UpdateTalkState);
#endif
#if OOT_VERSION >= PAL_1_0
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
if (this->isNotSinging) {
// Turn on singing
@ -353,6 +356,7 @@ void EnMa3_Update(Actor* thisx, PlayState* play) {
Audio_ToggleMalonSinging(true);
this->isNotSinging = true;
}
#endif
}
s32 EnMa3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {

View file

@ -605,7 +605,9 @@ void EnMb_Stunned(EnMb* this, PlayState* play) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
#endif
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
this->attack = ENMB_ATTACK_NONE;
}
@ -714,17 +716,21 @@ void EnMb_ClubWaitAfterAttack(EnMb* this, PlayState* play) {
* Slow down, charge again if the player is near, or resume walking.
*/
void EnMb_SpearPatrolEndCharge(EnMb* this, PlayState* play) {
#if OOT_VERSION >= PAL_1_0
Player* player = GET_PLAYER(play);
#endif
f32 lastFrame;
s16 relYawFromPlayer;
s16 yawPlayerToWaypoint;
#if OOT_VERSION >= PAL_1_0
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
}
#endif
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
Math_SmoothStepToF(&this->actor.speed, 0.0f, 1.0f, 1.5f, 0.0f);
@ -945,12 +951,17 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) {
if (endCharge) {
if (hasHitPlayer || (player->stateFlags2 & PLAYER_STATE2_7)) {
#if OOT_VERSION < NTSC_1_2
#if OOT_VERSION < PAL_1_0
player->stateFlags2 &= ~PLAYER_STATE2_7;
this->attackCollider.base.atFlags &= ~AT_HIT;
player->actor.parent = NULL;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
#elif OOT_VERSION < NTSC_1_2
player->stateFlags2 &= ~PLAYER_STATE2_7;
this->attackCollider.base.atFlags &= ~AT_HIT;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
#else
this->attackCollider.base.atFlags &= ~AT_HIT;
if (player->stateFlags2 & PLAYER_STATE2_7) {
@ -1022,12 +1033,17 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play) {
if (endCharge) {
if (hasHitPlayer || (player->stateFlags2 & PLAYER_STATE2_7)) {
#if OOT_VERSION < NTSC_1_2
#if OOT_VERSION < PAL_1_0
this->attackCollider.base.atFlags &= ~AT_HIT;
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
#elif OOT_VERSION < NTSC_1_2
this->attackCollider.base.atFlags &= ~AT_HIT;
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
#else
this->attackCollider.base.atFlags &= ~AT_HIT;
if (player->stateFlags2 & PLAYER_STATE2_7) {
@ -1316,7 +1332,9 @@ void EnMb_SpearDead(EnMb* this, PlayState* play) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
#endif
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
this->attack = ENMB_ATTACK_NONE;
}
@ -1399,7 +1417,9 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
#endif
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 6.0f, this->actor.world.rot.y, 6.0f);
}
this->damageEffect = this->actor.colChkInfo.damageEffect;

View file

@ -6,6 +6,7 @@
#include "z_en_okarina_effect.h"
#include "terminal.h"
#include "versions.h"
#include "z64frame_advance.h"
@ -38,8 +39,13 @@ void EnOkarinaEffect_Destroy(Actor* thisx, PlayState* play) {
EnOkarinaEffect* this = (EnOkarinaEffect*)thisx;
play->envCtx.precipitation[PRECIP_SOS_MAX] = 0;
#if OOT_VERSION < PAL_1_0
if ((gWeatherMode == WEATHER_MODE_CLEAR) && (play->envCtx.stormRequest == STORM_REQUEST_START))
#else
if ((gWeatherMode != WEATHER_MODE_RAIN) && (gWeatherMode != WEATHER_MODE_HEAVY_RAIN) &&
(play->envCtx.stormRequest == STORM_REQUEST_START)) {
(play->envCtx.stormRequest == STORM_REQUEST_START))
#endif
{
play->envCtx.stormRequest = STORM_REQUEST_STOP;
Environment_StopStormNatureAmbience(play);
}

View file

@ -6,6 +6,7 @@
#include "z_en_weather_tag.h"
#include "terminal.h"
#include "versions.h"
#define FLAGS ACTOR_FLAG_4
@ -140,8 +141,13 @@ u8 WeatherTag_CheckEnableWeatherEffect(EnWeatherTag* this, PlayState* play, u8 s
if (play->envCtx.stormRequest == STORM_REQUEST_NONE &&
((play->envCtx.lightMode != LIGHT_MODE_TIME) ||
(play->envCtx.lightConfig != 1 && !play->envCtx.changeLightEnabled))) {
#if OOT_VERSION >= PAL_1_0
gInterruptSongOfStorms = false;
#endif
if (gWeatherMode != weatherMode) {
#if OOT_VERSION < PAL_1_0
gInterruptSongOfStorms = false;
#endif
gWeatherMode = weatherMode;
if (play->envCtx.stormRequest == STORM_REQUEST_NONE) {
play->envCtx.changeSkyboxState = CHANGE_SKYBOX_REQUESTED;

View file

@ -1267,7 +1267,9 @@ void EnWf_UpdateDamage(EnWf* this, PlayState* play) {
if (this->actor.colChkInfo.damageEffect != ENWF_DMGEFF_ICE_MAGIC) {
this->damageEffect = this->actor.colChkInfo.damageEffect;
Actor_SetDropFlag(&this->actor, &this->colliderCylinderBody.elem, true);
#if OOT_VERSION >= PAL_1_0
this->slashStatus = 0;
#endif
if ((this->actor.colChkInfo.damageEffect == ENWF_DMGEFF_STUN) ||
(this->actor.colChkInfo.damageEffect == ENWF_DMGEFF_UNDEF)) {