Elaztek Developer Hub
Blamite Game Engine - blam!  00346.12.11.21.0529.blamite
The core library for the Blamite Game Engine.
BlamPluginField Class Reference

Base class representing a plugin field. More...

#include <BlamPluginField.h>

+ Inheritance diagram for BlamPluginField:

Public Member Functions

 BlamPluginField (BlamPluginFieldType _type, std::string _display_name, std::string _extra_info)
 
virtual void ShowImPropertyControl ()
 Shows a set of ImGUI controls representing the tag field. More...
 
virtual void SetMemoryLocation (void *new_address)
 Sets the address of the data that the plugin field should display. More...
 
virtual std::string GetFieldXMLString (int offset)
 Generates a string representing an XML node associated with this tag field, used for generating plugin files. More...
 

Public Attributes

std::string display_name
 The display name of the tag field. More...
 
std::string extra_info
 Additional information to show alongside the field. More...
 
void * read_address
 The address of the data the field is currently representing. More...
 
int read_length
 How many bytes to read from the start of the address. More...
 
BlamPluginFieldType type
 The type of the field. More...
 

Detailed Description

Base class representing a plugin field.

Plugin fields are used to store information about a tag's layout. This layout can be used to generate an XML file for use with Guerilla and other tools, as well as generate an in-engine tag editor using ImGUI.

In addition to being used to store layout information, they can also contain non-data information, such as a display name, additional information, and potentially other information depending on the specific field type.

Note
When building a list of plugin fields, the list MUST EXACTLY MATCH the data structure being represented. Plugin fields are built expecting a specific size and length. If it runs into something it doesn't expect, it won't know how to handle it. This can cause anything from some data not being represented, to data displaying out of order, to overflows and crashes.

Constructor & Destructor Documentation

◆ BlamPluginField()

BlamPluginField::BlamPluginField ( BlamPluginFieldType  _type,
std::string  _display_name,
std::string  _extra_info 
)

Member Function Documentation

◆ GetFieldXMLString()

std::string BlamPluginField::GetFieldXMLString ( int  offset)
virtual

Generates a string representing an XML node associated with this tag field, used for generating plugin files.

If this function is not overridden in the child class, the resulting string describes an unknown tag field.

Parameters
offset- The offset of this field relative to either the start of the tag data, or relative to the start of tag block entry data.
Returns
A string representation of the field, ready to be written to an XML file.

Reimplemented in CommentField, BlockField, TagReferenceField, EnumField, DataReferenceField, BooleanField, ColorField, AsciiField, BitfieldField, and IntField.

◆ SetMemoryLocation()

void BlamPluginField::SetMemoryLocation ( void *  new_address)
virtual

Sets the address of the data that the plugin field should display.

Parameters
new_address- The address of the field data.

Reimplemented in BlockField.

◆ ShowImPropertyControl()

void BlamPluginField::ShowImPropertyControl ( )
virtual

Shows a set of ImGUI controls representing the tag field.

If this function is not overridden in the child class, a warning message is displayed instead.

Reimplemented in CommentField, BlockField, TagReferenceField, DataReferenceField, EnumField, BooleanField, ColorField, AsciiField, BitfieldField, and IntField.

Member Data Documentation

◆ display_name

std::string BlamPluginField::display_name

The display name of the tag field.

◆ extra_info

std::string BlamPluginField::extra_info

Additional information to show alongside the field.

◆ read_address

void* BlamPluginField::read_address

The address of the data the field is currently representing.

◆ read_length

int BlamPluginField::read_length

How many bytes to read from the start of the address.

◆ type

BlamPluginFieldType BlamPluginField::type

The type of the field.


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