OpenTTD Source  1.11.0-beta2
game_sl.cpp File Reference
#include "../stdafx.h"
#include "../debug.h"
#include "saveload.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.

Functions

static void SaveReal_GSDT (int *index_ptr)
 
static void Load_GSDT ()
 
static void Save_GSDT ()
 
static void SaveReal_GSTR (const LanguageStrings *ls)
 
static void Load_GSTR ()
 
static void Save_GSTR ()
 

Variables

static char _game_saveload_name [64]
 
static int _game_saveload_version
 
static char _game_saveload_settings [1024]
 
static bool _game_saveload_is_random
 
static const SaveLoad _game_script []
 
GameStrings_current_data
 The currently loaded game strings.
 
static std::string _game_saveload_string
 
static uint _game_saveload_strings
 
static const SaveLoad _game_language_header []
 
static const SaveLoad _game_language_string []
 
const ChunkHandler _game_chunk_handlers []
 

Detailed Description

Handles the saveload part of the GameScripts

Definition in file game_sl.cpp.

Variable Documentation

◆ _game_chunk_handlers

const ChunkHandler _game_chunk_handlers[]
Initial value:
= {
{ 'GSTR', Save_GSTR, Load_GSTR, nullptr, nullptr, CH_ARRAY },
{ 'GSDT', Save_GSDT, Load_GSDT, nullptr, nullptr, CH_ARRAY | CH_LAST},
}

◆ _game_language_header

const SaveLoad _game_language_header[]
static
Initial value:
= {
SLEG_SSTR(_game_saveload_string, SLE_STR),
SLEG_VAR(_game_saveload_strings, SLE_UINT32),
}

Definition at line 119 of file game_sl.cpp.

◆ _game_language_string

const SaveLoad _game_language_string[]
static
Initial value:
= {
SLEG_SSTR(_game_saveload_string, SLE_STR | SLF_ALLOW_CONTROL),
}

Definition at line 125 of file game_sl.cpp.

◆ _game_script

const SaveLoad _game_script[]
static
Initial value:
= {
SLEG_STR(_game_saveload_name, SLE_STRB),
SLEG_STR(_game_saveload_settings, SLE_STRB),
SLEG_VAR(_game_saveload_version, SLE_UINT32),
SLEG_VAR(_game_saveload_is_random, SLE_BOOL),
}

Definition at line 28 of file game_sl.cpp.

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
SLEG_SSTR
#define SLEG_SSTR(variable, type)
Storage of a global std::string in every savegame version.
Definition: saveload.h:789
SLF_ALLOW_CONTROL
@ SLF_ALLOW_CONTROL
allow control codes in the strings
Definition: saveload.h:489
SLEG_VAR
#define SLEG_VAR(variable, type)
Storage of a global variable in every savegame version.
Definition: saveload.h:761
SLEG_STR
#define SLEG_STR(variable, type)
Storage of a global string in every savegame version.
Definition: saveload.h:782