mirror of https://github.com/zeldaret/mm.git
en_nnh OK (#42)
* Matching (last thing to figure out is ColliderInit) * nnh work * Working on collider * formatting * Fixing en_nnh * Fixed build error. The issue was a collider init, not sure what made me think it was OK before * Removed overlay helper stuff * Removed weird qemu file * Fixed collider once and for all. Co-authored-by: fullgrowngaming <fullgrowngaming@gmail.com>
This commit is contained in:
parent
ee0ab1cbc9
commit
08e964972f
|
@ -2899,7 +2899,7 @@ void func_8014D7B4(void); // func_8014D7B4
|
||||||
void func_80150A84(void); // func_80150A84
|
void func_80150A84(void); // func_80150A84
|
||||||
void func_80150D08(GlobalContext* ctxt, unsigned int uParm2); // func_80150D08
|
void func_80150D08(GlobalContext* ctxt, unsigned int uParm2); // func_80150D08
|
||||||
void func_801514B0(void); // func_801514B0
|
void func_801514B0(void); // func_801514B0
|
||||||
void func_801518B0(GlobalContext* ctxt, u32 uParm2, UNK_TYPE4 uParm3); // func_801518B0
|
void func_801518B0(GlobalContext* ctxt, u32 uParm2, Actor* uParm3); // func_801518B0
|
||||||
void func_80151938(GlobalContext* ctxt, u16 param_2); // func_80151938
|
void func_80151938(GlobalContext* ctxt, u16 param_2); // func_80151938
|
||||||
void func_80151A68(GlobalContext* ctxt, u16 param_2); // func_80151A68
|
void func_80151A68(GlobalContext* ctxt, u16 param_2); // func_80151A68
|
||||||
void func_80151BB4(s32 iParm1, u32 uParm2); // func_80151BB4
|
void func_80151BB4(s32 iParm1, u32 uParm2); // func_80151BB4
|
||||||
|
|
|
@ -8236,8 +8236,9 @@ SECTIONS
|
||||||
ovl_En_Nnh : AT(RomLocation)
|
ovl_En_Nnh : AT(RomLocation)
|
||||||
{
|
{
|
||||||
build/src/overlays/actors/ovl_En_Nnh/z_en_nnh.o(.text)
|
build/src/overlays/actors/ovl_En_Nnh/z_en_nnh.o(.text)
|
||||||
build/asm/ovl_En_Nnh_data.o(.data)
|
build/src/overlays/actors/ovl_En_Nnh/z_en_nnh.o(.data)
|
||||||
build/asm/ovl_En_Nnh_rodata.o(.rodata)
|
build/src/overlays/actors/ovl_En_Nnh/z_en_nnh.o(.rodata)
|
||||||
|
build/src/overlays/actors/ovl_En_Nnh/z_en_nnh_overlay.o(.ovl)
|
||||||
}
|
}
|
||||||
SegmentEnd = .;
|
SegmentEnd = .;
|
||||||
SegmentSize = SegmentEnd - SegmentStart;
|
SegmentSize = SegmentEnd - SegmentStart;
|
||||||
|
|
|
@ -14,6 +14,11 @@ D_0E000140 = 0x0E000140;
|
||||||
D_0E0001C8 = 0x0E0001C8;
|
D_0E0001C8 = 0x0E0001C8;
|
||||||
D_0E0002C8 = 0x0E0002C8;
|
D_0E0002C8 = 0x0E0002C8;
|
||||||
|
|
||||||
|
D_06000500 = 0x06000500;
|
||||||
|
|
||||||
|
/* z_en_nnh */
|
||||||
|
D_06001510 = 0x06001510;
|
||||||
|
|
||||||
/* bg_haka_curtain */
|
/* bg_haka_curtain */
|
||||||
D_06001410 = 0x06001410;
|
D_06001410 = 0x06001410;
|
||||||
D_06001588 = 0x06001588;
|
D_06001588 = 0x06001588;
|
||||||
|
|
|
@ -9,7 +9,11 @@ void EnNnh_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||||
void EnNnh_Update(Actor* thisx, GlobalContext* globalCtx);
|
void EnNnh_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||||
void EnNnh_Draw(Actor* thisx, GlobalContext* globalCtx);
|
void EnNnh_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||||
|
|
||||||
/*
|
void func_80C08828(EnNnh* this);
|
||||||
|
void func_80C0883C(EnNnh* this, GlobalContext* globalCtx);
|
||||||
|
void func_80C088A4(EnNnh* this);
|
||||||
|
void func_80C088B8(EnNnh* this, GlobalContext* globalCtx);
|
||||||
|
|
||||||
const ActorInit En_Nnh_InitVars = {
|
const ActorInit En_Nnh_InitVars = {
|
||||||
ACTOR_EN_NNH,
|
ACTOR_EN_NNH,
|
||||||
ACTORTYPE_PROP,
|
ACTORTYPE_PROP,
|
||||||
|
@ -21,20 +25,72 @@ const ActorInit En_Nnh_InitVars = {
|
||||||
(ActorFunc)EnNnh_Update,
|
(ActorFunc)EnNnh_Update,
|
||||||
(ActorFunc)EnNnh_Draw
|
(ActorFunc)EnNnh_Draw
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
|
|
||||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Nnh_0x80C08760/EnNnh_Init.asm")
|
ColCylinderInit D_80C08A00 =
|
||||||
|
{
|
||||||
|
{ 0x0D, 0x00, 0x09, 0x39, 0x10, 0x01 },
|
||||||
|
{ 0x01, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
|
||||||
|
{ 20, 50, 0, { 0, 0, 0 } },
|
||||||
|
};
|
||||||
|
|
||||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Nnh_0x80C08760/EnNnh_Destroy.asm")
|
extern Gfx D_06001510[];
|
||||||
|
|
||||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Nnh_0x80C08760/func_80C08828.asm")
|
void EnNnh_Init(Actor *thisx, GlobalContext *globalCtx) {
|
||||||
|
EnNnh* this = THIS;
|
||||||
|
|
||||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Nnh_0x80C08760/func_80C0883C.asm")
|
Actor_SetScale(&this->actor, 0.01f);
|
||||||
|
Collision_InitCylinderDefault(globalCtx, &this->collider);
|
||||||
|
Collision_InitCylinderWithData(globalCtx, &this->collider, &this->actor, &D_80C08A00);
|
||||||
|
this->actor.unk1F = 1;
|
||||||
|
this->actor.topPosRot.pos = this->actor.currPosRot.pos;
|
||||||
|
this->actor.topPosRot.pos.y += 30.0f;
|
||||||
|
func_80C08828(this);
|
||||||
|
}
|
||||||
|
|
||||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Nnh_0x80C08760/func_80C088A4.asm")
|
void EnNnh_Destroy(Actor *thisx, GlobalContext *globalCtx) {
|
||||||
|
EnNnh* this = THIS;
|
||||||
|
|
||||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Nnh_0x80C08760/func_80C088B8.asm")
|
Collision_FiniCylinder(globalCtx, &this->collider);
|
||||||
|
}
|
||||||
|
|
||||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Nnh_0x80C08760/EnNnh_Update.asm")
|
void func_80C08828(EnNnh* this) {
|
||||||
|
this->actionFunc = func_80C0883C;
|
||||||
|
}
|
||||||
|
|
||||||
GLOBAL_ASM("asm/non_matchings/ovl_En_Nnh_0x80C08760/EnNnh_Draw.asm")
|
void func_80C0883C(EnNnh* this, GlobalContext* globalCtx) {
|
||||||
|
if (func_800B84D0(&this->actor, globalCtx)) {
|
||||||
|
func_801518B0(globalCtx, 0x228U, &this->actor);
|
||||||
|
func_80C088A4(this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
func_800B8614(&this->actor, globalCtx, 100.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void func_80C088A4(EnNnh* this) {
|
||||||
|
this->actionFunc = func_80C088B8;
|
||||||
|
}
|
||||||
|
|
||||||
|
void func_80C088B8(EnNnh* this, GlobalContext* globalCtx) {
|
||||||
|
if (func_800B867C(&this->actor, globalCtx)) {
|
||||||
|
func_80C08828(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void EnNnh_Update(Actor *thisx, GlobalContext *globalCtx) {
|
||||||
|
EnNnh* this = THIS;
|
||||||
|
s32 pad;
|
||||||
|
|
||||||
|
this->actionFunc(this, globalCtx);
|
||||||
|
Collision_CylinderMoveToActor(&this->actor, &this->collider);
|
||||||
|
Collision_AddOT(globalCtx, &globalCtx->colCheckCtx, &this->collider.base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EnNnh_Draw(Actor *thisx, GlobalContext *globalCtx) {
|
||||||
|
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
|
||||||
|
s32 pad;
|
||||||
|
|
||||||
|
func_8012C28C(gfxCtx);
|
||||||
|
gSPMatrix(gfxCtx->polyOpa.p++, SysMatrix_AppendStateToPolyOpaDisp(globalCtx->state.gfxCtx),
|
||||||
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
gSPDisplayList(gfxCtx->polyOpa.p++, D_06001510);
|
||||||
|
}
|
||||||
|
|
|
@ -5,9 +5,12 @@
|
||||||
|
|
||||||
struct EnNnh;
|
struct EnNnh;
|
||||||
|
|
||||||
|
typedef void (*EnNnhActionFunc)(struct EnNnh*, GlobalContext*);
|
||||||
|
|
||||||
typedef struct EnNnh {
|
typedef struct EnNnh {
|
||||||
/* 0x000 */ Actor actor;
|
/* 0x000 */ Actor actor;
|
||||||
/* 0x144 */ char unk_144[0x50];
|
/* 0x144 */ ColCylinder collider;
|
||||||
|
/* 0x190 */ EnNnhActionFunc actionFunc;
|
||||||
} EnNnh; // size = 0x194
|
} EnNnh; // size = 0x194
|
||||||
|
|
||||||
extern const ActorInit En_Nnh_InitVars;
|
extern const ActorInit En_Nnh_InitVars;
|
||||||
|
|
Loading…
Reference in New Issue