0x0043C90C
| 1074 | |
| 1075 | // 0x0043C90C |
| 1076 | void generate(const Scenario::Options& options) |
| 1077 | { |
| 1078 | Input::processMessagesMini(); |
| 1079 | |
| 1080 | WindowManager::close(WindowType::town); |
| 1081 | WindowManager::close(WindowType::industry); |
| 1082 | |
| 1083 | Ui::ProgressBar::begin(StringIds::generating_landscape); |
| 1084 | |
| 1085 | auto rotation = WindowManager::getCurrentRotation(); |
| 1086 | Scenario::reset(); |
| 1087 | WindowManager::setCurrentRotation(rotation); |
| 1088 | |
| 1089 | updateProgress(5); |
| 1090 | |
| 1091 | Scenario::initialiseDate(options.scenarioStartYear); |
| 1092 | Scenario::initialiseSnowLine(); |
| 1093 | TileManager::initialise(); |
| 1094 | updateProgress(10); |
| 1095 | |
| 1096 | { |
| 1097 | HeightMap heightMap(kMapColumns, kMapRows); |
| 1098 | |
| 1099 | generateHeightMap(options, heightMap); |
| 1100 | updateProgress(25); |
| 1101 | |
| 1102 | generateRivers(options, heightMap); |
| 1103 | updateProgress(30); |
| 1104 | |
| 1105 | generateLand(heightMap); |
| 1106 | updateProgress(35); |
| 1107 | |
| 1108 | generateWater(heightMap); |
| 1109 | updateProgress(45); |
| 1110 | |
| 1111 | generateTerrain(heightMap); |
| 1112 | updateProgress(55); |
| 1113 | } |
| 1114 | |
| 1115 | generateSurfaceVariation(); |
| 1116 | updateProgress(175); |
| 1117 | |
| 1118 | generateTrees(); |
| 1119 | updateProgress(200); |
| 1120 | |
| 1121 | generateTowns(); |
| 1122 | updateProgress(225); |
| 1123 | |
| 1124 | generateIndustries(225, 245); |
| 1125 | updateProgress(245); |
| 1126 | |
| 1127 | generateMiscBuildings(); |
| 1128 | updateProgress(250); |
| 1129 | |
| 1130 | generateSurfaceVariation(); |
| 1131 | updateProgress(255); |
| 1132 | |
| 1133 | Scenario::sub_4969E0(0); |
no test coverage detected