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