summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfullgrowngaming <42490167+fullgrowngaming@users.noreply.github.com>2020-10-12 20:33:02 -0700
committerGitHub <noreply@github.com>2020-10-12 22:33:02 -0500
commit98992c25b47d8f9bc54977cb49cfd86907221c93 (patch)
treea8951d739add3762f74b27ec9fcf62a33fe5bef0 /src
parentf3fbb6474c03813fd48bfdf013e6ccb0137fb145 (diff)
ending_hero3 OK (#38)
Co-authored-by: Rozelette <Rozelette@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.c50
-rw-r--r--src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.h8
2 files changed, 49 insertions, 9 deletions
diff --git a/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.c b/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.c
index 179149f14..3209ceb8b 100644
--- a/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.c
+++ b/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.c
@@ -9,7 +9,9 @@ void EnEndingHero3_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnEndingHero3_Update(Actor* thisx, GlobalContext* globalCtx);
void EnEndingHero3_Draw(Actor* thisx, GlobalContext* globalCtx);
-/*
+void func_80C23518(EnEndingHero3* this);
+void func_80C23534(EnEndingHero3* this, GlobalContext* globalCtx);
+
const ActorInit En_Ending_Hero3_InitVars = {
ACTOR_EN_ENDING_HERO3,
ACTORTYPE_NPC,
@@ -21,16 +23,48 @@ const ActorInit En_Ending_Hero3_InitVars = {
(ActorFunc)EnEndingHero3_Update,
(ActorFunc)EnEndingHero3_Draw
};
-*/
-GLOBAL_ASM("asm/non_matchings/ovl_En_Ending_Hero3_0x80C23460/EnEndingHero3_Init.asm")
+extern SkeletonHeader D_06007150;
+extern AnimationHeader D_06000E50;
+
+void EnEndingHero3_Init(Actor* thisx, GlobalContext* globalCtx) {
+ EnEndingHero3* this = THIS;
+
+ this->actor.unkA0.mass = 0xFF;
+ Actor_SetScale(&this->actor, 0.01f);
+ this->actor.unk1F = 6;
+ this->actor.gravity = -3.0f;
+ SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06007150, &D_06000E50, this->limbDrawTable,
+ this->transitionDrawTable, 17);
+ Actor_SetDrawParams(&this->actor.shape, 0.0f, func_800B3FC0, 25.0f);
+ func_80C23518(&this->actor);
+}
+
+void EnEndingHero3_Destroy(Actor* thisx, GlobalContext* globalCtx) {
+}
+
+void func_80C23518(EnEndingHero3* this) {
+ this->unk258 = 1;
+ this->actionFunc = func_80C23534;
+}
-GLOBAL_ASM("asm/non_matchings/ovl_En_Ending_Hero3_0x80C23460/EnEndingHero3_Destroy.asm")
+void func_80C23534(EnEndingHero3* this, GlobalContext* globalCtx) {
+ SkelAnime_FrameUpdateMatrix(&this->skelAnime);
+}
-GLOBAL_ASM("asm/non_matchings/ovl_En_Ending_Hero3_0x80C23460/func_80C23518.asm")
+void EnEndingHero3_Update(Actor* thisx, GlobalContext* globalCtx) {
+ EnEndingHero3* this = THIS;
-GLOBAL_ASM("asm/non_matchings/ovl_En_Ending_Hero3_0x80C23460/func_80C23534.asm")
+ this->actionFunc(this, globalCtx);
+ Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
+ func_800B78B8(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
+}
-GLOBAL_ASM("asm/non_matchings/ovl_En_Ending_Hero3_0x80C23460/EnEndingHero3_Update.asm")
+void EnEndingHero3_Draw(Actor* thisx, GlobalContext* globalCtx) {
+ EnEndingHero3* this = THIS;
-GLOBAL_ASM("asm/non_matchings/ovl_En_Ending_Hero3_0x80C23460/EnEndingHero3_Draw.asm")
+ func_8012C28C(globalCtx->state.gfxCtx);
+ func_8012C2DC(globalCtx->state.gfxCtx);
+ SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, 0, 0,
+ &this->actor);
+}
diff --git a/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.h b/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.h
index 84c8a59d3..c040b279a 100644
--- a/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.h
+++ b/src/overlays/actors/ovl_En_Ending_Hero3/z_en_ending_hero3.h
@@ -5,9 +5,15 @@
struct EnEndingHero3;
+typedef void (*EnEndingHero3ActionFunc)(struct BgHakaCurtain*, GlobalContext*);
+
typedef struct EnEndingHero3 {
/* 0x000 */ Actor actor;
- /* 0x144 */ char unk_144[0x118];
+ /* 0x144 */ SkelAnime skelAnime;
+ /* 0x188 */ Vec3s limbDrawTable[17];
+ /* 0x1EE */ Vec3s transitionDrawTable[17];
+ /* 0x254 */ EnEndingHero3ActionFunc actionFunc;
+ /* 0x258 */ u16 unk258;
} EnEndingHero3; // size = 0x25C
extern const ActorInit En_Ending_Hero3_InitVars;