author | truelight |
Fri, 04 Feb 2005 13:23:29 +0000 | |
changeset 1279 | bc761aad52b3 |
parent 1213 | fc87a2ee4161 |
child 1335 | a5f223b9f549 |
permissions | -rw-r--r-- |
1213
fc87a2ee4161
(svn r1717) -Fix: some compilation problems for braindead VS6 and added missing files to project (thx bociusz)
darkvater
parents:
1211
diff
changeset
|
1 |
#include "stdafx.h" |
1211 | 2 |
#include "tile.h" |
3 |
||
4 |
void SetMapExtraBits(TileIndex tile, byte bits) |
|
5 |
{ |
|
6 |
assert(tile < MapSize()); |
|
7 |
_map_extra_bits[tile >> 2] &= ~(3 << ((tile & 3) * 2)); |
|
8 |
_map_extra_bits[tile >> 2] |= (bits&3) << ((tile & 3) * 2); |
|
9 |
} |
|
10 |
||
11 |
uint GetMapExtraBits(TileIndex tile) |
|
12 |
{ |
|
13 |
assert(tile < MapSize()); |
|
14 |
return (_map_extra_bits[tile >> 2] >> (tile & 3) * 2) & 3; |
|
15 |
} |