1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-01 15:26:01 +00:00

[PAL N64] Match actor changes that aren't in NTSC 1.2 or GC releases (#2208)

* [PAL N64] Match actor changes that aren't in NTSC 1.2

* Add bug comment about Zora's Domain waterfall
This commit is contained in:
cadmic 2024-09-18 07:49:01 -07:00 committed by GitHub
parent dc2ceb33f3
commit 2122a4345b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 89 additions and 0 deletions

View file

@ -5,6 +5,7 @@
*/ */
#include "z_bg_spot07_taki.h" #include "z_bg_spot07_taki.h"
#include "versions.h"
#include "assets/objects/object_spot07_object/object_spot07_object.h" #include "assets/objects/object_spot07_object/object_spot07_object.h"
#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
@ -91,10 +92,19 @@ void BgSpot07Taki_Draw(Actor* thisx, PlayState* play) {
if (!LINK_IS_ADULT) { if (!LINK_IS_ADULT) {
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128);
if (this->dyna.actor.params == 0) { if (this->dyna.actor.params == 0) {
#if !OOT_PAL_N64
//! @bug 64x64 texture is scrolled mod 128 instead of mod 256 (i.e. 64 << G_TEXTURE_IMAGE_FRAC),
// so there is a noticeable jump when the scrolling wraps around
gSPSegment(POLY_XLU_DISP++, 0x09, gSPSegment(POLY_XLU_DISP++, 0x09,
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, ((frames * -1) & 0x7F), Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, ((frames * -1) & 0x7F),
((frames * -3) & 0xFF), 64, 64, 1, ((frames * 1) & 0x7F), ((frames * -3) & 0xFF), 64, 64, 1, ((frames * 1) & 0x7F),
((frames * -3) & 0xFF), 64, 64)); ((frames * -3) & 0xFF), 64, 64));
#else
gSPSegment(POLY_XLU_DISP++, 0x09,
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, ((frames * -1) & 0xFF),
((frames * -3) & 0xFF), 64, 64, 1, ((frames * 1) & 0xFF),
((frames * -3) & 0xFF), 64, 64));
#endif
gSPSegment(POLY_XLU_DISP++, 0x0A, gSPSegment(POLY_XLU_DISP++, 0x0A,
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, frames * 0, ((frames * 3) & 0x1FF), 32, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, frames * 0, ((frames * 3) & 0x1FF), 32,
128, 1, frames * 0, ((frames * 3) & 0x1FF), 32, 128)); 128, 1, frames * 0, ((frames * 3) & 0x1FF), 32, 128));

View file

