Elaztek Developer Hub
Blamite Game Engine - blam!  00367.02.08.23.1815.blamite
The core library for the Blamite Game Engine.
render_model.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 #ifndef BLAM
7 #define BLAM
8 #endif
9 
11 {
14 };
15 
16 #pragma pack(push, 1)
18 {
20 
21  TAG_BLOCK(geometry_groups,
22  {
23  stringid shader;
24 
25  TAG_BLOCK(vertex_layout,
26  {
27  TAG_ENUM(vertex_layout_entry_item_type,
28  {
29  position,
30  color
31  });
32 
33  uint8_t item_count;
34  });
35  //tag_block<> verticies;
36  //tag_block<> triangles;
37  });
38 };
39 #pragma pack(pop)
40 
41 namespace Blam::Content::Tags
42 {
43  namespace Classes
44  {
46  {
47  public:
49  {
50  class_name_long = "render_model";
51  class_name_short = "mode";
52  version = 1;
53 
54  revisions = {
55  {1, "haloman30", "Initial implementation."}
56  };
57 
58  tag_size = sizeof(render_model);
59 
60  fields =
61  {
62  new AsciiField("name", "model name"),
63  new BlockField(sizeof(render_model::geometry_groups_entry), "geometry groups", "",
64  {
65  new AsciiField("shader name", ""),
66  new BlockField(sizeof(render_model::geometry_groups_entry::vertex_layout_entry), "vertex layout", "",
67  {
68  new Enum32Field("", "",
69  {
70  "",
71  ""
72  })
73  })
74  })
75  };
76  }
77  };
78  }
79 }
TAG_ENUM
#define TAG_ENUM(name,...)
Definition: tags.h:33
ascii
char ascii[128]
Typedef for an ascii field, used in tag data definitions.
Definition: tags.h:313
uint8_t
unsigned char uint8_t
Definition: stdint.h:124
Blam::Content::Tags
Namespace containing functions related to tag data.
Definition: bitmap.h:151
render_model
Definition: render_model.h:17
AsciiField
Class representing an ascii tag field.
Definition: ascii.h:12
color
BlamColor color
Typedef for a color field, used in tag definitions.
Definition: tags.h:319
Enum32Field
Definition: enum.h:40
Float
@ Float
Definition: render_model.h:12
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
BlamTagClass::class_name_short
std::string class_name_short
The short, 4-character name of the tag class.
Definition: tagclass.h:47
BlamTagClass::version
int version
The tag class version. Should be incremented any time a tag class is modified whatsoever.
Definition: tagclass.h:48
UnsignedInt8
@ UnsignedInt8
Definition: render_model.h:13
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
vertex_layout_entry_data_type
vertex_layout_entry_data_type
Definition: render_model.h:10
Blam::Content::Tags::Classes::RenderModelTagClass
Definition: render_model.h:45
fields.h
BlamTagClass::tag_size
int tag_size
The size of the tag's data. Used on loading/writing tag files.
Definition: tagclass.h:53
render_model::name
ascii name
Definition: render_model.h:19
tagclass.h
Blam::Content::Tags::Classes::RenderModelTagClass::RenderModelTagClass
RenderModelTagClass()
Definition: render_model.h:48
BlockField
Class representing a tag block field, also sometimes referred to as a struct or reflexive in the modd...
Definition: block.h:13
render_model::TAG_BLOCK
TAG_BLOCK(geometry_groups, { stringid shader;TAG_BLOCK(vertex_layout, { TAG_ENUM(vertex_layout_entry_item_type, { position, color });uint8_t item_count;});})
stringid
char stringid[128]
Typedef for a stringid field, used in tag data definitions.
Definition: tags.h:314
BlamTagClass
Class representing a tag class.
Definition: tagclass.h:43
BlamTagClass::fields
std::vector< BlamPluginField * > fields
A series of tag fields that store the layout of the tag.
Definition: tagclass.h:51