Added sound effect for moth

This commit is contained in:
Rob Pearce 2009-03-20 01:56:12 +00:00
parent 227f1c219e
commit 3a3c76de87
3 changed files with 4 additions and 1 deletions

BIN
data/sounds/pea.wav Normal file

Binary file not shown.

3
defs.h
View File

@ -362,7 +362,7 @@
/* enums */
/* sounds */
#define MAXFX 64
#define MAXFX 65
#define FX_SHOOT 0
#define FX_SLAM 1
#define FX_KILL 2
@ -427,6 +427,7 @@
#define FX_CHOMP 61
#define FX_GROWL 62
#define FX_LAMP 63
#define FX_MOTHFIRE 64
// card suits
#define CS_HEART 1

2
rc.c
View File

@ -5139,6 +5139,7 @@ int movesprite(sprite_t *s) {
// get angle towards target
ang = atan2(target->y - s->y, target->x - s->x);
// shoot
playfx(FX_MOTHFIRE);
ss = addsprite(P_MOTHFIRE,s->x,s->y - s->img->h/2,"mothfire" );
ss->xs = cos(ang) * getspeed(ss);
ss->ys = sin(ang) * getspeed(ss);
@ -9759,6 +9760,7 @@ int initsound(void) {
loadfx(FX_CHOMP, "chomp.wav");
loadfx(FX_GROWL, "growl.wav");
loadfx(FX_LAMP, "lamp.wav");
loadfx(FX_MOTHFIRE, "pea.wav");
// load sound effects
for (i = 0; i < MAXFX; i++) {