diff --git a/README.md b/README.md index 8f7332c..c184bdf 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ CC BY-NC-SA 3.0, with the following attribution: Copyright 2015-2016, Stephen J ### SOUND +* 000000_large_explosion.ogg - created by combining https://freesound.org/people/dkmedic/sounds/104447/ and https://freesound.org/people/CGEffex/sounds/100772/ * 18380__inferno__hvrl.ogg - hvrl, by inferno - https://freesound.org/people/inferno/sounds/18380/ * 18382__inferno__hvylas.ogg - hvylas, by inferno - https://freesound.org/people/inferno/sounds/18382/ * 42106__marcuslee__laser-wrath-4.ogg - Laser Wrath 4, by marcusless - https://freesound.org/people/marcuslee/sounds/42106/ diff --git a/sound/000000_large_explosion.ogg b/sound/000000_large_explosion.ogg new file mode 100644 index 0000000..7ea3885 Binary files /dev/null and b/sound/000000_large_explosion.ogg differ diff --git a/src/battle/capitalShips.c b/src/battle/capitalShips.c index 6a417f0..da1555f 100644 --- a/src/battle/capitalShips.c +++ b/src/battle/capitalShips.c @@ -302,6 +302,8 @@ static void die(void) Entity *e; self->alive = ALIVE_DEAD; + + playBattleSound(SND_CAP_DEATH, self->x, self->y); addLargeExplosion(); diff --git a/src/battle/effects.c b/src/battle/effects.c index 7c8109e..217973e 100644 --- a/src/battle/effects.c +++ b/src/battle/effects.c @@ -366,6 +366,26 @@ void addLargeExplosion(void) e->x -= e->size / 2; e->y -= e->size / 2; } + + e = malloc(sizeof(Effect)); + + memset(e, 0, sizeof(Effect)); + battle.effectTail->next = e; + battle.effectTail = e; + + e->type = EFFECT_HALO; + e->x = self->x; + e->y = self->y; + e->size = 256; + e->scaleAmount = 4; + e->texture = haloTexture; + + e->r = 255; + e->g = 255; + e->b = 255; + e->a = 255; + + e->health = 255; } void addMissileExplosion(Bullet *b) diff --git a/src/defs.h b/src/defs.h index 997ab4a..f5eec66 100644 --- a/src/defs.h +++ b/src/defs.h @@ -244,6 +244,7 @@ enum SND_TROPHY, SND_MINE_WARNING, SND_TIME_WARNING, + SND_CAP_DEATH, SND_GUI_CLICK, SND_GUI_SELECT, SND_GUI_CLOSE, diff --git a/src/system/sound.c b/src/system/sound.c index 45c0be6..429f628 100644 --- a/src/system/sound.c +++ b/src/system/sound.c @@ -121,6 +121,7 @@ static void loadSounds(void) sounds[SND_TROPHY] = loadSound("sound/278142__ricemaster__effect-notify.ogg"); sounds[SND_MINE_WARNING] = loadSound("sound/254174__kwahmah-02__s.ogg"); sounds[SND_TIME_WARNING] = loadSound("sound/320181__dland__hint.ogg"); + sounds[SND_CAP_DEATH] = loadSound("sound/000000_large_explosion.ogg"); sounds[SND_GUI_CLICK] = loadSound("sound/257786__xtrgamr__mouse-click.ogg"); sounds[SND_GUI_SELECT] = loadSound("sound/321104__nsstudios__blip2.ogg");