From 3f0346dafec0df326c9afdbe9fe45b8d91f68427 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Thu, 9 Oct 2008 23:49:43 +0000 Subject: [PATCH] Added powerup: phone (skips 2 levels) --- data/sounds/phone.wav | Bin 0 -> 21468 bytes defs.h | 7 ++++-- edit.c | 6 ++--- rc.c | 45 +++++++++++++++++++++++++++------ shared.c | 56 ++++++++++++++++++++++++------------------ shared.h | 2 +- 6 files changed, 79 insertions(+), 37 deletions(-) create mode 100644 data/sounds/phone.wav diff --git a/data/sounds/phone.wav b/data/sounds/phone.wav new file mode 100644 index 0000000000000000000000000000000000000000..02c63d909325a878256a81dbb21623bf9503e235 GIT binary patch literal 21468 zcmY-1S#xaHbszA(54wTIJP#MR_u>wmDN>^?Ii*;(tKyVjld9y|RjIt?%^x5iDUZoR z@{+`sEKwpwisGFoT+B1j7#ira^IL~7V;4(e6Mcrg*YID%f9?KvfAiOW{nfuu=|BGE zfA}~5`M><#y{VK^_Rn9eru1L`Jf$j4rT_G|fA_cl%{6JH{4zf)llehiG1bz!*q~3Whs5H+DgyTo^SpLij&7{>b zl75q3rpxqkdRR8|%km~Ir&-HB^WKqsnp$-$&!n0B+JB$r56g$?tUOOo@=Ez2&8OY; zI1iVxypVdO>#mbrr=v3K+d6HguYB`vT1|)fi*i+F@{h_u+RR6#m+qu057m`*r2MK3 z=IL}dotHo6gLGX!O+(c|c~s8xYPl{))n45uoo!O-ruXw$+4AJw{QY#V43ua2S-Mpw z@?1Gc7iq{9t#XuamBn=FSufLyH%+F;A-QzF{J=AwdVjXZp4DEE#6{VuCd*WsD;xQV z_1sN=R(jQ!=}BsrKP}VwF#n+(rlmBTCi98)U*}_bYUhXbS$>qBl#BGUypm4JKcrW# zdT8&D(snwp$J0XYr-^b#l56=a|4AAQ?c~i;=R4`I%1fF$VJQEW5GM1Za&7hZ%1`r~ za#p?d)VpacjkApr&)uexl5+XXbr1(^2wZ=|9PA%FmY0w>udCyuN+22QHn*M%O@8!vI-+#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bLAL z!mFmeWy`xNo;6_ZG)~{&BfrS}liW7zJ?&fVtmo=r*v+K;Vy}tHQw>haH+ zZ;Kztd7EIDk`-q$#2Ggho@jWF$HZ@DZCcYboyC4);&Dps*@M6(U0qy_>7?IrF?ogG9r2gwp2Y8!Eb9reENj07*)Meo6PfrV%W1(S zld^O>4uJ+pZjU{ysbSKdzs$hmZ8jG9iTMx+;9LNF+7mN}$mGIqa7jGsToryob}`R! zYH#Ca1)W`@gGspvUS6knNk`(`JEFRd-`Cjizv#!oCu2G-?kA_C6L^1ldCpF*SKapR??D50Zoh zjEKoSnwnyxapt{U-O__KOY56u{j50EIU+v94Aq`KPw?fTscG0B{8H4kaSncyjAzI! z%S+6CL1oCtKL+(TFTKBI#&NXiYPHx7ue1_b3$HzdTK5;&Y28YTaTvVOj?&r z26=YhiVl35hkoJ`>6q1l5T_&^za(}@ev>dWCZO3kS%lA;yivDSu9ufV%391U?i*Dp zM0ao4r(=@x3xn2lB0syJCA_h9$o*w>{w)TKS!)kML?ri1Q7U6zhUvYOnY74fkoB0g zh)y+oi7A`-)r(`b-iTb*>=aqI;9}-^=0JFD^hW#|2rR%Ihnz&Y_}!@59WlLd?ysXf z>8j~E4YL?09`!0m>uVkH3uqqm2-f7eBRZ?GlIR 1) { curlevelnum--; - loadlevel(curworld, curlevelnum); + loadlevel(curworld, curlevelnum, B_TRUE); draweditorlevel(); drawsprites(); toggletimer = 30; diff --git a/rc.c b/rc.c index 072f1ed..ce6fbd8 100644 --- a/rc.c +++ b/rc.c @@ -216,7 +216,7 @@ int main (int argc, char **argv) { } playmusic(normalmusic); - if (loadlevel(curworld,curlevelnum)) { + if (loadlevel(curworld,curlevelnum, B_TRUE)) { return 1; } @@ -994,8 +994,13 @@ void nextlevel(void) { // don't want the player flashing while scrolling player->invuln = 0; - // these two handle the scroll effect to the next level - loadlevel(curworld,curlevelnum); + // load next level data + if (player->powerup == PW_PHONE) { + // don't add monsters + loadlevel(curworld,curlevelnum, B_FALSE); + } else { + loadlevel(curworld,curlevelnum, B_TRUE); + } // do the moving to next level animation drawlevel(); @@ -1004,8 +1009,12 @@ void nextlevel(void) { player->invuln = INVULNTIME; /* reset game stats */ - levelcomplete = LV_INIT; - levelcompletetime = -1; + if (player->powerup == PW_PHONE) { + levelcomplete = LV_CLOUD; + } else { + levelcomplete = LV_INIT; + levelcompletetime = -1; + } /* reset level stats */ level->gotpowerup = B_FALSE; @@ -1041,8 +1050,8 @@ void nextlevel(void) { player->netting = B_FALSE; player->slamming = B_FALSE; player->jumping = B_FALSE; - player->powerup = B_FALSE; player->netcaught = 0; + player->powerup = B_FALSE; // add initial fading cloud @@ -2520,7 +2529,6 @@ if (s->id == P_PUFF) printf("PUFF WITH DOOMCOUNT!\n"); levelcomplete = LV_CLOUDLOOP; } - printf("init angle = %0.2f\n", s->angle / (M_PI/180)); } else { // calculate distance to player @@ -4554,6 +4562,28 @@ int dofruiteffect(sprite_t *s) { player->powerup = PW_CANNON; puffin(P_CANNON, player->x, player->y,"cannon", 0); return B_TRUE; + } else if (s->id == P_PHONE) { + sprite_t *s2, *nexts; + playfx(FX_PHONE); + sprintf(tempm, "Telephone!"); + addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY); + // set powerup + player->powerup = PW_PHONE; + // kill all enemies + for (s2 = sprite; s2 ; s2 = nexts) { + nexts = s2->next; + if (isbullet(s2->id) || ismonster(s2->id)) { + s2->dead = D_FINAL; + + if (s2->caughtby) { + s2->caughtby = NULL; + player->netcaught--; + } + } + } + // call in cloud immediately + levelcomplete = LV_FINAL; + return B_TRUE; } else if (s->id == P_BOMB) { sprite_t *s2, *nexts; @@ -4735,6 +4765,7 @@ int initsound(void) { loadfx(FX_SPRAY, "spray.wav"); loadfx(FX_CANNON, "fusion.wav"); loadfx(FX_CRACK, "crack.wav"); + loadfx(FX_PHONE, "phone.wav"); // load sound effects diff --git a/shared.c b/shared.c index b96f27b..d1b7e8b 100644 --- a/shared.c +++ b/shared.c @@ -20,7 +20,7 @@ #include "shared.h" -int loadlevel(int wnum, int lnum) { +int loadlevel(int wnum, int lnum, int wantmonsters) { FILE *f; int x,y; int xx,yy; @@ -514,29 +514,31 @@ int loadlevel(int wnum, int lnum) { /* add monsters */ - for (i = 0; i < level->nummonsters; i++) { - char name[MIDBUFLEN]; - int delay; + if (wantmonsters) { + for (i = 0; i < level->nummonsters; i++) { + char name[MIDBUFLEN]; + int delay; - if (level->initm[i].id == P_HELP) { - strncpy(name, level->initm[i].help, MIDBUFLEN); - } else { - sprintf(name, "Monster-%d",i); + if (level->initm[i].id == P_HELP) { + strncpy(name, level->initm[i].help, MIDBUFLEN); + } else { + sprintf(name, "Monster-%d",i); + } + + if (ismonster(level->initm[i].id)) { + delay = 20; + } else { + delay = 0; + } + + #ifdef __EDITOR + addsprite(level->initm[i].id, + level->initm[i].startx, level->initm[i].starty, name ); + + #else + puffin(level->initm[i].id, level->initm[i].startx, level->initm[i].starty, name, delay ); + #endif } - - if (ismonster(level->initm[i].id)) { - delay = 20; - } else { - delay = 0; - } - -#ifdef __EDITOR - addsprite(level->initm[i].id, - level->initm[i].startx, level->initm[i].starty, name ); - -#else - puffin(level->initm[i].id, level->initm[i].startx, level->initm[i].starty, name, delay ); -#endif } gtime = 0; @@ -1145,6 +1147,9 @@ int loadimagesets(void) { loadspriteimage(P_BOMB,F_WALK1, "sprites/bomb.png"); imageset[P_BOMB].numimages = 1; + loadspriteimage(P_PHONE,F_WALK1, "sprites/phone.png"); + imageset[P_PHONE].numimages = 1; + loadspriteimage(P_SHIELD,F_WALK1, "sprites/shield.png"); imageset[P_SHIELD].numimages = 1; @@ -1661,6 +1666,7 @@ int isfruit(int id) { case P_FTODIAMOND: case P_FTOGEM: case P_BOMB: + case P_PHONE: case P_HELMET: case P_SHIELD: case P_RINGSILVER: @@ -2235,8 +2241,7 @@ int loadlevellist(void) { int randompowerup(void) { int num; - num = rand() % 19; - + num = rand() % 20; switch (num) { case 0: @@ -2278,6 +2283,8 @@ int randompowerup(void) { return P_SPRAY; case 18: return P_CANNONPOWERUP; + case 19: + return P_PHONE; } } @@ -2395,6 +2402,7 @@ void setfruitinfo(void) { setinfo(P_SNOWMAN, "Snowman", "Freezes the level, turning everything to ice - touch a monster to shatter it!", "snowman.png"); setinfo(P_SPRAY, "Fly Spray", "Sickens all monsters, causing them to slow down to half speed.","spray.png"); setinfo(P_CANNONPOWERUP, "Fusion Cannon", "A powerful weapon which will shoot out laser beams in all directions!", "cannonpowerup.png"); + setinfo(P_PHONE, "Phone", "Calls in your helper cloud and immediately skips two levels.", "phone.png"); setinfo(P_RAT, "Rat", "The weakest of the monsters, the rat will simply walk back and forth waiting to be caught. Beward an angry rat though, as it will try to fall or jump in order to catch you!", "rat.png"); setinfo(P_BEE, "Bee", "Bees, while still relatively weak, gain an advantage over bats in that they are able to fly. They move in a simple diagonal pattern, changing direction when they get near a wall or spikes. Bees will speed up when angry.", "newbee.png"); diff --git a/shared.h b/shared.h index 4c71378..b65e03c 100644 --- a/shared.h +++ b/shared.h @@ -5,7 +5,7 @@ #include "defs.h" /* functions */ -int loadlevel(int wnum, int lnum); +int loadlevel(int wnum, int lnum, int wantmonsters); void setdefaults(sprite_t *s); int loadtiletypes(char *filename); sprite_t *addsprite(int id,int x, int y, char *name);