Tweak magic lamp powerup - all initial fruits on next level

are now gold bars as well.
This commit is contained in:
Rob Pearce 2013-08-14 11:49:24 +00:00
parent 7937c776bc
commit 95087435ae
3 changed files with 12 additions and 12 deletions

3
defs.h
View File

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

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

View File

@ -19,7 +19,6 @@
#include "globals.h"
#include "shared.h"
int loadlevel(int lnum, int wantmonsters) {
FILE *f;
int x,y;
@ -111,8 +110,6 @@ int loadlevel(int lnum, int wantmonsters) {
level->powerupy = -1;
/* remove all onscreen text */
while (text) {
killtext(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;