27 for (i = 0; i < 5; i++) {
28 guMtxL2F(mtxFragment,
ENTITY_ADDR(entity, Mtx*, matrices++));
29 guMtxCatF(mtxTrans, mtxFragment, mtxFragment);
79 f32 rotSpeed, lateralSpeed, reboundSpeed;
80 f32 moveAngle, yawRad;
82 s32 numFragmentsDisappeared;
83 f32 hitX, hitY, hitZ, hitDepth;
85 numFragmentsDisappeared = 0;
90 for (i = 0; i < 5; i++) {
96 if (rotSpeed >= 0.0f) {
122 numFragmentsDisappeared++;
180 if (numFragmentsDisappeared >= 5) {
200 x_inv = -entity->
pos.
x;
201 y_inv = -entity->
pos.
y;
202 z_inv = -entity->
pos.
z;
204 for (i = 0; i < 5; i++) {
206 gDPSetRenderMode(gfxPos++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
207 gDPSetCombineMode(gfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
217 guMtxCatF(mtxRotY, mtxTransInv, mtxTransInv);
224 gSPDisplayList(gfxPos++, fragmentDlist);
225 gSPPopMatrix(gfxPos++, G_MTX_MODELVIEW);
235 fx_big_smoke_puff(entity->
pos.
x, entity->
pos.
y + 25.0f, entity->
pos.
z);
254 .modelAnimationNodes = 0,
257 .fpHandleCollision = NULL,
260 .aabbSize = { 50, 50, 50 }
267 .modelAnimationNodes = 0,
270 .fpHandleCollision = NULL,
273 .aabbSize = { 50, 50, 100 }
struct BombableRockData * bombableRock
EntityBlueprint Entity_BombableRock
EntityModelScript Entity_BombableRock_RenderScript
void entity_BombableRock_setupGfx(s32)
Mtx Entity_BombableRock_FragmentMatrices[]
Gfx * Entity_BombableRock_FragmentsRender[]
void entity_BombableRock_init_fragments(Entity *entity, Gfx **dlists, Mtx *matrices)
void entity_BombableRock_init(Entity *entity)
void entity_BombableRock_update_fragments(Entity *entity)
EntityScript Entity_BombableRock_Script
EntityBlueprint Entity_BombableRockWide
void entity_BombableRock_idle(Entity *entity)
#define npc_raycast_down_sides
#define STANDARD_ENTITY_MODEL_SCRIPT(gfx, renderMode)
#define ENTITY_ADDR(entity, type, data)
#define es_SetCallback(func, time)
#define es_SetFlags(flags)
u8 fragmentLateralSpeed[6]
@ COLLISION_IGNORE_ENTITIES
@ ENTITY_TYPE_BOMBABLE_ROCK
@ ENTITY_COLLISION_PARTNER
@ RENDER_MODE_SURFACE_XLU_LAYER1
@ ENTITY_FLAG_PENDING_INSTANCE_DELETE
@ ENTITY_FLAG_DISABLE_COLLISION
Entity * get_entity_by_index(s32 index)
s32 entity_start_script(Entity *entity)
b32 npc_test_move_taller_with_slipping(s32, f32 *, f32 *, f32 *, f32, f32, f32, f32)
void exec_entity_commandlist(Entity *entity)
void(* renderSetupFunc)(s32)
DisplayContext * gDisplayContext