1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 04:24:43 +00:00

Introduce Face Reaction Enum (#1586)

* face reactions

* cleanup

* cleanup fake match

* PR Review

* while I'm here

* mask reaction

* small fix

* Small cleanup

* oops
This commit is contained in:
engineer124 2024-01-09 09:17:22 +11:00 committed by GitHub
parent c1a499c3ae
commit e146d7bc26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 302 additions and 125 deletions

View File

@ -775,7 +775,7 @@ void SfxSource_UpdateAll(PlayState* play);
void SfxSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 duration, u16 sfxId);
u16 QuestHint_GetSariaTextId(PlayState* play);
u16 QuestHint_GetNaviTextId(PlayState* play);
u16 Text_GetFaceReaction(PlayState* play, u32 reactionSet);
u16 MaskReaction_GetTextId(PlayState* play, u32 maskReactionSet);
void CutsceneFlags_UnsetAll(PlayState* play);
void CutsceneFlags_Set(PlayState* play, s16 flag);
void CutsceneFlags_Unset(PlayState* play, s16 flag);

View File

@ -82,6 +82,70 @@ typedef enum {
/* 0x37 */ MSGMODE_PAUSED // Causes the message system to do nothing until external code sets a new message mode or calls a public function
} MessageMode;
typedef enum MaskReactionSet {
/* 0x00 */ MASK_REACTION_SET_CARPENTER_BOSS,
/* 0x01 */ MASK_REACTION_SET_CARPENTER_1,
/* 0x02 */ MASK_REACTION_SET_CARPENTER_2,
/* 0x03 */ MASK_REACTION_SET_CARPENTER_3,
/* 0x04 */ MASK_REACTION_SET_CARPENTER_4,
/* 0x05 */ MASK_REACTION_SET_HYRULIAN_GUARD,
/* 0x06 */ MASK_REACTION_SET_HEISHI4_1,
/* 0x07 */ MASK_REACTION_SET_HEISHI4_2,
/* 0x08 */ MASK_REACTION_SET_CUCCO_LADY,
/* 0x09 */ MASK_REACTION_SET_CARPENTERS_SON,
/* 0x0A */ MASK_REACTION_SET_KAKARIKO_ROOF_MAN,
/* 0x0B */ MASK_REACTION_SET_WINDMILL_MAN,
/* 0x0C */ MASK_REACTION_SET_12, // Unused
/* 0x0D */ MASK_REACTION_SET_CURSED_SKULLTULA_MAN,
/* 0x0E */ MASK_REACTION_SET_DAMPE,
/* 0x0F */ MASK_REACTION_SET_GRAVEYARD_KID,
/* 0x10 */ MASK_REACTION_SET_SARIA,
/* 0x11 */ MASK_REACTION_SET_MIDO,
/* 0x12 */ MASK_REACTION_SET_FADO,
/* 0x13 */ MASK_REACTION_SET_KOKIRI_1,
/* 0x14 */ MASK_REACTION_SET_KOKIRI_2,
/* 0x15 */ MASK_REACTION_SET_SKULL_KID,
/* 0x16 */ MASK_REACTION_SET_ZELDA,
/* 0x17 */ MASK_REACTION_SET_MALON,
/* 0x18 */ MASK_REACTION_SET_TALON,
/* 0x19 */ MASK_REACTION_SET_INGO,
/* 0x1A */ MASK_REACTION_SET_LAKESIDE_PROFESSOR,
/* 0x1B */ MASK_REACTION_SET_MAGIC_BEAN_SALESMAN,
/* 0x1C */ MASK_REACTION_SET_RUNNING_MAN,
/* 0x1D */ MASK_REACTION_SET_ZORA,
/* 0x1E */ MASK_REACTION_SET_KING_ZORA,
/* 0x1F */ MASK_REACTION_SET_RUTO,
/* 0x20 */ MASK_REACTION_SET_GORON,
/* 0x21 */ MASK_REACTION_SET_DARUNIA,
/* 0x22 */ MASK_REACTION_SET_GERUDO_WHITE,
/* 0x23 */ MASK_REACTION_SET_NABOORU,
/* 0x24 */ MASK_REACTION_SET_DANCING_COUPLE,
/* 0x25 */ MASK_REACTION_SET_37, // ENHY_TYPE_AOB
/* 0x26 */ MASK_REACTION_SET_38, // ENHY_TYPE_COB
/* 0x27 */ MASK_REACTION_SET_39, // ENHY_TYPE_AHG_2
/* 0x28 */ MASK_REACTION_SET_40, // ENHY_TYPE_BOJ_3
/* 0x29 */ MASK_REACTION_SET_41, // ENHY_TYPE_AHG_4
/* 0x2A */ MASK_REACTION_SET_42, // ENHY_TYPE_BOJ_5
/* 0x2B */ MASK_REACTION_SET_43, // ENHY_TYPE_BBA
/* 0x2C */ MASK_REACTION_SET_44, // ENHY_TYPE_BJI_7
/* 0x2D */ MASK_REACTION_SET_45, // ENHY_TYPE_CNE_8
/* 0x2E */ MASK_REACTION_SET_46, // ENHY_TYPE_BOJ_9
/* 0x2F */ MASK_REACTION_SET_47, // ENHY_TYPE_BOJ_10
/* 0x30 */ MASK_REACTION_SET_48, // ENHY_TYPE_CNE_11
/* 0x31 */ MASK_REACTION_SET_49, // ENHY_TYPE_BOJ_12
/* 0x32 */ MASK_REACTION_SET_50, // ENHY_TYPE_AHG_13
/* 0x33 */ MASK_REACTION_SET_51, // ENHY_TYPE_BOJ_14
/* 0x34 */ MASK_REACTION_SET_52, // ENHY_TYPE_BJI_15
/* 0x35 */ MASK_REACTION_SET_53, // ENHY_TYPE_BOJ_16
/* 0x36 */ MASK_REACTION_SET_54, // ENHY_TYPE_AHG_17
/* 0x37 */ MASK_REACTION_SET_55, // ENHY_TYPE_BOB_18
/* 0x38 */ MASK_REACTION_SET_56, // ENHY_TYPE_BJI_19
/* 0x39 */ MASK_REACTION_SET_57, // ENHY_TYPE_AHG_20
/* 0x3A */ MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_1,
/* 0x3B */ MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_2,
/* 0x3C */ MASK_REACTION_SET_MAX
} MaskReactionSet;
typedef enum {
/* 0 */ TEXT_STATE_NONE,
/* 1 */ TEXT_STATE_DONE_HAS_NEXT,

View File

@ -1,70 +1,189 @@
#include "global.h"
u16 sReactionTextIds[][PLAYER_MASK_MAX] = {
u16 sMaskReactionSetTextIds[MASK_REACTION_SET_MAX][PLAYER_MASK_MAX] = {
// MASK_REACTION_SET_CARPENTER_BOSS
{ 0x0000, 0x7124, 0x7127, 0x7126, 0x7125, 0x7127, 0x7124, 0x7125, 0x7127 },
// MASK_REACTION_SET_CARPENTER_1
{ 0x0000, 0x7128, 0x7129, 0x7128, 0x7128, 0x7128, 0x7128, 0x712A, 0x712B },
// MASK_REACTION_SET_CARPENTER_2
{ 0x0000, 0x7128, 0x712B, 0x7128, 0x7128, 0x7129, 0x7128, 0x712B, 0x7128 },
// MASK_REACTION_SET_CARPENTER_3
{ 0x0000, 0x7128, 0x7129, 0x7128, 0x7128, 0x7128, 0x7128, 0x712A, 0x712B },
// MASK_REACTION_SET_CARPENTER_4
{ 0x0000, 0x7128, 0x7129, 0x712B, 0x7128, 0x7128, 0x7128, 0x7129, 0x7128 },
// MASK_REACTION_SET_HYRULIAN_GUARD
{ 0x0000, 0x712D, 0x712D, 0x712D, 0x712D, 0x712D, 0x712D, 0x712D, 0x712F },
// MASK_REACTION_SET_HEISHI4_1
{ 0x0000, 0x712C, 0x712C, 0x712C, 0x712E, 0x712C, 0x712C, 0x712F, 0x712F },
// MASK_REACTION_SET_HEISHI4_2
{ 0x0000, 0x712C, 0x712C, 0x712C, 0x712F, 0x712C, 0x712C, 0x712F, 0x712F },
// MASK_REACTION_SET_CUCCO_LADY
{ 0x0000, 0x7130, 0x7132, 0x7133, 0x7130, 0x7130, 0x7131, 0x7132, 0x7131 },
// MASK_REACTION_SET_CARPENTERS_SON
{ 0x0000, 0x7134, 0x7137, 0x7135, 0x7134, 0x7136, 0x7135, 0x7134, 0x7135 },
// MASK_REACTION_SET_KAKARIKO_ROOF_MAN
{ 0x0000, 0x7138, 0x713A, 0x7138, 0x7139, 0x713A, 0x7138, 0x7139, 0x713B },
// MASK_REACTION_SET_WINDMILL_MAN
{ 0x0000, 0x7144, 0x7146, 0x7144, 0x7146, 0x7147, 0x7145, 0x7145, 0x7147 },
// MASK_REACTION_SET_12
{ 0x0000, 0x7148, 0x7149, 0x7149, 0x714A, 0x714A, 0x714B, 0x7149, 0x714B },
// MASK_REACTION_SET_CURSED_SKULLTULA_MAN
{ 0x0000, 0x714C, 0x714D, 0x714C, 0x714C, 0x714E, 0x714C, 0x714E, 0x714F },
// MASK_REACTION_SET_DAMPE
{ 0x0000, 0x7150, 0x7153, 0x7152, 0x7150, 0x7151, 0x7153, 0x7153, 0x7151 },
// MASK_REACTION_SET_GRAVEYARD_KID
{ 0x0000, 0x7155, 0x7156, 0x7157, 0x7154, 0x7156, 0x7156, 0x7156, 0x7156 },
// MASK_REACTION_SET_SARIA
{ 0x0000, 0x715A, 0x7159, 0x715B, 0x715A, 0x715A, 0x7158, 0x7158, 0x715B },
// MASK_REACTION_SET_MIDO
{ 0x0000, 0x715E, 0x715D, 0x715D, 0x715F, 0x715E, 0x715C, 0x715C, 0x715D },
// MASK_REACTION_SET_FADO
{ 0x0000, 0x7163, 0x7162, 0x7160, 0x7163, 0x7160, 0x7161, 0x7161, 0x7160 },
// MASK_REACTION_SET_KOKIRI_1
{ 0x0000, 0x7164, 0x7166, 0x7164, 0x7167, 0x7164, 0x7164, 0x7164, 0x7167 },
// MASK_REACTION_SET_KOKIRI_2
{ 0x0000, 0x716B, 0x7169, 0x7168, 0x716B, 0x716A, 0x716B, 0x716B, 0x716A },
// MASK_REACTION_SET_SKULL_KID
{ 0x0000, 0x716C, 0x716D, 0x716F, 0x716C, 0x716E, 0x716E, 0x716E, 0x716F },
// MASK_REACTION_SET_ZELDA
{ 0x0000, 0x7171, 0x7173, 0x7170, 0x7172, 0x0000, 0x0000, 0x0000, 0x0000 },
// MASK_REACTION_SET_MALON
{ 0x0000, 0x7176, 0x7177, 0x7174, 0x7174, 0x7175, 0x7174, 0x7174, 0x7177 },
// MASK_REACTION_SET_TALON
{ 0x0000, 0x7178, 0x7179, 0x7179, 0x717B, 0x717A, 0x717B, 0x717A, 0x717B },
// MASK_REACTION_SET_INGO
{ 0x0000, 0x717D, 0x717C, 0x717C, 0x717D, 0x717F, 0x717C, 0x717E, 0x717D },
// MASK_REACTION_SET_LAKESIDE_PROFESSOR
{ 0x0000, 0x7183, 0x7181, 0x7180, 0x7183, 0x7182, 0x7183, 0x7181, 0x7183 },
// MASK_REACTION_SET_MAGIC_BEAN_SALESMAN
{ 0x0000, 0x7184, 0x7186, 0x7185, 0x7186, 0x7184, 0x7187, 0x7186, 0x7184 },
// MASK_REACTION_SET_RUNNING_MAN
{ 0x0000, 0x71A4, 0x71A6, 0x71A5, 0x0000, 0x71A6, 0x71A6, 0x71A6, 0x71A7 },
// MASK_REACTION_SET_ZORA
{ 0x0000, 0x7188, 0x7188, 0x7189, 0x7188, 0x7189, 0x718B, 0x718A, 0x7189 },
// MASK_REACTION_SET_KING_ZORA
{ 0x0000, 0x718C, 0x718C, 0x718D, 0x718C, 0x718E, 0x718F, 0x718D, 0x718C },
// MASK_REACTION_SET_RUTO
{ 0x0000, 0x7190, 0x7190, 0x7191, 0x7192, 0x7191, 0x7193, 0x7190, 0x7191 },
// MASK_REACTION_SET_GORON
{ 0x0000, 0x7196, 0x7194, 0x7195, 0x7196, 0x7197, 0x7194, 0x7196, 0x7195 },
// MASK_REACTION_SET_DARUNIA
{ 0x0000, 0x7199, 0x719A, 0x7198, 0x7198, 0x719A, 0x719A, 0x719B, 0x7198 },
// MASK_REACTION_SET_GERUDO_WHITE
{ 0x0000, 0x719D, 0x719C, 0x719E, 0x719D, 0x719D, 0x719C, 0x719F, 0x719E },
// MASK_REACTION_SET_NABOORU
{ 0x0000, 0x71A1, 0x71A0, 0x71A1, 0x71A2, 0x71A1, 0x71A2, 0x71A3, 0x71A2 },
// MASK_REACTION_SET_DANCING_COUPLE
{ 0x0000, 0x711C, 0x711E, 0x711C, 0x711F, 0x711E, 0x711C, 0x711D, 0x711F },
// MASK_REACTION_SET_37
{ 0x0000, 0x7104, 0x7105, 0x7107, 0x7107, 0x7105, 0x7106, 0x7107, 0x7107 },
// MASK_REACTION_SET_38
{ 0x0000, 0x7107, 0x7105, 0x7107, 0x7107, 0x7106, 0x7107, 0x7107, 0x7105 },
// MASK_REACTION_SET_39
{ 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 },
// MASK_REACTION_SET_40
{ 0x0000, 0x7113, 0x7113, 0x7113, 0x7113, 0x7113, 0x7113, 0x7111, 0x7113 },
// MASK_REACTION_SET_41
{ 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 },
// MASK_REACTION_SET_42
{ 0x0000, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7113 },
// MASK_REACTION_SET_43
{ 0x0000, 0x7101, 0x7100, 0x7102, 0x7103, 0x7101, 0x7100, 0x7102, 0x7103 },
// MASK_REACTION_SET_44
{ 0x0000, 0x7100, 0x7102, 0x7100, 0x7100, 0x7100, 0x7100, 0x7100, 0x7102 },
// MASK_REACTION_SET_45
{ 0x0000, 0x710A, 0x7109, 0x7109, 0x710A, 0x710B, 0x7108, 0x7109, 0x710B },
// MASK_REACTION_SET_46
{ 0x0000, 0x7117, 0x7112, 0x7113, 0x7110, 0x710C, 0x7117, 0x710E, 0x7112 },
// MASK_REACTION_SET_47
{ 0x0000, 0x710D, 0x710F, 0x710C, 0x7112, 0x710D, 0x710C, 0x710C, 0x710F },
// MASK_REACTION_SET_48
{ 0x0000, 0x710A, 0x7109, 0x711A, 0x710A, 0x7109, 0x7108, 0x710B, 0x7109 },
// MASK_REACTION_SET_49
{ 0x0000, 0x710C, 0x710F, 0x7113, 0x7110, 0x710D, 0x7112, 0x7116, 0x710D },
// MASK_REACTION_SET_50
{ 0x0000, 0x7115, 0x7114, 0x7114, 0x7115, 0x7114, 0x7114, 0x7116, 0x7117 },
// MASK_REACTION_SET_51
{ 0x0000, 0x7113, 0x710F, 0x7113, 0x7110, 0x710C, 0x711A, 0x710D, 0x7112 },
// MASK_REACTION_SET_52
{ 0x0000, 0x7101, 0x7102, 0x7103, 0x7101, 0x7100, 0x7100, 0x7102, 0x7100 },
// MASK_REACTION_SET_53
{ 0x0000, 0x7112, 0x710E, 0x7112, 0x710E, 0x710D, 0x7112, 0x710E, 0x710F },
// MASK_REACTION_SET_54
{ 0x0000, 0x7142, 0x7141, 0x7142, 0x7143, 0x7140, 0x7140, 0x7141, 0x7143 },
// MASK_REACTION_SET_55
{ 0x0000, 0x713C, 0x713D, 0x713D, 0x713E, 0x713E, 0x713F, 0x713D, 0x713F },
// MASK_REACTION_SET_56
{ 0x0000, 0x7101, 0x7102, 0x7103, 0x7101, 0x7100, 0x7100, 0x7102, 0x7100 },
// MASK_REACTION_SET_57
{ 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 },
// MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_1
{ 0x0000, 0x7104, 0x7105, 0x7107, 0x7105, 0x7105, 0x7105, 0x7107, 0x7107 },
// MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_2
{ 0x0000, 0x7104, 0x7105, 0x7107, 0x7105, 0x710C, 0x7105, 0x7107, 0x7107 },
};
u16 Text_GetFaceReaction(PlayState* play, u32 reactionSet) {
u16 MaskReaction_GetTextId(PlayState* play, u32 maskReactionSet) {
u8 currentMask = Player_GetMask(play);
return sReactionTextIds[reactionSet][currentMask];
return sMaskReactionSetTextIds[maskReactionSet][currentMask];
}

View File

@ -137,7 +137,7 @@ void func_809B05F0(EnAni* this, PlayState* play) {
}
void func_809B064C(EnAni* this, PlayState* play) {
u16 textId = Text_GetFaceReaction(play, 0xA);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_KAKARIKO_ROOF_MAN);
s16 yawDiff;
if (textId == 0) {

View File

@ -206,9 +206,9 @@ s32 EnCs_GetTalkState(EnCs* this, PlayState* play) {
return talkState;
}
s32 EnCs_GetTextID(EnCs* this, PlayState* play) {
s32 EnCs_GetTextId(EnCs* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 textId = Text_GetFaceReaction(play, 15);
s32 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_GRAVEYARD_KID);
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
if (textId == 0) {
@ -253,8 +253,8 @@ void EnCs_HandleTalking(EnCs* this, PlayState* play) {
Actor_GetScreenPos(play, &this->actor, &sp2A, &sp28);
if ((sp2A >= 0) && (sp2A <= 320) && (sp28 >= 0) && (sp28 <= 240) &&
(Actor_OfferTalk(&this->actor, play, 100.0f))) {
this->actor.textId = EnCs_GetTextID(this, play);
Actor_OfferTalk(&this->actor, play, 100.0f)) {
this->actor.textId = EnCs_GetTextId(this, play);
}
}
}

View File

@ -226,7 +226,12 @@ s32 EnDaikuKakariko_GetTalkState(EnDaikuKakariko* this, PlayState* play) {
}
void EnDaikuKakariko_HandleTalking(EnDaikuKakariko* this, PlayState* play) {
static s32 maskReactionSets[] = { 1, 2, 3, 4 };
static s32 sMaskReactionSets[] = {
MASK_REACTION_SET_CARPENTER_1,
MASK_REACTION_SET_CARPENTER_2,
MASK_REACTION_SET_CARPENTER_3,
MASK_REACTION_SET_CARPENTER_4,
};
s16 sp26;
s16 sp24;
@ -239,7 +244,7 @@ void EnDaikuKakariko_HandleTalking(EnDaikuKakariko* this, PlayState* play) {
if ((sp26 >= 0) && (sp26 <= 320) && (sp24 >= 0) && (sp24 <= 240) && (this->talkState == 0) &&
(Actor_OfferTalk(&this->actor, play, 100.0f) == 1)) {
this->actor.textId = Text_GetFaceReaction(play, maskReactionSets[this->actor.params & 3]);
this->actor.textId = MaskReaction_GetTextId(play, sMaskReactionSets[this->actor.params & 3]);
if (this->actor.textId == 0) {
switch (this->actor.params & 3) {

View File

@ -199,8 +199,8 @@ void EnDivingGame_Talk(EnDivingGame* this, PlayState* play) {
}
}
} else {
if (Text_GetFaceReaction(play, 0x1D) != 0) {
this->actor.textId = Text_GetFaceReaction(play, 0x1D);
if (MaskReaction_GetTextId(play, MASK_REACTION_SET_ZORA) != 0) {
this->actor.textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_ZORA);
this->unk_292 = TEXT_STATE_DONE;
} else {
switch (this->state) {

View File

@ -97,10 +97,10 @@ void EnDu_SetupAction(EnDu* this, EnDuActionFunc actionFunc) {
}
u16 EnDu_GetTextId(PlayState* play, Actor* actor) {
u16 reaction = Text_GetFaceReaction(play, 0x21);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_DARUNIA);
if (reaction != 0) {
return reaction;
if (textId != 0) {
return textId;
}
if (CUR_UPG_VALUE(UPG_STRENGTH) != 0) {
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {

View File

@ -100,14 +100,14 @@ void EnFu_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->collider);
}
s32 func_80A1D94C(EnFu* this, PlayState* play, u16 textID, EnFuActionFunc actionFunc) {
s32 func_80A1D94C(EnFu* this, PlayState* play, u16 textId, EnFuActionFunc actionFunc) {
s16 yawDiff;
if (Actor_TalkOfferAccepted(&this->actor, play)) {
this->actionFunc = actionFunc;
return true;
}
this->actor.textId = textID;
this->actor.textId = textId;
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
if ((ABS(yawDiff) < 0x2301) && (this->actor.xzDistToPlayer < 100.0f)) {
@ -131,16 +131,16 @@ void func_80A1DA04(EnFu* this, PlayState* play) {
}
void EnFu_WaitChild(EnFu* this, PlayState* play) {
u16 textID = Text_GetFaceReaction(play, 0xB);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_WINDMILL_MAN);
if (textID == 0) {
textID = GET_EVENTCHKINF(EVENTCHKINF_67) ? 0x5033 : 0x5032;
if (textId == 0) {
textId = GET_EVENTCHKINF(EVENTCHKINF_67) ? 0x5033 : 0x5032;
}
// if ACTOR_FLAG_TALK is set and textID is 0x5033, change animation
// if ACTOR_FLAG_TALK is set and textId is 0x5033, change animation
// if func_80A1D94C returns 1, actionFunc is set to func_80A1DA04
if (func_80A1D94C(this, play, textID, func_80A1DA04)) {
if (textID == 0x5033) {
if (func_80A1D94C(this, play, textId, func_80A1DA04)) {
if (textId == 0x5033) {
Animation_Change(&this->skelanime, &gWindmillManPlayAndMoveHeadAnim, 1.0f, 0.0f,
Animation_GetLastFrame(&gWindmillManPlayAndMoveHeadAnim), ANIMMODE_ONCE, -4.0f);
}

View File

@ -304,13 +304,13 @@ void EnGe1_WatchForAndSensePlayer(EnGe1* this, PlayState* play) {
}
void EnGe1_GetReaction_ValleyFloor(EnGe1* this, PlayState* play) {
u16 reactionText = Text_GetFaceReaction(play, 0x22);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_GERUDO_WHITE);
if (reactionText == 0) {
reactionText = 0x6019;
if (textId == 0) {
textId = 0x6019;
}
EnGe1_SetTalkAction(this, play, reactionText, 100.0f, EnGe1_ChooseActionFromTextId);
EnGe1_SetTalkAction(this, play, textId, 100.0f, EnGe1_ChooseActionFromTextId);
}
// Gerudo Training Ground Guard functions
@ -463,15 +463,13 @@ void EnGe1_Talk_GateGuard(EnGe1* this, PlayState* play) {
}
void EnGe1_GetReaction_GateGuard(EnGe1* this, PlayState* play) {
u16 reactionText;
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_GERUDO_WHITE);
reactionText = Text_GetFaceReaction(play, 0x22);
if (reactionText == 0) {
reactionText = 0x6069;
if (textId == 0) {
textId = 0x6069;
}
if (EnGe1_SetTalkAction(this, play, reactionText, 100.0f, EnGe1_Talk_GateGuard)) {
if (EnGe1_SetTalkAction(this, play, textId, 100.0f, EnGe1_Talk_GateGuard)) {
this->animFunc = EnGe1_CueUpAnimation;
this->animation = &gGerudoWhiteDismissiveAnim;
Animation_Change(&this->skelAnime, &gGerudoWhiteDismissiveAnim, 1.0f, 0.0f,

View File

@ -736,10 +736,10 @@ s16 EnGo2_UpdateTalkStateGoronDmtFairyHint(PlayState* play, EnGo2* this) {
u16 EnGo2_GetTextId(PlayState* play, Actor* thisx) {
EnGo2* this = (EnGo2*)thisx;
u16 faceReaction = Text_GetFaceReaction(play, 0x20);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_GORON);
if (faceReaction != 0) {
return faceReaction;
if (textId != 0) {
return textId;
} else {
switch (this->actor.params & 0x1F) {
case GORON_CITY_ROLLING_BIG:
@ -773,7 +773,7 @@ u16 EnGo2_GetTextId(PlayState* play, Actor* thisx) {
}
}
#ifdef AVOID_UB
return faceReaction; // faceReaction is always in the v0 return value register at this point
return textId; // textId is always in the v0 return value register at this point
#endif
}

View File

@ -184,8 +184,8 @@ void func_80A531E4(EnHeishi2* this, PlayState* play) {
void func_80A53278(EnHeishi2* this, PlayState* play) {
this->unk_30B = 0;
this->unk_30E = 0;
if (Text_GetFaceReaction(play, 5) != 0) {
this->actor.textId = Text_GetFaceReaction(play, 5);
if (MaskReaction_GetTextId(play, MASK_REACTION_SET_HYRULIAN_GUARD) != 0) {
this->actor.textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_HYRULIAN_GUARD);
this->unk_30B = 1;
this->unk_300 = TEXT_STATE_DONE;
this->actionFunc = func_80A5475C;
@ -372,9 +372,9 @@ void func_80A5399C(EnHeishi2* this, PlayState* play) {
this->unk_300 = TEXT_STATE_EVENT;
this->unk_30E = 0;
}
if (Text_GetFaceReaction(play, 5) != 0) {
if (MaskReaction_GetTextId(play, MASK_REACTION_SET_HYRULIAN_GUARD) != 0) {
if (var == 0) {
this->actor.textId = Text_GetFaceReaction(play, 5);
this->actor.textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_HYRULIAN_GUARD);
this->unk_30B = 1;
this->unk_300 = TEXT_STATE_DONE;
this->unk_30E = 0;
@ -395,8 +395,8 @@ void func_80A53AD4(EnHeishi2* this, PlayState* play) {
s16 yawDiff;
SkelAnime_Update(&this->skelAnime);
if (Text_GetFaceReaction(play, 5) != 0) {
this->actor.textId = Text_GetFaceReaction(play, 5);
if (MaskReaction_GetTextId(play, MASK_REACTION_SET_HYRULIAN_GUARD) != 0) {
this->actor.textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_HYRULIAN_GUARD);
} else {
this->actor.textId = 0x200E;
}
@ -683,7 +683,7 @@ void func_80A5475C(EnHeishi2* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
if (Text_GetFaceReaction(play, 5) != 0) {
if (MaskReaction_GetTextId(play, MASK_REACTION_SET_HYRULIAN_GUARD) != 0) {
if (this->unk_30B == 0) {
if (this->type == 2) {
this->actionFunc = func_80A53278;

View File

@ -33,7 +33,7 @@ ActorInit En_Heishi4_InitVars = {
/**/ EnHeishi4_Draw,
};
static u32 sFaceReactionSets[] = { 6, 7 };
static u32 sMaskReactionSets[] = { MASK_REACTION_SET_HEISHI4_1, MASK_REACTION_SET_HEISHI4_2 };
static ColliderCylinderInit sCylinderInit = {
{
@ -125,8 +125,8 @@ void func_80A563BC(EnHeishi4* this, PlayState* play) {
if (reactionOffset >= 3) {
reactionOffset = 1;
}
if (Text_GetFaceReaction(play, sFaceReactionSets[reactionOffset]) != 0) {
this->actor.textId = Text_GetFaceReaction(play, sFaceReactionSets[reactionOffset]);
if (MaskReaction_GetTextId(play, sMaskReactionSets[reactionOffset]) != 0) {
this->actor.textId = MaskReaction_GetTextId(play, sMaskReactionSets[reactionOffset]);
this->unk_2B4 = 1;
this->actionFunc = func_80A56B40;
} else {
@ -185,8 +185,8 @@ void func_80A56614(EnHeishi4* this, PlayState* play) {
if (reactionOffset >= 3) {
reactionOffset = 1;
}
if (Text_GetFaceReaction(play, sFaceReactionSets[reactionOffset]) != 0) {
this->actor.textId = Text_GetFaceReaction(play, sFaceReactionSets[reactionOffset]);
if (MaskReaction_GetTextId(play, sMaskReactionSets[reactionOffset]) != 0) {
this->actor.textId = MaskReaction_GetTextId(play, sMaskReactionSets[reactionOffset]);
this->unk_2B4 = 1;
this->actionFunc = func_80A56B40;
return;
@ -300,7 +300,7 @@ void func_80A56B40(EnHeishi4* this, PlayState* play) {
if (reactionOffset >= 3) {
reactionOffset = 1;
}
if (Text_GetFaceReaction(play, sFaceReactionSets[reactionOffset]) != 0) {
if (MaskReaction_GetTextId(play, sMaskReactionSets[reactionOffset]) != 0) {
if (this->unk_2B4 == 0) {
if ((this->type == HEISHI4_AT_KAKRIKO_ENTRANCE) || (this->type == HEISHI4_AT_IMPAS_HOUSE)) {
this->actionFunc = func_80A563BC;

View File

@ -95,9 +95,8 @@ void func_80A6F164(EnHs2* this, PlayState* play) {
}
void func_80A6F1A4(EnHs2* this, PlayState* play) {
u16 textId;
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_CARPENTERS_SON);
textId = Text_GetFaceReaction(play, 9);
if (textId == 0) {
textId = 0x5069;
}

View File

@ -417,7 +417,7 @@ void func_80A6F7CC(EnHy* this, PlayState* play, s32 getItemId) {
u16 EnHy_GetTextId(PlayState* play, Actor* thisx) {
Player* player = GET_PLAYER(play);
EnHy* this = (EnHy*)thisx;
u16 textId = Text_GetFaceReaction(play, (this->actor.params & 0x7F) + 37);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_37 + (this->actor.params & 0x7F));
if (textId != 0) {
if ((this->actor.params & 0x7F) == ENHY_TYPE_BOJ_5) {

View File

@ -124,10 +124,10 @@ u16 EnIn_GetTextIdChild(PlayState* play) {
u16 EnIn_GetTextIdAdult(PlayState* play) {
Player* player = GET_PLAYER(play);
u16 faceReaction = Text_GetFaceReaction(play, 25);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_INGO);
if (faceReaction != 0) {
return faceReaction;
if (textId != 0) {
return textId;
}
if (GET_EVENTCHKINF(EVENTCHKINF_EPONA_OBTAINED)) {
if (IS_DAY) {
@ -176,10 +176,10 @@ u16 EnIn_GetTextIdAdult(PlayState* play) {
}
u16 EnIn_GetTextId(PlayState* play, Actor* thisx) {
u16 faceReaction = Text_GetFaceReaction(play, 25);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_INGO);
if (faceReaction != 0) {
return faceReaction;
if (textId != 0) {
return textId;
}
if (!LINK_IS_ADULT) {
return EnIn_GetTextIdChild(play);

View File

@ -489,23 +489,23 @@ u16 EnKo_GetTextIdAdult(PlayState* play, Actor* thisx) {
}
u16 EnKo_GetTextId(PlayState* play, Actor* thisx) {
u16 faceReaction;
u16 textId;
EnKo* this = (EnKo*)thisx;
if (ENKO_TYPE == ENKO_TYPE_CHILD_0 || ENKO_TYPE == ENKO_TYPE_CHILD_2 || ENKO_TYPE == ENKO_TYPE_CHILD_3 ||
ENKO_TYPE == ENKO_TYPE_CHILD_4 || ENKO_TYPE == ENKO_TYPE_CHILD_7 || ENKO_TYPE == ENKO_TYPE_CHILD_8 ||
ENKO_TYPE == ENKO_TYPE_CHILD_11) {
faceReaction = Text_GetFaceReaction(play, 0x13);
textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_KOKIRI_1);
}
if (ENKO_TYPE == ENKO_TYPE_CHILD_1 || ENKO_TYPE == ENKO_TYPE_CHILD_5 || ENKO_TYPE == ENKO_TYPE_CHILD_6 ||
ENKO_TYPE == ENKO_TYPE_CHILD_9 || ENKO_TYPE == ENKO_TYPE_CHILD_10) {
faceReaction = Text_GetFaceReaction(play, 0x14);
textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_KOKIRI_2);
}
if (ENKO_TYPE == ENKO_TYPE_CHILD_FADO) {
faceReaction = Text_GetFaceReaction(play, 0x12);
textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_FADO);
}
if (faceReaction != 0) {
return faceReaction;
if (textId != 0) {
return textId;
}
if (LINK_IS_ADULT) {
return EnKo_GetTextIdAdult(play, thisx);

View File

@ -102,10 +102,10 @@ u16 EnKz_GetTextIdAdult(PlayState* play, EnKz* this) {
u16 EnKz_GetTextId(PlayState* play, Actor* thisx) {
EnKz* this = (EnKz*)thisx;
u16 reactionText = Text_GetFaceReaction(play, 0x1E);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_KING_ZORA);
if (reactionText != 0) {
return reactionText;
if (textId != 0) {
return textId;
}
if (LINK_IS_ADULT) {

View File

@ -72,10 +72,10 @@ static AnimationFrameCountInfo sAnimationInfo[] = {
};
u16 EnMa1_GetTextId(PlayState* play, Actor* thisx) {
u16 faceReaction = Text_GetFaceReaction(play, 0x17);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_MALON);
if (faceReaction != 0) {
return faceReaction;
if (textId != 0) {
return textId;
}
if (CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
return 0x204A;

View File

@ -66,10 +66,10 @@ static AnimationFrameCountInfo sAnimationInfo[] = {
};
u16 EnMa2_GetTextId(PlayState* play, Actor* thisx) {
u16 faceReaction = Text_GetFaceReaction(play, 23);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_MALON);
if (faceReaction != 0) {
return faceReaction;
if (textId != 0) {
return textId;
}
if (GET_EVENTCHKINF(EVENTCHKINF_EPONA_OBTAINED)) {
return 0x2056;

View File

@ -385,10 +385,10 @@ s16 func_80AAAC78(EnMd* this, PlayState* play) {
}
u16 EnMd_GetTextIdKokiriForest(PlayState* play, EnMd* this) {
u16 reactionText = Text_GetFaceReaction(play, 0x11);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_MIDO);
if (reactionText != 0) {
return reactionText;
if (textId != 0) {
return textId;
}
this->unk_208 = 0;

View File

@ -264,7 +264,7 @@ void EnMk_Wait(EnMk* this, PlayState* play) {
}
}
} else {
this->actor.textId = Text_GetFaceReaction(play, 0x1A);
this->actor.textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_LAKESIDE_PROFESSOR);
if (this->actor.textId == 0) {
this->actor.textId = 0x4018;

View File

@ -259,9 +259,7 @@ s32 func_80AADAA0(EnMm* this, PlayState* play) {
s32 EnMm_GetTextId(EnMm* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 textId;
textId = Text_GetFaceReaction(play, 0x1C);
s32 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_RUNNING_MAN);
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
if (textId == 0) {

View File

@ -58,7 +58,7 @@ static InitChainEntry sInitChain[] = {
};
void EnMs_SetOfferText(EnMs* this, PlayState* play) {
this->actor.textId = Text_GetFaceReaction(play, 0x1B);
this->actor.textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_MAGIC_BEAN_SALESMAN);
if (this->actor.textId == 0) {
if (BEANS_BOUGHT >= 10) {
this->actor.textId = 0x406B;

View File

@ -100,10 +100,10 @@ void EnMu_Interact(EnMu* this, PlayState* play) {
u16 EnMu_GetTextId(PlayState* play, Actor* thisx) {
EnMu* this = (EnMu*)thisx;
u16 faceReaction = Text_GetFaceReaction(play, this->actor.params + 0x3A);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_1 + this->actor.params);
if (faceReaction != 0) {
return faceReaction;
if (textId != 0) {
return textId;
}
return this->defaultTextId;
}

View File

@ -1303,9 +1303,9 @@ void func_80AB3B04(EnNb* this, PlayState* play) {
this->action = NB_ACTION_30;
} else {
this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3;
this->actor.textId = Text_GetFaceReaction(play, 0x23);
this->actor.textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_NABOORU);
if ((this->actor.textId) == 0) {
if (this->actor.textId == 0) {
this->actor.textId = 0x6026;
}

View File

@ -99,7 +99,7 @@ void EnNiwLady_Destroy(Actor* thisx, PlayState* play) {
void EnNiwLady_ChoseAnimation(EnNiwLady* this, PlayState* play, s32 arg2) {
f32 frames;
if (Text_GetFaceReaction(play, 8) != 0) {
if (MaskReaction_GetTextId(play, MASK_REACTION_SET_CUCCO_LADY) != 0) {
arg2 = 8;
}
if (arg2 != this->unk_270) {
@ -241,8 +241,8 @@ void func_80ABA244(EnNiwLady* this, PlayState* play) {
phi_s1 = 9;
}
this->actor.textId = sMissingCuccoTextIds[phi_s1];
if (Text_GetFaceReaction(play, 8) != 0) {
this->actor.textId = Text_GetFaceReaction(play, 8);
if (MaskReaction_GetTextId(play, MASK_REACTION_SET_CUCCO_LADY) != 0) {
this->actor.textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_CUCCO_LADY);
this->unk_262 = TEXT_STATE_DONE;
}
if ((this->unk_26C != 0) && (phi_s1 != 9)) {
@ -258,7 +258,7 @@ void func_80ABA244(EnNiwLady* this, PlayState* play) {
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ this->actor.talk_message ☆☆ %x\n" VT_RST, this->actor.textId);
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ this->message_end_code ☆☆ %d\n" VT_RST, this->unk_262);
osSyncPrintf("\n\n");
if (Text_GetFaceReaction(play, 8) == 0) {
if (MaskReaction_GetTextId(play, MASK_REACTION_SET_CUCCO_LADY) == 0) {
if (this->actor.textId == 0x503C) {
Sfx_PlaySfxCentered(NA_SE_SY_ERROR);
this->unk_26C = 2;
@ -476,8 +476,8 @@ void func_80ABAD38(EnNiwLady* this, PlayState* play) {
void func_80ABAD7C(EnNiwLady* this, PlayState* play) {
this->actor.textId = 0x503D;
if (Text_GetFaceReaction(play, 8) != 0) {
this->actor.textId = Text_GetFaceReaction(play, 8);
if (MaskReaction_GetTextId(play, MASK_REACTION_SET_CUCCO_LADY) != 0) {
this->actor.textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_CUCCO_LADY);
}
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) || (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE)) {
this->unk_26E = 8;

View File

@ -2128,7 +2128,7 @@ void func_80AEFD38(EnRu1* this, PlayState* play) {
s32 func_80AEFDC0(EnRu1* this, PlayState* play) {
if (!Actor_TalkOfferAccepted(&this->actor, play)) {
this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3;
this->actor.textId = Text_GetFaceReaction(play, 0x1F);
this->actor.textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_RUTO);
if (this->actor.textId == 0) {
this->actor.textId = 0x402C;
}

View File

@ -138,10 +138,10 @@ s16 func_80AF5560(EnSa* this, PlayState* play) {
u16 EnSa_GetTextId(PlayState* play, Actor* thisx) {
EnSa* this = (EnSa*)thisx;
u16 reaction = Text_GetFaceReaction(play, 0x10);
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_SARIA);
if (reaction != 0) {
return reaction;
if (textId != 0) {
return textId;
}
if (CHECK_QUEST_ITEM(QUEST_SONG_SARIA)) {
return 0x10AD;

View File

@ -927,7 +927,7 @@ void EnSkj_WaitInRange(EnSkj* this, PlayState* play) {
player->stateFlags2 |= PLAYER_STATE2_23;
if (GET_ITEMGETINF(ITEMGETINF_16)) {
if (GET_ITEMGETINF(ITEMGETINF_39)) {
this->textId = Text_GetFaceReaction(play, 0x15);
this->textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_SKULL_KID);
if (this->textId == 0) {
this->textId = 0x1020;
}
@ -936,7 +936,7 @@ void EnSkj_WaitInRange(EnSkj* this, PlayState* play) {
} else if (Player_GetMask(play) == PLAYER_MASK_SKULL) {
this->textId = 0x101B;
} else {
this->textId = Text_GetFaceReaction(play, 0x15);
this->textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_SKULL_KID);
}
Actor_OfferTalk(&this->actor, play, EnSkj_GetItemXzRange(this));
}

View File

@ -694,7 +694,7 @@ void EnSsh_Idle(EnSsh* this, PlayState* play) {
}
EnSsh_Bob(this, play);
if ((this->unkTimer == 0) && (this->animTimer == 0)) {
this->actor.textId = Text_GetFaceReaction(play, 0xD);
this->actor.textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_CURSED_SKULLTULA_MAN);
if (this->actor.textId == 0) {
if (this->actor.params == ENSSH_FATHER) {
if (gSaveContext.save.info.inventory.gsTokens >= 50) {

View File

@ -21,8 +21,6 @@
#define TALON_STATE_FLAG_RAISING_HANDS (1 << 8)
#define TALON_STATE_FLAG_RESTORE_BGM_ON_DESTROY (1 << 9)
#define TALON_FACE_REACTION_SET 24
typedef enum {
/* 0 */ TALON_EYE_INDEX_OPEN,
/* 1 */ TALON_EYE_INDEX_HALF,
@ -97,7 +95,7 @@ void EnTa_SetupAction(EnTa* this, EnTaActionFunc actionFunc, EnTaAnimFunc animFu
}
void EnTa_SetTextForTalkInLonLonHouse(EnTa* this, PlayState* play) {
u16 faceReaction = Text_GetFaceReaction(play, TALON_FACE_REACTION_SET);
u16 maskReactionTextId = MaskReaction_GetTextId(play, MASK_REACTION_SET_TALON);
// Check if cucco game was just finished
if (GET_EVENTINF(EVENTINF_CUCCO_GAME_FINISHED)) {
@ -115,7 +113,7 @@ void EnTa_SetTextForTalkInLonLonHouse(EnTa* this, PlayState* play) {
this->actor.textId = 0x2085;
}
CLEAR_EVENTINF(EVENTINF_CUCCO_GAME_WON);
} else if (faceReaction == 0) {
} else if (maskReactionTextId == 0) {
if (GET_INFTABLE(INFTABLE_TALKED_TO_TALON_IN_RANCH_HOUSE)) {
if (GET_ITEMGETINF(ITEMGETINF_TALON_BOTTLE)) {
// Play cucco game or buy milk
@ -129,7 +127,7 @@ void EnTa_SetTextForTalkInLonLonHouse(EnTa* this, PlayState* play) {
this->actor.textId = 0x207E;
}
} else {
this->actor.textId = faceReaction;
this->actor.textId = maskReactionTextId;
}
}
@ -1086,14 +1084,14 @@ void EnTa_TalkAfterCuccoGameWon(EnTa* this, PlayState* play) {
}
void EnTa_IdleSittingInLonLonHouse(EnTa* this, PlayState* play) {
u16 faceReaction = Text_GetFaceReaction(play, TALON_FACE_REACTION_SET);
u16 maskReactionTextId = MaskReaction_GetTextId(play, MASK_REACTION_SET_TALON);
EnTa_SetTextForTalkInLonLonHouse(this, play);
if (EnTa_RequestTalk(this, play, this->actor.textId)) {
Actor_PlaySfx(&this->actor, NA_SE_VO_TA_SURPRISE);
if (faceReaction != 0) {
if (maskReactionTextId != 0) {
EnTa_SetupActionWithWakeUpAnimation(this, EnTa_TalkGeneralInLonLonHouse);
} else {
SET_INFTABLE(INFTABLE_TALKED_TO_TALON_IN_RANCH_HOUSE);

View File

@ -52,13 +52,11 @@ ActorInit En_Tg_InitVars = {
u16 EnTg_GetTextId(PlayState* play, Actor* thisx) {
EnTg* this = (EnTg*)thisx;
u16 faceReaction;
u16 maskReactionTextId = MaskReaction_GetTextId(play, MASK_REACTION_SET_DANCING_COUPLE);
u32 textId;
// If the player is wearing a mask, return a special reaction text
faceReaction = Text_GetFaceReaction(play, 0x24);
if (faceReaction != 0) {
return faceReaction;
if (maskReactionTextId != 0) {
return maskReactionTextId;
}
if (play->sceneId == SCENE_KAKARIKO_VILLAGE) {
if (this->nextDialogue % 2 != 0) {

View File

@ -330,11 +330,10 @@ s32 EnTk_Orient(EnTk* this, PlayState* play) {
}
u16 EnTk_GetTextId(PlayState* play, Actor* thisx) {
u16 faceReaction;
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_DAMPE);
faceReaction = Text_GetFaceReaction(play, 14);
if (faceReaction != 0) {
return faceReaction;
if (textId != 0) {
return textId;
}
if (GET_INFTABLE(INFTABLE_D9)) {

View File

@ -253,7 +253,7 @@ u32 EnToryo_ReactToExchangeItem(EnToryo* this, PlayState* play) {
}
s32 EnToryo_GetTextId(EnToryo* this, PlayState* play) {
s32 textId = Text_GetFaceReaction(play, 0);
s32 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_CARPENTER_BOSS);
s32 ret = textId;
if (textId == 0) {

View File

@ -199,12 +199,12 @@ void EnZl4_SetActiveCamMove(PlayState* play, s16 index) {
}
u16 EnZl4_GetTextId(PlayState* play, Actor* thisx) {
u16 faceReaction = Text_GetFaceReaction(play, 22);
u16 maskReactionTextId = MaskReaction_GetTextId(play, MASK_REACTION_SET_ZELDA);
u16 stoneCount;
s16 textId;
if (faceReaction != 0) {
return faceReaction;
if (maskReactionTextId != 0) {
return maskReactionTextId;
}
stoneCount = 0;

View File

@ -357,11 +357,10 @@ void EnZo_SpawnSplashes(EnZo* this) {
}
u16 EnZo_GetTextId(PlayState* play, Actor* thisx) {
u16 faceReaction;
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_ZORA);
faceReaction = Text_GetFaceReaction(play, 29);
if (faceReaction != 0) {
return faceReaction;
if (textId != 0) {
return textId;
}
switch (thisx->params & 0x3F) {