OpenTTD Source 20250312-master-gcdcc6b491d
LoadCheckData Struct Reference

Container for loading in mode SL_LOAD_CHECK. More...

#include <fios.h>

Public Member Functions

bool HasErrors ()
 Check whether loading the game resulted in errors.
 
bool HasNewGrfs ()
 Check whether the game uses any NewGrfs.
 
void Clear ()
 Reset read data.
 

Data Fields

bool checkable = false
 True if the savegame could be checked by SL_LOAD_CHECK. (Old savegames are not checkable.)
 
StringID error {}
 Error message from loading. INVALID_STRING_ID if no error.
 
std::string error_msg {}
 Data to pass to string parameters when displaying error.
 
uint32_t map_size_x = 0
 
uint32_t map_size_y = 0
 
TimerGameCalendar::Date current_date {}
 
GameSettings settings {}
 
CompanyPropertiesMap companies {}
 Company information.
 
GRFConfigList grfconfig {}
 NewGrf configuration from save.
 
GRFListCompatibility grf_compatibility = GLC_NOT_FOUND
 Summary state of NewGrfs, whether missing files or only compatible found.
 
Gamelog gamelog {}
 Gamelog actions.
 

Detailed Description

Container for loading in mode SL_LOAD_CHECK.

Definition at line 33 of file fios.h.

Constructor & Destructor Documentation

◆ LoadCheckData()

LoadCheckData::LoadCheckData ( )
inline

Definition at line 51 of file fios.h.

Member Function Documentation

◆ Clear()

◆ HasErrors()

bool LoadCheckData::HasErrors ( )
inline

Check whether loading the game resulted in errors.

Returns
true if errors were encountered.

Definition at line 57 of file fios.h.

References error, and INVALID_STRING_ID.

Referenced by SaveLoadWindow::OnClick(), SaveLoadWindow::OnInvalidateData(), and openttd_main().

◆ HasNewGrfs()

bool LoadCheckData::HasNewGrfs ( )
inline

Check whether the game uses any NewGrfs.

Returns
true if NewGrfs are used.

Definition at line 66 of file fios.h.

References error, grfconfig, and INVALID_STRING_ID.

Referenced by SaveLoadWindow::OnClick(), and SaveLoadWindow::OnInvalidateData().

Field Documentation

◆ checkable

bool LoadCheckData::checkable = false

True if the savegame could be checked by SL_LOAD_CHECK. (Old savegames are not checkable.)

Definition at line 34 of file fios.h.

Referenced by Clear(), and DoLoad().

◆ companies

CompanyPropertiesMap LoadCheckData::companies {}

Company information.

Definition at line 44 of file fios.h.

Referenced by Clear(), and PLYRChunkHandler::LoadCheck().

◆ current_date

TimerGameCalendar::Date LoadCheckData::current_date {}

Definition at line 40 of file fios.h.

◆ error

StringID LoadCheckData::error {}

Error message from loading. INVALID_STRING_ID if no error.

Definition at line 35 of file fios.h.

Referenced by Clear(), HasErrors(), HasNewGrfs(), openttd_main(), and SlError().

◆ error_msg

std::string LoadCheckData::error_msg {}

Data to pass to string parameters when displaying error.

Definition at line 36 of file fios.h.

Referenced by Clear(), openttd_main(), and SlError().

◆ gamelog

Gamelog LoadCheckData::gamelog {}

Gamelog actions.

Definition at line 49 of file fios.h.

Referenced by Clear(), and GLOGChunkHandler::LoadCheck().

◆ grf_compatibility

GRFListCompatibility LoadCheckData::grf_compatibility = GLC_NOT_FOUND

Summary state of NewGrfs, whether missing files or only compatible found.

Definition at line 47 of file fios.h.

Referenced by DoLoad(), SaveLoadWindow::OnClick(), and SaveLoadWindow::OnInvalidateData().

◆ grfconfig

GRFConfigList LoadCheckData::grfconfig {}

NewGrf configuration from save.

Definition at line 46 of file fios.h.

Referenced by Clear(), DoLoad(), HasNewGrfs(), NGRFChunkHandler::LoadCheck(), and SaveLoadWindow::OnClick().

◆ map_size_x

uint32_t LoadCheckData::map_size_x = 0

Definition at line 38 of file fios.h.

◆ map_size_y

uint32_t LoadCheckData::map_size_y = 0

Definition at line 39 of file fios.h.

◆ settings

GameSettings LoadCheckData::settings {}

Definition at line 42 of file fios.h.


The documentation for this struct was generated from the following files: