OpenTTD Source  20241121-master-g67a0fccfad
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.
 
virtual void Save ([[maybe_unused]] CompanyProperties *object) const
 
void Save (void *object) const override
 
virtual void Load ([[maybe_unused]] CompanyProperties *object) const
 
void Load (void *object) const override
 
virtual void LoadCheck ([[maybe_unused]] CompanyProperties *object) const
 
void LoadCheck (void *object) const override
 
virtual void FixPointers ([[maybe_unused]] CompanyProperties *object) const
 
void FixPointers (void *object) const override
 
- Public Member Functions inherited from SaveLoadHandler
virtual void Save ([[maybe_unused]] void *object) const
 Save the object to disk. More...
 
virtual void Load ([[maybe_unused]] void *object) const
 Load the object from disk. More...
 
virtual void LoadCheck ([[maybe_unused]] void *object) const
 Similar to load, but used only to validate savegames. More...
 
virtual void FixPointers ([[maybe_unused]] void *object) const
 A post-load callback to fix SL_REF integers into pointers. More...
 
SaveLoadTable GetLoadDescription () const
 Get the description for how to load the chunk. More...
 

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.

Field Documentation

◆ 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.
Definition: fluidsynth.cpp:21
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:863
@ 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:397
@ 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:884
@ REF_ENGINE_RENEWS
Load/save a reference to an engine renewal (autoreplace).
Definition: saveload.h:605
Statically loadable part of Company pool item.
Definition: company_base.h:69

Definition at line 285 of file company_sl.cpp.


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