Make WALLIFIED_MAZE into a level flag.
It should now be randomly disabled for a 3rd of Gehennom, to make things a tad more interesting there. It's also disabled in Baalzebub's lair, to make things a little more interesting. Still don't know why the beetle is disappearing.
This commit is contained in:
+2
-2
@@ -502,8 +502,8 @@ TRAP:"magic", random
|
|||||||
#
|
#
|
||||||
# The Baalzebub level
|
# The Baalzebub level
|
||||||
#
|
#
|
||||||
MAZE:"baalz",random
|
MAZE:"baalz",' '
|
||||||
FLAGS: noteleport
|
FLAGS: noteleport,corrmaze
|
||||||
GEOMETRY:right,center
|
GEOMETRY:right,center
|
||||||
MAP
|
MAP
|
||||||
-------------------------------------------------
|
-------------------------------------------------
|
||||||
|
|||||||
@@ -416,7 +416,6 @@ typedef unsigned char uchar;
|
|||||||
/* display features */
|
/* display features */
|
||||||
/* dungeon features */
|
/* dungeon features */
|
||||||
/* dungeon levels */
|
/* dungeon levels */
|
||||||
#define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */
|
|
||||||
/* monsters & objects */
|
/* monsters & objects */
|
||||||
/* I/O */
|
/* I/O */
|
||||||
#if !defined(MAC)
|
#if !defined(MAC)
|
||||||
|
|||||||
@@ -554,6 +554,8 @@ struct levelflags {
|
|||||||
Bitfield(wizard_bones,1); /* set if level came from a bones file
|
Bitfield(wizard_bones,1); /* set if level came from a bones file
|
||||||
which was created in wizard mode (or
|
which was created in wizard mode (or
|
||||||
normal mode descendant of such) */
|
normal mode descendant of such) */
|
||||||
|
Bitfield(corrmaze, 1); /* Whether corridors are used for the maze
|
||||||
|
rather than ROOM */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
#define GRAVEYARD 0x00000100L
|
#define GRAVEYARD 0x00000100L
|
||||||
#define ICEDPOOLS 0x00000200L /* for ice locations: ICED_POOL vs ICED_MOAT */
|
#define ICEDPOOLS 0x00000200L /* for ice locations: ICED_POOL vs ICED_MOAT */
|
||||||
#define SOLIDIFY 0x00000400L /* outer areas are nondiggable & nonpasswall */
|
#define SOLIDIFY 0x00000400L /* outer areas are nondiggable & nonpasswall */
|
||||||
|
#define CORRMAZE 0x00000800L /* for maze levels only */
|
||||||
|
|
||||||
/* different level layout initializers */
|
/* different level layout initializers */
|
||||||
#define LVLINIT_NONE 0
|
#define LVLINIT_NONE 0
|
||||||
|
|||||||
+1
-1
@@ -1420,7 +1420,7 @@ docompress_file(filename, uncomp)
|
|||||||
const char *filename;
|
const char *filename;
|
||||||
boolean uncomp;
|
boolean uncomp;
|
||||||
{
|
{
|
||||||
gzFile *compressedfile;
|
gzFile compressedfile;
|
||||||
FILE *uncompressedfile;
|
FILE *uncompressedfile;
|
||||||
char cfn[256];
|
char cfn[256];
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|||||||
@@ -582,6 +582,7 @@ clear_level_structures()
|
|||||||
level.flags.is_cavernous_lev = 0;
|
level.flags.is_cavernous_lev = 0;
|
||||||
level.flags.arboreal = 0;
|
level.flags.arboreal = 0;
|
||||||
level.flags.wizard_bones = 0;
|
level.flags.wizard_bones = 0;
|
||||||
|
level.flags.corrmaze = 0;
|
||||||
|
|
||||||
nroom = 0;
|
nroom = 0;
|
||||||
rooms[0].hx = -1;
|
rooms[0].hx = -1;
|
||||||
|
|||||||
+30
-38
@@ -541,25 +541,25 @@ register const char *s;
|
|||||||
}
|
}
|
||||||
|
|
||||||
level.flags.is_maze_lev = TRUE;
|
level.flags.is_maze_lev = TRUE;
|
||||||
|
level.flags.corrmaze = !rn2(3);
|
||||||
|
|
||||||
#ifndef WALLIFIED_MAZE
|
if (level.flags.corrmaze)
|
||||||
for(x = 2; x < x_maze_max; x++)
|
for(x = 2; x < x_maze_max; x++)
|
||||||
for(y = 2; y < y_maze_max; y++)
|
for(y = 2; y < y_maze_max; y++)
|
||||||
levl[x][y].typ = STONE;
|
levl[x][y].typ = STONE;
|
||||||
#else
|
else
|
||||||
for(x = 2; x <= x_maze_max; x++)
|
for(x = 2; x <= x_maze_max; x++)
|
||||||
for(y = 2; y <= y_maze_max; y++)
|
for(y = 2; y <= y_maze_max; y++)
|
||||||
levl[x][y].typ = ((x % 2) && (y % 2)) ? STONE : HWALL;
|
levl[x][y].typ = ((x % 2) && (y % 2)) ? STONE : HWALL;
|
||||||
#endif
|
|
||||||
|
|
||||||
maze0xy(&mm);
|
maze0xy(&mm);
|
||||||
walkfrom((int) mm.x, (int) mm.y, 0);
|
walkfrom((int) mm.x, (int) mm.y, 0);
|
||||||
/* put a boulder at the maze center */
|
/* put a boulder at the maze center */
|
||||||
(void) mksobj_at(BOULDER, (int) mm.x, (int) mm.y, TRUE, FALSE);
|
(void) mksobj_at(BOULDER, (int) mm.x, (int) mm.y, TRUE, FALSE);
|
||||||
|
|
||||||
#ifdef WALLIFIED_MAZE
|
if (!level.flags.corrmaze)
|
||||||
wallification(2, 2, x_maze_max, y_maze_max);
|
wallification(2, 2, x_maze_max, y_maze_max);
|
||||||
#endif
|
|
||||||
mazexy(&mm);
|
mazexy(&mm);
|
||||||
mkstairs(mm.x, mm.y, 1, (struct mkroom *)0); /* up */
|
mkstairs(mm.x, mm.y, 1, (struct mkroom *)0); /* up */
|
||||||
if (!Invocation_lev(&u.uz)) {
|
if (!Invocation_lev(&u.uz)) {
|
||||||
@@ -650,11 +650,12 @@ schar typ;
|
|||||||
int q, a, dir, pos;
|
int q, a, dir, pos;
|
||||||
int dirs[4];
|
int dirs[4];
|
||||||
|
|
||||||
#ifndef WALLIFIED_MAZE
|
if (!typ) {
|
||||||
if (!typ) typ = CORR;
|
if (level.flags.corrmaze)
|
||||||
#else
|
typ = CORR;
|
||||||
if (!typ) typ = ROOM;
|
else
|
||||||
#endif
|
typ = ROOM;
|
||||||
|
}
|
||||||
|
|
||||||
pos = 1;
|
pos = 1;
|
||||||
mazex[pos] = (char) x;
|
mazex[pos] = (char) x;
|
||||||
@@ -695,11 +696,12 @@ schar typ;
|
|||||||
register int q,a,dir;
|
register int q,a,dir;
|
||||||
int dirs[4];
|
int dirs[4];
|
||||||
|
|
||||||
#ifndef WALLIFIED_MAZE
|
if (!typ) {
|
||||||
if (!typ) typ = CORR;
|
if (level.flags.corrmaze)
|
||||||
#else
|
typ = CORR;
|
||||||
if (!typ) typ = ROOM;
|
else
|
||||||
#endif
|
typ = ROOM;
|
||||||
|
}
|
||||||
|
|
||||||
if(!IS_DOOR(levl[x][y].typ)) {
|
if(!IS_DOOR(levl[x][y].typ)) {
|
||||||
/* might still be on edge of MAP, so don't overwrite */
|
/* might still be on edge of MAP, so don't overwrite */
|
||||||
@@ -737,7 +739,7 @@ register int dir;
|
|||||||
|
|
||||||
void
|
void
|
||||||
mazexy(cc) /* find random point in generated corridors,
|
mazexy(cc) /* find random point in generated corridors,
|
||||||
so we don't create items in moats, bunkers, or walls */
|
so we don't create items in moats, bunkers, or walls */
|
||||||
coord *cc;
|
coord *cc;
|
||||||
{
|
{
|
||||||
int cpt=0;
|
int cpt=0;
|
||||||
@@ -746,13 +748,8 @@ mazexy(cc) /* find random point in generated corridors,
|
|||||||
cc->x = 3 + 2*rn2((x_maze_max>>1) - 1);
|
cc->x = 3 + 2*rn2((x_maze_max>>1) - 1);
|
||||||
cc->y = 3 + 2*rn2((y_maze_max>>1) - 1);
|
cc->y = 3 + 2*rn2((y_maze_max>>1) - 1);
|
||||||
cpt++;
|
cpt++;
|
||||||
} while (cpt < 100 && levl[cc->x][cc->y].typ !=
|
} while (cpt < 100 &&
|
||||||
#ifdef WALLIFIED_MAZE
|
levl[cc->x][cc->y].typ != (level.flags.corrmaze ? CORR : ROOM));
|
||||||
ROOM
|
|
||||||
#else
|
|
||||||
CORR
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
if (cpt >= 100) {
|
if (cpt >= 100) {
|
||||||
register int x, y;
|
register int x, y;
|
||||||
/* last try */
|
/* last try */
|
||||||
@@ -760,13 +757,8 @@ mazexy(cc) /* find random point in generated corridors,
|
|||||||
for (y = 0; y < (y_maze_max>>1) - 1; y++) {
|
for (y = 0; y < (y_maze_max>>1) - 1; y++) {
|
||||||
cc->x = 3 + 2 * x;
|
cc->x = 3 + 2 * x;
|
||||||
cc->y = 3 + 2 * y;
|
cc->y = 3 + 2 * y;
|
||||||
if (levl[cc->x][cc->y].typ ==
|
if (levl[cc->x][cc->y].typ == (level.flags.corrmaze ? CORR : ROOM))
|
||||||
#ifdef WALLIFIED_MAZE
|
return;
|
||||||
ROOM
|
|
||||||
#else
|
|
||||||
CORR
|
|
||||||
#endif
|
|
||||||
) return;
|
|
||||||
}
|
}
|
||||||
panic("mazexy: can't find a place!");
|
panic("mazexy: can't find a place!");
|
||||||
}
|
}
|
||||||
@@ -783,7 +775,7 @@ bound_digging()
|
|||||||
* so the boundary would be breached
|
* so the boundary would be breached
|
||||||
*
|
*
|
||||||
* we can't bound unconditionally on one beyond the last line, because
|
* we can't bound unconditionally on one beyond the last line, because
|
||||||
* that provides a window of abuse for WALLIFIED_MAZE special levels
|
* that provides a window of abuse for wallified special levels
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
register int x,y;
|
register int x,y;
|
||||||
|
|||||||
+7
-11
@@ -520,12 +520,11 @@ schar filling;
|
|||||||
|
|
||||||
for (x = x1; x <= x2; x++)
|
for (x = x1; x <= x2; x++)
|
||||||
for (y = y1; y <= y2; y++) {
|
for (y = y1; y <= y2; y++) {
|
||||||
#ifndef WALLIFIED_MAZE
|
if (level.flags.corrmaze)
|
||||||
levl[x][y].typ = STONE;
|
levl[x][y].typ = STONE;
|
||||||
#else
|
else
|
||||||
levl[x][y].typ =
|
levl[x][y].typ =
|
||||||
(y < 2 || ((x % 2) && (y % 2))) ? STONE : filling;
|
(y < 2 || ((x % 2) && (y % 2))) ? STONE : filling;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2948,6 +2947,7 @@ spo_level_flags(coder)
|
|||||||
if (lflags & GRAVEYARD) level.flags.graveyard = 1;
|
if (lflags & GRAVEYARD) level.flags.graveyard = 1;
|
||||||
if (lflags & ICEDPOOLS) icedpools = TRUE;
|
if (lflags & ICEDPOOLS) icedpools = TRUE;
|
||||||
if (lflags & SOLIDIFY) coder->solidify = TRUE;
|
if (lflags & SOLIDIFY) coder->solidify = TRUE;
|
||||||
|
if (lflags & CORRMAZE) level.flags.corrmaze = TRUE;
|
||||||
|
|
||||||
opvar_free(flagdata);
|
opvar_free(flagdata);
|
||||||
}
|
}
|
||||||
@@ -4114,11 +4114,7 @@ spo_mazewalk(coder)
|
|||||||
if (!isok(x,y)) return;
|
if (!isok(x,y)) return;
|
||||||
|
|
||||||
if (OV_i(ftyp) < 1) {
|
if (OV_i(ftyp) < 1) {
|
||||||
#ifndef WALLIFIED_MAZE
|
OV_i(ftyp) = level.flags.corrmaze ? CORR : ROOM;
|
||||||
OV_i(ftyp) = CORR;
|
|
||||||
#else
|
|
||||||
OV_i(ftyp) = ROOM;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* don't use move() - it doesn't use W_NORTH, etc. */
|
/* don't use move() - it doesn't use W_NORTH, etc. */
|
||||||
|
|||||||
@@ -296,6 +296,7 @@ shroud { savetoken(yytext); yylval.i=SHROUD; return FLAG_TYPE; }
|
|||||||
graveyard { savetoken(yytext); yylval.i=GRAVEYARD; return FLAG_TYPE; }
|
graveyard { savetoken(yytext); yylval.i=GRAVEYARD; return FLAG_TYPE; }
|
||||||
icedpools { savetoken(yytext); yylval.i=ICEDPOOLS; return FLAG_TYPE; }
|
icedpools { savetoken(yytext); yylval.i=ICEDPOOLS; return FLAG_TYPE; }
|
||||||
solidify { savetoken(yytext); yylval.i=SOLIDIFY; return FLAG_TYPE; }
|
solidify { savetoken(yytext); yylval.i=SOLIDIFY; return FLAG_TYPE; }
|
||||||
|
corrmaze { savetoken(yytext); yylval.i=CORRMAZE; return FLAG_TYPE; }
|
||||||
[0-9]+d[0-9]+ { char *p = strchr(yytext, 'd');
|
[0-9]+d[0-9]+ { char *p = strchr(yytext, 'd');
|
||||||
savetoken(yytext);
|
savetoken(yytext);
|
||||||
if (p) {
|
if (p) {
|
||||||
|
|||||||
@@ -1367,9 +1367,6 @@ static const char *build_opts[] = {
|
|||||||
#ifdef VISION_TABLES
|
#ifdef VISION_TABLES
|
||||||
"vision tables",
|
"vision tables",
|
||||||
#endif
|
#endif
|
||||||
#ifdef WALLIFIED_MAZE
|
|
||||||
"walled mazes",
|
|
||||||
#endif
|
|
||||||
#ifdef ZEROCOMP
|
#ifdef ZEROCOMP
|
||||||
"zero-compressed save files",
|
"zero-compressed save files",
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user