mirror of https://github.com/zeldaret/mm.git
Ovl_Dm_Nb OK (#162)
* match but func_80C1DF18 * Everything matches * Add comment about unknown pointer * Rename vars * Update comment * format * Added header description * Remove raw pointer * Remove unnecessary foward declarations * Update include/functions.h Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
parent
f85feadc27
commit
7d476f7c71
|
@ -1595,7 +1595,7 @@ void nop_800EDDB0(GlobalContext* globalCtx);
|
||||||
// void func_800EDDBC(void);
|
// void func_800EDDBC(void);
|
||||||
void func_800EDDCC(GlobalContext* globalCtx, u32 uParm2);
|
void func_800EDDCC(GlobalContext* globalCtx, u32 uParm2);
|
||||||
void func_800EDE34(Actor* actor, GlobalContext* globalCtx, s32 param_3);
|
void func_800EDE34(Actor* actor, GlobalContext* globalCtx, s32 param_3);
|
||||||
// void func_800EDF24(void);
|
void func_800EDF24(Actor* actor, GlobalContext* globalCtx, u32 arg2);
|
||||||
void func_800EDF78(Actor* actor, GlobalContext* globalCtx, s32 iParm3);
|
void func_800EDF78(Actor* actor, GlobalContext* globalCtx, s32 iParm3);
|
||||||
void func_800EE0CC(Actor* actor, GlobalContext* globalCtx, s32 iParm3);
|
void func_800EE0CC(Actor* actor, GlobalContext* globalCtx, s32 iParm3);
|
||||||
// void func_800EE1D8(void);
|
// void func_800EE1D8(void);
|
||||||
|
@ -2687,7 +2687,7 @@ void func_8013AED4(u16* param_1, u16 param_2, u16 param_3);
|
||||||
// void func_8013B878(void);
|
// void func_8013B878(void);
|
||||||
// void func_8013BB34(void);
|
// void func_8013BB34(void);
|
||||||
// void func_8013BB7C(void);
|
// void func_8013BB7C(void);
|
||||||
// void func_8013BC6C(void);
|
UNK_TYPE func_8013BC6C(SkelAnime* skelAnime, UNK_PTR arg1, s32 arg2);
|
||||||
// void func_8013BD40(void);
|
// void func_8013BD40(void);
|
||||||
// void func_8013BEDC(void);
|
// void func_8013BEDC(void);
|
||||||
// void func_8013C068(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
// void func_8013C068(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||||
|
|
|
@ -9175,9 +9175,9 @@ SECTIONS
|
||||||
ovl_Dm_Nb : AT(RomLocation)
|
ovl_Dm_Nb : AT(RomLocation)
|
||||||
{
|
{
|
||||||
build/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.o(.text)
|
build/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.o(.text)
|
||||||
build/asm/overlays/ovl_Dm_Nb_data.o(.data)
|
build/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.o(.data)
|
||||||
build/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.o(.rodata)
|
build/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.o(.rodata)
|
||||||
build/asm/overlays/ovl_Dm_Nb_rodata.o(.rodata)
|
build/src/overlays/actors/ovl_Dm_Nb/z_dm_nb_overlay.o(.ovl)
|
||||||
}
|
}
|
||||||
SegmentEnd = .;
|
SegmentEnd = .;
|
||||||
SegmentSize = SegmentEnd - SegmentStart;
|
SegmentSize = SegmentEnd - SegmentStart;
|
||||||
|
|
|
@ -84,6 +84,10 @@ D_060011E0 = 0x060011E0;
|
||||||
D_06000288 = 0x06000288;
|
D_06000288 = 0x06000288;
|
||||||
D_060019B4 = 0x060019B4;
|
D_060019B4 = 0x060019B4;
|
||||||
|
|
||||||
|
/* dm_nb */
|
||||||
|
D_06000990 = 0x06000990;
|
||||||
|
D_06008C40 = 0x06008C40;
|
||||||
|
|
||||||
/* z_en_ending_hero5 */
|
/* z_en_ending_hero5 */
|
||||||
D_0600A850 = 0x0600A850;
|
D_0600A850 = 0x0600A850;
|
||||||
D_06002FA0 = 0x06002FA0;
|
D_06002FA0 = 0x06002FA0;
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
/*
|
||||||
|
* File: z_dm_nb.c
|
||||||
|
* Overlay: ovl_Dm_Nb
|
||||||
|
* Description: Anju's Grandma at wedding during the credits
|
||||||
|
*/
|
||||||
|
|
||||||
#include "z_dm_nb.h"
|
#include "z_dm_nb.h"
|
||||||
|
|
||||||
#define FLAGS 0x00000009
|
#define FLAGS 0x00000009
|
||||||
|
@ -9,7 +15,7 @@ void DmNb_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||||
void DmNb_Update(Actor* thisx, GlobalContext* globalCtx);
|
void DmNb_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||||
void DmNb_Draw(Actor* thisx, GlobalContext* globalCtx);
|
void DmNb_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||||
|
|
||||||
/*
|
|
||||||
const ActorInit Dm_Nb_InitVars = {
|
const ActorInit Dm_Nb_InitVars = {
|
||||||
ACTOR_DM_NB,
|
ACTOR_DM_NB,
|
||||||
ACTORCAT_NPC,
|
ACTORCAT_NPC,
|
||||||
|
@ -21,18 +27,80 @@ const ActorInit Dm_Nb_InitVars = {
|
||||||
(ActorFunc)DmNb_Update,
|
(ActorFunc)DmNb_Update,
|
||||||
(ActorFunc)DmNb_Draw,
|
(ActorFunc)DmNb_Draw,
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Dm_Nb_0x80C1DED0/func_80C1DED0.asm")
|
extern UNK_TYPE D_06000990;
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Dm_Nb_0x80C1DED0/func_80C1DF18.asm")
|
extern FlexSkeletonHeader D_06008C40;
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Dm_Nb_0x80C1DED0/DmNb_Init.asm")
|
// Probably the same struct as EnFgAnimation, need more info from func_8013BC6C
|
||||||
|
static UNK_TYPE D_80C1E200[] = { &D_06000990, 0x3F800000, 0x0000FFFF, 0x00000000 };
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Dm_Nb_0x80C1DED0/DmNb_Destroy.asm")
|
s32 func_80C1DED0(DmNb* this, s32 arg1) {
|
||||||
|
s32 ret = 0;
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Dm_Nb_0x80C1DED0/DmNb_Update.asm")
|
if (arg1 != this->unk1F0) {
|
||||||
|
this->unk1F0 = arg1;
|
||||||
|
ret = func_8013BC6C(&this->skelAnime, &D_80C1E200, arg1);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Dm_Nb_0x80C1DED0/func_80C1E168.asm")
|
void func_80C1DF18(DmNb* this, GlobalContext* globalCtx) {
|
||||||
|
s32 sp2C[] = { 0, 0, 0, 0, 0 };
|
||||||
|
u16 actionUnk0;
|
||||||
|
u32 actionIndex;
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Dm_Nb_0x80C1DED0/DmNb_Draw.asm")
|
if (globalCtx->csCtx.state != 0) {
|
||||||
|
if (this->unk1F8 == 0) {
|
||||||
|
this->unk1EC = 0xFF;
|
||||||
|
this->unk1F8 = 1;
|
||||||
|
this->unk1F4 = this->unk1F0;
|
||||||
|
}
|
||||||
|
if (func_800EE29C(globalCtx, 0x232)) {
|
||||||
|
actionIndex = func_800EE200(globalCtx, 0x232);
|
||||||
|
actionUnk0 = globalCtx->csCtx.actorActions[actionIndex]->unk0;
|
||||||
|
if (this->unk1EC != (actionUnk0 & 0xFF)) {
|
||||||
|
this->unk1EC = actionUnk0;
|
||||||
|
func_80C1DED0(this, sp2C[actionUnk0]);
|
||||||
|
}
|
||||||
|
func_800EDF24(&this->actor, globalCtx, actionIndex);
|
||||||
|
}
|
||||||
|
} else if (this->unk1F8 != 0) {
|
||||||
|
this->unk1F8 = 0;
|
||||||
|
func_80C1DED0(this, this->unk1F4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DmNb_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
|
DmNb* this = THIS;
|
||||||
|
|
||||||
|
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f);
|
||||||
|
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06008C40, NULL, this->limbDrawTable, this->transitionDrawTable, 8);
|
||||||
|
this->unk1F0 = -1;
|
||||||
|
func_80C1DED0(this, 0);
|
||||||
|
this->actor.flags &= ~1;
|
||||||
|
Actor_SetScale(&this->actor, 0.01f);
|
||||||
|
this->actionFunc = func_80C1DF18;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DmNb_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void DmNb_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
|
DmNb* this = THIS;
|
||||||
|
|
||||||
|
this->actionFunc(this, globalCtx);
|
||||||
|
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||||
|
func_800B78B8(globalCtx, &this->actor, 30.0f, 12.0f, 0.0f, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DmNb_UnkActorDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* actor) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void DmNb_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
|
DmNb* this = THIS;
|
||||||
|
|
||||||
|
func_8012C5B0(globalCtx->state.gfxCtx);
|
||||||
|
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, NULL,
|
||||||
|
NULL, DmNb_UnkActorDraw, &this->actor);
|
||||||
|
}
|
||||||
|
|
|
@ -5,9 +5,18 @@
|
||||||
|
|
||||||
struct DmNb;
|
struct DmNb;
|
||||||
|
|
||||||
|
typedef void (*DmNbActionFunc)(struct DmNb*, GlobalContext*);
|
||||||
|
|
||||||
typedef struct DmNb {
|
typedef struct DmNb {
|
||||||
/* 0x000 */ Actor actor;
|
/* 0x000 */ Actor actor;
|
||||||
/* 0x144 */ char unk_144[0xB8];
|
/* 0x144 */ SkelAnime skelAnime;
|
||||||
|
/* 0x188 */ DmNbActionFunc actionFunc;
|
||||||
|
/* 0x18C */ Vec3s limbDrawTable[8];
|
||||||
|
/* 0x1BC */ Vec3s transitionDrawTable[8];
|
||||||
|
/* 0x1EC */ u8 unk1EC;
|
||||||
|
/* 0x1F0 */ s32 unk1F0;
|
||||||
|
/* 0x1F4 */ s32 unk1F4;
|
||||||
|
/* 0x1F8 */ s32 unk1F8;
|
||||||
} DmNb; // size = 0x1FC
|
} DmNb; // size = 0x1FC
|
||||||
|
|
||||||
extern const ActorInit Dm_Nb_InitVars;
|
extern const ActorInit Dm_Nb_InitVars;
|
||||||
|
|
|
@ -16985,7 +16985,7 @@
|
||||||
0x80C1E048:("DmNb_Init",),
|
0x80C1E048:("DmNb_Init",),
|
||||||
0x80C1E0F8:("DmNb_Destroy",),
|
0x80C1E0F8:("DmNb_Destroy",),
|
||||||
0x80C1E108:("DmNb_Update",),
|
0x80C1E108:("DmNb_Update",),
|
||||||
0x80C1E168:("func_80C1E168",),
|
0x80C1E168:("DmNb_UnkActorDraw",),
|
||||||
0x80C1E17C:("DmNb_Draw",),
|
0x80C1E17C:("DmNb_Draw",),
|
||||||
0x80C1E290:("func_80C1E290",),
|
0x80C1E290:("func_80C1E290",),
|
||||||
0x80C1E2D4:("func_80C1E2D4",),
|
0x80C1E2D4:("func_80C1E2D4",),
|
||||||
|
|
Loading…
Reference in New Issue