Fix some coordxy declarations that should be xint16

By temporarily changing the type definition for each of xint16 and
coordxy to int32_t, the compiler was able to find several places where
the type definitions were wrong.
This commit is contained in:
Patric Mueller
2022-08-23 09:10:17 +02:00
parent 8d29733fc4
commit 4aeb3875e2
5 changed files with 14 additions and 14 deletions

View File

@@ -601,7 +601,7 @@ extern void losedogs(void);
extern void mon_arrive(struct monst *, int);
extern void mon_catchup_elapsed_time(struct monst *, long);
extern void keepdogs(boolean);
extern void migrate_to_level(struct monst *, coordxy, coordxy, coord *);
extern void migrate_to_level(struct monst *, xint16, xint16, coord *);
extern void discard_migrations(void);
extern int dogfood(struct monst *, struct obj *);
extern boolean tamedog(struct monst *, struct obj *);
@@ -626,7 +626,7 @@ extern boolean ship_object(struct obj *, coordxy, coordxy, boolean);
extern void obj_delivery(boolean);
extern void deliver_obj_to_mon(struct monst *mtmp, int, unsigned long);
extern schar down_gate(coordxy, coordxy);
extern void impact_drop(struct obj *, coordxy, coordxy, coordxy);
extern void impact_drop(struct obj *, coordxy, coordxy, xint16);
/* ### dothrow.c ### */
@@ -806,7 +806,7 @@ extern const char *ceiling(coordxy, coordxy);
extern struct engr *engr_at(coordxy, coordxy);
extern boolean sengr_at(const char *, coordxy, coordxy, boolean);
extern void u_wipe_engr(int);
extern void wipe_engr_at(coordxy, coordxy, coordxy, boolean);
extern void wipe_engr_at(coordxy, coordxy, xint16, boolean);
extern void read_engr_at(coordxy, coordxy);
extern void make_engr_at(coordxy, coordxy, const char *, long, xint16);
extern void del_engr_at(coordxy, coordxy);
@@ -1406,10 +1406,10 @@ extern void makemaz(const char *);
extern void mazexy(coord *);
extern void get_level_extends(coordxy *, coordxy *, coordxy *, coordxy *);
extern void bound_digging(void);
extern void mkportal(coordxy, coordxy, coordxy, coordxy);
extern void mkportal(coordxy, coordxy, xint16, xint16);
extern boolean bad_location(coordxy, coordxy, coordxy, coordxy, coordxy, coordxy);
extern void place_lregion(coordxy, coordxy, coordxy, coordxy, coordxy, coordxy, coordxy,
coordxy, coordxy, d_level *);
coordxy, xint16, d_level *);
extern void fixup_special(void);
extern void fumaroles(void);
extern void movebubbles(void);
@@ -1561,7 +1561,7 @@ extern void killed(struct monst *);
extern void xkilled(struct monst *, int);
extern void mon_to_stone(struct monst *);
extern void m_into_limbo(struct monst *);
extern void migrate_mon(struct monst *, coordxy, coordxy);
extern void migrate_mon(struct monst *, xint16, xint16);
extern void mnexto(struct monst *, unsigned);
extern void deal_with_overcrowding(struct monst *);
extern void maybe_mnexto(struct monst *);

View File

@@ -14,7 +14,7 @@ static void wall_cleanup(coordxy, coordxy, coordxy, coordxy);
static boolean okay(coordxy, coordxy, coordxy);
static void maze0xy(coord *);
static boolean put_lregion_here(coordxy, coordxy, coordxy, coordxy, coordxy,
coordxy, coordxy, boolean, d_level *);
coordxy, xint16, boolean, d_level *);
static void baalz_fixup(void);
static void setup_waterlevel(void);
static void unsetup_waterlevel(void);

View File

@@ -63,9 +63,9 @@ static struct damage *find_damage(struct monst *);
static void discard_damage_struct(struct damage *);
static void discard_damage_owned_by(struct monst *);
static void shk_fixes_damage(struct monst *);
static coordxy *litter_getpos(int *, coordxy, coordxy, struct monst *);
static void litter_scatter(coordxy *, int, coordxy, coordxy, struct monst *);
static void litter_newsyms(coordxy *, coordxy, coordxy);
static xint16 *litter_getpos(int *, coordxy, coordxy, struct monst *);
static void litter_scatter(xint16 *, int, coordxy, coordxy, struct monst *);
static void litter_newsyms(xint16 *, coordxy, coordxy);
static int repair_damage(struct monst *, struct damage *, boolean);
static void sub_one_frombill(struct obj *, struct monst *);
static void add_one_tobill(struct obj *, boolean, struct monst *);
@@ -3669,7 +3669,7 @@ shk_fixes_damage(struct monst *shkp)
#define horiz(i) ((i % 3) - 1)
#define vert(i) ((i / 3) - 1)
static coordxy *
static xint16 *
litter_getpos(int *k, coordxy x, coordxy y, struct monst *shkp)
{
static xint16 litter[9];

View File

@@ -57,7 +57,7 @@ static unsigned int sp_amask_to_amask(unsigned int sp_amask);
static void create_monster(monster *, struct mkroom *);
static void create_object(object *, struct mkroom *);
static void create_altar(altar *, struct mkroom *);
static boolean search_door(struct mkroom *, coordxy *, coordxy *, coordxy, int);
static boolean search_door(struct mkroom *, coordxy *, coordxy *, xint16, int);
static void create_corridor(corridor *);
static struct mkroom *build_room(room *, struct mkroom *);
static void light_region(region *);
@@ -1304,7 +1304,7 @@ get_location_coord(
*y = c.y;
get_location(x, y, c.getloc_flags | (c.is_random ? NO_LOC_WARN : 0),
croom);
if (*x == -1 && *y == -1 && c.is_random)
get_location(x, y, humidity, croom);
}

View File

@@ -902,7 +902,7 @@ level_tele(void)
}
if (wizard && !strcmp(buf, "?")) {
schar destlev;
coordxy destdnum;
xint16 destdnum;
levTport_menu:
destlev = 0;