Elaztek Developer Hub
Blamite Game Engine - blam!  00388.06.24.23.2301.blamite
The core library for the Blamite Game Engine.
color_table.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 #include <Strings/components/resources/color/BlamColor.h>
7 
8 #ifndef BLAM
9 #define BLAM
10 #endif
11 
12 namespace Blam::Content::Tags
13 {
14 #pragma pack(push, 1)
15 
20  struct color_table
21  {
22  TAG_BLOCK(colors,
23  {
24  ascii name;
25  BlamColor color;
26  });
27  };
28 #pragma pack(pop)
29 
30  namespace Classes
31  {
36  {
37  public:
39  {
40  class_name_long = "color_table";
41  class_name_short = "colo";
42  version = 1;
43 
44  revisions = {
45  {1, "haloman30", "Initial implementation."},
46  {2, "haloman30", "Change color type D2D1_COLOR_F to BlamColor"}
47  };
48 
49  tag_size = sizeof(color_table);
50 
51  fields =
52  {
53  new BlockField(sizeof(color_table::colors_entry), "colors", "",
54  {
55  new AsciiField("name", "the name of the color, used for retrieval later on"),
56  new ColorField("color", "the color information")
57  })
58  };
59  }
60  };
61  }
62 
63  BLAM color_table* GetColorTableTag(std::string tag_path);
64 }
Blam::Content::Tags
Namespace containing functions related to tag data.
Definition: bitmap.h:151
Blam::Content::Tags::color_table
Structure representing a Color Table tag.
Definition: color_table.h:20
AsciiField
Class representing an ascii tag field.
Definition: ascii.h:18
ascii
char ascii[128]
Typedef for an ascii field, used in tag data definitions.
Definition: tags.h:337
Blam::Content::Tags::Classes::ColorTableTagClass::ColorTableTagClass
ColorTableTagClass()
Definition: color_table.h:38
BlamTagClass::fields
std::vector< BlamTagClassField * > fields
A series of tag fields that store the layout of the tag.
Definition: tags.h:94
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:92
BlamTagClass::class_name_short
std::string class_name_short
The short, 4-character name of the tag class.
Definition: tags.h:90
BlamTagClass::version
int version
The tag class version. Should be incremented any time a tag class is modified whatsoever.
Definition: tags.h:91
BlamTagClass::class_name_long
std::string class_name_long
The longer class name. Typically shown alongside short name for user-friendliness.
Definition: tags.h:89
Blam::Content::Tags::GetTagData
BLAM BlamTagData * GetTagData(std::string tag_path)
Retrieves information for a given tag.
Definition: tags.cpp:80
fields.h
BLAM
#define BLAM
Definition: color_table.h:9
color_table.h
BlamTagClass::tag_size
int tag_size
The size of the tag's data. Used on loading/writing tag files.
Definition: tags.h:96
ColorField
Class representing a color tag field.
Definition: color.h:19
BlamTagData::address
void * address
The address pointing to the start of the tag's data.
Definition: tags.h:33
tagclass.h
BlamTagData
Class used to contain and access tag data.
Definition: tags.h:30
Blam::Content::Tags::GetColorTableTag
BLAM color_table * GetColorTableTag(std::string tag_path)
Definition: color_table.cpp:5
BlockField
Class representing a tag block field, also sometimes referred to as a struct or reflexive in the modd...
Definition: block.h:21
Blam::Content::Tags::Classes::ColorTableTagClass
Tag class information for Color Table tags.
Definition: color_table.h:35
BlamTagClass
Class representing a tag class.
Definition: tags.h:86
Blam::Content::Tags::color_table::TAG_BLOCK
TAG_BLOCK(colors, { ascii name;BlamColor color;})