doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions
Model_lwo.cpp File Reference
#include "../idlib/precompiled.h"
#include "Model_lwo.h"

Go to the source code of this file.

Macros

#define FLEN_ERROR   -9999
 
#define ID_SRFS   LWID_('S','R','F','S')
 
#define ID_FLAG   LWID_('F','L','A','G')
 
#define ID_VLUM   LWID_('V','L','U','M')
 
#define ID_VDIF   LWID_('V','D','I','F')
 
#define ID_VSPC   LWID_('V','S','P','C')
 
#define ID_RFLT   LWID_('R','F','L','T')
 
#define ID_BTEX   LWID_('B','T','E','X')
 
#define ID_CTEX   LWID_('C','T','E','X')
 
#define ID_DTEX   LWID_('D','T','E','X')
 
#define ID_LTEX   LWID_('L','T','E','X')
 
#define ID_RTEX   LWID_('R','T','E','X')
 
#define ID_STEX   LWID_('S','T','E','X')
 
#define ID_TTEX   LWID_('T','T','E','X')
 
#define ID_TFLG   LWID_('T','F','L','G')
 
#define ID_TSIZ   LWID_('T','S','I','Z')
 
#define ID_TCTR   LWID_('T','C','T','R')
 
#define ID_TFAL   LWID_('T','F','A','L')
 
#define ID_TVEL   LWID_('T','V','E','L')
 
#define ID_TCLR   LWID_('T','C','L','R')
 
#define ID_TVAL   LWID_('T','V','A','L')
 
#define ID_TAMP   LWID_('T','A','M','P')
 
#define ID_TIMG   LWID_('T','I','M','G')
 
#define ID_TAAS   LWID_('T','A','A','S')
 
#define ID_TREF   LWID_('T','R','E','F')
 
#define ID_TOPC   LWID_('T','O','P','C')
 
#define ID_SDAT   LWID_('S','D','A','T')
 
#define ID_TFP0   LWID_('T','F','P','0')
 
#define ID_TFP1   LWID_('T','F','P','1')
 

Functions

void lwFreeClip (lwClip *clip)
 
lwCliplwGetClip (idFile *fp, int cksize)
 
lwCliplwFindClip (lwClip *list, int index)
 
void lwFree (void *ptr)
 
void lwFreeEnvelope (lwEnvelope *env)
 
lwEnvelopelwGetEnvelope (idFile *fp, int cksize)
 
lwEnvelopelwFindEnvelope (lwEnvelope *list, int index)
 
float evalEnvelope (lwEnvelope *env, float time)
 
void lwListFree (void *list, void(*freeNode)(void *))
 
void lwListAdd (void **list, void *node)
 
void lwListInsert (void **vlist, void *vitem, int(*compare)(void *, void *))
 
void set_flen (int i)
 
int get_flen (void)
 
voidgetbytes (idFile *fp, int size)
 
void skipbytes (idFile *fp, int n)
 
int getI1 (idFile *fp)
 
short getI2 (idFile *fp)
 
int getI4 (idFile *fp)
 
unsigned char getU1 (idFile *fp)
 
unsigned short getU2 (idFile *fp)
 
unsigned int getU4 (idFile *fp)
 
int getVX (idFile *fp)
 
float getF4 (idFile *fp)
 
char * getS0 (idFile *fp)
 
int sgetI1 (unsigned char **bp)
 
short sgetI2 (unsigned char **bp)
 
int sgetI4 (unsigned char **bp)
 
unsigned char sgetU1 (unsigned char **bp)
 
unsigned short sgetU2 (unsigned char **bp)
 
unsigned int sgetU4 (unsigned char **bp)
 
int sgetVX (unsigned char **bp)
 
float sgetF4 (unsigned char **bp)
 
char * sgetS0 (unsigned char **bp)
 
void lwFreeLayer (lwLayer *layer)
 
void lwFreeObject (lwObject *object)
 
lwObjectlwGetObject (const char *filename, unsigned int *failID, int *failpos)
 
lwSurfacelwGetSurface5 (idFile *fp, int cksize, lwObject *obj)
 
int lwGetPolygons5 (idFile *fp, int cksize, lwPolygonList *plist, int ptoffset)
 
lwObjectlwGetObject5 (const char *filename, unsigned int *failID, int *failpos)
 
void lwFreePoints (lwPointList *point)
 
void lwFreePolygons (lwPolygonList *plist)
 
int lwGetPoints (idFile *fp, int cksize, lwPointList *point)
 
void lwGetBoundingBox (lwPointList *point, float bbox[])
 
int lwAllocPolygons (lwPolygonList *plist, int npols, int nverts)
 
int lwGetPolygons (idFile *fp, int cksize, lwPolygonList *plist, int ptoffset)
 
