OpenTTD
|
Code handling saving and loading of company data. More...
#include "../stdafx.h"
#include "../company_func.h"
#include "../company_manager_face.h"
#include "../fios.h"
#include "../tunnelbridge_map.h"
#include "../tunnelbridge.h"
#include "../station_base.h"
#include "saveload.h"
#include "table/strings.h"
#include "../safeguards.h"
Go to the source code of this file.
Data Structures | |
struct | CompanyOldAI |
Functions | |
CompanyManagerFace | ConvertFromOldCompanyManagerFace (uint32 face) |
Converts an old company manager's face format to the new company manager's face format. | |
void | AfterLoadCompanyStats () |
Rebuilding of company statistics after loading a savegame. | |
static void | SaveLoad_PLYR_common (Company *c, CompanyProperties *cprops) |
static void | SaveLoad_PLYR (Company *c) |
static void | Save_PLYR () |
static void | Load_PLYR () |
static void | Check_PLYR () |
static void | Ptrs_PLYR () |
Variables | |
static const SaveLoad | _company_desc [] |
static const SaveLoad | _company_settings_desc [] |
static const SaveLoad | _company_settings_skip_desc [] |
static const SaveLoad | _company_economy_desc [] |
static const SaveLoad | _company_ai_desc [] |
static const SaveLoad | _company_ai_build_rec_desc [] |
static const SaveLoad | _company_livery_desc [] |
const ChunkHandler | _company_chunk_handlers [] |
Code handling saving and loading of company data.
Definition in file company_sl.cpp.
void AfterLoadCompanyStats | ( | ) |
Rebuilding of company statistics after loading a savegame.
Definition at line 95 of file company_sl.cpp.
References CountBits(), FACIL_AIRPORT, BaseStation::facilities, FOR_EACH_SET_ROADTYPE, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::Get(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::GetIfValid(), GetLockPart(), GetOtherTunnelBridgeEnd(), GetPresentSignals(), GetRailType(), GetRoadBits(), GetRoadOwner(), GetRoadTypes(), GetStationType(), GetTileOwner(), GetTileType(), GetTrackBits(), GetTunnelBridgeLength(), GetTunnelBridgeTransportType(), GetWaterClass(), HasSignals(), Company::infrastructure, IsBuoy(), IsLevelCrossing(), IsLock(), IsNormalRoad(), IsPlainRail(), IsRoadDepot(), IsShipDepot(), IsStationTileBlocked(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), LEVELCROSSING_TRACKBIT_FACTOR, LOCK_DEPOT_TILE_FACTOR, LOCK_PART_MIDDLE, MapSize(), MemSetT(), MP_OBJECT, MP_RAILWAY, MP_ROAD, MP_STATION, MP_TUNNELBRIDGE, MP_WATER, BaseStation::owner, CompanyInfrastructure::rail, CompanyInfrastructure::road, CompanyInfrastructure::signal, CompanyInfrastructure::station, TracksOverlap(), TRANSPORT_RAIL, TRANSPORT_ROAD, TRANSPORT_WATER, TUNNELBRIDGE_TRACKBIT_FACTOR, CompanyInfrastructure::water, and WATER_CLASS_CANAL.
Referenced by AfterLoadGame(), CheckCaches(), and ReloadNewGRFData().
CompanyManagerFace ConvertFromOldCompanyManagerFace | ( | uint32 | face | ) |
Converts an old company manager's face format to the new company manager's face format.
Meaning of the bits in the old face (some bits are used in several times):
face | the face in the old format |
Definition at line 44 of file company_sl.cpp.
References ClampU(), ETHNICITY_BLACK, GB(), GE_WF, GE_WM, GENDER_FEMALE, HasBit(), max(), ScaleCompanyManagerFaceValue(), SetBit(), and SetCompanyManagerFaceBits().
Referenced by AfterLoadGame().
|
static |
Definition at line 394 of file company_sl.cpp.
|
static |
Definition at line 363 of file company_sl.cpp.
const ChunkHandler _company_chunk_handlers[] |
|
static |
Definition at line 342 of file company_sl.cpp.
|
static |
Definition at line 403 of file company_sl.cpp.
|
static |
Definition at line 299 of file company_sl.cpp.
|
static |
Definition at line 320 of file company_sl.cpp.