From 8d6a075fd43d3fa7660203345c4f502b2b69dd4e Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Sun, 21 Dec 2008 01:04:54 +0000 Subject: [PATCH] - added hiss sound when snake shoots - pill now makes you constantly animate --- data/levels/level99.dat | 5 +++-- data/sounds/hiss.wav | Bin 0 -> 9004 bytes defs.h | 3 ++- rc.c | 2 ++ shared.c | 46 ++++++++++++++++++++++++++++++++++------ 5 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 data/sounds/hiss.wav diff --git a/data/levels/level99.dat b/data/levels/level99.dat index 6b0409c..c9f56cc 100644 --- a/data/levels/level99.dat +++ b/data/levels/level99.dat @@ -6,8 +6,9 @@ endhelp monsters 0 5 23 134 35 22 +23 12 19 6 20 10 -23 12 23 +12 24 19 endmonsters exitdir 1 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, @@ -30,7 +31,7 @@ exitdir 1 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, +4,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,4, 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, 4,0,0,0,0,0,0,0,17,0,0,0,0,0,17,0,0,0,0,0,17,0,0,0,0,0,17,0,0,0,0,17,0,0,0,0,0,0,0,4, diff --git a/data/sounds/hiss.wav b/data/sounds/hiss.wav new file mode 100644 index 0000000000000000000000000000000000000000..908536a1d50d5bb997515f036f9fd23b61b3680a GIT binary patch literal 9004 zcmWk!33yc1**@pqbMNdk*;z8dC5ehGwI$e=nNVwHXf2?v2`VO7Z6?-Au&o5C1*iM0x}N^qMQTrvax1zHtwOOQ$?kY#2v``mla_Mbd?o_U_k%$ z@;!VtzlkULkN6MxUj8%j-(UD4egl7+5Ai?nO+3Xv;?=sB(0UzO3W`j9#%@O_rxClJUDtL>OWrykG z@D^~lxNA6cuj4Op7qIgext(9&cYs^@HQ+a(hX0S(!MAvr zb-~SG7wwd`flV|5G_k+8_#z&MIod^AQ3LBBb~yr0ksM8kH3mopJ0=mfi^Qc(>|S~T zX2~sJDXb++;iupb{TUeNo54TCoxTlL@<#6A&wy81g53`GG0L1^6MKpefFs9h;vD$4Q3J!uC`74*< zf0&I|i%*+bp6rl*1NIs>!Q*fgcd-Dx4s_9Wyijt;?ZzEoSbl~+DROHc+b1=PT`Z87 z&|RR59p(GrAn6Ck*{{JS7$9+2&AaF;d?{NcmDAIt4;^O*$#EEmQ*4klz!vfC0q~L7 z^HSK%>R=Z;O&7{7A`&NH1$>`BAmXrDM9e1cwL!YTcTt<119_4Kap@XycB`aTG=|Nf zSB|sopcd`|E2Y)^DBllHK#@Q6lyWuvDc&u;DxW4h`R9@yp5UByOFx$q)Xp;U7qFgj zsYPmMUU-4m0t=cV_tQ_6yTFr10=y_K=A+^y7b|J%HC{${NtftLz;e{f*Wi_mqfclL zc?~AO640!VK}{JiSXlyHN50KAv&DQR{I|XiJ_{}wL{fPzK7;_x z8ox%D(Q$FsoB1W+kN79`l=IgjFj$*`vGzua|&gUJrgzEU4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y_1xKCB*{fj39dO*x*HzHsW-)r1QUE+Cy zc3e-k^6!F8bR)fw9TN^$%-F&gi>Y=8*~1!OB^$+kY=`ih8d$CHvvn~v!mW1j_3|3AhK15QydCH1Am|oP4}?Wk z9VA`!3h|V{COXAto*4*`1gu~I{UmrnsP93#500=pF&|9AjWl4y;ci}Qx~>O7vCDt`|)c+$@sOC?ZN#!uz~JM5G?}<6ZQ2Ftd&xx=#31^|)E= ztcC402F2X)ASqC{V3`fH10MvHEM~mR9Q+`S;TBp3%EeA|Vp17m{YE_zb9?d&(t$U! z{p=;Zp4fPUm^+^qdbpNcCRP|AVxMFH*Wnh{%Y^HM=YbsUFxp9vh?QS!prhdb0V^vF A1ONa4 literal 0 HcmV?d00001 diff --git a/defs.h b/defs.h index bdaa4ff..e98c26d 100644 --- a/defs.h +++ b/defs.h @@ -321,7 +321,7 @@ /* enums */ /* sounds */ -#define MAXFX 60 +#define MAXFX 61 #define FX_SHOOT 0 #define FX_SLAM 1 #define FX_KILL 2 @@ -382,6 +382,7 @@ #define FX_JETPACK 57 #define FX_CAMERA 58 #define FX_LASER 59 +#define FX_HISS 60 // card suits #define CS_HEART 1 diff --git a/rc.c b/rc.c index 0d1b8fe..edb6cff 100644 --- a/rc.c +++ b/rc.c @@ -4087,6 +4087,7 @@ printf("setting target to y = %d\n",ss->timer2); if (shoot) { // if our shooting timer is okay if (s->timer1 == 0) { + playfx(FX_HISS); ss = addsprite(P_SPIT,s->x,s->y - s->img->h/2,"spit" ); ss->ys = 0; ss->xs = s->dir * (getspeed(s)*2); @@ -8305,6 +8306,7 @@ int initsound(void) { loadfx(FX_JETPACK, "jetpack.wav"); loadfx(FX_CAMERA, "camera.wav"); loadfx(FX_LASER, "laser.wav"); + loadfx(FX_HISS, "hiss.wav"); // load sound effects for (i = 0; i < MAXFX; i++) { diff --git a/shared.c b/shared.c index ef5e879..63545c1 100644 --- a/shared.c +++ b/shared.c @@ -2064,6 +2064,13 @@ void drawsprite(sprite_t *s) { frame = F_DEAD; } else if (s->id == P_SLUG) { frame = F_FALL; + } else if (s->powerup == PW_PILL) { + // toggle between walking frames FAST + if ((timer/3) % 2 == 0) { + frame = F_WALK1; + } else { + frame = F_JUMP; + } } else { frame = F_JUMP; } @@ -2079,6 +2086,13 @@ void drawsprite(sprite_t *s) { } else { frame = F_FALL; } + } else if (s->powerup == PW_PILL) { + // toggle between walking frames FAST + if ((timer/3) % 2 == 0) { + frame = F_WALK1; + } else { + frame = F_JUMP; + } } else { frame = F_FALL; } @@ -2102,11 +2116,20 @@ void drawsprite(sprite_t *s) { // DEFAULT FOR EVERYTHING // walking / sliding if (s->moved == MV_WALK) { - // toggle between walking frames - if ((timer/12) % 2 == 0) { - frame = F_WALK1; + if (s->powerup == PW_PILL) { + // toggle between walking frames FAST + if ((timer/3) % 2 == 0) { + frame = F_WALK1; + } else { + frame = F_JUMP; + } } else { - frame = F_JUMP; + // toggle between walking frames + if ((timer/12) % 2 == 0) { + frame = F_WALK1; + } else { + frame = F_JUMP; + } } } else if (s->moved == MV_FLY) { int animspeed; @@ -2127,10 +2150,19 @@ void drawsprite(sprite_t *s) { frame = F_FALL; } - } else if (s->moved == MV_ICE) { + } else if (s->moved == MV_ICE) { // sliding frame = F_FALL; - } else { - frame = F_WALK1; + } else { // standing still + if (s->powerup == PW_PILL) { + // toggle between walking frames FAST + if ((timer/3) % 2 == 0) { + frame = F_WALK1; + } else { + frame = F_JUMP; + } + } else { + frame = F_WALK1; + } } }