md2 alias model loading More...
#include "r_local.h"
Go to the source code of this file.
Functions | |
static void | R_ModLoadTags (model_t *mod, void *buffer, int bufSize) |
static void | R_ModLoadAliasMD2MeshUnindexed (model_t *mod, const dMD2Model_t *md2, int bufSize, qboolean loadNormals) |
Assume that the indexArray is *NOT* filled, and load data for the model accordingly. | |
static void | R_ModLoadAliasMD2MeshIndexed (model_t *mod, const dMD2Model_t *md2, int bufSize) |
Assume that the indexArray is already filled, and load data for the model accordingly. | |
static void | R_ModLoadAliasMD2Mesh (model_t *mod, const dMD2Model_t *md2, int bufSize, qboolean loadNormals) |
See if the model has an MDX file, and then load the model data appropriately for either case. | |
static void | R_ModLoadLevelOfDetailData (model_t *mod, qboolean loadNormals) |
Adds new meshes to md2 models for different level of detail meshes. | |
void | R_ModLoadAliasMD2Model (model_t *mod, byte *buffer, int bufSize, qboolean loadNormals) |
Load MD2 models from file. |
md2 alias model loading
Definition in file r_model_md2.c.
static void R_ModLoadAliasMD2Mesh | ( | model_t * | mod, | |
const dMD2Model_t * | md2, | |||
int | bufSize, | |||
qboolean | loadNormals | |||
) | [static] |
See if the model has an MDX file, and then load the model data appropriately for either case.
Definition at line 408 of file r_model_md2.c.
References model_s::alias, Com_Error(), ERR_DROP, LittleLong(), MD2_ALIAS_VERSION, Mem_PoolAlloc, Mem_ReAlloc, mAliasModel_s::meshes, model_s::name, mAliasModel_s::num_meshes, dMD2Model_t::ofs_end, qfalse, qtrue, R_ModLoadAliasMD2MeshIndexed(), R_ModLoadAliasMD2MeshUnindexed(), R_ModLoadMDX(), dMD2Model_t::version, and vid_modelPool.
Referenced by R_ModLoadAliasMD2Model(), and R_ModLoadLevelOfDetailData().
static void R_ModLoadAliasMD2MeshIndexed | ( | model_t * | mod, | |
const dMD2Model_t * | md2, | |||
int | bufSize | |||
) | [static] |
Assume that the indexArray is already filled, and load data for the model accordingly.
Definition at line 278 of file r_model_md2.c.
References AddPointToBounds(), model_s::alias, byte, Com_Error(), Com_Printf(), ERR_DROP, mAliasModel_s::frames, dMD2Model_t::framesize, i, mAliasMesh_s::indexes, LittleFloat(), LittleLong(), LittleShort(), mAliasCoord_t, MAX_ALIAS_VERTS, model_s::maxs, MD2_MAX_SKINNAME, MD2_MAX_SKINS, MD2_MAX_TRIANGLES, MD2_MAX_VERTS, Mem_Free, Mem_PoolAlloc, mAliasModel_s::meshes, model_s::mins, image_s::name, mAliasSkin_s::name, model_s::name, mAliasMesh_s::name, dMD2Model_t::num_frames, mAliasModel_s::num_frames, mAliasModel_s::num_meshes, dMD2Model_t::num_skins, mAliasMesh_s::num_skins, dMD2Model_t::num_tris, mAliasMesh_s::num_tris, mAliasMesh_s::num_verts, dMD2Model_t::num_verts, dMD2Model_t::ofs_frames, dMD2Model_t::ofs_skins, dMD2Model_t::ofs_st, dMD2Model_t::ofs_tris, Q_strncpyz(), R_AliasModelGetSkin(), dAliasFrame_s::scale, mAliasSkin_s::skin, dMD2Model_t::skinheight, mAliasMesh_s::skinHeight, mAliasMesh_s::skins, dMD2Model_t::skinwidth, mAliasMesh_s::skinWidth, mAliasMesh_s::stcoords, dAliasFrame_s::translate, dMD2TriangleVertex_t::v, VectorCopy, VectorMA(), mAliasMesh_s::vertexes, dAliasFrame_s::verts, and vid_modelPool.
Referenced by R_ModLoadAliasMD2Mesh().
static void R_ModLoadAliasMD2MeshUnindexed | ( | model_t * | mod, | |
const dMD2Model_t * | md2, | |||
int | bufSize, | |||
qboolean | loadNormals | |||
) | [static] |
Assume that the indexArray is *NOT* filled, and load data for the model accordingly.
Definition at line 109 of file r_model_md2.c.
References AddPointToBounds(), model_s::alias, byte, Com_Error(), Com_Printf(), ERR_DROP, mAliasModel_s::frames, dMD2Model_t::framesize, i, mAliasMesh_s::indexes, LittleFloat(), LittleLong(), LittleShort(), mAliasCoord_t, MAX_ALIAS_VERTS, model_s::maxs, MD2_MAX_SKINNAME, MD2_MAX_SKINS, MD2_MAX_TRIANGLES, MD2_MAX_VERTS, Mem_Free, Mem_PoolAlloc, mAliasModel_s::meshes, model_s::mins, image_s::name, mAliasSkin_s::name, model_s::name, mAliasMesh_s::name, dMD2Model_t::num_frames, mAliasModel_s::num_frames, mAliasModel_s::num_meshes, dMD2Model_t::num_skins, mAliasMesh_s::num_skins, dMD2Model_t::num_tris, mAliasMesh_s::num_tris, mAliasMesh_s::num_verts, dMD2Model_t::num_verts, dMD2Model_t::ofs_frames, dMD2Model_t::ofs_skins, dMD2Model_t::ofs_st, dMD2Model_t::ofs_tris, Q_strncpyz(), R_AliasModelGetSkin(), R_ModCalcUniqueNormalsAndTangents(), dAliasFrame_s::scale, mAliasSkin_s::skin, dMD2Model_t::skinheight, mAliasMesh_s::skinHeight, mAliasMesh_s::skins, dMD2Model_t::skinwidth, mAliasMesh_s::skinWidth, mAliasMesh_s::stcoords, dAliasFrame_s::translate, dMD2TriangleVertex_t::v, VectorCopy, VectorMA(), mAliasMesh_s::vertexes, dAliasFrame_s::verts, and vid_modelPool.
Referenced by R_ModLoadAliasMD2Mesh().
Load MD2 models from file.
Definition at line 486 of file r_model_md2.c.
References model_s::alias, mAliasModel_s::animname, byte, ClearBounds(), Com_Error(), ERR_DROP, FS_CheckFile(), FS_FreeFile(), FS_LoadFile(), LittleLong(), model_s::maxs, MD2_MAX_FRAMES, mAliasModel_s::meshes, model_s::mins, mod_alias_md2, model_s::name, dMD2Model_t::num_frames, mAliasModel_s::num_frames, Q_strncpyz(), R_ModLoadAliasMD2Mesh(), R_ModLoadAnims(), R_ModLoadArrayData(), R_ModLoadLevelOfDetailData(), R_ModLoadTags(), mAliasModel_s::tagname, and model_s::type.
Referenced by LoadModel(), and R_ModForName().
Adds new meshes to md2 models for different level of detail meshes.
mod | The model to load the lod models for |
Definition at line 451 of file r_model_md2.c.
References byte, Com_Printf(), Com_sprintf(), Com_StripExtension(), FS_CheckFile(), FS_FreeFile(), FS_LoadFile(), i, MAX_QPATH, model_s::name, and R_ModLoadAliasMD2Mesh().
Referenced by R_ModLoadAliasMD2Model().
static void R_ModLoadTags | ( | model_t * | mod, | |
void * | buffer, | |||
int | bufSize | |||
) | [static] |
Definition at line 34 of file r_model_md2.c.
References model_s::alias, byte, Com_Error(), Com_Printf(), ERR_FATAL, i, int(), LittleFloat(), LittleLong(), MD2_MAX_SKINNAME, Mem_PoolAlloc, mAliasModel_s::num_frames, dMD2tag_t::num_frames, dMD2tag_t::num_tags, dMD2tag_t::ofs_end, dMD2tag_t::ofs_extractend, dMD2tag_t::ofs_names, dMD2tag_t::ofs_tags, TAG_VERSION, mAliasModel_s::tagdata, mAliasModel_s::tagname, dMD2tag_t::version, and vid_modelPool.
Referenced by R_ModLoadAliasMD2Model().