OpenTTD Source
20241108-master-g80f628063a
|
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 | |
static Engine * | CallocEngine () |
Allocate an Engine structure, but not using the pools. More... | |
static void | FreeEngine (Engine *e) |
Deallocate an Engine constructed by CallocEngine. More... | |
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 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. More... | |
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.
|
static |
Allocate an Engine structure, but not using the pools.
The allocated Engine must be freed using FreeEngine;
Definition at line 51 of file engine_sl.cpp.
|
static |
Deallocate an Engine constructed by CallocEngine.
e | Engine to free. |
Definition at line 62 of file engine_sl.cpp.
References free().
|
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 178 of file engine_sl.cpp.
Referenced by EIDSChunkHandler::Load(), and EIDSChunkHandler::Save().
|
static |
Definition at line 216 of file engine_sl.cpp.