OpenTTD Source 20250312-master-gcdcc6b491d
|
Code handling saving and loading of engines. More...
#include "../stdafx.h"
#include "saveload.h"
#include "compat/engine_sl_compat.h"
#include "saveload_internal.h"
#include "../engine_base.h"
#include "../string_func.h"
#include "../safeguards.h"
Go to the source code of this file.
Data Structures | |
struct | ENGNChunkHandler |
struct | ENGSChunkHandler |
struct | EIDSChunkHandler |
Functions | |
Engine * | GetTempDataEngine (EngineID index) |
void | CopyTempEngineData () |
Copy data from temporary engine array into the real engine pool. | |
void | ResetTempEngineData () |
const ChunkHandlerTable | _engine_chunk_handlers (engine_chunk_handlers) |
Variables | |
static const SaveLoad | _engine_desc [] |
static ReferenceThroughBaseContainer< std::vector< Engine > > | _temp_engine |
static const SaveLoad | _engine_id_mapping_desc [] |
Save and load the mapping between the engine id in the pool, and the grf file it came from. | |
static const EIDSChunkHandler | EIDS |
static const ENGNChunkHandler | ENGN |
static const ENGSChunkHandler | ENGS |
static const ChunkHandlerRef | engine_chunk_handlers [] |
Code handling saving and loading of engines.
Definition in file engine_sl.cpp.
void CopyTempEngineData | ( | ) |
Copy data from temporary engine array into the real engine pool.
Definition at line 96 of file engine_sl.cpp.
References Engine::age, Engine::company_avail, Engine::company_hidden, Engine::duration_phase_1, Engine::duration_phase_2, Engine::duration_phase_3, Engine::flags, Engine::intro_date, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_engine_pool >::Iterate(), Engine::name, Engine::preview_asked, Engine::preview_company, Engine::preview_wait, Engine::reliability, Engine::reliability_final, Engine::reliability_max, Engine::reliability_spd_dec, and Engine::reliability_start.
Referenced by AfterLoadGame().
Definition at line 46 of file engine_sl.cpp.
void ResetTempEngineData | ( | ) |
Definition at line 124 of file engine_sl.cpp.
|
static |
Definition at line 21 of file engine_sl.cpp.
|
static |
Save and load the mapping between the engine id in the pool, and the grf file it came from.
Definition at line 150 of file engine_sl.cpp.
Referenced by EIDSChunkHandler::Load(), and EIDSChunkHandler::Save().
|
static |
Definition at line 44 of file engine_sl.cpp.
|
static |
Definition at line 201 of file engine_sl.cpp.
|
static |
Definition at line 204 of file engine_sl.cpp.
|
static |
Definition at line 202 of file engine_sl.cpp.
|
static |
Definition at line 203 of file engine_sl.cpp.