From f2b1ea3161d28283c1ecd6604e4d65cc4de41855 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 27 Jan 2013 10:13:11 +0100 Subject: [PATCH] xy.h: Move declaration of sctoff() from sect.h to xy.h Signed-off-by: Markus Armbruster --- include/sect.h | 3 --- include/xy.h | 1 + src/lib/subs/bigmap.c | 2 +- src/lib/subs/coastal.c | 1 + src/lib/subs/neigh.c | 1 + 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/sect.h b/include/sect.h index 563714d5..84646248 100644 --- a/include/sect.h +++ b/include/sect.h @@ -164,9 +164,6 @@ struct dchrstr { #define getsectp(x, y) (struct sctstr *)ef_ptr(EF_SECTOR, sctoff((x), (y))) #define getsectid(id) (struct sctstr *)ef_ptr(EF_SECTOR, (id)) -/* things relating to sectors */ -extern int sctoff(coord x, coord y); - extern struct dchrstr dchr[SCT_TYPE_MAX + 2]; #define IS_BIG_CITY(type) (dchr[(type)].d_pkg == UPKG) diff --git a/include/xy.h b/include/xy.h index d31cbf9e..c230c13b 100644 --- a/include/xy.h +++ b/include/xy.h @@ -64,6 +64,7 @@ extern coord strtox(char *str, char **end); extern coord strtoy(char *str, char **end); extern coord xabs(struct natstr *np, coord relx); extern coord yabs(struct natstr *np, coord rely); +extern int sctoff(coord x, coord y); extern coord xnorm(coord x); extern coord ynorm(coord y); extern int xyinrange(coord x, coord y, struct range *rp); diff --git a/src/lib/subs/bigmap.c b/src/lib/subs/bigmap.c index d1ceddb9..d4f1287e 100644 --- a/src/lib/subs/bigmap.c +++ b/src/lib/subs/bigmap.c @@ -35,7 +35,7 @@ #include "file.h" #include "map.h" -#include "sect.h" +#include "xy.h" /* values of only_bmap: * 0 = update both maps diff --git a/src/lib/subs/coastal.c b/src/lib/subs/coastal.c index c6b1bd2f..74cf5838 100644 --- a/src/lib/subs/coastal.c +++ b/src/lib/subs/coastal.c @@ -36,6 +36,7 @@ #include "path.h" #include "prototypes.h" #include "sect.h" +#include "xy.h" static int update_coastal_flag(coord x, coord y, coord ign_x, coord ign_y) diff --git a/src/lib/subs/neigh.c b/src/lib/subs/neigh.c index 32628728..ff4c16c8 100644 --- a/src/lib/subs/neigh.c +++ b/src/lib/subs/neigh.c @@ -36,6 +36,7 @@ #include "path.h" #include "prototypes.h" #include "sect.h" +#include "xy.h" int neigh(coord x, coord y, natid own)