sm64

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

koopa_shell_underwater.inc.c (1076B)


      1 // koopa_shell_underwater.inc.c
      2 
      3 struct ObjectHitbox sKoopaShellUnderwaterHitbox = {
      4     /* interactType:      */ INTERACT_GRABBABLE,
      5     /* downOffset:        */ 0,
      6     /* damageOrCoinValue: */ 0,
      7     /* health:            */ 1,
      8     /* numLootCoins:      */ 0,
      9     /* radius:            */ 80,
     10     /* height:            */ 50,
     11     /* hurtboxRadius:     */ 0,
     12     /* hurtboxHeight:     */ 0,
     13 };
     14 
     15 void set_koopa_shell_underwater_hitbox(void) {
     16     obj_set_hitbox(o, &sKoopaShellUnderwaterHitbox);
     17 }
     18 
     19 void bhv_koopa_shell_underwater_loop(void) {
     20     switch (o->oHeldState) {
     21         case HELD_FREE:
     22             set_koopa_shell_underwater_hitbox();
     23             break;
     24         case HELD_HELD:
     25             cur_obj_unrender_set_action_and_anim(-1, 0);
     26             break;
     27         case HELD_THROWN:
     28         case HELD_DROPPED:
     29             obj_mark_for_deletion(o);
     30             spawn_mist_particles();
     31             break;
     32     }
     33 
     34     if (o->oInteractStatus & INT_STATUS_STOP_RIDING) {
     35         obj_mark_for_deletion(o);
     36         spawn_mist_particles();
     37     }
     38 
     39     o->oInteractStatus = 0;
     40 }