sm64pc/src/game/behaviors/break_particles.inc.c

25 lines
934 B
C
Raw Normal View History

2019-08-25 04:46:40 +00:00
// break_particles.c.inc
void spawn_triangle_break_particles(s16 numTris, s16 triModel, f32 triSize, s16 triAnimState) {
struct Object *triangle;
s32 i;
for (i = 0; i < numTris; i++) {
triangle = spawn_object(o, triModel, bhvBreakBoxTriangle);
triangle->oAnimState = triAnimState;
triangle->oPosY += 100.0f;
2020-04-03 18:57:26 +00:00
triangle->oMoveAngleYaw = random_u16();
2019-08-25 04:46:40 +00:00
triangle->oFaceAngleYaw = triangle->oMoveAngleYaw;
2020-04-03 18:57:26 +00:00
triangle->oFaceAnglePitch = random_u16();
2019-08-25 04:46:40 +00:00
triangle->oVelY = random_f32_around_zero(50.0f);
if (triModel == 138 || triModel == 56) {
triangle->oAngleVelPitch = 0xF00;
triangle->oAngleVelYaw = 0x500;
triangle->oForwardVel = 30.0f;
} else {
2020-04-03 18:57:26 +00:00
triangle->oAngleVelPitch = 0x80 * (s32)(random_float() + 50.0f);
2019-08-25 04:46:40 +00:00
triangle->oForwardVel = 30.0f;
}
2020-03-02 03:42:52 +00:00
obj_scale(triangle, triSize);
2019-08-25 04:46:40 +00:00
}
}