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);
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));
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;
int i, j;
if (walled)
- wallify_map();
+ wallify_map(1, 0, COLNO-1, ROWNO-1);
if (lit) {
for (i = 1; i < COLNO; i++)
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 *));
}
}
-static void
+void
wallify_map(x1, y1, x2, y2)
int x1, y1, x2, y2;
{