OpenTTD Source  20241121-master-g67a0fccfad
object_sl.cpp File Reference

Code handling saving and loading of objects. More...

#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),
}
#define SLE_REF(base, variable, type)
Storage of a reference in every version of a savegame.
Definition: saveload.h:1004
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:863
@ SLV_186
186 25833 Objects storage
Definition: saveload.h:266
@ SL_MAX_VERSION
Highest possible saveload version.
Definition: saveload.h:397
@ SLV_155
155 21453
Definition: saveload.h:229
@ SLV_148
148 20659
Definition: saveload.h:220
@ REF_TOWN
Load/save a reference to a town.
Definition: saveload.h:602
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:987
An object, such as transmitter, on the map.
Definition: object_base.h:23

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.