| 1795 | }; |
| 1796 | |
| 1797 | bool LoadTTDMain(LoadgameState &ls) |
| 1798 | { |
| 1799 | Debug(oldloader, 3, "Reading main chunk..."); |
| 1800 | |
| 1801 | _read_ttdpatch_flags = false; |
| 1802 | |
| 1803 | /* Load the biggest chunk */ |
| 1804 | if (!LoadChunk(ls, nullptr, main_chunk)) { |
| 1805 | Debug(oldloader, 0, "Loading failed"); |
| 1806 | return false; |
| 1807 | } |
| 1808 | |
| 1809 | Debug(oldloader, 3, "Done, converting game data..."); |
| 1810 | |
| 1811 | FixTTDMapArray(); |
| 1812 | FixTTDDepots(); |
| 1813 | |
| 1814 | /* Fix some general stuff */ |
| 1815 | if (to_underlying(_settings_game.game_creation.landscape) >= NUM_LANDSCAPE) _settings_game.game_creation.landscape = LandscapeType::Temperate; |
| 1816 | |
| 1817 | /* Fix the game to be compatible with OpenTTD */ |
| 1818 | FixOldTowns(); |
| 1819 | FixOldVehicles(ls); |
| 1820 | |
| 1821 | /* We have a new difficulty setting */ |
| 1822 | _settings_game.difficulty.town_council_tolerance = Clamp(_old_diff_level, 0, 2); |
| 1823 | |
| 1824 | Debug(oldloader, 3, "Finished converting game data"); |
| 1825 | Debug(oldloader, 1, "TTD(Patch) savegame successfully converted"); |
| 1826 | |
| 1827 | return true; |
| 1828 | } |
| 1829 | |
| 1830 | bool LoadTTOMain(LoadgameState &ls) |
| 1831 | { |
nothing calls this directly
no test coverage detected