@ -12,6 +12,7 @@
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "assets/objects/object_hintnuts/object_hintnuts.h" #include "assets/objects/object_hintnuts/object_hintnuts.h"
#include "terminal.h" #include "terminal.h"
#include "versions.h"
#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
@ -39,6 +40,10 @@ void EnDntNomal_TargetGivePrize(EnDntNomal* this, PlayState* play);
void EnDntNomal_TargetReturn(EnDntNomal* this, PlayState* play); void EnDntNomal_TargetReturn(EnDntNomal* this, PlayState* play);
void EnDntNomal_TargetBurrow(EnDntNomal* this, PlayState* play); void EnDntNomal_TargetBurrow(EnDntNomal* this, PlayState* play);
#if OOT_PAL_N64
void EnDntNomal_DoNothing(EnDntNomal* this, PlayState* play);
#endif
void EnDntNomal_SetupStageWait(EnDntNomal* this, PlayState* play); void EnDntNomal_SetupStageWait(EnDntNomal* this, PlayState* play);
void EnDntNomal_SetupStageCelebrate(EnDntNomal* this, PlayState* play); void EnDntNomal_SetupStageCelebrate(EnDntNomal* this, PlayState* play);
void EnDntNomal_SetupStageDance(EnDntNomal* this, PlayState* play); void EnDntNomal_SetupStageDance(EnDntNomal* this, PlayState* play);
@ -411,10 +416,23 @@ void EnDntNomal_TargetBurrow(EnDntNomal* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
if (frame >= this->endFrame) { if (frame >= this->endFrame) {
#if !OOT_PAL_N64
this->actionFunc = EnDntNomal_SetupTargetWait; this->actionFunc = EnDntNomal_SetupTargetWait;
#else
this->hitCounter = 0;
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.home.pos);
this->actionFunc = EnDntNomal_DoNothing;
#endif
} }
} }
#if OOT_PAL_N64
void EnDntNomal_DoNothing(EnDntNomal* this, PlayState* play) {
}
#endif
void EnDntNomal_SetupStageWait(EnDntNomal* this, PlayState* play) { void EnDntNomal_SetupStageWait(EnDntNomal* this, PlayState* play) {
if (this->timer3 == 0) { if (this->timer3 == 0) {
this->endFrame = (f32)Animation_GetLastFrame(&gDntStageHideAnim); this->endFrame = (f32)Animation_GetLastFrame(&gDntStageHideAnim);

View file

@ -7,6 +7,7 @@
#include "z_en_heishi3.h" #include "z_en_heishi3.h"
#include "assets/objects/object_sd/object_sd.h" #include "assets/objects/object_sd/object_sd.h"
#include "terminal.h" #include "terminal.h"
#include "versions.h"
#define FLAGS 0 #define FLAGS 0
@ -134,6 +135,9 @@ void EnHeishi3_StandSentinelInGrounds(EnHeishi3* this, PlayState* play) {
Sfx_PlaySfxCentered(NA_SE_SY_FOUND); Sfx_PlaySfxCentered(NA_SE_SY_FOUND);
PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!"
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
#if OOT_PAL_N64
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4;
#endif
this->actionFunc = EnHeishi3_CatchStart; this->actionFunc = EnHeishi3_CatchStart;
} }
} }
@ -162,6 +166,9 @@ void EnHeishi3_StandSentinelInCastle(EnHeishi3* this, PlayState* play) {
Sfx_PlaySfxCentered(NA_SE_SY_FOUND); Sfx_PlaySfxCentered(NA_SE_SY_FOUND);
PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!"
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
#if OOT_PAL_N64
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4;
#endif
this->actionFunc = EnHeishi3_CatchStart; this->actionFunc = EnHeishi3_CatchStart;
} }
} }

View file

