OpenTTD Source: src/saveload/gamelog_sl.cpp File Reference

OpenTTD Source 1.11.0-RC1

Functions | Variables
gamelog_sl.cpp File Reference
`#include "../stdafx.h"`
`#include "../gamelog_internal.h"`
`#include "../fios.h"`
`#include "saveload.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Functions
static void | Load_GLOG_common (LoggedAction *&gamelog_action, uint &gamelog_actions)
static void | Save_GLOG ()
static void | Load_GLOG ()
static void | Check_GLOG ()

## Variables
static const SaveLoad | _glog_action_desc []
static const SaveLoad | _glog_mode_desc []
static const SaveLoad | _glog_revision_desc []
static const SaveLoad | _glog_oldver_desc []
static const SaveLoad | _glog_setting_desc []
static const SaveLoad | _glog_grfadd_desc []
static const SaveLoad | _glog_grfrem_desc []
static const SaveLoad | _glog_grfcompat_desc []
static const SaveLoad | _glog_grfparam_desc []
static const SaveLoad | _glog_grfmove_desc []
static const SaveLoad | _glog_grfbug_desc []
static const SaveLoad | _glog_emergency_desc []
static const SaveLoad *const | _glog_desc []
const ChunkHandler | _gamelog_chunk_handlers []

## Detailed Description

Code handling saving and loading of gamelog data

Definition in file gamelog_sl.cpp.

## Variable Documentation

## ◆ _gamelog_chunk_handlers

const ChunkHandler _gamelog_chunk_handlers[]

Initial value:
= {
{ 'GLOG', Save_GLOG, Load_GLOG, nullptr, Check_GLOG, CH_RIFF | CH_LAST }
}

## ◆ _glog_action_desc

const SaveLoad _glog_action_desc[]
| static

Initial value:
= {
SLE_VAR(LoggedAction, tick, SLE_UINT16),
}

Definition at line 18 of file gamelog_sl.cpp.

## ◆ _glog_desc

const SaveLoad* const _glog_desc[]
| static

Initial value:
= {
_glog_mode_desc,
_glog_revision_desc,
_glog_oldver_desc,
_glog_setting_desc,
_glog_grfadd_desc,
_glog_grfrem_desc,
_glog_grfcompat_desc,
_glog_grfparam_desc,
_glog_grfmove_desc,
_glog_grfbug_desc,
_glog_emergency_desc,
}

Definition at line 89 of file gamelog_sl.cpp.

## ◆ _glog_emergency_desc

const SaveLoad _glog_emergency_desc[]
| static

Initial value:
= {
}

Definition at line 85 of file gamelog_sl.cpp.

## ◆ _glog_grfadd_desc

const SaveLoad _glog_grfadd_desc[]
| static

Initial value:
= {
SLE_VAR(LoggedChange, grfadd.grfid, SLE_UINT32 ),
SLE_ARR(LoggedChange, grfadd.md5sum, SLE_UINT8, 16),
}

Definition at line 50 of file gamelog_sl.cpp.

## ◆ _glog_grfbug_desc

const SaveLoad _glog_grfbug_desc[]
| static

Initial value:
= {
SLE_VAR(LoggedChange, grfbug.data, SLE_UINT64),
SLE_VAR(LoggedChange, grfbug.grfid, SLE_UINT32),
SLE_VAR(LoggedChange, grfbug.bug, SLE_UINT8),
}

Definition at line 78 of file gamelog_sl.cpp.

## ◆ _glog_grfcompat_desc

const SaveLoad _glog_grfcompat_desc[]
| static

Initial value:
= {
SLE_VAR(LoggedChange, grfcompat.grfid, SLE_UINT32 ),
SLE_ARR(LoggedChange, grfcompat.md5sum, SLE_UINT8, 16),
}

Definition at line 61 of file gamelog_sl.cpp.

## ◆ _glog_grfmove_desc

const SaveLoad _glog_grfmove_desc[]
| static

Initial value:
= {
SLE_VAR(LoggedChange, grfmove.grfid, SLE_UINT32),
SLE_VAR(LoggedChange, grfmove.offset, SLE_INT32),
}

Definition at line 72 of file gamelog_sl.cpp.

## ◆ _glog_grfparam_desc

const SaveLoad _glog_grfparam_desc[]
| static

Initial value:
= {
SLE_VAR(LoggedChange, grfparam.grfid, SLE_UINT32),
}

Definition at line 67 of file gamelog_sl.cpp.

## ◆ _glog_grfrem_desc

const SaveLoad _glog_grfrem_desc[]
| static

Initial value:
= {
SLE_VAR(LoggedChange, grfrem.grfid, SLE_UINT32),
}

Definition at line 56 of file gamelog_sl.cpp.

## ◆ _glog_mode_desc

const SaveLoad _glog_mode_desc[]
| static

Initial value:
= {
SLE_VAR(LoggedChange, mode.mode, SLE_UINT8),
SLE_VAR(LoggedChange, mode.landscape, SLE_UINT8),
}

Definition at line 23 of file gamelog_sl.cpp.

## ◆ _glog_oldver_desc

const SaveLoad _glog_oldver_desc[]
| static

Initial value:
= {
SLE_VAR(LoggedChange, oldver.type, SLE_UINT32),
SLE_VAR(LoggedChange, oldver.version, SLE_UINT32),
}

Definition at line 37 of file gamelog_sl.cpp.

## ◆ _glog_revision_desc

const SaveLoad _glog_revision_desc[]
| static

Initial value:
= {
SLE_ARR(LoggedChange, revision.text, SLE_UINT8, GAMELOG_REVISION_LENGTH),
SLE_VAR(LoggedChange, revision.newgrf, SLE_UINT32),
SLE_VAR(LoggedChange, revision.slver, SLE_UINT16),
SLE_VAR(LoggedChange, revision.modified, SLE_UINT8),
}

Definition at line 29 of file gamelog_sl.cpp.

## ◆ _glog_setting_desc

const SaveLoad _glog_setting_desc[]
| static

Initial value:
= {
SLE_STR(LoggedChange, setting.name, SLE_STR, 128),
SLE_VAR(LoggedChange, setting.oldval, SLE_INT32),
SLE_VAR(LoggedChange, setting.newval, SLE_INT32),
}

Definition at line 43 of file gamelog_sl.cpp.

LoggedChange::newgrf
uint32 newgrf
_openttd_newgrf_version
Definition: gamelog_internal.h:45
LoggedChange::name
char * name
name of the setting
Definition: gamelog_internal.h:66
LoggedChange::mode
byte mode
new game mode - Editor x Game
Definition: gamelog_internal.h:40
LoggedChange::offset
int32 offset
offset, positive = move down
Definition: gamelog_internal.h:63
LoggedChange::type
uint32 type
type of savegame,
Definition: gamelog_internal.h:50
SLE_STR
#define SLE_STR(base, variable, type, length)
Storage of a string in every savegame version.
Definition: saveload.h:647
CH_LAST
@ CH_LAST
Last chunk in this array.
Definition: saveload.h:410
LoggedChange::slver
uint16 slver
_sl_version
Definition: gamelog_internal.h:46
LoggedChange::landscape
byte landscape
landscape (temperate, arctic, ...)
Definition: gamelog_internal.h:41
SLE_ARR
#define SLE_ARR(base, variable, type, length)
Storage of an array in every version of a savegame.
Definition: saveload.h:638
LoggedChange::modified
byte modified
_openttd_revision_modified
Definition: gamelog_internal.h:47
LoggedChange::data
uint64 data
additional data
Definition: gamelog_internal.h:71
LoggedChange::grfid
uint32 grfid
ID of removed GRF.
Definition: gamelog_internal.h:55
LoggedChange::bug
byte bug
type of bug,
Definition: gamelog_internal.h:73
SLE_VAR
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:621
LoggedChange::oldval
int32 oldval
old value
Definition: gamelog_internal.h:67
LoggedChange::text
char text[GAMELOG_REVISION_LENGTH]
revision string, _openttd_revision
Definition: gamelog_internal.h:44
LoggedChange
Contains information about one logged change.
Definition: gamelog_internal.h:36
LoggedAction
Contains information about one logged action that caused at least one logged change.
Definition: gamelog_internal.h:80
LoggedChange::version
uint32 version
major and minor version OR ttdp version
Definition: gamelog_internal.h:51
LoggedChange::newval
int32 newval
new value
Definition: gamelog_internal.h:68