(svn r1386) Move TileIndexDiff to map.h

Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
This commit is contained in:
tron
2005-01-05 13:32:03 +00:00
parent 0a37e6202b
commit e4cf2ba1b3
20 changed files with 87 additions and 83 deletions

11
map.h
View File

@@ -24,4 +24,15 @@ static inline uint MapMaxY(void) { return MapSizeY() - 1; }
/* The number of tiles in the map */
static inline uint MapSize(void) { return MapSizeX() * MapSizeY(); }
typedef int16 TileIndexDiff;
static inline TileIndexDiff TileOffsByDir(uint dir)
{
extern const TileIndexDiff _tileoffs_by_dir[4];
assert(dir < lengthof(_tileoffs_by_dir));
return _tileoffs_by_dir[dir];
}
#endif