diff --git a/data/levels/level1.dat b/data/levels/level1.dat index 26eecc0..4dd78a1 100644 --- a/data/levels/level1.dat +++ b/data/levels/level1.dat @@ -29,6 +29,7 @@ monsters 15 34 19 16 35 19 17 36 19 +15 3 15 endmonsters exitdir 1 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, @@ -47,10 +48,10 @@ exitdir 1 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,0,0,4, -39,1,34,0,0,0,0,0,0,0,0,0,0,0,0,0,42,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,4, +39,1,1,34,0,0,0,0,0,0,0,0,0,0,0,0,42,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,4, 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4, -4,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4, +4,0,0,0,0,0,0,0,0,0,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4, 39,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,38,4,4,4,4,4,4,39,1,1,1,1,1,38,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,44,44,4,4,4,4,4,4,4,4,4,4, diff --git a/data/sounds/extralife.wav b/data/sounds/extralife.wav index 548b89d..e673b71 100644 Binary files a/data/sounds/extralife.wav and b/data/sounds/extralife.wav differ diff --git a/data/sounds/warp.wav b/data/sounds/warp.wav new file mode 100644 index 0000000..0234e25 Binary files /dev/null and b/data/sounds/warp.wav differ diff --git a/data/tiledefs.dat b/data/tiledefs.dat index 5ec8288..45abe02 100644 --- a/data/tiledefs.dat +++ b/data/tiledefs.dat @@ -541,3 +541,9 @@ id 5 solid 0 file newtiles/light2.png end + +tile specialsign +id 25 +solid 0 +file newtiles/signup.png +end diff --git a/defs.h b/defs.h index c91e976..c035000 100644 --- a/defs.h +++ b/defs.h @@ -279,7 +279,7 @@ /* enums */ /* sounds */ -#define MAXFX 56 +#define MAXFX 57 #define FX_SHOOT 0 #define FX_SLAM 1 #define FX_KILL 2 @@ -336,6 +336,7 @@ #define FX_EVILLAUGH 53 #define FX_BIRDS 54 #define FX_EXTRALIFE 55 +#define FX_WARP 56 // card suits #define CS_HEART 1 @@ -668,6 +669,7 @@ #define T_WATERRIGHT 22 #define T_WATERLEFT 23 #define T_WATERDOWN 24 +#define T_WARP 25 // hidden warp point - jump to reveal // death states #define D_INITIAL (1) // Need to trigger death sequence diff --git a/edit.c b/edit.c index 517c74d..fe6b1e3 100644 --- a/edit.c +++ b/edit.c @@ -1234,6 +1234,8 @@ void drawtilehint(SDL_Surface *where, tiletype_t *tt, double x, double y) { writetext(where, x+1, y+1, "->", PALTEXTSIZE, &red); } else if (tt->id == T_LEFT) { writetext(where, x+1, y+1, "<-", PALTEXTSIZE, &red); + } else if (tt->id == T_WARP) { + writetext(where, x+1, y+1, "W", PALTEXTSIZE, &red); } } diff --git a/rc.c b/rc.c index c026a7f..34d295c 100644 --- a/rc.c +++ b/rc.c @@ -416,9 +416,10 @@ int main (int argc, char **argv) { } // kill all cards, so we don't have a pokereffect during endoflevel + // also kill the random level powerup if it exists for (s2 = sprite; s2 ; s2 = nexts) { nexts = s2->next; - if (iscard(s2->id) || s2->id == P_MOVINGCARD) { + if (iscard(s2->id) || s2->id == P_MOVINGCARD || strstr(s2->name, "random_up")) { s2->dead = D_FINAL; } } @@ -1388,7 +1389,7 @@ void jump(sprite_t *s, int dir) { s->jumping = 1; s->jumpspeed = 2; s->jumpdir = dir; - } else { // plaayer + } else { // player tiletype_t *tt; s->jumpdir = dir; if (s->jumpdir != 0) { @@ -1426,6 +1427,20 @@ void jump(sprite_t *s, int dir) { s->jumpspeed = 5; } + // Special hidden cheat - jumping on the up sign on level 1 + // skips you to level 3 (to avoid boring levels at the start) + if (s->jumpdir == 0) { + int tx,ty; + tt= gettileat(s->x, s->y - (TILEH/2), &tx, &ty); + if (tt->id == T_WARP) { + // it disappears + curlevel->map[ty*LEVELW+tx] = getuniq(T_WARP); + // puff in a telephone + puffin(P_PHONE, tx*TILEW + (TILEW/2), ty*TILEH+TILEH, "warpphone", -1); + playfx(FX_WARP); + } + } + } // stop climbing s->climbing = B_FALSE; @@ -7080,8 +7095,12 @@ int dofruiteffect(sprite_t *pp, sprite_t *s) { sprintf(tempm, "Engaged"); addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY, TT_NORM); } else { - playfx(FX_PHONE); - sprintf(tempm, "Telephone!"); + if (!strstr(s->name, "warp")) { + playfx(FX_PHONE); + sprintf(tempm, "Telephone!"); + } else { + sprintf(tempm, "Warp!"); + } addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY, TT_NORM); // set powerup pp->powerup = PW_PHONE; @@ -7568,6 +7587,7 @@ int initsound(void) { loadfx(FX_EVILLAUGH, "evillaugh.wav"); loadfx(FX_BIRDS, "birds.wav"); loadfx(FX_EXTRALIFE, "extralife.wav"); + loadfx(FX_WARP, "warp.wav"); // load sound effects for (i = 0; i < MAXFX; i++) {