Elaztek Developer Hub
Blamite Game Engine - blam!  00368.02.12.23.1347.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>
8 
9 #ifndef BLAM
10 #define BLAM
11 #endif
12 
13 #ifdef BLAM_EXPORTS
14 #define BLAM_EXT_API __declspec(dllexport)
15 #else
16 #define BLAM_EXT_API __declspec(dllimport)
17 #endif
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<BlamPluginField*> 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 
77 namespace Blam::Content::Tags
78 {
82  BLAM void LoadDefaultClasses();
83 
91  BLAM_EXT_API BlamTagClass* GetTagClass(std::string id);
92 
98  BLAM_EXT_API std::vector<BlamTagClass*>* GetRegisteredTagClasses();
99 
105  BLAM void RegisterTagClass(BlamTagClass* data);
106 
112  BLAM void GenerateAllPlugins(bool require_switch);
113 }
114 
121 {
128 }
Blam::Content::Tags::RegisterTagClass
BLAM void RegisterTagClass(BlamTagClass *data)
Registers a new tag class within the engine.
Definition: tagclass.cpp:77
Blam::Content::Tags
Namespace containing functions related to tag data.
Definition: bitmap.h:151
Blam::Content::Tags::LoadDefaultClasses
BLAM void LoadDefaultClasses()
Loads all built-in tag classes available to the engine.
Definition: tagclass.cpp:116
BlamTagClassRevision::description
std::string description
The description of the changes made to the tag.
Definition: tagclass.h:29
BlamTagClassRevision
Structure representing a tag class revision.
Definition: tagclass.h:25
Blam::Content::Tags::GetTagClass
BLAM_EXT_API BlamTagClass * GetTagClass(std::string id)
Retrieves a tag class that matches the given string.
Definition: tagclass.cpp:64
BLAM_EXT_API
#define BLAM_EXT_API
Definition: tagclass.h:16
Blam::Content::Tags::GetRegisteredTagClasses
BLAM_EXT_API std::vector< BlamTagClass * > * GetRegisteredTagClasses()
Retrieves the list of all registered tag classes.
Definition: tagclass.cpp:82
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
BlamTagClass::class_name_short
std::string class_name_short
The short, 4-character name of the tag class.
Definition: tagclass.h:47
BLAM
#define BLAM
Definition: tagclass.h:10
BlamTagClass::version
int version
The tag class version. Should be incremented any time a tag class is modified whatsoever.
Definition: tagclass.h:48
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
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::GenerateAllPlugins
BLAM void GenerateAllPlugins(bool require_switch)
Instructs the engine to generate Assembly/Guerilla plugins at startup.
Definition: tagclass.cpp:87
BlamTagClassRevision::revision
int revision
The revision number.
Definition: tagclass.h:27
BlamTagClassOLD
Legacy namespace for tag class data.
Definition: tagclass.h:120
BlamTagClass::tag_size
int tag_size
The size of the tag's data. Used on loading/writing tag files.
Definition: tagclass.h:53
BlamPluginField.h
Blam::Content::Tags::ShowImPropertyEditor
BLAM void ShowImPropertyEditor(void *tag, std::string tag_class)
Shows an ImGUI editor for a given tag.
Definition: tags.cpp:17
BlamTagClassRevision::author
std::string author
The author of the tag revision.
Definition: tagclass.h:28
BlamTagClass
Class representing a tag class.
Definition: tagclass.h:43
BlamTagClass::fields
std::vector< BlamPluginField * > 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:29