Code handling saving and loading of story pages. More...
#include "../stdafx.h"
#include "../story_base.h"
#include "saveload.h"
Go to the source code of this file.
Functions | |
void | AfterLoadStoryBook () |
Called after load to trash broken pages. | |
static void | Save_STORY_PAGE_ELEMENT () |
static void | Load_STORY_PAGE_ELEMENT () |
static void | Save_STORY_PAGE () |
static void | Load_STORY_PAGE () |
Variables | |
static const SaveLoad | _story_page_elements_desc [] |
static const SaveLoad | _story_pages_desc [] |
const ChunkHandler | _story_page_chunk_handlers [] |
Code handling saving and loading of story pages.
Definition in file story_sl.cpp.
void AfterLoadStoryBook | ( | ) |
Called after load to trash broken pages.
Definition at line 18 of file story_sl.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::CleanPool(), and IsSavegameVersionBefore().
Referenced by AfterLoadGame().
const ChunkHandler _story_page_chunk_handlers[] |
{ { 'STPE', Save_STORY_PAGE_ELEMENT, Load_STORY_PAGE_ELEMENT, NULL, NULL, CH_ARRAY}, { 'STPA', Save_STORY_PAGE, Load_STORY_PAGE, NULL, NULL, CH_ARRAY | CH_LAST}, }
const SaveLoad _story_page_elements_desc[] [static] |
{ SLE_CONDVAR(StoryPageElement, sort_value, SLE_FILE_U16 | SLE_VAR_U32, 0, 184), SLE_CONDVAR(StoryPageElement, sort_value, SLE_UINT32, 185, SL_MAX_VERSION), SLE_VAR(StoryPageElement, page, SLE_UINT16), SLE_CONDVAR(StoryPageElement, type, SLE_FILE_U16 | SLE_VAR_U8, 0, 184), SLE_CONDVAR(StoryPageElement, type, SLE_UINT8, 185, SL_MAX_VERSION), SLE_VAR(StoryPageElement, referenced_id, SLE_UINT32), SLE_STR(StoryPageElement, text, SLE_STR | SLF_ALLOW_CONTROL, 0), }
Definition at line 29 of file story_sl.cpp.
const SaveLoad _story_pages_desc[] [static] |
{ SLE_CONDVAR(StoryPage, sort_value, SLE_FILE_U16 | SLE_VAR_U32, 0, 184), SLE_CONDVAR(StoryPage, sort_value, SLE_UINT32, 185, SL_MAX_VERSION), SLE_VAR(StoryPage, date, SLE_UINT32), SLE_CONDVAR(StoryPage, company, SLE_FILE_U16 | SLE_VAR_U8, 0, 184), SLE_CONDVAR(StoryPage, company, SLE_UINT8, 185, SL_MAX_VERSION), SLE_STR(StoryPage, title, SLE_STR | SLF_ALLOW_CONTROL, 0), }
Definition at line 66 of file story_sl.cpp.