void lwGetPolyNormals (lwPointList *point, lwPolygonList *polygon)
 
int lwGetPointPolygons (lwPointList *point, lwPolygonList *polygon)
 
int lwResolvePolySurfaces (lwPolygonList *polygon, lwTagList *tlist, lwSurface **surf, int *nsurfs)
 
void lwGetVertNormals (lwPointList *point, lwPolygonList *polygon)
 
void lwFreeTags (lwTagList *tlist)
 
int lwGetTags (idFile *fp, int cksize, lwTagList *tlist)
 
int lwGetPolygonTags (idFile *fp, int cksize, lwTagList *tlist, lwPolygonList *plist)
 
void lwFreePlugin (lwPlugin *p)
 
void lwFreeTexture (lwTexture *t)
 
void lwFreeSurface (lwSurface *surf)
 
int lwGetTHeader (idFile *fp, int hsz, lwTexture *tex)
 
int lwGetTMap (idFile *fp, int tmapsz, lwTMap *tmap)
 
int lwGetImageMap (idFile *fp, int rsz, lwTexture *tex)
 
int lwGetProcedural (idFile *fp, int rsz, lwTexture *tex)
 
int lwGetGradient (idFile *fp, int rsz, lwTexture *tex)
 
lwTexturelwGetTexture (idFile *fp, int bloksz, unsigned int type)
 
lwPluginlwGetShader (idFile *fp, int bloksz)
 
lwSurfacelwDefaultSurface (void)
 
lwSurfacelwGetSurface (idFile *fp, int cksize)
 
float dot (float a[], float b[])
 
void cross (float a[], float b[], float c[])
 
void normalize (float v[])
 
void lwFreeVMap (lwVMap *vmap)
 
lwVMaplwGetVMap (idFile *fp, int cksize, int ptoffset, int poloffset, int perpoly)
 
int lwGetPointVMaps (lwPointList *point, lwVMap *vmap)
 
int lwGetPolyVMaps (lwPolygonList *polygon, lwVMap *vmap)
 

Macro Definition Documentation

#define FLEN_ERROR   -9999

Definition at line 998 of file Model_lwo.cpp.

#define ID_BTEX   LWID_('B','T','E','X')

Definition at line 1661 of file Model_lwo.cpp.

#define ID_CTEX   LWID_('C','T','E','X')

Definition at line 1662 of file Model_lwo.cpp.

#define ID_DTEX   LWID_('D','T','E','X')

Definition at line 1663 of file Model_lwo.cpp.

#define ID_FLAG   LWID_('F','L','A','G')

Definition at line 1656 of file Model_lwo.cpp.

#define ID_LTEX   LWID_('L','T','E','X')

Definition at line 1664 of file Model_lwo.cpp.

#define ID_RFLT   LWID_('R','F','L','T')

Definition at line 1660 of file Model_lwo.cpp.

#define ID_RTEX   LWID_('R','T','E','X')

Definition at line 1665 of file Model_lwo.cpp.

#define ID_SDAT   LWID_('S','D','A','T')

Definition at line 1680 of file Model_lwo.cpp.

#define ID_SRFS   LWID_('S','R','F','S')

Definition at line 1655 of file Model_lwo.cpp.

#define ID_STEX   LWID_('S','T','E','X')

Definition at line 1666 of file Model_lwo.cpp.

#define ID_TAAS   LWID_('T','A','A','S')

Definition at line 1677 of file Model_lwo.cpp.

#define ID_TAMP   LWID_('T','A','M','P')

Definition at line 1675 of file Model_lwo.cpp.

#define ID_TCLR   LWID_('T','C','L','R')

Definition at line 1673 of file Model_lwo.cpp.

#define ID_TCTR   LWID_('T','C','T','R')

Definition at line 1670 of file Model_lwo.cpp.

#define ID_TFAL   LWID_('T','F','A','L')

Definition at line 1671 of file Model_lwo.cpp.

#define ID_TFLG   LWID_('T','F','L','G')

Definition at line 1668 of file Model_lwo.cpp.

#define ID_TFP0   LWID_('T','F','P','0')

Definition at line 1681 of file Model_lwo.cpp.

#define ID_TFP1   LWID_('T','F','P','1')

Definition at line 1682 of file Model_lwo.cpp.

#define ID_TIMG   LWID_('T','I','M','G')

Definition at line 1676 of file Model_lwo.cpp.

#define ID_TOPC   LWID_('T','O','P','C')

Definition at line 1679 of file Model_lwo.cpp.

#define ID_TREF   LWID_('T','R','E','F')

Definition at line 1678 of file Model_lwo.cpp.

#define ID_TSIZ   LWID_('T','S','I','Z')

Definition at line 1669 of file Model_lwo.cpp.

#define ID_TTEX   LWID_('T','T','E','X')

