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