mirror of https://github.com/zeldaret/mm.git
parent
7263ce0894
commit
e6d263b738
|
@ -2712,9 +2712,9 @@ UNK_TYPE func_8013D68C(Path* path, s16 arg1, UNK_PTR arg2);
|
|||
// void func_8013D720(void);
|
||||
UNK_TYPE func_8013D768(Actor* actor, UNK_PTR arg1, s16 arg2);
|
||||
// void func_8013D83C(void);
|
||||
// void func_8013D8DC(void);
|
||||
// void func_8013D924(void);
|
||||
Actor* func_ActorCategoryIterateById(GlobalContext* globalCtx, struct Actor* actorListStart, s32 actorCategory, s32 actorId);
|
||||
s32 func_8013D8DC(s8 arg0, GlobalContext* globalCtx);
|
||||
s8 func_8013D924(s32 arg0, GlobalContext* globalCtx);
|
||||
Actor* func_ActorCategoryIterateById(GlobalContext* globalCtx, Actor* actorListStart, s32 actorCategory, s32 actorId);
|
||||
void func_8013D9C8(GlobalContext* globalCtx, s16* arg1, s16* arg2, UNK_TYPE arg3);
|
||||
u8 func_8013DB90(GlobalContext* globalCtx, UNK_PTR arg1, f32 arg2);
|
||||
// void func_8013DC40(void);
|
||||
|
|
3
spec
3
spec
|
@ -3038,8 +3038,7 @@ beginseg
|
|||
name "ovl_En_Dnk"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Dnk/z_en_dnk.o"
|
||||
include "build/data/ovl_En_Dnk/ovl_En_Dnk.data.o"
|
||||
include "build/data/ovl_En_Dnk/ovl_En_Dnk.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Dnk/ovl_En_Dnk_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/*
|
||||
* File: z_en_dnk.c
|
||||
* Overlay: ovl_En_Dnk
|
||||
* Description: Hallucinatory Mad Scrubs (Deku curse and healing cutscenes)
|
||||
*/
|
||||
|
||||
#include "z_en_dnk.h"
|
||||
|
||||
#define FLAGS 0x00000009
|
||||
|
@ -8,10 +14,46 @@ void EnDnk_Init(Actor* thisx, GlobalContext* globalCtx);
|
|||
void EnDnk_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnDnk_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
void func_80A51648(EnDnk* this, GlobalContext* globalCtx);
|
||||
void func_80A51890(EnDnk* this, GlobalContext* globalCtx);
|
||||
void EnDnk_DoNothing(EnDnk* this, GlobalContext* globalCtx);
|
||||
void func_80A52018(Actor* thisx, GlobalContext* globalCtx);
|
||||
void func_80A52134(EnDnk* this, GlobalContext* globalCtx);
|
||||
|
||||
extern AnimationHeader D_06000168;
|
||||
extern AnimationHeader D_0600031C;
|
||||
extern AnimationHeader D_06000430;
|
||||
extern AnimationHeader D_060006CC;
|
||||
extern AnimationHeader D_06000894;
|
||||
extern AnimationHeader D_06000B70;
|
||||
extern UNK_PTR D_06001680[];
|
||||
extern UNK_PTR D_06001700[];
|
||||
extern UNK_PTR D_06001780[];
|
||||
extern SkeletonHeader D_060023B8;
|
||||
extern SkeletonHeader D_06002468;
|
||||
extern AnimationHeader D_060024CC;
|
||||
extern AnimationHeader D_0600259C;
|
||||
extern AnimationHeader D_060026C4;
|
||||
extern SkeletonHeader D_06002848;
|
||||
extern AnimationHeader D_06002894;
|
||||
extern AnimationHeader D_06002950;
|
||||
extern AnimationHeader D_060029BC;
|
||||
extern AnimationHeader D_06002A08;
|
||||
extern AnimationHeader D_06002A5C;
|
||||
extern AnimationHeader D_06002B6C;
|
||||
extern AnimationHeader D_06002B90;
|
||||
extern AnimationHeader D_06002BD4;
|
||||
extern AnimationHeader D_06002DD4;
|
||||
extern AnimationHeader D_06002E84;
|
||||
extern AnimationHeader D_06002F7C;
|
||||
extern AnimationHeader D_06002FA4;
|
||||
extern AnimationHeader D_06003128;
|
||||
extern AnimationHeader D_06003180;
|
||||
extern AnimationHeader D_0600326C;
|
||||
extern AnimationHeader D_060033E4;
|
||||
extern AnimationHeader D_06003780;
|
||||
|
||||
static s16 D_80A521A0 = 0;
|
||||
|
||||
#if 0
|
||||
const ActorInit En_Dnk_InitVars = {
|
||||
ACTOR_EN_DNK,
|
||||
ACTORCAT_NPC,
|
||||
|
@ -24,18 +66,29 @@ const ActorInit En_Dnk_InitVars = {
|
|||
(ActorFunc)NULL,
|
||||
};
|
||||
|
||||
// static ColliderCylinderInit sCylinderInit = {
|
||||
static ColliderCylinderInit D_80A521C4 = {
|
||||
{ COLTYPE_HIT0, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, OC2_TYPE_1, COLSHAPE_CYLINDER, },
|
||||
{ ELEMTYPE_UNK1, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{
|
||||
COLTYPE_HIT0,
|
||||
AT_NONE,
|
||||
AC_ON | AC_TYPE_PLAYER,
|
||||
OC1_ON | OC1_TYPE_ALL,
|
||||
OC2_TYPE_1,
|
||||
COLSHAPE_CYLINDER,
|
||||
},
|
||||
{
|
||||
ELEMTYPE_UNK1,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0xF7CFFFFF, 0x00, 0x00 },
|
||||
TOUCH_NONE | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 18, 46, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
// sColChkInfoInit
|
||||
static CollisionCheckInfoInit2 D_80A521F0 = { 1, 0, 0, 0, MASS_IMMOVABLE };
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = { 1, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
// static DamageTable sDamageTable = {
|
||||
static DamageTable D_80A521FC = {
|
||||
static DamageTable sDamageTable = {
|
||||
/* Deku Nut */ DMG_ENTRY(1, 0x0),
|
||||
/* Deku Stick */ DMG_ENTRY(1, 0x0),
|
||||
/* Horse trample */ DMG_ENTRY(1, 0x0),
|
||||
|
@ -70,44 +123,335 @@ static DamageTable D_80A521FC = {
|
|||
/* Powder Keg */ DMG_ENTRY(1, 0x0),
|
||||
};
|
||||
|
||||
#endif
|
||||
static ActorAnimationEntryS sAnimations[] = {
|
||||
{ &D_06000B70, 1.0f, 0, -1, 2, 0 }, { &D_06000B70, 1.0f, 0, -1, 2, -4 }, { &D_06002A08, 1.0f, 0, -1, 0, -4 },
|
||||
{ &D_0600031C, 1.0f, 0, -1, 0, -4 }, { &D_06000430, 1.0f, -1, -1, 2, 0 }, { &D_06000430, 1.0f, 0, -1, 2, -4 },
|
||||
{ &D_06000894, 1.0f, 0, -1, 2, -4 }, { &D_06002B6C, 1.0f, 0, -1, 0, 0 }, { &D_06002B6C, 1.0f, 0, -1, 0, -4 },
|
||||
{ &D_060006CC, 1.0f, 0, -1, 0, -4 }, { &D_06000168, 1.0f, 0, -1, 2, -4 }, { &D_060024CC, 1.0f, -1, -1, 2, 0 },
|
||||
{ &D_060024CC, 1.0f, 0, -1, 2, -4 }, { &D_060026C4, 1.0f, 0, -1, 2, -4 }, { &D_06002894, 1.0f, 0, -1, 2, -4 },
|
||||
{ &D_06002B90, 1.0f, 0, -1, 2, -4 }, { &D_06002F7C, 1.0f, 0, -1, 0, 0 }, { &D_06002F7C, 1.0f, 0, -1, 0, -4 },
|
||||
{ &D_06003128, 1.0f, 0, -1, 0, 0 }, { &D_06003128, 1.0f, 0, -1, 0, -4 }, { &D_060029BC, 1.0f, 0, -1, 0, -4 },
|
||||
{ &D_06002E84, 1.0f, 0, -1, 0, -4 }, { &D_06000168, 1.0f, 0, -1, 0, -4 }, { &D_0600259C, 1.0f, 0, -1, 2, -4 },
|
||||
{ &D_06002A5C, 1.0f, 0, -1, 2, 0 }, { &D_06002A5C, 1.0f, 0, -1, 2, -4 }, { &D_06002BD4, 1.0f, 0, -1, 2, -4 },
|
||||
{ &D_06002DD4, 1.0f, 0, -1, 2, -4 }, { &D_06002FA4, 1.0f, 0, -1, 0, -4 }, { &D_06003180, 1.0f, 0, -1, 2, -4 },
|
||||
{ &D_0600326C, 1.0f, 0, -1, 0, 0 }, { &D_0600326C, 1.0f, 0, -1, 0, -4 }, { &D_060033E4, 1.0f, 0, -1, 0, -4 },
|
||||
{ &D_06003780, 1.0f, 0, -1, 0, 0 }, { &D_06003780, 1.0f, 0, -1, 0, -4 }, { &D_06002950, 1.0f, 0, -1, 0, 0 },
|
||||
};
|
||||
|
||||
extern ColliderCylinderInit D_80A521C4;
|
||||
extern CollisionCheckInfoInit2 D_80A521F0;
|
||||
extern DamageTable D_80A521FC;
|
||||
s32 func_80A514F0(SkelAnime* skelAnime, s16 animIndex) {
|
||||
s16 frame;
|
||||
s16 frameCount;
|
||||
s32 sp30 = false;
|
||||
|
||||
extern UNK_TYPE D_06002848;
|
||||
if (animIndex >= 0) {
|
||||
if (animIndex < 36) {
|
||||
sp30 = true;
|
||||
frameCount = sAnimations[animIndex].frameCount;
|
||||
if (frameCount < 0) {
|
||||
frameCount = SkelAnime_GetFrameCount(&(sAnimations[animIndex].animationSeg)->common);
|
||||
}
|
||||
frame = sAnimations[animIndex].frame;
|
||||
if (frame < 0) {
|
||||
frame = frameCount;
|
||||
}
|
||||
SkelAnime_ChangeAnim(skelAnime, sAnimations[animIndex].animationSeg, sAnimations[animIndex].playbackSpeed,
|
||||
frame, frameCount, sAnimations[animIndex].mode, sAnimations[animIndex].transitionRate);
|
||||
}
|
||||
}
|
||||
return sp30;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A514F0.s")
|
||||
s32 func_80A515C4(EnDnk* this) {
|
||||
s32 ret = false;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A515C4.s")
|
||||
if (DECR(this->unk_29E) == 0) {
|
||||
this->unk_2A0++;
|
||||
if (this->unk_2A0 >= 3) {
|
||||
this->unk_29E = Rand_S16Offset(20, 20);
|
||||
this->unk_2A0 = 0;
|
||||
}
|
||||
ret = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A51648.s")
|
||||
void func_80A51648(EnDnk* this, GlobalContext* globalCtx) {
|
||||
if (func_8013D8DC(this->unk_28E, globalCtx) == 1) {
|
||||
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->unk_28E].segment);
|
||||
this->actor.draw = func_80A52018;
|
||||
this->actor.objBankIndex = this->unk_28E;
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 18.0f);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A51890.s")
|
||||
switch (ENDNK_GET_3(&this->actor)) {
|
||||
case ENDNK_GET_3_0:
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &D_06002848, NULL, this->jointTable, this->morphTable, 11);
|
||||
func_80A514F0(&this->skelAnime, 7);
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A518DC.s")
|
||||
case ENDNK_GET_3_1:
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &D_060023B8, NULL, this->jointTable, this->morphTable, 10);
|
||||
func_80A514F0(&this->skelAnime, 18);
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/EnDnk_Init.s")
|
||||
case ENDNK_GET_3_2:
|
||||
SkelAnime_Init(globalCtx, &this->skelAnime, &D_06002468, NULL, this->jointTable, this->morphTable, 10);
|
||||
func_80A514F0(&this->skelAnime, 35);
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/EnDnk_Destroy.s")
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
if (ENDNK_GET_3C(&this->actor) == 4) {
|
||||
this->actor.flags &= ~1;
|
||||
this->actor.flags |= (0x10 | 0x20);
|
||||
this->actionFunc = func_80A51890;
|
||||
Actor_SetScale(&this->actor, 0.1f);
|
||||
} else {
|
||||
this->actor.flags &= ~1;
|
||||
this->actionFunc = EnDnk_DoNothing;
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/EnDnk_Update.s")
|
||||
void func_80A51890(EnDnk* this, GlobalContext* globalCtx) {
|
||||
if (func_800EE29C(globalCtx, 0x7E)) {
|
||||
func_800EDF24(&this->actor, globalCtx, func_800EE200(globalCtx, 0x7E));
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A51A78.s")
|
||||
void EnDnk_DoNothing(EnDnk* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A51AA4.s")
|
||||
void EnDnk_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnDnk* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A51CB8.s")
|
||||
this->unk_28E = -1;
|
||||
switch (ENDNK_GET_3(&this->actor)) {
|
||||
case ENDNK_GET_3_1:
|
||||
this->unk_28E = func_8013D924(0x12B, globalCtx);
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A51D78.s")
|
||||
case ENDNK_GET_3_0:
|
||||
this->unk_28E = func_8013D924(0x135, globalCtx);
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A51DA4.s")
|
||||
case ENDNK_GET_3_2:
|
||||
this->unk_28E = func_8013D924(0x40, globalCtx);
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A51FC0.s")
|
||||
if (this->unk_28E >= 0) {
|
||||
this->actionFunc = func_80A51648;
|
||||
} else {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A52018.s")
|
||||
this->unk_2A2 = D_80A521A0;
|
||||
D_80A521A0++;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A52074.s")
|
||||
void EnDnk_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnDnk* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Dnk/func_80A52134.s")
|
||||
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
void EnDnk_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnDnk* this = THIS;
|
||||
s32 pad;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
func_80A515C4(this);
|
||||
Actor_SetHeight(&this->actor, 34.0f);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
func_80A52134(this, globalCtx);
|
||||
}
|
||||
|
||||
s32 func_80A51A78(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnDnk* this = THIS;
|
||||
|
||||
this->unk_260[limbIndex] = *dList;
|
||||
*dList = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
void func_80A51AA4(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
EnDnk* this = THIS;
|
||||
MtxF sp5C;
|
||||
Vec3f sp50 = D_801D15B0;
|
||||
Vec3f sp44;
|
||||
Vec3s sp3C;
|
||||
|
||||
if (limbIndex == 2) {
|
||||
SysMatrix_MultiplyVector3fByState(&sp50, &sp44);
|
||||
SysMatrix_CopyCurrentState(&sp5C);
|
||||
func_8018219C(&sp5C, &sp3C, 0);
|
||||
SysMatrix_InsertTranslation(sp44.x, sp44.y, sp44.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
if (this->unk_28C & 0x10) {
|
||||
if (this->unk_28C & 0x20) {
|
||||
sp3C.x = this->unk_296;
|
||||
sp3C.y = this->unk_298;
|
||||
sp3C.y += this->actor.shape.rot.y;
|
||||
sp3C.z = 0;
|
||||
Math_SmoothStepToS(&this->unk_290, sp3C.x, 4, 0x1FFE, 1);
|
||||
Math_SmoothStepToS(&this->unk_292, sp3C.y, 4, 0x1FFE, 1);
|
||||
Math_SmoothStepToS(&this->unk_294, sp3C.z, 4, 0x1FFE, 1);
|
||||
} else {
|
||||
this->unk_290 = sp3C.x;
|
||||
this->unk_292 = sp3C.y;
|
||||
this->unk_294 = sp3C.z;
|
||||
}
|
||||
} else {
|
||||
this->unk_28C |= 0x10;
|
||||
this->unk_290 = sp3C.x;
|
||||
this->unk_292 = sp3C.y;
|
||||
this->unk_294 = sp3C.z;
|
||||
}
|
||||
|
||||
Matrix_RotateY(this->unk_292, MTXMODE_APPLY);
|
||||
SysMatrix_InsertXRotation_s(this->unk_290, MTXMODE_APPLY);
|
||||
SysMatrix_InsertZRotation_s(this->unk_294, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
OPEN_DISPS(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++, this->unk_260[limbIndex]);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
void func_80A51CB8(EnDnk* this, GlobalContext* globalCtx) {
|
||||
static UNK_PTR D_80A5245C[] = {
|
||||
D_06001680,
|
||||
D_06001700,
|
||||
D_06001780,
|
||||
};
|
||||
s32 pad;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80A5245C[this->unk_2A0]));
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
SkelAnime_Draw(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, func_80A51A78, func_80A51AA4,
|
||||
&this->actor);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
s32 func_80A51D78(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnDnk* this = THIS;
|
||||
|
||||
this->unk_260[limbIndex] = *dList;
|
||||
*dList = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
void func_80A51DA4(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
EnDnk* this = THIS;
|
||||
MtxF sp5C;
|
||||
Vec3f sp50 = D_801D15B0;
|
||||
Vec3f sp44;
|
||||
Vec3s sp3C;
|
||||
|
||||
if (limbIndex == 2) {
|
||||
SysMatrix_MultiplyVector3fByState(&sp50, &sp44);
|
||||
SysMatrix_CopyCurrentState(&sp5C);
|
||||
func_8018219C(&sp5C, &sp3C, 0);
|
||||
SysMatrix_InsertTranslation(sp44.x, sp44.y, sp44.z, MTXMODE_NEW);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
|
||||
if (this->unk_28C & 0x10) {
|
||||
if (this->unk_28C & 0x20) {
|
||||
sp3C.z = this->unk_296 + 0x4000;
|
||||
sp3C.y = this->unk_298 + 0x4000;
|
||||
sp3C.y += this->actor.shape.rot.y;
|
||||
sp3C.x = 0;
|
||||
Math_SmoothStepToS(&this->unk_290, sp3C.x, 4, 0x1FFE, 1);
|
||||
Math_SmoothStepToS(&this->unk_292, sp3C.y, 4, 0x1FFE, 1);
|
||||
Math_SmoothStepToS(&this->unk_294, sp3C.z, 4, 0x1FFE, 1);
|
||||
} else {
|
||||
this->unk_290 = sp3C.x;
|
||||
this->unk_292 = sp3C.y;
|
||||
this->unk_294 = sp3C.z;
|
||||
}
|
||||
} else {
|
||||
this->unk_28C |= 0x10;
|
||||
this->unk_290 = sp3C.x;
|
||||
this->unk_292 = sp3C.y;
|
||||
this->unk_294 = sp3C.z;
|
||||
}
|
||||
|
||||
Matrix_RotateY(this->unk_292, MTXMODE_APPLY);
|
||||
SysMatrix_InsertXRotation_s(this->unk_290, MTXMODE_APPLY);
|
||||
SysMatrix_InsertZRotation_s(this->unk_294, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
OPEN_DISPS(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++, this->unk_260[limbIndex]);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
void func_80A51FC0(EnDnk* this, GlobalContext* globalCtx) {
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
SkelAnime_Draw(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, func_80A51D78, func_80A51DA4,
|
||||
&this->actor);
|
||||
}
|
||||
|
||||
void func_80A52018(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnDnk* this = THIS;
|
||||
|
||||
switch (ENDNK_GET_3(thisx)) {
|
||||
case ENDNK_GET_3_0:
|
||||
func_80A51CB8(this, globalCtx);
|
||||
break;
|
||||
|
||||
case ENDNK_GET_3_1:
|
||||
case ENDNK_GET_3_2:
|
||||
func_80A51FC0(this, globalCtx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A52074(EnDnk* this, GlobalContext* globalCtx) {
|
||||
switch (globalCtx->csCtx.frames) {
|
||||
case 80:
|
||||
func_8019F128(NA_SE_EN_DEKNUTS_DANCE1);
|
||||
break;
|
||||
|
||||
case 123:
|
||||
func_8019F128(NA_SE_EN_DEKNUTS_DANCE2);
|
||||
break;
|
||||
|
||||
case 438:
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKNUTS_DANCE_BIG);
|
||||
break;
|
||||
|
||||
case 493:
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_APPEAR);
|
||||
break;
|
||||
}
|
||||
|
||||
if ((globalCtx->csCtx.frames >= 198) && (globalCtx->csCtx.frames < 438)) {
|
||||
func_8019F128(NA_SE_EN_DEKNUTS_DANCE - SFX_FLAG);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A52134(EnDnk* this, GlobalContext* globalCtx) {
|
||||
if ((globalCtx->csCtx.state != 0) && (ENDNK_GET_3C(&this->actor) == 4) && (globalCtx->sceneNum == SCENE_SPOT00) &&
|
||||
(gSaveContext.sceneSetupIndex == 2)) {
|
||||
func_80A52074(this, globalCtx);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,11 +7,37 @@ struct EnDnk;
|
|||
|
||||
typedef void (*EnDnkActionFunc)(struct EnDnk*, GlobalContext*);
|
||||
|
||||
#define ENDNK_GET_3(thisx) ((thisx)->params & 0x3)
|
||||
#define ENDNK_GET_3C(thisx) ((thisx)->params & 0x3C)
|
||||
|
||||
enum {
|
||||
/* 0x0 */ ENDNK_GET_3_0,
|
||||
/* 0x1 */ ENDNK_GET_3_1,
|
||||
/* 0x2 */ ENDNK_GET_3_2,
|
||||
/* 0x3 */ ENDNK_GET_3_3,
|
||||
/* 0x4 */ ENDNK_GET_3_4,
|
||||
};
|
||||
|
||||
typedef struct EnDnk {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x0144 */ char unk_144[0x44];
|
||||
/* 0x0188 */ EnDnkActionFunc actionFunc;
|
||||
/* 0x018C */ char unk_18C[0x118];
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ EnDnkActionFunc actionFunc;
|
||||
/* 0x18C */ UNK_TYPE1 unk_18C[0x4];
|
||||
/* 0x190 */ ColliderCylinder collider;
|
||||
/* 0x1DC */ Vec3s jointTable[11];
|
||||
/* 0x21E */ Vec3s morphTable[11];
|
||||
/* 0x260 */ Gfx* unk_260[11];
|
||||
/* 0x28C */ u16 unk_28C;
|
||||
/* 0x28E */ s8 unk_28E;
|
||||
/* 0x290 */ s16 unk_290;
|
||||
/* 0x292 */ s16 unk_292;
|
||||
/* 0x294 */ s16 unk_294;
|
||||
/* 0x296 */ s16 unk_296;
|
||||
/* 0x298 */ s16 unk_298;
|
||||
/* 0x29A */ UNK_TYPE1 unk_29A[0x4];
|
||||
/* 0x29E */ s16 unk_29E;
|
||||
/* 0x2A0 */ s16 unk_2A0;
|
||||
/* 0x2A2 */ s16 unk_2A2;
|
||||
} EnDnk; // size = 0x2A4
|
||||
|
||||
extern const ActorInit En_Dnk_InitVars;
|
||||
|
|
|
@ -1852,6 +1852,35 @@ D_06002950 = 0x06002950;
|
|||
D_060023B8 = 0x060023B8;
|
||||
D_06002468 = 0x06002468;
|
||||
D_06002848 = 0x06002848;
|
||||
D_06000B70 = 0x06000B70;
|
||||
D_06002A08 = 0x06002A08;
|
||||
D_0600031C = 0x0600031C;
|
||||
D_06000430 = 0x06000430;
|
||||
D_06000894 = 0x06000894;
|
||||
D_06002B6C = 0x06002B6C;
|
||||
D_060006CC = 0x060006CC;
|
||||
D_060024CC = 0x060024CC;
|
||||
D_060026C4 = 0x060026C4;
|
||||
D_06002894 = 0x06002894;
|
||||
D_06002B90 = 0x06002B90;
|
||||
D_06002F7C = 0x06002F7C;
|
||||
D_06003128 = 0x06003128;
|
||||
D_060029BC = 0x060029BC;
|
||||
D_06002E84 = 0x06002E84;
|
||||
D_06000168 = 0x06000168;
|
||||
D_0600259C = 0x0600259C;
|
||||
D_06002A5C = 0x06002A5C;
|
||||
D_06002BD4 = 0x06002BD4;
|
||||
D_06002DD4 = 0x06002DD4;
|
||||
D_06002FA4 = 0x06002FA4;
|
||||
D_06003180 = 0x06003180;
|
||||
D_0600326C = 0x0600326C;
|
||||
D_060033E4 = 0x060033E4;
|
||||
D_06003780 = 0x06003780;
|
||||
D_06002950 = 0x06002950;
|
||||
D_06001680 = 0x06001680;
|
||||
D_06001700 = 0x06001700;
|
||||
D_06001780 = 0x06001780;
|
||||
|
||||
// ovl_En_Dno
|
||||
|
||||
|
|
Loading…
Reference in New Issue