mirror of https://github.com/zeldaret/mm.git
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>
This commit is contained in:
parent
6db3fc7b32
commit
5453731f4e
|
|
@ -9415,9 +9415,9 @@ SECTIONS
|
|||
ovl_Obj_Ending : AT(RomLocation)
|
||||
{
|
||||
build/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.o(.text)
|
||||
build/asm/overlays/ovl_Obj_Ending_data.o(.data)
|
||||
build/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.o(.data)
|
||||
build/src/overlays/actors/ovl_Obj_Ending/z_obj_ending.o(.rodata)
|
||||
build/asm/overlays/ovl_Obj_Ending_rodata.o(.rodata)
|
||||
build/src/overlays/actors/ovl_Obj_Ending/z_obj_ending_overlay.o(.ovl)
|
||||
}
|
||||
SegmentEnd = .;
|
||||
SegmentSize = SegmentEnd - SegmentStart;
|
||||
|
|
|
|||
|
|
@ -478,6 +478,12 @@ D_06000E88 = 0x06000E88;
|
|||
/* z_obj_dinner */
|
||||
D_060011E0 = 0x060011E0;
|
||||
|
||||
/* z_obj_ending */
|
||||
D_060003D0 = 0x060003D0;
|
||||
D_060031A0 = 0x060031A0;
|
||||
D_06003440 = 0x06003440;
|
||||
D_06001FF8 = 0x06001FF8;
|
||||
|
||||
/* z_obj_funen */
|
||||
D_060000D0 = 0x060000D0;
|
||||
|
||||
|
|
|
|||
|
|
@ -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[];
|
||||
/*
|
||||
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 },
|
||||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
*/
|
||||
|
||||
extern unkStruct D_80C25CE0[];
|
||||
/*
|
||||
static unkStruct D_80C25CE0[2] = {
|
||||
{0x06003440, 0x060031A0, 0x00000000},
|
||||
{0x00000000, 0x060003D0, 0x06001FF8}
|
||||
};
|
||||
*/
|
||||
|
||||
void ObjEnding_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjEnding* this = THIS;
|
||||
AnimatedMaterial* texture;
|
||||
AnimatedMaterial* animMat;
|
||||
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -18879,7 +18879,7 @@
|
|||
0x80C25B94:("enInvisibleRuppeOverlayRelocations","u32","[10]",0x28),
|
||||
0x80C25BBC:("enInvisibleRuppeOverlayInfoOffset","u32","",0x4),
|
||||
0x80C25CC0:("Obj_Ending_InitVars","UNK_TYPE1","",0x1),
|
||||
0x80C25CE0:("D_80C25CE0","UNK_TYPE1","",0x1),
|
||||
0x80C25CE0:("sModelInfo","UNK_TYPE1","",0x1),
|
||||
0x80C25CF8:("D_80C25CF8","UNK_TYPE1","",0x1),
|
||||
0x80C25D00:("objEndingOverlayInfo","OverlayRelocationSection","",0x14),
|
||||
0x80C25D14:("objEndingOverlayRelocations","u32","[7]",0x1c),
|
||||
|
|
|
|||
Loading…
Reference in New Issue