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