OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

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.
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.
static const SaveLoad | _industrytype_builder_desc []
| Description of the data to save and load in IndustryTypeBuildData.
const ChunkHandler | _industry_chunk_handlers []

## Detailed Description

Code handling saving and loading of industries.

Definition in file industry_sl.cpp.

## Function Documentation

static void Load_ITBL | ( |  | ) |
| static

Load industry-type build data.

Definition at line 161 of file industry_sl.cpp.

References _industry_builder, IndustryBuildData::builddata, NUM_INDUSTRYTYPES, SlIterateArray(), and SlObject().

static void LoadSave_IBLD | ( |  | ) |
| static

Load/save industry builder.

Definition at line 136 of file industry_sl.cpp.

References SlGlobList().

static void Save_ITBL | ( |  | ) |
| static

Save industry-type build data.

Definition at line 152 of file industry_sl.cpp.

References _industry_builder, IndustryBuildData::builddata, NUM_INDUSTRYTYPES, and SlObject().

## Variable Documentation

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 130 of file industry_sl.cpp.

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},
}

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 142 of file industry_sl.cpp.