2
Fork 0
Code Activity
Var Dump:
dumpVar: only available in dev mode
Mailing List
010-templates/vt2_unit_186.bt

205 lines
No EOL
4 KiB
Text

//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
// File: vt2_unit_186.bt
// Authors: Lucas Schwiderski
// Version:
// Purpose:
// Category: Vermintide 2
// File Mask: *.unit
// ID Bytes: BA 00 00 00
// History:
//------------------------------------------------
typedef uint32 Murmur32 <format=hex>;
typedef uint64 Murmur64 <format=hex>;
typedef struct {
float x;
float y;
float z;
} Vector3;
typedef struct {
float x;
float y;
float z;
float w;
} Quaternion;
typedef struct {
float m11;
float m12;
float m13;
float m14;
float m21;
float m22;
float m23;
float m24;
float m31;
float m32;
float m33;
float m34;
} Matrix3x3;
typedef struct {
float m11;
float m12;
float m13;
float m14;
float m21;
float m22;
float m23;
float m24;
float m31;
float m32;
float m33;
float m34;
float m41;
float m42;
float m43;
float m44;
} Matrix4x4;
typedef struct {
uint32 len_data <hidden=true>;
hfloat data[len_data / 2];
uint32 validity;
uint32 stream_type;
uint32 count;
uint32 stride;
} VertexBuffer;
typedef struct {
uint32 vertex_component;
uint32 type;
uint32 set;
uint32 stream;
byte is_instance;
} Channel;
typedef struct {
uint32 validity;
uint32 stream_type;
uint32 index_format;
uint32 index_count;
uint32 len_indices <hidden=true>;
char indices[len_indices];
} IndexBuffer;
typedef struct {
uint32 material_index;
uint32 start;
uint32 end;
uint32 bone_set;
} BatchRange;
typedef struct {
Vector3 lower_bounds;
Vector3 upper_bounds;
float radius;
} BoundingVolume;
typedef struct {
uint32 num_buffers <hidden=true>;
VertexBuffer vertex_buffers[num_buffers] <optimize=false>;
uint32 num_channels <hidden=true>;
if (num_buffers != num_channels)
return "Buffer count and Channel count don't match";
Channel channels[num_channels];
IndexBuffer index_buffer;
uint32 num_batch_ranges <hidden=true>;
BatchRange batch_ranges[num_batch_ranges] <optimize=false>;
BoundingVolume bounding_volume;
uint32 num_materials <hidden=true>;
Murmur32 materials[num_materials];
} MeshGeometry;
typedef struct {
uint32 num_index_sets <hidden=true>;
uint32 index_sets[num_index_sets];
} MatrixIndexSet;
typedef struct {
uint32 num_inverse_bind_matrices <hidden=true>;
Matrix4x4 inverse_bind_matrices[num_inverse_bind_matrices];
uint32 num_node_indices <hidden=true>;
uint32 node_indices[num_node_indices];
uint32 num_matrix_index_sets <hidden=true>;
MatrixIndexSet matrix_index_sets[num_matrix_index_sets];
} SkinData;
typedef struct {
// TODO: Murmur32?
uint32 id;
uint32 num_data <hidden=true>;
int32 data[num_data];
} SimpleAnimationGroup;
typedef struct {
uint32 num_nodes <hidden=true>;
struct LocalTransform {
Vector3 x;
Vector3 y;
Vector3 z;
Vector3 position;
Vector3 scale;
} local_transform[num_nodes];
Matrix4x4 world_transform[num_nodes];
struct ParentNode {
uint16 parent_type;
uint16 parent_index;
} parent_node[num_nodes];
Murmur32 name[num_nodes];
} SceneGraph;
typedef struct {
Murmur32 name;
uint32 node_index;
uint32 geometry_index;
uint32 skin_index;
uint32 flags;
BoundingVolume bounding_volume;
} MeshObject;
// ====
// File
// ====
uint32 version;
uint32 num_mesh_geometries <hidden=true>;
MeshGeometry mesh_geometry[num_mesh_geometries] <optimize=false>;
uint32 num_skins <hidden=true>;
SkinData skins[num_skins];
uint32 len_simple_animation <hidden=true>;
char simple_animation[len_simple_animation] <optimize=false>;
uint32 num_simple_animation_groups <hidden=true>;
SimpleAnimationGroup simple_animation_groups[num_simple_animation_groups] <optimize=false>;
SceneGraph scene_graph;
uint32 num_mesh_objects <hidden=true>;
MeshObject mesh_objects[num_mesh_objects];