2019-08-25 04:46:40 +00:00
|
|
|
// bowser_key.c.inc
|
|
|
|
|
|
|
|
struct ObjectHitbox sBowserKeyHitbox = {
|
|
|
|
/* interactType: */ INTERACT_STAR_OR_KEY,
|
|
|
|
/* downOffset: */ 0,
|
|
|
|
/* damageOrCoinValue: */ 0,
|
|
|
|
/* health: */ 0,
|
|
|
|
/* numLootCoins: */ 0,
|
|
|
|
/* radius: */ 160,
|
|
|
|
/* height: */ 100,
|
|
|
|
/* hurtboxRadius: */ 160,
|
|
|
|
/* hurtboxHeight: */ 100,
|
|
|
|
};
|
|
|
|
|
|
|
|
void bhv_bowser_key_loop(void) {
|
2020-03-02 03:42:52 +00:00
|
|
|
cur_obj_scale(0.5f);
|
2019-08-25 04:46:40 +00:00
|
|
|
if (o->oAngleVelYaw > 0x400)
|
|
|
|
o->oAngleVelYaw -= 0x100;
|
|
|
|
o->oFaceAngleYaw += o->oAngleVelYaw;
|
|
|
|
o->oFaceAngleRoll = -0x4000;
|
|
|
|
o->oGraphYOffset = 165.0f;
|
|
|
|
if (o->oAction == 0) {
|
|
|
|
if (o->oTimer == 0)
|
|
|
|
o->oVelY = 70.0f;
|
2020-03-02 03:42:52 +00:00
|
|
|
spawn_sparkle_particles(3, 200, 80, -60);
|
2019-08-25 04:46:40 +00:00
|
|
|
spawn_object(o, MODEL_NONE, bhvSparkleSpawn);
|
2020-03-02 03:42:52 +00:00
|
|
|
cur_obj_update_floor_and_walls();
|
|
|
|
cur_obj_move_standard(78);
|
2019-08-25 04:46:40 +00:00
|
|
|
if (o->oMoveFlags & OBJ_MOVE_ON_GROUND)
|
|
|
|
o->oAction++;
|
|
|
|
else if (o->oMoveFlags & OBJ_MOVE_LANDED)
|
|
|
|
#ifndef VERSION_JP
|
2020-03-02 03:42:52 +00:00
|
|
|
cur_obj_play_sound_2(SOUND_GENERAL_UNKNOWN3_2);
|
2019-08-25 04:46:40 +00:00
|
|
|
#else
|
2020-03-02 03:42:52 +00:00
|
|
|
cur_obj_play_sound_2(SOUND_GENERAL_UNKNOWN3_LOWPRIO);
|
2019-08-25 04:46:40 +00:00
|
|
|
#endif
|
|
|
|
} else {
|
2020-03-02 03:42:52 +00:00
|
|
|
obj_set_hitbox(o, &sBowserKeyHitbox);
|
2019-08-25 04:46:40 +00:00
|
|
|
if (o->oInteractStatus & INT_STATUS_INTERACTED) {
|
|
|
|
mark_obj_for_deletion(o);
|
|
|
|
o->oInteractStatus = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|