Fixed issue where player could swim upwards super-fast by holding UP+SWIM with
a mask Removed a cheat key which could cause a crash. Modified some levels (to remove duplicate monsters)
This commit is contained in:
parent
c0c10963cd
commit
79c84370ed
4
Makefile
4
Makefile
|
@ -1,10 +1,10 @@
|
|||
all: rc edit
|
||||
|
||||
rc: rc.c shared.c rc.h shared.h globals.h defs.h
|
||||
gcc -O3 -Wall -DREV=`./getsvnrev.sh` -o rc -g rc.c shared.c `sdl-config --cflags --libs` -I/usr/local/include -L/usr/local/lib -L/opt/local/lib -lSDLmain -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf -lSDL_mixer
|
||||
gcc -O3 -Wall -DREV=`./getsvnrev.sh` -o rc -g rc.c shared.c `sdl-config --cflags --libs` -I/usr/local/include -L/sw/lib -L/usr/local/lib -L/opt/local/lib -lSDLmain -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf -lSDL_mixer
|
||||
|
||||
edit: edit.c shared.c edit.h shared.h globals.h defs.h
|
||||
gcc -D__EDITOR -DREV=`./getsvnrev.sh` -Wall -o edit -g edit.c shared.c `sdl-config --cflags --libs` -I/usr/local/include -L/usr/local/lib -L/opt/local/lib -lSDLmain -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf
|
||||
gcc -D__EDITOR -DREV=`./getsvnrev.sh` -Wall -o edit -g edit.c shared.c `sdl-config --cflags --libs` -I/usr/local/include -L/sw/lib -lSDLmain -lSDL -lSDL_image -lSDL_ttf -L/opt/local/lib -lSDL_gfx
|
||||
|
||||
app: rc
|
||||
./makeapp.sh
|
||||
|
|
|
@ -61,8 +61,8 @@ exitdir -2
|
|||
33,0,0,0,0,90,90,90,90,0,0,0,90,90,90,90,89,89,0,0,0,0,89,89,90,90,90,90,0,0,0,90,90,90,90,0,0,0,0,33,
|
||||
33,89,89,89,89,90,90,90,90,89,89,89,90,90,90,90,90,90,89,0,0,89,90,90,90,90,90,90,89,89,89,90,90,90,90,89,89,89,89,33,
|
||||
33,0,0,0,0,86,86,86,0,0,0,0,90,90,90,90,90,90,0,0,0,0,90,90,90,90,90,90,0,0,0,86,86,0,0,0,86,0,0,33,
|
||||
33,0,0,0,0,0,0,0,0,0,0,0,90,90,90,90,0,0,0,0,0,0,0,0,90,90,90,90,0,0,0,0,0,0,0,0,0,0,0,33,
|
||||
33,0,0,0,0,0,0,0,0,0,0,0,90,90,0,86,0,0,0,0,0,0,0,0,0,0,90,90,0,0,0,0,0,0,0,0,0,0,0,33,
|
||||
33,0,0,0,0,0,0,0,0,0,0,0,90,90,90,90,92,0,0,0,0,0,0,93,90,90,90,90,0,0,0,0,0,0,0,0,0,0,0,33,
|
||||
33,0,0,0,0,0,0,0,0,0,0,0,90,90,92,86,0,0,0,0,0,0,0,0,0,93,90,90,0,0,0,0,0,0,0,0,0,0,0,33,
|
||||
33,0,0,0,32,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,32,0,0,0,33,
|
||||
33,0,0,0,33,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,33,0,0,0,33,
|
||||
33,0,0,0,33,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,33,0,0,0,33,
|
||||
|
|
|
@ -55,3 +55,19 @@ exitdir 1
|
|||
33,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,33,
|
||||
33,0,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,0,0,0,0,0,0,0,0,33,
|
||||
layer2
|
||||
7,11,95,layer3
|
||||
8,11,95,layer3
|
||||
9,11,95,layer3
|
||||
30,11,95,layer3
|
||||
31,11,95,layer3
|
||||
32,11,95,layer3
|
||||
7,12,95,layer3
|
||||
8,12,95,layer3
|
||||
9,12,95,layer3
|
||||
30,12,95,layer3
|
||||
31,12,95,layer3
|
||||
32,12,95,layer3
|
||||
18,14,95,layer3
|
||||
19,14,95,layer3
|
||||
20,14,95,layer3
|
||||
21,14,95,layer3
|
||||
|
|
|
@ -5,7 +5,7 @@ help
|
|||
endhelp
|
||||
monsters
|
||||
0 16 19
|
||||
134 34 28
|
||||
134 22 19
|
||||
23 20 8
|
||||
16 23 19
|
||||
12 22 28
|
||||
|
|
|
@ -46,7 +46,7 @@ monsters
|
|||
endmonsters
|
||||
exitdir -2
|
||||
90,90,90,90,90,90,90,90,90,90,90,90,90,91,91,90,90,90,90,90,91,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,
|
||||
90,0,0,0,0,0,0,0,0,0,90,90,90,90,91,91,90,90,90,90,91,90,90,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
||||
90,0,0,0,0,0,0,0,0,93,90,90,90,90,91,91,90,90,90,90,91,90,90,90,92,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
||||
90,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,90,
|
||||
90,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,90,
|
||||
90,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,90,
|
||||
|
@ -54,11 +54,11 @@ exitdir -2
|
|||
90,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,90,
|
||||
90,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,89,89,89,89,0,0,0,0,0,0,0,0,90,
|
||||
90,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,90,90,90,90,0,0,0,0,0,0,0,0,90,
|
||||
90,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,90,90,90,90,0,0,0,0,0,0,0,0,90,
|
||||
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,89,90,90,90,90,89,0,0,0,0,0,0,0,90,
|
||||
90,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,90,90,91,90,0,0,0,0,0,0,0,0,90,
|
||||
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,89,90,90,91,90,89,0,0,0,0,0,0,0,90,
|
||||
90,89,89,89,89,89,89,89,89,89,89,89,89,89,89,0,0,0,0,89,89,89,89,89,89,90,90,90,90,90,90,90,89,89,89,89,89,89,89,90,
|
||||
90,90,90,90,90,90,90,90,92,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,7,0,0,0,90,
|
||||
90,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,7,0,0,0,90,
|
||||
90,91,90,90,90,90,90,90,92,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,7,0,0,93,90,
|
||||
90,92,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,7,0,0,0,90,
|
||||
90,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,7,0,0,0,90,
|
||||
90,0,0,0,0,0,0,0,0,0,0,0,0,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,0,0,0,0,0,0,0,7,0,0,0,90,
|
||||
90,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,90,
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
605,level605.dat,Frosty Towers
|
||||
616,level616.dat,Polar Claw
|
||||
615,level615.dat,Raaa!
|
||||
618,level618.dat,Secret Exit
|
||||
109,level109.dat,THE END SO FAR
|
||||
99,level99.dat,TEST LEVEL
|
||||
0,intro.dat,INTRO
|
||||
|
|
1
defs.h
1
defs.h
|
@ -723,6 +723,7 @@
|
|||
#define MV_WALK 1 // walked/climbed on purpose
|
||||
#define MV_ICE 3 // slid on ice
|
||||
#define MV_FLY 4 // flying
|
||||
#define MV_SWIM 64 // swum somewhere - OR this
|
||||
|
||||
|
||||
// Tile types
|
||||
|
|
17
edit.c
17
edit.c
|
@ -35,6 +35,7 @@ int skipto = -1;
|
|||
|
||||
int layer = 1; // which layer we are editting, either 1 or 2
|
||||
int layertransparent = B_TRUE;
|
||||
int showlayer3 = B_TRUE;
|
||||
|
||||
|
||||
sprite_t *waypointm = NULL;
|
||||
|
@ -511,7 +512,18 @@ int main (int argc, char **argv) {
|
|||
drawsprites();
|
||||
sprintf(tempm, "Transparent layers now %s",layertransparent ? "ON" : "OFF");
|
||||
setstatustext(tempm, &green);
|
||||
toggletimer = 15;
|
||||
toggletimer = 45;
|
||||
}
|
||||
}
|
||||
if (keys[SDLK_y]) {
|
||||
if (toggletimer == 0) {
|
||||
if (showlayer3) showlayer3 = B_FALSE;
|
||||
else showlayer3 = B_TRUE;
|
||||
draweditorlevel();
|
||||
drawsprites();
|
||||
sprintf(tempm, "Now %s layer 3",layertransparent ? "showing" : "hiding");
|
||||
setstatustext(tempm, &green);
|
||||
toggletimer = 45;
|
||||
}
|
||||
}
|
||||
if (keys[SDLK_w]) { // set waypoints
|
||||
|
@ -1272,6 +1284,9 @@ void draweditortile3(SDL_Surface *where, int x, int y) {
|
|||
tiletype_t *tt;
|
||||
int offset;
|
||||
|
||||
if (!showlayer3) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((x < 0) || (y < 0) || (x >= LEVELW) || (y >= LEVELH)) {
|
||||
return;
|
||||
|
|
18
rc.c
18
rc.c
|
@ -10896,8 +10896,11 @@ void swimup(sprite_t *pl) {
|
|||
} else if (pl == player2) {
|
||||
pnum = 1;
|
||||
} else return; // only valid for players
|
||||
|
||||
|
||||
if (pl->moved & MV_SWIM) {
|
||||
return;
|
||||
}
|
||||
|
||||
pl->falling = B_FALSE;
|
||||
if (!isroofabove(pl)) {
|
||||
// is there water above us too?
|
||||
|
@ -10912,6 +10915,7 @@ void swimup(sprite_t *pl) {
|
|||
}
|
||||
// if so, swim up
|
||||
pl->y -= swimspeed;
|
||||
pl->moved |= MV_SWIM;
|
||||
} else {
|
||||
int whichway;
|
||||
// if not, jump up
|
||||
|
@ -10931,6 +10935,11 @@ void swimup(sprite_t *pl) {
|
|||
}
|
||||
|
||||
void swimdown(sprite_t *pl) {
|
||||
|
||||
if (pl->moved & MV_SWIM) {
|
||||
return;
|
||||
}
|
||||
|
||||
pl->falling = B_FALSE;
|
||||
if (!isonground(pl)) {
|
||||
double swimspeed;
|
||||
|
@ -10942,6 +10951,7 @@ void swimdown(sprite_t *pl) {
|
|||
swimspeed *= 2;
|
||||
}
|
||||
pl->y += swimspeed;
|
||||
pl->moved |= MV_SWIM;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11636,13 +11646,13 @@ void startgame(void) {
|
|||
// settings done in addsprite()
|
||||
if (player) {
|
||||
int c;
|
||||
setdefaults(player);
|
||||
player->permspeed = B_FALSE;
|
||||
player->permbignet = B_FALSE;
|
||||
player->permnumnets = B_FALSE;
|
||||
player->permmask = B_FALSE;
|
||||
player->permarmour = B_FALSE;
|
||||
player->permsticky = B_FALSE;
|
||||
setdefaults(player);
|
||||
player->numcards = 0;
|
||||
for (c = 0; c < MAXCARDS; c++) {
|
||||
player->card[c] = -1;
|
||||
|
@ -11651,13 +11661,13 @@ void startgame(void) {
|
|||
}
|
||||
if (player2) {
|
||||
int c;
|
||||
setdefaults(player2);
|
||||
player2->permspeed = B_FALSE;
|
||||
player2->permbignet = B_FALSE;
|
||||
player2->permnumnets = B_FALSE;
|
||||
player2->permmask = B_FALSE;
|
||||
player2->permarmour = B_FALSE;
|
||||
player2->permsticky = B_FALSE;
|
||||
setdefaults(player2);
|
||||
player2->numcards = 0;
|
||||
for (c = 0; c < MAXCARDS; c++) {
|
||||
player2->card[c] = -1;
|
||||
|
@ -11681,11 +11691,13 @@ void startgame(void) {
|
|||
if (want1up) {
|
||||
if (player == NULL) {
|
||||
player = addsprite(P_PLAYER, 32, 450, "Player 1" );
|
||||
setdefaults(player);
|
||||
}
|
||||
}
|
||||
if (want2up) {
|
||||
if (player2 == NULL) {
|
||||
player2 = addsprite(P_PLAYER2, 32, 450, "Player 2" );
|
||||
setdefaults(player2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
9
shared.c
9
shared.c
|
@ -570,12 +570,20 @@ int loadlevel(int lnum, int wantmonsters) {
|
|||
if (player == NULL) {
|
||||
player = addsprite(P_PLAYER, (curlevel->p1x * TILEW) + (TILEW/2),
|
||||
(curlevel->p1y * TILEH) + TILEH-2 , "Player 1" );
|
||||
// call this again to make sure player gets
|
||||
// level-based powerups when starting on other
|
||||
// levels
|
||||
setdefaults(player);
|
||||
}
|
||||
}
|
||||
if (want2up) {
|
||||
if (player2 == NULL) {
|
||||
player2 = addsprite(P_PLAYER2, (curlevel->p2x * TILEW) + (TILEW/2),
|
||||
(curlevel->p2y * TILEH) + TILEH-2 , "Player 2" );
|
||||
// call this again to make sure player gets
|
||||
// level-based powerups when starting on other
|
||||
// levels
|
||||
setdefaults(player2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -667,7 +675,6 @@ printf(".\n");
|
|||
|
||||
void setdefaults(sprite_t *s) {
|
||||
if (isplayer(s)) {
|
||||
|
||||
// set permenant powerups based on level
|
||||
if (curlevelnum > 20) {
|
||||
s->permspeed = B_TRUE;
|
||||
|
|
Loading…
Reference in New Issue