diff --git a/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.c b/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.c index 0202e0e287..cacd8307a5 100644 --- a/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.c +++ b/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.c @@ -22,8 +22,52 @@ const ActorInit Obj_Ending_InitVars = { }; */ -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Obj_Ending_0x80C25BC0/ObjEnding_Init.asm") +extern InitChainEntry D_80C25CF8[]; +/* +static InitChainEntry sInitChain[] = { + ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), +}; +*/ -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Obj_Ending_0x80C25BC0/ObjEnding_Update.asm") +extern unkStruct D_80C25CE0[]; +/* +static unkStruct D_80C25CE0[2] = { + {0x06003440, 0x060031A0, 0x00000000}, + {0x00000000, 0x060003D0, 0x06001FF8} +}; +*/ -#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Obj_Ending_0x80C25BC0/ObjEnding_Draw.asm") +void ObjEnding_Init(Actor* thisx, GlobalContext *globalCtx) { + ObjEnding* this = THIS; + AnimatedTexture *texture; + + Actor_ProcessInitChain(&this->actor, D_80C25CF8); + this->unk144 = &D_80C25CE0[this->actor.params]; + if(false){} + texture = this->unk144->texture; + + if (texture != NULL) { + this->texture = Lib_SegmentedToVirtual(texture); + } +} + +void ObjEnding_Update(Actor *thisx, GlobalContext *globalCtx) { +} + +void ObjEnding_Draw(Actor *thisx, GlobalContext *globalCtx) { + ObjEnding *this = THIS; + Gfx *dl; + UNK_TYPE4 tempunk4; + + if (this->texture != NULL) { + SceneProc_DrawAllSceneAnimatedTextures(globalCtx, this->texture); + } + tempunk4 = this->unk144->unk0; + if (tempunk4 != 0) { + func_800BDFC0(globalCtx, tempunk4); + } + dl = this->unk144->dl; + if (dl != NULL) { + func_800BE03C(globalCtx, dl); + } +} diff --git a/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.h b/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.h index 269279c1ee..fd0ff98cbd 100644 --- a/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.h +++ b/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.h @@ -5,9 +5,16 @@ struct ObjEnding; +typedef struct { + /* 0x0 */ UNK_TYPE4 unk0; + /* 0x4 */ Gfx* dl; + /* 0x8 */ AnimatedTexture *texture; +} unkStruct; // size = 0xC + typedef struct ObjEnding { /* 0x000 */ Actor actor; - /* 0x144 */ char unk_144[0x8]; + /* 0x144 */ unkStruct* unk144; + /* 0x148 */ AnimatedTexture* texture; } ObjEnding; // size = 0x14C extern const ActorInit Obj_Ending_InitVars;