(svn r22768) -Add: progress bar updates for river building

This commit is contained in:
rubidium
2011-08-20 14:15:40 +00:00
parent 0041408e4f
commit 11a4e402c6
4 changed files with 10 additions and 3 deletions

View File

@@ -1167,9 +1167,12 @@ static void CreateRivers()
int amount = _settings_game.game_creation.amount_of_rivers;
if (amount == 0) return;
uint wells = ScaleByMapSize(4 << _settings_game.game_creation.amount_of_rivers);
SetGeneratingWorldProgress(GWP_RIVER, wells);
bool *marks = CallocT<bool>(MapSize());
for (uint wells = ScaleByMapSize(4 << _settings_game.game_creation.amount_of_rivers); wells != 0; wells--) {
for (; wells != 0; wells--) {
IncreaseGeneratingWorldProgress(GWP_RIVER);
for (int tries = 0; tries < 128; tries++) {
TileIndex t = RandomTile();
if (!CircularTileSearch(&t, 8, FindSpring, NULL)) continue;