Remove duplicate wallify_map code
This commit is contained in:
@@ -2495,6 +2495,7 @@ E boolean FDECL(create_room, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
|
||||
E void FDECL(create_secret_door, (struct mkroom *, XCHAR_P));
|
||||
E boolean FDECL(dig_corridor, (coord *, coord *, BOOLEAN_P, SCHAR_P, SCHAR_P));
|
||||
E void FDECL(fill_special_room, (struct mkroom *));
|
||||
E void FDECL(wallify_map, (int, int, int, int));
|
||||
E boolean FDECL(load_special, (const char *));
|
||||
E xchar FDECL(selection_getpoint, (int, int, struct selectionvar *));
|
||||
E struct selectionvar *NDECL(selection_new);
|
||||
|
||||
26
src/mkmap.c
26
src/mkmap.c
@@ -14,7 +14,6 @@ static schar FDECL(get_map, (int, int, SCHAR_P));
|
||||
static void FDECL(pass_one, (SCHAR_P, SCHAR_P));
|
||||
static void FDECL(pass_two, (SCHAR_P, SCHAR_P));
|
||||
static void FDECL(pass_three, (SCHAR_P, SCHAR_P));
|
||||
static void NDECL(wallify_map);
|
||||
static void FDECL(join_map, (SCHAR_P, SCHAR_P));
|
||||
static void FDECL(finish_map,
|
||||
(SCHAR_P, SCHAR_P, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P));
|
||||
@@ -247,29 +246,6 @@ boolean anyroom;
|
||||
g.max_ry = sy;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we have drawn a map without walls, this allows us to
|
||||
* auto-magically wallify it. Taken from lev_main.c.
|
||||
*/
|
||||
static void
|
||||
wallify_map()
|
||||
{
|
||||
int x, y, xx, yy;
|
||||
|
||||
for (x = 1; x < COLNO; x++)
|
||||
for (y = 0; y < ROWNO; y++)
|
||||
if (levl[x][y].typ == STONE) {
|
||||
for (yy = y - 1; yy <= y + 1; yy++)
|
||||
for (xx = x - 1; xx <= x + 1; xx++)
|
||||
if (isok(xx, yy) && levl[xx][yy].typ == ROOM) {
|
||||
if (yy != y)
|
||||
levl[x][y].typ = HWALL;
|
||||
else
|
||||
levl[x][y].typ = VWALL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
join_map(bg_typ, fg_typ)
|
||||
schar bg_typ, fg_typ;
|
||||
@@ -351,7 +327,7 @@ boolean lit, walled, icedpools;
|
||||
int i, j;
|
||||
|
||||
if (walled)
|
||||
wallify_map();
|
||||
wallify_map(1, 0, COLNO-1, ROWNO-1);
|
||||
|
||||
if (lit) {
|
||||
for (i = 1; i < COLNO; i++)
|
||||
|
||||
@@ -63,7 +63,6 @@ static boolean FDECL(search_door, (struct mkroom *,
|
||||
static void FDECL(create_corridor, (corridor *));
|
||||
static struct mkroom *FDECL(build_room, (room *, struct mkroom *));
|
||||
static void FDECL(light_region, (region *));
|
||||
static void FDECL(wallify_map, (int, int, int, int));
|
||||
static void FDECL(maze1xy, (coord *, int));
|
||||
static void NDECL(fill_empty_maze);
|
||||
static void FDECL(splev_initlev, (lev_init *));
|
||||
@@ -2740,7 +2739,7 @@ region *tmpregion;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
wallify_map(x1, y1, x2, y2)
|
||||
int x1, y1, x2, y2;
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user