mirror of https://github.com/zeldaret/mm.git
bg_haka_tomb OK (#188)
* Formats files and updates functions.h * Made all suggested changes * Fixed new warning
This commit is contained in:
parent
3098abd4f6
commit
c00b385586
|
|
@ -2737,7 +2737,7 @@ u8 func_8013DB90(GlobalContext* globalCtx, UNK_PTR arg1, f32 arg2);
|
|||
// void func_8013E07C(void);
|
||||
// void func_8013E0A4(void);
|
||||
void func_8013E1C8(s32 iParm1, s32 iParm2, s32 iParm3, s32* piParm4);
|
||||
// void func_8013E2D4(void);
|
||||
s32 func_8013E2D4(Actor* actor, s16 arg1, s32 arg2, s32 arg3);
|
||||
// void func_8013E3B8(void);
|
||||
// void func_8013E4B0(void);
|
||||
// void func_8013E5CC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
|
||||
|
|
|
|||
|
|
@ -8175,9 +8175,9 @@ SECTIONS
|
|||
ovl_Bg_Haka_Tomb : AT(RomLocation)
|
||||
{
|
||||
build/src/overlays/actors/ovl_Bg_Haka_Tomb/z_bg_haka_tomb.o(.text)
|
||||
build/asm/overlays/ovl_Bg_Haka_Tomb_data.o(.data)
|
||||
build/src/overlays/actors/ovl_Bg_Haka_Tomb/z_bg_haka_tomb.o(.data)
|
||||
build/src/overlays/actors/ovl_Bg_Haka_Tomb/z_bg_haka_tomb.o(.rodata)
|
||||
build/asm/overlays/ovl_Bg_Haka_Tomb_rodata.o(.rodata)
|
||||
build/src/overlays/actors/ovl_Bg_Haka_Tomb/z_bg_haka_tomb_overlay.o(.ovl)
|
||||
}
|
||||
SegmentEnd = .;
|
||||
SegmentSize = SegmentEnd - SegmentStart;
|
||||
|
|
|
|||
|
|
@ -181,6 +181,10 @@ D_0600DF98 = 0x0600DF98;
|
|||
D_0600F990 = 0x0600F990;
|
||||
D_0600F048 = 0x0600F048;
|
||||
|
||||
/* z_bg_haka_tomb */
|
||||
D_060007B0 = 0x060007B0;
|
||||
D_06000EE8 = 0x06000EE8;
|
||||
|
||||
/* z_en_dy_extra */
|
||||
D_0600DD40 = 0x0600DD40;
|
||||
D_0600DEF0 = 0x0600DEF0;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,16 @@ void BgHakaTomb_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void BgHakaTomb_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgHakaTomb_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
void func_80BD6624(BgHakaTomb* this);
|
||||
void func_80BD66AC(BgHakaTomb* this, GlobalContext* globalCtx);
|
||||
void func_80BD6754(BgHakaTomb* this);
|
||||
void func_80BD6768(BgHakaTomb* this, GlobalContext* globalCtx);
|
||||
void BgHakaTomb_SetupDoNothing(BgHakaTomb* this);
|
||||
void BgHakaTomb_DoNothing(BgHakaTomb* this, GlobalContext* globalCtx);
|
||||
|
||||
extern CollisionHeader D_06000EE8[];
|
||||
extern Gfx D_060007B0[];
|
||||
|
||||
const ActorInit Bg_Haka_Tomb_InitVars = {
|
||||
ACTOR_BG_HAKA_TOMB,
|
||||
ACTORCAT_BG,
|
||||
|
|
@ -21,26 +30,98 @@ const ActorInit Bg_Haka_Tomb_InitVars = {
|
|||
(ActorFunc)BgHakaTomb_Update,
|
||||
(ActorFunc)BgHakaTomb_Draw,
|
||||
};
|
||||
*/
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Bg_Haka_Tomb_0x80BD6580/BgHakaTomb_Init.asm")
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Bg_Haka_Tomb_0x80BD6580/BgHakaTomb_Destroy.asm")
|
||||
static Vec3f D_80BD68A4 = { 30.0f, 90.0f, 0.0f };
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Bg_Haka_Tomb_0x80BD6580/func_80BD6624.asm")
|
||||
void BgHakaTomb_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHakaTomb* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Bg_Haka_Tomb_0x80BD6580/func_80BD6638.asm")
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
BcCheck3_BgActorInit(&this->dyna, 1);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, D_06000EE8);
|
||||
func_8013E3B8(&this->dyna.actor, &this->unk160, 1);
|
||||
func_80BD6624(this);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Bg_Haka_Tomb_0x80BD6580/func_80BD66AC.asm")
|
||||
void BgHakaTomb_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHakaTomb* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Bg_Haka_Tomb_0x80BD6580/func_80BD6754.asm")
|
||||
BgCheck_RemoveActorMesh(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Bg_Haka_Tomb_0x80BD6580/func_80BD6768.asm")
|
||||
void func_80BD6624(BgHakaTomb* this) {
|
||||
this->actionFunc = func_80BD66AC;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Bg_Haka_Tomb_0x80BD6580/func_80BD67A8.asm")
|
||||
s32 func_80BD6638(s16* arg0, s16* arg1, s32 arg2) {
|
||||
s32 pad;
|
||||
s32 retVal = false;
|
||||
s32 i;
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Bg_Haka_Tomb_0x80BD6580/func_80BD67BC.asm")
|
||||
*arg0 = ActorCutscene_GetCurrentIndex();
|
||||
if (*arg0 >= 0) {
|
||||
for (i = 0; i < arg2; i++) {
|
||||
if (*arg0 == arg1[i]) {
|
||||
retVal = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Bg_Haka_Tomb_0x80BD6580/BgHakaTomb_Update.asm")
|
||||
return retVal;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Bg_Haka_Tomb_0x80BD6580/BgHakaTomb_Draw.asm")
|
||||
void func_80BD66AC(BgHakaTomb* this, GlobalContext* globalCtx) {
|
||||
s16 temp;
|
||||
|
||||
if (Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
|
||||
this->dyna.actor.flags |= 9;
|
||||
}
|
||||
if (!func_80BD6638(&temp, this->unk160, 1) && (temp < 0) &&
|
||||
Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
|
||||
this->dyna.actor.flags |= 1;
|
||||
if (this->dyna.actor.isTargeted) {
|
||||
func_80BD6754(this);
|
||||
}
|
||||
} else {
|
||||
this->dyna.actor.flags &= ~1;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BD6754(BgHakaTomb* this) {
|
||||
this->actionFunc = func_80BD6768;
|
||||
}
|
||||
|
||||
void func_80BD6768(BgHakaTomb* this, GlobalContext* globalCtx) {
|
||||
if (func_8013E2D4(&this->dyna.actor, this->unk160[0], -1, 0)) {
|
||||
BgHakaTomb_SetupDoNothing(this);
|
||||
}
|
||||
}
|
||||
|
||||
void BgHakaTomb_SetupDoNothing(BgHakaTomb* this) {
|
||||
this->actionFunc = BgHakaTomb_DoNothing;
|
||||
}
|
||||
|
||||
void BgHakaTomb_DoNothing(BgHakaTomb* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void BgHakaTomb_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgHakaTomb* this = THIS;
|
||||
s32 pad;
|
||||
Vec3f vec;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
Matrix_RotateY(this->dyna.actor.world.rot.y, MTXMODE_NEW);
|
||||
SysMatrix_InsertXRotation_s(this->dyna.actor.world.rot.x, MTXMODE_APPLY);
|
||||
SysMatrix_InsertZRotation_s(this->dyna.actor.world.rot.z, MTXMODE_APPLY);
|
||||
SysMatrix_MultiplyVector3fByState(&D_80BD68A4, &vec);
|
||||
Math_Vec3f_Sum(&this->dyna.actor.world.pos, &vec, &this->dyna.actor.focus.pos);
|
||||
}
|
||||
|
||||
void BgHakaTomb_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
func_800BDFC0(globalCtx, D_060007B0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,12 @@
|
|||
|
||||
struct BgHakaTomb;
|
||||
|
||||
typedef void (*BgHakaTombActionFunc)(struct BgHakaTomb*, GlobalContext*);
|
||||
|
||||
typedef struct BgHakaTomb {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x20];
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ BgHakaTombActionFunc actionFunc;
|
||||
/* 0x160 */ s16 unk160[2];
|
||||
} BgHakaTomb; // size = 0x164
|
||||
|
||||
extern const ActorInit Bg_Haka_Tomb_InitVars;
|
||||
|
|
|
|||
|
|
@ -15856,8 +15856,8 @@
|
|||
0x80BD66AC:("func_80BD66AC",),
|
||||
0x80BD6754:("func_80BD6754",),
|
||||
0x80BD6768:("func_80BD6768",),
|
||||
0x80BD67A8:("func_80BD67A8",),
|
||||
0x80BD67BC:("func_80BD67BC",),
|
||||
0x80BD67A8:("BgHakaTomb_SetupDoNothing",),
|
||||
0x80BD67BC:("BgHakaTomb_DoNothing",),
|
||||
0x80BD67CC:("BgHakaTomb_Update",),
|
||||
0x80BD6844:("BgHakaTomb_Draw",),
|
||||
0x80BD6910:("func_80BD6910",),
|
||||
|
|
|
|||
Loading…
Reference in New Issue