mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-15 10:36:44 -04:00
Added prerelease version of libvitaboy 1.0.1
This commit is contained in:
parent
432d12397c
commit
a4a7b82bb7
10 changed files with 281 additions and 96 deletions
|
@ -43,6 +43,12 @@ class VBFile_t {
|
|||
inline void seekto(unsigned offset){
|
||||
Position = Buffer+offset;
|
||||
}
|
||||
inline void seekahead(unsigned count){
|
||||
Position += count;
|
||||
}
|
||||
inline void seekback(unsigned count){
|
||||
Position -= count;
|
||||
}
|
||||
|
||||
inline uint32_t readint32(){
|
||||
uint32_t value = (uint32_t)((Position[0]<<(8*3)) | (Position[1]<<(8*2)) | (Position[2]<<(8*1)) | (Position[3]<<(8*0)));
|
||||
|
@ -261,25 +267,42 @@ struct TextureVertex_t {
|
|||
float u, v;
|
||||
};
|
||||
|
||||
struct Vertex_t {
|
||||
struct Coord_t {
|
||||
float x, y, z;
|
||||
};
|
||||
|
||||
struct TextureCoord_t {
|
||||
float u, v;
|
||||
};
|
||||
|
||||
struct NormalCoord_t {
|
||||
float x, y, z;
|
||||
};
|
||||
|
||||
struct BlendData_t {
|
||||
float Weight;
|
||||
unsigned OtherVertex;
|
||||
};
|
||||
|
||||
struct Vertex_t {
|
||||
Coord_t Coord;
|
||||
TextureCoord_t TextureCoord;
|
||||
NormalCoord_t NormalCoord;
|
||||
|
||||
unsigned BoneIndex;
|
||||
BlendData_t BlendData;
|
||||
};
|
||||
|
||||
struct Face_t {
|
||||
unsigned VertexA, VertexB, VertexC;
|
||||
};
|
||||
|
||||
struct BoneBinding_t {
|
||||
unsigned BoneIndex;
|
||||
unsigned FirstFixedVertex;
|
||||
unsigned FixedVertexCount;
|
||||
unsigned FirstBlendedVertex;
|
||||
unsigned BlendedVertexCount;
|
||||
};
|
||||
|
||||
struct BlendData_t {
|
||||
float Weight;
|
||||
unsigned OtherVertex;
|
||||
unsigned FirstRealVertex;
|
||||
unsigned RealVertexCount;
|
||||
unsigned FirstBlendVertex;
|
||||
unsigned BlendVertexCount;
|
||||
};
|
||||
|
||||
struct Mesh_t {
|
||||
|
@ -290,16 +313,11 @@ struct Mesh_t {
|
|||
Face_t * FaceData;
|
||||
uint32_t BindingCount;
|
||||
BoneBinding_t * BoneBindings;
|
||||
uint32_t FixedVertexCount;
|
||||
TextureVertex_t * TextureVertexData;
|
||||
uint32_t BlendedVertexCount;
|
||||
BlendData_t * BlendData;
|
||||
uint32_t RealVertexCount;
|
||||
uint32_t BlendVertexCount;
|
||||
uint32_t TotalVertexCount;
|
||||
Vertex_t * VertexData;
|
||||
Vertex_t * VertexNorms;
|
||||
Vertex_t * TransformedVertexData;
|
||||
Vertex_t * TransformedVertexNorms;
|
||||
TextureVertex_t * TransformedTextureData;
|
||||
};
|
||||
|
||||
void ReadMesh(Mesh_t& Mesh);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue