Added function to get mesh headers

This commit is contained in:
_
2018-04-07 03:24:07 -07:00
parent 5b40ffb00b
commit 0e5c96b83b
3 changed files with 37 additions and 4 deletions

View File

@@ -2,7 +2,10 @@
#ifndef DEVIL1GEO_H
#define DEVIL1GEO_H
#include <stdint.h>
#pragma pack(1)
#include <stdbool.h>
#pragma pack(push, 1)
struct Header {
unsigned char numMesh;
unsigned char unknownNumberB;
@@ -12,7 +15,7 @@ struct Header {
uint64_t unknownOffset;
};
struct MeshHeaders {
struct MeshHeader {
int16_t numBatch;
int16_t numVertex;
uint32_t u; // <format=hex>
@@ -39,6 +42,7 @@ struct BoneIndexes {
struct BoneWeights {
uint16_t weights; // <format=hex>
};
#pragma pack(pop)
// This is where most of the parsing will be.
// this struct is in-order of what the file format will have.
@@ -65,5 +69,9 @@ struct Mesh {
struct Batch b;
};
void printgheader(struct Header*);
bool getmeshheaders(struct MeshHeader **, const char *, unsigned int);
#endif