Blamite Game Engine - blam!  00296.01.12.21.0102.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 
10 #include "components/3rdparty/imgui/imgui.h"
11 #include "fields.h"
12 
13 #ifndef BLAM
14 #define BLAM
15 #endif
16 
17 namespace Blam::Content::Tags
18 {
26  {
27  int revision;
28  std::string author;
29  std::string description;
30  };
31 
44  {
45  public:
46  std::string class_name_long;
47  std::string class_name_short;
48  int version;
49  std::vector<BlamTagClassRevision> revisions;
50 
51  std::vector<TagField*> fields;
52 
53  int tag_size;
54 
55  void* tag_address;
56 
62  void ShowImPropertyEditor();
63 
69  void SetMemoryLocation(void* address);
70 
74  void GeneratePluginFile();
75  };
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 
117 {
124 }
Blam::Content::Tags::RegisterTagClass
BLAM void RegisterTagClass(BlamTagClass *data)
Registers a new tag class within the engine.
Definition: tagclass.cpp:67
Blam::Content::Tags
Namespace containing things related to tag data.
Definition: bitmap.h:9
Blam::Content::Tags::LoadDefaultClasses
BLAM void LoadDefaultClasses()
Loads all built-in tag classes available to the engine.
Definition: tagclass.cpp:106
Blam::Content::Tags::BlamTagClassRevision
Structure representing a tag class revision.
Definition: tagclass.h:25
Blam::Content::Tags::BlamTagClass::tag_size
int tag_size
The size of the tag's data. Used on loading/writing tag files.
Definition: tagclass.h:53
Blam::Content::Tags::GetTagClass
BLAM BlamTagClass * GetTagClass(std::string id)
Retrieves a tag class that matches the given string.
Definition: tagclass.cpp:54
Blam::Content::Tags::BlamTagClass::ShowImPropertyEditor
void ShowImPropertyEditor()
Shows a series of ImGUI controls used to modify tag data with a simple UI.
Definition: BlamTagClass.cpp:5
Blam::Content::Tags::BlamTagClass
Class representing a tag class.
Definition: tagclass.h:43
Blam::Content::Tags::GetRegisteredTagClasses
BLAM std::vector< BlamTagClass * > * GetRegisteredTagClasses()
Retrieves the list of all registered tag classes.
Definition: tagclass.cpp:72
Blam::Content::Tags::BlamTagClass::class_name_short
std::string class_name_short
The short, 4-character name of the tag class.
Definition: tagclass.h:47
Blam::Content::Tags::GenerateAllPlugins
BLAM void GenerateAllPlugins(bool require_switch)
Instructs the engine to generate Assembly/Guerilla plugins at startup.
Definition: tagclass.cpp:77
engine_definitions.h
Blam::Content::Tags::BlamTagClass::GeneratePluginFile
void GeneratePluginFile()
Generates a plugin file from the given tag.
Definition: BlamTagClass.cpp:27
Blam::Content::Tags::BlamTagClassRevision::revision
int revision
The revision number.
Definition: tagclass.h:27
fields.h
BlamTagClassOLD
Legacy namespace for tag class data.
Definition: tagclass.h:116
BLAM
#define BLAM
Definition: discord_rpc.h:8
Blam::Content::Tags::BlamTagClass::version
int version
The tag class version. Should be incremented any time a tag class is modified whatsoever.
Definition: tagclass.h:48
config.h
Blam::Content::Tags::BlamTagClassRevision::description
std::string description
The description of the changes made to the tag.
Definition: tagclass.h:29
Blam::Content::Tags::BlamTagClass::SetMemoryLocation
void SetMemoryLocation(void *address)
Sets the address and size of the tag that this class should be applied to.
Definition: BlamTagClass.cpp:13
Blam::Content::Tags::BlamTagClass::class_name_long
std::string class_name_long
The longer class name. Typically shown alongside short name for user-friendliness.
Definition: tagclass.h:46
Blam::Content::Tags::BlamTagClassRevision::author
std::string author
The author of the tag revision.
Definition: tagclass.h:28
Blam::Content::Tags::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:49
Blam::Content::Tags::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:55
Blam::Content::Tags::BlamTagClass::fields
std::vector< TagField * > fields
A series of tag fields that store the layout of the tag.
Definition: tagclass.h:51
BlamTagClassOLD::scenario_structure_bsp
BLAM void scenario_structure_bsp()
Legacy function made before I had any idea what I was doing.
Definition: tagclass.cpp:19