map.h
changeset 1044 63e0601a43cc
parent 1041 94db182c3614
child 1059 fe97d81a1b4f
equal deleted inserted replaced
1043:44508ede2f92 1044:63e0601a43cc
    71 	assert(dir < lengthof(_tileoffs_by_dir));
    71 	assert(dir < lengthof(_tileoffs_by_dir));
    72 	return ToTileIndexDiff(_tileoffs_by_dir[dir]);
    72 	return ToTileIndexDiff(_tileoffs_by_dir[dir]);
    73 }
    73 }
    74 
    74 
    75 
    75 
       
    76 static inline uint TileHeight(TileIndex tile)
       
    77 {
       
    78 	assert(tile < MapSize());
       
    79 	return _map_type_and_height[tile] & 0xf;
       
    80 }
       
    81 
    76 static inline uint TilePixelHeight(TileIndex tile)
    82 static inline uint TilePixelHeight(TileIndex tile)
    77 {
    83 {
    78 	assert(tile < MapSize());
    84 	return TileHeight(tile) * 8;
    79 	return (_map_type_and_height[tile] & 0xf) * 8;
       
    80 }
    85 }
    81 
    86 
    82 static inline int TileType(TileIndex tile)
    87 static inline int TileType(TileIndex tile)
    83 {
    88 {
    84 	assert(tile < MapSize());
    89 	assert(tile < MapSize());