Definition at line 1667 of file Model_lwo.cpp.

#define ID_TVAL   LWID_('T','V','A','L')

Definition at line 1674 of file Model_lwo.cpp.

#define ID_TVEL   LWID_('T','V','E','L')

Definition at line 1672 of file Model_lwo.cpp.

#define ID_VDIF   LWID_('V','D','I','F')

Definition at line 1658 of file Model_lwo.cpp.

#define ID_VLUM   LWID_('V','L','U','M')

Definition at line 1657 of file Model_lwo.cpp.

#define ID_VSPC   LWID_('V','S','P','C')

Definition at line 1659 of file Model_lwo.cpp.

Function Documentation

void cross ( float  a[],
float  b[],
float  c[] 
)

Definition at line 3889 of file Model_lwo.cpp.

float dot ( float  a[],
float  b[] 
)

Definition at line 3883 of file Model_lwo.cpp.

float evalEnvelope ( lwEnvelope env,
float  time 
)

Definition at line 765 of file Model_lwo.cpp.

int get_flen ( void  )

Definition at line 1004 of file Model_lwo.cpp.

void* getbytes ( idFile fp,
int  size 
)

Definition at line 1006 of file Model_lwo.cpp.

float getF4 ( idFile fp)

Definition at line 1178 of file Model_lwo.cpp.

int getI1 ( idFile fp)

Definition at line 1041 of file Model_lwo.cpp.

short getI2 ( idFile fp)

Definition at line 1058 of file Model_lwo.cpp.

int getI4 ( idFile fp)

Definition at line 1073 of file Model_lwo.cpp.

char* getS0 ( idFile fp)

Definition at line 1197 of file Model_lwo.cpp.

unsigned char getU1 ( idFile fp)

Definition at line 1088 of file Model_lwo.cpp.

unsigned short getU2 ( idFile fp)

Definition at line 1104 of file Model_lwo.cpp.

unsigned int getU4 ( idFile fp)

Definition at line 1119 of file Model_lwo.cpp.

int getVX ( idFile fp)

Definition at line 1134 of file Model_lwo.cpp.

int lwAllocPolygons ( lwPolygonList plist,
int  npols,
int  nverts 
)

Definition at line 2479 of file Model_lwo.cpp.

lwSurface* lwDefaultSurface ( void  )

Definition at line 3628 of file Model_lwo.cpp.

lwClip* lwFindClip ( lwClip list,
int  index 
)

Definition at line 290 of file Model_lwo.cpp.

lwEnvelope* lwFindEnvelope ( lwEnvelope list,
int  index 
)

Definition at line 481 of file Model_lwo.cpp.

void lwFree ( void ptr)

Definition at line 310 of file Model_lwo.cpp.

void lwFreeClip ( lwClip clip)

Definition at line 49 of file Model_lwo.cpp.

void lwFreeEnvelope ( lwEnvelope env)

Definition at line 314 of file Model_lwo.cpp.

void lwFreeLayer ( lwLayer layer)

Definition at line 1392 of file Model_lwo.cpp.

void lwFreeObject ( lwObject object)

Definition at line 1411 of file Model_lwo.cpp.

void lwFreePlugin ( lwPlugin p)

Definition at line 2896 of file Model_lwo.cpp.

void lwFreePoints ( lwPointList point)

Definition at line 2348 of file Model_lwo.cpp.

void lwFreePolygons ( lwPolygonList plist)

Definition at line 2372 of file Model_lwo.cpp.

void lwFreeSurface ( lwSurface surf)

Definition at line 2944 of file Model_lwo.cpp.

void lwFreeTags ( lwTagList tlist)

Definition at line 2773 of file Model_lwo.cpp.

void lwFreeTexture ( lwTexture t)

Definition at line 2914 of file Model_lwo.cpp.

void lwFreeVMap ( lwVMap vmap)

Definition at line 3916 of file Model_lwo.cpp.

void lwGetBoundingBox ( lwPointList point,
float  bbox[] 
)

Definition at line 2450 of file Model_lwo.cpp.

lwClip* lwGetClip ( idFile fp,
int  cksize 
)

Definition at line 90 of file Model_lwo.cpp.

lwEnvelope* lwGetEnvelope ( idFile fp,
int  cksize 
)

Definition at line 338 of file Model_lwo.cpp.

int lwGetGradient ( idFile fp,
int  rsz,
lwTexture tex 
)

Definition at line 3340 of file Model_lwo.cpp.

int lwGetImageMap ( idFile fp,
int  rsz,
lwTexture tex 
)

Definition at line 3156 of file Model_lwo.cpp.

lwObject* lwGetObject ( const char *  filename,
unsigned int failID,
int failpos 
)

Definition at line 1445 of file Model_lwo.cpp.

lwObject* lwGetObject5 ( const char *  filename,
unsigned int failID,
int failpos 
)

