From 07d980df31838cad9c387f42acd1b3a3267af589 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Tue, 18 Nov 2008 02:16:15 +0000 Subject: [PATCH] Added new powerup: candle (creates flaming corpses) --- data/levels.dat | 1 + data/sprites/candle.png | Bin 0 -> 615 bytes defs.h | 4 +++- rc.c | 27 +++++++++++++++++++++++++++ shared.c | 9 ++++++++- website/img/candle.png | Bin 0 -> 1132 bytes website/info.html | 1 + 7 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 data/sprites/candle.png create mode 100644 website/img/candle.png diff --git a/data/levels.dat b/data/levels.dat index dbbbdec..edc4552 100644 --- a/data/levels.dat +++ b/data/levels.dat @@ -51,3 +51,4 @@ 413,level413.dat,Three Parts 109,level109.dat,THE END SO FAR 99,level99.dat,TEST LEVEL +414,level414.dat,NEW LEVEL diff --git a/data/sprites/candle.png b/data/sprites/candle.png new file mode 100644 index 0000000000000000000000000000000000000000..4ebfbf10ca16bbb9abf8e542ad7a86197e5248bc GIT binary patch literal 615 zcmV-t0+{`YP)WFU8GbZ8({Xk{QrNlj4iWF>9@00GNML_t(2&t=ZNZWBQi z1>iG(YkNJ8ErK0`k(Cgngod901ws%Zo`4tN38<+kDCj770mMT@^oTx42=OCXLX=i; z*f{IhyE8lY4h2{gzSTKLUvUNg-TP-!Zx8D)0AToZ@qD@KWmvmnyX~86kN>v+KrRF9 z?w;D%AIOdU!J8*-y8=|)dZbzpn#$g{9n;!f0mh~~re3d1Eg@y&*2)j<-so7ADBW1F~_>%4yJt(_)UJS&mteV-Xxm2)N{uCt3d?ONybS z07o9485LFV!DEq+wGWatqU#1qK%$Ni37!ZHg~*w7#c8G^B8Y)N5uO-IL_h)@Dx6G4 zpEWVh14mFG1VyL>Kv4q1!@1d}Cgw>Xio`4`svw~N86iYKjZx}~;#VK|)CKAQKu~~I z5s?FHQ+`pm_clwTOq(M*6e#y3ZG<`EC|(is+dr;N>5;$|_yGU_002ovPDHLkV1iL7 B0?_~f literal 0 HcmV?d00001 diff --git a/defs.h b/defs.h index 82a606b..3f9cb7b 100644 --- a/defs.h +++ b/defs.h @@ -332,7 +332,7 @@ #define S_SLOPE 2 // Sprite types -#define MAXPTYPES 139 +#define MAXPTYPES 140 #define P_PLAYER 0 #define P_RAT 1 #define P_CHEESE 2 @@ -477,6 +477,7 @@ #define P_GNOME 136 #define P_WAND 137 #define P_WHISTLE 138 +#define P_CANDLE 139 #define FLY_FLYTIME 150 @@ -535,6 +536,7 @@ #define PW_ACCORDION 12 // super long net #define PW_GUNNER 13 // machine gunner #define PW_WHISTLE 14 // whistle +#define PW_CANDLE 15 // candle // "virtual" powerup for bosses #define PW_RATSHAKE 20 // shake screen horizontally #define PW_SNAILSHAKE 21 // shake screen vertically diff --git a/rc.c b/rc.c index 097b384..8eca39c 100644 --- a/rc.c +++ b/rc.c @@ -1566,6 +1566,11 @@ void die(sprite_t *s) { s->iced = 0; s->angry = 0; + // play effect if they are going to be flaming + if (globpowerup == PW_CANDLE) { + playfx(FX_METEOR); + } + // check for level clear checklevelend(); @@ -2106,6 +2111,14 @@ int movesprite(sprite_t *s) { s->dead = D_LASTBOUNCE; } } + + // if flaming... + if (globpowerup == PW_CANDLE) { + if (timer % 5 == 0) { + // add explosion + addsprite(P_SMASH, s->x, s->y, "candle_exp"); + } + } } return B_FALSE; } else if (s->dead == D_LASTBOUNCE) { /* final fall */ @@ -2148,6 +2161,14 @@ int movesprite(sprite_t *s) { s->dead = D_FINAL; puffin(-1, x, y, "nothing_sprd", 0); } + + // if flaming... + if (globpowerup == PW_CANDLE) { + if (timer % 5 == 0) { + // add explosion + addsprite(P_SMASH, s->x, s->y, "candle_exp"); + } + } } } return B_FALSE; @@ -6964,6 +6985,12 @@ int dofruiteffect(sprite_t *pp, sprite_t *s) { globpowerup = PW_WHISTLE; + return B_TRUE; + } else if (s->id == P_CANDLE) { + playfx(FX_POWERUP); + sprintf(tempm, "Flaming Corpses!"); + addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY, TT_NORM); + globpowerup = PW_CANDLE; return B_TRUE; } else if (s->id == P_WAND) { sprite_t *s2; diff --git a/shared.c b/shared.c index e4c994a..98f92b6 100644 --- a/shared.c +++ b/shared.c @@ -1496,6 +1496,9 @@ int loadimagesets(void) { loadspriteimage(P_WAND,F_WALK1, "sprites/wand.png"); imageset[P_WAND].numimages = 1; + loadspriteimage(P_CANDLE,F_WALK1, "sprites/candle.png"); + imageset[P_CANDLE].numimages = 1; + loadspriteimage(P_WHISTLE,F_WALK1, "sprites/whistle.png"); imageset[P_WHISTLE].numimages = 1; @@ -2371,6 +2374,7 @@ int isfruit(int id) { case P_SKULL: case P_GNOME: case P_WAND: + case P_CANDLE: case P_WHISTLE: case P_RANDOM: return FT_TEMP; @@ -3003,7 +3007,7 @@ int loadlevellist(void) { int randompowerup(void) { int num; - num = rand() % 37; + num = rand() % 38; switch (num) { case 0: @@ -3086,6 +3090,8 @@ int randompowerup(void) { return P_WAND; case 36: return P_WHISTLE; + case 37: + return P_CANDLE; } } @@ -3226,6 +3232,7 @@ void setfruitinfo(void) { setinfo(P_GNOME, "Garden Gnome", "This tricky little gnome has rigged explosive devices to all flowers on the level - when collected he will detonate them!", "gnome.png"); setinfo(P_WAND, "Magic Wand", "A wave of the magic wand will magically polymorph all monsters into weaker ones.", "wand.png"); setinfo(P_WHISTLE, "Whistle", "Produces an extremely loud, shrill whistling noise which wakes the black cloud of doom! In its angered state, the black cloud will slaughter both friend and foe alike.", "whistle.png"); + setinfo(P_CANDLE, "Candle", "Once collected, the candle will cause all enemy corpses to burst into flames, igniting any other enemy which they touch.", "candle.png"); setinfo(P_ZAPPOWERUP, "Bug Zapper", "Zaps nearby enemies with miniature bolts of lightning", "zapper.png"); setinfo(P_SKULL, "Skull", "Avoid these at all costs! The skull will cause you to lose all net powerups.", "skull.png"); setinfo(P_CLOVER, "4-Leaf Clover", "Increases your luck...", "clover.png"); diff --git a/website/img/candle.png b/website/img/candle.png new file mode 100644 index 0000000000000000000000000000000000000000..2086eeb62939d545b4f7af5a8df273c663dc561e GIT binary patch literal 1132 zcmV-y1e5!TP)WFU8GbZ8({Xk{QrNlj4iWF>9@00YoTL_t(Y$BkA?Ya~?^ z{_dlzU+GMzGfeD6;y5S~#Fe;FNkDMr!k^&QUm=JhE@$H}nC+}w46en^=tfi`WCH4B z9(Kk_B;D0rRrhgR%&Bm_sjBXRLlyVlI^TJI_XsS1MD$J3KCSw5-JV!t05yT=2IV69 z4%etg@f9H1*Bb2i z-+y)RCIhqsARUCM5=7TnF968)ptq;mZA;#%jghW_}jRDRk4 zfK)6}03B9j0{|ZYiZ~a#E<6BK>-3ilhc65>bL#>C!)G0f*wfk?1_^LR&0Z0`=)L!L!-a>{L|OETJ6jq9qpbxd1h%i)<-9k*&8><PDa#x{4xk9imjIBiivK%r-TZ8{c5Of1+YzZ#C&TsOcz*t9w%%)RKgI5kckbT% znw1zkh7nN0XHhH*}sNF5yQdsZyu4^|HgSHj2JHnuI?FN8u1W-!c*_R%K<*5$; zc<@&akI`TNp%U2=28qm}Y>rM_yaJ#XB)j17=pfl;h=h(xO9Bv2F8r^XixdWgemg-Y zk?@It)Z5lf%|8s_S$W1?t*f|6R)k1p*1ODE49rCpxg?P&fw<1@h-&I-lgM)NtAAfR|K68P!!pM8bK%Izr(*lpsI?-WnYK z{?jw&p^}SY%f(Wkm}@xnEw3R!|%WS?*9E*n$4IV(m)nmwuV9dl^cw!Apy__um)fl z$QoA7cBA5K2=K|4R=<&0G|Ar>dBLd>}5c+{gVO8s<_F%{(#BgbIDs*|coB yt{Z-~E?PGGH=U(be)
Garden GnomeThis tricky little gnome has rigged explosive devices to all flowers on the level - when collected he will detonate them!
Magic WandA wave of the magic wand will magically polymorph all monsters into weaker ones.
WhistleProduces an extremely loud, shrill whistling noise which wakes the black cloud of doom! In its angered state, the black cloud will slaughter both friend and foe alike. +
CandleOnce collected, the candle will cause all enemy corpses to burst into flames, igniting any other enemy which they touch. ?
RandomGives you a random effect... Super Powerups
Big Speed UpMakes you walk faster, permenantly!