pm_md2.c File Reference

#include "picointernal.h"
#include "../../../shared/byte.h"
Include dependency graph for pm_md2.c:

Go to the source code of this file.

Data Structures

struct  md2St_t
struct  md2Triangle_t
struct  md2XyzNormal_t
struct  md2Frame_s
struct  md2_s

Defines

#define PM_MD2_C
#define MD2_MAGIC   "IDP2"
#define MD2_VERSION   8
#define MD2_NUMVERTEXNORMALS   162
#define MD2_MAX_SKINNAME   64
#define MD2_MAX_TRIANGLES   4096
#define MD2_MAX_VERTS   2048
#define MD2_MAX_FRAMES   512
#define MD2_MAX_MD2SKINS   32
#define MD2_MAX_SKINNAME   64
#define byte   unsigned char

Typedefs

typedef struct md2Frame_s md2Frame_t
typedef struct md2_s md2_t

Functions

static int _md2_canload (PM_PARAMS_CANLOAD)
 Checks whether this module can load the given file.
static picoModel_t_md2_load (PM_PARAMS_LOAD)
 Loads a ufo md2 model file.

Variables

static const float md2_normals [MD2_NUMVERTEXNORMALS][3]
const picoModule_t picoModuleMD2

Define Documentation

#define byte   unsigned char

Definition at line 59 of file pm_md2.c.

Referenced by _Mem_Alloc(), _Mem_CheckSentinels(), _Mem_Free(), _Mem_ReAlloc(), _Mem_TouchPool(), AddScriptToStack(), AI_CheckForMissionTargets(), AI_CivilianCalcBestAction(), AI_FindHerdLocation(), AI_FindHidingLocation(), AI_PrepBestAction(), AI_TurnIntoDirection(), AIL_InitActor(), AIL_positionshoot(), AIR_Add(), AIRFIGHT_ActionsAfterAirfight(), B_ParseBaseTemplate(), CalcTextureReflectivity(), Check_InitEntityDefs(), CIN_ROQ_DecodeCodeBook(), CIN_ROQ_DecodeInfo(), CIN_ROQ_DecodeSoundMono(), CIN_ROQ_DecodeSoundStereo(), CIN_ROQ_DecodeVideo(), CIN_ROQ_PlayCinematic(), CL_ActorConditionalMoveCalc(), CL_ActorDoMoveTime(), CL_ActorMaximumMove(), CL_ActorMoveLength(), CL_ActorStartMove(), CL_ActorTraceMove(), CL_ActorTurnMouse(), CL_AddPathingBox(), CL_BuildForbiddenList(), CL_DateConvert(), CL_DisplayHomebasePopup(), CL_GetEventTime(), CL_ParseCities(), CL_ParseParticle(), CL_ParsePtlCmds(), CL_ParticleCommandGetDataLocation(), CL_ParticleFunction(), CL_SwapSkills(), CM_AddMapTile(), Cmd_Exec_f(), CMod_DeCompressRouting(), CMod_LoadRouting(), CMod_RerouteMap(), Com_AddObjectLinks(), Com_ParseItem(), Com_ParseValue(), Com_SetValue(), Com_ValueToStr(), CompressRouting(), CopyLump(), CP_AddRadarCoverage(), CP_CalcAndUploadDayAndNightTexture(), CP_CreateBattleParameters(), CP_CreateNewMission(), CP_DrawRadarOverlayRow(), CP_LoadMissionsXML(), CP_ParseCharacterData(), CP_UpdateNationXVIInfection(), DoRouting(), ED_ParseField(), ExportLightmap(), file_write(), FinalLightFace(), FloatSwap(), FrustumVis(), FS_CopyFile(), FS_GetFileData(), FS_LoadFile(), FS_NextScriptHeader(), FS_Read(), FS_Seek(), FS_Write(), G_ActorDoTurn(), G_BuildForbiddenList(), G_ClientAction(), G_ClientMove(), G_Find(), G_ShootGrenade(), G_ShootSingle(), GetLevelFlagsFromBrush(), RGBAImage::getRGBAPixels(), Grid_CheckForbidden(), Grid_MoveMark(), HUD_PopupFiremodeReservation(), Img_LoadTypedImage(), Irc_Proto_ProcessServerMsg(), LE_DoPathMove(), LIST_Add(), LIST_AddPointer(), LIST_AddString(), LoadBSPFile(), sound::WavFileLoader::LoadFromStream(), LoadJPG(), LoadModel(), LoadPNG(), LoadTGA(), M_Start(), MAP_GetCivilianNumberByPosition(), MAP_GetColor(), MAP_GetCultureTypeByPos(), MAP_GetNation(), MAP_GetPopulationTypeByPos(), MAP_GetTerrainTypeByPos(), MD2SkinFix(), Mem_Size(), ModelWorker(), MP_LoadTeamMultiplayer(), MP_SaveTeamMultiplayer(), NET_ReadData(), NET_vReadFormat(), NET_vWriteFormat(), pos3L_goto(), R_BeginBuildingLightmaps(), R_BuildLightmap(), R_CreateSurfaceLightmap(), R_FilterTexture(), R_GetTagMatrix(), R_InitMiscTexture(), R_LoadMaterials(), R_LoadObjModel_(), R_LoadShader(), R_ModAddMapTile(), R_ModForName(), R_ModLoadAliasDPMModel(), R_ModLoadAliasMD2MeshIndexed(), R_ModLoadAliasMD2MeshUnindexed(), R_ModLoadAliasMD2Model(), R_ModLoadAliasMD3Model(), R_ModLoadLevelOfDetailData(), R_ModLoadLighting(), R_ModLoadMDX(), R_ModLoadTags(), R_PreprocessShader(), R_ScaleTexture(), R_ScreenShot(), R_SoftenTexture(), R_UploadData(), R_UploadTexture(), R_WriteCompressedTGA(), R_WriteJPG(), RS_InitTree(), S_LoadSampleChunk(), SAV_GameLoad(), SAV_GameSave(), StringToFilter(), SV_FilterPacket(), SV_LoadModelMinsMaxs(), SV_ModLoadAliasDPMModel(), SV_ModLoadAliasMD2Model(), SV_ModLoadAliasMD3Model(), SV_ParseMapcycle(), SV_ParseUMP(), SV_WriteDummyByte(), SVCmd_ListIP_f(), SVCmd_WriteIP_f(), testLinkedList(), TryLoadJPG(), TryLoadPNG(), TryLoadTGA(), U2M_Parameter(), UI_DeleteNode(), UI_ExecuteCallAction(), UI_GetFloatFromNodeProperty(), UI_GetReferenceFloat(), UI_GetStringFromNodeProperty(), UI_Init(), UI_InitializeNodeBehaviour(), UI_NodeSetProperty(), UI_NodeSetPropertyFromRAW(), UI_ParseEventProperty(), UI_ParseProperty(), and WriteTGA24().

