Elaztek Developer Hub
Blamite Game Engine - blam!  00346.12.11.21.0529.blamite
The core library for the Blamite Game Engine.
render_model.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 {
14 };
15 
17 {
19 
20  TAG_BLOCK(geometry_groups,
21  {
22  stringid shader;
23 
24  TAG_BLOCK(vertex_layout,
25  {
26  TAG_ENUM(vertex_layout_entry_item_type,
27  {
28  position,
29  color
30  });
31 
32  uint8_t item_count;
33  });
34  //tag_block<> verticies;
35  //tag_block<> triangles;
36  });
37 };
38 
39 namespace Blam::Content::Tags
40 {
41  namespace Classes
42  {
44  {
45  public:
47  {
48  class_name_long = "render_model";
49  class_name_short = "mode";
50  version = 1;
51 
52  revisions = {
53  {1, "haloman30", "Initial implementation."}
54  };
55 
56  tag_size = sizeof(render_model);
57 
58  fields =
59  {
60  new AsciiField("name", "model name"),
61  new BlockField(sizeof(render_model::geometry_groups_entry), "geometry groups", "",
62  {
63  new AsciiField("shader name", ""),
64  new BlockField(sizeof(render_model::geometry_groups_entry::vertex_layout_entry), "vertex layout", "",
65  {
66  new Enum32Field("", "",
67  {
68  "",
69  ""
70  })
71  })
72  })
73  };
74  }
75  };
76  }
77 }
TAG_ENUM
#define TAG_ENUM(name,...)
Definition: tags.h:28
ascii
char ascii[128]
Typedef for an ascii field, used in tag data definitions.
Definition: tags.h:318
Blam::Content::Tags
Namespace containing functions related to tag data.
Definition: bitmap.h:10
render_model
Definition: render_model.h:16
AsciiField
Class representing an ascii tag field.
Definition: ascii.h:12
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:47
BlamTagClass::class_name_short
std::string class_name_short
The short, 4-character name of the tag class.
Definition: tagclass.h:45
BlamTagClass::version
int version
The tag class version. Should be incremented any time a tag class is modified whatsoever.
Definition: tagclass.h:46
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:44
vertex_layout_entry_data_type
vertex_layout_entry_data_type
Definition: render_model.h:10
Blam::Content::Tags::Classes::RenderModelTagClass
Definition: render_model.h:43
BlamTagClass::tag_size
int tag_size
The size of the tag's data. Used on loading/writing tag files.
Definition: tagclass.h:51
render_model::name
ascii name
Definition: render_model.h:18
Blam::Content::Tags::Classes::RenderModelTagClass::RenderModelTagClass
RenderModelTagClass()
Definition: render_model.h:46
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:319
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