More hypothetical type mismatches

This commit is contained in:
Pasi Kallinen
2020-11-15 13:51:47 +02:00
parent 7cfc5a7142
commit deb730d9b5
5 changed files with 19 additions and 18 deletions

View File

@@ -2502,12 +2502,12 @@ E void FDECL(get_location_coord, (xchar *, xchar *, int, struct mkroom *,
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));

View File

@@ -17,7 +17,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 26
#define EDITLEVEL 27
/*
* Development status possibilities.

View File

@@ -544,7 +544,7 @@ struct cemetery {
/* 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;
};

View File

@@ -318,7 +318,7 @@ lua_State *L;
{
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) {
@@ -739,7 +739,7 @@ lua_State *L;
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 */
@@ -758,10 +758,10 @@ lua_State *L;
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");

View File

@@ -43,7 +43,7 @@ static void NDECL(link_doors_rooms);
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 *,
@@ -1145,7 +1145,7 @@ struct mkroom *croom;
static boolean
is_ok_location(x, y, humidity)
register schar x, y;
register xchar x, y;
register int humidity;
{
register int typ;
@@ -2793,7 +2793,7 @@ int humidity;
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;
}
@@ -4361,7 +4361,7 @@ int percent;
int
selection_rndcoord(ov, x, y, removeit)
struct selectionvar *ov;
schar *x, *y;
xchar *x, *y;
boolean removeit;
{
int idx = 0;
@@ -4712,7 +4712,7 @@ long x, y, x2, y2, gtyp, mind, maxd, limit;
/* 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;
@@ -4766,7 +4766,8 @@ struct selectionvar *ov;
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;
@@ -5208,7 +5209,7 @@ struct selectionvar *ov;
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);