OpenTTD
Functions | Variables
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:104

◆ _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, 148, SL_MAX_VERSION),
SLE_CONDVAR(Object, view, SLE_UINT8, 155, SL_MAX_VERSION),
SLE_CONDVAR(Object, type, SLE_UINT16, 186, SL_MAX_VERSION),
}
#define SLE_REF(base, variable, type)
Storage of a reference in every version of a savegame.
Definition: saveload.h:304
Load/save a reference to a town.
Definition: saveload.h:84
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:246
An object, such as transmitter, on the map.
Definition: object_base.h:25
#define SL_MAX_VERSION
Highest possible savegame version.
Definition: saveload.h:96
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:296

Definition at line 21 of file object_sl.cpp.