OpenTTD Source 20260206-master-g4d4e37dbf1
LoggedChangeGRFMoved Struct Reference
Inheritance diagram for LoggedChangeGRFMoved:
LoggedChange

Public Member Functions

 LoggedChangeGRFMoved (uint32_t grfid, int32_t offset)
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=GLCT_NONE)

Data Fields

uint32_t grfid = 0
 ID of moved GRF.
int32_t offset = 0
 offset, positive = move down
Data Fields inherited from LoggedChange
GamelogChangeType ct {}

Detailed Description

Definition at line 111 of file gamelog_internal.h.

Constructor & Destructor Documentation

◆ LoggedChangeGRFMoved() [1/2]

LoggedChangeGRFMoved::LoggedChangeGRFMoved ( )
inline

Definition at line 112 of file gamelog_internal.h.

◆ LoggedChangeGRFMoved() [2/2]

LoggedChangeGRFMoved::LoggedChangeGRFMoved ( uint32_t grfid,
int32_t offset )
inline

Definition at line 113 of file gamelog_internal.h.

Member Function Documentation

◆ FormatTo()

void LoggedChangeGRFMoved::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 281 of file gamelog.cpp.

References abs(), AddGrfInfo(), grfid, and offset.

Field Documentation

◆ grfid

uint32_t LoggedChangeGRFMoved::grfid = 0

ID of moved GRF.

Definition at line 117 of file gamelog_internal.h.

Referenced by FormatTo().

◆ offset

int32_t LoggedChangeGRFMoved::offset = 0

offset, positive = move down

Definition at line 118 of file gamelog_internal.h.

Referenced by FormatTo().


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