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

OpenTTD Source 12.0-beta1

Data Structures | Functions | Variables
game_sl.cpp File Reference
`#include "../stdafx.h"`
`#include "../debug.h"`
`#include "saveload.h"`
`#include "compat/game_sl_compat.h"`
`#include "../string_func.h"`
`#include "../game/game.hpp"`
`#include "../game/game_config.hpp"`
`#include "../network/network.h"`
`#include "../game/game_instance.hpp"`
`#include "../game/game_text.hpp"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Data Structures
struct | GSDTChunkHandler
class | SlGameLanguageString
struct | GSTRChunkHandler

## Functions
static void | SaveReal_GSDT (int *index_ptr)

## Variables
static std::string | _game_saveload_name
static int | _game_saveload_version
static std::string | _game_saveload_settings
static bool | _game_saveload_is_random
static const SaveLoad | _game_script_desc []
GameStrings * | _current_data
| The currently loaded game strings.
static std::string | _game_saveload_string
static uint32 | _game_saveload_strings
static const SaveLoad | _game_language_desc []
static const GSTRChunkHandler | GSTR
static const GSDTChunkHandler | GSDT
static const ChunkHandlerRef | game_chunk_handlers []
const ChunkHandlerTable | _game_chunk_handlers (game_chunk_handlers)

## Detailed Description

Handles the saveload part of the GameScripts

Definition in file game_sl.cpp.

## Variable Documentation

## ◆ _game_language_desc

const SaveLoad _game_language_desc[]
| static

Initial value:
= {
SLE_SSTR(LanguageStrings, language, SLE_STR),
SLEG_CONDVAR("count", _game_saveload_strings, SLE_UINT32, SL_MIN_VERSION, SLV_SAVELOAD_LIST_LENGTH),
SLEG_STRUCTLIST("strings", SlGameLanguageString),
}

Definition at line 153 of file game_sl.cpp.

## ◆ _game_script_desc

const SaveLoad _game_script_desc[]
| static

Initial value:
= {
SLEG_SSTR("name", _game_saveload_name, SLE_STR),
SLEG_SSTR("settings", _game_saveload_settings, SLE_STR),
SLEG_VAR("version", _game_saveload_version, SLE_UINT32),
SLEG_VAR("is_random", _game_saveload_is_random, SLE_BOOL),
}

Definition at line 30 of file game_sl.cpp.

## ◆ game_chunk_handlers

const ChunkHandlerRef game_chunk_handlers[]
| static

Initial value:
= {
GSTR,
GSDT,
}

Definition at line 201 of file game_sl.cpp.

SL_MIN_VERSION
@ SL_MIN_VERSION
First savegame version.
Definition: saveload.h:35
SLE_STR
#define SLE_STR(base, variable, type, length)
Storage of a string in every savegame version.
Definition: saveload.h:797
SLEG_VAR
#define SLEG_VAR(name, variable, type)
Storage of a global variable in every savegame version.
Definition: saveload.h:936
SLEG_SSTR
#define SLEG_SSTR(name, variable, type)
Storage of a global std::string in every savegame version.
Definition: saveload.h:968
LanguageStrings
Container for the raw (unencoded) language strings of a language.
Definition: game_text.hpp:20
SLEG_CONDVAR
#define SLEG_CONDVAR(name, variable, type, from, to)
Storage of a global variable in some savegame versions.
Definition: saveload.h:848
SlGameLanguageString
Definition: game_sl.cpp:125
SLE_SSTR
#define SLE_SSTR(base, variable, type)
Storage of a std::string in every savegame version.
Definition: saveload.h:805
SLV_SAVELOAD_LIST_LENGTH
@ SLV_SAVELOAD_LIST_LENGTH
293 PR#9374 Consistency in list length with SL_STRUCT / SL_STRUCTLIST / SL_DEQUE / SL_REFLIST.
Definition: saveload.h:335
SLEG_STRUCTLIST
#define SLEG_STRUCTLIST(name, handler)
Storage of a list of structs in every savegame version.
Definition: saveload.h:998