Definition at line 2219 of file Model_lwo.cpp.

int lwGetPointPolygons ( lwPointList point,
lwPolygonList polygon 
)

Definition at line 2634 of file Model_lwo.cpp.

int lwGetPoints ( idFile fp,
int  cksize,
lwPointList point 
)

Definition at line 2402 of file Model_lwo.cpp.

int lwGetPointVMaps ( lwPointList point,
lwVMap vmap 
)

Definition at line 4028 of file Model_lwo.cpp.

int lwGetPolygons ( idFile fp,
int  cksize,
lwPolygonList plist,
int  ptoffset 
)

Definition at line 2522 of file Model_lwo.cpp.

int lwGetPolygons5 ( idFile fp,
int  cksize,
lwPolygonList plist,
int  ptoffset 
)

Definition at line 2128 of file Model_lwo.cpp.

int lwGetPolygonTags ( idFile fp,
int  cksize,
lwTagList tlist,
lwPolygonList plist 
)

Definition at line 2857 of file Model_lwo.cpp.

void lwGetPolyNormals ( lwPointList point,
lwPolygonList polygon 
)

Definition at line 2599 of file Model_lwo.cpp.

int lwGetPolyVMaps ( lwPolygonList polygon,
lwVMap vmap 
)

Definition at line 4080 of file Model_lwo.cpp.

int lwGetProcedural ( idFile fp,
int  rsz,
lwTexture tex 
)

Definition at line 3265 of file Model_lwo.cpp.

lwPlugin* lwGetShader ( idFile fp,
int  bloksz 
)

Definition at line 3486 of file Model_lwo.cpp.

lwSurface* lwGetSurface ( idFile fp,
int  cksize 
)

Definition at line 3655 of file Model_lwo.cpp.

lwSurface* lwGetSurface5 ( idFile fp,
int  cksize,
lwObject obj 
)

Definition at line 1821 of file Model_lwo.cpp.

int lwGetTags ( idFile fp,
int  cksize,
lwTagList tlist 
)

Definition at line 2798 of file Model_lwo.cpp.

lwTexture* lwGetTexture ( idFile fp,
int  bloksz,
unsigned int  type 
)

Definition at line 3438 of file Model_lwo.cpp.

int lwGetTHeader ( idFile fp,
int  hsz,
lwTexture tex 
)

Definition at line 2977 of file Model_lwo.cpp.

int lwGetTMap ( idFile fp,
int  tmapsz,
lwTMap tmap 
)

Definition at line 3068 of file Model_lwo.cpp.

void lwGetVertNormals ( lwPointList point,
lwPolygonList polygon 
)

Definition at line 2733 of file Model_lwo.cpp.

lwVMap* lwGetVMap ( idFile fp,
int  cksize,
int  ptoffset,
int  poloffset,
int  perpoly 
)

Definition at line 3938 of file Model_lwo.cpp.

void lwListAdd ( void **  list,
void node 
)

Definition at line 925 of file Model_lwo.cpp.

void lwListFree ( void list,
void(*)(void *)  freeNode 
)

Definition at line 905 of file Model_lwo.cpp.

void lwListInsert ( void **  vlist,
void vitem,
int(*)(void *, void *)  compare 
)

Definition at line 950 of file Model_lwo.cpp.

int lwResolvePolySurfaces ( lwPolygonList polygon,
lwTagList tlist,
lwSurface **  surf,
int nsurfs 
)

Definition at line 2676 of file Model_lwo.cpp.

void normalize ( float  v[])

Definition at line 3897 of file Model_lwo.cpp.

void set_flen ( int  i)

Definition at line 1002 of file Model_lwo.cpp.

float sgetF4 ( unsigned char **  bp)

Definition at line 1341 of file Model_lwo.cpp.

int sgetI1 ( unsigned char **  bp)

Definition at line 1243 of file Model_lwo.cpp.

short sgetI2 ( unsigned char **  bp)

Definition at line 1256 of file Model_lwo.cpp.

int sgetI4 ( unsigned char **  bp)

Definition at line 1269 of file Model_lwo.cpp.

char* sgetS0 ( unsigned char **  bp)

Definition at line 1358 of file Model_lwo.cpp.

unsigned char sgetU1 ( unsigned char **  bp)

Definition at line 1282 of file Model_lwo.cpp.

unsigned short sgetU2 ( unsigned char **  bp)

Definition at line 1294 of file Model_lwo.cpp.

unsigned int sgetU4 ( unsigned char **  bp)

Definition at line 1307 of file Model_lwo.cpp.

int sgetVX ( unsigned char **  bp)

Definition at line 1320 of file Model_lwo.cpp.

void skipbytes ( idFile fp,
int  n 
)

Definition at line 1031 of file Model_lwo.cpp.