diff options
author | tron <tron@openttd.org> | 2005-05-22 08:09:40 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-05-22 08:09:40 +0000 |
commit | ec4f1d12f45b19b5c711ed3f51d678a72ee3b3d7 (patch) | |
tree | cd2a77b6f37a302a2bd85733b7e1597f5a700f78 | |
parent | aa1c202577be242f295937878d34c41d3848da25 (diff) | |
download | openttd-ec4f1d12f45b19b5c711ed3f51d678a72ee3b3d7.tar.xz |
(svn r2360) Use GB and SB in [GS]etMapExtraBits
-rw-r--r-- | tile.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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); } |