OpenTTD Source: LoadCheckData Struct Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Data Fields
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 {}
LandscapeType | landscape {}
| Landscape type.
TimerGameCalendar::Year | starting_year {}
| Starting date.
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 52 of file fios.h.

## Member Function Documentation

## ◆ Clear()

void LoadCheckData::Clear | ( |  | ) |

Reset read data.

Definition at line 49 of file fios_gui.cpp.

References checkable, ClearGRFConfigList(), companies, error, error_msg, gamelog, grfconfig, INVALID_STRING_ID, landscape, TimerGameConst< struct Calendar >::MIN_DATE, Gamelog::Reset(), and starting_year.

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

## ◆ HasErrors()

bool LoadCheckData::HasErrors | ( |  | ) |
| inline

Check whether loading the game resulted in errors.

Returns
  true if errors were encountered.

Definition at line 58 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 67 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 45 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 50 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 48 of file fios.h.

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

## ◆ grfconfig

GRFConfigList LoadCheckData::grfconfig {}

NewGrf configuration from save.

Definition at line 47 of file fios.h.

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

## ◆ landscape

LandscapeType LoadCheckData::landscape {}

Landscape type.

Definition at line 42 of file fios.h.

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

## ◆ 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.

## ◆ starting_year

TimerGameCalendar::Year LoadCheckData::starting_year {}

Starting date.

Definition at line 43 of file fios.h.

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

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

- src/fios.h
- src/fios_gui.cpp