OpenTTD Source 20260711-master-g3fb3006dff
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.

Detailed Description

Container for holding some default VarType instances.

Definition at line 749 of file saveload.h.

Field Documentation

◆ BOOL

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

Store a boolean (as int8).

Definition at line 750 of file saveload.h.

◆ I16

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

Store a 16 bits signed int.

Definition at line 753 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 755 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 757 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 751 of file saveload.h.

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

◆ NAME

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

A string stored in the custom string array.

Definition at line 762 of file saveload.h.

◆ STR

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

Store string.

Definition at line 760 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 759 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 761 of file saveload.h.

◆ U16

◆ U32

◆ U64

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

Store a 64 bits unsigned int.

Definition at line 758 of file saveload.h.

Referenced by OrderBackup::GetOrderBackupDescription.

◆ U8


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