OpenTTD Source: src/saveload/industry_sl.cpp File Reference

OpenTTD Source 1.11.0-RC1

Functions | Variables
industry_sl.cpp File Reference
`#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.
static void | Save_ITBL ()
| Save industry-type build data.
static void | Load_ITBL ()
| Load industry-type build data.

## 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.

## Variable Documentation

## ◆ _industry_builder_desc

const SaveLoad _industry_builder_desc[]
| static

Initial value:
= {
SLEG_VAR(_industry_builder.wanted_inds, SLE_UINT32),
}

Description of the data to save and load in IndustryBuildData.

Definition at line 140 of file industry_sl.cpp.

Referenced by LoadSave_IBLD().

## ◆ _industry_chunk_handlers

const ChunkHandler _industry_chunk_handlers[]

Initial value:
= {
{ 'INDY', Save_INDY, Load_INDY, Ptrs_INDY, nullptr, CH_ARRAY},
{ 'IIDS', Save_IIDS, Load_IIDS, nullptr, nullptr, CH_ARRAY},
{ 'TIDS', Save_TIDS, Load_TIDS, nullptr, nullptr, CH_ARRAY},
{ 'IBLD', LoadSave_IBLD, LoadSave_IBLD, nullptr, nullptr, CH_RIFF},
{ 'ITBL', Save_ITBL, Load_ITBL, nullptr, nullptr, CH_ARRAY | CH_LAST},
}

## ◆ _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),
}

Description of the data to save and load in IndustryTypeBuildData.

Definition at line 152 of file industry_sl.cpp.

Referenced by Load_ITBL().

CH_LAST
@ CH_LAST
Last chunk in this array.
Definition: saveload.h:410
LoadSave_IBLD
static void LoadSave_IBLD()
Load/save industry builder.
Definition: industry_sl.cpp:146
SLEG_VAR
#define SLEG_VAR(variable, type)
Storage of a global variable in every savegame version.
Definition: saveload.h:761
Save_ITBL
static void Save_ITBL()
Save industry-type build data.
Definition: industry_sl.cpp:162
IndustryBuildData::wanted_inds
uint32 wanted_inds
Number of wanted industries (bits 31-16), and a fraction (bits 15-0).
Definition: industry.h:230
SLE_VAR
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:621
IndustryTypeBuildData
Data for managing the number of industries of a single industry type.
Definition: industry.h:213
Load_ITBL
static void Load_ITBL()
Load industry-type build data.
Definition: industry_sl.cpp:171
_industry_builder
IndustryBuildData _industry_builder
In-game manager of industries.
Definition: industry_cmd.cpp:65