mirror of https://github.com/zeldaret/mm.git
BgInibsMovebg OK (#485)
* init messy but matching and data imported * destroy matched * all matching * add param macro * use generated reloc * remove unneccessary comment * add comment * cleanup * feedback * use NULL * sort variables by address
This commit is contained in:
parent
2d15fd4a41
commit
5e72c01ff4
3
spec
3
spec
|
@ -4441,8 +4441,7 @@ beginseg
|
|||
name "ovl_Bg_Inibs_Movebg"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Bg_Inibs_Movebg/z_bg_inibs_movebg.o"
|
||||
include "build/data/ovl_Bg_Inibs_Movebg/ovl_Bg_Inibs_Movebg.data.o"
|
||||
include "build/data/ovl_Bg_Inibs_Movebg/ovl_Bg_Inibs_Movebg.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Bg_Inibs_Movebg/ovl_Bg_Inibs_Movebg_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
@ -14,7 +14,6 @@ void BgInibsMovebg_Init(Actor* thisx, GlobalContext* globalCtx);
|
|||
void BgInibsMovebg_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgInibsMovebg_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
#if 0
|
||||
const ActorInit Bg_Inibs_Movebg_InitVars = {
|
||||
ACTOR_BG_INIBS_MOVEBG,
|
||||
ACTORCAT_BG,
|
||||
|
@ -27,17 +26,56 @@ const ActorInit Bg_Inibs_Movebg_InitVars = {
|
|||
(ActorFunc)BgInibsMovebg_Draw,
|
||||
};
|
||||
|
||||
// static InitChainEntry sInitChain[] = {
|
||||
static InitChainEntry D_80B96578[] = {
|
||||
extern Gfx D_06001C10[];
|
||||
extern Gfx D_06001DC0[];
|
||||
extern AnimatedMaterial D_06002598;
|
||||
extern Gfx D_06006140[];
|
||||
extern Gfx D_060062D8[];
|
||||
extern AnimatedMaterial D_06006858;
|
||||
Gfx* D_80B96560[] = { D_060062D8, D_06001DC0 };
|
||||
Gfx* D_80B96568[] = { D_06006140, D_06001C10 };
|
||||
AnimatedMaterial* D_80B96570[] = { &D_06006858, &D_06002598 };
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#endif
|
||||
void BgInibsMovebg_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgInibsMovebg* this = THIS;
|
||||
|
||||
extern InitChainEntry D_80B96578[];
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, 1);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Inibs_Movebg/BgInibsMovebg_Init.s")
|
||||
this->unk_15C = D_80B96560[BGINIBSMOVEBG_GET_F(thisx)];
|
||||
this->unk_160 = D_80B96568[BGINIBSMOVEBG_GET_F(thisx)];
|
||||
this->unk_164 = D_80B96570[BGINIBSMOVEBG_GET_F(thisx)];
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Inibs_Movebg/BgInibsMovebg_Destroy.s")
|
||||
void BgInibsMovebg_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgInibsMovebg* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Inibs_Movebg/BgInibsMovebg_Draw.s")
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void BgInibsMovebg_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgInibsMovebg* this = THIS;
|
||||
|
||||
AnimatedMaterial* animMat;
|
||||
Gfx* dl1;
|
||||
Gfx* dl2;
|
||||
|
||||
animMat = this->unk_164;
|
||||
if (animMat != NULL) {
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(this->unk_164));
|
||||
}
|
||||
|
||||
dl1 = this->unk_15C;
|
||||
if (dl1 != NULL) {
|
||||
func_800BDFC0(globalCtx, this->unk_15C);
|
||||
}
|
||||
|
||||
dl2 = this->unk_160;
|
||||
if (dl2 != NULL) {
|
||||
func_800BE03C(globalCtx, this->unk_160);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,9 +5,13 @@
|
|||
|
||||
struct BgInibsMovebg;
|
||||
|
||||
#define BGINIBSMOVEBG_GET_F(thisx) ((u16)((thisx)->params) & 0xF)
|
||||
|
||||
typedef struct BgInibsMovebg {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x24];
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ Gfx* unk_15C;
|
||||
/* 0x160 */ Gfx* unk_160;
|
||||
/* 0x164 */ AnimatedMaterial* unk_164;
|
||||
} BgInibsMovebg; // size = 0x168
|
||||
|
||||
extern const ActorInit Bg_Inibs_Movebg_InitVars;
|
||||
|
|
|
@ -881,6 +881,15 @@ D_06013058 = 0x06013058;
|
|||
D_060006B0 = 0x060006B0;
|
||||
D_060016DC = 0x060016DC;
|
||||
|
||||
// ovl_Bg_Inibs_Movebg
|
||||
|
||||
D_06001C10 = 0x06001C10;
|
||||
D_06001DC0 = 0x06001DC0;
|
||||
D_06002598 = 0x06002598;
|
||||
D_06006140 = 0x06006140;
|
||||
D_060062D8 = 0x060062D8;
|
||||
D_06006858 = 0x06006858;
|
||||
|
||||
// ovl_Bg_Keikoku_Saku
|
||||
|
||||
D_06001640 = 0x06001640;
|
||||
|
|
Loading…
Reference in New Issue