author | tron |
Sat, 05 Feb 2005 15:58:59 +0000 | |
changeset 1299 | 0a6510cc889b |
parent 1213 | bb9906f67932 |
child 1335 | a635854c23b6 |
permissions | -rw-r--r-- |
1213
bb9906f67932
(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 |
} |