Elaztek Developer Hub
Blamite Game Engine - blam!  00310.02.05.21.0336.blamite
The core library for the Blamite Game Engine.
tag_reference Struct Reference

Structure representing a tag reference. More...

#include <tags.h>

Public Member Functions

 tag_reference ()
 Initializes a new tag_reference. More...
 
bool ResolveReference ()
 Attempts to resolve a tag reference. More...
 
std::string GetTagPath ()
 Retrieves the path of the tag that this tagref refers to. More...
 

Public Attributes

char identifier [8]
 The tag reference identifier. Will always be trfd followed by 4 NULL bytes. More...
 
char class_name [6]
 The tag class identifier. Will be the short class name followed by two NULL bytes. More...
 
void * tagref_address = nullptr
 The address of the tagref data. More...
 
bool data_is_tag = false
 Whether or not tagref_address points to tag data, or the tag's path. More...
 
byte padding0 = 0x00
 Empty padding. Should always be NULL. More...
 
int data_size = 0
 The size of tagref_address. More...
 

Detailed Description

Structure representing a tag reference.

Tag references allow for tags to reference other tags that are associated with them. For instance, a render_model tag might reference a shader, and shaders might reference bitmaps.

Constructor & Destructor Documentation

◆ tag_reference()

tag_reference::tag_reference ( )

Initializes a new tag_reference.

Member Function Documentation

◆ GetTagPath()

std::string tag_reference::GetTagPath ( )

Retrieves the path of the tag that this tagref refers to.

Returns
The tag path, or an empty string if the tag could not be identified.

◆ ResolveReference()

bool tag_reference::ResolveReference ( )

Attempts to resolve a tag reference.

This only needs to be performed once per tag reference.

Returns
true if the tagref was resolved successfully, otherwise returns false. If this returns false, then either the tag could not be found, or the tag class was invalid.

Member Data Documentation

◆ class_name

char tag_reference::class_name[6]

The tag class identifier. Will be the short class name followed by two NULL bytes.

◆ data_is_tag

bool tag_reference::data_is_tag = false

Whether or not tagref_address points to tag data, or the tag's path.

◆ data_size

int tag_reference::data_size = 0

The size of tagref_address.

◆ identifier

char tag_reference::identifier[8]

The tag reference identifier. Will always be trfd followed by 4 NULL bytes.

◆ padding0

byte tag_reference::padding0 = 0x00

Empty padding. Should always be NULL.

◆ tagref_address

void* tag_reference::tagref_address = nullptr

The address of the tagref data.


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