Elaztek Developer Hub
Blamite Game Engine - blam!  00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
object.h
Go to the documentation of this file.
1 // object [obje] - Tag Definition //
3 // -------- //
4 // Author: haloman30 //
5 // Revision: 1 //
6 // -------- //
7 // Part of the Blamite Game Engine //
8 // Copyright (c) Elaztek Studios 2013 - 2023 //
10 
11 
12 #pragma once
13 
14 #include <string>
15 #include <blam/api/v1/types/tags.h>
17 
18 #ifndef BLAM
19 #define BLAM
20 #endif
21 
22 #define tag_obje "obje"
23 
24 
25 
26 #pragma pack(push, 1)
27 struct object
28 {
30  {
31  bool unused0 : 1;
32  bool unused1 : 1;
33  bool unused2 : 1;
34  bool unused3 : 1;
35  bool unused4 : 1;
36  bool unused5 : 1;
37  bool unused6 : 1;
38  bool unused7 : 1;
39  bool unused8 : 1;
40  bool unused9 : 1;
41  bool unused10 : 1;
42  bool unused11 : 1;
43  bool unused12 : 1;
44  bool unused13 : 1;
45  bool unused14 : 1;
46  bool unused15 : 1;
47  bool unused16 : 1;
48  bool unused17 : 1;
49  bool unused18 : 1;
50  bool unused19 : 1;
51  bool unused20 : 1;
52  bool unused21 : 1;
53  bool unused22 : 1;
54  bool unused23 : 1;
55  bool unused24 : 1;
56  bool unused25 : 1;
57  bool unused26 : 1;
58  bool unused27 : 1;
59  bool unused28 : 1;
60  bool unused29 : 1;
61  bool unused30 : 1;
62  bool unused31 : 1;
63  };
64 
67  TAG_BLOCK(attachments,
68  {
69  tag_reference type;
70  data_reference marker;
71  });
72 };
73 #pragma pack(pop)
74 
76 {
77 public:
79  {
80  class_name_long = "object";
81  class_name_short = "obje";
82  version = 1;
83 
84  revisions = {
85  {1, "haloman30", "Initial implementation"},
86 
87  };
88 
89  tag_size = 68;
90 
91  fields =
92  {
93  new CommentField("OBJECT",
94  ""),
95  new Bitfield32Field("flags", "",
96  {
97  }),
98  new TagReferenceField("model", "", { "hlmt"}),
99  new BlockField(64, "attachments", "",
100  {
101  new TagReferenceField("type", "", { }),
102  new DataReferenceField("marker", ""),
103  }),
104 
105  };
106  }
107 };
108 
109 namespace Blam::Content::Tags
110 {
111  BLAM object* GetObjectTag(std::string tag_path);
112 }
object::bitfield32_flags::unused22
bool unused22
Definition: object.h:53
object
Definition: object.h:27
object::bitfield32_flags::unused3
bool unused3
Definition: object.h:34
Blam::Content::Tags
Namespace containing functions related to tag data.
Definition: bitmap.h:181
object::bitfield32_flags::unused12
bool unused12
Definition: object.h:43
object::flags
bitfield32_flags flags
Bitfield data for flags. See #bitfield32_flags for details.
Definition: object.h:65
object::bitfield32_flags::unused6
bool unused6
Definition: object.h:37
object::bitfield32_flags::unused17
bool unused17
Definition: object.h:48
object::bitfield32_flags::unused2
bool unused2
Definition: object.h:33
DataReferenceField
Class representing a data reference, or dataref for short.
Definition: dataref.h:19
object::bitfield32_flags
Definition: object.h:29
object::bitfield32_flags::unused14
bool unused14
Definition: object.h:45
object::bitfield32_flags::unused16
bool unused16
Definition: object.h:47
object::bitfield32_flags::unused28
bool unused28
Definition: object.h:59
Blam::Content::Tags::GetObjectTag
BLAM object * GetObjectTag(std::string tag_path)
Definition: object.cpp:16
TagReferenceField
Class representing a tag reference, or tagref for short.
Definition: tagref.h:20
Blam::API::v1::Tags::GetTagData
BLAM_EXT_API BlamTagData * GetTagData(std::string tag_path)
Retrieves information for a given tag.
Definition: api.cpp:208
BlamTagClass::fields
std::vector< BlamTagClassField * > fields
A series of tag fields that store the layout of the tag.
Definition: tags.h:209
object::bitfield32_flags::unused19
bool unused19
Definition: object.h:50
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: tags.h:208
plugins.h
BlamTagClass::class_name_short
std::string class_name_short
The short, 4-character name of the tag class.
Definition: tags.h:206
object::bitfield32_flags::unused29
bool unused29
Definition: object.h:60
BlamTagClass::version
int version
The tag class version. Should be incremented any time a tag class is modified whatsoever.
Definition: tags.h:207
object::bitfield32_flags::unused4
bool unused4
Definition: object.h:35
object::bitfield32_flags::unused20
bool unused20
Definition: object.h:51
tag_reference
Structure representing a tag reference.
Definition: tags.h:289
Bitfield32Field
Class representing a bitfield32 tag field.
Definition: bitfield.h:55
BlamTagClass::class_name_long
std::string class_name_long
The longer class name. Typically shown alongside short name for user-friendliness.
Definition: tags.h:205
object::bitfield32_flags::unused0
bool unused0
Definition: object.h:31
object::bitfield32_flags::unused8
bool unused8
Definition: object.h:39
object::bitfield32_flags::unused27
bool unused27
Definition: object.h:58
object::bitfield32_flags::unused18
bool unused18
Definition: object.h:49
object::bitfield32_flags::unused1
bool unused1
Definition: object.h:32
object::bitfield32_flags::unused25
bool unused25
Definition: object.h:56
object::bitfield32_flags::unused31
bool unused31
Definition: object.h:62
object::bitfield32_flags::unused23
bool unused23
Definition: object.h:54
ObjectTagClass::ObjectTagClass
ObjectTagClass()
Definition: object.h:78
data_reference
Structure representing a data reference.
Definition: tags.h:342
tag_obje
#define tag_obje
Definition: object.h:22
object::bitfield32_flags::unused10
bool unused10
Definition: object.h:41
BlamTagClass::tag_size
int tag_size
The size of the tag's data. Used on loading/writing tag files.
Definition: tags.h:210
object::bitfield32_flags::unused24
bool unused24
Definition: object.h:55
object::bitfield32_flags::unused5
bool unused5
Definition: object.h:36
BlamTagData::address
void * address
The address pointing to the start of the tag's data.
Definition: tags.h:132
object::bitfield32_flags::unused11
bool unused11
Definition: object.h:42
BLAM
#define BLAM
Definition: object.h:19
object::TAG_BLOCK
TAG_BLOCK(attachments, { tag_reference type;data_reference marker;})
tags.h
BlamTagData
Class used to contain and access tag data.
Definition: tags.h:125
object::bitfield32_flags::unused7
bool unused7
Definition: object.h:38
CommentField
Class representing a comment field.
Definition: comment.h:29
object::bitfield32_flags::unused21
bool unused21
Definition: object.h:52
BlockField
Class representing a tag block field, also sometimes referred to as a struct or reflexive in the modd...
Definition: block.h:19
object::bitfield32_flags::unused30
bool unused30
Definition: object.h:61
object::bitfield32_flags::unused9
bool unused9
Definition: object.h:40
object::bitfield32_flags::unused13
bool unused13
Definition: object.h:44
object::bitfield32_flags::unused15
bool unused15
Definition: object.h:46
BlamTagClass
Class representing a tag class.
Definition: tags.h:202
ObjectTagClass
Definition: object.h:75
object.h
object::model
tag_reference model
Definition: object.h:66
object::bitfield32_flags::unused26
bool unused26
Definition: object.h:57
api.h
BlamTagData::tag_class
std::string tag_class
The tag's short class name.
Definition: tags.h:146