mirror of https://github.com/zeldaret/mm.git
ovl_Bg_Botihasira decompiled (#857)
* ovl_Bg_Botihasira decompiled * pr fixes * PR review changes * undef syms * PlayState Co-authored-by: SonicDcer <noreply@github.com>
This commit is contained in:
parent
bc2ca6bc7f
commit
6052230233
3
spec
3
spec
|
|
@ -3840,8 +3840,7 @@ beginseg
|
|||
name "ovl_Bg_Botihasira"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Bg_Botihasira/z_bg_botihasira.o"
|
||||
include "build/data/ovl_Bg_Botihasira/ovl_Bg_Botihasira.data.o"
|
||||
include "build/data/ovl_Bg_Botihasira/ovl_Bg_Botihasira.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Bg_Botihasira/ovl_Bg_Botihasira_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "z_bg_botihasira.h"
|
||||
#include "objects/object_botihasira/object_botihasira.h"
|
||||
|
||||
#define FLAGS 0x00000000
|
||||
|
||||
|
|
@ -12,10 +13,11 @@
|
|||
|
||||
void BgBotihasira_Init(Actor* thisx, PlayState* play);
|
||||
void BgBotihasira_Destroy(Actor* thisx, PlayState* play);
|
||||
void BgBotihasira_Update(Actor* thisx, PlayState* play);
|
||||
void BgBotihasira_Update(Actor* thisx, PlayState* play2);
|
||||
void BgBotihasira_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
#if 0
|
||||
void BgBotihasira_DoNothing(BgBotihasira* this, PlayState* play);
|
||||
|
||||
const ActorInit Bg_Botihasira_InitVars = {
|
||||
ACTOR_BG_BOTIHASIRA,
|
||||
ACTORCAT_ITEMACTION,
|
||||
|
|
@ -28,26 +30,74 @@ const ActorInit Bg_Botihasira_InitVars = {
|
|||
(ActorFunc)BgBotihasira_Draw,
|
||||
};
|
||||
|
||||
// static ColliderCylinderInit sCylinderInit = {
|
||||
static ColliderCylinderInit D_80B282F0 = {
|
||||
{ COLTYPE_METAL, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, OC2_TYPE_1, COLSHAPE_CYLINDER, },
|
||||
{ ELEMTYPE_UNK2, { 0xF7CFFFFF, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{
|
||||
COLTYPE_METAL,
|
||||
AT_NONE,
|
||||
AC_ON | AC_TYPE_PLAYER,
|
||||
OC1_ON | OC1_TYPE_ALL,
|
||||
OC2_TYPE_1,
|
||||
COLSHAPE_CYLINDER,
|
||||
},
|
||||
{
|
||||
ELEMTYPE_UNK2,
|
||||
{ 0xF7CFFFFF, 0x00, 0x00 },
|
||||
{ 0xF7CFFFFF, 0x00, 0x00 },
|
||||
TOUCH_NONE | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 27, 80, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
#endif
|
||||
void BgBotihasira_Init(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
BgBotihasira* this = THIS;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
extern ColliderCylinderInit D_80B282F0;
|
||||
if (this->dyna.actor.params == 0) {
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
CollisionHeader_GetVirtual(&object_botihasira_Colheader_001BD8, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
} else {
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit);
|
||||
}
|
||||
this->actionFunc = BgBotihasira_DoNothing;
|
||||
this->dyna.actor.scale.z = this->dyna.actor.scale.y = this->dyna.actor.scale.x = 0.1f;
|
||||
}
|
||||
|
||||
extern UNK_TYPE D_06000638;
|
||||
extern UNK_TYPE D_06001BD8;
|
||||
void BgBotihasira_Destroy(Actor* thisx, PlayState* play) {
|
||||
BgBotihasira* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Botihasira/BgBotihasira_Init.s")
|
||||
if (this->dyna.actor.params == 0) {
|
||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Botihasira/BgBotihasira_Destroy.s")
|
||||
void BgBotihasira_DoNothing(BgBotihasira* this, PlayState* play) {
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Botihasira/func_80B2815C.s")
|
||||
void BgBotihasira_Update(Actor* thisx, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
BgBotihasira* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Botihasira/BgBotihasira_Update.s")
|
||||
this->actionFunc(this, play);
|
||||
if (this->dyna.actor.params != 0) {
|
||||
this->dyna.actor.world.pos.x = this->dyna.actor.home.pos.x + (Math_SinS(this->dyna.actor.world.rot.y) * -27.0f);
|
||||
this->dyna.actor.world.pos.z = this->dyna.actor.home.pos.z + (Math_CosS(this->dyna.actor.world.rot.y) * 7.0f);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
Math_Vec3f_Copy(&this->dyna.actor.world.pos, &this->dyna.actor.home.pos);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Botihasira/BgBotihasira_Draw.s")
|
||||
void BgBotihasira_Draw(Actor* thisx, PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_botihasira_DL_000638);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,9 @@ struct BgBotihasira;
|
|||
typedef void (*BgBotihasiraActionFunc)(struct BgBotihasira*, PlayState*);
|
||||
|
||||
typedef struct BgBotihasira {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x0144 */ char unk_144[0x18];
|
||||
/* 0x015C */ BgBotihasiraActionFunc actionFunc;
|
||||
/* 0x0160 */ char unk_160[0x4C];
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ BgBotihasiraActionFunc actionFunc;
|
||||
/* 0x160 */ ColliderCylinder collider;
|
||||
} BgBotihasira; // size = 0x1AC
|
||||
|
||||
extern const ActorInit Bg_Botihasira_InitVars;
|
||||
|
|
|
|||
|
|
@ -540,11 +540,6 @@ D_06011AB8 = 0x06011AB8;
|
|||
D_06012A80 = 0x06012A80;
|
||||
D_06013138 = 0x06013138;
|
||||
|
||||
// ovl_Bg_Botihasira
|
||||
|
||||
D_06000638 = 0x06000638;
|
||||
D_06001BD8 = 0x06001BD8;
|
||||
|
||||
// ovl_Bg_Crace_Movebg
|
||||
|
||||
D_060003A0 = 0x060003A0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue