|
OpenTTD Source 20260704-master-gbf70c61fb8
|
Container/wrapper for the file type that is used in tables in the save game. More...
Public Member Functions | |
| SavegameFileType () | |
| Create an end-of-table marker. | |
| SavegameFileType (VarFileType file_type, bool has_field_length=false) | |
| Create the type. | |
| constexpr bool | IsEnd () const |
| Is this the end-of-table marker? | |
| constexpr bool | HasFieldLength () const |
| Does this field have a length? | |
| constexpr VarFileType | Type () const |
Get the VarType for this field. | |
Data Fields | |
| uint8_t | storage {} |
| Actual storage of the file type. | |
Static Public Attributes | |
| static constexpr uint8_t | HAS_FIELD_LENGTH_BIT = 4 |
| Set this bit to denote the type has a field length. | |
Container/wrapper for the file type that is used in tables in the save game.
This is essentially VarFileType, but with a bit denoting that the type has a field length and a value denoting end-of-table.
Definition at line 575 of file saveload.cpp.
|
inline |
Create an end-of-table marker.
Definition at line 580 of file saveload.cpp.
|
inline |
Create the type.
| file_type | The file type. |
| has_field_length | Does this field have a length? |
Definition at line 587 of file saveload.cpp.
References AssignBit(), HAS_FIELD_LENGTH_BIT, IsInsideMM(), storage, and to_underlying().
|
inlineconstexpr |
Does this field have a length?
true iff this field has a length. Definition at line 604 of file saveload.cpp.
References HAS_FIELD_LENGTH_BIT, HasBit(), and IsEnd().
Referenced by SlTableHeader().
|
inlineconstexpr |
Is this the end-of-table marker?
true iff this is an end-of-table marker. Definition at line 598 of file saveload.cpp.
References storage.
Referenced by HasFieldLength(), SlTableHeader(), and Type().
|
inlineconstexpr |
Get the VarType for this field.
VarType. Definition at line 614 of file saveload.cpp.
References GB(), HAS_FIELD_LENGTH_BIT, IsEnd(), and storage.
Referenced by SlTableHeader().
|
staticconstexpr |
Set this bit to denote the type has a field length.
Definition at line 576 of file saveload.cpp.
Referenced by HasFieldLength(), SavegameFileType(), and Type().
| uint8_t SavegameFileType::storage {} |
Actual storage of the file type.
Definition at line 577 of file saveload.cpp.
Referenced by IsEnd(), SavegameFileType(), SlTableHeader(), and Type().