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

OpenTTD Source 12.2

Data Structures | Variables
industry_sl.cpp File Reference
`#include "../stdafx.h"`
`#include "saveload.h"`
`#include "compat/industry_sl_compat.h"`
`#include "../industry.h"`
`#include "newgrf_sl.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Data Structures
struct | INDYChunkHandler
struct | IIDSChunkHandler
struct | TIDSChunkHandler
struct | IBLDChunkHandler
| Industry builder. More...
struct | ITBLChunkHandler
| 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...
static const INDYChunkHandler | INDY
static const IIDSChunkHandler | IIDS
static const TIDSChunkHandler | TIDS
static const IBLDChunkHandler | IBLD
static const ITBLChunkHandler | ITBL
static const ChunkHandlerRef | industry_chunk_handlers []
const ChunkHandlerTable | _industry_chunk_handlers (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("wanted_inds", _industry_builder.wanted_inds, SLE_UINT32),
}

Description of the data to save and load in IndustryBuildData.

Definition at line 131 of file industry_sl.cpp.

Referenced by IBLDChunkHandler::Load(), and IBLDChunkHandler::Save().

## ◆ _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 158 of file industry_sl.cpp.

Referenced by ITBLChunkHandler::Load(), and ITBLChunkHandler::Save().

## ◆ industry_chunk_handlers

const ChunkHandlerRef industry_chunk_handlers[]
| static

Initial value:
= {
INDY,
IIDS,
TIDS,
IBLD,
ITBL,
}

Definition at line 200 of file industry_sl.cpp.

SLEG_VAR
#define SLEG_VAR(name, variable, type)
Storage of a global variable in every savegame version.
Definition: saveload.h:939
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:774
IndustryTypeBuildData
Data for managing the number of industries of a single industry type.
Definition: industry.h:213
_industry_builder
IndustryBuildData _industry_builder
In-game manager of industries.
Definition: industry_cmd.cpp:65