OpenTTD

saveload_internal.h
Go to the documentation of this file.
1 /* $Id: saveload_internal.h 25620 2013-07-21 13:18:45Z zuu $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
9
12 #ifndef SAVELOAD_INTERNAL_H
13 #define SAVELOAD_INTERNAL_H
14
15 #include "../company_manager_face.h"
16 #include "../order_base.h"
17 #include "../engine_type.h"
18 #include "saveload.h"
19
20 void InitializeOldNames();
21 StringID RemapOldStringID(StringID s);
22 char *CopyFromOldName(StringID id);
23 void ResetOldNames();
24
25 void MoveBuoysToWaypoints();
26 void MoveWaypointsToBaseStations();
27 const SaveLoad *GetBaseStationDescription();
28
29 void AfterLoadVehicles(bool part_of_load);
30 void FixupTrainLengths();
31 void AfterLoadStations();
32 void AfterLoadRoadStops();
33 void AfterLoadLabelMaps();
34 void AfterLoadStoryBook();
35 void AfterLoadLinkGraphs();
36 void AfterLoadCompanyStats();
37 void UpdateHousesAndTowns();
38
39 void UpdateOldAircraft();
40
41 void SaveViewportBeforeSaveGame();
42 void ResetViewportAfterLoadGame();
43
44 void ConvertOldMultiheadToNew();
45 void ConnectMultiheadedTrains();
46
47 Engine *GetTempDataEngine(EngineID index);
48 void CopyTempEngineData();
49
50 extern int32 _saved_scrollpos_x;
51 extern int32 _saved_scrollpos_y;
52 extern ZoomLevelByte _saved_scrollpos_zoom;
53
54 extern SavegameType _savegame_type;
55 extern uint32 _ttdp_version;
56
57 CompanyManagerFace ConvertFromOldCompanyManagerFace(uint32 face);
58
59 Order UnpackOldOrder(uint16 packed);
60
61 #endif /* SAVELOAD_INTERNAL_H */
UpdateOldAircraft
void UpdateOldAircraft()
need to be called to load aircraft from old version
Definition: vehicle_sl.cpp:167
AfterLoadCompanyStats
void AfterLoadCompanyStats()
Rebuilding of company statistics after loading a savegame.
Definition: company_sl.cpp:96
CopyFromOldName
char * CopyFromOldName(StringID id)
Copy and convert old custom names to UTF-8.
Definition: strings_sl.cpp:61
AfterLoadStoryBook
void AfterLoadStoryBook()
Called after load to trash broken pages.
Definition: story_sl.cpp:20
SavegameType
SavegameType
Types of save games.
Definition: saveload.h:40
Order
Definition: order_base.h:34
CompanyManagerFace
uint32 CompanyManagerFace
Company manager face bits, info see in company_manager_face.h.
Definition: company_type.h:55
saveload.h
Functions/types related to saving and loading games.
ConvertOldMultiheadToNew
void ConvertOldMultiheadToNew()
Converts all trains to the new subtype format introduced in savegame 16.2 It also links multiheaded e...
Definition: vehicle_sl.cpp:114
MoveBuoysToWaypoints
void MoveBuoysToWaypoints()
Perform all steps to upgrade from the old station buoys to the new version that uses waypoints...
Definition: station_sl.cpp:42
AfterLoadLinkGraphs
void AfterLoadLinkGraphs()
Spawn the threads for running link graph calculations.
Definition: linkgraph_sl.cpp:230
GetBaseStationDescription
const SaveLoad * GetBaseStationDescription()
Get the base station description to be used for SL_ST_INCLUDE.
Definition: station_sl.cpp:465
UpdateHousesAndTowns
void UpdateHousesAndTowns()
Check and update town and house values.
Definition: town_sl.cpp:66
StringID
uint32 StringID
Numeric value that represents a string, independent of the selected language.
Definition: strings_type.h:18
SimpleTinyEnumT< ZoomLevel, byte >
Engine
Definition: engine_base.h:23
MoveWaypointsToBaseStations
void MoveWaypointsToBaseStations()
Perform all steps to upgrade from the old waypoints to the new version that uses station.
Definition: waypoint_sl.cpp:67
RemapOldStringID
StringID RemapOldStringID(StringID s)
Remap a string ID from the old format to the new format.
Definition: strings_sl.cpp:30
ResetOldNames
void ResetOldNames()
Free the memory of the old names array.
Definition: strings_sl.cpp:109
ConnectMultiheadedTrains
void ConnectMultiheadedTrains()
Link front and rear multiheaded engines to each other This is done when loading a savegame...
Definition: vehicle_sl.cpp:34
_savegame_type
SavegameType _savegame_type
type of savegame we are loading
Definition: saveload.cpp:271
EngineID
uint16 EngineID
Unique identification number of an engine.
Definition: engine_type.h:22
FixupTrainLengths
void FixupTrainLengths()
Fixup old train spacing.
Definition: vehicle_sl.cpp:476
_ttdp_version
uint32 _ttdp_version
version of TTDP savegame (if applicable)
Definition: saveload.cpp:274
AfterLoadRoadStops
void AfterLoadRoadStops()
(Re)building of road stop caches after loading a savegame.
Definition: station_sl.cpp:135
AfterLoadVehicles
void AfterLoadVehicles(bool part_of_load)
Called after load to update coordinates.
Definition: vehicle_sl.cpp:249
UnpackOldOrder
Order UnpackOldOrder(uint16 packed)
Unpacks a order from savegames made with TTD(Patch)
Definition: order_sl.cpp:91
SaveLoad
SaveLoad type struct.
Definition: saveload.h:208
CopyTempEngineData
void CopyTempEngineData()
Copy data from temporary engine array into the real engine pool.
Definition: engine_sl.cpp:121
ConvertFromOldCompanyManagerFace
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:45
InitializeOldNames
void InitializeOldNames()
Initialize the old names table memory.
Definition: strings_sl.cpp:118