(svn r1676) Increase the size of TileIndex and TileIndexDiff to 32bits and adapt the save/load data and some other parts of the code to that change
WARNING: If i made any mistake here it WILL lead to corrupted savegames!
This commit is contained in:
@@ -730,10 +730,10 @@ TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng)
|
||||
int rn = rng;
|
||||
uint32 r = Random();
|
||||
|
||||
return TILE_XY(
|
||||
return TILE_MASK(TILE_XY(
|
||||
TileX(a) + ((byte)r * rn * 2 >> 8) - rn,
|
||||
TileY(a) + ((byte)(r >> 8) * rn * 2 >> 8) - rn
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
// This function checks if we add addx/addy to tile, if we
|
||||
|
||||
Reference in New Issue
Block a user