Codechange: migrate size related functions to Map structure
This commit is contained in:
@@ -110,8 +110,8 @@ static void _GenerateWorld()
|
||||
|
||||
/* Make sure the tiles at the north border are void tiles if needed. */
|
||||
if (_settings_game.construction.freeform_edges) {
|
||||
for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, 0));
|
||||
for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(0, y));
|
||||
for (uint x = 0; x < Map::SizeX(); x++) MakeVoid(TileXY(x, 0));
|
||||
for (uint y = 0; y < Map::SizeY(); y++) MakeVoid(TileXY(0, y));
|
||||
}
|
||||
|
||||
/* Make the map the height of the setting */
|
||||
@@ -322,7 +322,7 @@ void GenerateWorld(GenWorldMode mode, uint size_x, uint size_y, bool reset_setti
|
||||
ShowGenerateWorldProgress();
|
||||
|
||||
/* Centre the view on the map */
|
||||
ScrollMainWindowToTile(TileXY(MapSizeX() / 2, MapSizeY() / 2), true);
|
||||
ScrollMainWindowToTile(TileXY(Map::SizeX() / 2, Map::SizeY() / 2), true);
|
||||
|
||||
_GenerateWorld();
|
||||
}
|
||||
|
Reference in New Issue
Block a user