8extern Addr entity_model_WoodenCrate_ROM_END;
9extern Addr entity_model_WoodenCrate_ROM_START;
33 for (i = 0; i < 35; i++) {
34 guMtxL2F(mtxFragment,
ENTITY_ADDR(entity, Mtx*, matrices++));
35 guMtxCatF(mtxTrans, mtxFragment, mtxFragment);
59 entity->
scale.
y = 0.85714287f;
73 f32 rotSpeed, lateralSpeed, reboundSpeed;
74 f32 moveAngle, yawRad;
76 s32 numFragmentsDisappeared;
77 f32 hitX, hitY, hitZ, hitDepth;
79 numFragmentsDisappeared = 0;
84 for (i = 0; i < 35; i++) {
90 if (rotSpeed >= 0.0f) {
116 numFragmentsDisappeared++;
174 if (numFragmentsDisappeared >= 35) {
194 x_inv = -entity->
pos.
x;
195 y_inv = -entity->
pos.
y;
196 z_inv = -entity->
pos.
z;
198 for (i = 0; i < 35; i++) {
200 gDPSetRenderMode(gfxPos++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
201 gDPSetCombineMode(gfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
211 guMtxCatF(mtxRotY, mtxTransInv, mtxTransInv);
218 gSPDisplayList(gfxPos++, fragmentDlist);
219 gSPPopMatrix(gfxPos++, G_MTX_MODELVIEW);
227 s32 shouldBreak = FALSE;
284 .modelAnimationNodes = 0,
287 .fpHandleCollision = NULL,
290 .aabbSize = { 35, 30, 35 }
f32 player_get_camera_facing_angle(void)
void entity_WoodenCrate_reset_fragments(Entity *entity)
EntityBlueprint Entity_WoodenCrate
Gfx Entity_WoodenCrate_Render[]
EntityModelScript Entity_WoodenCrate_RenderScript
Mtx Entity_WoodenCrate_FragmentsMatrices[]
void entity_WoodenCrate_setupGfx(s32)
Gfx * Entity_WoodenCrate_FragmentsRender[]
void entity_WoodenCrate_shatter(Entity *entity, f32 arg1)
void entity_WoodenCrate_init_fragments(Entity *entity, Gfx **dlists, Mtx *matrices)
s32 Entity_WoodenCrate_RenderShatteredScript[]
EntityScript Entity_WoodenCrate_Script
void entity_WoodenCrate_init(Entity *entity)
s32 entity_WoodenCrate_idle(Entity *entity)
void entity_WoodenCrate_update_fragments(Entity *entity)
struct WoodenCrateData * crate
#define npc_raycast_down_sides
s32 CreateEntityVarArgBuffer[]
#define STANDARD_ENTITY_MODEL_SCRIPT(gfx, renderMode)
#define ENTITY_ADDR(entity, type, data)
#define es_SetCallback(func, time)
#define es_SetFlags(flags)
f32 fragmentFallSpeed[36]
u8 fragmentLateralSpeed[36]
void entity_set_render_script(Entity *entity, EntityModelScript *cmdList)
@ ITEM_SPAWN_MODE_ITEM_BLOCK_ITEM
@ COLLISION_IGNORE_ENTITIES
@ ENTITY_TYPE_WOODEN_CRATE
@ ENTITY_COLLISION_PLAYER_TOUCH_FLOOR
@ RENDER_MODE_SURFACE_OPA
@ RENDER_MODE_SURFACE_XLU_LAYER1
@ ENTITY_FLAG_FIXED_SHADOW_SIZE
@ ENTITY_FLAG_PENDING_INSTANCE_DELETE
@ ENTITY_FLAG_DISABLE_COLLISION
@ ACTION_STATE_SPIN_POUND
@ ACTION_STATE_TORNADO_POUND
Entity * get_entity_by_index(s32 index)
s32 entity_start_script(Entity *entity)
s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 angle, s32 pickupVar)
void set_action_state(s32 actionState)
b32 npc_test_move_taller_with_slipping(s32, f32 *, f32 *, f32 *, f32, f32, f32, f32)
void exec_entity_commandlist(Entity *entity)
void sfx_play_sound(s32 soundID)
void(* renderSetupFunc)(s32)
u8 Addr[]
Linker symbol address, as in ld_addrs.h.
PlayerStatus gPlayerStatus
DisplayContext * gDisplayContext
s32 get_global_flag(s32 index)