Header for various formats like pak, and model formats as well as bsp format. More...
#include "../shared/defines.h"
#include "unzip.h"
Go to the source code of this file.
Data Structures | |
struct | dMD2Coord_t |
These two shorts are used to map a vertex onto a skin The horizontal axis position is given by s, and the vertical axis position is given by t. The ranges for s and t are greater than or equal to 0 and less than skinWidth and skinHeight. More... | |
struct | dMD2Triangle_t |
struct | dMD2TriangleVertex_t |
struct | dAliasFrame_s |
is a variable sized structure, however all frame_t structures within the same file will have the same size (numVertices in the header) More... | |
struct | dMD2Model_t |
the glcmd format: a positive integer starts a tristrip command, followed by that many vertex structures. a negative integer starts a trifan command, followed by -x vertexes a zero indicates the end of the command list. a vertex consists of a floating point s, a floating point t, and an integer vertex index. More... | |
struct | dMD2tag_t |
Tag file header structure - 32 byte A tag for a model must have the same amount of frames as the model. A tag is nothing more than a coordinate. It's used to e.g. determine the hand of a model when the walking animation is played. The renderer has to know where to place the weapon. More... | |
struct | dmd3coord_t |
struct | dmd3vertex_t |
struct | dmd3frame_t |
struct | dorientation_t |
struct | dmd3tag_t |
struct | dmd3skin_t |
struct | dmd3mesh_t |
struct | dmd3_t |
struct | dpmheader_s |
type 2 model (hierarchical skeletal pose) within this specification, int is assumed to be 32bit, float is assumed to be 32bit, char is assumed to be 8bit, text is assumed to be an array of chars with NULL termination all values are big endian (also known as network byte ordering), NOT x86 little endian More... | |
struct | dpmmesh_s |
there may be more than one of these More... | |
struct | dpmbone_s |
one per bone More... | |
struct | dpmbonepose_s |
a bonepose matrix is intended to be used like this: (n = output vertex, v = input vertex, m = matrix, f = influence) n[0] = v[0] * m[0][0] + v[1] * m[0][1] + v[2] * m[0][2] + f * m[0][3]; n[1] = v[0] * m[1][0] + v[1] * m[1][1] + v[2] * m[1][2] + f * m[1][3]; n[2] = v[0] * m[2][0] + v[1] * m[2][1] + v[2] * m[2][2] + f * m[2][3]; More... | |
struct | dpmframe_s |
immediately followed by bone positions for the frame More... | |
struct | dpmbonevert_s |
one or more of these per vertex More... | |
struct | dpmvertex_s |
variable size, parsed sequentially More... | |
struct | lump_t |
Directory of the different data blocks. More... | |
struct | dBspHeader_t |
The BSP header definition with the data block directory. More... | |
Defines | |
#define | IDMDXHEADER "UFOMDX" |
#define | MDX_VERSION 1 |
#define | IDALIASHEADER (('2'<<24)+('P'<<16)+('D'<<8)+'I') |
#define | IDTAGHEADER (('2'<<24)+('P'<<16)+('D'<<8)+'J') |
#define | MD2_ALIAS_VERSION 8 |
#define | TAG_VERSION 1 |
#define | MD2_MAX_TRIANGLES 4096 |
#define | MD2_MAX_VERTS 2048 |
#define | MD2_MAX_FRAMES 512 |
#define | MD2_MAX_SKINS 32 |
#define | MD2_MAX_SKINNAME 64 |
#define | MD2_MAX_TAGNAME 64 |
#define | IDMD3HEADER (('3'<<24)+('P'<<16)+('D'<<8)+'I') |
#define | MD3_ALIAS_VERSION 15 |
#define | MD3_ALIAS_MAX_LODS 4 |
#define | MD3_MAX_TRIANGLES 8192 |
#define | MD3_MAX_VERTS 4096 |
#define | MD3_MAX_SHADERS 256 |
#define | MD3_MAX_FRAMES 1024 |
#define | MD3_MAX_MESHES 32 |
#define | MD3_MAX_TAGS 16 |
#define | MD3_MAX_PATH 64 |
#define | MD3_XYZ_SCALE (1.0f/64.0f) |
#define | DPMHEADER (('K'<<24)+('R'<<16)+('A'<<8)+'D') |
#define | DPMBONEFLAG_ATTACHMENT 1 |
if set on a bone, it must be protected from removal | |
#define | IDBSPHEADER (('P'<<24)+('S'<<16)+('B'<<8)+'I') |
#define | BSPVERSION 78 |
Typedefs | |
typedef struct dAliasFrame_s | dMD2Frame_t |
is a variable sized structure, however all frame_t structures within the same file will have the same size (numVertices in the header) | |
typedef struct dpmheader_s | dpmheader_t |
type 2 model (hierarchical skeletal pose) within this specification, int is assumed to be 32bit, float is assumed to be 32bit, char is assumed to be 8bit, text is assumed to be an array of chars with NULL termination all values are big endian (also known as network byte ordering), NOT x86 little endian | |
typedef struct dpmmesh_s | dpmmesh_t |
there may be more than one of these | |
typedef struct dpmbone_s | dpmbone_t |
one per bone | |
typedef struct dpmbonepose_s | dpmbonepose_t |
a bonepose matrix is intended to be used like this: (n = output vertex, v = input vertex, m = matrix, f = influence) n[0] = v[0] * m[0][0] + v[1] * m[0][1] + v[2] * m[0][2] + f * m[0][3]; n[1] = v[0] * m[1][0] + v[1] * m[1][1] + v[2] * m[1][2] + f * m[1][3]; n[2] = v[0] * m[2][0] + v[1] * m[2][1] + v[2] * m[2][2] + f * m[2][3]; | |
typedef struct dpmframe_s | dpmframe_t |
immediately followed by bone positions for the frame | |
typedef struct dpmbonevert_s | dpmbonevert_t |
one or more of these per vertex | |
typedef struct dpmvertex_s | dpmvertex_t |
variable size, parsed sequentially |
Header for various formats like pak, and model formats as well as bsp format.
Definition in file qfiles.h.
#define BSPVERSION 78 |
Definition at line 373 of file qfiles.h.
Referenced by CheckBSPFile(), CM_AddMapTile(), LoadBSPFile(), R_ModAddMapTile(), and WriteBSPFile().
#define DPMBONEFLAG_ATTACHMENT 1 |
#define DPMHEADER (('K'<<24)+('R'<<16)+('A'<<8)+'D') |
Definition at line 252 of file qfiles.h.
Referenced by LoadModel(), ModelWorker(), R_ModForName(), and SV_LoadModelMinsMaxs().
#define IDALIASHEADER (('2'<<24)+('P'<<16)+('D'<<8)+'I') |
Definition at line 42 of file qfiles.h.
Referenced by LoadModel(), ModelWorker(), R_ModForName(), and SV_LoadModelMinsMaxs().
#define IDBSPHEADER (('P'<<24)+('S'<<16)+('B'<<8)+'I') |
little-endian "IBSP"
Definition at line 371 of file qfiles.h.
Referenced by CheckBSPFile(), LoadBSPFile(), ModelWorker(), R_ModForName(), and WriteBSPFile().
#define IDMD3HEADER (('3'<<24)+('P'<<16)+('D'<<8)+'I') |
Definition at line 161 of file qfiles.h.
Referenced by LoadModel(), ModelWorker(), R_ModForName(), R_ModLoadAliasMD3Model(), and SV_LoadModelMinsMaxs().
#define IDMDXHEADER "UFOMDX" |
Definition at line 35 of file qfiles.h.
Referenced by R_ModLoadMDX(), and WriteToFile().
#define MD2_ALIAS_VERSION 8 |
Definition at line 44 of file qfiles.h.
Referenced by MD2HeaderCheck(), and R_ModLoadAliasMD2Mesh().
#define MD2_MAX_FRAMES 512 |
Definition at line 49 of file qfiles.h.
Referenced by R_ModLoadAliasMD2Model().
#define MD2_MAX_SKINNAME 64 |
Definition at line 51 of file qfiles.h.
Referenced by _md2_load(), MD2Check(), MD2SkinEdit(), MD2SkinFix(), R_ModLoadAliasMD2MeshIndexed(), R_ModLoadAliasMD2MeshUnindexed(), and R_ModLoadTags().
#define MD2_MAX_SKINS 32 |
Definition at line 50 of file qfiles.h.
Referenced by MD2HeaderCheck(), R_ModLoadAliasMD2MeshIndexed(), and R_ModLoadAliasMD2MeshUnindexed().
#define MD2_MAX_TAGNAME 64 |
Definition at line 52 of file qfiles.h.
Referenced by R_GetTagMatrix().
#define MD2_MAX_TRIANGLES 4096 |
Definition at line 47 of file qfiles.h.
Referenced by _md2_load(), MD2HeaderCheck(), R_ModLoadAliasMD2MeshIndexed(), and R_ModLoadAliasMD2MeshUnindexed().
#define MD2_MAX_VERTS 2048 |
Definition at line 48 of file qfiles.h.
Referenced by MD2HeaderCheck(), R_ModLoadAliasMD2MeshIndexed(), and R_ModLoadAliasMD2MeshUnindexed().
#define MD3_ALIAS_VERSION 15 |
Definition at line 163 of file qfiles.h.
Referenced by R_ModLoadAliasMD3Model().
#define MD3_MAX_FRAMES 1024 |
Definition at line 169 of file qfiles.h.
Referenced by R_ModLoadAliasMD3Model().
#define MD3_MAX_MESHES 32 |
Definition at line 170 of file qfiles.h.
Referenced by R_ModLoadAliasMD3Model().
#define MD3_MAX_PATH 64 |
Definition at line 172 of file qfiles.h.
Referenced by R_ModLoadAliasMD3Model().
#define MD3_MAX_SHADERS 256 |
Definition at line 168 of file qfiles.h.
Referenced by R_ModLoadAliasMD3Model().
#define MD3_MAX_TAGS 16 |
Definition at line 171 of file qfiles.h.
Referenced by R_ModLoadAliasMD3Model().
#define MD3_MAX_TRIANGLES 8192 |
Definition at line 166 of file qfiles.h.
Referenced by R_ModLoadAliasMD3Model().
#define MD3_MAX_VERTS 4096 |
Definition at line 167 of file qfiles.h.
Referenced by R_ModLoadAliasMD3Model().
#define MD3_XYZ_SCALE (1.0f/64.0f) |
#define MDX_VERSION 1 |
Definition at line 36 of file qfiles.h.
Referenced by R_ModLoadMDX(), and WriteToFile().
#define TAG_VERSION 1 |
Definition at line 45 of file qfiles.h.
Referenced by R_ModLoadTags().
typedef struct dAliasFrame_s dMD2Frame_t |
is a variable sized structure, however all frame_t structures within the same file will have the same size (numVertices in the header)
typedef struct dpmbonepose_s dpmbonepose_t |
a bonepose matrix is intended to be used like this: (n = output vertex, v = input vertex, m = matrix, f = influence) n[0] = v[0] * m[0][0] + v[1] * m[0][1] + v[2] * m[0][2] + f * m[0][3]; n[1] = v[0] * m[1][0] + v[1] * m[1][1] + v[2] * m[1][2] + f * m[1][3]; n[2] = v[0] * m[2][0] + v[1] * m[2][1] + v[2] * m[2][2] + f * m[2][3];
typedef struct dpmbonevert_s dpmbonevert_t |
one or more of these per vertex
typedef struct dpmframe_s dpmframe_t |
immediately followed by bone positions for the frame
typedef struct dpmheader_s dpmheader_t |
type 2 model (hierarchical skeletal pose) within this specification, int is assumed to be 32bit, float is assumed to be 32bit, char is assumed to be 8bit, text is assumed to be an array of chars with NULL termination all values are big endian (also known as network byte ordering), NOT x86 little endian
typedef struct dpmvertex_s dpmvertex_t |
variable size, parsed sequentially