Elaztek Developer Hub
Blamite Game Engine - blam!  00346.12.11.21.0529.blamite
The core library for the Blamite Game Engine.
test_tag.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../tagclass.h"
4 #include "../fields.h"
5 
6 #ifndef BLAM
7 #define BLAM
8 #endif
9 
10 namespace Blam::Content::Tags
11 {
12  struct test_tag
13  {
14  TAG_BLOCK(block,
15  {
16  int integer;
17  data_reference dataref;
18  TAG_BLOCK(block_two,
19  {
20  int integer;
21  data_reference dataref;
22  TAG_BLOCK(block_three,
23  {
24  int integer;
25  data_reference dataref;
26  TAG_BLOCK(block_four,
27  {
28  int integer;
29  data_reference dataref;
30  TAG_BLOCK(block_five,
31  {
32  int integer;
33  data_reference dataref;
34  });
35  });
36  });
37  });
38  });
39 
41  };
42 
43  namespace Classes
44  {
46  {
47  public:
49  {
50  class_name_long = "test_tag";
51  class_name_short = "ttag";
52  version = 1;
53 
54  revisions = {
55  {1, "haloman30", "Initial implementation."},
56  };
57 
58  tag_size = sizeof(test_tag);
59 
60  fields =
61  {
62  new CommentField("test tag", "this tag class is used for testing purposes only, do not use it for actual game data"),
63  new BlockField(sizeof(test_tag::block_entry), "block", "",
64  {
65  new Int32Field("integer", ""),
66  new DataReferenceField("dataref", ""),
67  new BlockField(sizeof(test_tag::block_entry), "block two", "",
68  {
69  new Int32Field("integer", ""),
70  new DataReferenceField("dataref", ""),
71  new BlockField(sizeof(test_tag::block_entry), "block three", "",
72  {
73  new Int32Field("integer", ""),
74  new DataReferenceField("dataref", ""),
75  new BlockField(sizeof(test_tag::block_entry), "block four", "",
76  {
77  new Int32Field("integer", ""),
78  new DataReferenceField("dataref", ""),
79  new BlockField(sizeof(test_tag::block_entry), "block five", "",
80  {
81  new Int32Field("integer", ""),
82  new DataReferenceField("dataref", "")
83  }),
84  }),
85  }),
86  }),
87  }),
88  new Int32Field("another int", "")
89  };
90  }
91  };
92  }
93 }
Blam::Content::Tags
Namespace containing functions related to tag data.
Definition: bitmap.h:10
Blam::Content::Tags::test_tag
Definition: test_tag.h:12
DataReferenceField
Class representing a data reference, or dataref for short.
Definition: dataref.h:14
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::class_name_short
std::string class_name_short
The short, 4-character name of the tag class.
Definition: tagclass.h:45
BlamTagClass::version
int version
The tag class version. Should be incremented any time a tag class is modified whatsoever.
Definition: tagclass.h:46
Blam::Content::Tags::test_tag::another_int
int another_int
Definition: test_tag.h:40
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::Classes::TestTagTagClass
Definition: test_tag.h:45
Int32Field
Class representing an int32 tag field.
Definition: int.h:27
Blam::Content::Tags::test_tag::TAG_BLOCK
TAG_BLOCK(block, { int integer;data_reference dataref;TAG_BLOCK(block_two, { int integer;data_reference dataref;TAG_BLOCK(block_three, { int integer;data_reference dataref;TAG_BLOCK(block_four, { int integer;data_reference dataref;TAG_BLOCK(block_five, { int integer;data_reference dataref;});});});});})
data_reference
Structure representing a data reference.
Definition: tags.h:214
BlamTagClass::tag_size
int tag_size
The size of the tag's data. Used on loading/writing tag files.
Definition: tagclass.h:51
Blam::Content::Tags::Classes::TestTagTagClass::TestTagTagClass
TestTagTagClass()
Definition: test_tag.h:48
CommentField
Class representing a comment field.
Definition: comment.h:23
BlockField
Class representing a tag block field, also sometimes referred to as a struct or reflexive in the modd...
Definition: block.h:13
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