diff options
author | tron <tron@openttd.org> | 2005-01-25 21:43:57 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-25 21:43:57 +0000 |
commit | 993a106679e4e682d9028fe44d1e5f9f1f178506 (patch) | |
tree | c41ff658c058ac5448d20ea2b75c1855bd443d93 /map.h | |
parent | 8e5e2e52fd67b0593c866e4777f9738d9fb6f368 (diff) | |
download | openttd-993a106679e4e682d9028fe44d1e5f9f1f178506.tar.xz |
(svn r1676) Increase the size of TileIndex and TileIndexDiff to 32bits and adapt the save/load data and some other parts of the code to that change
WARNING: If i made any mistake here it WILL lead to corrupted savegames!
Diffstat (limited to 'map.h')
-rw-r--r-- | map.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |