/* display.c */
gbuf_entry gbuf[ROWNO][COLNO];
- char gbuf_start[ROWNO];
- char gbuf_stop[ROWNO];
+ xchar gbuf_start[ROWNO];
+ xchar gbuf_stop[ROWNO];
/* do.c */
int petname_used; /* user preferred pet name has been used */
xchar gtyp; /* type of dog's current goal */
xchar gx; /* x position of dog's current goal */
- char gy; /* y position of dog's current goal */
+ xchar gy; /* y position of dog's current goal */
char dogname[PL_PSIZ];
char catname[PL_PSIZ];
char horsename[PL_PSIZ];
Stormbringer's maliciousness. */
/* vision.c */
- char **viz_array; /* used in cansee() and couldsee() macros */
- char *viz_rmin; /* min could see indices */
- char *viz_rmax; /* max could see indices */
+ xchar **viz_array; /* used in cansee() and couldsee() macros */
+ xchar *viz_rmin; /* min could see indices */
+ xchar *viz_rmax; /* max could see indices */
boolean vision_full_recalc;
/* weapon.c */
E void FDECL(new_light_source, (XCHAR_P, XCHAR_P, int, int, ANY_P *));
E void FDECL(del_light_source, (int, ANY_P *));
-E void FDECL(do_light_sources, (char **));
+E void FDECL(do_light_sources, (xchar **));
E void FDECL(show_transient_light, (struct obj *, int, int));
E void NDECL(transient_light_cleanup);
E struct monst *FDECL(find_mid, (unsigned, unsigned));
E void FDECL(selection_floodfill, (struct selectionvar *, int, int,
BOOLEAN_P));
E boolean FDECL(pm_good_location, (int, int, struct permonst *));
-E void FDECL(get_location_coord, (schar *, schar *, int, struct mkroom *,
+E void FDECL(get_location_coord, (xchar *, xchar *, int, struct mkroom *,
long));
E void FDECL(selection_setpoint, (int, int, struct selectionvar *, XCHAR_P));
E struct selectionvar * FDECL(selection_not, (struct selectionvar *));
/* mkroom.h - types and structures for room and shop initialization */
struct mkroom {
- schar lx, hx, ly, hy; /* usually xchar, but hx may be -1 */
+ xchar lx, hx, ly, hy; /* usually xchar, but hx may be -1 */
schar rtype; /* type of room (zoo, throne, etc...) */
schar orig_rtype; /* same as rtype, but not zeroed later */
schar rlit; /* is the room lit ? */
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
-#define EDITLEVEL 25
+#define EDITLEVEL 26
/*
* Development status possibilities.
static int FDECL(maybe_write_ls, (NHFILE *, int, BOOLEAN_P));
/* imported from vision.c, for small circles */
-extern char circle_data[];
-extern char circle_start[];
+extern xchar circle_data[];
+extern xchar circle_start[];
/* Create a new light source. Caller (and extern.h) doesn't need to know
/* Mark locations that are temporarily lit via mobile light sources. */
void
do_light_sources(cs_rows)
-char **cs_rows;
+xchar **cs_rows;
{
int x, y, min_x, max_x, max_y, offset;
- char *limits;
+ xchar *limits;
short at_hero_range = 0;
light_source *ls;
- char *row;
+ xchar *row;
for (ls = g.light_base; ls; ls = ls->next) {
ls->flags &= ~LSF_SHOW;
static int FDECL(l_selection_filter_percent, (lua_State *));
static int FDECL(l_selection_rndcoord, (lua_State *));
static boolean FDECL(params_sel_2coords, (lua_State *, struct selectionvar **,
- schar *, schar *, schar *, schar *));
+ xchar *, xchar *, xchar *, xchar *));
static int FDECL(l_selection_line, (lua_State *));
static int FDECL(l_selection_randline, (lua_State *));
static int FDECL(l_selection_rect, (lua_State *));
lua_State *L;
{
struct selectionvar *sel = (struct selectionvar *) 0;
- schar x = -1, y = -1;
+ xchar x = -1, y = -1;
int val = 1;
int argc = lua_gettop(L);
long crd = 0L;
} else if (argc == 1) {
sel = l_selection_check(L, 1);
} else if (argc == 2) {
- x = (schar) luaL_checkinteger(L, 1);
- y = (schar) luaL_checkinteger(L, 2);
+ x = (xchar) luaL_checkinteger(L, 1);
+ y = (xchar) luaL_checkinteger(L, 2);
lua_pop(L, 2);
(void) l_selection_new(L);
sel = l_selection_check(L, 1);
} else {
sel = l_selection_check(L, 1);
- x = (schar) luaL_checkinteger(L, 2);
- y = (schar) luaL_checkinteger(L, 3);
+ x = (xchar) luaL_checkinteger(L, 2);
+ y = (xchar) luaL_checkinteger(L, 3);
val = (int) luaL_optinteger(L, 4, 1);
}
lua_State *L;
{
struct selectionvar *sel = l_selection_check(L, 1);
- schar x = (schar) luaL_checkinteger(L, 2);
- schar y = (schar) luaL_checkinteger(L, 3);
+ xchar x = (xchar) luaL_checkinteger(L, 2);
+ xchar y = (xchar) luaL_checkinteger(L, 3);
int val;
long crd;
params_sel_2coords(L, sel, x1,y1, x2,y2)
lua_State *L;
struct selectionvar **sel;
-schar *x1, *y1, *x2, *y2;
+xchar *x1, *y1, *x2, *y2;
{
int argc = lua_gettop(L);
if (argc == 4) {
(void) l_selection_new(L);
- *x1 = (schar) luaL_checkinteger(L, 1);
- *y1 = (schar) luaL_checkinteger(L, 2);
- *x2 = (schar) luaL_checkinteger(L, 3);
- *y2 = (schar) luaL_checkinteger(L, 4);
+ *x1 = (xchar) luaL_checkinteger(L, 1);
+ *y1 = (xchar) luaL_checkinteger(L, 2);
+ *x2 = (xchar) luaL_checkinteger(L, 3);
+ *y2 = (xchar) luaL_checkinteger(L, 4);
*sel = l_selection_check(L, 5);
lua_remove(L, 1);
lua_remove(L, 1);
return TRUE;
} else if (argc == 5) {
*sel = l_selection_check(L, 1);
- *x1 = (schar) luaL_checkinteger(L, 2);
- *y1 = (schar) luaL_checkinteger(L, 3);
- *x2 = (schar) luaL_checkinteger(L, 4);
- *y2 = (schar) luaL_checkinteger(L, 5);
+ *x1 = (xchar) luaL_checkinteger(L, 2);
+ *y1 = (xchar) luaL_checkinteger(L, 3);
+ *x2 = (xchar) luaL_checkinteger(L, 4);
+ *y2 = (xchar) luaL_checkinteger(L, 5);
lua_pop(L, 4);
return TRUE;
}
lua_State *L;
{
struct selectionvar *sel = NULL;
- schar x1;
- schar y1;
- schar x2;
- schar y2;
+ xchar x1, y1, x2, y2;
if (!params_sel_2coords(L, &sel, &x1, &y1, &x2, &y2)) {
nhl_error(L, "selection.line: illegal arguments");
lua_State *L;
{
struct selectionvar *sel = NULL;
- schar x1;
- schar y1;
- schar x2;
- schar y2;
+ xchar x1, y1, x2, y2;
if (!params_sel_2coords(L, &sel, &x1, &y1, &x2, &y2)) {
nhl_error(L, "selection.rect: illegal arguments");
{
struct selectionvar *sel = NULL;
int y;
- schar x1;
- schar y1;
- schar x2;
- schar y2;
+ xchar x1, y1, x2, y2;
if (!params_sel_2coords(L, &sel, &x1, &y1, &x2, &y2)) {
nhl_error(L, "selection.fillrect: illegal arguments");
{
int argc = lua_gettop(L);
struct selectionvar *sel = (struct selectionvar *) 0;
- schar x1, y1, x2, y2;
+ xchar x1, y1, x2, y2;
int roughness = 7;
if (argc == 6) {
sel = l_selection_check(L, 1);
- x1 = (schar) luaL_checkinteger(L, 2);
- y1 = (schar) luaL_checkinteger(L, 3);
- x2 = (schar) luaL_checkinteger(L, 4);
- y2 = (schar) luaL_checkinteger(L, 5);
+ x1 = (xchar) luaL_checkinteger(L, 2);
+ y1 = (xchar) luaL_checkinteger(L, 3);
+ x2 = (xchar) luaL_checkinteger(L, 4);
+ y2 = (xchar) luaL_checkinteger(L, 5);
roughness = (int) luaL_checkinteger(L, 6);
lua_pop(L, 5);
} else if (argc == 5 && lua_type(L, 1) == LUA_TNUMBER) {
- x1 = (schar) luaL_checkinteger(L, 1);
- y1 = (schar) luaL_checkinteger(L, 2);
- x2 = (schar) luaL_checkinteger(L, 3);
- y2 = (schar) luaL_checkinteger(L, 4);
+ x1 = (xchar) luaL_checkinteger(L, 1);
+ y1 = (xchar) luaL_checkinteger(L, 2);
+ x2 = (xchar) luaL_checkinteger(L, 3);
+ y2 = (xchar) luaL_checkinteger(L, 4);
roughness = (int) luaL_checkinteger(L, 5);
lua_pop(L, 5);
(void) l_selection_new(L);
{
int argc = lua_gettop(L);
struct selectionvar *sel = (struct selectionvar *) 0;
- schar x, y;
+ xchar x, y;
if (argc == 2) {
- x = (schar) luaL_checkinteger(L, 1);
- y = (schar) luaL_checkinteger(L, 2);
+ x = (xchar) luaL_checkinteger(L, 1);
+ y = (xchar) luaL_checkinteger(L, 2);
lua_pop(L, 2);
(void) l_selection_new(L);
sel = l_selection_check(L, 1);
{
int argc = lua_gettop(L);
struct selectionvar *sel = (struct selectionvar *) 0;
- schar x = 0, y = 0;
+ xchar x = 0, y = 0;
int r = 0, filled = 0;
if (argc == 3) {
- x = (schar) luaL_checkinteger(L, 1);
- y = (schar) luaL_checkinteger(L, 2);
+ x = (xchar) luaL_checkinteger(L, 1);
+ y = (xchar) luaL_checkinteger(L, 2);
r = (int) luaL_checkinteger(L, 3);
lua_pop(L, 3);
(void) l_selection_new(L);
sel = l_selection_check(L, 1);
filled = 0;
} else if (argc == 4 && lua_type(L, 1) == LUA_TNUMBER) {
- x = (schar) luaL_checkinteger(L, 1);
- y = (schar) luaL_checkinteger(L, 2);
+ x = (xchar) luaL_checkinteger(L, 1);
+ y = (xchar) luaL_checkinteger(L, 2);
r = (int) luaL_checkinteger(L, 3);
filled = (int) luaL_checkinteger(L, 4); /* TODO: boolean*/
lua_pop(L, 4);
sel = l_selection_check(L, 1);
} else if (argc == 4 || argc == 5) {
sel = l_selection_check(L, 1);
- x = (schar) luaL_checkinteger(L, 2);
- y = (schar) luaL_checkinteger(L, 3);
+ x = (xchar) luaL_checkinteger(L, 2);
+ y = (xchar) luaL_checkinteger(L, 3);
r = (int) luaL_checkinteger(L, 4);
filled = (int) luaL_optinteger(L, 5, 0); /* TODO: boolean */
} else {
{
int argc = lua_gettop(L);
struct selectionvar *sel = (struct selectionvar *) 0;
- schar x = 0, y = 0;
+ xchar x = 0, y = 0;
int r1 = 0, r2 = 0, filled = 0;
if (argc == 4) {
- x = (schar) luaL_checkinteger(L, 1);
- y = (schar) luaL_checkinteger(L, 2);
+ x = (xchar) luaL_checkinteger(L, 1);
+ y = (xchar) luaL_checkinteger(L, 2);
r1 = (int) luaL_checkinteger(L, 3);
r2 = (int) luaL_checkinteger(L, 4);
lua_pop(L, 4);
sel = l_selection_check(L, 1);
filled = 0;
} else if (argc == 5 && lua_type(L, 1) == LUA_TNUMBER) {
- x = (schar) luaL_checkinteger(L, 1);
- y = (schar) luaL_checkinteger(L, 2);
+ x = (xchar) luaL_checkinteger(L, 1);
+ y = (xchar) luaL_checkinteger(L, 2);
r1 = (int) luaL_checkinteger(L, 3);
r2 = (int) luaL_checkinteger(L, 4);
filled = (int) luaL_optinteger(L, 5, 0); /* TODO: boolean */
sel = l_selection_check(L, 1);
} else if (argc == 5 || argc == 6) {
sel = l_selection_check(L, 1);
- x = (schar) luaL_checkinteger(L, 2);
- y = (schar) luaL_checkinteger(L, 3);
+ x = (xchar) luaL_checkinteger(L, 2);
+ y = (xchar) luaL_checkinteger(L, 3);
r1 = (int) luaL_checkinteger(L, 4);
r2 = (int) luaL_checkinteger(L, 5);
filled = (int) luaL_optinteger(L, 6, 0); /* TODO: boolean */
static void NDECL(link_doors_rooms);
static int NDECL(rnddoor);
static int NDECL(rndtrap);
-static void FDECL(get_location, (schar *, schar *, int, struct mkroom *));
+static void FDECL(get_location, (xchar *, xchar *, int, struct mkroom *));
static boolean FDECL(is_ok_location, (SCHAR_P, SCHAR_P, int));
static unpacked_coord FDECL(get_unpacked_coord, (long, int));
-static void FDECL(get_room_loc, (schar *, schar *, struct mkroom *));
-static void FDECL(get_free_room_loc, (schar *, schar *,
+static void FDECL(get_room_loc, (xchar *, xchar *, struct mkroom *));
+static void FDECL(get_free_room_loc, (xchar *, xchar *,
struct mkroom *, packed_coord));
static boolean FDECL(create_subroom, (struct mkroom *, XCHAR_P, XCHAR_P,
XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P));
*/
static void
get_location(x, y, humidity, croom)
-schar *x, *y;
+xchar *x, *y;
int humidity;
struct mkroom *croom;
{
void
get_location_coord(x, y, humidity, croom, crd)
-schar *x, *y;
+xchar *x, *y;
int humidity;
struct mkroom *croom;
long crd;
static void
get_room_loc(x, y, croom)
-schar *x, *y;
+xchar *x, *y;
struct mkroom *croom;
{
coord c;
*/
static void
get_free_room_loc(x, y, croom, pos)
-schar *x, *y;
+xchar *x, *y;
struct mkroom *croom;
packed_coord pos;
{
- schar try_x, try_y;
+ xchar try_x, try_y;
register int trycnt = 0;
get_location_coord(&try_x, &try_y, DRY, croom, pos);
spltrap *t;
struct mkroom *croom;
{
- schar x = -1, y = -1;
+ xchar x = -1, y = -1;
coord tm;
if (croom) {
struct mkroom *croom;
{
struct monst *mtmp;
- schar x, y;
+ xchar x, y;
char class;
aligntyp amask;
coord cc;
struct mkroom *croom;
{
struct obj *otmp;
- schar x, y;
+ xchar x, y;
char c;
boolean named; /* has a name been supplied in level description? */
altar *a;
struct mkroom *croom;
{
- schar sproom, x = -1, y = -1;
+ schar sproom;
+ xchar x = -1, y = -1;
aligntyp amask;
boolean croom_is_temple = TRUE;
int oldtyp;
lua_State *L;
{
int argc = lua_gettop(L);
- schar x, y;
+ xchar x, y;
long scoord;
int ax,ay;
char *txt;
lua_State *L;
{
int argc = lua_gettop(L);
- schar x, y;
+ xchar x, y;
long amount;
long gcoord;
int gx, gy;
-1, D_ISOPEN, D_CLOSED, D_LOCKED, D_NODOOR, D_BROKEN, D_SECRET
};
int msk;
- schar x,y;
+ xchar x,y;
xchar typ;
int argc = lua_gettop(L);
"throne", "tree", NULL };
static const int features2i[] = { FOUNTAIN, SINK, POOL,
THRONE, TREE, STONE };
- schar x,y;
+ xchar x,y;
int typ;
int argc = lua_gettop(L);
boolean can_have_flags = FALSE;
if (x1 == -1 && y1 == -1 && x2 == -1 && y2 == -1) {
(void) selection_not(sel);
} else {
- schar rx1, ry1, rx2, ry2;
+ xchar rx1, ry1, rx2, ry2;
rx1 = x1, ry1 = y1, rx2 = x2, ry2 = x2;
get_location(&rx1, &ry1, ANY_LOC, g.coder->croom);
get_location(&rx2, &ry2, ANY_LOC, g.coder->croom);
{
static const char *const wprops[] = { "nondiggable", "nonpasswall", NULL };
static const int wprop2i[] = { W_NONDIGGABLE, W_NONPASSWALL, -1 };
- schar dx1 = -1, dy1 = -1, dx2 = -1, dy2 = -1;
+ xchar dx1 = -1, dy1 = -1, dx2 = -1, dy2 = -1;
int wprop;
create_des_coder();
* @...X +4
*
*/
-const char circle_data[] = {
+const xchar circle_data[] = {
/* 0*/ 0,
/* 1*/ 1, 1,
/* 3*/ 2, 2, 1,
* used for a single point: temporary light source of a camera flash
* as it traverses its path.
*/
-const char circle_start[] = {
+const xchar circle_start[] = {
/* 0*/ 0,
/* 1*/ 1,
/* 2*/ 3,
/*------ local variables ------*/
-static char could_see[2][ROWNO][COLNO]; /* vision work space */
-static char *cs_rows0[ROWNO], *cs_rows1[ROWNO];
-static char cs_rmin0[ROWNO], cs_rmax0[ROWNO];
-static char cs_rmin1[ROWNO], cs_rmax1[ROWNO];
+static xchar could_see[2][ROWNO][COLNO]; /* vision work space */
+static xchar *cs_rows0[ROWNO], *cs_rows1[ROWNO];
+static xchar cs_rmin0[ROWNO], cs_rmax0[ROWNO];
+static xchar cs_rmin1[ROWNO], cs_rmax1[ROWNO];
static char viz_clear[ROWNO][COLNO]; /* vision clear/blocked map */
static char *viz_clear_rows[ROWNO];
-static char left_ptrs[ROWNO][COLNO]; /* LOS algorithm helpers */
-static char right_ptrs[ROWNO][COLNO];
+static xchar left_ptrs[ROWNO][COLNO]; /* LOS algorithm helpers */
+static xchar right_ptrs[ROWNO][COLNO];
/* Forward declarations. */
static void FDECL(fill_point, (int, int));
static void FDECL(dig_point, (int, int));
static void NDECL(view_init);
-static void FDECL(view_from, (int, int, char **, char *, char *, int,
+static void FDECL(view_from, (int, int, xchar **, xchar *, xchar *, int,
void (*)(int, int, genericptr_t),
genericptr_t));
-static void FDECL(get_unused_cs, (char ***, char **, char **));
-static void FDECL(rogue_vision, (char **, char *, char *));
+static void FDECL(get_unused_cs, (xchar ***, xchar **, xchar **));
+static void FDECL(rogue_vision, (xchar **, xchar *, xchar *));
/* Macro definitions that I can't find anywhere. */
#define sign(z) ((z) < 0 ? -1 : ((z) ? 1 : 0))
*/
static void
get_unused_cs(rows, rmin, rmax)
-char ***rows;
-char **rmin, **rmax;
+xchar ***rows;
+xchar **rmin, **rmax;
{
register int row;
- register char *nrmin, *nrmax;
+ register xchar *nrmin, *nrmax;
if (g.viz_array == cs_rows0) {
*rows = cs_rows1;
*/
static void
rogue_vision(next, rmin, rmax)
-char **next; /* could_see array pointers */
-char *rmin, *rmax;
+xchar **next; /* could_see array pointers */
+xchar *rmin, *rmax;
{
int rnum = levl[u.ux][u.uy].roomno - ROOMOFFSET; /* no SHARED... */
int start, stop, in_door, xhi, xlo, yhi, ylo;
{
extern unsigned char seenv_matrix[3][3]; /* from display.c */
static unsigned char colbump[COLNO + 1]; /* cols to bump sv */
- char **temp_array; /* points to the old vision array */
- char **next_array; /* points to the new vision array */
- char *next_row; /* row pointer for the new array */
- char *old_row; /* row pointer for the old array */
- char *next_rmin; /* min pointer for the new array */
- char *next_rmax; /* max pointer for the new array */
- const char *ranges; /* circle ranges -- used for xray & night vision */
+ xchar **temp_array; /* points to the old vision array */
+ xchar **next_array; /* points to the new vision array */
+ xchar *next_row; /* row pointer for the new array */
+ xchar *old_row; /* row pointer for the old array */
+ xchar *next_rmin; /* min pointer for the new array */
+ xchar *next_rmax; /* max pointer for the new array */
+ const xchar *ranges; /* circle ranges -- used for xray & night vision */
int row = 0; /* row counter (outer loop) */
int start, stop; /* inner loop starting/stopping index */
int dx, dy; /* one step from a lit door or lit wall (see below) */
static int start_row;
static int start_col;
static int step;
-static char **cs_rows;
-static char *cs_left;
-static char *cs_right;
+static xchar **cs_rows;
+static xchar *cs_left;
+static xchar *cs_right;
static void FDECL((*vis_func), (int, int, genericptr_t));
static genericptr_t varg;
static far2d *far_dy[FAR_MAX_BC_DY];
static void FDECL(right_side, (int, int, int, int, int,
- int, int, const char *));
+ int, int, const xchar *));
static void FDECL(left_side, (int, int, int, int, int, int, int,
- const char *));
+ const xchar *));
static int FDECL(close_shadow, (int, int, int, int));
static int FDECL(far_shadow, (int, int, int, int));
int fb_row, fb_col; /* far block row and col */
int left; /* left mark of the previous row */
int right_mark; /* right mark of previous row */
-char *limits; /* points at range limit for current row, or NULL */
+xchar *limits; /* points at range limit for current row, or NULL */
{
register int i;
register char *rowp = NULL;
int fb_row, fb_col; /* far block row and col */
int left_mark; /* left mark of previous row */
int right; /* right mark of the previous row */
-const char *limits;
+const xchar *limits;
{
register int i;
register char *rowp = NULL;
static void
view_from(srow, scol, loc_cs_rows, left_most, right_most, range, func, arg)
int srow, scol; /* source row and column */
-char **loc_cs_rows; /* could_see array (row pointers) */
-char *left_most, *right_most; /* limits of what could be seen */
+xchar **loc_cs_rows; /* could_see array (row pointers) */
+xchar *left_most, *right_most; /* limits of what could be seen */
int range; /* 0 if unlimited */
void FDECL((*func), (int, int, genericptr_t));
genericptr_t arg;
/*
* Defines local to Algorithm C.
*/
-static void FDECL(right_side, (int, int, int, const char *));
-static void FDECL(left_side, (int, int, int, const char *));
+static void FDECL(right_side, (int, int, int, const xchar *));
+static void FDECL(left_side, (int, int, int, const xchar *));
/* Initialize algorithm C (nothing). */
static void
int row; /* current row */
int left; /* first (left side) visible spot on prev row */
int right_mark; /* last (right side) visible spot on prev row */
-const char *limits; /* points at range limit for current row, or NULL */
+const xchar *limits; /* points at range limit for current row, or NULL */
{
int right; /* right limit of "could see" */
int right_edge; /* right edge of an opening */
int deeper; /* if TRUE, call self as needed */
int result; /* set by q?_path() */
register int i; /* loop counter */
- register char *rowp = NULL; /* row optimization */
- char *row_min = NULL; /* left most [used by macro set_min()] */
- char *row_max = NULL; /* right most [used by macro set_max()] */
+ register xchar *rowp = NULL; /* row optimization */
+ xchar *row_min = NULL; /* left most [used by macro set_min()] */
+ xchar *row_max = NULL; /* right most [used by macro set_max()] */
int lim_max; /* right most limit of circle */
nrow = row + step;
static void
left_side(row, left_mark, right, limits)
int row, left_mark, right;
-const char *limits;
+const xchar *limits;
{
int left, left_edge, nrow, deeper, result;
register int i;
- register char *rowp = NULL;
- char *row_min = NULL;
- char *row_max = NULL;
+ register xchar *rowp = NULL;
+ xchar *row_min = NULL;
+ xchar *row_max = NULL;
int lim_min;
#ifdef GCC_WARN
static void
view_from(srow, scol, loc_cs_rows, left_most, right_most, range, func, arg)
int srow, scol; /* starting row and column */
-char **loc_cs_rows; /* pointers to the rows of the could_see array */
-char *left_most; /* min mark on each row */
-char *right_most; /* max mark on each row */
+xchar **loc_cs_rows; /* pointers to the rows of the could_see array */
+xchar *left_most; /* min mark on each row */
+xchar *right_most; /* max mark on each row */
int range; /* 0 if unlimited */
void FDECL((*func), (int, int, genericptr_t));
genericptr_t arg;
{
register int i; /* loop counter */
- char *rowp; /* optimization for setting could_see */
+ xchar *rowp; /* optimization for setting could_see */
int nrow; /* the next row */
int left; /* the left-most visible column */
int right; /* the right-most visible column */
- const char *limits; /* range limit for next row */
+ const xchar *limits; /* range limit for next row */
/* Set globals for q?_path(), left_side(), and right_side() to use. */
start_col = scol;
if (right > scol + range)
right = scol + range;
} else
- limits = (char *) 0;
+ limits = (xchar *) 0;
if (func) {
for (i = left; i <= right; i++)
{
/* If not centered on hero, do the hard work of figuring the area */
if (scol != u.ux || srow != u.uy) {
- view_from(srow, scol, (char **) 0, (char *) 0, (char *) 0, range,
+ view_from(srow, scol, (xchar **) 0, (xchar *) 0, (xchar *) 0, range,
func, arg);
} else {
register int x;
int y, min_x, max_x, max_y, offset;
- const char *limits;
+ const xchar *limits;
boolean override_vision;
/* vision doesn't pass through water or clouds, detection should