 |
Blamite Game Engine - Guerilla (Library)
00390.07.02.23.1947.blamite
The tag editor for the Blamite Game Engine.
|
Go to the documentation of this file.
8 #ifdef GUERILLA_LIB_EXPORTS
9 #define GUERILLA_LIB_API __declspec(dllexport)
11 #define GUERILLA_LIB_API __declspec(dllimport)
70 std::vector<BlamPluginField*>
fields;
72 int c_entry_count = 0;
73 int c_entry_offset = 0;
74 int max_entry_count = -1;
108 std::string
GenerateCppStructString(std::string line_prefix =
"",
bool generate_doxygen_comments =
true)
override;
109 std::string
GenerateCppStructString(std::string line_prefix =
"",
bool include_comments =
true,
bool generate_doxygen_comments =
true,
bool include_comment_descriptions =
true);
111 bool ParseXMLData(rapidxml::xml_node<>* field_node)
override;
145 bool AddEntry(
int offset = -1);
154 bool DuplicateEntry(
int index);
163 bool DeleteEntry(
int index);
168 void DeleteAllEntries();
196 std::vector<char> GetEntryDataAsBytes();
Class representing a tag field.
Definition: fields.h:261
BlamTagFieldType GetType()
Retrieves the type of this field.
Definition: BlamTagField.cpp:19
virtual BlamTagField * GenerateTagField(BlamTag *tag)
Generates a new tag field from this plugin field.
Definition: BlamPluginField.cpp:41
int entry_size
The size of a each block entry.
Definition: block.h:69
BlamTagBlockEntry * Copy()
Creates a copy of this block entry.
Definition: BlamTagBlockEntry.cpp:45
std::string GenerateCppClassString(std::string line_prefix="") override
Generates a string containing C++ code representing this plugin field.
Definition: BlamPluginField_Bitfield.cpp:54
BlamPluginField * GetField(std::string id)
Locates a field within the entry template with a specified ID.
Definition: BlamPluginField_Block.cpp:25
std::vector< BlamBitfieldBitData > bits
The list of bits within this bitfield.
Definition: bitfield.h:67
BlamPluginField * GetPluginField()
Retrieves the plugin data associated with this field, if available.
Definition: BlamTagField.cpp:29
virtual std::string GenerateXMLString()
Generates a string representing this plugin field.
Definition: BlamPluginField.cpp:61
BlamTag * GetTag()
Retrieves the tag associated with this field.
Definition: BlamTagField.cpp:24
@ Block
Indicates that the field is a tag block.
BlamPluginField * ParseField(rapidxml::xml_node<> *field_node)
Attempts to parse an XML node as a plugin field.
Definition: BlamPlugin.cpp:65
std::vector< BlamTagBlockEntry * > entries
The list of entries within this block.
Definition: block.h:128
~BlamPluginField_Block()
Definition: BlamPluginField_Block.cpp:15
std::string GenerateCppStructString(std::string line_prefix="", bool generate_doxygen_comments=true) override
Generates a string containing C++ code representing this plugin field.
Definition: BlamPluginField_Block.cpp:100
std::string GenerateCppStructString(std::string line_prefix="", bool generate_doxygen_comments=true) override
Generates a string containing C++ code representing this plugin field.
Definition: BlamPluginField_Bitfield.cpp:42
std::string default_value
The default text value for the field.
Definition: fields.h:116
std::string field_id
The ID of this field.
Definition: fields.h:272
BlamTagField * GenerateTagField(BlamTag *tag, void *address) override
Generates a new tag field from this plugin field.
Definition: BlamPluginField_Bitfield.cpp:159
std::string input_hint
An additional piece of short text that can be used to suggest valid input for a field.
Definition: fields.h:114
BlamTagFieldType GetType()
Retrieves the type of this field.
Definition: BlamPluginField.cpp:31
std::string GenerateXMLString() override
Generates a string representing this plugin field.
Definition: BlamPluginField_Bitfield.cpp:23
std::string GenerateXMLString(bool keep_unused, bool keep_invalid)
Generates a string with the field ID and value, ready to be written to an XML file.
Definition: BlamTagField_Block.cpp:133
Data structure representing a tag block entry.
Definition: block.h:17
void DeleteAllEntries()
Deletes all block entries from the field.
Definition: BlamTagField_Block.cpp:82
std::vector< char > GetEntryDataAsBytes()
Compiles the entry data into a list of bytes.
Definition: BlamTagField_Block.cpp:211
@ Bitfield16
Indicates that the field is a Bitfield16.
BlamTagFieldType
Enumerator containing all possible tag field types.
Definition: fields.h:65
int index
The bit's index.
Definition: bitfield.h:22
Class representing a block plugin field.
Definition: block.h:66
@ Comment
Indicates that the field is a comment. These do not store any tag data.
virtual std::string GenerateXMLString()
Generates a string with the field ID and value, ready to be written to an XML file.
Definition: BlamTagField.cpp:9
std::string file_path
The path to the plugin file.
Definition: tags.h:119
virtual void UpdateOffsetData(int new_offset)
Updates any offsets or lengths for the given field.
Definition: BlamPluginField.cpp:91
std::string id
The ID of the bit.
Definition: bitfield.h:20
bool DeleteEntry(int index)
Deletes a specific block entry from the field.
Definition: BlamTagField_Block.cpp:63
std::string display_name
The display name of the field.
Definition: fields.h:111
Clas representing a bitfield tag field.
Definition: bitfield.h:64
Class representing a block tag field.
Definition: block.h:125
BlamTagField * GetField(std::string field_id)
Locates a field within the entry with a specified ID.
Definition: BlamTagBlockEntry.cpp:13
Class representing a plugin field.
Definition: fields.h:101
BlamTagField_Bitfield(BlamTag *_tag, BlamTagFieldType _type)
Constructs a new bitfield tag field.
Definition: BlamTagField_Bitfield.cpp:15
Class representing a Tag.
Definition: tags.h:277
std::vector< char > GetValueAsBytes() override
Retrieves the field value as a list of bytes.
Definition: BlamTagField_Block.cpp:185
BlamPluginField(BlamPlugin *_plugin, BlamTagFieldType _type)
Constructs a new plugin field.
Definition: BlamPluginField.cpp:9
BlamTagField_Block(BlamTag *_tag)
Constructs a new block tag field.
Definition: BlamTagField_Block.cpp:3
std::string GenerateXMLString() override
Generates a string representing this plugin field.
Definition: BlamPluginField_Block.cpp:84
#define GUERILLA_LIB_API
Definition: block.h:11
BlamPluginField_Bitfield(BlamPluginField *base_field)
Constructs a new bitfield plugin field from an existing generic plugin field.
Definition: BlamPluginField_Bitfield.cpp:18
bool visible
Whether or not the field is visible.
Definition: fields.h:110
bool HasPluginField()
Checks whether the field has plugin data available.
Definition: BlamTagField.cpp:34
virtual bool ParseXMLData(rapidxml::xml_node<> *field_node)
Populates data within the plugin field from an XML node.
Definition: BlamPluginField.cpp:106
std::vector< BlamTagField * > fields
The list of fields within the entry.
Definition: block.h:21
std::string name
The display name of the bit.
Definition: bitfield.h:21
~BlamTagBlockEntry()
Definition: BlamTagBlockEntry.cpp:3
Class representing a Plugin.
Definition: tags.h:79
std::string field_id
The ID of the field.
Definition: fields.h:113
BlamTagBlockEntry * CreateNewEntry()
Creates a new block entry based on the plugin's entry template.
Definition: BlamTagField_Block.cpp:99
Clas representing a bitfield plugin field.
Definition: bitfield.h:39
void ChangeType(BlamTagFieldType new_type)
Changes the type of a plugin field.
Definition: BlamPluginField.cpp:217
bool ParseXMLData(rapidxml::xml_node<> *field_node) override
Populates data within the plugin field from an XML node.
Definition: BlamPluginField_Bitfield.cpp:88
@ Bitfield8
Indicates that the field is a Bitfield8.
int c_entry_count
The entry count. Used in tag decompilation.
Definition: block.h:72
std::vector< BlamPluginField * > fields
The list of fields within the tag block.
Definition: block.h:70
bool DuplicateEntry(int index)
Copies a specific block entry within the field.
Definition: BlamTagField_Block.cpp:42
void UpdateOffsetData(int new_offset) override
Updates any offsets or lengths for the given field.
Definition: BlamPluginField_Block.cpp:67
BlamTagField * GenerateTagField(BlamTag *tag, void *address) override
Generates a new tag field from this plugin field.
Definition: BlamPluginField_Block.cpp:237
BlamPluginField * plugin_field
The plugin data associated with this field, if any.
Definition: fields.h:271
BlamTagField(BlamTag *_tag, BlamTagFieldType _type)
Constructs a new tag field.
Definition: BlamTagField.cpp:3
#define GUERILLA_SET_BITFIELD_BIT(index)
Definition: BlamTagField_Bitfield.cpp:6
std::string description
An optional description of the field.
Definition: fields.h:112
@ Unspecified
Indicates that the field's type is not specified. Fields with this type should be considered invalid.
int c_entry_offset
The offset of the entry data. Used in tag decompilation.
Definition: block.h:73
std::vector< BlamBitfieldBitInfo > bits
The list of bits within this bitfield.
Definition: bitfield.h:42
std::string GenerateCppClassString(std::string line_prefix="") override
Generates a string containing C++ code representing this plugin field.
Definition: BlamPluginField_Block.cpp:143
BlamPlugin * GetPlugin()
Retrieves the plugin this field is associated with.
Definition: BlamPluginField.cpp:36
@ Bitfield32
Indicates that the field is a Bitfield32.
int offset
The offset of the field data.
Definition: fields.h:108
std::string name
The name of the entry.
Definition: block.h:20
#define GUERILLA_BITFIELD_DECOMPILE_SET_BITFIELD_BIT(index)
Definition: BlamPluginField_Bitfield.cpp:9
Data structure containing data for a bitfield bit.
Definition: bitfield.h:28
std::string GenerateXMLString()
Generates a string with the field ID and value, ready to be written to an XML file.
Definition: BlamTagField_Bitfield.cpp:20
virtual std::string GenerateCppClassString(std::string line_prefix="")
Generates a string containing C++ code representing this plugin field.
Definition: BlamPluginField.cpp:101
int length
The length of the field data.
Definition: fields.h:109
std::vector< char > GetValueAsBytes()
Retrieves the field value as a list of bytes.
Definition: BlamTagField_Bitfield.cpp:54
bool AddEntry(int offset=-1)
Adds a new entry to the field.
Definition: BlamTagField_Block.cpp:8
virtual std::string GenerateCppStructString(std::string line_prefix="", bool generate_doxygen_comments=true)
Generates a string containing C++ code representing this plugin field.
Definition: BlamPluginField.cpp:96
std::string GenerateXMLString() override
Generates a string with the field ID and value, ready to be written to an XML file.
Definition: BlamTagField_Block.cpp:128
virtual std::vector< char > GetValueAsBytes()
Retrieves the field value as a list of bytes.
Definition: BlamTagField.cpp:14
int max_entry_count
The maximum number of entries this block can contain.
Definition: block.h:74
BlamPluginField_Block(BlamPluginField *base_field)
Constructs a new block plugin field from an existing generic plugin field.
Definition: BlamPluginField_Block.cpp:10
bool ParseXMLData(rapidxml::xml_node<> *field_node) override
Populates data within the plugin field from an XML node.
Definition: BlamPluginField_Block.cpp:167
Data structure containing extra data for a bitfield bit.
Definition: bitfield.h:18