E void FDECL(selection_setpoint, (int, int, struct selectionvar *, XCHAR_P));
E struct selectionvar * FDECL(selection_not, (struct selectionvar *));
E void FDECL(selection_filter_percent, (struct selectionvar *, int));
-E int FDECL(selection_rndcoord, (struct selectionvar *, schar *, schar *,
+E int FDECL(selection_rndcoord, (struct selectionvar *, xchar *, xchar *,
BOOLEAN_P));
E void FDECL(selection_do_grow, (struct selectionvar *, int));
-E void FDECL(selection_do_line, (SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P,
+E void FDECL(selection_do_line, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
struct selectionvar *));
-E void FDECL(selection_do_randline, (SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P,
+E void FDECL(selection_do_randline, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
SCHAR_P, SCHAR_P, struct selectionvar *));
E struct selectionvar *FDECL(selection_filter_mapchar, (struct selectionvar *,
XCHAR_P, int));
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
-#define EDITLEVEL 26
+#define EDITLEVEL 27
/*
* Development status possibilities.
/* date+time in string of digits rather than binary */
char when[4 + 2 + 2 + 2 + 2 + 2 + 1]; /* "YYYYMMDDhhmmss\0" */
/* final resting place spot */
- schar frpx, frpy;
+ xchar frpx, frpy;
boolean bonesknown;
};
{
struct selectionvar *sel = l_selection_check(L, 1);
int removeit = (int) luaL_optinteger(L, 2, 0);
- schar x, y;
+ xchar x, y;
selection_rndcoord(sel, &x, &y, removeit);
update_croom();
if (g.coder && g.coder->croom) {
struct selectionvar *sel = (struct selectionvar *) 0;
/* if x2 and y2 aren't set, the gradient has a single center point of x,y;
* if they are set, the gradient is centered on a (x,y) to (x2,y2) line */
- schar x = 0, y = 0, x2 = -1, y2 = -1;
+ xchar x = 0, y = 0, x2 = -1, y2 = -1;
/* points will not be added within mindist of the center; the chance for a
* point between mindist and maxdist to be added to the selection starts at
* 0% at mindist and increases linearly to 100% at maxdist */
if (argc == 1 && lua_type(L, 1) == LUA_TTABLE) {
lcheck_param_table(L);
type = gradtypes2i[get_table_option(L, "type", "radial", gradtypes)];
- x = (schar) get_table_int(L, "x");
- y = (schar) get_table_int(L, "y");
- x2 = (schar) get_table_int_opt(L, "x2", -1);
- y2 = (schar) get_table_int_opt(L, "y2", -1);
+ x = (xchar) get_table_int(L, "x");
+ y = (xchar) get_table_int(L, "y");
+ x2 = (xchar) get_table_int_opt(L, "x2", -1);
+ y2 = (xchar) get_table_int_opt(L, "y2", -1);
/* maxdist is required because there's no obvious default value for it,
* whereas mindist has an obvious defalt of 0 */
maxdist = get_table_int(L, "maxdist");
static int NDECL(rnddoor);
static int NDECL(rndtrap);
static void FDECL(get_location, (xchar *, xchar *, int, struct mkroom *));
-static boolean FDECL(is_ok_location, (SCHAR_P, SCHAR_P, int));
+static boolean FDECL(is_ok_location, (XCHAR_P, XCHAR_P, int));
static unpacked_coord FDECL(get_unpacked_coord, (long, int));
static void FDECL(get_room_loc, (xchar *, xchar *, struct mkroom *));
static void FDECL(get_free_room_loc, (xchar *, xchar *,
static boolean
is_ok_location(x, y, humidity)
-register schar x, y;
+register xchar x, y;
register int humidity;
{
register int typ;
if (--tryct < 0)
break; /* give up */
} while (!(x % 2) || !(y % 2) || SpLev_Map[x][y]
- || !is_ok_location((schar) x, (schar) y, humidity));
+ || !is_ok_location((xchar) x, (xchar) y, humidity));
m->x = (xchar) x, m->y = (xchar) y;
}
int
selection_rndcoord(ov, x, y, removeit)
struct selectionvar *ov;
-schar *x, *y;
+xchar *x, *y;
boolean removeit;
{
int idx = 0;
/* bresenham line algo */
void
selection_do_line(x1, y1, x2, y2, ov)
-schar x1, y1, x2, y2;
+xchar x1, y1, x2, y2;
struct selectionvar *ov;
{
int d0, dx, dy, ai, bi, xi, yi;
void
selection_do_randline(x1, y1, x2, y2, rough, rec, ov)
-schar x1, y1, x2, y2, rough, rec;
+xchar x1, y1, x2, y2;
+schar rough, rec;
struct selectionvar *ov;
{
int mx, my;
WAN_TELEPORTATION, SCR_TELEPORTATION, RIN_TELEPORTATION
};
struct selectionvar *ov2 = selection_new(), *ov3;
- schar x, y;
+ xchar x, y;
boolean res = TRUE;
selection_floodfill(ov2, nx, ny, TRUE);