diff options
| -rw-r--r-- | include/z64save.h | 4 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_En_Gb2/z_en_gb2.c | 144 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_En_Gb2/z_en_gb2.h | 2 | ||||
| -rw-r--r-- | tools/disasm/n64-jp-1.1/functions.txt | 2 | ||||
| -rw-r--r-- | tools/disasm/n64-us/functions.txt | 2 | ||||
| -rw-r--r-- | tools/overlayhelpers/mscriptdis.py | 4 | ||||
| -rwxr-xr-x | tools/weekeventregconvert.py | 4 |
7 files changed, 83 insertions, 79 deletions
diff --git a/include/z64save.h b/include/z64save.h index e49828713..36e7f24aa 100644 --- a/include/z64save.h +++ b/include/z64save.h @@ -1387,8 +1387,8 @@ typedef enum { #define WEEKEVENTREG_80_08 PACK_WEEKEVENTREG_FLAG(80, 0x08) #define WEEKEVENTREG_RECEIVED_PRIORITY_MAIL PACK_WEEKEVENTREG_FLAG(80, 0x10) -#define WEEKEVENTREG_80_20 PACK_WEEKEVENTREG_FLAG(80, 0x20) -#define WEEKEVENTREG_80_40 PACK_WEEKEVENTREG_FLAG(80, 0x40) +#define WEEKEVENTREG_TALKED_TO_CANYON_GUARD_WITH_NO_MASK PACK_WEEKEVENTREG_FLAG(80, 0x20) +#define WEEKEVENTREG_TALKED_TO_CANYON_GUARD_WITH_CAPTAINS_HAT PACK_WEEKEVENTREG_FLAG(80, 0x40) #define WEEKEVENTREG_80_80 PACK_WEEKEVENTREG_FLAG(80, 0x80) #define WEEKEVENTREG_81_01 PACK_WEEKEVENTREG_FLAG(81, 0x01) #define WEEKEVENTREG_81_02 PACK_WEEKEVENTREG_FLAG(81, 0x02) diff --git a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c index ccd31f2e8..18f293758 100644 --- a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c +++ b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c @@ -120,9 +120,9 @@ s32 func_80B0F660(EnGb2* this, PlayState* play) { void func_80B0F6DC(EnGb2* this) { if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_54_20)) { SET_WEEKEVENTREG(WEEKEVENTREG_54_20); - this->unk_26E = 0x14D0; + this->textId = 0x14D0; } else { - this->unk_26E = 0x14D1; + this->textId = 0x14D1; } this->unk_288 = 30; this->actionFunc = func_80B0FEBC; @@ -131,7 +131,7 @@ void func_80B0F6DC(EnGb2* this) { void func_80B0F728(EnGb2* this, PlayState* play) { if (CHECK_EVENTINF(EVENTINF_44)) { func_80B0FBF0(this, play); - this->unk_26E = 0x14E1; + this->textId = 0x14E1; if (CHECK_EVENTINF(EVENTINF_47)) { this->unk_288 = 10; } else { @@ -139,10 +139,10 @@ void func_80B0F728(EnGb2* this, PlayState* play) { } } else if (CHECK_EVENTINF(EVENTINF_45)) { func_80B0FBF0(this, play); - this->unk_26E = 0x14E0; + this->textId = 0x14E0; this->unk_26C |= 2; } else { - this->unk_26E = 0x14DC; + this->textId = 0x14DC; } CLEAR_EVENTINF(EVENTINF_44); @@ -152,7 +152,7 @@ void func_80B0F728(EnGb2* this, PlayState* play) { } u16 func_80B0F7FC(EnGb2* this) { - switch (this->unk_26E) { + switch (this->textId) { case 0x14D0: return 0x14D1; @@ -198,7 +198,7 @@ u16 func_80B0F7FC(EnGb2* this) { } u16 func_80B0F8F8(EnGb2* this) { - switch (this->unk_26E) { + switch (this->textId) { case 0x14DC: this->unk_26C |= 2; return 0x14DD; @@ -220,7 +220,7 @@ u16 func_80B0F8F8(EnGb2* this) { } u16 func_80B0F97C(EnGb2* this) { - switch (this->unk_26E) { + switch (this->textId) { case 0x14F5: return 0x14F6; @@ -250,40 +250,40 @@ void func_80B0FA04(EnGb2* this) { this->csIdList[2] = CutsceneManager_GetAdditionalCsId(this->csIdList[1]); } -s32 func_80B0FA48(EnGb2* this, PlayState* play) { +s32 EnGb2_MustTalkManually(EnGb2* this, PlayState* play) { switch (Player_GetMask(play)) { case PLAYER_MASK_GIBDO: this->unk_26C |= 4; - this->unk_26E = 0x14E6; + this->textId = 0x14E6; return false; case PLAYER_MASK_GARO: this->unk_26C |= 8; - this->unk_26E = 0x14E6; + this->textId = 0x14E6; return false; case PLAYER_MASK_CAPTAIN: - if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_80_40)) { - this->unk_26E = 0x14EB; + if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_TALKED_TO_CANYON_GUARD_WITH_CAPTAINS_HAT)) { + this->textId = 0x14EB; return false; } else { - this->unk_26E = 0x14EE; + this->textId = 0x14EE; return true; } default: - if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_80_20)) { - this->unk_26E = 0x14EF; + if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_TALKED_TO_CANYON_GUARD_WITH_NO_MASK)) { + this->textId = 0x14EF; return false; } else { - this->unk_26E = 0x14F4; + this->textId = 0x14F4; return true; } } } u16 func_80B0FB24(EnGb2* this) { - switch (this->unk_26E) { + switch (this->textId) { case 0x14E6: if (this->unk_26C & 4) { return 0x14E7; @@ -381,12 +381,12 @@ void func_80B0FEBC(EnGb2* this, PlayState* play) { if ((play->msgCtx.ocarinaMode == OCARINA_MODE_EVENT) && (play->msgCtx.lastPlayedSong == OCARINA_SONG_HEALING)) { play->msgCtx.ocarinaMode = OCARINA_MODE_END; SET_EVENTINF(EVENTINF_47); - this->unk_26E = 0x14D1; + this->textId = 0x14D1; this->unk_288 = 10; } if (Actor_TalkOfferAccepted(&this->actor, &play->state)) { - Message_StartTextbox(play, this->unk_26E, &this->actor); + Message_StartTextbox(play, this->textId, &this->actor); this->actionFunc = func_80B0FFA8; } else if ((this->actor.xzDistToPlayer < 300.0f) || this->actor.isLockedOn) { Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); @@ -401,43 +401,43 @@ void func_80B0FFA8(EnGb2* this, PlayState* play) { if (this->unk_26C & 2) { play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING; play->msgCtx.stateTimer = 4; - this->unk_26E = 0x14D1; + this->textId = 0x14D1; this->unk_288 = 30; CLEAR_EVENTINF(EVENTINF_47); this->unk_26C &= ~2; this->actionFunc = func_80B0FEBC; } else { - this->unk_26E = func_80B0F7FC(this); - Message_StartTextbox(play, this->unk_26E, &this->actor); + this->textId = func_80B0F7FC(this); + Message_StartTextbox(play, this->textId, &this->actor); } } } else if ((talkState == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) { - if (this->unk_26E == 0x14D5) { + if (this->textId == 0x14D5) { switch (play->msgCtx.choiceIndex) { case 0: if (gSaveContext.save.saveInfo.playerData.rupees < this->unk_288) { Audio_PlaySfx(NA_SE_SY_ERROR); - this->unk_26E = 0x14D7; + this->textId = 0x14D7; this->unk_26C |= 2; - Message_StartTextbox(play, this->unk_26E, &this->actor); + Message_StartTextbox(play, this->textId, &this->actor); } else { Audio_PlaySfx_MessageDecide(); - this->unk_26E = 0x14D8; - Message_StartTextbox(play, this->unk_26E, &this->actor); + this->textId = 0x14D8; + Message_StartTextbox(play, this->textId, &this->actor); } break; case 1: Audio_PlaySfx_MessageCancel(); - this->unk_26E = 0x14D6; + this->textId = 0x14D6; this->unk_26C |= 2; - Message_StartTextbox(play, this->unk_26E, &this->actor); + Message_StartTextbox(play, this->textId, &this->actor); break; default: break; } - } else if (this->unk_26E == 0x14DA) { + } else if (this->textId == 0x14DA) { switch (play->msgCtx.choiceIndex) { case 0: Audio_PlaySfx_MessageDecide(); @@ -450,9 +450,9 @@ void func_80B0FFA8(EnGb2* this, PlayState* play) { case 1: Audio_PlaySfx_MessageCancel(); - this->unk_26E = 0x14DB; + this->textId = 0x14DB; this->unk_26C |= 2; - Message_StartTextbox(play, this->unk_26E, &this->actor); + Message_StartTextbox(play, this->textId, &this->actor); break; default: @@ -552,7 +552,7 @@ void func_80B10344(EnGb2* this, PlayState* play) { void func_80B10584(EnGb2* this, PlayState* play) { if (Actor_TalkOfferAccepted(&this->actor, &play->state)) { - Message_StartTextbox(play, this->unk_26E, &this->actor); + Message_StartTextbox(play, this->textId, &this->actor); this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED; this->actionFunc = func_80B10634; } else if (this->actor.xzDistToPlayer < 300.0f) { @@ -570,20 +570,20 @@ void func_80B10634(EnGb2* this, PlayState* play) { play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING; play->msgCtx.stateTimer = 4; this->unk_26C &= ~2; - if (this->unk_26E == 0x14DD) { - this->unk_26E = 0x14DE; + if (this->textId == 0x14DD) { + this->textId = 0x14DE; this->actionFunc = func_80B10924; - } else if (this->unk_26E == 0x14DF) { + } else if (this->textId == 0x14DF) { this->actionFunc = func_80B10A48; } else { - this->unk_26E = 0x14D1; + this->textId = 0x14D1; this->unk_288 = 30; CLEAR_EVENTINF(EVENTINF_47); this->actionFunc = func_80B0FEBC; } } else { - this->unk_26E = func_80B0F8F8(this); - Message_StartTextbox(play, this->unk_26E, &this->actor); + this->textId = func_80B0F8F8(this); + Message_StartTextbox(play, this->textId, &this->actor); } } } else if ((talkState == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) { @@ -591,9 +591,9 @@ void func_80B10634(EnGb2* this, PlayState* play) { case 0: if (gSaveContext.save.saveInfo.playerData.rupees < this->unk_288) { Audio_PlaySfx(NA_SE_SY_ERROR); - this->unk_26E = 0x14D7; + this->textId = 0x14D7; this->unk_26C |= 2; - Message_StartTextbox(play, this->unk_26E, &this->actor); + Message_StartTextbox(play, this->textId, &this->actor); } else { Audio_PlaySfx_MessageDecide(); Rupees_ChangeBy(-this->unk_288); @@ -606,9 +606,9 @@ void func_80B10634(EnGb2* this, PlayState* play) { case 1: Audio_PlaySfx_MessageCancel(); - this->unk_26E = 0x14E3; + this->textId = 0x14E3; this->unk_26C |= 2; - Message_StartTextbox(play, this->unk_26E, &this->actor); + Message_StartTextbox(play, this->textId, &this->actor); break; default: @@ -655,7 +655,7 @@ void func_80B10924(EnGb2* this, PlayState* play) { void func_80B109DC(EnGb2* this, PlayState* play) { if (Actor_TalkOfferAccepted(&this->actor, &play->state)) { - Message_StartTextbox(play, this->unk_26E, &this->actor); + Message_StartTextbox(play, this->textId, &this->actor); this->actionFunc = func_80B10634; } else { Actor_OfferTalkExchangeEquiCylinder(&this->actor, play, 300.0f, PLAYER_IA_MINUS1); @@ -679,7 +679,7 @@ void func_80B10A48(EnGb2* this, PlayState* play) { case ENGB2_7_2: CutsceneManager_Stop(this->csIdList[this->csIdIndex]); - if (this->unk_26E == 0x14FB) { + if (this->textId == 0x14FB) { Flags_SetSwitch(play, ENGB2_GET_SWITCH_FLAG(&this->actor)); Actor_Kill(&this->actor); return; @@ -705,13 +705,13 @@ void func_80B10B5C(EnGb2* this, PlayState* play) { this->unk_26C &= ~0x40; } - if (func_80B0FA48(this, play)) { + if (EnGb2_MustTalkManually(this, play)) { this->unk_26C &= ~0x20; if (Actor_TalkOfferAccepted(&this->actor, &play->state) && (this->unk_26C & 0x40)) { - if ((this->unk_26E == 0x14EE) || (this->unk_26E == 0x14F4)) { + if ((this->textId == 0x14EE) || (this->textId == 0x14F4)) { this->unk_26C |= 2; } - Message_StartTextbox(play, this->unk_26E, &this->actor); + Message_StartTextbox(play, this->textId, &this->actor); this->csIdIndex = 1; this->unk_26C &= ~0x40; this->actionFunc = func_80B10DAC; @@ -723,11 +723,11 @@ void func_80B10B5C(EnGb2* this, PlayState* play) { this->unk_26C &= ~0x40; if (Actor_TalkOfferAccepted(&this->actor, &play->state) && (this->unk_26C & 0x20)) { this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED; - Message_StartTextbox(play, this->unk_26E, &this->actor); - if (this->unk_26E == 0x14EB) { - SET_WEEKEVENTREG(WEEKEVENTREG_80_40); - } else if (this->unk_26E == 0x14EF) { - SET_WEEKEVENTREG(WEEKEVENTREG_80_20); + Message_StartTextbox(play, this->textId, &this->actor); + if (this->textId == 0x14EB) { + SET_WEEKEVENTREG(WEEKEVENTREG_TALKED_TO_CANYON_GUARD_WITH_CAPTAINS_HAT); + } else if (this->textId == 0x14EF) { + SET_WEEKEVENTREG(WEEKEVENTREG_TALKED_TO_CANYON_GUARD_WITH_NO_MASK); } this->unk_26C &= ~0x20; this->csIdIndex = 0; @@ -770,7 +770,7 @@ void func_80B10E98(EnGb2* this, PlayState* play) { this->unk_26C &= ~2; play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING; play->msgCtx.stateTimer = 4; - if ((this->unk_26E != 0x14E8) && (this->unk_26E != 0x14EA)) { + if ((this->textId != 0x14E8) && (this->textId != 0x14EA)) { CutsceneManager_Stop(this->csIdList[this->csIdIndex]); this->actionFunc = func_80B10B5C; } else if (Flags_GetSwitch(play, ENGB2_GET_SWITCH_FLAG(&this->actor))) { @@ -782,16 +782,20 @@ void func_80B10E98(EnGb2* this, PlayState* play) { this->actionFunc = func_80B10DAC; } } else { - s32 temp; - - this->unk_26E = func_80B0FB24(this); - Message_StartTextbox(play, this->unk_26E, &this->actor); - temp = this->unk_26E; - if ((temp == 0x14E7) || (temp == 0x14E9) || (temp == 0x14EC) || (temp == 0x14F0)) { - CutsceneManager_Stop(this->csIdList[this->csIdIndex]); - this->csIdIndex = 1; - CutsceneManager_Queue(this->csIdList[this->csIdIndex]); - this->actionFunc = func_80B10DAC; + this->textId = func_80B0FB24(this); + Message_StartTextbox(play, this->textId, &this->actor); + switch (this->textId) { + case 0x14E7: + case 0x14E9: + case 0x14EC: + case 0x14F0: + CutsceneManager_Stop(this->csIdList[this->csIdIndex]); + this->csIdIndex = 1; + CutsceneManager_Queue(this->csIdList[this->csIdIndex]); + this->actionFunc = func_80B10DAC; + break; + default: + break; } } } @@ -800,7 +804,7 @@ void func_80B10E98(EnGb2* this, PlayState* play) { void func_80B11048(EnGb2* this, PlayState* play) { if (Actor_TalkOfferAccepted(&this->actor, &play->state)) { this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED; - Message_StartTextbox(play, this->unk_26E, &this->actor); + Message_StartTextbox(play, this->textId, &this->actor); this->actionFunc = func_80B10DAC; } else if (this->actor.xzDistToPlayer < 300.0f) { this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED; @@ -816,8 +820,8 @@ void func_80B110F8(EnGb2* this, PlayState* play) { this->unk_26C &= ~2; this->actionFunc = func_80B10A48; } else { - this->unk_26E = func_80B0F97C(this); - Message_StartTextbox(play, this->unk_26E, &this->actor); + this->textId = func_80B0F97C(this); + Message_StartTextbox(play, this->textId, &this->actor); } } } @@ -864,7 +868,7 @@ void func_80B11268(EnGb2* this, PlayState* play) { this->unk_26C &= ~0x100; this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; this->actor.draw = EnGb2_Draw; - this->unk_26E = 0x14F9; + this->textId = 0x14F9; this->actionFunc = func_80B11048; } else { this->actionFunc = func_80B111AC; @@ -965,7 +969,7 @@ void EnGb2_Init(Actor* thisx, PlayState* play) { this->actionFunc = func_80B111AC; } else { this->unk_28A = 255; - this->unk_26E = 0x14F5; + this->textId = 0x14F5; this->actionFunc = func_80B11048; } break; diff --git a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.h b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.h index 60d5b6d75..039e3dc98 100644 --- a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.h +++ b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.h @@ -26,7 +26,7 @@ typedef struct EnGb2 { /* 0x21C */ ColliderCylinder collider; /* 0x268 */ Actor* unk_268; /* 0x26C */ u16 unk_26C; - /* 0x26E */ u16 unk_26E; + /* 0x26E */ u16 textId; /* 0x270 */ Vec3s headRot; /* 0x276 */ Vec3s torsoRot; /* 0x27C */ s16 unk_27C; diff --git a/tools/disasm/n64-jp-1.1/functions.txt b/tools/disasm/n64-jp-1.1/functions.txt index 41b3b6889..27a2aa128 100644 --- a/tools/disasm/n64-jp-1.1/functions.txt +++ b/tools/disasm/n64-jp-1.1/functions.txt @@ -12985,7 +12985,7 @@ func_80B0F7FC = 0x80B12B9C; // type:func size:0xFC func_80B0F8F8 = 0x80B12C98; // type:func size:0x84 func_80B0F97C = 0x80B12D1C; // type:func size:0x88 func_80B0FA04 = 0x80B12DA4; // type:func size:0x44 -func_80B0FA48 = 0x80B12DE8; // type:func size:0xDC +EnGb2_MustTalkManually = 0x80B12DE8; // type:func size:0xDC func_80B0FB24 = 0x80B12EC4; // type:func size:0xCC func_80B0FBF0 = 0x80B12F90; // type:func size:0x19C func_80B0FD8C = 0x80B1312C; // type:func size:0x8C diff --git a/tools/disasm/n64-us/functions.txt b/tools/disasm/n64-us/functions.txt index 0753b9e96..5683abf80 100644 --- a/tools/disasm/n64-us/functions.txt +++ b/tools/disasm/n64-us/functions.txt @@ -12991,7 +12991,7 @@ func_80B0F7FC = 0x80B0F7FC; // type:func func_80B0F8F8 = 0x80B0F8F8; // type:func func_80B0F97C = 0x80B0F97C; // type:func func_80B0FA04 = 0x80B0FA04; // type:func -func_80B0FA48 = 0x80B0FA48; // type:func +EnGb2_MustTalkManually = 0x80B0FA48; // type:func func_80B0FB24 = 0x80B0FB24; // type:func func_80B0FBF0 = 0x80B0FBF0; // type:func func_80B0FD8C = 0x80B0FD8C; // type:func diff --git a/tools/overlayhelpers/mscriptdis.py b/tools/overlayhelpers/mscriptdis.py index 412201b18..07e728bc2 100644 --- a/tools/overlayhelpers/mscriptdis.py +++ b/tools/overlayhelpers/mscriptdis.py @@ -706,8 +706,8 @@ week_event_reg = { (80 << 8) | 0x04: "WEEKEVENTREG_80_04", (80 << 8) | 0x08: "WEEKEVENTREG_80_08", (80 << 8) | 0x10: "WEEKEVENTREG_RECEIVED_PRIORITY_MAIL", - (80 << 8) | 0x20: "WEEKEVENTREG_80_20", - (80 << 8) | 0x40: "WEEKEVENTREG_80_40", + (80 << 8) | 0x20: "WEEKEVENTREG_TALKED_TO_CANYON_GUARD_WITH_NO_MASK", + (80 << 8) | 0x40: "WEEKEVENTREG_TALKED_TO_CANYON_GUARD_WITH_CAPTAINS_HAT", (80 << 8) | 0x80: "WEEKEVENTREG_80_80", (81 << 8) | 0x01: "WEEKEVENTREG_81_01", (81 << 8) | 0x02: "WEEKEVENTREG_81_02", diff --git a/tools/weekeventregconvert.py b/tools/weekeventregconvert.py index 7b8dd7604..4483fc57d 100755 --- a/tools/weekeventregconvert.py +++ b/tools/weekeventregconvert.py @@ -649,8 +649,8 @@ weekEventReg = { (80 << 8) | 0x04: "WEEKEVENTREG_80_04", (80 << 8) | 0x08: "WEEKEVENTREG_80_08", (80 << 8) | 0x10: "WEEKEVENTREG_RECEIVED_PRIORITY_MAIL", - (80 << 8) | 0x20: "WEEKEVENTREG_80_20", - (80 << 8) | 0x40: "WEEKEVENTREG_80_40", + (80 << 8) | 0x20: "WEEKEVENTREG_TALKED_TO_CANYON_GUARD_WITH_NO_MASK", + (80 << 8) | 0x40: "WEEKEVENTREG_TALKED_TO_CANYON_GUARD_WITH_CAPTAINS_HAT", (80 << 8) | 0x80: "WEEKEVENTREG_80_80", (81 << 8) | 0x01: "WEEKEVENTREG_81_01", (81 << 8) | 0x02: "WEEKEVENTREG_81_02", |
