OpenTTD
saveload_internal.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6  */
7 
10 #ifndef SAVELOAD_INTERNAL_H
11 #define SAVELOAD_INTERNAL_H
12 
13 #include "../company_manager_face.h"
14 #include "../order_base.h"
15 #include "../engine_type.h"
16 #include "saveload.h"
17 
18 void InitializeOldNames();
20 char *CopyFromOldName(StringID id);
21 void ResetOldNames();
22 
26 
27 void AfterLoadVehicles(bool part_of_load);
28 void FixupTrainLengths();
29 void AfterLoadStations();
30 void AfterLoadRoadStops();
31 void AfterLoadLabelMaps();
32 void AfterLoadStoryBook();
33 void AfterLoadLinkGraphs();
36 
37 void UpdateOldAircraft();
38 
39 void SaveViewportBeforeSaveGame();
40 void ResetViewportAfterLoadGame();
41 
44 
45 Engine *GetTempDataEngine(EngineID index);
46 void CopyTempEngineData();
47 
48 extern int32 _saved_scrollpos_x;
49 extern int32 _saved_scrollpos_y;
50 extern ZoomLevel _saved_scrollpos_zoom;
51 
53 extern uint32 _ttdp_version;
54 
56 
57 Order UnpackOldOrder(uint16 packed);
58 
59 #endif /* SAVELOAD_INTERNAL_H */
void UpdateOldAircraft()
need to be called to load aircraft from old version
Definition: vehicle_sl.cpp:162
void AfterLoadCompanyStats()
Rebuilding of company statistics after loading a savegame.
Definition: company_sl.cpp:94
char * CopyFromOldName(StringID id)
Copy and convert old custom names to UTF-8.
Definition: strings_sl.cpp:59
void AfterLoadStoryBook()
Called after load to trash broken pages.
Definition: story_sl.cpp:18
SavegameType
Types of save games.
Definition: saveload.h:330
uint32 CompanyManagerFace
Company manager face bits, info see in company_manager_face.h.
Definition: company_type.h:51
Functions/types related to saving and loading games.
void ConvertOldMultiheadToNew()
Converts all trains to the new subtype format introduced in savegame 16.2 It also links multiheaded e...
Definition: vehicle_sl.cpp:110
void MoveBuoysToWaypoints()
Perform all steps to upgrade from the old station buoys to the new version that uses waypoints...
Definition: station_sl.cpp:40
void AfterLoadLinkGraphs()
Spawn the threads for running link graph calculations.
const SaveLoad * GetBaseStationDescription()
Get the base station description to be used for SL_ST_INCLUDE.
Definition: station_sl.cpp:465
void UpdateHousesAndTowns()
Check and update town and house values.
Definition: town_sl.cpp:64
uint32 StringID
Numeric value that represents a string, independent of the selected language.
Definition: strings_type.h:16
void MoveWaypointsToBaseStations()
Perform all steps to upgrade from the old waypoints to the new version that uses station.
Definition: waypoint_sl.cpp:65
StringID RemapOldStringID(StringID s)
Remap a string ID from the old format to the new format.
Definition: strings_sl.cpp:28
void ResetOldNames()
Free the memory of the old names array.
Definition: strings_sl.cpp:107
void ConnectMultiheadedTrains()
Link front and rear multiheaded engines to each other This is done when loading a savegame...
Definition: vehicle_sl.cpp:32
SavegameType _savegame_type
type of savegame we are loading
Definition: saveload.cpp:57
uint16 EngineID
Unique identification number of an engine.
Definition: engine_type.h:21
void FixupTrainLengths()
Fixup old train spacing.
Definition: vehicle_sl.cpp:483
uint32 _ttdp_version
version of TTDP savegame (if applicable)
Definition: saveload.cpp:60
void AfterLoadRoadStops()
(Re)building of road stop caches after loading a savegame.
Definition: station_sl.cpp:129
void AfterLoadVehicles(bool part_of_load)
Called after load to update coordinates.
Definition: vehicle_sl.cpp:240
Order UnpackOldOrder(uint16 packed)
Unpacks a order from savegames made with TTD(Patch)
Definition: order_sl.cpp:89
SaveLoad type struct.
Definition: saveload.h:496
void CopyTempEngineData()
Copy data from temporary engine array into the real engine pool.
Definition: engine_sl.cpp:118
CompanyManagerFace ConvertFromOldCompanyManagerFace(uint32 face)
Converts an old company manager&#39;s face format to the new company manager&#39;s face format.
Definition: company_sl.cpp:43
ZoomLevel
All zoom levels we know.
Definition: zoom_type.h:19
void InitializeOldNames()
Initialize the old names table memory.
Definition: strings_sl.cpp:116