@ -8,6 +8,7 @@
#include "assets/scenes/dungeons/jyasinboss/jyasinboss_scene.h" #include "assets/scenes/dungeons/jyasinboss/jyasinboss_scene.h"
#include "assets/objects/object_ik/object_ik.h" #include "assets/objects/object_ik/object_ik.h"
#include "terminal.h" #include "terminal.h"
#include "versions.h"
#define FLAGS ACTOR_FLAG_4 #define FLAGS ACTOR_FLAG_4
@ -757,9 +758,11 @@ void EnIk_UpdateDamage(EnIk* this, PlayState* play) {
} else if (this->actor.colChkInfo.health <= 10) { } else if (this->actor.colChkInfo.health <= 10) {
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_BOSS); Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_BOSS);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EN_LAST_DAMAGE); SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EN_LAST_DAMAGE);
#if !OOT_PAL_N64
if (this->switchFlag != 0xFF) { if (this->switchFlag != 0xFF) {
Flags_SetSwitch(play, this->switchFlag); Flags_SetSwitch(play, this->switchFlag);
} }
#endif
return; return;
} else if (prevHealth == 50) { } else if (prevHealth == 50) {
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY);
@ -1231,6 +1234,9 @@ void EnIk_CsAction4(EnIk* this, PlayState* play) {
void EnIk_CsAction5(EnIk* this, PlayState* play) { void EnIk_CsAction5(EnIk* this, PlayState* play) {
if (EnIk_GetCue(play, 4) == NULL) { if (EnIk_GetCue(play, 4) == NULL) {
#if OOT_PAL_N64
Flags_SetSwitch(play, this->switchFlag);
#endif
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} }
} }

View file

@ -6,6 +6,7 @@
#include "z_en_ma3.h" #include "z_en_ma3.h"
#include "assets/objects/object_ma2/object_ma2.h" #include "assets/objects/object_ma2/object_ma2.h"
#include "versions.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_5) #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_5)
@ -287,6 +288,43 @@ void func_80AA3200(EnMa3* this, PlayState* play) {
} }
} }
#if OOT_PAL_N64
// Same as Npc_UpdateTalking, but with an additional check for the subtimer state
s32 EnMa3_UpdateTalking(PlayState* play, Actor* actor, s16* talkState, f32 interactRange, NpcGetTextIdFunc getTextId,
NpcUpdateTalkStateFunc updateTalkState) {
s16 x;
s16 y;
if (Actor_TalkOfferAccepted(actor, play)) {
*talkState = NPC_TALK_STATE_TALKING;
return true;
}
if (*talkState != NPC_TALK_STATE_IDLE) {
*talkState = updateTalkState(play, actor);
return false;
}
Actor_GetScreenPos(play, actor, &x, &y);
if ((x < 0) || (x > SCREEN_WIDTH) || (y < 0) || (y > SCREEN_HEIGHT)) {
// Actor is offscreen
return false;
}
if ((gSaveContext.subTimerState != 0) && (gSaveContext.subTimerSeconds < 6)) {
return false;
}
if (!Actor_OfferTalk(actor, play, interactRange)) {
return false;
}
actor->textId = getTextId(play, actor);
return false;
}
#endif
void EnMa3_Update(Actor* thisx, PlayState* play) { void EnMa3_Update(Actor* thisx, PlayState* play) {
EnMa3* this = (EnMa3*)thisx; EnMa3* this = (EnMa3*)thisx;
s32 pad; s32 pad;
@ -297,8 +335,13 @@ void EnMa3_Update(Actor* thisx, PlayState* play) {
EnMa3_UpdateEyes(this); EnMa3_UpdateEyes(this);
this->actionFunc(this, play); this->actionFunc(this, play);
func_80AA2E54(this, play); func_80AA2E54(this, play);
#if !OOT_PAL_N64
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 150.0f, Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 150.0f,
EnMa3_GetTextId, EnMa3_UpdateTalkState); EnMa3_GetTextId, EnMa3_UpdateTalkState);
#else
EnMa3_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 150.0f,
EnMa3_GetTextId, EnMa3_UpdateTalkState);
#endif
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) { if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
if (this->isNotSinging) { if (this->isNotSinging) {
// Turn on singing // Turn on singing

View file

@ -7,6 +7,7 @@
#include "z_en_ru1.h" #include "z_en_ru1.h"
#include "assets/objects/object_ru1/object_ru1.h" #include "assets/objects/object_ru1/object_ru1.h"
#include "terminal.h" #include "terminal.h"
#include "versions.h"
#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h" #include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4 | ACTOR_FLAG_26) #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4 | ACTOR_FLAG_26)
@ -2036,7 +2037,11 @@ void func_80AEF930(EnRu1* this, PlayState* play) {
if (func_80AEB104(this) == 3) { if (func_80AEB104(this) == 3) {
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY; this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY;
this->actor.textId = 0x4048; this->actor.textId = 0x4048;
#if !OOT_PAL_N64
Message_ContinueTextbox(play, this->actor.textId); Message_ContinueTextbox(play, this->actor.textId);
#else
Message_StartTextbox(play, this->actor.textId, NULL);
#endif
func_80AEF4A8(this, play); func_80AEF4A8(this, play);
this->action = 43; this->action = 43;
this->drawConfig = 0; this->drawConfig = 0;