mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-20 22:11:16 +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:
parent
dc2ceb33f3
commit
2122a4345b
6 changed files with 89 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "z_en_ma3.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)
|
||||
|
||||
|
@ -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) {
|
||||
EnMa3* this = (EnMa3*)thisx;
|
||||
s32 pad;
|
||||
|
@ -297,8 +335,13 @@ 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);
|
||||
#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->isNotSinging) {
|
||||
// Turn on singing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue