removed some unnecessary typedefs
This commit is contained in:
parent
fdcf9da544
commit
8378b0700c
|
@ -5,7 +5,7 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "vector3.h"
|
#include "vector3.h"
|
||||||
|
|
||||||
typedef enum
|
enum MATRIX_ELEMENTS
|
||||||
{
|
{
|
||||||
_11 = 0,
|
_11 = 0,
|
||||||
_12 = 4,
|
_12 = 4,
|
||||||
|
@ -23,7 +23,7 @@ typedef enum
|
||||||
_42 = 7,
|
_42 = 7,
|
||||||
_43 = 11,
|
_43 = 11,
|
||||||
_44 = 15
|
_44 = 15
|
||||||
} MATRIX_ELEMENTS;
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a 4x4 column-major Matrix and provides common methods for
|
* Represents a 4x4 column-major Matrix and provides common methods for
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#define MD2_SKIN_NAME_LENGTH 64
|
#define MD2_SKIN_NAME_LENGTH 64
|
||||||
#define MD2_FRAME_NAME_LENGTH 16
|
#define MD2_FRAME_NAME_LENGTH 16
|
||||||
|
|
||||||
typedef struct
|
struct Md2Header
|
||||||
{
|
{
|
||||||
char ident[4]; // Should be "IDP2"
|
char ident[4]; // Should be "IDP2"
|
||||||
int version; // Should be 8
|
int version; // Should be 8
|
||||||
|
@ -29,14 +29,14 @@ typedef struct
|
||||||
int offsetFrames;
|
int offsetFrames;
|
||||||
int offsetGlCmds;
|
int offsetGlCmds;
|
||||||
int offsetEnd;
|
int offsetEnd;
|
||||||
} Md2Header;
|
};
|
||||||
|
|
||||||
// Vertex and texcoord indices
|
// Vertex and texcoord indices
|
||||||
typedef struct
|
struct Md2Polygon
|
||||||
{
|
{
|
||||||
unsigned short vertex[3];
|
unsigned short vertex[3];
|
||||||
unsigned short texCoord[3];
|
unsigned short texCoord[3];
|
||||||
} Md2Polygon;
|
};
|
||||||
|
|
||||||
// For each keyframe, stores the vertices, normals, and the string name
|
// For each keyframe, stores the vertices, normals, and the string name
|
||||||
typedef struct Md2Frame
|
typedef struct Md2Frame
|
||||||
|
@ -56,14 +56,14 @@ typedef struct Md2Frame
|
||||||
delete[] vertices;
|
delete[] vertices;
|
||||||
delete[] normals;
|
delete[] normals;
|
||||||
}
|
}
|
||||||
} Md2Frame;
|
};
|
||||||
|
|
||||||
typedef struct
|
struct Md2Animation
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
unsigned int startFrame;
|
unsigned int startFrame;
|
||||||
unsigned int endFrame;
|
unsigned int endFrame;
|
||||||
} Md2Animation;
|
};
|
||||||
|
|
||||||
class Md2
|
class Md2
|
||||||
{
|
{
|
||||||
|
@ -97,4 +97,4 @@ private:
|
||||||
std::vector<Md2Animation> m_animations;
|
std::vector<Md2Animation> m_animations;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -7,21 +7,21 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
typedef enum OBJ_FACE_VERTEX_TYPE
|
enum OBJ_FACE_VERTEX_TYPE
|
||||||
{
|
{
|
||||||
OBJ_VERTEX_TEXCOORD,
|
OBJ_VERTEX_TEXCOORD,
|
||||||
OBJ_VERTEX_NORMAL,
|
OBJ_VERTEX_NORMAL,
|
||||||
OBJ_VERTEX_FULL
|
OBJ_VERTEX_FULL
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct ObjFace
|
||||||
{
|
{
|
||||||
unsigned int vertices[3];
|
unsigned int vertices[3];
|
||||||
unsigned int texcoords[3];
|
unsigned int texcoords[3];
|
||||||
unsigned int normals[3];
|
unsigned int normals[3];
|
||||||
} ObjFace;
|
};
|
||||||
|
|
||||||
typedef struct ObjMaterial
|
struct ObjMaterial
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
Material *material;
|
Material *material;
|
||||||
|
@ -42,7 +42,7 @@ typedef struct ObjMaterial
|
||||||
delete material;
|
delete material;
|
||||||
delete[] faces;
|
delete[] faces;
|
||||||
}
|
}
|
||||||
} ObjMaterial;
|
};
|
||||||
|
|
||||||
class Obj
|
class Obj
|
||||||
{
|
{
|
||||||
|
@ -81,4 +81,4 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
10
src/sm/sm.h
10
src/sm/sm.h
|
@ -7,16 +7,16 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct SmPolygon
|
||||||
{
|
{
|
||||||
unsigned int vertices[3];
|
unsigned int vertices[3];
|
||||||
unsigned int normals[3];
|
unsigned int normals[3];
|
||||||
unsigned int texcoords[3];
|
unsigned int texcoords[3];
|
||||||
unsigned short colors[3];
|
unsigned short colors[3];
|
||||||
short material;
|
short material;
|
||||||
} SmPolygon;
|
};
|
||||||
|
|
||||||
typedef struct SmMaterial
|
struct SmMaterial
|
||||||
{
|
{
|
||||||
Material *material;
|
Material *material;
|
||||||
unsigned int polyStart;
|
unsigned int polyStart;
|
||||||
|
@ -33,7 +33,7 @@ typedef struct SmMaterial
|
||||||
{
|
{
|
||||||
delete material;
|
delete material;
|
||||||
}
|
}
|
||||||
} SmMaterial;
|
};
|
||||||
|
|
||||||
#define NO_MATERIAL -1
|
#define NO_MATERIAL -1
|
||||||
|
|
||||||
|
@ -70,4 +70,4 @@ private:
|
||||||
bool m_hasColors;
|
bool m_hasColors;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Reference in a new issue