2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
\r
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
\r
5 This file is part of GtkRadiant.
\r
7 GtkRadiant is free software; you can redistribute it and/or modify
\r
8 it under the terms of the GNU General Public License as published by
\r
9 the Free Software Foundation; either version 2 of the License, or
\r
10 (at your option) any later version.
\r
12 GtkRadiant is distributed in the hope that it will be useful,
\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 GNU General Public License for more details.
\r
17 You should have received a copy of the GNU General Public License
\r
18 along with GtkRadiant; if not, write to the Free Software
\r
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\r
29 #include <sys/stat.h>
\r
33 #include "scriplib.h"
\r
34 #include "mathlib.h"
\r
37 #include "her2_threads.h"
\r
38 #include "l3dslib.h"
\r
39 #include "bspfile.h"
\r
42 #define stricmp strcasecmp
\r
43 #define strcmpi strcasecmp
\r
47 #define MODEL_AUTO 0
\r
51 // Model cover functions (to allow the forcing of a model type)
\r
52 void MODELCMD_Modelname (int modeltype);
\r
53 void MODELCMD_Cd (int modeltype);
\r
54 void MODELCMD_Origin (int modeltype);
\r
55 void MODELCMD_Jointed (int modeltype);
\r
56 void MODELCMD_Cluster (int modeltype);
\r
57 void MODELCMD_Base (int modeltype);
\r
58 void MODELCMD_BaseST (int modeltype);
\r
59 void MODELCMD_ScaleUp (int modeltype);
\r
60 void MODELCMD_Frame (int modeltype);
\r
61 void MODELCMD_Skin (int modeltype);
\r
62 void MODELCMD_Skinsize (int modeltype);
\r
63 void MODELCMD_Skeleton (int modeltype);
\r
64 void MODELCMD_SkeletalFrame (int modeltype);
\r
65 void MODELCMD_BeginGroup(int modeltype);
\r
66 void MODELCMD_EndGroup(int modeltype);
\r
67 void MODELCMD_Referenced(int modeltype);
\r
68 void MODELCMD_NodeOrder(int modeltype);
\r
70 void Cmd_Modelname (void);
\r
71 void Cmd_Base (void);
\r
73 void Cmd_Origin (void);
\r
74 void Cmd_ScaleUp (void);
\r
75 void Cmd_Frame (void);
\r
76 void Cmd_Skin (void);
\r
77 void Cmd_Skinsize (void);
\r
78 void FinishModel (void);
\r
79 void Cmd_Cluster (void);
\r
82 //void Cmd_FMModelname (void);
\r
83 void Cmd_FMBase (qboolean GetST);
\r
84 void Cmd_FMCd (void);
\r
85 //void Cmd_FMOrigin (void);
\r
86 void Cmd_FMCluster();
\r
87 void Cmd_FMSkeleton();
\r
88 //void Cmd_FMScaleUp (void);
\r
89 void Cmd_FMFrame (void);
\r
90 void Cmd_FMSkeletalFrame();
\r
91 void Cmd_FMSkin (void);
\r
92 //void Cmd_FMSkinsize (void);
\r
93 void Cmd_FMBeginGroup(void);
\r
94 void Cmd_FMEndGroup(void);
\r
95 void Cmd_FMReferenced();
\r
96 void Cmd_FMNodeOrder(void);
\r
97 void FMFinishModel (void);
\r
98 void GenSkin(char *ModelFile, char *OutputName, int Width, int Height);
\r
99 void NewGen (char *ModelFile, char *OutputName, int width, int height);
\r
102 void Cmd_Inverse16Table( void );
\r
104 void Cmd_SpriteName (void);
\r
105 void Cmd_Load (void);
\r
106 void Cmd_SpriteFrame (void);
\r
107 void Cmd_Sprdir (void);
\r
108 void FinishSprite (void);
\r
110 void Cmd_Grab (void);
\r
111 void Cmd_Raw (void);
\r
112 void Cmd_Mip (void);
\r
113 void Cmd_Environment (void);
\r
114 void Cmd_Colormap (void);
\r
116 void Cmd_File (void);
\r
117 void Cmd_Dir (void);
\r
118 void Cmd_StartWad (void);
\r
119 void Cmd_EndWad (void);
\r
120 void Cmd_Mippal (void);
\r
121 void Cmd_Mipdir (void);
\r
122 void Cmd_Alphalight (void);
\r
124 void Cmd_Picdir (void);
\r
125 void Cmd_Pic (void);
\r
127 void Cmd_Bookdir (void);
\r
128 void Cmd_Book (void);
\r
130 void Cmd_TextureMix (void);
\r
132 void Cmd_Video (void);
\r
134 //void RemapZero (byte *pixels, byte *palette, int width, int height);
\r
136 void ReleaseFile (char *filename);
\r
138 extern byte *byteimage, *lbmpalette;
\r
139 extern int byteimagewidth, byteimageheight;
\r
140 extern qboolean TrueColorImage;
\r
141 extern unsigned *longimage;
\r
142 extern int longimagewidth, longimageheight;
\r
144 extern qboolean g_release; // don't grab, copy output data to new tree
\r
145 extern char g_releasedir[1024]; // c:\quake2\baseq2, etc
\r
146 extern qboolean g_archive; // don't grab, copy source data to new tree
\r
147 extern qboolean do3ds;
\r
148 extern char g_only[256]; // if set, only grab this cd
\r
149 extern qboolean g_skipmodel; // set true when a cd is not g_only
\r
150 extern qboolean g_no_opimizations;
\r
151 extern int g_forcemodel;
\r
152 extern qboolean g_verbose;
\r
153 extern qboolean g_allow_newskin;
\r
154 extern qboolean g_ignoreTriUV; //from qdata.c
\r
155 extern qboolean g_dokeypress;
\r
157 extern char *trifileext;
\r
159 extern char g_materialFile[256];
\r
161 extern unsigned total_x;
\r
162 extern unsigned total_y;
\r
163 extern unsigned total_textures;
\r
165 miptex_t *CreateMip(byte *data, unsigned width, unsigned height, byte *palette, int *FinalSize, qboolean mip);
\r
166 miptex32_t *CreateMip32(unsigned *data, unsigned width, unsigned height, int *FinalSize, qboolean mip);
\r