diff --git a/include/functions.h b/include/functions.h index 1293443d85..0ddac8d6d6 100644 --- a/include/functions.h +++ b/include/functions.h @@ -794,7 +794,7 @@ f32* func_800B8248(PosRot* param_1, ActorPlayer* param_2); // void func_800B82EC(void); // void func_800B83BC(void); // void func_800B83F8(void); -s32 func_800B84D0(Actor* actor, GlobalContext* globalCtx); +s32 func_800B84D0(Actor* actor, GlobalContext* globalCtx); // Actor_IsTalking s32 func_800B8500(Actor* actor, GlobalContext* globalCtx, f32 fParm3, f32 fParm4, s32 param_5); void func_800B85E0(Actor* actor, GlobalContext* globalCtx, f32 uParm3, s32 uParm4); void func_800B8614(Actor* actor, GlobalContext* globalCtx, f32 uParm3); @@ -892,7 +892,7 @@ void func_800BCC68(Vec3f* param_1, GlobalContext* globalCtx); // void func_800BD2B4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // void func_800BD384(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8, UNK_TYPE1 param_9); // void func_800BD6E4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5); -// void func_800BD888(void); +void func_800BD888(Actor*, struct_800BD888_arg1*, s16, s16); // This function is very similar to OoT's func_80034A14 // void func_800BD9A0(void); // void func_800BD9E0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE2 param_6); // void func_800BDAA0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE2 param_6); @@ -2233,7 +2233,7 @@ void func_80123DA4(ActorPlayer* player); // void func_80123F2C(void); // void func_80123F48(void); // void func_80124020(void); -u32 func_8012403C(GlobalContext* globalCtx); +u32 func_8012403C(GlobalContext* globalCtx); // Player_IsWearingAMask void func_8012404C(GlobalContext* globalCtx); // void func_8012405C(void); // void func_80124088(void); @@ -2877,7 +2877,7 @@ void func_80151BB4(GlobalContext* globalCtx, u32 uParm2); // void func_80151DA4(void); void func_80152434(GlobalContext* globalCtx, u16 arg2); // void func_80152464(void); -UNK_TYPE4 func_80152498(MessageContext* msgCtx); +s32 func_80152498(MessageContext* msgCtx); // void func_8015268C(void); // void func_80152C64(void); // void func_80152CAC(void); diff --git a/include/z64.h b/include/z64.h index cb8b4f0dae..272f858d3f 100644 --- a/include/z64.h +++ b/include/z64.h @@ -1580,6 +1580,19 @@ typedef struct { /* 0x10 */ s32 unk10; } struct_801C5F44; // size = 0x14 +// From OoT's struct_80034A14_arg1 +typedef struct { + /* 0x00 */ s16 unk_00; + /* 0x02 */ s16 unk_02; + /* 0x04 */ s16 unk_04; + /* 0x06 */ s16 unk_06; + /* 0x08 */ Vec3s unk_08; + /* 0x0E */ Vec3s unk_0E; + /* 0x14 */ f32 unk_14; + /* 0x18 */ Vec3f unk_18; // Usually setted to Player's position or Player's focus + /* 0x24 */ s16 unk_24; +} struct_800BD888_arg1; // size = 0x28 + typedef struct { /* 0x000 */ Actor base; /* 0x144 */ ColliderQuad unk144; diff --git a/include/z64actor.h b/include/z64actor.h index 520cf6dacf..ddbb732930 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -223,7 +223,7 @@ typedef struct { /* 0x14C */ UNK_TYPE1 pad14C[0x5]; /* 0x151 */ u8 unk151; /* 0x152 */ UNK_TYPE1 unk152; - /* 0x153 */ u8 unk153; + /* 0x153 */ u8 unk153; // isWearingAMask /* 0x154 */ UNK_TYPE1 pad154[0x1F8]; /* 0x34C */ Actor* heldActor; /* 0x350 */ UNK_TYPE1 pad350[0x18]; @@ -356,7 +356,7 @@ typedef struct { /* 0x0C */ f32 frameCount; /* 0x10 */ u8 mode; /* 0x14 */ f32 morphFrames; -} ActorAnimationEntry; +} ActorAnimationEntry; // size = 0x18 typedef enum { /* 0x000 */ ACTOR_PLAYER, diff --git a/include/z64animation.h b/include/z64animation.h index f6a5f74b0f..38eb8f7533 100644 --- a/include/z64animation.h +++ b/include/z64animation.h @@ -249,4 +249,11 @@ typedef s32 (*OverrideCurveLimbDraw)(struct GlobalContext* globalCtx, SkelAnimeC typedef void (*PostCurveLimbDraw)(struct GlobalContext* globalCtx, SkelAnimeCurve* skelCuve, s32 limbIndex, struct Actor* actor); +typedef struct struct_80B8E1A8 { + /* 0x00 */ AnimationHeader* animationSeg; + /* 0x04 */ f32 playbackSpeed; + /* 0x08 */ u8 mode; + /* 0x0C */ f32 transitionRate; +} struct_80B8E1A8; // size = 0x10 + #endif diff --git a/include/z64cutscene.h b/include/z64cutscene.h index 586bc2f906..c76ee98e6c 100644 --- a/include/z64cutscene.h +++ b/include/z64cutscene.h @@ -5,7 +5,7 @@ #include typedef struct { - /* 0x00 */ u16 unk0; + /* 0x00 */ u16 unk0; // action; // "dousa" /* 0x02 */ u16 startFrame; /* 0x04 */ u16 endFrame; /* 0x06 */ UNK_TYPE1 pad6[0x2A]; diff --git a/linker_scripts/code_script.txt b/linker_scripts/code_script.txt index 9e22c8de67..1bfc7728a9 100644 --- a/linker_scripts/code_script.txt +++ b/linker_scripts/code_script.txt @@ -7339,9 +7339,9 @@ SECTIONS ovl_En_Ma_Yts : AT(RomLocation) { build/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.o(.text) - build/asm/overlays/ovl_En_Ma_Yts_data.o(.data) + build/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.o(.data) build/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.o(.rodata) - build/asm/overlays/ovl_En_Ma_Yts_rodata.o(.rodata) + build/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts_overlay.o(.ovl) } SegmentEnd = .; SegmentSize = SegmentEnd - SegmentStart; diff --git a/linker_scripts/object_script.txt b/linker_scripts/object_script.txt index 46ca375ac3..ff89653f5b 100644 --- a/linker_scripts/object_script.txt +++ b/linker_scripts/object_script.txt @@ -274,6 +274,44 @@ D_06017650 = 0x06017650; /* z_en_warp_uzu */ D_06000EC0 = 0x06000EC0; +/* z_en_ma_yts */ +D_06009E58 = 0x06009E58; +D_06007D98 = 0x06007D98; +D_060003B0 = 0x060003B0; +D_060043A0 = 0x060043A0; +D_06013928 = 0x06013928; +D_06009E58 = 0x06009E58; +D_06009E58 = 0x06009E58; +D_06018948 = 0x06018948; +D_06018948 = 0x06018948; +D_0601B76C = 0x0601B76C; +D_0601B76C = 0x0601B76C; +D_06007328 = 0x06007328; +D_06007328 = 0x06007328; +D_06014088 = 0x06014088; +D_06014088 = 0x06014088; +D_06002A8C = 0x06002A8C; +D_06002A8C = 0x06002A8C; +D_06015B7C = 0x06015B7C; +D_06015B7C = 0x06015B7C; +D_06007D98 = 0x06007D98; +D_06007D98 = 0x06007D98; +D_0600852C = 0x0600852C; +D_0600852C = 0x0600852C; +D_06008F6C = 0x06008F6C; +D_06008F6C = 0x06008F6C; +D_060180DC = 0x060180DC; +D_060180DC = 0x060180DC; +D_060127C8 = 0x060127C8; +D_06012BC8 = 0x06012BC8; +D_06012FC8 = 0x06012FC8; +D_060133C8 = 0x060133C8; +D_0600FFC8 = 0x0600FFC8; +D_060107C8 = 0x060107C8; +D_06010FC8 = 0x06010FC8; +D_060117C8 = 0x060117C8; +D_06011FC8 = 0x06011FC8; + /* en_cha */ D_06000710 = 0x06000710; D_06000958 = 0x06000958; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index e85d825047..5162f95b2b 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -825,6 +825,7 @@ void Actor_FreeOverlay(ActorOverlay* entry) { #pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800BD6E4.asm") +// This function is very similar to OoT's func_80034A14 #pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800BD888.asm") #pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800BD9A0.asm") diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index c8e54ec093..7d65b22f5d 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -1121,8 +1121,7 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3 params = 0xD0; dropId = ITEM00_MAGIC_LARGE; dropQuantity = 1; - } else if ((gSaveContext.magicLevel != 0) && - ((gSaveContext.magicLevel >> 1) >= gSaveContext.magic)) { + } else if ((gSaveContext.magicLevel != 0) && ((gSaveContext.magicLevel >> 1) >= gSaveContext.magic)) { params = 0xD0; dropId = ITEM00_MAGIC_LARGE; dropQuantity = 1; diff --git a/src/code/z_snap.c b/src/code/z_snap.c index b51dde076a..cae6f3e16c 100644 --- a/src/code/z_snap.c +++ b/src/code/z_snap.c @@ -95,7 +95,7 @@ void func_8013A46C(s32 flag) { u32 func_8013A4C4(s32 flag) { SaveContext* saveCtx = &gSaveContext; - + if (flag < 0x20) { return saveCtx->roomInf[123][3] & (1 << flag); } else { diff --git a/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.c b/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.c index 24f432cff6..cfb90a2353 100644 --- a/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.c +++ b/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.c @@ -15,7 +15,6 @@ void DmNb_Destroy(Actor* thisx, GlobalContext* globalCtx); void DmNb_Update(Actor* thisx, GlobalContext* globalCtx); void DmNb_Draw(Actor* thisx, GlobalContext* globalCtx); - const ActorInit Dm_Nb_InitVars = { ACTOR_DM_NB, ACTORCAT_NPC, diff --git a/src/overlays/actors/ovl_En_Fg/z_en_fg.c b/src/overlays/actors/ovl_En_Fg/z_en_fg.c index e458e43060..e253b862b4 100644 --- a/src/overlays/actors/ovl_En_Fg/z_en_fg.c +++ b/src/overlays/actors/ovl_En_Fg/z_en_fg.c @@ -98,8 +98,8 @@ s32 EnFg_UpdateAnimation(SkelAnime* skelAnime, s16 animIndex) { frameCount = SkelAnime_GetFrameCount(&sAnimations[animIndex].animationSeg->common); } SkelAnime_ChangeAnim(skelAnime, sAnimations[animIndex].animationSeg, sAnimations[animIndex].playbackSpeed, - sAnimations[animIndex].frame, frameCount, sAnimations[animIndex].mode, - sAnimations[animIndex].transitionRate); + sAnimations[animIndex].frame, frameCount, sAnimations[animIndex].mode, + sAnimations[animIndex].transitionRate); } return ret; } @@ -189,7 +189,7 @@ void EnFg_Idle(EnFg* this, GlobalContext* globalCtx) { case FG_DMGEFFECT_EXPLOSION: this->actor.flags &= ~1; Audio_PlayActorSound2(this, 0x28E3); - if(1) {} + if (1) {} this->actor.params = FG_BLACK; this->skelAnime.animPlaybackSpeed = 0.0f; ac = this->collider.base.ac; @@ -388,10 +388,11 @@ void EnFg_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx); func_8012C28C(globalCtx->state.gfxCtx); gDPPipeSync(POLY_OPA_DISP++); - gDPSetEnvColor(POLY_OPA_DISP++, envColor[this->actor.params].r, envColor[this->actor.params].g, envColor[this->actor.params].b, envColor[this->actor.params].a); + gDPSetEnvColor(POLY_OPA_DISP++, envColor[this->actor.params].r, envColor[this->actor.params].g, + envColor[this->actor.params].b, envColor[this->actor.params].a); gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(&D_060059A0)); gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(&D_060059A0)); - SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, + SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnFg_OverrideLimbDraw, EnFg_PostLimbDraw, &this->actor); CLOSE_DISPS(globalCtx->state.gfxCtx); } @@ -450,13 +451,14 @@ void EnFg_DrawDust(GlobalContext* globalCtx, EnFgEffectDust* dustEffect) { } if (1) {} - alpha = (255.0f / 16.0f) * dustEffect->timer; + alpha = (255.0f / 16.0f) * dustEffect->timer; gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, alpha); gDPPipeSync(POLY_XLU_DISP++); SysMatrix_InsertTranslation(dustEffect->pos.x, dustEffect->pos.y, dustEffect->pos.z, MTXMODE_NEW); SysMatrix_NormalizeXYZ(&globalCtx->unk187FC); Matrix_Scale(dustEffect->xyScale, dustEffect->xyScale, 1.0f, MTXMODE_APPLY); - gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); index = 0.5f * dustEffect->timer; gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(sDustTex[index])); gSPDisplayList(POLY_XLU_DISP++, D_0600B338); diff --git a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c index b4448f6796..30341ef6c5 100644 --- a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c +++ b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c @@ -1,3 +1,9 @@ +/* + * File: z_en_ma_yto.c + * Overlay: ovl_En_Ma_Yto + * Description: Romani. As oposed as EnMa4, this actor is used in conjunction of another actor, like EnMaYto. + */ + #include "z_en_ma_yts.h" #define FLAGS 0x02100009 @@ -9,7 +15,54 @@ void EnMaYts_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnMaYts_Update(Actor* thisx, GlobalContext* globalCtx); void EnMaYts_Draw(Actor* thisx, GlobalContext* globalCtx); -/* +void EnMaYts_SetupDoNothing(EnMaYts* this); +void EnMaYts_DoNothing(EnMaYts* this, GlobalContext* globalCtx); +void EnMaYts_SetupStartDialogue(EnMaYts* this); +void EnMaYts_StartDialogue(EnMaYts* this, GlobalContext* globalCtx); +void EnMaYts_SetupDialogueHandler(EnMaYts* this); +void EnMaYts_DialogueHandler(EnMaYts* this, GlobalContext* globalCtx); +void EnMaYts_SetupEndCreditsHandler(EnMaYts* this); +void EnMaYts_EndCreditsHandler(EnMaYts* this, GlobalContext* globalCtx); +void EnMaYts_ChooseNextDialogue(EnMaYts* this, GlobalContext* globalCtx); + +void EnMaYts_SetFaceExpression(EnMaYts* this, s16 overrideEyeTexIndex, s16 mouthTexIndex); + +void EnMaYts_DrawSleeping(Actor* thisx, GlobalContext* globalCtx); + +extern AnimationHeader D_06009E58; +extern AnimationHeader D_06018948; +extern AnimationHeader D_0601B76C; +extern AnimationHeader D_06007328; +extern AnimationHeader D_06014088; +extern AnimationHeader D_06002A8C; +extern AnimationHeader D_06015B7C; +extern AnimationHeader D_06007D98; +extern AnimationHeader D_0600852C; +extern AnimationHeader D_06008F6C; +extern AnimationHeader D_060180DC; + +extern u64 D_060127C8[]; +extern u64 D_06012BC8[]; +extern u64 D_06012FC8[]; +extern u64 D_060133C8[]; + +extern u64 D_0600FFC8[]; +extern u64 D_060107C8[]; +extern u64 D_06010FC8[]; +extern u64 D_060117C8[]; +extern u64 D_06011FC8[]; + +extern FlexSkeletonHeader D_06013928; + +extern AnimationHeader D_06009E58; +extern AnimationHeader D_06007D98; + +// Bow +extern Gfx D_060003B0[]; + +// Sleeping +extern Gfx D_060043A0[]; + const ActorInit En_Ma_Yts_InitVars = { ACTOR_EN_MA_YTS, ACTORCAT_NPC, @@ -21,48 +74,509 @@ const ActorInit En_Ma_Yts_InitVars = { (ActorFunc)EnMaYts_Update, (ActorFunc)EnMaYts_Draw, }; -*/ -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8D030.asm") +void EnMaYts_UpdateEyes(EnMaYts* this) { + if (this->overrideEyeTexIndex != 0) { + this->eyeTexIndex = this->overrideEyeTexIndex; + } else if (DECR(this->blinkTimer) == 0) { + this->eyeTexIndex++; + if (this->eyeTexIndex >= 3) { + this->blinkTimer = Rand_S16Offset(30, 30); + this->eyeTexIndex = 0; + } + } +} -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8D0BC.asm") +static ColliderCylinderInit sCylinderInit = { + { + COLTYPE_NONE, + AT_NONE, + AC_NONE, + OC1_ON | OC1_TYPE_ALL, + OC2_TYPE_2, + COLSHAPE_CYLINDER, + }, + { + ELEMTYPE_UNK0, + { 0x00000000, 0x00, 0x00 }, + { 0x00000000, 0x00, 0x00 }, + TOUCH_NONE | TOUCH_SFX_NORMAL, + BUMP_NONE, + OCELEM_ON, + }, + { 18, 46, 0, { 0, 0, 0 } }, +}; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8D12C.asm") +static CollisionCheckInfoInit2 sColChkInfoInit2 = { + 0, 0, 0, 0, MASS_IMMOVABLE, +}; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8D1E8.asm") +static struct_80B8E1A8 D_80B8E1A8[] = { + { &D_06009E58, 1.0f, 0, 0.0f }, { &D_06009E58, 1.0f, 0, -6.0f }, { &D_06018948, 1.0f, 2, 0.0f }, + { &D_06018948, 1.0f, 2, -6.0f }, { &D_0601B76C, 1.0f, 0, 0.0f }, { &D_0601B76C, 1.0f, 0, -6.0f }, + { &D_06007328, 1.0f, 0, 0.0f }, { &D_06007328, 1.0f, 0, -6.0f }, { &D_06014088, 1.0f, 0, 0.0f }, + { &D_06014088, 1.0f, 0, -6.0f }, { &D_06002A8C, 1.0f, 0, 0.0f }, { &D_06002A8C, 1.0f, 0, -6.0f }, + { &D_06015B7C, 1.0f, 0, 0.0f }, { &D_06015B7C, 1.0f, 0, -6.0f }, { &D_06007D98, 1.0f, 0, 0.0f }, + { &D_06007D98, 1.0f, 0, -6.0f }, { &D_0600852C, 1.0f, 0, 0.0f }, { &D_0600852C, 1.0f, 0, -6.0f }, + { &D_06008F6C, 1.0f, 0, 0.0f }, { &D_06008F6C, 1.0f, 0, -6.0f }, { &D_060180DC, 1.0f, 2, 0.0f }, + { &D_060180DC, 1.0f, 2, -6.0f }, +}; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8D2D8.asm") +static void* sMouthTextures[] = { + D_060127C8, + D_06012BC8, + D_06012FC8, + D_060133C8, +}; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/EnMaYts_Init.asm") +static void* sEyeTextures[] = { + D_0600FFC8, D_060107C8, D_06010FC8, D_060117C8, D_06011FC8, +}; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/EnMaYts_Destroy.asm") +static u16 D_80B8E32C = 99; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8D698.asm") +void EnMaYts_ChangeAnim(EnMaYts* this, s32 index) { + SkelAnime_ChangeAnim(&this->skelAnime, D_80B8E1A8[index].animationSeg, 1.0f, 0.0f, + SkelAnime_GetFrameCount(&D_80B8E1A8[index].animationSeg->common), D_80B8E1A8[index].mode, + D_80B8E1A8[index].transitionRate); +} -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8D6AC.asm") +void func_80B8D12C(EnMaYts* this, GlobalContext* globalCtx) { + ActorPlayer* player = PLAYER; + s16 flag = this->unk_32C == 2 ? true : false; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8D6BC.asm") + if ((this->unk_32C == 0) || (this->actor.parent == NULL)) { + this->unk_1D8.unk_18 = player->base.world.pos; + this->unk_1D8.unk_18.y -= -10.0f; + } else { + Math_Vec3f_StepTo(&this->unk_1D8.unk_18, &this->actor.parent->world.pos, 8.0f); + this->unk_1D8.unk_18.y -= -10.0f; + } -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8D6F8.asm") + func_800BD888(&this->actor, &this->unk_1D8, 0, flag); +} -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8D95C.asm") +void EnMaYts_InitAnimation(EnMaYts* this, GlobalContext* globalCtx) { + switch (this->type) { + case EN_NA_YTS_TYPE_BARN: + this->actor.targetMode = 0; + EnMaYts_ChangeAnim(this, 0); + break; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8D970.asm") + case EN_NA_YTS_TYPE_SITTING: + this->actor.targetMode = 6; + // Day 1 or "Winning" the alien invasion + if (CURRENT_DAY == 1 || (gSaveContext.weekEventReg[0x16] & 1)) { + EnMaYts_ChangeAnim(this, 14); + } else { + EnMaYts_ChangeAnim(this, 18); + } + break; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8D9E4.asm") + case EN_NA_YTS_TYPE_SLEEPING: + this->actor.targetMode = 0; + this->actor.draw = EnMaYts_DrawSleeping; + EnMaYts_ChangeAnim(this, 0); + break; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8DA28.asm") + case EN_NA_YTS_TYPE_ENDCREDITS: + this->actor.targetMode = 0; + EnMaYts_ChangeAnim(this, 0); + break; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8DBB8.asm") + default: + EnMaYts_ChangeAnim(this, 0); + break; + } +} -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8DD88.asm") +s32 EnMaYts_CheckValidSpawn(EnMaYts* this, GlobalContext* globalCtx) { + switch (this->type) { + case EN_NA_YTS_TYPE_SITTING: + switch (CURRENT_DAY) { + case 1: + break; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/EnMaYts_Update.asm") + case 2: + // Failing the alien invasion + if (!(gSaveContext.weekEventReg[0x16] & 1)) { + return false; + } + break; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8DE44.asm") + case 3: + // "Winning" the alien invasion + if (gSaveContext.weekEventReg[0x16] & 1) { + return false; + } + break; + } + break; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8DF18.asm") + case EN_NA_YTS_TYPE_BARN: + // Failing the alien invasion + if (!(gSaveContext.weekEventReg[0x16] & 1)) { + return false; + } else if ((gSaveContext.time >= 0xD555) && (CURRENT_DAY == 3)) { + return false; + } + break; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/EnMaYts_Draw.asm") + case EN_NA_YTS_TYPE_SLEEPING: + // "Winning" the alien invasion + if (gSaveContext.weekEventReg[0x16] & 1) { + return false; + } + break; -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Ma_Yts_0x80B8D030/func_80B8E0BC.asm") + case EN_NA_YTS_TYPE_ENDCREDITS: + break; + } + + return true; +} + +void EnMaYts_Init(Actor* thisx, GlobalContext* globalCtx) { + EnMaYts* this = THIS; + s32 pad; + + this->type = EN_MA_YTS_PARSE_TYPE(thisx); + if (!EnMaYts_CheckValidSpawn(this, globalCtx)) { + Actor_MarkForDeath(&this->actor); + } + ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 18.0f); + SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06013928, NULL, this->limbDrawTbl, this->transitionDrawTbl, + OBJECT_MA1_LIMB_TABLE_COUNT); + EnMaYts_InitAnimation(this, globalCtx); + + Collider_InitCylinder(globalCtx, &this->collider); + Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); + CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit2); + + if (this->type == EN_NA_YTS_TYPE_SLEEPING) { + this->collider.dim.radius = 40; + } + + func_800B78B8(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4); + Actor_SetScale(&this->actor, 0.01f); + + this->unk_1D8.unk_00 = 0; + this->unk_200 = 0; + this->blinkTimer = 0; + + if (this->type == EN_NA_YTS_TYPE_ENDCREDITS) { + this->hasBow = true; + } else { + this->hasBow = false; + } + + if (CURRENT_DAY == 1 || (gSaveContext.weekEventReg[0x16] & 1)) { + this->overrideEyeTexIndex = 0; + this->eyeTexIndex = 0; + this->mouthTexIndex = 0; + this->unk_32C = 0; + } else { + this->overrideEyeTexIndex = 1; + this->eyeTexIndex = 1; + this->mouthTexIndex = 2; + this->unk_32C = 2; + } + + if (this->type == EN_NA_YTS_TYPE_ENDCREDITS) { + this->overrideEyeTexIndex = 0; + this->eyeTexIndex = 0; + this->mouthTexIndex = 0; + this->unk_32C = 2; + EnMaYts_SetupEndCreditsHandler(this); + } else if (CURRENT_DAY == 2 && gSaveContext.isNight == 1 && (gSaveContext.weekEventReg[0x16] & 1)) { + EnMaYts_SetupStartDialogue(this); + } else { + EnMaYts_SetupDoNothing(this); + } +} + +void EnMaYts_Destroy(Actor* thisx, GlobalContext* globalCtx) { + EnMaYts* this = THIS; + + Collider_DestroyCylinder(globalCtx, &this->collider); +} + +void EnMaYts_SetupDoNothing(EnMaYts* this) { + this->actionFunc = EnMaYts_DoNothing; +} + +void EnMaYts_DoNothing(EnMaYts* this, GlobalContext* globalCtx) { +} + +void EnMaYts_SetupStartDialogue(EnMaYts* this) { + EnMaYts_SetFaceExpression(this, 0, 0); + this->actionFunc = EnMaYts_StartDialogue; +} + +void EnMaYts_StartDialogue(EnMaYts* this, GlobalContext* globalCtx) { + s16 sp26 = this->actor.shape.rot.y - this->actor.yawTowardsPlayer; + + if (func_800B84D0(&this->actor, globalCtx)) { // if (Actor_IsTalking) + if (!(gSaveContext.playerForm == 4)) { // PLAYER_FORM != HUMAN_FORM + if (!(gSaveContext.weekEventReg[0x41] & 0x80)) { + // Saying to non-human Link: "Cremia went to town." + gSaveContext.weekEventReg[0x41] |= 0x80; + EnMaYts_SetFaceExpression(this, 0, 0); + func_801518B0(globalCtx, 0x335F, &this->actor); + this->textId = 0x335F; + } else { + // Saying to non-human Link: "Pretend you did not heard that." + EnMaYts_SetFaceExpression(this, 4, 3); + func_801518B0(globalCtx, 0x3362, &this->actor); + this->textId = 0x3362; + func_80151BB4(globalCtx, 5); + } + } else if (func_8012403C(globalCtx)) { // Player_IsWearingAMask + if (!(gSaveContext.weekEventReg[0x41] & 0x40)) { + gSaveContext.weekEventReg[0x41] |= 0x40; + EnMaYts_SetFaceExpression(this, 0, 0); + func_801518B0(globalCtx, 0x3363, &this->actor); + this->textId = 0x3363; + } else { + EnMaYts_SetFaceExpression(this, 4, 2); + func_801518B0(globalCtx, 0x3366, &this->actor); + this->textId = 0x3366; + func_80151BB4(globalCtx, 5); + } + } else if (!(gSaveContext.weekEventReg[0x15] & 0x20)) { + EnMaYts_SetFaceExpression(this, 0, 0); + func_801518B0(globalCtx, 0x3367, &this->actor); + this->textId = 0x3367; + } else { + if (!(gSaveContext.weekEventReg[0x41] & 0x20)) { + // Saying to Grasshopper: "Cremia went to town." + gSaveContext.weekEventReg[0x41] |= 0x20; + EnMaYts_SetFaceExpression(this, 4, 2); + func_801518B0(globalCtx, 0x3369, &this->actor); + this->textId = 0x3369; + } else { + // Saying to Grasshopper: "You're our bodyguard." + EnMaYts_SetFaceExpression(this, 0, 0); + func_801518B0(globalCtx, 0x336C, &this->actor); + this->textId = 0x336C; + func_80151BB4(globalCtx, 5); + } + } + EnMaYts_SetupDialogueHandler(this); + } else if (ABS_ALT(sp26) < 0x4000) { + func_800B8614(&this->actor, globalCtx, 120.0f); + } +} + +void EnMaYts_SetupDialogueHandler(EnMaYts* this) { + this->actionFunc = EnMaYts_DialogueHandler; +} + +void EnMaYts_DialogueHandler(EnMaYts* this, GlobalContext* globalCtx) { + switch (func_80152498(&globalCtx->msgCtx)) { + case 5: // End message block + EnMaYts_ChooseNextDialogue(this, globalCtx); + break; + + case 6: // End conversation + if (func_80147624(globalCtx) != 0) { + EnMaYts_SetupStartDialogue(this); + } + break; + + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } +} + +void EnMaYts_SetupEndCreditsHandler(EnMaYts* this) { + this->actor.flags |= 0x10; + EnMaYts_SetFaceExpression(this, 0, 0); + this->actionFunc = EnMaYts_EndCreditsHandler; +} + +void EnMaYts_EndCreditsHandler(EnMaYts* this, GlobalContext* globalCtx) { + u32 actionIndex; + + if (func_800EE29C(globalCtx, 0x78) != 0) { + actionIndex = func_800EE200(globalCtx, 0x78); + if (globalCtx->csCtx.frames == globalCtx->csCtx.actorActions[actionIndex]->startFrame) { + if (globalCtx->csCtx.actorActions[actionIndex]->unk0 != D_80B8E32C) { + D_80B8E32C = globalCtx->csCtx.actorActions[actionIndex]->unk0; + this->endCreditsFlag = 0; + switch (globalCtx->csCtx.actorActions[actionIndex]->unk0) { + case 1: + this->hasBow = true; + EnMaYts_ChangeAnim(this, 0); + break; + + case 2: + this->hasBow = false; + EnMaYts_ChangeAnim(this, 2); + break; + + case 3: + this->hasBow = true; + EnMaYts_ChangeAnim(this, 12); + break; + + case 4: + this->hasBow = true; + EnMaYts_ChangeAnim(this, 20); + break; + } + } + } + + func_800EDF24(&this->actor, globalCtx, actionIndex); + if ((D_80B8E32C == 2) && (this->endCreditsFlag == 0) && + (func_801378B8(&this->skelAnime, this->skelAnime.animFrameCount) != 0)) { + this->endCreditsFlag++; + EnMaYts_ChangeAnim(this, 5); + } + } else { + D_80B8E32C = 99; + this->hasBow = true; + } +} + +// Select the following dialogue based on the current one, and an appropiate face expression +void EnMaYts_ChooseNextDialogue(EnMaYts* this, GlobalContext* globalCtx) { + if (func_80147624(globalCtx) != 0) { + switch (this->textId) { + case 0x335F: + EnMaYts_SetFaceExpression(this, 0, 2); + func_801518B0(globalCtx, 0x3360, &this->actor); + this->textId = 0x3360; + break; + + case 0x3360: + EnMaYts_SetFaceExpression(this, 4, 3); + func_801518B0(globalCtx, 0x3361, &this->actor); + this->textId = 0x3361; + func_80151BB4(globalCtx, 5); + break; + + case 0x3363: + EnMaYts_SetFaceExpression(this, 1, 1); + func_801518B0(globalCtx, 0x3364, &this->actor); + this->textId = 0x3364; + break; + + case 0x3364: + EnMaYts_SetFaceExpression(this, 4, 2); + func_801518B0(globalCtx, 0x3365, &this->actor); + this->textId = 0x3365; + func_80151BB4(globalCtx, 5); + break; + + case 0x3367: + EnMaYts_SetFaceExpression(this, 4, 3); + func_801518B0(globalCtx, 0x3368, &this->actor); + this->textId = 0x3368; + func_80151BB4(globalCtx, 5); + break; + + case 0x3369: + EnMaYts_SetFaceExpression(this, 0, 0); + func_801518B0(globalCtx, 0x336A, &this->actor); + this->textId = 0x336A; + break; + + case 0x336A: + EnMaYts_SetFaceExpression(this, 3, 3); + func_801518B0(globalCtx, 0x336B, &this->actor); + this->textId = 0x336B; + func_80151BB4(globalCtx, 5); + break; + + default: + break; + } + } +} + +void EnMaYts_SetFaceExpression(EnMaYts* this, s16 overrideEyeTexIndex, s16 mouthTexIndex) { + this->overrideEyeTexIndex = overrideEyeTexIndex; + this->mouthTexIndex = mouthTexIndex; + if (this->overrideEyeTexIndex == 0) { + this->eyeTexIndex = 0; + } +} + +void EnMaYts_Update(Actor* thisx, GlobalContext* globalCtx) { + EnMaYts* this = THIS; + ColliderCylinder* collider; + + this->actionFunc(this, globalCtx); + collider = &this->collider; + Collider_UpdateCylinder(&this->actor, collider); + CollisionCheck_SetOC(globalCtx, &globalCtx->colCheckCtx, &collider->base); + SkelAnime_FrameUpdateMatrix(&this->skelAnime); + EnMaYts_UpdateEyes(this); + func_80B8D12C(this, globalCtx); +} + +s32 EnMaYts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, + Actor* thisx) { + EnMaYts* this = THIS; + Vec3s sp4; + + if (limbIndex == OBJECT_MA1_LIMB_HAIR_TOP) { + sp4 = this->unk_1D8.unk_08; + rot->x += sp4.y; + if ((this->skelAnime.animCurrentSeg == &D_06009E58) || (this->skelAnime.animCurrentSeg == &D_06007D98)) { + rot->z += sp4.x; + } + } else if (limbIndex == OBJECT_MA1_LIMB_HEAD) { + sp4 = this->unk_1D8.unk_0E; + rot->x += sp4.y; + rot->z += sp4.x; + } + + return 0; +} + +void EnMaYts_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { + EnMaYts* this = THIS; + + if (limbIndex == OBJECT_MA1_LIMB_HAIR_TOP) { + SysMatrix_GetStateTranslation(&this->actor.focus.pos); + } else if (limbIndex == OBJECT_MA1_LIMB_ARM_RIGHT) { + if (this->hasBow == true) { + OPEN_DISPS(globalCtx->state.gfxCtx); + gSPDisplayList(POLY_OPA_DISP++, D_060003B0); + CLOSE_DISPS(globalCtx->state.gfxCtx); + } + } +} + +void EnMaYts_Draw(Actor* thisx, GlobalContext* globalCtx) { + EnMaYts* this = THIS; + + OPEN_DISPS(globalCtx->state.gfxCtx); + func_8012C28C(globalCtx->state.gfxCtx); + + gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthTexIndex])); + gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeTexIndex])); + + SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, + EnMaYts_OverrideLimbDraw, EnMaYts_PostLimbDraw, &this->actor); + + CLOSE_DISPS(globalCtx->state.gfxCtx); +} + +// Alternative draw function +void EnMaYts_DrawSleeping(Actor* thisx, GlobalContext* globalCtx) { + OPEN_DISPS(globalCtx->state.gfxCtx); + func_8012C28C(globalCtx->state.gfxCtx); + + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_OPA_DISP++, D_060043A0); + + CLOSE_DISPS(globalCtx->state.gfxCtx); +} diff --git a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.h b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.h index 16f115789b..69c35793fb 100644 --- a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.h +++ b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.h @@ -5,11 +5,75 @@ struct EnMaYts; +typedef void (*EnMaYtsActionFunc)(struct EnMaYts*, GlobalContext*); + +// Limbs of OBJECT_MA1 +#define OBJECT_MA1_LIMB_TABLE_COUNT 23 +typedef enum { + /* 00 */ OBJECT_MA1_LIMB_00, + /* 01 */ OBJECT_MA1_LIMB_PELVIS, + /* 02 */ OBJECT_MA1_LIMB_TIGHT_LEFT, + /* 03 */ OBJECT_MA1_LIMB_LEG_LEFT, + /* 04 */ OBJECT_MA1_LIMB_FOOT_LEFT, + /* 05 */ OBJECT_MA1_LIMB_TIGHT_RIGHT, + /* 06 */ OBJECT_MA1_LIMB_LEG_RIGHT, + /* 07 */ OBJECT_MA1_LIMB_FOOT_RIGHT, + /* 08 */ OBJECT_MA1_LIMB_DRESS_0, + /* 09 */ OBJECT_MA1_LIMB_DRESS_1, + /* 10 */ OBJECT_MA1_LIMB_DRESS_2, + /* 11 */ OBJECT_MA1_LIMB_DRESS_3, + /* 12 */ OBJECT_MA1_LIMB_TORSO, + /* 13 */ OBJECT_MA1_LIMB_HEAD, + /* 14 */ OBJECT_MA1_LIMB_HAIR_TOP, + /* 15 */ OBJECT_MA1_LIMB_HAIR_BOTTOM, + /* 16 */ OBJECT_MA1_LIMB_ARM_LEFT, + /* 17 */ OBJECT_MA1_LIMB_FOREARM_LEFT, + /* 18 */ OBJECT_MA1_LIMB_HAND_LEFT, + /* 19 */ OBJECT_MA1_LIMB_ARM_RIGHT, + /* 20 */ OBJECT_MA1_LIMB_FOREARM_RIGHT, + /* 21 */ OBJECT_MA1_LIMB_HAND_RIGHT +} ObjectMa1Limbs; + typedef struct EnMaYts { /* 0x000 */ Actor actor; - /* 0x144 */ char unk_144[0x1F8]; + /* 0x144 */ SkelAnime skelAnime; + /* 0x188 */ EnMaYtsActionFunc actionFunc; + /* 0x18C */ ColliderCylinder collider; + /* 0x1D8 */ struct_800BD888_arg1 unk_1D8; + /* 0x200 */ s32 unk_200; // Set, but not used + /* 0x204 */ Vec3s limbDrawTbl[OBJECT_MA1_LIMB_TABLE_COUNT]; + /* 0x28E */ char unk_28E[0x6]; + /* 0x294 */ Vec3s transitionDrawTbl[OBJECT_MA1_LIMB_TABLE_COUNT]; + /* 0x31E */ char unk_31E[0x8]; + /* 0x326 */ s16 blinkTimer; + /* 0x328 */ s16 overrideEyeTexIndex; // If non-zero, then this index will be used instead of eyeTexIndex + /* 0x32A */ s16 eyeTexIndex; + /* 0x32C */ s16 unk_32C; // flag? + /* 0x32E */ s16 mouthTexIndex; + /* 0x330 */ s16 type; + /* 0x332 */ char unk_332[0x2]; + /* 0x334 */ s16 endCreditsFlag; + /* 0x336 */ s16 hasBow; + /* 0x338 */ u16 textId; } EnMaYts; // size = 0x33C extern const ActorInit En_Ma_Yts_InitVars; +typedef enum { + /* 0 */ EN_NA_YTS_TYPE_BARN, + /* 1 */ EN_NA_YTS_TYPE_SITTING, + /* 2 */ EN_NA_YTS_TYPE_SLEEPING, + /* 3 */ EN_NA_YTS_TYPE_ENDCREDITS +} EnMaYtsType; + +#define EN_MA_YTS_PARSE_TYPE(actor) (((actor->params)&0xF000) >> 12) +#define EN_MA_YTS_PARAM(enMaYtsType) ((enMaYtsType) << 12) + +/** + * EN_NA_YTS_TYPE_BARN: In the barn, accompanying Cremia. Cremia's actor will handle her dialogue if spoken to. + * EN_NA_YTS_TYPE_SITTING: Having dinner or looking after the ranch. + * EN_NA_YTS_TYPE_SLEEPING: Sleeping. Can be seen in the second night in her house if the player failed the alien invasion. + * EN_NA_YTS_TYPE_ENDCREDITS: Used in the end credits sequence. + */ + #endif // Z_EN_MA_YTS_H diff --git a/src/overlays/actors/ovl_En_Toto/z_en_toto.c b/src/overlays/actors/ovl_En_Toto/z_en_toto.c index 59fdf35ed4..7233fe49ac 100644 --- a/src/overlays/actors/ovl_En_Toto/z_en_toto.c +++ b/src/overlays/actors/ovl_En_Toto/z_en_toto.c @@ -77,9 +77,9 @@ extern AnimationHeader D_06002F20; extern AnimationHeader D_06003AA8; -extern UNK_TYPE D_06008AE8; +extern UNK_TYPE D_06008AE8; -extern UNK_TYPE D_0600A068; +extern UNK_TYPE D_0600A068; extern UNK_TYPE D_0600A468; diff --git a/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.c b/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.c index 1c0088ae66..9ae2db7ac3 100644 --- a/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.c +++ b/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.c @@ -34,7 +34,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 180, ICHAIN_STOP), }; -Vec3f iceSmokeAccel = {0.0f, 0.0f, 0.0f}; // Readd as static when possible +Vec3f iceSmokeAccel = { 0.0f, 0.0f, 0.0f }; // Readd as static when possible void ObjHsStump_Init(Actor* thisx, GlobalContext* globalCtx) { ObjHsStump* this = THIS; diff --git a/tables/functions.txt b/tables/functions.txt index a4a5a6155a..5ab153c860 100644 --- a/tables/functions.txt +++ b/tables/functions.txt @@ -14745,28 +14745,28 @@ 0x80B8CCB4:("func_80B8CCB4",), 0x80B8CCFC:("func_80B8CCFC",), 0x80B8CD3C:("EnGe2_Draw",), - 0x80B8D030:("func_80B8D030",), - 0x80B8D0BC:("func_80B8D0BC",), + 0x80B8D030:("EnMaYts_UpdateEyes",), + 0x80B8D0BC:("EnMaYts_ChangeAnim",), 0x80B8D12C:("func_80B8D12C",), - 0x80B8D1E8:("func_80B8D1E8",), - 0x80B8D2D8:("func_80B8D2D8",), + 0x80B8D1E8:("EnMaYts_InitAnimation",), + 0x80B8D2D8:("EnMaYts_CheckValidSpawn",), 0x80B8D3F8:("EnMaYts_Init",), 0x80B8D66C:("EnMaYts_Destroy",), - 0x80B8D698:("func_80B8D698",), - 0x80B8D6AC:("func_80B8D6AC",), - 0x80B8D6BC:("func_80B8D6BC",), - 0x80B8D6F8:("func_80B8D6F8",), - 0x80B8D95C:("func_80B8D95C",), - 0x80B8D970:("func_80B8D970",), - 0x80B8D9E4:("func_80B8D9E4",), - 0x80B8DA28:("func_80B8DA28",), - 0x80B8DBB8:("func_80B8DBB8",), - 0x80B8DD88:("func_80B8DD88",), + 0x80B8D698:("EnMaYts_SetupDoNothing",), + 0x80B8D6AC:("EnMaYts_DoNothing",), + 0x80B8D6BC:("EnMaYts_SetupStartDialogue",), + 0x80B8D6F8:("EnMaYts_StartDialogue",), + 0x80B8D95C:("EnMaYts_SetupDialogueHandler",), + 0x80B8D970:("EnMaYts_DialogueHandler",), + 0x80B8D9E4:("EnMaYts_SetupEndCreditsHandler",), + 0x80B8DA28:("EnMaYts_EndCreditsHandler",), + 0x80B8DBB8:("EnMaYts_ChooseNextDialogue",), + 0x80B8DD88:("EnMaYts_SetFaceExpression",), 0x80B8DDC0:("EnMaYts_Update",), - 0x80B8DE44:("func_80B8DE44",), - 0x80B8DF18:("func_80B8DF18",), + 0x80B8DE44:("EnMaYts_OverrideLimbDraw",), + 0x80B8DF18:("EnMaYts_PostLimbDraw",), 0x80B8DF9C:("EnMaYts_Draw",), - 0x80B8E0BC:("func_80B8E0BC",), + 0x80B8E0BC:("EnMaYts_DrawSleeping",), 0x80B8E520:("EnMaYto_Init",), 0x80B8E6E0:("func_80B8E6E0",), 0x80B8E84C:("func_80B8E84C",), diff --git a/tables/variables.txt b/tables/variables.txt index 0887a1a0a6..67961ed8d1 100644 --- a/tables/variables.txt +++ b/tables/variables.txt @@ -16957,10 +16957,10 @@ 0x80B8CEE4:("enGe2OverlayRelocations","u32","[82]",0x148), 0x80B8D02C:("enGe2OverlayInfoOffset","u32","",0x4), 0x80B8E150:("En_Ma_Yts_InitVars","UNK_TYPE1","",0x1), - 0x80B8E170:("D_80B8E170","UNK_TYPE1","",0x1), - 0x80B8E19C:("D_80B8E19C","UNK_TYPE1","",0x1), + 0x80B8E170:("D_80B8E170","ColliderCylinderInit","",0x2C), + 0x80B8E19C:("D_80B8E19C","CollisionCheckInfoInit2","",0xC), 0x80B8E1A8:("D_80B8E1A8","UNK_TYPE1","",0x1), - 0x80B8E308:("D_80B8E308","UNK_TYPE1","",0x1), + 0x80B8E308:("D_80B8E308","void*","",0x4), 0x80B8E318:("D_80B8E318","UNK_TYPE1","",0x1), 0x80B8E32C:("D_80B8E32C","UNK_TYPE2","",0x2), 0x80B8E330:("jtbl_D_80B8E330","UNK_PTR","",0x4),