diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2021-07-08 18:30:37 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-08 21:30:37 -0400 |
| commit | 5453731f4e2cadabc518b76ebb1ea9d9d6f366b7 (patch) | |
| tree | 6e4f8179b2d9f83b912133124e2eae4d4c5b1798 /src | |
| parent | 6db3fc7b323e8d81ba848a2baa372b3295a1d29e (diff) | |
ovl_Obj_Ending Data brought over (#196)
* ObjEnding Matches but with unkStruct and no data
* Removed inital code comments
* Added data as a comment
* Add missing semicolon
* Addressed PR comments
* Added data
* Cleanup
* Some documentation
* Change 0 to NULL
* Remove redundant array size
* Cleanup
* Fix Format
* Rename D_80C25CE0
* Change this to thisx for indexing sGraphics
* Change this to thisx
* PR suggestions
* rename graphics
Co-authored-by: Derek Hensley <d.hensley@tempered.io>
Diffstat (limited to 'src')
| -rw-r--r-- | src/overlays/actors/ovl_Obj_Ending/z_obj_ending.c | 63 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Obj_Ending/z_obj_ending.h | 11 |
2 files changed, 37 insertions, 37 deletions
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 0b0e4ebb2..7ae7399ca 100644 --- a/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.c +++ b/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.c @@ -1,3 +1,9 @@ +/* + * File: z_obj_ending.c + * Overlay: ovl_Obj_Ending + * Description: The stump and lighting at the end of the credits + */ + #include "z_obj_ending.h" #define FLAGS 0x00000030 @@ -8,7 +14,6 @@ void ObjEnding_Init(Actor* thisx, GlobalContext* globalCtx); void ObjEnding_Update(Actor* thisx, GlobalContext* globalCtx); void ObjEnding_Draw(Actor* thisx, GlobalContext* globalCtx); -/* const ActorInit Obj_Ending_InitVars = { ACTOR_OBJ_ENDING, ACTORCAT_BG, @@ -20,34 +25,30 @@ const ActorInit Obj_Ending_InitVars = { (ActorFunc)ObjEnding_Update, (ActorFunc)ObjEnding_Draw, }; -*/ -extern InitChainEntry D_80C25CF8[]; -/* -static InitChainEntry sInitChain[] = { - ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), +extern Gfx D_060003D0[]; +extern Gfx D_060031A0[]; +extern Gfx D_06003440[]; +extern AnimatedMaterial D_06001FF8; + +static ObjEndingModelInfo sModelInfo[] = { + { { D_06003440, D_060031A0 }, NULL }, + { { NULL, D_060003D0 }, &D_06001FF8 }, }; -*/ -extern unkStruct D_80C25CE0[]; -/* -static unkStruct D_80C25CE0[2] = { - {0x06003440, 0x060031A0, 0x00000000}, - {0x00000000, 0x060003D0, 0x06001FF8} +static InitChainEntry sInitChain[] = { + ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; -*/ void ObjEnding_Init(Actor* thisx, GlobalContext* globalCtx) { ObjEnding* this = THIS; - AnimatedMaterial* texture; - - Actor_ProcessInitChain(&this->actor, D_80C25CF8); - this->unk144 = &D_80C25CE0[this->actor.params]; - if (false) {} - texture = this->unk144->texture; + AnimatedMaterial* animMat; - if (texture != NULL) { - this->texture = Lib_SegmentedToVirtual(texture); + Actor_ProcessInitChain(thisx, sInitChain); + this->modelInfo = &sModelInfo[thisx->params]; + animMat = this->modelInfo->animMat; + if (animMat != NULL) { + this->animMat = (AnimatedMaterial*)Lib_SegmentedToVirtual(animMat); } } @@ -56,18 +57,18 @@ void ObjEnding_Update(Actor* thisx, GlobalContext* globalCtx) { void ObjEnding_Draw(Actor* thisx, GlobalContext* globalCtx) { ObjEnding* this = THIS; - Gfx* dl; - Gfx* tempunk4; + Gfx* dl1; + Gfx* dl2; - if (this->texture != NULL) { - AnimatedMat_Draw(globalCtx, this->texture); + if (this->animMat != NULL) { + AnimatedMat_Draw(globalCtx, this->animMat); } - tempunk4 = this->unk144->unk0; - if (tempunk4 != 0) { - func_800BDFC0(globalCtx, tempunk4); + dl1 = this->modelInfo->dLists[0]; + if (dl1 != NULL) { + func_800BDFC0(globalCtx, dl1); } - dl = this->unk144->dl; - if (dl != NULL) { - func_800BE03C(globalCtx, dl); + dl2 = this->modelInfo->dLists[1]; + if (dl2 != NULL) { + func_800BE03C(globalCtx, dl2); } } 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 5f4bcf453..fa58607b3 100644 --- a/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.h +++ b/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.h @@ -6,15 +6,14 @@ struct ObjEnding; typedef struct { - /* 0x0 */ UNK_TYPE4 unk0; - /* 0x4 */ Gfx* dl; - /* 0x8 */ AnimatedMaterial *texture; -} unkStruct; // size = 0xC + /* 0x0 */ Gfx* dLists[2]; + /* 0x8 */ AnimatedMaterial *animMat; +} ObjEndingModelInfo; // size = 0xC typedef struct ObjEnding { /* 0x000 */ Actor actor; - /* 0x144 */ unkStruct* unk144; - /* 0x148 */ AnimatedMaterial* texture; + /* 0x144 */ ObjEndingModelInfo* modelInfo; + /* 0x148 */ AnimatedMaterial* animMat; } ObjEnding; // size = 0x14C extern const ActorInit Obj_Ending_InitVars; |
