OpenTTD
object_sl.cpp File Reference

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

#include "../stdafx.h"
#include "../object_base.h"
#include "../object_map.h"
#include "saveload.h"
#include "newgrf_sl.h"
#include "../safeguards.h"

Go to the source code of this file.

Functions

static void Save_OBJS ()
 
static void Load_OBJS ()
 
static void Ptrs_OBJS ()
 
static void Save_OBID ()
 
static void Load_OBID ()
 

Variables

static const SaveLoad _object_desc []
 
const ChunkHandler _object_chunk_handlers []
 

Detailed Description

Code handling saving and loading of objects.

Definition in file object_sl.cpp.

Variable Documentation

◆ _object_chunk_handlers

const ChunkHandler _object_chunk_handlers[]
Initial value:
= {
{ 'OBID', Save_OBID, Load_OBID, NULL, NULL, CH_ARRAY },
{ 'OBJS', Save_OBJS, Load_OBJS, Ptrs_OBJS, NULL, CH_ARRAY | CH_LAST},
}
Last chunk in this array.
Definition: saveload.h:381

◆ _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:592
Load/save a reference to a town.
Definition: saveload.h:364
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:524
Highest possible saveload version.
Definition: saveload.h:295
An object, such as transmitter, on the map.
Definition: object_base.h:25
148 20659
Definition: saveload.h:221
186 25833 Objects storage
Definition: saveload.h:267
155 21453
Definition: saveload.h:230
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:584

Definition at line 21 of file object_sl.cpp.