Replaced kangaroo with jetpack

This commit is contained in:
Rob Pearce 2008-11-24 20:02:39 +00:00
parent 7add2a6744
commit c5eff9eab0
4 changed files with 15 additions and 13 deletions

View File

Before

Width:  |  Height:  |  Size: 578 B

After

Width:  |  Height:  |  Size: 578 B

4
defs.h
View File

@ -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

14
rc.c
View File

@ -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;
}
@ -6097,6 +6098,7 @@ void dogravity(sprite_t *s) {
}
if (s->dead) return;
if (s->flies && !s->iced) return; // no gravity if you fly, but ice cancels flying
if (s->id != P_KSSHELL) {
@ -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);

View File

@ -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");