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

OpenTTD Source 15.0-RC2

Data Structures | Functions | Variables
goal_sl.cpp File Reference

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

`#include "../stdafx.h"`
`#include "saveload.h"`
`#include "compat/goal_sl_compat.h"`
`#include "../goal_base.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Data Structures
struct | GOALChunkHandler

## Functions
const ChunkHandlerTable | _goal_chunk_handlers (goal_chunk_handlers)

## Variables
static const SaveLoad | _goals_desc []
static const GOALChunkHandler | GOAL
static const ChunkHandlerRef | goal_chunk_handlers []

## Detailed Description

Code handling saving and loading of goals.

Definition in file goal_sl.cpp.

## Variable Documentation

## ◆ _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_SSTR(Goal, text, SLE_STR | SLF_ALLOW_CONTROL),
SLE_CONDSSTR(Goal, progress, SLE_STR | SLF_ALLOW_CONTROL, SLV_182, SL_MAX_VERSION),
SLE_CONDVAR(Goal, completed, SLE_BOOL, SLV_182, SL_MAX_VERSION),
}
SLF_ALLOW_CONTROL
@ SLF_ALLOW_CONTROL
Allow control codes in the strings.
Definition saveload.h:702
SLE_CONDSSTR
#define SLE_CONDSSTR(base, variable, type, from, to)
Storage of a std::string in some savegame versions.
Definition saveload.h:948
SLE_CONDVAR
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition saveload.h:883
SLE_SSTR
#define SLE_SSTR(base, variable, type)
Storage of a std::string in every savegame version.
Definition saveload.h:1061
SLV_182
@ SLV_182
182 25115 FS#5492, r25259, r25296 Goal status
Definition saveload.h:261
SL_MAX_VERSION
@ SL_MAX_VERSION
Highest possible saveload version.
Definition saveload.h:416
SLE_VAR
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition saveload.h:1017
Goal
Struct about goals, current and completed.
Definition goal_base.h:22

Definition at line 19 of file goal_sl.cpp.

## ◆ GOAL

const GOALChunkHandler GOAL
| static

Definition at line 53 of file goal_sl.cpp.

## ◆ goal_chunk_handlers

const ChunkHandlerRef goal_chunk_handlers[]
| static

Initial value:
= {
GOAL,
}

Definition at line 54 of file goal_sl.cpp.