OpenTTD Source 20260917-master-gec444f7315
gamelog_sl.cpp File Reference

Code handling saving and loading of gamelog data. More...

#include "../stdafx.h"
#include "saveload.h"
#include "compat/gamelog_sl_compat.h"
#include "../gamelog_internal.h"
#include "../fios.h"
#include "../string_func.h"
#include "../safeguards.h"

Go to the source code of this file.

Data Structures

class  SlGamelogMode
class  SlGamelogRevision
class  SlGamelogOldver
class  SlGamelogSetting
class  SlGamelogGrfadd
class  SlGamelogGrfrem
class  SlGamelogGrfcompat
class  SlGamelogGrfparam
class  SlGamelogGrfmove
class  SlGamelogGrfbug
class  SlGamelogEmergency
class  SlGamelogAction
struct  GLOGChunkHandler

Functions

static std::unique_ptr< LoggedChange > MakeLoggedChange (GamelogChangeType type)
const ChunkHandlerTable _gamelog_chunk_handlers (gamelog_chunk_handlers)

Variables

static bool _is_emergency_save = true
static const SaveLoad _gamelog_desc []
static const GLOGChunkHandler GLOG
static const ChunkHandlerRef gamelog_chunk_handlers []

Detailed Description

Code handling saving and loading of gamelog data.

Definition in file gamelog_sl.cpp.

Function Documentation

◆ MakeLoggedChange()

std::unique_ptr< LoggedChange > MakeLoggedChange ( GamelogChangeType type)
static

Definition at line 290 of file gamelog_sl.cpp.

Variable Documentation

◆ _gamelog_desc

const SaveLoad _gamelog_desc[]
static
Initial value:
= {
}
#define SLE_OBJECT_ADDRESS(base, variable)
Macro to be able to pass the variable type and construct the SaveLoad::AddressFunction given a base c...
Definition saveload.h:754
@ U64TickCounter
Saveload version: 300, GitHub pull request: 10035 Make tick counter 64bit to avoid wrapping.
Definition saveload.h:346
@ MinVersion
First savegame version.
Definition saveload.h:37
@ RiffToArray
Saveload version: 294, GitHub pull request: 9375 Changed many ChunkType::Riff chunks to ChunkType::A...
Definition saveload.h:338
Contains information about one logged action that caused at least one logged change.
static SaveLoad StructList(std::string name, SaveLoadVersion from=SaveLoadVersion::MinVersion, SaveLoadVersion to=SaveLoadVersion::MaxVersion)
Storage of a list of structs, optionally in some savegame versions.
Definition saveload.h:1103
static SaveLoad Variable(std::string name, AddressFunction< T > address_func, SaveLoadVersion from=SaveLoadVersion::MinVersion, SaveLoadVersion to=SaveLoadVersion::MaxVersion, size_t extra=0)
Storage of a variable in some savegame versions.
Definition saveload.h:926

Definition at line 368 of file gamelog_sl.cpp.

◆ _is_emergency_save

bool _is_emergency_save = true
static

Definition at line 262 of file gamelog_sl.cpp.

◆ gamelog_chunk_handlers

const ChunkHandlerRef gamelog_chunk_handlers[]
static
Initial value:
= {
GLOG,
}

Definition at line 425 of file gamelog_sl.cpp.

◆ GLOG

const GLOGChunkHandler GLOG
static

Definition at line 424 of file gamelog_sl.cpp.