(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.

This commit is contained in:
tron
2005-07-13 18:04:01 +00:00
parent 1a1dde7c8d
commit 8c1d74162f
44 changed files with 990 additions and 827 deletions

4
tile.c
View File

@@ -4,13 +4,13 @@
void SetMapExtraBits(TileIndex tile, byte bits)
{
assert(tile < MapSize());
SB(_map_extra_bits[tile >> 2], (tile & 3) * 2, 2, bits & 3);
SB(_m[tile].extra, 0, 2, bits & 3);
}
uint GetMapExtraBits(TileIndex tile)
{
assert(tile < MapSize());
return GB(_map_extra_bits[tile >> 2], (tile & 3) * 2, 2);
return GB(_m[tile].extra, 0, 2);
}