OpenTTD Source 20260917-master-gec444f7315
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:
= {
}
#define SLE_OBJECT_ADDRESS(base, variable)
Macro to be able to pass the variable type and construct the SaveLoad::AddressFunction given a base c...
Definition saveload.h:754
@ MinVersion
First savegame version.
Definition saveload.h:37
@ Storybooks
Saveload version: 185, SVN revision: 25620 Storybooks.
Definition saveload.h:272
@ AllowControlCode
Allow the special control codes.
Definition string_type.h:47
static SaveLoad Variable(std::string name, AddressFunction< T > address_func, SaveLoadVersion from=SaveLoadVersion::MinVersion, SaveLoadVersion to=SaveLoadVersion::MaxVersion, size_t extra=0)
Storage of a variable in some savegame versions.
Definition saveload.h:926
static SaveLoad String(std::string name, AddressFunction< T > address_func, StringValidationSettings string_validation_settings={}, SaveLoadVersion from=SaveLoadVersion::MinVersion, SaveLoadVersion to=SaveLoadVersion::MaxVersion, size_t extra=0)
Storage of a string in some savegame versions.
Definition saveload.h:977
Struct about story page elements.
Definition story_base.h:143

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.