OpenTTD
Functions | Variables
goal_sl.cpp File Reference

Code handling saving and loading of goals. More...

#include "../stdafx.h"
#include "../goal_base.h"
#include "saveload.h"
#include "../safeguards.h"

Go to the source code of this file.

Functions

static void Save_GOAL ()
 
static void Load_GOAL ()
 

Variables

static const SaveLoad _goals_desc []
 
const ChunkHandler _goal_chunk_handlers []
 

Detailed Description

Code handling saving and loading of goals.

Definition in file goal_sl.cpp.

Variable Documentation

◆ _goal_chunk_handlers

const ChunkHandler _goal_chunk_handlers[]
Initial value:
= {
{ 'GOAL', Save_GOAL, Load_GOAL, NULL, NULL, CH_ARRAY | CH_LAST},
}
Last chunk in this array.
Definition: saveload.h:104

◆ _goals_desc

const SaveLoad _goals_desc[]
static
Initial value:
= {
SLE_VAR(Goal, company, SLE_FILE_U16 | SLE_VAR_U8),
SLE_VAR(Goal, type, SLE_FILE_U16 | SLE_VAR_U8),
SLE_VAR(Goal, dst, SLE_UINT32),
SLE_CONDVAR(Goal, completed, SLE_BOOL, 182, SL_MAX_VERSION),
}
#define SLE_CONDSTR(base, variable, type, length, from, to)
Storage of a string in some savegame versions.
Definition: saveload.h:278
Struct about goals, current and completed.
Definition: goal_base.h:23
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:246
allow control codes in the strings
Definition: saveload.h:184
#define SL_MAX_VERSION
Highest possible savegame version.
Definition: saveload.h:96
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:296
#define SLE_STR(base, variable, type, length)
Storage of a string in every savegame version.
Definition: saveload.h:322

Definition at line 19 of file goal_sl.cpp.