equal
deleted
inserted
replaced
1 #ifndef MAP_H |
1 #ifndef MAP_H |
2 #define MAP_H |
2 #define MAP_H |
3 |
3 |
4 #include "stdafx.h" |
4 #include "stdafx.h" |
5 |
5 |
6 #define TILE_FROM_XY(x,y) (int)((((y) >> 4) << MapLogX()) + ((x) >> 4)) |
6 #define TILE_FROM_XY(x,y) (TileIndex)((((y) >> 4) << MapLogX()) + ((x) >> 4)) |
7 #define TILE_XY(x,y) (((y) << MapLogX()) + (x)) |
7 #define TILE_XY(x,y) (((y) << MapLogX()) + (x)) |
8 |
8 |
9 #define TILE_MASK(x) ((x) & ((1 << (MapLogX() + MapLogY())) - 1)) |
9 #define TILE_MASK(x) ((x) & ((1 << (MapLogX() + MapLogY())) - 1)) |
10 #define TILE_ASSERT(x) assert(TILE_MASK(x) == (x)); |
10 #define TILE_ASSERT(x) assert(TILE_MASK(x) == (x)); |
11 |
11 |