Blamite Game Engine - blam!  00272.10.26.20.0001.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 
5 #include <d2d1.h>
6 
7 #ifndef BLAM
8 #define BLAM
9 #endif
10 
11 namespace Blam::Content::Tags
12 {
20  struct color_table
21  {
23  };
24 
31  {
33  D2D1_COLOR_F color;
34  };
35 
36  namespace Classes
37  {
42  {
43  public:
45  {
46  class_name_long = "color_table";
47  class_name_short = "colo";
48 
49  tag_size = sizeof(color_table);
50 
51  fields =
52  {
53  new Block(sizeof(color_table__block), "colors", "",
54  {
55  new AsciiField("name", "the name of the color, used for retrieval later on"),
56  new ColorFloatField("color", "the color information")
57  })
58  };
59  }
60  };
61  }
62 
63  BLAM color_table* GetColorTableTag(std::string tag_path);
64 
65  BLAM color_table__block* GetColorTableBlockEntry_Color(void* tag_address, int entry);
66 }
Blam::Content::Tags
Namespace containing things related to tag data.
Definition: bitmap.h:9
Blam::Content::Tags::color_table
Structure representing a Color Table tag.
Definition: color_table.h:20
Blam::Content::Tags::GetColorTableBlockEntry_Color
BLAM color_table__block * GetColorTableBlockEntry_Color(void *tag_address, int entry)
Definition: color_table.cpp:25
tag_block
Definition: tags.h:78
Blam::Content::Tags::color_table__block::color
D2D1_COLOR_F color
Definition: color_table.h:33
ascii
char ascii[32]
Typedef for an ascii field, used in tag data definitions.
Definition: fields.h:20
Blam::Content::Tags::TagClass::class_name_long
std::string class_name_long
The longer class name. Typically shown alongside short name for user-friendliness.
Definition: tagclass.h:33
Blam::Content::Tags::color_table__block::name
ascii name
Definition: color_table.h:32
Blam::Content::Tags::TagClass::class_name_short
std::string class_name_short
The short, 4-character name of the tag class.
Definition: tagclass.h:34
Blam::Content::Tags::Block
Class representing a tag block, also referred to as a struct or reflexive in the modding community.
Definition: fields.h:743
Blam::Content::Tags::TagClass::tag_size
int tag_size
The size of the tag's data. Used on loading/writing tag files.
Definition: tagclass.h:38
Blam::Content::Tags::Classes::ColorTableTagClass::ColorTableTagClass
ColorTableTagClass()
Definition: color_table.h:44
Blam::Content::Tags::ColorFloatField
Class representing a color tag field.
Definition: fields.h:287
Blam::Content::Tags::color_table__block
Structure representing an entry in a Color block.
Definition: color_table.h:30
Blam::Content::Tags::TagClass
Class representing a tag class.
Definition: tagclass.h:30
BLAM
#define BLAM
Definition: discord_rpc.h:8
Blam::Content::Tags::AsciiField
Class representing an ascii tag field.
Definition: fields.h:87
Blam::Content::Tags::color_table::color_block_data
tag_block color_block_data
Tag block for Color data.
Definition: color_table.h:22
Blam::Content::Tags::GetColorTableTag
BLAM color_table * GetColorTableTag(std::string tag_path)
Definition: color_table.cpp:5
Blam::Content::Tags::TagClass::fields
std::vector< TagField * > fields
A series of tag fields that store the layout of the tag.
Definition: tagclass.h:36
Blam::Content::Tags::Classes::ColorTableTagClass
Tag class information for Color Table tags.
Definition: color_table.h:41