2019-08-25 04:46:40 +00:00
|
|
|
// white_puff_explode.c.inc
|
|
|
|
|
|
|
|
void bhv_white_puff_exploding_loop(void) {
|
|
|
|
f32 sp24;
|
|
|
|
if (o->oTimer == 0) {
|
2020-03-02 03:42:52 +00:00
|
|
|
cur_obj_compute_vel_xz();
|
2019-10-05 19:08:05 +00:00
|
|
|
o->oWhitePuffUnkF4 = o->header.gfx.scale[0];
|
2019-08-25 04:46:40 +00:00
|
|
|
switch (o->oBehParams2ndByte) {
|
|
|
|
case 2:
|
|
|
|
o->oOpacity = 254;
|
2019-10-05 19:08:05 +00:00
|
|
|
o->oWhitePuffUnkF8 = -21;
|
|
|
|
o->oWhitePuffUnkFC = 0;
|
2019-08-25 04:46:40 +00:00
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
o->oOpacity = 254;
|
2019-10-05 19:08:05 +00:00
|
|
|
o->oWhitePuffUnkF8 = -13;
|
|
|
|
o->oWhitePuffUnkFC = 1;
|
2019-08-25 04:46:40 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2020-03-02 03:42:52 +00:00
|
|
|
cur_obj_move_using_vel_and_gravity();
|
|
|
|
cur_obj_apply_drag_xz(o->oDragStrength);
|
2019-08-25 04:46:40 +00:00
|
|
|
if (o->oVelY > 100.0f)
|
|
|
|
o->oVelY = 100.0f;
|
|
|
|
if (o->oTimer > 20)
|
2020-03-02 03:42:52 +00:00
|
|
|
obj_mark_for_deletion(o);
|
2019-08-25 04:46:40 +00:00
|
|
|
if (o->oOpacity) {
|
2019-10-05 19:08:05 +00:00
|
|
|
o->oOpacity += o->oWhitePuffUnkF8;
|
2019-08-25 04:46:40 +00:00
|
|
|
if (o->oOpacity < 2)
|
2020-03-02 03:42:52 +00:00
|
|
|
obj_mark_for_deletion(o);
|
2019-10-05 19:08:05 +00:00
|
|
|
if (o->oWhitePuffUnkFC)
|
|
|
|
sp24 = o->oWhitePuffUnkF4 * ((254 - o->oOpacity) / 254.0);
|
2019-08-25 04:46:40 +00:00
|
|
|
else
|
2019-10-05 19:08:05 +00:00
|
|
|
sp24 = o->oWhitePuffUnkF4 * (o->oOpacity / 254.0);
|
2020-03-02 03:42:52 +00:00
|
|
|
cur_obj_scale(sp24);
|
2019-08-25 04:46:40 +00:00
|
|
|
}
|
|
|
|
}
|