equal
deleted
inserted
replaced
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()); |