OpenTTD Source 20260721-master-g25ec12c62d
VarTypes Struct Reference

Container for holding some default VarType instances. More...

#include <saveload.h>

Static Public Attributes

static constexpr VarType BOOL { VarFileType::I8, VarMemType::Bool }
 Store a boolean (as int8).
static constexpr VarType I8 { VarFileType::I8, VarMemType::I8 }
 Store a 8 bits signed int.
static constexpr VarType U8 { VarFileType::U8, VarMemType::U8 }
 Store a 8 bits unsigned int.
static constexpr VarType I16 { VarFileType::I16, VarMemType::I16 }
 Store a 16 bits signed int.
static constexpr VarType U16 { VarFileType::U16, VarMemType::U16 }
 Store a 16 bits unsigned int.
static constexpr VarType I32 { VarFileType::I32, VarMemType::I32 }
 Store a 32 bits signed int.
static constexpr VarType U32 { VarFileType::U32, VarMemType::U32 }
 Store a 32 bits unsigned int.
static constexpr VarType I64 { VarFileType::I64, VarMemType::I64 }
 Store a 64 bits signed int.
static constexpr VarType U64 { VarFileType::U64, VarMemType::U64 }
 Store a 64 bits unsigned int.
static constexpr VarType STRINGID { VarFileType::StringID, VarMemType::U32 }
 Store a StringID.
static constexpr VarType STR { VarFileType::String, VarMemType::Str }
 Store string.
static constexpr VarType STRQ { VarFileType::String, VarMemType::StrQ }
 Store a string with quotes.
static constexpr VarType NAME { VarFileType::StringID, VarMemType::Name }
 A string stored in the custom string array.
static constexpr VarType LABEL_REVERSE { VarFileType::U32, VarMemType::LabelReverse }
 Store a Label in reverse.
static constexpr VarType LABEL_FORWARD { VarFileType::U32, VarMemType::LabelForward }
 Store a Label as-is.

Detailed Description

Container for holding some default VarType instances.

Definition at line 724 of file saveload.h.

Field Documentation

◆ BOOL

VarType VarTypes::BOOL { VarFileType::I8, VarMemType::Bool }
staticconstexpr

Store a boolean (as int8).

Definition at line 725 of file saveload.h.

◆ I16

VarType VarTypes::I16 { VarFileType::I16, VarMemType::I16 }
staticconstexpr

Store a 16 bits signed int.

Definition at line 728 of file saveload.h.

Referenced by CargoPacket::GetCargoPacketDesc, and SlCopyInternal().

◆ I32

VarType VarTypes::I32 { VarFileType::I32, VarMemType::I32 }
staticconstexpr

Store a 32 bits signed int.

Definition at line 730 of file saveload.h.

Referenced by LinkGraph::GetLinkGraphDesc, LinkGraph::GetLinkGraphJobDesc, OrderBackup::GetOrderBackupDescription, and SlCopyInternal().

◆ I64

VarType VarTypes::I64 { VarFileType::I64, VarMemType::I64 }
staticconstexpr

Store a 64 bits signed int.

Definition at line 732 of file saveload.h.

Referenced by CargoPacket::GetCargoPacketDesc, ScriptInstance::LoadObjects(), and ScriptInstance::SaveObject().

◆ I8

VarType VarTypes::I8 { VarFileType::I8, VarMemType::I8 }
staticconstexpr

Store a 8 bits signed int.

Definition at line 726 of file saveload.h.

Referenced by ScriptInstance::LoadObjects(), ScriptInstance::SaveObject(), and SlCopyInternal().

◆ LABEL_FORWARD

VarType VarTypes::LABEL_FORWARD { VarFileType::U32, VarMemType::LabelForward }
staticconstexpr

Store a Label as-is.

Definition at line 739 of file saveload.h.

Referenced by SlSaveLoadConv().

◆ LABEL_REVERSE

VarType VarTypes::LABEL_REVERSE { VarFileType::U32, VarMemType::LabelReverse }
staticconstexpr

Store a Label in reverse.

Definition at line 738 of file saveload.h.

Referenced by SlSaveLoadConv().

◆ NAME

VarType VarTypes::NAME { VarFileType::StringID, VarMemType::Name }
staticconstexpr

A string stored in the custom string array.

Definition at line 737 of file saveload.h.

◆ STR

VarType VarTypes::STR { VarFileType::String, VarMemType::Str }
staticconstexpr

Store string.

Definition at line 735 of file saveload.h.

Referenced by OrderBackup::GetOrderBackupDescription, and SlTableHeader().

◆ STRINGID

VarType VarTypes::STRINGID { VarFileType::StringID, VarMemType::U32 }
staticconstexpr

Store a StringID.

Definition at line 734 of file saveload.h.

Referenced by ENGSChunkHandler::Load(), and SlCopyInternal().

◆ STRQ

VarType VarTypes::STRQ { VarFileType::String, VarMemType::StrQ }
staticconstexpr

Store a string with quotes.

Definition at line 736 of file saveload.h.

◆ U16

◆ U32

◆ U64

VarType VarTypes::U64 { VarFileType::U64, VarMemType::U64 }
staticconstexpr

Store a 64 bits unsigned int.

Definition at line 733 of file saveload.h.

Referenced by OrderBackup::GetOrderBackupDescription.

◆ U8


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