summaryrefslogtreecommitdiff
path: root/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'map.h')
-rw-r--r--map.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/map.h b/map.h
index 1ff6109e6..f37610d93 100644
--- a/map.h
+++ b/map.h
@@ -2,7 +2,7 @@
#define MAP_H
#define TILE_FROM_XY(x,y) (int)((((y) >> 4) << MapLogX()) + ((x) >> 4))
-#define TILE_XY(x,y) (int)(((y) << MapLogX()) + (x))
+#define TILE_XY(x,y) (((y) << MapLogX()) + (x))
#define TILE_MASK(x) ((x) & ((1 << (MapLogX() + MapLogY())) - 1))
@@ -26,8 +26,8 @@ static inline uint MapMaxY(void) { return MapSizeY() - 1; }
/* The number of tiles in the map */
static inline uint MapSize(void) { return MapSizeX() * MapSizeY(); }
+typedef uint32 TileIndex;
-typedef uint16 TileIndex;
static inline uint TileX(TileIndex tile)
{
@@ -40,7 +40,7 @@ static inline uint TileY(TileIndex tile)
}
-typedef int16 TileIndexDiff;
+typedef int32 TileIndexDiff;
typedef struct TileIndexDiffC {
int16 x;