Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
bitmap.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../tagclass.h"
4 
5 #ifndef BLAM
6 #define BLAM
7 #endif
8 
10 {
12  {
17  };
18 
20  {
21  short width;
22  short height;
23  byte depth;
26  //bitfield8 format_flags;
27  };
28 
30  {
33  };
34 
36  {
37  short please_work;
41  };
42 
44  {
48  };
49 
51  {
52  bool bit_0;
53  bool bit_1;
54  bool bit_2;
55  bool is_tiled;
56  };
57 
66  struct bitmap
67  {
69  short short_test;
70  byte byte_test;
74  };
75 
76  namespace Classes
77  {
79  {
80  public:
82  {
83  class_name_long = "bitmap";
84  class_name_short = "bitm";
85  version = 1;
86 
87  revisions = {
88  {1, "haloman30", "Initial implementation."}
89  };
90 
91  tag_size = sizeof(bitmap);
92 
93  fields =
94  {
95  new CommentField("Bitmap", "im gonna shove a bitmap up your ass"),
96  new Int32Field("integer test", "memes"),
97  new Int16Field("short test", "A short has a length of 2 bytes."),
98  new Int8Field("byte test", "A byte has a length of 1 bytes."),
99  new Block(sizeof(bitmap__bitmap_data), "block test", "*sweats nervously*",
100  {
101  new Int16Field("width", "image width"),
102  new Int16Field("height", "image height"),
103  new Int8Field("depth", "image depth"),
104  new CommentField("comment title", "explanation goes here brotheR"),
105  new Bitfield8Field("format flags", "extra flags for fuck you",
106  {
107  "bit 0",
108  "bit 1",
109  "bit 2",
110  "is tiled"
111  }),
112  new EnumField("type", "the usage type of this bitmap",
113  {
114  "2d texture",
115  "3d texture",
116  "cubemap",
117  "unknown"
118  })
119  }),
120  new Block(sizeof(the_go_fuck_yourself_block), "the 'go fuck yourself' block", "yea im tired leave me alone",
121  {
122  new Bitfield16Field("extra flags", "hi",
123  {
124  "can you imagine needing this many flags",
125  "yea me neither"
126  }),
127  new Bitfield32Field("who needs this many fucking flags", "apparently me because i put this shit here",
128  {
129  "enable diffusion dithering",
130  "disable height map compression",
131  "uniform sprite sequences",
132  "filthy sprite bug fix",
133  "use sharp bump filter",
134  "UNUSED",
135  "use clamped/mirrored bump",
136  "invert detail fade",
137  "swap x-y vector components",
138  "convert from signed",
139  "convert to signed",
140  "import mipmap chains",
141  "intentionally true color"
142  })
143  }),
144  new Block(sizeof(nested_block_test_block), "nested block test", "testing block nesting",
145  {
146  new Int32Field("nested property", ""),
147  new AsciiField("nested string", ""),
148  new Block(sizeof(nested_block_child_block), "child block", "",
149  {
150  new Int16Field("please work", ""),
151  new AsciiField("nested string1", ""),
152  new EnumField("type", "the usage type of this bitmap",
153  {
154  "2d texture",
155  "3d texture",
156  "cubemap",
157  "unknown"
158  }),
159  new AsciiField("nested string2", "")
160  })
161  })
162  };
163  }
164  };
165  }
166 
167  BLAM bitmap* GetBitmapTag(std::string tag_path);
168 }
Blam::Content::Tags::nested_block_test_block
Definition: bitmap.h:43
Blam::Content::Tags
Namespace containing things related to tag data.
Definition: bitmap.h:9
Blam::Content::Tags::nested_block_child_block
Definition: bitmap.h:35
Blam::Content::Tags::format_flags_bitfield
Definition: bitmap.h:50
tag_block
Structure representing a tag block.
Definition: tags.h:79
Blam::Content::Tags::texture_2d
@ texture_2d
Definition: bitmap.h:13
ascii
char ascii[32]
Typedef for an ascii field, used in tag data definitions.
Definition: fields.h:21
Blam::Content::Tags::the_go_fuck_yourself_block::who_needs_this_many_flags
bitfield32 who_needs_this_many_flags
Definition: bitmap.h:32
Blam::Content::Tags::nested_block_child_block::bitmap_type
bitmap__bitmap_type bitmap_type
Definition: bitmap.h:39
Blam::Content::Tags::the_go_fuck_yourself_block::extra_flags
bitfield16 extra_flags
Definition: bitmap.h:31
Blam::Content::Tags::bitmap__bitmap_data::height
short height
Definition: bitmap.h:22
Blam::Content::Tags::BlamTagClass::tag_size
int tag_size
The size of the tag's data. Used on loading/writing tag files.
Definition: tagclass.h:53
Blam::Content::Tags::unknown
@ unknown
Definition: bitmap.h:16
Blam::Content::Tags::Bitfield8Field
Class representing a bitfield8 tag field.
Definition: fields.h:391
Blam::Content::Tags::Block
Class representing a tag block, also referred to as a struct or reflexive in the modding community.
Definition: fields.h:745
Blam::Content::Tags::BlamTagClass
Class representing a tag class.
Definition: tagclass.h:43
Blam::Content::Tags::nested_block_test_block::child_block
tag_block< nested_block_child_block > child_block
Definition: bitmap.h:47
Blam::Content::Tags::format_flags_bitfield::bit_2
bool bit_2
Definition: bitmap.h:54
Blam::Content::Tags::nested_block_test_block::nested_string
ascii nested_string
Definition: bitmap.h:46
Blam::Content::Tags::format_flags_bitfield::is_tiled
bool is_tiled
Definition: bitmap.h:55
bitfield8
bool bitfield8[8]
Typedef for a bitfield8 field, used in tag data definitions.
Definition: fields.h:18
Blam::Content::Tags::EnumField
Class representing an enum tag field.
Definition: fields.h:328
Blam::Content::Tags::bitmap::integer_test
int integer_test
Definition: bitmap.h:68
Blam::Content::Tags::Classes::BitmapTagClass
Definition: bitmap.h:78
Blam::Content::Tags::bitmap__bitmap_data::depth
byte depth
Definition: bitmap.h:23
Blam::Content::Tags::bitmap
Structure representing a Bitmap tag.
Definition: bitmap.h:66
Blam::Content::Tags::Int8Field
Class representing an int8 tag field.
Definition: fields.h:207
Blam::Content::Tags::CommentField
Class representing a comment field.
Definition: fields.h:666
Blam::Content::Tags::bitmap__bitmap_data::width
short width
Definition: bitmap.h:21
Blam::Content::Tags::BlamTagClass::class_name_short
std::string class_name_short
The short, 4-character name of the tag class.
Definition: tagclass.h:47
Blam::Content::Tags::texture_3d
@ texture_3d
Definition: bitmap.h:14
Blam::Content::Tags::Classes::BitmapTagClass::BitmapTagClass
BitmapTagClass()
Definition: bitmap.h:81
Blam::Content::Tags::bitmap::nested_block_test
tag_block< nested_block_test_block > nested_block_test
Definition: bitmap.h:73
Blam::Content::Tags::bitmap::bitmap_data
tag_block< bitmap__bitmap_data > bitmap_data
Definition: bitmap.h:71
Blam::Content::Tags::Bitfield32Field
Class representing a bitfield32 tag field.
Definition: fields.h:573
Blam::Content::Tags::Int32Field
Class representing an int32 tag field.
Definition: fields.h:127
Blam::Content::Tags::bitmap::byte_test
byte byte_test
Definition: bitmap.h:70
bitfield16
bool bitfield16[16]
Typedef for a bitfield16 field, used in tag data definitions.
Definition: fields.h:19
Blam::Content::Tags::nested_block_child_block::edge_2
ascii edge_2
Definition: bitmap.h:40
Blam::Content::Tags::bitmap__bitmap_data::bitmap_type
bitmap__bitmap_type bitmap_type
Definition: bitmap.h:25
Blam::Content::Tags::bitmap__bitmap_data::format_flags
bitfield8 format_flags
Definition: bitmap.h:24
Blam::Content::Tags::bitmap::the_go_fuck_yourself
tag_block< the_go_fuck_yourself_block > the_go_fuck_yourself
Definition: bitmap.h:72
BLAM
#define BLAM
Definition: discord_rpc.h:8
bitfield32
bool bitfield32[32]
Typedef for a bitfield32 field, used in tag data definitions.
Definition: fields.h:20
Blam::Content::Tags::AsciiField
Class representing an ascii tag field.
Definition: fields.h:89
Blam::Content::Tags::BlamTagClass::version
int version
The tag class version. Should be incremented any time a tag class is modified whatsoever.
Definition: tagclass.h:48
Blam::Content::Tags::nested_block_child_block::please_work
short please_work
Definition: bitmap.h:37
Blam::Content::Tags::format_flags_bitfield::bit_0
bool bit_0
Definition: bitmap.h:52
Blam::Content::Tags::the_go_fuck_yourself_block
Definition: bitmap.h:29
Blam::Content::Tags::nested_block_child_block::edge_1
ascii edge_1
Definition: bitmap.h:38
Blam::Content::Tags::GetBitmapTag
BLAM bitmap * GetBitmapTag(std::string tag_path)
Definition: bitmap.cpp:5
Blam::Content::Tags::format_flags_bitfield::bit_1
bool bit_1
Definition: bitmap.h:53
Blam::Content::Tags::Int16Field
Class representing an int16 tag field.
Definition: fields.h:165
Blam::Content::Tags::BlamTagClass::class_name_long
std::string class_name_long
The longer class name. Typically shown alongside short name for user-friendliness.
Definition: tagclass.h:46
Blam::Content::Tags::bitmap__bitmap_type
bitmap__bitmap_type
Definition: bitmap.h:11
Blam::Content::Tags::bitmap__bitmap_data
Definition: bitmap.h:19
Blam::Content::Tags::bitmap::short_test
short short_test
Definition: bitmap.h:69
Blam::Content::Tags::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:49
Blam::Content::Tags::Bitfield16Field
Class representing a bitfield16 tag field.
Definition: fields.h:482
Blam::Content::Tags::nested_block_test_block::nested_property
int nested_property
Definition: bitmap.h:45
Blam::Content::Tags::cubemap
@ cubemap
Definition: bitmap.h:15
Blam::Content::Tags::BlamTagClass::fields
std::vector< TagField * > fields
A series of tag fields that store the layout of the tag.
Definition: tagclass.h:51