OpenTTD Source 20241224-master-gee860a5c8e
SlCompanySettings Class Reference
Inheritance diagram for SlCompanySettings:
DefaultSaveLoadHandler< SlCompanySettings, CompanyProperties > SaveLoadHandler

Public Member Functions

void Save (CompanyProperties *c) const override
 
void Load (CompanyProperties *c) const override
 
void FixPointers (CompanyProperties *c) const override
 
void LoadCheck (CompanyProperties *c) const override
 
- Public Member Functions inherited from DefaultSaveLoadHandler< SlCompanySettings, CompanyProperties >
SaveLoadTable GetDescription () const override
 Get the description of the fields in the savegame.
 
SaveLoadCompatTable GetCompatDescription () const override
 Get the pre-header description of the fields in the savegame.
 
void Save (void *object) const override
 Save the object to disk.
 
void Load (void *object) const override
 Load the object from disk.
 
void LoadCheck (void *object) const override
 Similar to load, but used only to validate savegames.
 
void FixPointers (void *object) const override
 A post-load callback to fix SL_REF integers into pointers.
 
- Public Member Functions inherited from SaveLoadHandler
SaveLoadTable GetLoadDescription () const
 Get the description for how to load the chunk.
 

Static Public Attributes

static const SaveLoad description []
 
static const SaveLoadCompatTable compat_description = _company_settings_compat
 

Additional Inherited Members

- Data Fields inherited from SaveLoadHandler
std::optional< std::vector< SaveLoad > > load_description
 

Detailed Description

Definition at line 283 of file company_sl.cpp.

Member Function Documentation

◆ FixPointers()

void SlCompanySettings::FixPointers ( CompanyProperties c) const
inlineoverridevirtual

◆ Load()

void SlCompanySettings::Load ( CompanyProperties c) const
inlineoverridevirtual

◆ LoadCheck()

void SlCompanySettings::LoadCheck ( CompanyProperties c) const
inlineoverridevirtual

◆ Save()

void SlCompanySettings::Save ( CompanyProperties c) const
inlineoverridevirtual

Field Documentation

◆ compat_description

const SaveLoadCompatTable SlCompanySettings::compat_description = _company_settings_compat
inlinestatic

Definition at line 300 of file company_sl.cpp.

◆ description

const SaveLoad SlCompanySettings::description[]
inlinestatic
Initial value:
= {
SLE_CONDVAR(CompanyProperties, settings.engine_renew_months, SLE_INT16, SLV_16, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.engine_renew_money, SLE_UINT32, SLV_16, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.renew_keep_length, SLE_BOOL, SLV_2, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.vehicle.servint_ispercent, SLE_BOOL, SLV_120, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.vehicle.servint_trains, SLE_UINT16, SLV_120, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.vehicle.servint_roadveh, SLE_UINT16, SLV_120, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.vehicle.servint_aircraft, SLE_UINT16, SLV_120, SL_MAX_VERSION),
SLE_CONDVAR(CompanyProperties, settings.vehicle.servint_ships, SLE_UINT16, SLV_120, SL_MAX_VERSION),
}
fluid_settings_t * settings
FluidSynth settings handle.
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition saveload.h:868
@ SLV_16
16.0 2817 16.1 3155
Definition saveload.h:60
@ SLV_120
120 16439
Definition saveload.h:187
@ SL_MAX_VERSION
Highest possible saveload version.
Definition saveload.h:399
@ SLV_2
2.0 0.3.0 2.1 0.3.1, 0.3.2
Definition saveload.h:34
@ SLV_19
19 3396
Definition saveload.h:65
#define SLE_CONDREF(base, variable, type, from, to)
Storage of a reference in some savegame versions.
Definition saveload.h:889
@ REF_ENGINE_RENEWS
Load/save a reference to an engine renewal (autoreplace).
Definition saveload.h:607
Statically loadable part of Company pool item.

Definition at line 285 of file company_sl.cpp.


The documentation for this class was generated from the following file: