268 _cur_month = ymd.month; |
267 _cur_month = ymd.month; |
269 |
268 |
270 /* yes, call various monthly loops */ |
269 /* yes, call various monthly loops */ |
271 if (_game_mode != GM_MENU) { |
270 if (_game_mode != GM_MENU) { |
272 #ifdef DEBUG_DUMP_COMMANDS |
271 #ifdef DEBUG_DUMP_COMMANDS |
273 std::map<TownID, uint32> town_pop; |
|
274 for (TileIndex t = 0; t < MapSize(); t++) { |
|
275 if (GetTileType(t) == MP_HOUSE && IsHouseCompleted(t)) { |
|
276 uint32 pop = GetHouseSpecs(GetHouseType(t))->population; |
|
277 town_pop[GetTownIndex(t)] += pop; |
|
278 } |
|
279 } |
|
280 |
|
281 Town *t; |
|
282 FOR_ALL_TOWNS(t) assert(t->population == town_pop[t->index]); |
|
283 |
|
284 char name[MAX_PATH]; |
272 char name[MAX_PATH]; |
285 snprintf(name, lengthof(name), "dmp_cmds_%d.sav", _date); |
273 snprintf(name, lengthof(name), "dmp_cmds_%d.sav", _date); |
286 SaveOrLoad(name, SL_SAVE, AUTOSAVE_DIR); |
274 SaveOrLoad(name, SL_SAVE, AUTOSAVE_DIR); |
287 DebugDumpCommands("ddc:save:%s\n", name); |
275 DebugDumpCommands("ddc:save:%s\n", name); |
288 #endif /* DUMP_COMMANDS */ |
276 #endif /* DUMP_COMMANDS */ |