OpenTTD Source 20260711-master-g3fb3006dff
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, VarTypes::U32),
SLE_VAR(Object, build_date, VarTypes::U32),
}
@ U16
A 16 bit unsigned int.
Definition saveload.h:682
@ U8
A 8 bit unsigned int.
Definition saveload.h:662
@ Town
Load/save a reference to a town.
Definition saveload.h:645
#define SLE_REF(base, variable, type)
Storage of a reference in every version of a savegame.
Definition saveload.h:1034
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition saveload.h:904
@ ObjectTypeToPool
Saveload version: 186, SVN revision: 25833 Move object type from map to pool object.
Definition saveload.h:267
@ NewGRFObjectView
Saveload version: 155, SVN revision: 21453 Support for views in NewGRF objects.
Definition saveload.h:230
@ MaxVersion
Highest possible saveload version.
Definition saveload.h:421
@ IndustryPlatform
Saveload version: 148, SVN revision: 20659 Setting to make a flat area around (new) industries.
Definition saveload.h:221
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition saveload.h:1017
#define SLE_CONDVARNAME(base, variable, name, type, from, to)
Storage of a variable in some savegame versions.
Definition saveload.h:915
An object, such as transmitter, on the map.
Definition object_base.h:24
static constexpr VarType U16
Store a 16 bits unsigned int.
Definition saveload.h:754
static constexpr VarType U8
Store a 8 bits unsigned int.
Definition saveload.h:752
static constexpr VarType U32
Store a 32 bits unsigned int.
Definition saveload.h:756

Definition at line 21 of file object_sl.cpp.

◆ OBID

const OBIDChunkHandler OBID
static

Definition at line 73 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.

◆ OBJS

const OBJSChunkHandler OBJS
static

Definition at line 74 of file object_sl.cpp.