OpenTTD Source 20260711-master-g3fb3006dff
LoggedChangeOldVersion Struct Reference

A log entry for loading a really old savegame. More...

#include <gamelog_internal.h>

Inheritance diagram for LoggedChangeOldVersion:
LoggedChange

Public Member Functions

 LoggedChangeOldVersion ()
 Constructor for savegame loading.
 LoggedChangeOldVersion (uint32_t type, uint32_t version)
 Create the entry.
void FormatTo (std::back_insert_iterator< std::string > &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) override
 Format the content of this change into the given output.
Public Member Functions inherited from LoggedChange
 LoggedChange (GamelogChangeType type=GamelogChangeType::None)
 Create the log entry.
virtual ~LoggedChange ()=default
 Ensure the destructor of the sub classes are called as well.

Data Fields

uint32_t type = 0
 type of savegame,
uint32_t version = 0
 major and minor version OR ttdp version
Data Fields inherited from LoggedChange
GamelogChangeType ct {}
 The type of change.

Detailed Description

A log entry for loading a really old savegame.

Definition at line 102 of file gamelog_internal.h.

Constructor & Destructor Documentation

◆ LoggedChangeOldVersion() [1/2]

LoggedChangeOldVersion::LoggedChangeOldVersion ( )
inline

Constructor for savegame loading.

Definition at line 104 of file gamelog_internal.h.

References LoggedChange::LoggedChange().

◆ LoggedChangeOldVersion() [2/2]

LoggedChangeOldVersion::LoggedChangeOldVersion ( uint32_t type,
uint32_t version )
inline

Create the entry.

Parameters
typeThe SavegameType.
versionThe TTDP or ancient OpenTTD version if available.

Definition at line 111 of file gamelog_internal.h.

References LoggedChange::LoggedChange(), type, and version.

Member Function Documentation

◆ FormatTo()

void LoggedChangeOldVersion::FormatTo ( std::back_insert_iterator< std::string > & output_iterator,
GrfIDMapping & grf_names,
GamelogActionType action_type )
overridevirtual

Format the content of this change into the given output.

Parameters
output_iteratorDestination of the formatted content.
grf_namesCache/mapping of names of NewGRFs seen in the logs.
action_typeThe context in which this method was called.

Implements LoggedChange.

Definition at line 191 of file gamelog.cpp.

References GB(), OTTD, TTD, TTDP1, TTDP2, TTO, type, and version.

Field Documentation

◆ type

uint32_t LoggedChangeOldVersion::type = 0

type of savegame,

See also
SavegameType

Definition at line 115 of file gamelog_internal.h.

Referenced by FormatTo(), and LoggedChangeOldVersion().

◆ version

uint32_t LoggedChangeOldVersion::version = 0

major and minor version OR ttdp version

Definition at line 116 of file gamelog_internal.h.

Referenced by FormatTo(), and LoggedChangeOldVersion().


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