OpenTTD
Functions | Variables
game_sl.cpp File Reference

Handles the saveload part of the GameScripts. More...

#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 (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. More...
 
static const char * _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

◆ _current_data

GameStrings* _current_data

The currently loaded game strings.

Definition at line 334 of file game_text.cpp.

Referenced by RegisterGameTranslation().

◆ _game_chunk_handlers

const ChunkHandler _game_chunk_handlers[]
Initial value:
= {
{ 'GSTR', Save_GSTR, Load_GSTR, NULL, NULL, CH_ARRAY },
{ 'GSDT', Save_GSDT, Load_GSDT, NULL, NULL, CH_ARRAY | CH_LAST},
}
Last chunk in this array.
Definition: saveload.h:104

◆ _game_language_header

const SaveLoad _game_language_header[]
static
Initial value:
= {
SLEG_STR(_game_saveload_string, SLE_STR),
SLEG_VAR(_game_saveload_strings, SLE_UINT32),
}
#define SLEG_STR(variable, type)
Storage of a global string in every savegame version.
Definition: saveload.h:439
#define SLEG_VAR(variable, type)
Storage of a global variable in every savegame version.
Definition: saveload.h:418
#define SLE_STR(base, variable, type, length)
Storage of a string in every savegame version.
Definition: saveload.h:322

Definition at line 121 of file game_sl.cpp.

◆ _game_language_string

const SaveLoad _game_language_string[]
static
Initial value:
= {
SLEG_STR(_game_saveload_string, SLE_STR | SLF_ALLOW_CONTROL),
}
#define SLEG_STR(variable, type)
Storage of a global string in every savegame version.
Definition: saveload.h:439
allow control codes in the strings
Definition: saveload.h:184
#define SLE_STR(base, variable, type, length)
Storage of a string in every savegame version.
Definition: saveload.h:322

Definition at line 127 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),
}
#define SLEG_STR(variable, type)
Storage of a global string in every savegame version.
Definition: saveload.h:439
#define SLEG_VAR(variable, type)
Storage of a global variable in every savegame version.
Definition: saveload.h:418

Definition at line 30 of file game_sl.cpp.