src/landscape.cpp
branchnoai
changeset 9517 be1775555bbd
parent 9505 9711235f5693
child 6719 4cc327ad39d5
child 6987 b0f13039bda2
equal deleted inserted replaced
9516:defc90b7898a 9517:be1775555bbd
   690 	uint i;
   690 	uint i;
   691 	uint flag;
   691 	uint flag;
   692 	uint32 r;
   692 	uint32 r;
   693 
   693 
   694 	if (mode == GW_HEIGHTMAP) {
   694 	if (mode == GW_HEIGHTMAP) {
   695 		SetGeneratingWorldProgress(GWP_LANDSCAPE, (_opt.landscape == LT_DESERT) ? 1 + gwp_desert_amount : 1);
   695 		SetGeneratingWorldProgress(GWP_LANDSCAPE, (_opt.landscape == LT_TROPIC) ? 1 + gwp_desert_amount : 1);
   696 		LoadHeightmap(_file_to_saveload.name);
   696 		LoadHeightmap(_file_to_saveload.name);
   697 		IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
   697 		IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
   698 	} else if (_patches.land_generator == LG_TERRAGENESIS) {
   698 	} else if (_patches.land_generator == LG_TERRAGENESIS) {
   699 		SetGeneratingWorldProgress(GWP_LANDSCAPE, (_opt.landscape == LT_DESERT) ? 3 + gwp_desert_amount : 3);
   699 		SetGeneratingWorldProgress(GWP_LANDSCAPE, (_opt.landscape == LT_TROPIC) ? 3 + gwp_desert_amount : 3);
   700 		GenerateTerrainPerlin();
   700 		GenerateTerrainPerlin();
   701 	} else {
   701 	} else {
   702 		switch (_opt.landscape) {
   702 		switch (_opt.landscape) {
   703 			case LT_HILLY:
   703 			case LT_ARCTIC:
   704 				SetGeneratingWorldProgress(GWP_LANDSCAPE, 2);
   704 				SetGeneratingWorldProgress(GWP_LANDSCAPE, 2);
   705 
   705 
   706 				for (i = ScaleByMapSize((Random() & 0x7F) + 950); i != 0; --i) {
   706 				for (i = ScaleByMapSize((Random() & 0x7F) + 950); i != 0; --i) {
   707 					GenerateTerrain(2, 0);
   707 					GenerateTerrain(2, 0);
   708 				}
   708 				}
   714 					GenerateTerrain(4, flag);
   714 					GenerateTerrain(4, flag);
   715 				}
   715 				}
   716 				IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
   716 				IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
   717 				break;
   717 				break;
   718 
   718 
   719 			case LT_DESERT:
   719 			case LT_TROPIC:
   720 				SetGeneratingWorldProgress(GWP_LANDSCAPE, 3 + gwp_desert_amount);
   720 				SetGeneratingWorldProgress(GWP_LANDSCAPE, 3 + gwp_desert_amount);
   721 
   721 
   722 				for (i = ScaleByMapSize((Random() & 0x7F) + 170); i != 0; --i) {
   722 				for (i = ScaleByMapSize((Random() & 0x7F) + 170); i != 0; --i) {
   723 					GenerateTerrain(0, 0);
   723 					GenerateTerrain(0, 0);
   724 				}
   724 				}
   751 		}
   751 		}
   752 	}
   752 	}
   753 
   753 
   754 	ConvertGroundTilesIntoWaterTiles();
   754 	ConvertGroundTilesIntoWaterTiles();
   755 
   755 
   756 	if (_opt.landscape == LT_DESERT) CreateDesertOrRainForest();
   756 	if (_opt.landscape == LT_TROPIC) CreateDesertOrRainForest();
   757 }
   757 }
   758 
   758 
   759 void OnTick_Town();
   759 void OnTick_Town();
   760 void OnTick_Trees();
   760 void OnTick_Trees();
   761 void OnTick_Station();
   761 void OnTick_Station();