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

34 lines
901 B
C
Raw Normal View History

2019-08-25 04:46:40 +00:00
// ground_particles.c.inc
void bhv_pound_white_puffs_init(void) {
2020-03-02 03:42:52 +00:00
clear_particle_flags(0x8000);
spawn_mist_from_global();
2019-08-25 04:46:40 +00:00
}
2020-03-02 03:42:52 +00:00
void spawn_mist_from_global(void) {
cur_obj_spawn_particles(&D_8032F3CC);
2019-08-25 04:46:40 +00:00
}
2020-03-02 03:42:52 +00:00
void bhv_ground_sand_init(void) {
clear_particle_flags(0x4000);
cur_obj_spawn_particles(&D_8032F3E0);
2019-08-25 04:46:40 +00:00
}
2020-03-02 03:42:52 +00:00
void spawn_smoke_with_velocity(void) {
2019-08-25 04:46:40 +00:00
struct Object *smoke = spawn_object_with_scale(o, MODEL_SMOKE, bhvWhitePuffSmoke2, 1.0f);
smoke->oForwardVel = D_8032F3F4[0];
smoke->oVelY = D_8032F3F4[1];
smoke->oGravity = D_8032F3F4[2];
2020-03-02 03:42:52 +00:00
obj_translate_xyz_random(smoke, D_8032F3F4[3]);
2019-08-25 04:46:40 +00:00
}
// TODO Fix name
2020-03-02 03:42:52 +00:00
void clear_particle_flags(u32 flags) {
2019-08-25 04:46:40 +00:00
o->parentObj->oActiveParticleFlags &= flags ^ -1; // Clear the flags given (could just be ~flags)
}
void bhv_ground_snow_init(void) {
2020-03-02 03:42:52 +00:00
clear_particle_flags(1 << 16);
cur_obj_spawn_particles(&D_8032F3FC);
2019-08-25 04:46:40 +00:00
}