|
|
@ -46,15 +46,14 @@ static inline bool CorrectZ(uint tileh)
|
|
|
|
static inline uint TileHeight(TileIndex tile)
|
|
|
|
static inline uint TileHeight(TileIndex tile)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
assert(tile < MapSize());
|
|
|
|
assert(tile < MapSize());
|
|
|
|
return _map_type_and_height[tile] & 0xf;
|
|
|
|
return GB(_map_type_and_height[tile], 0, 4);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static inline void SetTileHeight(TileIndex tile, uint height)
|
|
|
|
static inline void SetTileHeight(TileIndex tile, uint height)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
assert(tile < MapSize());
|
|
|
|
assert(tile < MapSize());
|
|
|
|
assert(height < 16);
|
|
|
|
assert(height < 16);
|
|
|
|
_map_type_and_height[tile] &= ~0x0F;
|
|
|
|
SB(_map_type_and_height[tile], 0, 4, height);
|
|
|
|
_map_type_and_height[tile] |= height;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static inline uint TilePixelHeight(TileIndex tile)
|
|
|
|
static inline uint TilePixelHeight(TileIndex tile)
|
|
|
@ -65,14 +64,13 @@ static inline uint TilePixelHeight(TileIndex tile)
|
|
|
|
static inline TileType GetTileType(TileIndex tile)
|
|
|
|
static inline TileType GetTileType(TileIndex tile)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
assert(tile < MapSize());
|
|
|
|
assert(tile < MapSize());
|
|
|
|
return _map_type_and_height[tile] >> 4;
|
|
|
|
return GB(_map_type_and_height[tile], 4, 4);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static inline void SetTileType(TileIndex tile, TileType type)
|
|
|
|
static inline void SetTileType(TileIndex tile, TileType type)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
assert(tile < MapSize());
|
|
|
|
assert(tile < MapSize());
|
|
|
|
_map_type_and_height[tile] &= ~0xF0;
|
|
|
|
SB(_map_type_and_height[tile], 4, 4, type);
|
|
|
|
_map_type_and_height[tile] |= type << 4;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static inline bool IsTileType(TileIndex tile, TileType type)
|
|
|
|
static inline bool IsTileType(TileIndex tile, TileType type)
|
|
|
|