OpenTTD Source  20240919-master-gdf0233f4c2
object_sl.cpp File Reference
#include "../stdafx.h"
#include "saveload.h"
#include "compat/object_sl_compat.h"
#include "../object_base.h"
#include "../object_map.h"
#include "newgrf_sl.h"
#include "../safeguards.h"

Go to the source code of this file.

Data Structures

struct  OBJSChunkHandler
 
struct  OBIDChunkHandler
 

Functions

const ChunkHandlerTable _object_chunk_handlers (object_chunk_handlers)
 

Variables

static const SaveLoad _object_desc []
 
static const OBIDChunkHandler OBID
 
static const OBJSChunkHandler OBJS
 
static const ChunkHandlerRef object_chunk_handlers []
 

Detailed Description

Code handling saving and loading of objects

Definition in file object_sl.cpp.

Variable Documentation

◆ _object_desc

const SaveLoad _object_desc[]
static
Initial value:
= {
SLE_VAR(Object, location.tile, SLE_UINT32),
SLE_VAR(Object, location.w, SLE_FILE_U8 | SLE_VAR_U16),
SLE_VAR(Object, location.h, SLE_FILE_U8 | SLE_VAR_U16),
SLE_VAR(Object, build_date, SLE_UINT32),
SLE_CONDVAR(Object, colour, SLE_UINT8, SLV_148, SL_MAX_VERSION),
SLE_CONDVAR(Object, type, SLE_UINT16, SLV_186, SL_MAX_VERSION),
}

Definition at line 21 of file object_sl.cpp.

◆ object_chunk_handlers

const ChunkHandlerRef object_chunk_handlers[]
static
Initial value:
= {
OBID,
OBJS,
}

Definition at line 75 of file object_sl.cpp.

REF_TOWN
@ REF_TOWN
Load/save a reference to a town.
Definition: saveload.h:596
SLE_CONDVAR
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:857
SLV_155
@ SLV_155
155 21453
Definition: saveload.h:229
SLE_REF
#define SLE_REF(base, variable, type)
Storage of a reference in every version of a savegame.
Definition: saveload.h:988
SLV_148
@ SLV_148
148 20659
Definition: saveload.h:220
Object
An object, such as transmitter, on the map.
Definition: object_base.h:23
SL_MAX_VERSION
@ SL_MAX_VERSION
Highest possible saveload version.
Definition: saveload.h:391
SLE_VAR
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:971
SLV_186
@ SLV_186
186 25833 Objects storage
Definition: saveload.h:266