OpenTTD
Functions | Variables
industry_sl.cpp File Reference

Code handling saving and loading of industries. More...

#include "../stdafx.h"
#include "../industry.h"
#include "saveload.h"
#include "newgrf_sl.h"
#include "../safeguards.h"

Go to the source code of this file.

Functions

static void Save_INDY ()
 
static void Save_IIDS ()
 
static void Save_TIDS ()
 
static void Load_INDY ()
 
static void Load_IIDS ()
 
static void Load_TIDS ()
 
static void Ptrs_INDY ()
 
static void LoadSave_IBLD ()
 Load/save industry builder. More...
 
static void Save_ITBL ()
 Save industry-type build data. More...
 
static void Load_ITBL ()
 Load industry-type build data. More...
 

Variables

static OldPersistentStorage _old_ind_persistent_storage
 
static const SaveLoad _industry_desc []
 
static const SaveLoad _industry_builder_desc []
 Description of the data to save and load in IndustryBuildData. More...
 
static const SaveLoad _industrytype_builder_desc []
 Description of the data to save and load in IndustryTypeBuildData. More...
 
const ChunkHandler _industry_chunk_handlers []
 

Detailed Description

Code handling saving and loading of industries.

Definition in file industry_sl.cpp.

Function Documentation

◆ Load_ITBL()

static void Load_ITBL ( )
static

◆ LoadSave_IBLD()

static void LoadSave_IBLD ( )
static

Load/save industry builder.

Definition at line 136 of file industry_sl.cpp.

References SlGlobList().

◆ Save_ITBL()

static void Save_ITBL ( )
static

Save industry-type build data.

Definition at line 152 of file industry_sl.cpp.

References NUM_INDUSTRYTYPES.

Variable Documentation

◆ _industry_builder_desc

const SaveLoad _industry_builder_desc[]
static
Initial value:
= {
}
IndustryBuildData _industry_builder
In-game manager of industries.
#define SLEG_VAR(variable, type)
Storage of a global variable in every savegame version.
Definition: saveload.h:418
uint32 wanted_inds
Number of wanted industries (bits 31-16), and a fraction (bits 15-0).
Definition: industry.h:172

Description of the data to save and load in IndustryBuildData.

Definition at line 130 of file industry_sl.cpp.

◆ _industry_chunk_handlers

const ChunkHandler _industry_chunk_handlers[]
Initial value:
= {
{ 'INDY', Save_INDY, Load_INDY, Ptrs_INDY, NULL, CH_ARRAY},
{ 'IIDS', Save_IIDS, Load_IIDS, NULL, NULL, CH_ARRAY},
{ 'TIDS', Save_TIDS, Load_TIDS, NULL, NULL, CH_ARRAY},
{ 'IBLD', LoadSave_IBLD, LoadSave_IBLD, NULL, NULL, CH_RIFF},
{ 'ITBL', Save_ITBL, Load_ITBL, NULL, NULL, CH_ARRAY | CH_LAST},
}
static void Load_ITBL()
Load industry-type build data.
static void Save_ITBL()
Save industry-type build data.
static void LoadSave_IBLD()
Load/save industry builder.
Last chunk in this array.
Definition: saveload.h:104

◆ _industrytype_builder_desc

const SaveLoad _industrytype_builder_desc[]
static
Initial value:
= {
SLE_VAR(IndustryTypeBuildData, probability, SLE_UINT32),
SLE_VAR(IndustryTypeBuildData, min_number, SLE_UINT8),
SLE_VAR(IndustryTypeBuildData, target_count, SLE_UINT16),
SLE_VAR(IndustryTypeBuildData, max_wait, SLE_UINT16),
SLE_VAR(IndustryTypeBuildData, wait_count, SLE_UINT16),
}
Data for managing the number of industries of a single industry type.
Definition: industry.h:155
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:296

Description of the data to save and load in IndustryTypeBuildData.

Definition at line 142 of file industry_sl.cpp.