44 #define LWID_(a,b,c,d) (((a)<<24)|((b)<<16)|((c)<<8)|(d))
46 #define ID_FORM LWID_('F','O','R','M')
47 #define ID_LWO2 LWID_('L','W','O','2')
48 #define ID_LWOB LWID_('L','W','O','B')
51 #define ID_LAYR LWID_('L','A','Y','R')
52 #define ID_TAGS LWID_('T','A','G','S')
53 #define ID_PNTS LWID_('P','N','T','S')
54 #define ID_BBOX LWID_('B','B','O','X')
55 #define ID_VMAP LWID_('V','M','A','P')
56 #define ID_VMAD LWID_('V','M','A','D')
57 #define ID_POLS LWID_('P','O','L','S')
58 #define ID_PTAG LWID_('P','T','A','G')
59 #define ID_ENVL LWID_('E','N','V','L')
60 #define ID_CLIP LWID_('C','L','I','P')
61 #define ID_SURF LWID_('S','U','R','F')
62 #define ID_DESC LWID_('D','E','S','C')
63 #define ID_TEXT LWID_('T','E','X','T')
64 #define ID_ICON LWID_('I','C','O','N')
67 #define ID_FACE LWID_('F','A','C','E')
68 #define ID_CURV LWID_('C','U','R','V')
69 #define ID_PTCH LWID_('P','T','C','H')
70 #define ID_MBAL LWID_('M','B','A','L')
71 #define ID_BONE LWID_('B','O','N','E')
74 #define ID_SURF LWID_('S','U','R','F')
75 #define ID_PART LWID_('P','A','R','T')
76 #define ID_SMGP LWID_('S','M','G','P')
79 #define ID_PRE LWID_('P','R','E',' ')
80 #define ID_POST LWID_('P','O','S','T')
81 #define ID_KEY LWID_('K','E','Y',' ')
82 #define ID_SPAN LWID_('S','P','A','N')
83 #define ID_TCB LWID_('T','C','B',' ')
84 #define ID_HERM LWID_('H','E','R','M')
85 #define ID_BEZI LWID_('B','E','Z','I')
86 #define ID_BEZ2 LWID_('B','E','Z','2')
87 #define ID_LINE LWID_('L','I','N','E')
88 #define ID_STEP LWID_('S','T','E','P')
91 #define ID_STIL LWID_('S','T','I','L')
92 #define ID_ISEQ LWID_('I','S','E','Q')
93 #define ID_ANIM LWID_('A','N','I','M')
94 #define ID_XREF LWID_('X','R','E','F')
95 #define ID_STCC LWID_('S','T','C','C')
96 #define ID_TIME LWID_('T','I','M','E')
97 #define ID_CONT LWID_('C','O','N','T')
98 #define ID_BRIT LWID_('B','R','I','T')
99 #define ID_SATR LWID_('S','A','T','R')
100 #define ID_HUE LWID_('H','U','E',' ')
101 #define ID_GAMM LWID_('G','A','M','M')
102 #define ID_NEGA LWID_('N','E','G','A')
103 #define ID_IFLT LWID_('I','F','L','T')
104 #define ID_PFLT LWID_('P','F','L','T')
107 #define ID_COLR LWID_('C','O','L','R')
108 #define ID_LUMI LWID_('L','U','M','I')
109 #define ID_DIFF LWID_('D','I','F','F')
110 #define ID_SPEC LWID_('S','P','E','C')
111 #define ID_GLOS LWID_('G','L','O','S')
112 #define ID_REFL LWID_('R','E','F','L')
113 #define ID_RFOP LWID_('R','F','O','P')
114 #define ID_RIMG LWID_('R','I','M','G')
115 #define ID_RSAN LWID_('R','S','A','N')
116 #define ID_TRAN LWID_('T','R','A','N')
117 #define ID_TROP LWID_('T','R','O','P')
118 #define ID_TIMG LWID_('T','I','M','G')
119 #define ID_RIND LWID_('R','I','N','D')
120 #define ID_TRNL LWID_('T','R','N','L')
121 #define ID_BUMP LWID_('B','U','M','P')
122 #define ID_SMAN LWID_('S','M','A','N')
123 #define ID_SIDE LWID_('S','I','D','E')
124 #define ID_CLRH LWID_('C','L','R','H')
125 #define ID_CLRF LWID_('C','L','R','F')
126 #define ID_ADTR LWID_('A','D','T','R')
127 #define ID_SHRP LWID_('S','H','R','P')
128 #define ID_LINE LWID_('L','I','N','E')
129 #define ID_LSIZ LWID_('L','S','I','Z')
130 #define ID_ALPH LWID_('A','L','P','H')
131 #define ID_AVAL LWID_('A','V','A','L')
132 #define ID_GVAL LWID_('G','V','A','L')
133 #define ID_BLOK LWID_('B','L','O','K')
136 #define ID_TYPE LWID_('T','Y','P','E')
137 #define ID_CHAN LWID_('C','H','A','N')
138 #define ID_NAME LWID_('N','A','M','E')
139 #define ID_ENAB LWID_('E','N','A','B')
140 #define ID_OPAC LWID_('O','P','A','C')
141 #define ID_FLAG LWID_('F','L','A','G')
142 #define ID_PROJ LWID_('P','R','O','J')
143 #define ID_STCK LWID_('S','T','C','K')
144 #define ID_TAMP LWID_('T','A','M','P')
147 #define ID_TMAP LWID_('T','M','A','P')
148 #define ID_AXIS LWID_('A','X','I','S')
149 #define ID_CNTR LWID_('C','N','T','R')
150 #define ID_SIZE LWID_('S','I','Z','E')
151 #define ID_ROTA LWID_('R','O','T','A')
152 #define ID_OREF LWID_('O','R','E','F')
153 #define ID_FALL LWID_('F','A','L','L')
154 #define ID_CSYS LWID_('C','S','Y','S')
157 #define ID_IMAP LWID_('I','M','A','P')
158 #define ID_IMAG LWID_('I','M','A','G')
159 #define ID_WRAP LWID_('W','R','A','P')
160 #define ID_WRPW LWID_('W','R','P','W')
161 #define ID_WRPH LWID_('W','R','P','H')
162 #define ID_VMAP LWID_('V','M','A','P')
163 #define ID_AAST LWID_('A','A','S','T')
164 #define ID_PIXB LWID_('P','I','X','B')
167 #define ID_PROC LWID_('P','R','O','C')
168 #define ID_COLR LWID_('C','O','L','R')
169 #define ID_VALU LWID_('V','A','L','U')
170 #define ID_FUNC LWID_('F','U','N','C')
171 #define ID_FTPS LWID_('F','T','P','S')
172 #define ID_ITPS LWID_('I','T','P','S')
173 #define ID_ETPS LWID_('E','T','P','S')
176 #define ID_GRAD LWID_('G','R','A','D')
177 #define ID_GRST LWID_('G','R','S','T')
178 #define ID_GREN LWID_('G','R','E','N')
179 #define ID_PNAM LWID_('P','N','A','M')
180 #define ID_INAM LWID_('I','N','A','M')
181 #define ID_GRPT LWID_('G','R','P','T')
182 #define ID_FKEY LWID_('F','K','E','Y')
183 #define ID_IKEY LWID_('I','K','E','Y')
186 #define ID_SHDR LWID_('S','H','D','R')
187 #define ID_DATA LWID_('D','A','T','A')
235 #define BEH_CONSTANT 1
237 #define BEH_OSCILLATE 3
344 #define PROJ_PLANAR 0
345 #define PROJ_CYLINDRICAL 1
346 #define PROJ_SPHERICAL 2
352 #define WRAP_REPEAT 2
353 #define WRAP_MIRROR 3
639 void lwListFree(
void *list,
void ( *freeNode )(
void * ));
640 void lwListAdd(
void **list,
void *node );
642 int ( *compare )(
void *,
void * ));
646 float dot(
float a[],
float b[] );
647 void cross(
float a[],
float b[],
float c[] );
649 #define vecangle( a, b ) ( float ) idMath::ACos( dot( a, b ) )
666 int sgetI1(
unsigned char **bp );
667 short sgetI2(
unsigned char **bp );
668 int sgetI4(
unsigned char **bp );
669 unsigned char sgetU1(
unsigned char **bp );
670 unsigned short sgetU2(
unsigned char **bp );
671 unsigned int sgetU4(
unsigned char **bp );
672 int sgetVX(
unsigned char **bp );
673 float sgetF4(
unsigned char **bp );
674 char *
sgetS0(
unsigned char **bp );
struct st_lwSurface * next
int lwGetGradient(idFile *fp, int rsz, lwTexture *tex)
lwEnvelope * lwFindEnvelope(lwEnvelope *list, int index)
lwTexture * lwGetTexture(idFile *fp, int bloksz, unsigned int type)
GLsizei const GLfloat * value
int lwGetPoints(idFile *fp, int cksize, lwPointList *point)
unsigned short sgetU2(unsigned char **bp)
int lwGetTMap(idFile *fp, int tmapsz, lwTMap *tmap)
void lwGetPolyNormals(lwPointList *point, lwPolygonList *polygon)
unsigned char sgetU1(unsigned char **bp)
struct st_lwClipCycle lwClipCycle
void lwFreeTags(lwTagList *tlist)
lwObject * lwGetObject5(const char *filename, unsigned int *failID, int *failpos)
void skipbytes(idFile *fp, int n)
struct st_lwEnvelope lwEnvelope
void lwFreeTexture(lwTexture *t)
void lwFreeClip(lwClip *clip)
struct st_lwVMapPt lwVMapPt
struct st_lwPolygonList lwPolygonList
struct st_lwTagList lwTagList
void lwFreeSurface(lwSurface *surf)
struct st_lwImageMap lwImageMap
void lwListFree(void *list, void(*freeNode)(void *))
struct st_lwGradKey * next
int lwGetPolygons(idFile *fp, int cksize, lwPolygonList *plist, int ptoffset)
void cross(float a[], float b[], float c[])
struct st_lwClipSeq lwClipSeq
union st_lwClip::@92 source
int lwGetPointVMaps(lwPointList *point, lwVMap *vmap)
struct st_lwEnvelope * prev
struct st_lwClipXRef lwClipXRef
void lwGetBoundingBox(lwPointList *point, float bbox[])
struct st_lwPlugin * next
GLuint GLuint GLsizei GLenum type
lwPlugin * lwGetShader(idFile *fp, int bloksz)
struct st_lwPlugin * prev
struct st_lwCParam lwCParam
struct st_lwPlugin lwPlugin
int sgetI4(unsigned char **bp)
struct st_lwTexture * next
unsigned short getU2(idFile *fp)
struct st_lwSurface * prev
struct st_lwVParam lwVParam
int lwGetPolyVMaps(lwPolygonList *polygon, lwVMap *vmap)
void lwListAdd(void **list, void *node)
int lwGetPolygonTags(idFile *fp, int cksize, lwTagList *tlist, lwPolygonList *plist)
struct st_lwPointList lwPointList
void lwFreeLayer(lwLayer *layer)
struct st_lwPoint lwPoint
void lwListInsert(void **vlist, void *vitem, int(*compare)(void *, void *))
int lwGetImageMap(idFile *fp, int rsz, lwTexture *tex)
int lwAllocPolygons(lwPolygonList *plist, int npols, int nverts)
void normalize(float v[])
struct st_lwClipAnim lwClipAnim
struct st_lwEParam lwEParam
struct st_lwTexture * prev
int lwGetPolygons5(idFile *fp, int cksize, lwPolygonList *plist, int ptoffset)
struct st_lwEnvelope * next
float lwEvalEnvelope(lwEnvelope *env, float time)
int sgetI1(unsigned char **bp)
int lwGetTHeader(idFile *fp, int hsz, lwTexture *tex)
struct st_lwGradKey * prev
char * sgetS0(unsigned char **bp)
void lwFreeEnvelope(lwEnvelope *env)
struct st_lwPolVert lwPolVert
void lwFreePlugin(lwPlugin *p)
GLubyte GLubyte GLubyte a
unsigned char getU1(idFile *fp)
lwObject * lwGetObject(const char *filename, unsigned int *failID, int *failpos)
struct st_lwPolygon lwPolygon
void * getbytes(idFile *fp, int size)
struct st_lwLayer lwLayer
struct st_lwSurface lwSurface
int lwResolvePolySurfaces(lwPolygonList *polygon, lwTagList *tlist, lwSurface **surf, int *nsurfs)
lwEnvelope * lwGetEnvelope(idFile *fp, int cksize)
void lwFreeVMap(lwVMap *vmap)
struct st_lwTexture lwTexture
lwSurface * lwGetSurface5(idFile *fp, int cksize, lwObject *obj)
void lwFreePoints(lwPointList *point)
struct st_lwGradient lwGradient
struct st_lwProcedural lwProcedural
struct st_lwTParam lwTParam
int lwGetProcedural(idFile *fp, int rsz, lwTexture *tex)
void lwFreeObject(lwObject *object)
int lwGetTags(idFile *fp, int cksize, lwTagList *tlist)
struct st_lwClipStill lwClipStill
float dot(float a[], float b[])
union st_lwTexture::@93 param
struct st_lwObject lwObject
lwSurface * lwDefaultSurface(void)
int lwGetPointPolygons(lwPointList *point, lwPolygonList *polygon)
void lwGetVertNormals(lwPointList *point, lwPolygonList *polygon)
int sgetVX(unsigned char **bp)
short sgetI2(unsigned char **bp)
unsigned int sgetU4(unsigned char **bp)
lwSurface * lwGetSurface(idFile *fp, int cksize)
struct st_lwGradKey lwGradKey
lwClip * lwFindClip(lwClip *list, int index)
float sgetF4(unsigned char **bp)
void lwFreePolygons(lwPolygonList *plist)
unsigned int getU4(idFile *fp)
lwVMap * lwGetVMap(idFile *fp, int cksize, int ptoffset, int poloffset, int perpoly)
lwClip * lwGetClip(idFile *fp, int cksize)