#define MD2_MAGIC   "IDP2"

Definition at line 47 of file pm_md2.c.

Referenced by _md2_canload(), and _md2_load().

#define MD2_MAX_FRAMES   512

Definition at line 54 of file pm_md2.c.

#define MD2_MAX_MD2SKINS   32

Definition at line 55 of file pm_md2.c.

#define MD2_MAX_SKINNAME   64

Definition at line 56 of file pm_md2.c.

#define MD2_MAX_SKINNAME   64

Definition at line 56 of file pm_md2.c.

#define MD2_MAX_TRIANGLES   4096

Definition at line 52 of file pm_md2.c.

#define MD2_MAX_VERTS   2048

Definition at line 53 of file pm_md2.c.

#define MD2_NUMVERTEXNORMALS   162

Definition at line 50 of file pm_md2.c.

#define MD2_VERSION   8

Definition at line 48 of file pm_md2.c.

Referenced by _md2_canload(), and _md2_load().

#define PM_MD2_C

Definition at line 40 of file pm_md2.c.


Typedef Documentation

typedef struct md2_s md2_t
typedef struct md2Frame_s md2Frame_t

Function Documentation

static int _md2_canload ( PM_PARAMS_CANLOAD   )  [static]

Checks whether this module can load the given file.

Definition at line 180 of file pm_md2.c.

References _pico_little_long(), md2_s::magic, MD2_MAGIC, MD2_VERSION, PICO_PMV_ERROR_IDENT, PICO_PMV_ERROR_SIZE, PICO_PMV_ERROR_VERSION, PICO_PMV_OK, and md2_s::version.

static picoModel_t* _md2_load ( PM_PARAMS_LOAD   )  [static]

Variable Documentation

const float md2_normals[MD2_NUMVERTEXNORMALS][3] [static]

Definition at line 113 of file pm_md2.c.

Referenced by _md2_load().

Initial value:
 { "0.875", 
"Quake 2 MD2", 
"Nurail", 
"2003 Nurail", 
{ "md2", NULL, NULL, NULL 
}, _md2_canload, 
_md2_load, 
NULL, 
NULL 
}

Definition at line 447 of file pm_md2.c.


Generated by  doxygen 1.6.2