2019-08-25 04:46:40 +00:00
|
|
|
// bowser_bomb.c.inc
|
|
|
|
|
|
|
|
void bhv_bowser_bomb_loop(void) {
|
2020-03-02 03:42:52 +00:00
|
|
|
if (obj_check_if_collided_with_object(o, gMarioObject) == 1) {
|
2019-08-25 04:46:40 +00:00
|
|
|
o->oInteractStatus &= ~INT_STATUS_INTERACTED; /* bit 15 */
|
|
|
|
spawn_object(o, MODEL_EXPLOSION, bhvExplosion);
|
|
|
|
o->activeFlags = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (o->oInteractStatus & INTERACT_MR_BLIZZARD) /* bit 21 */
|
|
|
|
{
|
|
|
|
spawn_object(o, MODEL_BOWSER_FLAMES, bhvBowserBombExplosion);
|
2019-10-05 19:08:05 +00:00
|
|
|
create_sound_spawner(SOUND_GENERAL_BOWSER_BOMB_EXPLOSION);
|
2020-01-03 15:38:57 +00:00
|
|
|
set_camera_shake_from_point(SHAKE_POS_LARGE, o->oPosX, o->oPosY, o->oPosZ);
|
2019-08-25 04:46:40 +00:00
|
|
|
o->activeFlags = 0;
|
|
|
|
}
|
|
|
|
|
2019-12-02 02:52:53 +00:00
|
|
|
set_object_visibility(o, 7000);
|
2019-08-25 04:46:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void bhv_bowser_bomb_explosion_loop(void) {
|
|
|
|
struct Object *mineSmoke;
|
|
|
|
|
2020-03-02 03:42:52 +00:00
|
|
|
cur_obj_scale((f32) o->oTimer / 14.0f * 9.0 + 1.0);
|
2019-08-25 04:46:40 +00:00
|
|
|
if ((o->oTimer % 4 == 0) && (o->oTimer < 20)) {
|
|
|
|
mineSmoke = spawn_object(o, MODEL_BOWSER_SMOKE, bhvBowserBombSmoke);
|
|
|
|
mineSmoke->oPosX += RandomFloat() * 600.0f - 400.0f;
|
|
|
|
mineSmoke->oPosZ += RandomFloat() * 600.0f - 400.0f;
|
|
|
|
mineSmoke->oVelY += RandomFloat() * 10.0f;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (o->oTimer % 2 == 0)
|
|
|
|
o->oAnimState++;
|
|
|
|
if (o->oTimer == 28)
|
|
|
|
o->activeFlags = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void bhv_bowser_bomb_smoke_loop(void) {
|
2020-03-02 03:42:52 +00:00
|
|
|
cur_obj_scale((f32) o->oTimer / 14.0f * 9.0 + 1.0);
|
2019-08-25 04:46:40 +00:00
|
|
|
if (o->oTimer % 2 == 0)
|
|
|
|
o->oAnimState++;
|
|
|
|
|
|
|
|
o->oOpacity -= 10;
|
|
|
|
if (o->oOpacity < 10)
|
|
|
|
o->oOpacity = 0;
|
|
|
|
|
|
|
|
o->oPosY += o->oVelY;
|
|
|
|
|
|
|
|
if (o->oTimer == 28)
|
|
|
|
o->activeFlags = 0;
|
|
|
|
}
|