forked from mirror/OpenTTD
(svn r1715) Move [GS]etMapExtraBits to tile.[ch]
This commit is contained in:
14
tile.c
Normal file
14
tile.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "tile.h"
|
||||
|
||||
void SetMapExtraBits(TileIndex tile, byte bits)
|
||||
{
|
||||
assert(tile < MapSize());
|
||||
_map_extra_bits[tile >> 2] &= ~(3 << ((tile & 3) * 2));
|
||||
_map_extra_bits[tile >> 2] |= (bits&3) << ((tile & 3) * 2);
|
||||
}
|
||||
|
||||
uint GetMapExtraBits(TileIndex tile)
|
||||
{
|
||||
assert(tile < MapSize());
|
||||
return (_map_extra_bits[tile >> 2] >> (tile & 3) * 2) & 3;
|
||||
}
|
Reference in New Issue
Block a user