(svn r2360) Use GB and SB in [GS]etMapExtraBits

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
tron 19 years ago
parent aa1c202577
commit ec4f1d12f4

@ -4,14 +4,13 @@
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);
SB(_map_extra_bits[tile >> 2], (tile & 3) * 2, 2, bits & 3);
}
uint GetMapExtraBits(TileIndex tile)
{
assert(tile < MapSize());
return (_map_extra_bits[tile >> 2] >> (tile & 3) * 2) & 3;
return GB(_map_extra_bits[tile >> 2], (tile & 3) * 2, 2);
}

Loading…
Cancel
Save