Tweak magic lamp powerup - all initial fruits on next level
are now gold bars as well.
This commit is contained in:
parent
7937c776bc
commit
95087435ae
3
defs.h
3
defs.h
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <SDL_mixer.h>
|
||||
|
||||
|
||||
/* files */
|
||||
#define FILE_LEVELMAP "map.dat"
|
||||
#define FILE_TILEDEFS "tiledefs.dat"
|
||||
|
@ -1195,6 +1194,8 @@ extern int deck[];
|
|||
extern int forcegoodcard;
|
||||
extern int nextforcegoodcard;
|
||||
|
||||
extern int forcegold;
|
||||
|
||||
extern int globpowerup;
|
||||
extern int globtimer;
|
||||
|
||||
|
|
3
rc.c
3
rc.c
|
@ -12155,11 +12155,12 @@ if (cheat) {
|
|||
}
|
||||
if (keydown(0, SDLK_v)) { // cheat
|
||||
if (toggletimer == 0) {
|
||||
addsprite(P_BIGCHEST, (640/2), 0, "bigchest");
|
||||
// addsprite(P_BIGCHEST, (640/2), 0, "bigchest");
|
||||
// all powerups
|
||||
playfx(FX_POWERUP);
|
||||
sprintf(tempm, "Cheat!");
|
||||
if (player) {
|
||||
player->powerup = PW_MAGNET;
|
||||
player->netmax = 4; // all nets
|
||||
player->netbig = B_TRUE; // big net
|
||||
player->speed = 2; // fast
|
||||
|
|
18
shared.c
18
shared.c
|
@ -19,7 +19,6 @@
|
|||
#include "globals.h"
|
||||
#include "shared.h"
|
||||
|
||||
|
||||
int loadlevel(int lnum, int wantmonsters) {
|
||||
FILE *f;
|
||||
int x,y;
|
||||
|
@ -109,8 +108,6 @@ int loadlevel(int lnum, int wantmonsters) {
|
|||
level->p1y = 0;
|
||||
level->powerupx = -1;
|
||||
level->powerupy = -1;
|
||||
|
||||
|
||||
|
||||
|
||||
/* remove all onscreen text */
|
||||
|
@ -292,8 +289,6 @@ int loadlevel(int lnum, int wantmonsters) {
|
|||
level->initm[level->nummonsters].wayy[0] = y*TILEH+(TILEH-2)+2;
|
||||
level->initm[level->nummonsters].numwaypoints = 1;
|
||||
|
||||
|
||||
|
||||
// read waypoints
|
||||
p = strtok(NULL, " ");
|
||||
while (p) {
|
||||
|
@ -667,10 +662,15 @@ int loadlevel(int lnum, int wantmonsters) {
|
|||
}
|
||||
newsp->curwaypoint = 1;
|
||||
} else {
|
||||
int thisid;
|
||||
thisid = level->initm[i].id;
|
||||
#ifdef __EDITOR
|
||||
addsprite(level->initm[i].id, level->initm[i].startx, level->initm[i].starty, name );
|
||||
addsprite(thisid, level->initm[i].startx, level->initm[i].starty, name );
|
||||
#else
|
||||
puffin(level->initm[i].id, level->initm[i].startx, level->initm[i].starty, name, delay );
|
||||
if (forcegold && isfruit(level->initm[i].id)) {
|
||||
thisid = P_GOLDBAR;
|
||||
}
|
||||
puffin(thisid, level->initm[i].startx, level->initm[i].starty, name, delay );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -953,8 +953,6 @@ sprite_t *addsprite(int id, int x, int y, char *name ) {
|
|||
s = s->next;
|
||||
}
|
||||
|
||||
|
||||
|
||||
s->id = id;
|
||||
s->x = x;
|
||||
s->y = y;
|
||||
|
@ -1019,12 +1017,12 @@ sprite_t *addsprite(int id, int x, int y, char *name ) {
|
|||
|
||||
setdefaults(s);
|
||||
|
||||
|
||||
// initial fruits don't time out
|
||||
#ifndef __EDITOR
|
||||
if ((levelcomplete != LV_NEXTLEV) && (levelcomplete != LV_INIT)) {
|
||||
int ftype;
|
||||
ftype = isfruit(s->id);
|
||||
|
||||
if (ftype == FT_SUPER) {
|
||||
// super powerups never time out.
|
||||
s->doomcount = 0;
|
||||
|
|
Loading…
Reference in New Issue