Elaztek Developer Hub
Blamite Game Engine - blam!  00315.05.27.21.0015.blamite
The core library for the Blamite Game Engine.
color_table.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../tagclass.h"
4 #include "../fields.h"
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 {
20  {
22  BlamColor color;
23  };
24 
32  struct color_table
33  {
35  };
36 
37  namespace Classes
38  {
43  {
44  public:
46  {
47  class_name_long = "color_table";
48  class_name_short = "colo";
49  version = 1;
50 
51  revisions = {
52  {1, "haloman30", "Initial implementation."},
53  {2, "haloman30", "Change color type D2D1_COLOR_F to BlamColor"}
54  };
55 
56  tag_size = sizeof(color_table);
57 
58  fields =
59  {
60  new BlockField(sizeof(color_table__block), "colors", "",
61  {
62  new AsciiField("name", "the name of the color, used for retrieval later on"),
63  new ColorField("color", "the color information")
64  })
65  };
66  }
67  };
68  }
69 
70  BLAM color_table* GetColorTableTag(std::string tag_path);
71 
77  BLAM color_table__block* GetColorTableBlockEntry_Color(void* tag_address, int entry);
78 }
ascii
char ascii[128]
Typedef for an ascii field, used in tag data definitions.
Definition: tags.h:238
Blam::Content::Tags
Namespace containing functions related to tag data.
Definition: bitmap.h:10
Blam::Content::Tags::color_table
Structure representing a Color Table tag.
Definition: color_table.h:32
Blam::Content::Tags::GetColorTableBlockEntry_Color
BLAM color_table__block * GetColorTableBlockEntry_Color(void *tag_address, int entry)
Retrieves the color block from a color table tag.
Definition: color_table.cpp:18
tag_block
Structure representing a tag block.
Definition: tags.h:119
Blam::Content::Tags::color_table__block::color
BlamColor color
Definition: color_table.h:22
AsciiField
Class representing an ascii tag field.
Definition: ascii.h:12
Blam::Content::Tags::color_table__block::name
ascii name
Definition: color_table.h:21
Blam::Content::Tags::color_table::color_block_data
tag_block< color_table__block > color_block_data
Tag block for Color data.
Definition: color_table.h:34
Blam::Content::Tags::Classes::ColorTableTagClass::ColorTableTagClass
ColorTableTagClass()
Definition: color_table.h:45
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
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::color_table__block
Structure representing an entry in a Color block.
Definition: color_table.h:19
BLAM
#define BLAM
Definition: discord_rpc.h:8
BlamTagClass::tag_size
int tag_size
The size of the tag's data. Used on loading/writing tag files.
Definition: tagclass.h:51
ColorField
Class representing a color tag field.
Definition: color.h:13
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:13
Blam::Content::Tags::Classes::ColorTableTagClass
Tag class information for Color Table tags.
Definition: color_table.h:42
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