diff --git a/data/sprites/kangaroo.png b/data/sprites/jetpack.png similarity index 100% rename from data/sprites/kangaroo.png rename to data/sprites/jetpack.png diff --git a/defs.h b/defs.h index 4e5c1a1..806e672 100644 --- a/defs.h +++ b/defs.h @@ -534,7 +534,7 @@ #define P_SMALLANCHOR 145 #define P_MAGNET 146 #define P_BADMAGNET 147 -#define P_KANGAROO 148 +#define P_JETPACK 148 #define FLY_FLYTIME 150 @@ -597,7 +597,7 @@ #define PW_ANCHOR 16 // anchor #define PW_MAGNET 17 // magnet #define PW_BADMAGNET 18 // badmagnet -#define PW_KANGAROO 19 // kangaroo +#define PW_JETPACK 19 // kangaroo // "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 4353487..4c4c601 100644 --- a/rc.c +++ b/rc.c @@ -1425,7 +1425,7 @@ void jump(sprite_t *s, int dir) { s->jumping = 1; if (s->climbing) { s->jumpspeed = 3; - } else if (s->powerup == PW_KANGAROO) { + } else if (s->powerup == PW_JETPACK) { s->jumpspeed = 7; } else if (s->ontramp) { s->jumpspeed = 7; @@ -1469,7 +1469,7 @@ void jump(sprite_t *s, int dir) { s->recoiling = B_FALSE; } else { // play sound effect - if ((s->ontramp) || (s->powerup == PW_KANGAROO)) { + if ((s->ontramp) || (s->powerup == PW_JETPACK)) { playfx(FX_SPRING); } else { playfx(FX_JUMP); @@ -2896,7 +2896,8 @@ int movesprite(sprite_t *s) { double xpoint; xpoint = (curlevel->powerupx * TILEW) + (TILEW/2); if (s->x <= xpoint) { - movex(s, s->speed); + int rv = B_FALSE; + rv = movex(s, s->speed); } } else { // not in intro sequence if (!s->falling) { @@ -5954,7 +5955,7 @@ int isonground(sprite_t *s) { } // antigrav? - if (s->antigrav) { + if (s->antigrav ) { return B_TRUE; } @@ -6095,6 +6096,7 @@ void dogravity(sprite_t *s) { s->trampy = -1; } } + if (s->dead) return; @@ -7338,11 +7340,11 @@ int dofruiteffect(sprite_t *pp, sprite_t *s) { addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY, TT_NORM); pp->powerup = PW_MAGNET; return B_TRUE; - } else if (s->id == P_KANGAROO) { + } else if (s->id == P_JETPACK) { playfx(FX_POWERUP); sprintf(tempm, "Kangaroo jumps!"); addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY, TT_NORM); - pp->powerup = PW_KANGAROO; + pp->powerup = PW_JETPACK; return B_TRUE; } else if (s->id == P_BADMAGNET) { playfx(FX_SKULL); diff --git a/shared.c b/shared.c index b418b54..6734d39 100644 --- a/shared.c +++ b/shared.c @@ -1560,8 +1560,8 @@ int loadimagesets(void) { loadspriteimage(P_BADMAGNET,F_WALK1, "sprites/badmagnet.png"); imageset[P_BADMAGNET].numimages = 1; - loadspriteimage(P_KANGAROO,F_WALK1, "sprites/kangaroo.png"); - imageset[P_KANGAROO].numimages = 1; + loadspriteimage(P_JETPACK,F_WALK1, "sprites/kangaroo.png"); + imageset[P_JETPACK].numimages = 1; loadspriteimage(P_ZAPPOWERUP,F_WALK1, "sprites/zapper.png"); imageset[P_ZAPPOWERUP].numimages = 1; @@ -2458,7 +2458,7 @@ int isfruit(int id) { case P_RANDOM: case P_MAGNET: case P_BADMAGNET: - case P_KANGAROO: + case P_JETPACK: return FT_TEMP; /* flowers */ case P_FLOWERYELLOW: @@ -3194,7 +3194,7 @@ int randompowerup(void) { case 40: return P_BADMAGNET; case 41: - return P_KANGAROO; + return P_JETPACK; } } @@ -3345,7 +3345,7 @@ void setfruitinfo(void) { setinfo(P_ANCHOR, "Anchor", "The extremely heavy anchor will weigh down enemies, preventing them from jumping or flying.", "anchor.png"); setinfo(P_MAGNET, "Magnet", "Collecting this powerup will align the magnetic forces of the earth in your favour, attracting all nearby fruits towards you.", "magnet.png"); setinfo(P_BADMAGNET, "Red Skull", "This skull curses you and will repel fruits away from you, denying you access to them!", "badmagnet.png"); - setinfo(P_KANGAROO, "Kangaroo", "For the remainder of the current level, your jumping ability is increased to that of a kangaroo!", "kangaroo.png"); + setinfo(P_JETPACK, "Jetpack", "For the remainder of the current level, the jetpack's thrust will add to your jumping ability!", "jetpack.png"); setinfo(P_ZAPPOWERUP, "Bug Zapper", "Zaps nearby enemies with miniature bolts of lightning", "zapper.png"); setinfo(P_SKULL, "Green Skull", "Avoid these at all costs! The green skull will cause you to lose all net powerups.", "skull.png"); setinfo(P_CLOVER, "4-Leaf Clover", "Increases your luck...", "clover.png");