OpenTTD Source  20240919-master-gdf0233f4c2
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

class  SlIndustryAccepted
 
class  SlIndustryProducedHistory
 
class  SlIndustryProduced
 
struct  INDYChunkHandler
 
struct  IIDSChunkHandler
 
struct  TIDSChunkHandler
 
struct  IBLDChunkHandler
 Industry builder. More...
 
struct  ITBLChunkHandler
 Industry-type build data. More...
 

Functions

const ChunkHandlerTable _industry_chunk_handlers (industry_chunk_handlers)
 

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 []
 

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 289 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 316 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 358 of file industry_sl.cpp.

IndustryBuildData::wanted_inds
uint32_t wanted_inds
Number of wanted industries (bits 31-16), and a fraction (bits 15-0).
Definition: industry.h:326
SLEG_VAR
#define SLEG_VAR(name, variable, type)
Storage of a global variable in every savegame version.
Definition: saveload.h:1147
SLE_VAR
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:971
IndustryTypeBuildData
Data for managing the number of industries of a single industry type.
Definition: industry.h:309
_industry_builder
IndustryBuildData _industry_builder
In-game manager of industries.
Definition: industry_cmd.cpp:70