OpenTTD Source 20250518-master-g9bbc525e53
TextRefStack Struct Reference

Public Member Functions

 TextRefStack (const GRFFile *grffile, std::span< const int32_t > textstack)
 
uint8_t PopUnsignedByte ()
 
int8_t PopSignedByte ()
 
uint16_t PopUnsignedWord ()
 
int16_t PopSignedWord ()
 
uint32_t PopUnsignedDWord ()
 
int32_t PopSignedDWord ()
 
uint64_t PopUnsignedQWord ()
 
int64_t PopSignedQWord ()
 
void RotateTop4Words ()
 Rotate the top four words down: W1, W2, W3, W4 -> W4, W1, W2, W3.
 
void PushByte (uint8_t b)
 
void PushWord (uint16_t w)
 
void PushDWord (uint32_t dw)
 

Data Fields

const GRFFilegrffile = nullptr
 

Private Attributes

std::vector< uint8_t > stack
 

Detailed Description

Definition at line 679 of file newgrf_text.cpp.

Constructor & Destructor Documentation

◆ TextRefStack()

TextRefStack::TextRefStack ( const GRFFile grffile,
std::span< const int32_t >  textstack 
)
inline

Definition at line 685 of file newgrf_text.cpp.

Member Function Documentation

◆ PopSignedByte()

int8_t TextRefStack::PopSignedByte ( )
inline

Definition at line 700 of file newgrf_text.cpp.

◆ PopSignedDWord()

int32_t TextRefStack::PopSignedDWord ( )
inline

Definition at line 714 of file newgrf_text.cpp.

◆ PopSignedQWord()

int64_t TextRefStack::PopSignedQWord ( )
inline

Definition at line 721 of file newgrf_text.cpp.

◆ PopSignedWord()

int16_t TextRefStack::PopSignedWord ( )
inline

Definition at line 707 of file newgrf_text.cpp.

◆ PopUnsignedByte()

uint8_t TextRefStack::PopUnsignedByte ( )
inline

Definition at line 693 of file newgrf_text.cpp.

◆ PopUnsignedDWord()

uint32_t TextRefStack::PopUnsignedDWord ( )
inline

Definition at line 709 of file newgrf_text.cpp.

◆ PopUnsignedQWord()

uint64_t TextRefStack::PopUnsignedQWord ( )
inline

Definition at line 716 of file newgrf_text.cpp.

◆ PopUnsignedWord()

uint16_t TextRefStack::PopUnsignedWord ( )
inline

Definition at line 702 of file newgrf_text.cpp.

◆ PushByte()

void TextRefStack::PushByte ( uint8_t  b)
inline

Definition at line 736 of file newgrf_text.cpp.

◆ PushDWord()

void TextRefStack::PushDWord ( uint32_t  dw)
inline

Definition at line 747 of file newgrf_text.cpp.

◆ PushWord()

void TextRefStack::PushWord ( uint16_t  w)
inline

Definition at line 741 of file newgrf_text.cpp.

◆ RotateTop4Words()

void TextRefStack::RotateTop4Words ( )
inline

Rotate the top four words down: W1, W2, W3, W4 -> W4, W1, W2, W3.

Definition at line 724 of file newgrf_text.cpp.

Referenced by ProcessNewGRFStringControlCode().

Field Documentation

◆ grffile

const GRFFile* TextRefStack::grffile = nullptr

Definition at line 683 of file newgrf_text.cpp.

◆ stack

std::vector<uint8_t> TextRefStack::stack
private

Definition at line 681 of file newgrf_text.cpp.


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