OpenTTD Source 20260711-master-g3fb3006dff
story_sl.cpp File Reference

Code handling saving and loading of story pages. More...

#include "../stdafx.h"
#include "saveload.h"
#include "compat/story_sl_compat.h"
#include "../story_base.h"
#include "../safeguards.h"

Go to the source code of this file.

Data Structures

struct  STPEChunkHandler
struct  STPAChunkHandler

Functions

void AfterLoadStoryBook ()
 Called after load to trash broken pages.
const ChunkHandlerTable _story_page_chunk_handlers (story_page_chunk_handlers)

Variables

static const SaveLoad _story_page_elements_desc []
static const SaveLoad _story_pages_desc []
static const STPEChunkHandler STPE
static const STPAChunkHandler STPA
static const ChunkHandlerRef story_page_chunk_handlers []

Detailed Description

Code handling saving and loading of story pages.

Definition in file story_sl.cpp.

Function Documentation

◆ AfterLoadStoryBook()

void AfterLoadStoryBook ( )

Called after load to trash broken pages.

Definition at line 20 of file story_sl.cpp.

References IsSavegameVersionBefore(), and Storybooks.

Referenced by AfterLoadGame().

Variable Documentation

◆ _story_page_elements_desc

const SaveLoad _story_page_elements_desc[]
static
Initial value:
= {
}
@ U8
A 8 bit unsigned int.
Definition saveload.h:680
@ U32
A 32 bit unsigned int.
Definition saveload.h:684
@ U16
A 16 bit unsigned int.
Definition saveload.h:664
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition saveload.h:904
#define SLE_SSTR(base, variable, type)
Storage of a std::string in every savegame version.
Definition saveload.h:1061
@ MinVersion
First savegame version.
Definition saveload.h:31
@ Storybooks
Saveload version: 185, SVN revision: 25620 Storybooks.
Definition saveload.h:266
@ MaxVersion
Highest possible saveload version.
Definition saveload.h:421
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition saveload.h:1017
@ AllowControlCode
Allow the special control codes.
Definition string_type.h:47
Struct about story page elements.
Definition story_base.h:143
static constexpr VarType U16
Store a 16 bits unsigned int.
Definition saveload.h:754
static constexpr VarType U8
Store a 8 bits unsigned int.
Definition saveload.h:752
static constexpr VarType STR
Store string.
Definition saveload.h:760
static constexpr VarType U32
Store a 32 bits unsigned int.
Definition saveload.h:756

Definition at line 31 of file story_sl.cpp.

◆ _story_pages_desc

◆ story_page_chunk_handlers

const ChunkHandlerRef story_page_chunk_handlers[]
static
Initial value:
= {
STPE,
STPA,
}

Definition at line 118 of file story_sl.cpp.

◆ STPA

const STPAChunkHandler STPA
static

Definition at line 117 of file story_sl.cpp.

◆ STPE

const STPEChunkHandler STPE
static

Definition at line 116 of file story_sl.cpp.