mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-22 22:44:14 -04:00
Document BgAstrBombwall (#1865)
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
<Texture Name="object_astr_obj_Tex_000820" OutName="tex_000820" Format="ci4" Width="64" Height="64" Offset="0x820" />
|
||||
<Texture Name="object_astr_obj_Tex_001020" OutName="tex_001020" Format="ia8" Width="64" Height="64" Offset="0x1020" />
|
||||
<DList Name="object_astr_obj_DL_002170" Offset="0x2170" />
|
||||
<DList Name="object_astr_obj_DL_002178" Offset="0x2178" /> <!-- Original name is "z2_tennmondai_hahen_model" ("tennmondai" = "astronomical observatory", "hahen" = "fragment") -->
|
||||
<DList Name="object_astr_obj_DL_0022E0" Offset="0x22E0" />
|
||||
<DList Name="object_astr_obj_DL_002380" Offset="0x2380" /> <!-- Original name is "z2_tennmondai_kabe_model" ("tennmondai" = "astronomical observatory", "kabe" = "wall") -->
|
||||
<Collision Name="object_astr_obj_Colheader_002498" Offset="0x2498" /> <!-- Original name is "z2_tennmondai_kabe_bgdatainfo" -->
|
||||
<DList Name="gAstralObservatoryBombWallFragmentDL" Offset="0x2178" /> <!-- Original name is "z2_tennmondai_hahen_model" ("tennmondai" = "astronomical observatory", "hahen" = "fragment") -->
|
||||
<DList Name="gAstralObservatoryBombWallCrackDL" Offset="0x22E0" />
|
||||
<DList Name="gAstralObservatoryBombWallDL" Offset="0x2380" /> <!-- Original name is "z2_tennmondai_kabe_model" ("tennmondai" = "astronomical observatory", "kabe" = "wall") -->
|
||||
<Collision Name="gAstralObservatoryBombWallCol" Offset="0x2498" /> <!-- Original name is "z2_tennmondai_kabe_bgdatainfo" -->
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -14,12 +14,12 @@ void BgAstrBombwall_Destroy(Actor* thisx, PlayState* play);
|
||||
void BgAstrBombwall_Update(Actor* thisx, PlayState* play);
|
||||
void BgAstrBombwall_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_80C0A378(BgAstrBombwall* this);
|
||||
void func_80C0A38C(BgAstrBombwall* this, PlayState* play);
|
||||
void func_80C0A400(BgAstrBombwall* this, PlayState* play);
|
||||
void func_80C0A418(BgAstrBombwall* this, PlayState* play);
|
||||
void func_80C0A458(BgAstrBombwall* this, PlayState* play);
|
||||
void func_80C0A4BC(BgAstrBombwall* this, PlayState* play);
|
||||
void BgAstrBombwall_SetupStanding(BgAstrBombwall* this);
|
||||
void BgAstrBombwall_Standing(BgAstrBombwall* this, PlayState* play);
|
||||
void BgAstrBombwall_SetupExploding(BgAstrBombwall* this, PlayState* play);
|
||||
void BgAstrBombwall_Exploding(BgAstrBombwall* this, PlayState* play);
|
||||
void BgAstrBombwall_SetupCollapsing(BgAstrBombwall* this, PlayState* play);
|
||||
void BgAstrBombwall_Collapsing(BgAstrBombwall* this, PlayState* play);
|
||||
|
||||
ActorProfile Bg_Astr_Bombwall_Profile = {
|
||||
/**/ ACTOR_BG_ASTR_BOMBWALL,
|
||||
@@ -99,7 +99,7 @@ void BgAstrBombwall_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &object_astr_obj_Colheader_002498);
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &gAstralObservatoryBombWallCol);
|
||||
Collider_InitTris(play, &this->collider);
|
||||
if (Flags_GetSwitch(play, BGASTRBOMBWALL_GET_SWITCH_FLAG(thisx))) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
@@ -112,7 +112,7 @@ void BgAstrBombwall_Init(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
BgAstrBombwall_InitCollider(&sTrisInit, &this->dyna.actor.world.pos, &this->dyna.actor.shape.rot, &this->collider);
|
||||
SubS_FillCutscenesList(&this->dyna.actor, this->csIdList, ARRAY_COUNT(this->csIdList));
|
||||
func_80C0A378(this);
|
||||
BgAstrBombwall_SetupStanding(this);
|
||||
}
|
||||
|
||||
void BgAstrBombwall_Destroy(Actor* thisx, PlayState* play) {
|
||||
@@ -121,11 +121,11 @@ void BgAstrBombwall_Destroy(Actor* thisx, PlayState* play) {
|
||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_80C0A120(BgAstrBombwall* this, PlayState* play) {
|
||||
void BgAstrBombwall_SpawnFragments(BgAstrBombwall* this, PlayState* play) {
|
||||
s32 i;
|
||||
Vec3f vec;
|
||||
Vec3f pos;
|
||||
s16 var_v0;
|
||||
s16 spinRate;
|
||||
Vec3f velocity;
|
||||
f32 rand;
|
||||
|
||||
@@ -143,50 +143,50 @@ void func_80C0A120(BgAstrBombwall* this, PlayState* play) {
|
||||
rand = Rand_ZeroOne();
|
||||
|
||||
if (rand < 0.2f) {
|
||||
var_v0 = 0x60;
|
||||
spinRate = 0x60;
|
||||
} else if (rand < 0.6f) {
|
||||
var_v0 = 0x40;
|
||||
spinRate = 0x40;
|
||||
} else {
|
||||
var_v0 = 0x20;
|
||||
spinRate = 0x20;
|
||||
}
|
||||
EffectSsKakera_Spawn(play, &pos, &velocity, &pos, -260, var_v0, 20, 0, 0, 10, 0, 0, 50, -1, OBJECT_ASTR_OBJ,
|
||||
object_astr_obj_DL_002178);
|
||||
EffectSsKakera_Spawn(play, &pos, &velocity, &pos, -260, spinRate, 20, 0, 0, 10, 0, 0, 50, -1, OBJECT_ASTR_OBJ,
|
||||
gAstralObservatoryBombWallFragmentDL);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80C0A378(BgAstrBombwall* this) {
|
||||
this->actionFunc = func_80C0A38C;
|
||||
void BgAstrBombwall_SetupStanding(BgAstrBombwall* this) {
|
||||
this->actionFunc = BgAstrBombwall_Standing;
|
||||
}
|
||||
|
||||
void func_80C0A38C(BgAstrBombwall* this, PlayState* play) {
|
||||
void BgAstrBombwall_Standing(BgAstrBombwall* this, PlayState* play) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Flags_SetSwitch(play, BGASTRBOMBWALL_GET_SWITCH_FLAG(&this->dyna.actor));
|
||||
func_80C0A400(this, play);
|
||||
BgAstrBombwall_SetupExploding(this, play);
|
||||
} else {
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80C0A400(BgAstrBombwall* this, PlayState* play) {
|
||||
this->actionFunc = func_80C0A418;
|
||||
void BgAstrBombwall_SetupExploding(BgAstrBombwall* this, PlayState* play) {
|
||||
this->actionFunc = BgAstrBombwall_Exploding;
|
||||
}
|
||||
|
||||
void func_80C0A418(BgAstrBombwall* this, PlayState* play) {
|
||||
void BgAstrBombwall_Exploding(BgAstrBombwall* this, PlayState* play) {
|
||||
if (SubS_StartCutscene(&this->dyna.actor, this->csIdList[0], CS_ID_NONE, SUBS_CUTSCENE_WITH_PLAYER)) {
|
||||
func_80C0A458(this, play);
|
||||
BgAstrBombwall_SetupCollapsing(this, play);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80C0A458(BgAstrBombwall* this, PlayState* play) {
|
||||
void BgAstrBombwall_SetupCollapsing(BgAstrBombwall* this, PlayState* play) {
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->dyna.actor.draw = NULL;
|
||||
func_80C0A120(this, play);
|
||||
BgAstrBombwall_SpawnFragments(this, play);
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
|
||||
this->actionFunc = func_80C0A4BC;
|
||||
this->actionFunc = BgAstrBombwall_Collapsing;
|
||||
}
|
||||
|
||||
void func_80C0A4BC(BgAstrBombwall* this, PlayState* play) {
|
||||
void BgAstrBombwall_Collapsing(BgAstrBombwall* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void BgAstrBombwall_Update(Actor* thisx, PlayState* play) {
|
||||
@@ -205,7 +205,7 @@ void BgAstrBombwall_Draw(Actor* thixs, PlayState* play) {
|
||||
gSPDisplayList(&opa[0], gSetupDLs[SETUPDL_25]);
|
||||
MATRIX_FINALIZE_AND_LOAD(&opa[1], play->state.gfxCtx);
|
||||
gSPSetGeometryMode(&opa[2], G_LIGHTING_POSITIONAL);
|
||||
gSPDisplayList(&opa[3], object_astr_obj_DL_002380);
|
||||
gSPDisplayList(&opa[3], gAstralObservatoryBombWallDL);
|
||||
POLY_OPA_DISP = &opa[4];
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
@@ -219,7 +219,7 @@ void BgAstrBombwall_Draw(Actor* thixs, PlayState* play) {
|
||||
gSPDisplayList(&xlu[0], gSetupDLs[SETUPDL_25]);
|
||||
MATRIX_FINALIZE_AND_LOAD(&xlu[1], play->state.gfxCtx);
|
||||
gSPSetGeometryMode(&xlu[2], G_LIGHTING_POSITIONAL);
|
||||
gSPDisplayList(&xlu[3], object_astr_obj_DL_0022E0);
|
||||
gSPDisplayList(&xlu[3], gAstralObservatoryBombWallCrackDL);
|
||||
POLY_XLU_DISP = &xlu[4];
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
@@ -16637,13 +16637,13 @@ EnKitan_Draw = 0x80C0CB70; // type:func size:0x60
|
||||
BgAstrBombwall_InitCollider = 0x80C0CD70; // type:func size:0x11C
|
||||
BgAstrBombwall_Init = 0x80C0CE8C; // type:func size:0x100
|
||||
BgAstrBombwall_Destroy = 0x80C0CF8C; // type:func size:0x34
|
||||
func_80C0A120 = 0x80C0CFC0; // type:func size:0x258
|
||||
func_80C0A378 = 0x80C0D218; // type:func size:0x14
|
||||
func_80C0A38C = 0x80C0D22C; // type:func size:0x74
|
||||
func_80C0A400 = 0x80C0D2A0; // type:func size:0x18
|
||||
func_80C0A418 = 0x80C0D2B8; // type:func size:0x40
|
||||
func_80C0A458 = 0x80C0D2F8; // type:func size:0x64
|
||||
func_80C0A4BC = 0x80C0D35C; // type:func size:0x10
|
||||
BgAstrBombwall_SpawnFragments = 0x80C0CFC0; // type:func size:0x258
|
||||
BgAstrBombwall_SetupStanding = 0x80C0D218; // type:func size:0x14
|
||||
BgAstrBombwall_Standing = 0x80C0D22C; // type:func size:0x74
|
||||
BgAstrBombwall_SetupExploding = 0x80C0D2A0; // type:func size:0x18
|
||||
BgAstrBombwall_Exploding = 0x80C0D2B8; // type:func size:0x40
|
||||
BgAstrBombwall_SetupCollapsing = 0x80C0D2F8; // type:func size:0x64
|
||||
BgAstrBombwall_Collapsing = 0x80C0D35C; // type:func size:0x10
|
||||
BgAstrBombwall_Update = 0x80C0D36C; // type:func size:0x24
|
||||
BgAstrBombwall_Draw = 0x80C0D390; // type:func size:0x110
|
||||
func_80C0A740 = 0x80C0D5E0; // type:func size:0xC4
|
||||
|
||||
@@ -16647,13 +16647,13 @@ EnKitan_Draw = 0x80C09CD0; // type:func
|
||||
BgAstrBombwall_InitCollider = 0x80C09ED0; // type:func
|
||||
BgAstrBombwall_Init = 0x80C09FEC; // type:func
|
||||
BgAstrBombwall_Destroy = 0x80C0A0EC; // type:func
|
||||
func_80C0A120 = 0x80C0A120; // type:func
|
||||
func_80C0A378 = 0x80C0A378; // type:func
|
||||
func_80C0A38C = 0x80C0A38C; // type:func
|
||||
func_80C0A400 = 0x80C0A400; // type:func
|
||||
func_80C0A418 = 0x80C0A418; // type:func
|
||||
func_80C0A458 = 0x80C0A458; // type:func
|
||||
func_80C0A4BC = 0x80C0A4BC; // type:func
|
||||
BgAstrBombwall_SpawnFragments = 0x80C0A120; // type:func
|
||||
BgAstrBombwall_SetupStanding = 0x80C0A378; // type:func
|
||||
BgAstrBombwall_Standing = 0x80C0A38C; // type:func
|
||||
BgAstrBombwall_SetupExploding = 0x80C0A400; // type:func
|
||||
BgAstrBombwall_Exploding = 0x80C0A418; // type:func
|
||||
BgAstrBombwall_SetupCollapsing = 0x80C0A458; // type:func
|
||||
BgAstrBombwall_Collapsing = 0x80C0A4BC; // type:func
|
||||
BgAstrBombwall_Update = 0x80C0A4CC; // type:func
|
||||
BgAstrBombwall_Draw = 0x80C0A4F0; // type:func
|
||||
func_80C0A740 = 0x80C0A740; // type:func
|
||||
|
||||
Reference in New Issue
Block a user