Adds burst sound to eldritch blast

This commit is contained in:
Linus Probert 2018-10-27 13:47:44 +02:00
parent c2eae7a9fe
commit 823384161f
4 changed files with 5 additions and 0 deletions

BIN
assets/Sounds/FX/burst.wav Normal file

Binary file not shown.

View File

@ -87,6 +87,7 @@ load_effects(void)
effects[CHEST_OPEN] = load_effect("Sounds/FX/chest_open.wav");
effects[FADE_IN] = load_effect("Sounds/FX/fade_in.wav");
effects[FADE_OUT] = load_effect("Sounds/FX/fade_out.wav");
effects[BURST] = load_effect("Sounds/FX/burst.wav");
}
void

View File

@ -63,6 +63,7 @@ typedef enum Fx_t {
CHEST_OPEN,
FADE_IN,
FADE_OUT,
BURST,
LAST_EFFECT
} Fx;

View File

@ -35,6 +35,7 @@
#include "texturecache.h"
#include "trap.h"
#include "object.h"
#include "mixer.h"
static void
monster_set_sprite_clip_for_current_state(Monster *m)
@ -145,6 +146,7 @@ sorcerer_blast(Monster *m, RoomMatrix *rm)
{
gui_log("%s creates a magical explosion", m->label);
particle_engine_eldritch_explosion(m->sprite->pos, DIM(TILE_DIMENSION, TILE_DIMENSION));
mixer_play_effect(BURST);
damage_surroundings(m, rm);
}
@ -159,6 +161,7 @@ assassin_cloak_effect(Monster *m, bool cloak)
particle_engine_fire_explosion(m->sprite->pos, DIM(TILE_DIMENSION, TILE_DIMENSION));
m->sprite->hidden = cloak;
m->stateIndicator.sprite->hidden = cloak;
mixer_play_effect(cloak ? FADE_OUT : FADE_IN);
}