(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 fd0780eeef
commit a4bf608d40
44 changed files with 990 additions and 827 deletions

View File

@@ -59,13 +59,13 @@ void UpdatePlayerHouse(Player *p, uint score)
(val+= 4, true);
/* house is already big enough */
if (val <= _map5[tile])
if (val <= _m[tile].m5)
return;
_map5[tile + TileDiffXY(0, 0)] = val;
_map5[tile + TileDiffXY(0, 1)] = ++val;
_map5[tile + TileDiffXY(1, 0)] = ++val;
_map5[tile + TileDiffXY(1, 1)] = ++val;
_m[tile + TileDiffXY(0, 0)].m5 = val;
_m[tile + TileDiffXY(0, 1)].m5 = ++val;
_m[tile + TileDiffXY(1, 0)].m5 = ++val;
_m[tile + TileDiffXY(1, 1)].m5 = ++val;
MarkTileDirtyByTile(tile + TileDiffXY(0, 0));
MarkTileDirtyByTile(tile + TileDiffXY(0, 1));