Document EnToto (#1887)

* Start documenting Toto

* Document EnToto_IsFacingPlayer and Unk2B6/isPlayerCancelingSoundCheck

* Rename EnTotoText to EnTotoSpeakData to align with EnTest3 (Kafei)

* Update gitignore

* Document some HandleTalk and SetupTalk functions similar to EnTest3

* Rename D_80BA502C to sEnTotoSpeakData1

* Document TalkState setup funcs

* Update gitignore, document talk state update functions (from En_Test3)

* Toto talk loop animations

* Update gitignore for functions.txt

* Document ActionFuncs

* Clean up remaining undocumented variables

* Clean up comments

* Run format.py and clean up result, and revert makefile changes

* Add missing newline at end of z_en_toto.h

* Clean up gitignore and other local stuff

* gitignore again

* Gitignore again again

* Gitignore again again again

* Restore old graphovl.py

* Update include/z64save.h

Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>

* Update src/overlays/actors/ovl_En_Toto/z_en_toto.c

Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>

* Rename SetupAction and Action functions; fix block comments; create enum for TalkData

* move enum up so it's declared before it's used lol

* Change shouldCancelSoundCheck and ShouldPlaySoundCheckCompleteCutscene to bool

* Run format.py even though it makes the SpeakData array less readable yay

* Remove accidentally pushed files

* Enum for SpeakDataIndex

* SpeakDataIndex

* Index into SpeakData with enums

* Apply requested changes

* Apply clang-format

* Apply requested changes (rename SetPlayedFlags, add formsPlayed enum, fix a few missing enum replacements)

* Change enum to macros

* Apply more suggested changes

---------

Co-authored-by: AlexisACooper1 <alexis@lingualogica.net>
Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
This commit is contained in:
Alexis Cooper
2026-10-10 20:53:23 -06:00
committed by GitHub
parent 6e5fb93dde
commit bf6bd9d0d3
11 changed files with 536 additions and 386 deletions
@@ -68,7 +68,7 @@ D_80951820 {
return_none
}
} else if_day (2) {
if_week_event_reg (WEEKEVENTREG_50_01) {
if_week_event_reg (WEEKEVENTREG_HELPED_GORMAN_DAY_1) {
if_scene (SCENE_YADOYA) {
if_time_range (6, 0, 18, 0) {
return_time (6, 0, 18, 0, 7)
+7 -7
View File
@@ -210,8 +210,8 @@ static MsgScript D_80951B98[] = {
static MsgScript D_80951BE8[] = {
/* 0x0000 0x03 */ MSCRIPT_CMD_CHECK_CALLBACK(0x0),
/* 0x0003 0x05 */ MSCRIPT_CMD_CHECK_WEEK_EVENT_REG(WEEKEVENTREG_50_01, 0x0039 - 0x0008),
/* 0x0008 0x05 */ MSCRIPT_CMD_CHECK_WEEK_EVENT_REG(WEEKEVENTREG_51_80, 0x0039 - 0x000D),
/* 0x0003 0x05 */ MSCRIPT_CMD_CHECK_WEEK_EVENT_REG(WEEKEVENTREG_HELPED_GORMAN_DAY_1, 0x0039 - 0x0008),
/* 0x0008 0x05 */ MSCRIPT_CMD_CHECK_WEEK_EVENT_REG(WEEKEVENTREG_HELPED_GORMAN_DAY_2, 0x0039 - 0x000D),
/* 0x000D 0x05 */ MSCRIPT_CMD_CHECK_WEEK_EVENT_REG(WEEKEVENTREG_75_02, 0x001F - 0x0012),
/* 0x0012 0x03 */ MSCRIPT_CMD_BEGIN_TEXT(0x2B13),
/* 0x0015 0x03 */ MSCRIPT_CMD_NOTEBOOK_EVENT(BOMBERS_NOTEBOOK_EVENT_MET_GORMAN),
@@ -758,8 +758,8 @@ s32 func_8094EB1C(Actor* thisx, PlayState* play) {
switch (this->unk_3E0) {
case 0:
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_50_01) || CHECK_WEEKEVENTREG(WEEKEVENTREG_51_80) ||
CHECK_WEEKEVENTREG(WEEKEVENTREG_75_02)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_HELPED_GORMAN_DAY_1) ||
CHECK_WEEKEVENTREG(WEEKEVENTREG_HELPED_GORMAN_DAY_2) || CHECK_WEEKEVENTREG(WEEKEVENTREG_75_02)) {
ret = true;
break;
}
@@ -865,8 +865,8 @@ s32 func_8094EE84(EnGm* this, PlayState* play) {
this->actor.child = this->unk_268;
this->msgScript = EnGm_GetMsgScript(this, play);
if ((this->scheduleResult == 5) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_50_01) &&
!CHECK_WEEKEVENTREG(WEEKEVENTREG_51_80) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_75_02)) {
if ((this->scheduleResult == 5) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_HELPED_GORMAN_DAY_1) &&
!CHECK_WEEKEVENTREG(WEEKEVENTREG_HELPED_GORMAN_DAY_2) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_75_02)) {
this->unk_3A4 |= 0x20;
} else if ((this->scheduleResult != 1) && (this->scheduleResult != 5) && (this->scheduleResult != 7)) {
this->unk_3A4 |= 0x20;
@@ -1481,7 +1481,7 @@ s32 func_80950490(EnGm* this, PlayState* play) {
};
s32 pad;
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_50_01) || CHECK_WEEKEVENTREG(WEEKEVENTREG_51_80)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_HELPED_GORMAN_DAY_1) || CHECK_WEEKEVENTREG(WEEKEVENTREG_HELPED_GORMAN_DAY_2)) {
if (this->unk_400 == 0) {
this->unk_3C8 = 1;
this->unk_3CA = 1;
File diff suppressed because it is too large Load Diff
+25 -19
View File
@@ -8,24 +8,30 @@
struct EnToto;
typedef void (*EnTotoActionFunc)(struct EnToto*, PlayState*);
typedef s32 (*EnTotoUnkFunc)(struct EnToto*, PlayState*);
typedef s32 (*EnTotoTalkFunc)(struct EnToto*, PlayState*);
#define ENTOTO_GET_SWITCH_FLAG_1(thisx) ((thisx)->params & 0x7F)
#define ENTOTO_GET_SWITCH_FLAG_2(thisx) (((thisx)->params >> 7) & 0x7F)
#define ENTOTO_GET_SWITCH_FLAG_3(thisx) ((thisx)->home.rot.x)
#define ENTOTO_GET_ZORA_SPOKEN_FLAG(thisx) ((thisx)->params & 0x7F)
#define ENTOTO_GET_OTHER_SPOKEN_FLAG(thisx) (((thisx)->params >> 7) & 0x7F)
#define ENTOTO_GET_DEKU_SPOKEN_FLAG(thisx) ((thisx)->home.rot.x)
typedef struct EnTotoText {
/* 0x0 */ u8 unk0;
/* 0x1 */ u8 unk1;
#define WIND_FISH_PLAYED_HUMAN (1 << 0)
#define WIND_FISH_PLAYED_DEKU (1 << 1)
#define WIND_FISH_PLAYED_ZORA (1 << 2)
#define WIND_FISH_PLAYED_GORON (1 << 3)
#define WIND_FISH_PLAYED_ALL (WIND_FISH_PLAYED_HUMAN + WIND_FISH_PLAYED_DEKU + WIND_FISH_PLAYED_ZORA + WIND_FISH_PLAYED_GORON)
typedef struct EnTotoSpeakData {
/* 0x0 */ u8 talkActionIndex;
/* 0x1 */ u8 arg; // Used for various functions, including as a timer
/* 0x2 */ u16 textId;
} EnTotoText; // size = 0x4
} EnTotoSpeakData; // size = 0x4
typedef struct EnTotoUnkStruct2 {
/* 0x0 */ u16 unk0;
/* 0x2 */ u16 unk2;
/* 0x4 */ u16 unk4;
/* 0x6 */ Vec3s unk6;
} EnTotoUnkStruct2; // size = 0xC
typedef struct EnTotoSpotlight {
/* 0x0 */ u16 promptTextId;
/* 0x2 */ u16 wrongLightTextId;
/* 0x4 */ u16 rightLightTextId;
/* 0x6 */ Vec3s pos;
} EnTotoSpotlight; // size = 0xC
typedef struct EnToto {
/* 0x000 */ Actor actor;
@@ -35,14 +41,14 @@ typedef struct EnToto {
/* 0x260 */ FaceChange faceChange;
/* 0x264 */ ColliderCylinder collider;
/* 0x2B0 */ u8 actionFuncIndex;
/* 0x2B1 */ u8 unk2B1;
/* 0x2B1 */ u8 timer;
/* 0x2B2 */ s8 csId;
/* 0x2B3 */ u8 unk2B3;
/* 0x2B3 */ u8 windFishFormsPlayed;
/* 0x2B4 */ u8 animIndex;
/* 0x2B5 */ u8 cueId;
/* 0x2B6 */ u8 unk2B6;
/* 0x2B7 */ u8 unk2B7;
/* 0x2B8 */ EnTotoText* text;
/* 0x2B6 */ u8 shouldCancelSoundCheck;
/* 0x2B7 */ u8 shouldPlaySoundCheckCompleteCutscene;
/* 0x2B8 */ EnTotoSpeakData* speakData;
/* 0x2BC */ PlayerOverrideInputEntry overrideInputEntry;
/* 0x2C4 */ Actor* spotlights;
/* 0x2C8 */ s32 pad2C8;