mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-07 13:03:29 -04:00
Document kibako2 object (#541)
* Document kibako2 object * Remove "1" from "gLargeCrateTLUT". Was a leftover from OoT * File header comment and tlut naming * Single line comment styling
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
<Root>
|
||||
<!-- Object for large wooden crate -->
|
||||
<File Name="object_kibako2" Segment="6">
|
||||
<Texture Name="object_kibako2_TLUT_000000" OutName="tlut_000000" Format="rgba16" Width="4" Height="4" Offset="0x0" />
|
||||
<Texture Name="object_kibako2_Tex_000020" OutName="tex_000020" Format="ci4" Width="32" Height="64" Offset="0x20" />
|
||||
<Texture Name="object_kibako2_Tex_000420" OutName="tex_000420" Format="ci4" Width="32" Height="64" Offset="0x420" />
|
||||
<DList Name="object_kibako2_DL_000960" Offset="0x960" />
|
||||
<Collision Name="object_kibako2_Colheader_000B70" Offset="0xB70" />
|
||||
<Texture Name="object_kibako2_TLUT_000BA0" OutName="tlut_000BA0" Format="rgba16" Width="4" Height="4" Offset="0xBA0" />
|
||||
<Texture Name="object_kibako2_Tex_000BC0" OutName="tex_000BC0" Format="ci4" Width="32" Height="64" Offset="0xBC0" />
|
||||
<DList Name="object_kibako2_DL_001040" Offset="0x1040" />
|
||||
<DList Name="object_kibako2_DL_001100" Offset="0x1100" />
|
||||
<Texture Name="gLargeCrateTLUT" OutName="large_crate_tlut" Format="rgba16" Width="4" Height="4" Offset="0x0" />
|
||||
<Texture Name="gLargeCrateTopTex" OutName="large_crate_top" Format="ci4" Width="32" Height="64" Offset="0x20" />
|
||||
<Texture Name="gLargeCrateSidesTex" OutName="large_crate_sides" Format="ci4" Width="32" Height="64" Offset="0x420" />
|
||||
<DList Name="gLargeCrateDL" Offset="0x960" />
|
||||
<Collision Name="gLargeCrateCol" Offset="0xB70" />
|
||||
<Texture Name="gLargeCrateFragmentTLUT" OutName="large_crate_fragment_tlut" Format="rgba16" Width="4" Height="4" Offset="0xBA0" />
|
||||
<Texture Name="gLargeCrateFragmentTex" OutName="large_crate_fragment" Format="ci4" Width="32" Height="64" Offset="0xBC0" />
|
||||
<DList Name="gLargeCrateFragment1DL" Offset="0x1040" />
|
||||
<DList Name="gLargeCrateFragment2DL" Offset="0x1100" />
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include "z_obj_kibako2.h"
|
||||
#include "objects/object_kibako2/object_kibako2.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
|
||||
|
||||
#define FLAGS 0x00000000
|
||||
@@ -57,10 +58,6 @@ static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32(uncullZoneDownward, 200, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern Gfx D_06000960[];
|
||||
extern CollisionHeader D_06000B70;
|
||||
extern Gfx D_06001040[];
|
||||
|
||||
s32 ObjKibako2_ContainsSkulltula(ObjKibako2* this, GlobalContext* globalCtx) {
|
||||
s32 actorSpawnParam = KIBAKO2_SKULLTULA_SPAWN_PARAM(&this->dyna.actor);
|
||||
s32 flag = -1;
|
||||
@@ -103,7 +100,7 @@ void ObjKibako2_Break(ObjKibako2* this, GlobalContext* globalCtx) {
|
||||
phi_s0 = 0x20;
|
||||
}
|
||||
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, &pos, -200, phi_s0, 28, 2, 0, (Rand_ZeroOne() * 30.0f) + 5.0f,
|
||||
0, 0, 70, KAKERA_COLOR_NONE, OBJECT_KIBAKO2, D_06001040);
|
||||
0, 0, 70, KAKERA_COLOR_NONE, OBJECT_KIBAKO2, gLargeCrateFragment1DL);
|
||||
}
|
||||
func_800BBFB0(globalCtx, thisPos, 90.0f, 6, 100, 160, 1);
|
||||
}
|
||||
@@ -147,12 +144,12 @@ void ObjKibako2_SpawnContents(ObjKibako2* this, GlobalContext* globalCtx) {
|
||||
void ObjKibako2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjKibako2* this = THIS;
|
||||
s32 pad;
|
||||
ObjKibako2Contents contents = KIBAKO2_CONTENTS(&this->dyna.actor);
|
||||
s32 contents = KIBAKO2_CONTENTS(&this->dyna.actor);
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06000B70);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &gLargeCrateCol);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit);
|
||||
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
|
||||
this->dyna.actor.home.rot.z = 0;
|
||||
@@ -250,5 +247,5 @@ void ObjKibako2_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void ObjKibako2_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
func_800BDFC0(globalCtx, D_06000960);
|
||||
func_800BDFC0(globalCtx, gLargeCrateDL);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@ struct ObjKibako2;
|
||||
typedef void (*ObjKibako2ActionFunc)(struct ObjKibako2*, GlobalContext*);
|
||||
|
||||
typedef struct ObjKibako2 {
|
||||
/* 0x0000 */ DynaPolyActor dyna;
|
||||
/* 0x015C */ ColliderCylinder collider;
|
||||
/* 0x01A8 */ ObjKibako2ActionFunc actionFunc;
|
||||
/* 0x01AC */ s8 unk_1AC;
|
||||
/* 0x01AD */ s8 skulltulaNoiseTimer;
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ ColliderCylinder collider;
|
||||
/* 0x1A8 */ ObjKibako2ActionFunc actionFunc;
|
||||
/* 0x1AC */ s8 unk_1AC;
|
||||
/* 0x1AD */ s8 skulltulaNoiseTimer;
|
||||
} ObjKibako2; // size = 0x1B0
|
||||
|
||||
extern const ActorInit Obj_Kibako2_InitVars;
|
||||
|
||||
@@ -3977,12 +3977,6 @@ D_0600805C = 0x0600805C;
|
||||
D_06001180 = 0x06001180;
|
||||
D_06001A70 = 0x06001A70;
|
||||
|
||||
// ovl_Obj_Kibako2
|
||||
|
||||
D_06000960 = 0x06000960;
|
||||
D_06000B70 = 0x06000B70;
|
||||
D_06001040 = 0x06001040;
|
||||
|
||||
// ovl_Obj_Kzsaku
|
||||
|
||||
D_06000040 = 0x06000040;
|
||||
|
||||
Reference in New Issue
Block a user