sm64

A Super Mario 64 decompilation
Log | Files | Refs | README | LICENSE

orange_number.inc.c (474B)


      1 // orange_number.inc.c
      2 
      3 void bhv_orange_number_init(void) {
      4     o->oAnimState = o->oBhvParams2ndByte;
      5     o->oVelY = 26.0f;
      6 }
      7 
      8 void bhv_orange_number_loop(void) {
      9     o->oPosY += o->oVelY;
     10     o->oVelY -= 2.0f;
     11 
     12     if (o->oVelY < -21.0f) {
     13         o->oVelY = 14.0;
     14     }
     15 
     16     if (o->oTimer == 35) {
     17         struct Object *sp1C = spawn_object(o, MODEL_SPARKLES, bhvGoldenCoinSparkles);
     18         sp1C->oPosY -= 30.0f;
     19         o->activeFlags = ACTIVE_FLAG_DEACTIVATED;
     20     }
     21 }