Elaztek Developer Hub
Blamite Game Engine - blam!  00346.12.11.21.0529.blamite
The core library for the Blamite Game Engine.
tagclass.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <vector>
5 #include <Windows.h>
6 #include <Strings/components/utils/io/io.h>
7 
11 #include "fields/BlamPluginField.h"
12 
13 #ifndef BLAM
14 #define BLAM
15 #endif
16 
24 {
25  int revision;
26  std::string author;
27  std::string description;
28 };
29 
42 {
43 public:
44  std::string class_name_long;
45  std::string class_name_short;
46  int version;
47  std::vector<BlamTagClassRevision> revisions;
48 
49  std::vector<BlamPluginField*> fields;
50 
51  int tag_size;
52 
53  void* tag_address;
54 
60  void ShowImPropertyEditor();
61 
67  void SetMemoryLocation(void* address);
68 
72  void GeneratePluginFile();
73 };
74 
75 namespace Blam::Content::Tags
76 {
80  BLAM void LoadDefaultClasses();
81 
89  BLAM BlamTagClass* GetTagClass(std::string id);
90 
96  BLAM std::vector<BlamTagClass*>* GetRegisteredTagClasses();
97 
103  BLAM void RegisterTagClass(BlamTagClass* data);
104 
110  BLAM void GenerateAllPlugins(bool require_switch);
111 }
112 
119 {
126 }
Blam::Content::Tags::RegisterTagClass
BLAM void RegisterTagClass(BlamTagClass *data)
Registers a new tag class within the engine.
Definition: tagclass.cpp:69
Blam::Content::Tags
Namespace containing functions related to tag data.
Definition: bitmap.h:10
Blam::Content::Tags::LoadDefaultClasses
BLAM void LoadDefaultClasses()
Loads all built-in tag classes available to the engine.
Definition: tagclass.cpp:108
BlamTagClass::GeneratePluginFile
void GeneratePluginFile()
Generates a plugin file from the given tag.
Definition: BlamTagClass.cpp:30
BlamTagClassRevision::description
std::string description
The description of the changes made to the tag.
Definition: tagclass.h:27
imgui.h
BlamTagClassRevision
Structure representing a tag class revision.
Definition: tagclass.h:23
Blam::Content::Tags::GetTagClass
BLAM BlamTagClass * GetTagClass(std::string id)
Retrieves a tag class that matches the given string.
Definition: tagclass.cpp:56
Blam::Content::Tags::GetRegisteredTagClasses
BLAM std::vector< BlamTagClass * > * GetRegisteredTagClasses()
Retrieves the list of all registered tag classes.
Definition: tagclass.cpp:74
BlamTagClass::revisions
std::vector< BlamTagClassRevision > revisions
List of all tag class revisions. Does not get written to tags, but is included in plugin files.
Definition: tagclass.h:47
BlamTagClass::ShowImPropertyEditor
void ShowImPropertyEditor()
Shows a series of ImGUI controls used to modify tag data with a simple UI.
Definition: BlamTagClass.cpp:8
BlamTagClass::class_name_short
std::string class_name_short
The short, 4-character name of the tag class.
Definition: tagclass.h:45
BLAM
#define BLAM
Definition: tagclass.h:14
BlamTagClass::version
int version
The tag class version. Should be incremented any time a tag class is modified whatsoever.
Definition: tagclass.h:46
BlamTagClass::tag_address
void * tag_address
The memory address of a tag. Used when a tag class is used in the context of a tag.
Definition: tagclass.h:53
BlamTagClass::class_name_long
std::string class_name_long
The longer class name. Typically shown alongside short name for user-friendliness.
Definition: tagclass.h:44
Blam::Content::Tags::GenerateAllPlugins
BLAM void GenerateAllPlugins(bool require_switch)
Instructs the engine to generate Assembly/Guerilla plugins at startup.
Definition: tagclass.cpp:79
engine_definitions.h
BlamTagClassRevision::revision
int revision
The revision number.
Definition: tagclass.h:25
BlamTagClassOLD
Legacy namespace for tag class data.
Definition: tagclass.h:118
BlamTagClass::tag_size
int tag_size
The size of the tag's data. Used on loading/writing tag files.
Definition: tagclass.h:51
BlamPluginField.h
config.h
BlamTagClass::SetMemoryLocation
void SetMemoryLocation(void *address)
Sets the address and size of the tag that this class should be applied to.
Definition: BlamTagClass.cpp:16
BlamTagClassRevision::author
std::string author
The author of the tag revision.
Definition: tagclass.h:26
BlamTagClass
Class representing a tag class.
Definition: tagclass.h:41
BlamTagClass::fields
std::vector< BlamPluginField * > fields
A series of tag fields that store the layout of the tag.
Definition: tagclass.h:49
BlamTagClassOLD::scenario_structure_bsp
BLAM void scenario_structure_bsp()
Legacy function made before I had any idea what I was doing.
Definition: tagclass.cpp:21