flame_mario.inc.c (1369B)
1 // flame_mario.inc.c 2 3 void bhv_black_smoke_upward_loop(void) { 4 spawn_object_with_scale(o, MODEL_BURN_SMOKE, bhvBlackSmokeBowser, o->header.gfx.scale[0]); 5 } 6 7 void bhv_black_smoke_bowser_loop(void) { 8 if (o->oTimer == 0) { 9 o->oForwardVel = random_float() * 2 + 0.5; 10 o->oMoveAngleYaw = random_u16(); 11 o->oVelY = 8.0f; 12 13 o->oBlackSmokeBowserUnkF4 = o->header.gfx.scale[0]; 14 } 15 16 o->oMoveAngleYaw += o->oAngleVelYaw; 17 o->oPosY += o->oVelY; 18 } 19 20 void bhv_black_smoke_mario_loop(void) { 21 if (o->oTimer == 0) { 22 cur_obj_set_pos_relative(gMarioObject, 0, 0, -30.0f); 23 24 o->oForwardVel = random_float() * 2 + 0.5; 25 o->oMoveAngleYaw = (gMarioObject->oMoveAngleYaw + 0x7000) + random_float() * 8192.0f; 26 o->oVelY = 8.0f; 27 } 28 29 o->oMoveAngleYaw += o->oAngleVelYaw; 30 o->oPosY += o->oVelY; 31 } 32 33 void bhv_flame_mario_loop(void) { 34 cur_obj_scale(2.0f); 35 36 if (o->oTimer != 0) { 37 if (o->oTimer & 1) { 38 spawn_object(o, MODEL_BURN_SMOKE, bhvBlackSmokeMario); 39 } 40 } 41 42 gMarioObject->prevObj = o; // weird? 43 obj_set_parent_relative_pos(o, 40, -120, 0); 44 45 if (!(gMarioObject->oMarioParticleFlags & ACTIVE_PARTICLE_FIRE)) { 46 o->parentObj->oActiveParticleFlags &= ~ACTIVE_PARTICLE_FIRE; 47 obj_mark_for_deletion(o); 48 gMarioObject->prevObj = NULL; 49 } 50 }