diff --git a/data/sounds/jetpack.wav b/data/sounds/jetpack.wav new file mode 100644 index 0000000..63d7c3b Binary files /dev/null and b/data/sounds/jetpack.wav differ diff --git a/data/sprites/jetpack.png b/data/sprites/jetpack.png index a8397ed..8826f71 100644 Binary files a/data/sprites/jetpack.png and b/data/sprites/jetpack.png differ diff --git a/defs.h b/defs.h index 806e672..f48afce 100644 --- a/defs.h +++ b/defs.h @@ -297,7 +297,7 @@ /* enums */ /* sounds */ -#define MAXFX 57 +#define MAXFX 58 #define FX_SHOOT 0 #define FX_SLAM 1 #define FX_KILL 2 @@ -355,6 +355,7 @@ #define FX_BIRDS 54 #define FX_EXTRALIFE 55 #define FX_WARP 56 +#define FX_JETPACK 57 // card suits #define CS_HEART 1 diff --git a/rc.c b/rc.c index 4c4c601..d805d5d 100644 --- a/rc.c +++ b/rc.c @@ -1412,20 +1412,32 @@ void jump(sprite_t *s, int dir) { } } - // if on rollers, they add to your inertia - // if you are facing their direction - tt= gettileat(s->x, s->y, NULL, NULL); - if ((tt->id == T_RIGHT) && (s->jumpdir > 0)) { - s->jumpdir++; - } else if ((tt->id == T_LEFT) && (s->jumpdir < 0)) { - s->jumpdir--; + if (s->powerup == PW_JETPACK) { + // jetpack makes a blast of fire + addsprite(P_SMASH, s->x, s->y, "jet_smahs"); + + // jetpack always adds speed to sideways jumps + if (s->jumpdir > 0) { + s->jumpdir++; + } else if (s->jumpdir < 0) { + s->jumpdir--; + } + } else { + // if on rollers, they add to your inertia + // if you are facing their direction + tt= gettileat(s->x, s->y, NULL, NULL); + if ((tt->id == T_RIGHT) && (s->jumpdir > 0)) { + s->jumpdir++; + } else if ((tt->id == T_LEFT) && (s->jumpdir < 0)) { + s->jumpdir--; + } } s->jumping = 1; if (s->climbing) { s->jumpspeed = 3; - } else if (s->powerup == PW_JETPACK) { + } else if ((s->powerup == PW_JETPACK) && (s->jumpdir == 0)) { s->jumpspeed = 7; } else if (s->ontramp) { s->jumpspeed = 7; @@ -1469,8 +1481,10 @@ void jump(sprite_t *s, int dir) { s->recoiling = B_FALSE; } else { // play sound effect - if ((s->ontramp) || (s->powerup == PW_JETPACK)) { + if (s->ontramp) { playfx(FX_SPRING); + } else if (s->powerup == PW_JETPACK) { + playfx(FX_JETPACK); } else { playfx(FX_JUMP); } @@ -6231,6 +6245,10 @@ void dogravity(sprite_t *s) { s->falling = B_TRUE; s->fallspeed = 0; } + + if (s->powerup == PW_JETPACK) { + puffin(-1, s->x, s->y, "jet_puff", 0); + } } // handle ring @@ -7342,7 +7360,7 @@ int dofruiteffect(sprite_t *pp, sprite_t *s) { return B_TRUE; } else if (s->id == P_JETPACK) { playfx(FX_POWERUP); - sprintf(tempm, "Kangaroo jumps!"); + sprintf(tempm, "Jet pack!"); addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY, TT_NORM); pp->powerup = PW_JETPACK; return B_TRUE; @@ -7630,6 +7648,7 @@ int initsound(void) { loadfx(FX_BIRDS, "birds.wav"); loadfx(FX_EXTRALIFE, "extralife.wav"); loadfx(FX_WARP, "warp.wav"); + loadfx(FX_JETPACK, "jetpack.wav"); // load sound effects for (i = 0; i < MAXFX; i++) { diff --git a/shared.c b/shared.c index 6734d39..29128de 100644 --- a/shared.c +++ b/shared.c @@ -1560,7 +1560,7 @@ int loadimagesets(void) { loadspriteimage(P_BADMAGNET,F_WALK1, "sprites/badmagnet.png"); imageset[P_BADMAGNET].numimages = 1; - loadspriteimage(P_JETPACK,F_WALK1, "sprites/kangaroo.png"); + loadspriteimage(P_JETPACK,F_WALK1, "sprites/jetpack.png"); imageset[P_JETPACK].numimages = 1; loadspriteimage(P_ZAPPOWERUP,F_WALK1, "sprites/zapper.png"); @@ -3104,6 +3104,8 @@ int randompowerup(void) { int num; num = rand() % 42; +return P_JETPACK; + switch (num) { case 0: default: diff --git a/website/img/jetpack.png b/website/img/jetpack.png new file mode 100644 index 0000000..1badb69 Binary files /dev/null and b/website/img/jetpack.png differ diff --git a/website/img/kangaroo.png b/website/img/kangaroo.png deleted file mode 100644 index 3a07abf..0000000 Binary files a/website/img/kangaroo.png and /dev/null differ diff --git a/website/info.html b/website/info.html index 39382c3..7ec697d 100644 --- a/website/info.html +++ b/website/info.html @@ -80,7 +80,7 @@
AnchorThe extremely heavy anchor will weigh down enemies, preventing them from jumping or flying.
MagnetCollecting this powerup will align the magnetic forces of the earth in your favour, attracting all nearby fruits towards you.
Red SkullThis skull curses you and will repel fruits away from you, denying you access to them! -
KangarooFor the remainder of the current level, your jumping ability is increased to that of a kangaroo! +
JetpackFor the remainder of the current level, the jetpack's thrust will add to your jumping ability! ?
RandomGives you a random effect...  Super Powerups
Big Speed UpMakes you walk faster, permenantly!