#include "picointernal.h"
#include "../../../shared/byte.h"
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 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_VERSION 8 |
Definition at line 48 of file pm_md2.c.
Referenced by _md2_canload(), and _md2_load().
typedef struct md2Frame_s md2Frame_t |
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] |
Loads a ufo md2 model file.
Definition at line 206 of file pm_md2.c.
References _pico_alloc(), _pico_free(), _pico_little_float(), _pico_little_long(), _pico_little_short(), _pico_printf(), _pico_set_color(), _pico_setfext(), _pico_unixify(), md2_s::frameSize, i, md2Triangle_t::index_st, md2Triangle_t::index_xyz, md2XyzNormal_t::lightnormalindex, md2_s::magic, MD2_MAGIC, MD2_MAX_SKINNAME, MD2_MAX_TRIANGLES, md2_normals, MD2_VERSION, md2Frame_s::name, md2_s::numFrames, md2_s::numGLCmds, md2_s::numSkins, md2_s::numST, md2_s::numTris, md2_s::numXYZ, md2_s::ofsEnd, md2_s::ofsFrames, md2_s::ofsGLCmds, md2_s::ofsSkins, md2_s::ofsST, md2_s::ofsTris, PICO_ERROR, PICO_TRIANGLES, PICO_VERBOSE, PicoFreeModel(), PicoGetModelShader(), PicoNewModel(), PicoNewShader(), PicoNewSurface(), PicoSetModelFileName(), PicoSetModelFrameNum(), PicoSetModelName(), PicoSetModelNumFrames(), PicoSetShaderName(), PicoSetSurfaceColor(), PicoSetSurfaceIndex(), PicoSetSurfaceName(), PicoSetSurfaceNormal(), PicoSetSurfaceShader(), PicoSetSurfaceST(), PicoSetSurfaceType(), PicoSetSurfaceXYZ(), md2St_t::s, md2Frame_s::scale, md2_s::skinHeight, md2_s::skinWidth, st, md2St_t::t, md2Frame_s::translate, md2XyzNormal_t::v, md2_s::version, and md2Frame_s::verts.
const float md2_normals[MD2_NUMVERTEXNORMALS][3] [static] |
Definition at line 113 of file pm_md2.c.
Referenced by _md2_load().
const picoModule_t picoModuleMD2 |
{ "0.875", "Quake 2 MD2", "Nurail", "2003 Nurail", { "md2", NULL, NULL, NULL }, _md2_canload, _md2_load, NULL, NULL }