diff options
-rw-r--r-- | src/defines.h | 18 | ||||
-rw-r--r-- | src/spells1.cc | 17 |
2 files changed, 17 insertions, 18 deletions
diff --git a/src/defines.h b/src/defines.h index a7eddd0d..54c5a845 100644 --- a/src/defines.h +++ b/src/defines.h @@ -3409,24 +3409,6 @@ ((char)((byte)(P))) -/* - * Convert a "location" (Y,X) into a "grid" (G) - */ -#define GRID(Y,X) \ - (256 * (Y) + (X)) - -/* - * Convert a "grid" (G) into a "location" (Y) - */ -#define GRID_Y(G) \ - ((int)((G) / 256U)) - -/* - * Convert a "grid" (G) into a "location" (X) - */ -#define GRID_X(G) \ - ((int)((G) % 256U)) - /* * Determines if a map location is fully inside the outer walls diff --git a/src/spells1.cc b/src/spells1.cc index 180fdd75..a619c002 100644 --- a/src/spells1.cc +++ b/src/spells1.cc @@ -50,6 +50,23 @@ using std::chrono::milliseconds; /* Maximum number of tries for teleporting */ #define MAX_TRIES 100 +/* + * Convert a "location" (Y,X) into a "grid" (G) + */ +#define GRID(Y,X) \ + (256 * (Y) + (X)) + +/* + * Convert a "grid" (G) into a "location" (Y) + */ +#define GRID_Y(G) \ + ((int)((G) / 256U)) + +/* + * Convert a "grid" (G) into a "location" (X) + */ +#define GRID_X(G) \ + ((int)((G) % 256U)) /* * Helper function -- return a "nearby" race for polymorphing |