diff --git a/sound/172591__timbre__zapitydooda.ogg b/sound/172591__timbre__zapitydooda.ogg new file mode 100644 index 0000000..6bb94c0 Binary files /dev/null and b/sound/172591__timbre__zapitydooda.ogg differ diff --git a/sound/251431__onlytheghosts__fusion-gun-flash0-by-onlytheghosts.ogg b/sound/251431__onlytheghosts__fusion-gun-flash0-by-onlytheghosts.ogg new file mode 100644 index 0000000..4ac4bdd Binary files /dev/null and b/sound/251431__onlytheghosts__fusion-gun-flash0-by-onlytheghosts.ogg differ diff --git a/sound/39030__wildweasel__d1clsstf.ogg b/sound/39030__wildweasel__d1clsstf.ogg new file mode 100644 index 0000000..a09d69a Binary files /dev/null and b/sound/39030__wildweasel__d1clsstf.ogg differ diff --git a/src/battle/fighters.c b/src/battle/fighters.c index 9f5e026..6ce707c 100644 --- a/src/battle/fighters.c +++ b/src/battle/fighters.c @@ -220,6 +220,8 @@ void doFighter(void) if ((self->flags & EF_DISABLED) == 0) { + playBattleSound(SND_POWER_DOWN, self->x, self->y); + self->flags |= EF_DISABLED; battle.stats[STAT_ENEMIES_DISABLED]++; @@ -390,6 +392,8 @@ void damageFighter(Entity *e, int amount, long flags) if (flags & BF_SYSTEM_DAMAGE) { + playBattleSound(SND_MAG_HIT, e->x, e->y); + e->systemPower = MAX(0, e->systemPower - amount); e->systemHit = 255; diff --git a/src/battle/player.c b/src/battle/player.c index dd11c6c..21418f8 100644 --- a/src/battle/player.c +++ b/src/battle/player.c @@ -172,6 +172,8 @@ static void handleKeyboard(void) { if (battle.ecmTimer == ECM_RECHARGE_TIME) { + playSound(SND_ECM); + activateECM(); } else diff --git a/src/defs.h b/src/defs.h index f7a5a1a..ac77a62 100644 --- a/src/defs.h +++ b/src/defs.h @@ -196,6 +196,9 @@ enum SND_MISSILE, SND_INCOMING, SND_JUMP, + SND_ECM, + SND_MAG_HIT, + SND_POWER_DOWN, SND_BOOST, SND_RADIO, SND_GUI_CLICK, diff --git a/src/system/sound.c b/src/system/sound.c index 85df026..142b94d 100644 --- a/src/system/sound.c +++ b/src/system/sound.c @@ -108,6 +108,9 @@ static void loadSounds(void) sounds[SND_EXPLOSION_3] = Mix_LoadWAV(getFileLocation("sound/254071__tb0y298__firework-explosion.ogg")); sounds[SND_EXPLOSION_4] = Mix_LoadWAV(getFileLocation("sound/47252__nthompson__bad-explosion.ogg")); sounds[SND_JUMP] = Mix_LoadWAV(getFileLocation("sound/276912__pauldihor__transform.ogg")); + sounds[SND_ECM] = Mix_LoadWAV(getFileLocation("sound/251431__onlytheghosts__fusion-gun-flash0-by-onlytheghosts.ogg")); + sounds[SND_MAG_HIT] = Mix_LoadWAV(getFileLocation("sound/172591__timbre__zapitydooda.ogg")); + sounds[SND_POWER_DOWN] = Mix_LoadWAV(getFileLocation("sound/39030__wildweasel__d1clsstf.ogg")); sounds[SND_GUI_CLICK] = Mix_LoadWAV(getFileLocation("sound/257786__xtrgamr__mouse-click.ogg")); sounds[SND_GUI_SELECT] = Mix_LoadWAV(getFileLocation("sound/321104__nsstudios__blip2.ogg"));