]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
ported over the 1.5 branch version of q3map2 which is newer
authorForest Hale <lordhavoc>
Fri, 25 Jul 2008 07:31:37 +0000 (07:31 +0000)
committerForest Hale <lordhavoc>
Fri, 25 Jul 2008 07:31:37 +0000 (07:31 +0000)
made Visual Studio files work in VS2005 Express
fixed a ton of warnings in VS2005 Express
fixed some compile problems on OpenSUSE 11.0

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@302 8a3a26a2-13c4-0310-b231-cf6edde360e5

126 files changed:
SConscript.q3map2
contrib/bkgrnd2d/dialog.cpp
contrib/camera/camera.vcproj
contrib/camera/dialogs.cpp
contrib/camera/dialogs_common.cpp
contrib/camera/funchandlers.cpp
contrib/gtkgensurf/gendlgs.cpp
contrib/gtkgensurf/gensurf.cpp
include/qerplugin.h
libs/ddslib/ddslib.c
libs/picomodel/lwo/lwob.c
libs/picomodel/lwo/pntspols.c
plugins/entity/light.cpp
plugins/surface/surfacedialog.cpp
radiant/bp_dlg.cpp
radiant/brush.cpp
radiant/gtkdlgs.cpp
radiant/gtkmisc.cpp
radiant/gtkmisc.h
radiant/missing.cpp
radiant/radiant.rc
radiant/radiant.vcproj
radiant/selectedface.cpp
radiant/winding.cpp
tools/quake2/common/cmdlib.c
tools/quake2/common/cmdlib.h
tools/quake2/common/inout.c
tools/quake2/common/path_init.c
tools/quake2/common/qfiles.h
tools/quake2/common/threads.c
tools/quake2/q2map/q2map.h
tools/quake2/q2map/qbsp.h
tools/quake2/q2map/qrad.h
tools/quake2/q2map/qvis.h
tools/quake2/q2map/writebsp.c
tools/quake2/qdata/images.c
tools/quake2/qdata/models.c
tools/quake2/qdata/qdata.c
tools/quake2/qdata/qdata.h
tools/quake2/qdata/sprites.c
tools/quake2/qdata/tables.c
tools/quake2/qdata/video.c
tools/quake2/qdata_heretic2/anorms.h
tools/quake2/qdata_heretic2/common/cmdlib.c
tools/quake2/qdata_heretic2/common/inout.c
tools/quake2/qdata_heretic2/common/md4.c
tools/quake2/qdata_heretic2/common/path_init.c
tools/quake2/qdata_heretic2/common/threads.c
tools/quake2/qdata_heretic2/qdata.c
tools/quake3/common/cmdlib.c
tools/quake3/common/imagelib.c
tools/quake3/common/imagelib.h
tools/quake3/common/inout.c
tools/quake3/common/inout.h
tools/quake3/common/mutex.c
tools/quake3/common/polylib.c
tools/quake3/common/surfaceflags.h
tools/quake3/common/threads.c
tools/quake3/common/vfs.c
tools/quake3/q3data/3dslib.c
tools/quake3/q3data/3dslib.h
tools/quake3/q3data/compress.c
tools/quake3/q3data/images.c
tools/quake3/q3data/md3lib.c
tools/quake3/q3data/md3lib.h
tools/quake3/q3data/models.c
tools/quake3/q3data/oldstuff.c
tools/quake3/q3data/p3dlib.c
tools/quake3/q3data/p3dlib.h
tools/quake3/q3data/polyset.c
tools/quake3/q3data/q3data.c
tools/quake3/q3data/q3data.h
tools/quake3/q3data/stripper.c
tools/quake3/q3data/video.c
tools/quake3/q3map2/brush.c
tools/quake3/q3map2/brush_primit.c
tools/quake3/q3map2/bsp.c
tools/quake3/q3map2/bspfile_abstract.c
tools/quake3/q3map2/bspfile_ibsp.c
tools/quake3/q3map2/bspfile_rbsp.c
tools/quake3/q3map2/changelog.q3map1
tools/quake3/q3map2/changelog.q3map2.txt
tools/quake3/q3map2/convert_ase.c
tools/quake3/q3map2/convert_map.c
tools/quake3/q3map2/decals.c
tools/quake3/q3map2/facebsp.c
tools/quake3/q3map2/fog.c
tools/quake3/q3map2/game_ef.h
tools/quake3/q3map2/game_etut.h [new file with mode: 0644]
tools/quake3/q3map2/game_ja.h
tools/quake3/q3map2/game_jk2.h
tools/quake3/q3map2/game_qfusion.h [new file with mode: 0644]
tools/quake3/q3map2/game_quake3.h
tools/quake3/q3map2/game_sof2.h
tools/quake3/q3map2/game_tenebrae.h
tools/quake3/q3map2/game_tremulous.h [new file with mode: 0644]
tools/quake3/q3map2/game_wolf.h
tools/quake3/q3map2/game_wolfet.h
tools/quake3/q3map2/image.c
tools/quake3/q3map2/leakfile.c
tools/quake3/q3map2/light.c
tools/quake3/q3map2/light_bounce.c
tools/quake3/q3map2/light_trace.c
tools/quake3/q3map2/light_ydnar.c
tools/quake3/q3map2/lightmaps_ydnar.c
tools/quake3/q3map2/main.c
tools/quake3/q3map2/map.c
tools/quake3/q3map2/mesh.c
tools/quake3/q3map2/model.c
tools/quake3/q3map2/patch.c
tools/quake3/q3map2/path_init.c
tools/quake3/q3map2/portals.c
tools/quake3/q3map2/prtfile.c
tools/quake3/q3map2/q3map2.h
tools/quake3/q3map2/q3map2.vcproj
tools/quake3/q3map2/shaders.c
tools/quake3/q3map2/surface.c
tools/quake3/q3map2/surface_extra.c
tools/quake3/q3map2/surface_foliage.c
tools/quake3/q3map2/surface_fur.c
tools/quake3/q3map2/surface_meta.c
tools/quake3/q3map2/tjunction.c
tools/quake3/q3map2/tree.c
tools/quake3/q3map2/vis.c
tools/quake3/q3map2/visflow.c
tools/quake3/q3map2/writebsp.c

index 30ba5cbeff11fd66598b8c860996a5f7f4d3d389..963f51af2333a6b3ccfe0faad09cdec40e5e18a0 100644 (file)
@@ -10,7 +10,7 @@ Import( [ 'utils', 'config', 'settings', 'lib_objects' ] )
 env = Environment()
 settings.SetupEnvironment( env, config['name'] )
 env.Prepend( CPPPATH = [ '#tools/quake3/common' ] )
-env.Append( LIBS = [ 'pthread', 'png', 'jpeg' ] )
+env.Append( LIBS = [ 'pthread', 'png', 'jpeg', 'mhash' ] )
 proj = utils.vcproj( os.path.join( GetLaunchDir(), 'tools/quake3/q3map2/q3map2.vcproj' ) )
 objects = lib_objects
 objects += [ os.path.join( 'tools/quake3/q3map2', i ) for i in proj.getSourceFiles() ]
index 3e7c862af8a13429b181a8ed2eef20a67c90cf2f..2529bab609d39ed86a49c02d1a4d40f86bdceb80 100644 (file)
@@ -147,7 +147,7 @@ void CBackgroundDialogPage::Browse()
 //TODO bug/patch for comments
 //TODO patern gets fucked up sometimes if empty
        newfile = g_FuncTable.m_pfnFileDialog(pDialogWnd,TRUE,
-                                                                 _("Load Background Image"),browsedir,FILETYPE_KEY);
+                                                                 _("Load Background Image"),browsedir,FILETYPE_KEY, NULL);
        if(!newfile) {
                Syn_Printf(MSG_PREFIX "newfile = NULL\n");
                return;
index a63cbb7b0a34a346777b3f9afb6a8720265d259f..b32d33841f6aa0e88b4b0e9a243757b49b479cc8 100644 (file)
-<?xml version="1.0" ?><VisualStudioProject Name="camera" ProjectGUID="{A43B5811-4BCC-483A-BDAC-F5721DCF9B4A}" ProjectType="Visual C++" RootNamespace="camera" Version="8.00">
-       <Platforms>
-               <Platform Name="Win32"/>
-       </Platforms>
-       <ToolFiles>
-       </ToolFiles>
-       <Configurations>
-               <Configuration CharacterSet="2" ConfigurationType="2" IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)" Name="Debug|Win32" OutputDirectory="$(SolutionDir)\install\modules">
-                       <Tool Name="VCPreBuildEventTool"/>
-                       <Tool Name="VCCustomBuildTool"/>
-                       <Tool Name="VCXMLDataGeneratorTool"/>
-                       <Tool Name="VCWebServiceProxyGeneratorTool"/>
-                       <Tool Name="VCMIDLTool"/>
-                       <Tool AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtk-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtk-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\cairo&quot;;&quot;$(SolutionDir)\..\gtk2\include\pango-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\atk-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtkglext-1.0&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;" BasicRuntimeChecks="3" DebugInformationFormat="4" Detect64BitPortabilityProblems="true" DisableSpecificWarnings="4996;4244;4267" MinimalRebuild="true" Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" RuntimeLibrary="3" WarningLevel="3"/>
-                       <Tool Name="VCManagedResourceCompilerTool"/>
-                       <Tool Name="VCResourceCompilerTool"/>
-                       <Tool Name="VCPreLinkEventTool"/>
-                       <Tool AdditionalDependencies="synapse.lib splines.lib libxml2.lib glib-2.0.lib gobject-2.0.lib gtk-win32-2.0.lib" AdditionalLibraryDirectories="&quot;$(SolutionDir)\..\libxml2\lib&quot;;&quot;$(SolutionDir)\..\gtk2\lib&quot;;&quot;$(SolutionDir)\build\$(ConfigurationName)\libs&quot;" GenerateDebugInformation="true" ModuleDefinitionFile="camera.def" Name="VCLinkerTool" TargetMachine="1"/>
-                       <Tool Name="VCALinkTool"/>
-                       <Tool Name="VCManifestTool"/>
-                       <Tool Name="VCXDCMakeTool"/>
-                       <Tool Name="VCBscMakeTool"/>
-                       <Tool Name="VCFxCopTool"/>
-                       <Tool Name="VCAppVerifierTool"/>
-                       <Tool Name="VCWebDeploymentTool"/>
-                       <Tool Name="VCPostBuildEventTool"/>
-               </Configuration>
-               <Configuration CharacterSet="2" ConfigurationType="2" IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)" Name="Release|Win32" OutputDirectory="$(SolutionDir)\install\modules">
-                       <Tool Name="VCPreBuildEventTool"/>
-                       <Tool Name="VCCustomBuildTool"/>
-                       <Tool Name="VCXMLDataGeneratorTool"/>
-                       <Tool Name="VCWebServiceProxyGeneratorTool"/>
-                       <Tool Name="VCMIDLTool"/>
-                       <Tool AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtk-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtk-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\cairo&quot;;&quot;$(SolutionDir)\..\gtk2\include\pango-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\atk-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtkglext-1.0&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;" DebugInformationFormat="3" Detect64BitPortabilityProblems="true" DisableSpecificWarnings="4996;4244;4267" Name="VCCLCompilerTool" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" RuntimeLibrary="2" WarningLevel="3"/>
-                       <Tool Name="VCManagedResourceCompilerTool"/>
-                       <Tool Name="VCResourceCompilerTool"/>
-                       <Tool Name="VCPreLinkEventTool"/>
-                       <Tool AdditionalDependencies="synapse.lib splines.lib libxml2.lib glib-2.0.lib gobject-2.0.lib gtk-win32-2.0.lib" AdditionalLibraryDirectories="&quot;$(SolutionDir)\..\libxml2\lib&quot;;&quot;$(SolutionDir)\..\gtk2\lib&quot;;&quot;$(SolutionDir)\build\$(ConfigurationName)\libs&quot;" EnableCOMDATFolding="2" GenerateDebugInformation="true" ModuleDefinitionFile="camera.def" Name="VCLinkerTool" OptimizeReferences="2" TargetMachine="1"/>
-                       <Tool Name="VCALinkTool"/>
-                       <Tool Name="VCManifestTool"/>
-                       <Tool Name="VCXDCMakeTool"/>
-                       <Tool Name="VCBscMakeTool"/>
-                       <Tool Name="VCFxCopTool"/>
-                       <Tool Name="VCAppVerifierTool"/>
-                       <Tool Name="VCWebDeploymentTool"/>
-                       <Tool Name="VCPostBuildEventTool"/>
-               </Configuration>
-       </Configurations>
-       <References>
-       </References>
-       <Files>
-               <Filter Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" Name="Source Files">
-                       <File RelativePath=".\camera.cpp">
-                       </File>
-                       <File RelativePath=".\camera.def">
-                       </File>
-                       <File RelativePath=".\dialogs.cpp">
-                       </File>
-                       <File RelativePath=".\dialogs_common.cpp">
-                       </File>
-                       <File RelativePath=".\funchandlers.cpp">
-                       </File>
-                       <File RelativePath=".\listener.cpp">
-                       </File>
-                       <File RelativePath=".\misc.cpp">
-                       </File>
-                       <File RelativePath=".\renderer.cpp">
-                       </File>
-               </Filter>
-               <Filter Filter="h;hpp;hxx;hm;inl" Name="Header Files">
-                       <File RelativePath=".\camera.h">
-                       </File>
-                       <File RelativePath=".\dialogs.h">
-                       </File>
-                       <File RelativePath=".\funchandlers.h">
-                       </File>
-                       <File RelativePath=".\listener.h">
-                       </File>
-                       <File RelativePath=".\misc.h">
-                       </File>
-                       <File RelativePath=".\renderer.h">
-                       </File>
-               </Filter>
-               <Filter Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" Name="Resource Files">
-               </Filter>
-       </Files>
-       <Globals>
-       </Globals>
-</VisualStudioProject>
\ No newline at end of file
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="camera"\r
+       ProjectGUID="{A43B5811-4BCC-483A-BDAC-F5721DCF9B4A}"\r
+       RootNamespace="camera"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="$(SolutionDir)\install\modules"\r
+                       IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtk-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtk-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\cairo&quot;;&quot;$(SolutionDir)\..\gtk2\include\pango-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\atk-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtkglext-1.0&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="4"\r
+                               DisableSpecificWarnings="4996;4244;4267"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="synapse.lib splines.lib libxml2.lib glib-2.0.lib gobject-2.0.lib gtk-win32-2.0.lib intl.lib"\r
+                               AdditionalLibraryDirectories="&quot;$(SolutionDir)\..\libxml2\lib&quot;;&quot;$(SolutionDir)\..\gtk2\lib&quot;;&quot;$(SolutionDir)\build\$(ConfigurationName)\libs&quot;"\r
+                               ModuleDefinitionFile="camera.def"\r
+                               GenerateDebugInformation="true"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="$(SolutionDir)\install\modules"\r
+                       IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtk-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtk-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\cairo&quot;;&quot;$(SolutionDir)\..\gtk2\include\pango-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\atk-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtkglext-1.0&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                               RuntimeLibrary="2"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                               DisableSpecificWarnings="4996;4244;4267"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="synapse.lib splines.lib libxml2.lib glib-2.0.lib gobject-2.0.lib gtk-win32-2.0.lib intl.lib"\r
+                               AdditionalLibraryDirectories="&quot;$(SolutionDir)\..\libxml2\lib&quot;;&quot;$(SolutionDir)\..\gtk2\lib&quot;;&quot;$(SolutionDir)\build\$(ConfigurationName)\libs&quot;"\r
+                               ModuleDefinitionFile="camera.def"\r
+                               GenerateDebugInformation="true"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\camera.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\camera.def"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\dialogs.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\dialogs_common.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\funchandlers.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\listener.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\misc.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\renderer.cpp"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\camera.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\dialogs.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\funchandlers.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\listener.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\misc.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\renderer.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
index 146fd7ca8267844cea9c8c9cb4f4439c45fc028e..40985b38f9acafcae01fc1888c4bc8f1c237a90b 100644 (file)
@@ -26,6 +26,9 @@ Copyright (C) 2002 Splash Damage Ltd.
 
 #include "camera.h"
 
+#include <glib.h>
+#include <glib/gi18n.h>
+
 static GSList *g_pEditTypeRadio = NULL;
 static GtkWidget *g_pEditModeEditRadioButton = NULL;
 GtkWidget *g_pEditModeAddRadioButton = NULL;
index ed21f5b4161d55a104a1f7a2fe5910752566bc64..d55e5f0a871d7905e5c23ab016e345ca21b849c4 100644 (file)
@@ -36,7 +36,7 @@ void dialog_button_callback (GtkWidget *widget, gpointer data)
        ret = (int*)g_object_get_data (G_OBJECT (parent), "ret");
  
        *loop = 0;
-       *ret = (int)data;
+       *ret = GPOINTER_TO_INT (data);
 }
 
 gint dialog_delete_callback (GtkWidget *widget, GdkEvent* event, gpointer data)
index fafae2a61516f031dd252f61b3c8b2785ba9cabc..6423d3997b7e528ec087428e037fdae9c54d6acd 100644 (file)
@@ -106,7 +106,7 @@ void DoLoadCamera()
   else
     strcpy( basepath, g_FuncTable.m_pfnGetGamePath() );
 
-  const gchar *filename = g_FuncTable.m_pfnFileDialog( (GtkWidget *)g_pRadiantWnd, TRUE, "Open Camera File", basepath, "camera");
+  const gchar *filename = g_FuncTable.m_pfnFileDialog( (GtkWidget *)g_pRadiantWnd, TRUE, "Open Camera File", basepath, "camera", NULL);
 
   if( filename )
        {
@@ -161,7 +161,7 @@ void DoSaveCamera() {
   else
     strcpy( basepath, g_FuncTable.m_pfnGetGamePath() );
 
-  const gchar *filename = g_FuncTable.m_pfnFileDialog( (void *)g_pRadiantWnd, FALSE, "Save Camera File", basepath, "camera");
+  const gchar *filename = g_FuncTable.m_pfnFileDialog( (void *)g_pRadiantWnd, FALSE, "Save Camera File", basepath, "camera", NULL);
 
   if( filename ) {
     char fullpathtofile[PATH_MAX + 8];
index 372b833f5b33945775f5ec24a8ecfb1a5c8ea12a..207f6b0702dedf764ee3a664c6d959c6836bf55d 100644 (file)
@@ -912,7 +912,7 @@ static void bitmap_browse (GtkWidget *widget, gpointer data)
   const char *filename;
   char *ptr;
 
-  filename = g_FuncTable.m_pfnFileDialog (g_pWnd, TRUE, "Bitmap File", gbmp.defpath, "gtkgensurf");
+  filename = g_FuncTable.m_pfnFileDialog (g_pWnd, TRUE, "Bitmap File", gbmp.defpath, "gtkgensurf", NULL);
 
   if (filename != NULL)
   {
index df40e9114b30ad282daf18cff0d6392eab68d6e7..65f900884da9df98b4f9fb93a1dd8014c8293acb 100644 (file)
@@ -397,7 +397,7 @@ void UpdatePreview (bool DataChange)
 void SaveSetup (GtkWidget *parent)
 {
   const char *name = g_FuncTable.m_pfnFileDialog (parent, false, "Save GenSurf Settings",
-                                             g_FuncTable.m_pfnProfileGetDirectory (), "gtkgensurf");
+                                             g_FuncTable.m_pfnProfileGetDirectory (), "gtkgensurf", NULL);
 
   if (name != NULL)
   {
@@ -436,7 +436,7 @@ void OpenSetup (GtkWidget *parent, int UseDefaults)
     name = g_strdup ("plugins/defaults.srf"); // dummy string
   else
     name = g_FuncTable.m_pfnFileDialog (parent, true, "Open GenSurf Settings",
-                                        g_FuncTable.m_pfnProfileGetDirectory (), "gtkgensurf");
+                                        g_FuncTable.m_pfnProfileGetDirectory (), "gtkgensurf", NULL);
 
   if(name != NULL)
   {
index 71cddb23af57d754386370e0c3de6bd2dd8a5d5d..a43894082c24e96cef47537ee165eecf4398315a 100644 (file)
@@ -230,7 +230,7 @@ typedef gint (WINAPI* PFN_QERAPP_MESSAGEBOX) (void *parent, const char* text,
 // - 'pattern': the first pattern is for the win32 mode, then comes the Gtk pattern list, see Radiant source for samples
 // TTimo 04/01/2001 toolkit-independant, cast parent to a GtkWidget*
 typedef const gchar* (* PFN_QERAPP_FILEDIALOG) (void *parent, gboolean open, const char* title,
-                                                const char* path, const char* pattern);
+                                                const char* path, const char* pattern, const char *baseSubDir);
 typedef gchar* (WINAPI* PFN_QERAPP_DIRDIALOG) (void *parent, const char* title,
                                                const char* path);
 
index bf1a9f15e217593fff7fa365e73a43fb1747bf0c..bea6fb36c5237b1dd4f049b60a0854569a35bbf7 100644 (file)
@@ -523,7 +523,7 @@ static int DDSDecompressDXT1( ddsBuffer_t *dds, int width, int height, unsigned
        for( y = 0; y < yBlocks; y++ )
        {
                /* 8 bytes per block */
-               block = (ddsColorBlock_t*) ((unsigned int) dds->data + y * xBlocks * 8);
+               block = (ddsColorBlock_t*) ((size_t) dds->data + y * xBlocks * 8);
 
                /* walk x */
                for( x = 0; x < xBlocks; x++, block++ )
@@ -569,7 +569,7 @@ static int DDSDecompressDXT3( ddsBuffer_t *dds, int width, int height, unsigned
        for( y = 0; y < yBlocks; y++ )
        {
                /* 8 bytes per block, 1 block for alpha, 1 block for color */
-               block = (ddsColorBlock_t*) ((unsigned int) dds->data + y * xBlocks * 16);
+               block = (ddsColorBlock_t*) ((size_t) dds->data + y * xBlocks * 16);
 
                /* walk x */
                for( x = 0; x < xBlocks; x++, block++ )
@@ -625,7 +625,7 @@ static int DDSDecompressDXT5( ddsBuffer_t *dds, int width, int height, unsigned
        for( y = 0; y < yBlocks; y++ )
        {
                /* 8 bytes per block, 1 block for alpha, 1 block for color */
-               block = (ddsColorBlock_t*) ((unsigned int) dds->data + y * xBlocks * 16);
+               block = (ddsColorBlock_t*) ((size_t) dds->data + y * xBlocks * 16);
 
                /* walk x */
                for( x = 0; x < xBlocks; x++, block++ )
index 2d381c59579c24cab079d5a9b07f5b1433df7c49..ba34c085733a4989e3c9456a02ec1653b51e2961 100644 (file)
@@ -546,7 +546,7 @@ int lwGetPolygons5( picoMemStream_t *fp, int cksize, lwPolygonList *plist, int p
          bp += 2;
       }
       j -= 1;
-      pp->surf = ( lwSurface * ) j;
+      pp->surf = ( lwSurface * ) ((size_t)j);
 
       pp++;
       pv += nv;
index 5cef01e6e1527d85db215bde9d862d2809f04484..141975e5ead364cbfc6288a306563d779772e8f4 100644 (file)
@@ -353,7 +353,7 @@ int lwResolvePolySurfaces( lwPolygonList *polygon, lwTagList *tlist,
    }
 
    for ( i = 0; i < polygon->count; i++ ) {
-      index = ( int ) polygon->pol[ i ].surf;
+      index = ( int ) ((size_t)polygon->pol[ i ].surf);
       if ( index < 0 || index > tlist->count ) return 0;
       if ( !s[ index ] ) {
          s[ index ] = lwDefaultSurface();
@@ -527,7 +527,7 @@ int lwGetPolygonTags( picoMemStream_t *fp, int cksize, lwTagList *tlist,
       if ( rlen < 0 || rlen > cksize ) return 0;
 
       switch ( type ) {
-         case ID_SURF:  plist->pol[ i ].surf = ( lwSurface * ) j;  break;
+         case ID_SURF:  plist->pol[ i ].surf = ( lwSurface * ) ((size_t)j);  break;
          case ID_PART:  plist->pol[ i ].part = j;  break;
          case ID_SMGP:  plist->pol[ i ].smoothgrp = j;  break;
       }
index 9e08c18105a9fd4179ac5fa6a8e9df5553058d62..d1a30e14a3c6e8cc8ed7f283051f65137770ad92 100644 (file)
@@ -182,7 +182,7 @@ float CalculateLightRadius(entity_t * e, bool outer)
 
     if (!outer) {
       if (iSpawnFlags & 2)
-        fIntensity *= .9;
+        fIntensity *= .9f;
       else
         fIntensity *= .25f;
     }
index 59311bed24fbe79541eaf1dcbef94ab2a989099b..57b48b929070974b283711a2d041f1cb97d57650 100644 (file)
@@ -1610,7 +1610,7 @@ static void on_lock_valuechange_togglebutton_toggled (GtkToggleButton *togglebut
 {
   bool is_Locked;
 
-  is_Locked = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lock_valuechange_togglebutton));
+  is_Locked = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lock_valuechange_togglebutton)) != false;
 
   gtk_widget_set_sensitive( GTK_WIDGET( hscale_value_spinbutton ), is_Locked );
   gtk_widget_set_sensitive( GTK_WIDGET( vscale_value_spinbutton ), is_Locked );
index 3a5328e2801c400cb30f2e581ff307b0fede96f8..d43e5916c8a26ee645e44e338e5c68a5d39f6df2 100644 (file)
@@ -38,7 +38,7 @@ void BP_dialog_button_callback (GtkWidget *widget, gpointer data)
   ret = (int*)g_object_get_data (G_OBJECT (parent), "ret");
 
   *loop = 0;
-  *ret = (int)data;
+  *ret = GPOINTER_TO_INT (data);
 }
 
 gint BP_dialog_delete_callback (GtkWidget *widget, GdkEvent* event, gpointer data)
index 25a7917ac1ca797ef695351d88047c02990bb09e..59daecb6ecde4516b6e9aa7800febd0695193e88 100644 (file)
@@ -3141,10 +3141,10 @@ void Brush_Draw(brush_t *b)
                if (!bTrans) {
                        if (face->texdef.flags & Q2_SURF_TRANS33) {
                                bTrans = true;
-                               transVal = 0.33;
+                               transVal = 0.33f;
                        } else if (face->texdef.flags & Q2_SURF_TRANS66) {
                                bTrans = true;
-                               transVal = 0.66;
+                               transVal = 0.66f;
                        }
                }
 
index ff1a8e8a9e9dd5c716c0fe808a436d7da9a34bd4..da91fc251d8ea5ba4f35a5e101270a642c4d697e 100644 (file)
@@ -3158,7 +3158,7 @@ int DoCapDlg (int *type, bool *b_GroupResult)
       *type = IENDCAP; // *type = CapDialog::IENDCAP;
 
     // Gef: Added toggle for optional cap func_grouping
-    *b_GroupResult = (bool *)gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(group_toggle));
+    *b_GroupResult = (bool)gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(group_toggle));
   }
 
   gtk_grab_remove (dlg);
index 63d5bf75a82e1b77538d411c6bd4ff63e4176b6f..fe97ef96293c5f9ccff5dcfb8c3e0a43d8c9eac3 100644 (file)
@@ -859,7 +859,7 @@ void dialog_button_callback( GtkWidget *widget, gpointer data ) {
   ret = (int*)g_object_get_data( G_OBJECT( parent ), "ret" );
 
   *loop = 0;
-  *ret = (int)data;
+  *ret = GPOINTER_TO_INT (data);
 }
 
 gint dialog_delete_callback (GtkWidget *widget, GdkEvent* event, gpointer data)
@@ -1037,7 +1037,7 @@ static void file_sel_callback (GtkWidget *widget, gpointer data)
   loop = (int*)g_object_get_data (G_OBJECT (parent), "loop");
   success = (bool*)g_object_get_data (G_OBJECT (parent), "success");
 
-  if ((int)data == IDOK)
+  if (GPOINTER_TO_INT (data) == IDOK)
     *success = true;
 
 #ifdef FILEDLG_DBG
index 2ff2a960f295ca0c62ae5c22854457792ea2d911..52cec01cd2ae9dadfd4b7d55f63dcdfe43606f55 100644 (file)
@@ -81,7 +81,7 @@ URL adds an optional 'go to URL' button
 int WINAPI gtk_MessageBox (void *parent, const char* lpText, const char* lpCaption = "Radiant", guint32 uType = MB_OK, const char* URL = NULL);
 // NOTE: the returned filename is allocated with g_malloc and MUST be freed with g_free (both for win32 and Gtk dialogs)
 // GtkWidget *parent
-const char* file_dialog (void *parent, gboolean open, const char* title, const char* path = (char*)NULL, const char* pattern = NULL, const char *baseSubDir = NULL);
+const gchar* file_dialog (void *parent, gboolean open, const char* title, const char* path = (char*)NULL, const char* pattern = NULL, const char *baseSubDir = NULL);
 
 /*!
 \fn dir_dialog, prompts for a directory
index f83bed3c3e1e0055b022c456d3af0165c0ffbaa6..deafb6389c31c545b9b66675fc1ecce5a1f3df95 100644 (file)
@@ -208,11 +208,11 @@ EPathCheck CheckFile( const char *path ) {
 }
 
 bool radCreateDirectory( const char *directory ) {
-       return CreateDirectory( directory, NULL );
+       return CreateDirectory( directory, NULL ) != false;
 }
 
 bool radCopyFile( const char *lpExistingFileName, const char *lpNewFileName ) {
-       return CopyFile( lpExistingFileName, lpNewFileName, FALSE );
+       return CopyFile( lpExistingFileName, lpNewFileName, FALSE ) != false;
 }
 
 #endif
index b38337f70724150a173f4c739dec89e7ba2c2a82..e678e451dcfb02aa478c583bd71100171d61bbba 100644 (file)
@@ -7,7 +7,8 @@
 //\r
 // Generated from the TEXTINCLUDE 2 resource.\r
 //\r
-#include "afxres.h"\r
+//#include "afxres.h"\r
+#include "windows.h"\r
 \r
 /////////////////////////////////////////////////////////////////////////////\r
 #undef APSTUDIO_READONLY_SYMBOLS\r
index 2dbf29994071dab381f5ee48b4a6040aaa32034c..298f87405fee93055311b315905c1848a47abf2b 100644 (file)
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-       ProjectType="Visual C++"
-       Version="8.00"
-       Name="radiant"
-       ProjectGUID="{65D02375-63EE-4A8A-9F8E-504B1D5A1D02}"
-       RootNamespace="radiant"
-       >
-       <Platforms>
-               <Platform
-                       Name="Win32"
-               />
-       </Platforms>
-       <ToolFiles>
-       </ToolFiles>
-       <Configurations>
-               <Configuration
-                       Name="Debug|Win32"
-                       OutputDirectory="$(SolutionDir)\install"
-                       IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)"
-                       ConfigurationType="1"
-                       CharacterSet="2"
-                       >
-                       <Tool
-                               Name="VCPreBuildEventTool"
-                       />
-                       <Tool
-                               Name="VCCustomBuildTool"
-                       />
-                       <Tool
-                               Name="VCXMLDataGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCMIDLTool"
-                       />
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               Optimization="0"
-                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtk-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtk-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\cairo&quot;;&quot;$(SolutionDir)\..\gtk2\include\pango-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\atk-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtkglext-1.0&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                               MinimalRebuild="true"
-                               BasicRuntimeChecks="3"
-                               RuntimeLibrary="3"
-                               WarningLevel="3"
-                               Detect64BitPortabilityProblems="true"
-                               DebugInformationFormat="4"
-                               DisableSpecificWarnings="4996;4244;4267"
-                       />
-                       <Tool
-                               Name="VCManagedResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCPreLinkEventTool"
-                       />
-                       <Tool
-                               Name="VCLinkerTool"
-                               AdditionalDependencies="l_net.lib cmdlib.lib mathlib.lib Wsock32.lib libxml2.lib glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gtk-win32-2.0.lib gtkglext-win32-1.0.lib gdkglext-win32-1.0.lib pango-1.0.lib"
-                               AdditionalLibraryDirectories="&quot;$(SolutionDir)\..\libxml2\lib&quot;;&quot;$(SolutionDir)\..\gtk2\lib&quot;;&quot;$(SolutionDir)\build\$(ConfigurationName)\libs&quot;"
-                               GenerateDebugInformation="true"
-                               TargetMachine="1"
-                       />
-                       <Tool
-                               Name="VCALinkTool"
-                       />
-                       <Tool
-                               Name="VCManifestTool"
-                       />
-                       <Tool
-                               Name="VCXDCMakeTool"
-                       />
-                       <Tool
-                               Name="VCBscMakeTool"
-                       />
-                       <Tool
-                               Name="VCFxCopTool"
-                       />
-                       <Tool
-                               Name="VCAppVerifierTool"
-                       />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
-                       <Tool
-                               Name="VCPostBuildEventTool"
-                       />
-               </Configuration>
-               <Configuration
-                       Name="Release|Win32"
-                       OutputDirectory="$(SolutionDir)\install"
-                       IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)"
-                       ConfigurationType="1"
-                       CharacterSet="2"
-                       WholeProgramOptimization="1"
-                       >
-                       <Tool
-                               Name="VCPreBuildEventTool"
-                       />
-                       <Tool
-                               Name="VCCustomBuildTool"
-                       />
-                       <Tool
-                               Name="VCXMLDataGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCMIDLTool"
-                       />
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtk-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtk-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\cairo&quot;;&quot;$(SolutionDir)\..\gtk2\include\pango-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\atk-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtkglext-1.0&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                               RuntimeLibrary="2"
-                               WarningLevel="3"
-                               Detect64BitPortabilityProblems="true"
-                               DebugInformationFormat="3"
-                               DisableSpecificWarnings="4996;4244;4267"
-                       />
-                       <Tool
-                               Name="VCManagedResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCPreLinkEventTool"
-                       />
-                       <Tool
-                               Name="VCLinkerTool"
-                               AdditionalDependencies="l_net.lib cmdlib.lib mathlib.lib Wsock32.lib libxml2.lib glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gtk-win32-2.0.lib gtkglext-win32-1.0.lib gdkglext-win32-1.0.lib pango-1.0.lib"
-                               AdditionalLibraryDirectories="&quot;$(SolutionDir)\..\libxml2\lib&quot;;&quot;$(SolutionDir)\..\gtk2\lib&quot;;&quot;$(SolutionDir)\build\$(ConfigurationName)\libs&quot;"
-                               GenerateDebugInformation="true"
-                               OptimizeReferences="2"
-                               EnableCOMDATFolding="2"
-                               TargetMachine="1"
-                       />
-                       <Tool
-                               Name="VCALinkTool"
-                       />
-                       <Tool
-                               Name="VCManifestTool"
-                       />
-                       <Tool
-                               Name="VCXDCMakeTool"
-                       />
-                       <Tool
-                               Name="VCBscMakeTool"
-                       />
-                       <Tool
-                               Name="VCFxCopTool"
-                       />
-                       <Tool
-                               Name="VCAppVerifierTool"
-                       />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
-                       <Tool
-                               Name="VCPostBuildEventTool"
-                       />
-               </Configuration>
-       </Configurations>
-       <References>
-       </References>
-       <Files>
-               <Filter
-                       Name="Headers"
-                       >
-                       <File
-                               RelativePath=".\brush.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\camera.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\camwindow.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\dialog.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\libs\libxml2\libxml\entities.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\epairswrapper.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\feedback.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\file.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\findtexturedialog.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\glwidget.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\glwindow.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\mainframe.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\map.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\mathlib.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\messaging.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\parse.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\patchdialog.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\plugin.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\pluginmanager.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\points.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\preferences.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\preferencesystem.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\qe3.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\qedefs.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\qfiles.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\qgl.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\resource.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\select.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\shaders.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\surfacedialog.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\texmanip.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\textures.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\texwindow.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\libs\libxml2\libxml\tree.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\ui.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\undo.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\unzip.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\libs\libxml2\libxml\valid.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\include\version.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\watchbsp.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\winding.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\xmlstuff.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\xy.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\xywindow.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\z.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\zwindow.h"
-                               >
-                       </File>
-                       <Filter
-                               Name="Interface"
-                               >
-                               <File
-                                       RelativePath="..\include\ibrush.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\ibspfrontend.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\icamera.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\idata.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\idatastream.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\ieclass.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\ientity.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\iepairs.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\ifilesystem.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\igl.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\iimage.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\imap.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\imodel.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\iplugin.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\ipluginentities.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\irefcount.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\iscriplib.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\iselectedface.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\ishaders.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\ishadersmanager.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\istream.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\isurfaceplugin.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\itoolbar.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\iUI.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\iUI_gtk.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\iundo.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\misc_def.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\qerplugin.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\qertypes.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\qsysprintf.h"
-                                       >
-                               </File>
-                       </Filter>
-                       <Filter
-                               Name="gtk"
-                               >
-                               <File
-                                       RelativePath="..\..\src\glib\galloca.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\garray.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gasyncqueue.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gbacktrace.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gcache.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gcompat.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gcompletion.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gconvert.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gdataset.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gdate.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdk.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkcc.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkcolor.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkcompat.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkconfig.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkcursor.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkcursors.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkdnd.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkdrawable.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkevents.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkfont.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkgc.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkim.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkimage.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkinput.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkkeysyms.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkpixmap.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\win32\gdkprivate-win32.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkprivate.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkproperty.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkregion.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkrgb.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkselection.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdktypes.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkvisual.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\win32\gdkwin32.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gdk\gdkwindow.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gerror.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gfileutils.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\ghash.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\ghook.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\giochannel.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\glib.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\glibconfig.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\glist.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gmacros.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gmain.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gmarkup.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gmem.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gmessages.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gnode.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gprimes.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gqsort.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gquark.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gqueue.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\grand.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\grel.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath=".\groupdialog.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gscanner.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gshell.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gslist.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gspawn.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gstrfuncs.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gstring.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gthread.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gthreadpool.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gtimer.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtk.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkaccelgroup.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkaccellabel.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkadjustment.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkalignment.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkarg.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkarrow.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkaspectframe.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkbbox.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkbin.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkbindings.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkbox.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkbutton.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkcalendar.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkcheckbutton.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkcheckmenuitem.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkclist.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkcolorsel.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkcombo.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkcompat.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkcontainer.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkctree.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkcurve.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkdata.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkdebug.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkdialog.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkdnd.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkdrawingarea.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkeditable.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkentry.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkenums.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkeventbox.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkfilesel.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkfixed.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkfontsel.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkframe.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkgamma.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkgc.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkhandlebox.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkhbbox.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkhbox.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkhpaned.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkhruler.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkhscale.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkhscrollbar.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkhseparator.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkimage.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkinputdialog.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkitem.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkitemfactory.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtklabel.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtklayout.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtklist.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtklistitem.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkmain.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkmarshal.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkmenu.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkmenubar.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkmenufactory.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkmenuitem.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkmenushell.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkmisc.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath=".\gtkmisc.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtknotebook.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkobject.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkoptionmenu.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkpacker.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkpaned.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkpixmap.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkplug.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkpreview.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkprogress.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkprogressbar.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkradiobutton.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkradiomenuitem.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkrange.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkrc.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkruler.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkscale.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkscrollbar.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkscrolledwindow.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkselection.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkseparator.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtksignal.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtksocket.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkspinbutton.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkstatusbar.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkstyle.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtktable.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtktearoffmenuitem.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtktext.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkthemes.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtktipsquery.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtktogglebutton.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtktoolbar.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtktooltips.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtktree.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtktreeitem.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtktypebuiltins.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtktypeutils.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkvbbox.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkvbox.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkviewport.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkvpaned.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkvruler.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkvscale.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkvscrollbar.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkvseparator.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkwidget.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\gtk+\gtk\gtkwindow.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gtree.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gtypes.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gunicode.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gutils.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\..\src\glib\gwin32.h"
-                                       >
-                               </File>
-                       </Filter>
-                       <Filter
-                               Name="libs"
-                               >
-                               <File
-                                       RelativePath="..\libs\cmdlib.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\libs\jpeg6\Jconfig.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\libs\jpeg6\Jmorecfg.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\libs\jpeglib.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\libs\l_net\l_net.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\libs\missing.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\libs\str.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\libs\xmlio.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\libs\xmlparser.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\libs\libxml2\libxml\xmlversion.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\libs\xmlwriter.h"
-                                       >
-                               </File>
-                       </Filter>
-                       <Filter
-                               Name="stl"
-                               >
-                               <File
-                                       RelativePath="..\include\gtkr_list.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\gtkr_vector.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\include\stl_check.h"
-                                       >
-                               </File>
-                       </Filter>
-               </Filter>
-               <Filter
-                       Name="Code"
-                       >
-                       <File
-                               RelativePath=".\bp_dlg.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\brush.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\brush_primit.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\brushscript.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\camwindow.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\csg.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\dialog.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\dialoginfo.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\drag.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\eclass.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\eclass_def.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\error.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\file.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\filters.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\findtexturedialog.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\glinterface.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\glwidget.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\glwindow.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\groupdialog.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\gtkdlgs.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\gtkmisc.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\main.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\mainframe.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\map.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\missing.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\parse.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\patchdialog.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\pluginentities.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\pluginmanager.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\pmesh.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\points.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\preferences.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\profile.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\qe3.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\qgl.c"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\qgl_ext.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\select.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\selectedface.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\surfacedialog.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\surfaceplugin.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\targetname.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\texmanip.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\texwindow.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\ui.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\undo.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\vertsel.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\winding.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\xywindow.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\z.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\zwindow.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <Filter
-                               Name="BSP monitoring"
-                               >
-                               <File
-                                       RelativePath=".\feedback.cpp"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath=".\watchbsp.cpp"
-                                       >
-                                       <FileConfiguration
-                                               Name="Debug|Win32"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                                       AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                                       PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                                       BrowseInformation="1"
-                                                       DisableSpecificWarnings="4996;4244;4267"
-                                               />
-                                       </FileConfiguration>
-                               </File>
-                       </Filter>
-               </Filter>
-               <Filter
-                       Name="Stdafx"
-                       >
-                       <File
-                               RelativePath=".\stdafx.cpp"
-                               >
-                               <FileConfiguration
-                                       Name="Debug|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               UsePrecompiledHeader="1"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration
-                                       Name="Release|Win32"
-                                       >
-                                       <Tool
-                                               Name="VCCLCompilerTool"
-                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
-                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
-                                               UsePrecompiledHeader="1"
-                                               PrecompiledHeaderThrough="stdafx.h"
-                                               DisableSpecificWarnings="4996;4244;4267"
-                                       />
-                               </FileConfiguration>
-                       </File>
-                       <File
-                               RelativePath=".\stdafx.h"
-                               >
-                       </File>
-               </Filter>
-               <Filter
-                       Name="Misc"
-                       >
-                       <File
-                               RelativePath="..\..\src\gtk+\gtk\makefile.msc"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\src\glib\makefile.msc"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\src\gtk+\gdk\makefile.msc"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\src\gtk+\gdk\win32\makefile.msc"
-                               >
-                       </File>
-               </Filter>
-               <File
-                       RelativePath="..\setup\changelog.txt"
-                       >
-               </File>
-               <File
-                       RelativePath="..\docs\developer\CHANGES"
-                       >
-               </File>
-               <File
-                       RelativePath="..\COMPILING"
-                       >
-               </File>
-               <File
-                       RelativePath=".\radiant.ico"
-                       >
-               </File>
-               <File
-                       RelativePath=".\radiant.rc"
-                       >
-               </File>
-               <File
-                       RelativePath="..\win32_install.py"
-                       >
-               </File>
-       </Files>
-       <Globals>
-       </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="radiant"\r
+       ProjectGUID="{65D02375-63EE-4A8A-9F8E-504B1D5A1D02}"\r
+       RootNamespace="radiant"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="$(SolutionDir)\install"\r
+                       IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtk-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtk-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\cairo&quot;;&quot;$(SolutionDir)\..\gtk2\include\pango-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\atk-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtkglext-1.0&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="4"\r
+                               DisableSpecificWarnings="4996;4244;4267"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="user32.lib shell32.lib gdi32.lib comdlg32.lib l_net.lib cmdlib.lib mathlib.lib Wsock32.lib libxml2.lib glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gtk-win32-2.0.lib gtkglext-win32-1.0.lib gdkglext-win32-1.0.lib pango-1.0.lib intl.lib"\r
+                               AdditionalLibraryDirectories="&quot;$(SolutionDir)\..\libxml2\lib&quot;;&quot;$(SolutionDir)\..\gtk2\lib&quot;;&quot;$(SolutionDir)\build\$(ConfigurationName)\libs&quot;"\r
+                               GenerateDebugInformation="true"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="$(SolutionDir)\install"\r
+                       IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="2"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtk-2.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtk-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\cairo&quot;;&quot;$(SolutionDir)\..\gtk2\include\pango-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\atk-1.0&quot;;&quot;$(SolutionDir)\..\gtk2\include\gtkglext-1.0&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                               RuntimeLibrary="2"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                               DisableSpecificWarnings="4996;4244;4267"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="user32.lib shell32.lib gdi32.lib comdlg32.lib l_net.lib cmdlib.lib mathlib.lib Wsock32.lib libxml2.lib glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gtk-win32-2.0.lib gtkglext-win32-1.0.lib gdkglext-win32-1.0.lib pango-1.0.lib intl.lib"\r
+                               AdditionalLibraryDirectories="&quot;$(SolutionDir)\..\libxml2\lib&quot;;&quot;$(SolutionDir)\..\gtk2\lib&quot;;&quot;$(SolutionDir)\build\$(ConfigurationName)\libs&quot;"\r
+                               GenerateDebugInformation="true"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Headers"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\brush.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\camera.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\camwindow.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\dialog.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\libs\libxml2\libxml\entities.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\epairswrapper.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\feedback.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\file.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\findtexturedialog.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\glwidget.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\glwindow.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\mainframe.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\map.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\mathlib.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\messaging.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\parse.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\patchdialog.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\plugin.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\pluginmanager.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\points.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\preferences.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\preferencesystem.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\qe3.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\qedefs.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\qfiles.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\qgl.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\resource.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\select.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\shaders.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\surfacedialog.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\texmanip.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\textures.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\texwindow.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\libs\libxml2\libxml\tree.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\ui.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\undo.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\unzip.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\libs\libxml2\libxml\valid.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\include\version.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\watchbsp.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\winding.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\xmlstuff.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\xy.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\xywindow.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\z.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\zwindow.h"\r
+                               >\r
+                       </File>\r
+                       <Filter\r
+                               Name="Interface"\r
+                               >\r
+                               <File\r
+                                       RelativePath="..\include\ibrush.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\ibspfrontend.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\icamera.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\idata.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\idatastream.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\ieclass.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\ientity.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\iepairs.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\ifilesystem.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\igl.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\iimage.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\imap.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\imodel.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\iplugin.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\ipluginentities.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\irefcount.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\iscriplib.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\iselectedface.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\ishaders.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\ishadersmanager.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\istream.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\isurfaceplugin.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\itoolbar.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\iUI.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\iUI_gtk.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\iundo.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\misc_def.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\qerplugin.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\qertypes.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\qsysprintf.h"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
+                       <Filter\r
+                               Name="gtk"\r
+                               >\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\galloca.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\garray.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gasyncqueue.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gbacktrace.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gcache.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gcompat.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gcompletion.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gconvert.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gdataset.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gdate.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdk.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkcc.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkcolor.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkcompat.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkconfig.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkcursor.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkcursors.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkdnd.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkdrawable.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkevents.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkfont.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkgc.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkim.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkimage.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkinput.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkkeysyms.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkpixmap.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\win32\gdkprivate-win32.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkprivate.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkproperty.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkregion.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkrgb.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkselection.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdktypes.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkvisual.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\win32\gdkwin32.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gdk\gdkwindow.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gerror.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gfileutils.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\ghash.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\ghook.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\giochannel.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\glib.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\glibconfig.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\glist.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gmacros.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gmain.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gmarkup.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gmem.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gmessages.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gnode.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gprimes.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gqsort.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gquark.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gqueue.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\grand.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\grel.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath=".\groupdialog.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gscanner.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gshell.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gslist.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gspawn.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gstrfuncs.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gstring.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gthread.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gthreadpool.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gtimer.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtk.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkaccelgroup.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkaccellabel.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkadjustment.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkalignment.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkarg.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkarrow.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkaspectframe.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkbbox.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkbin.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkbindings.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkbox.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkbutton.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkcalendar.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkcheckbutton.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkcheckmenuitem.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkclist.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkcolorsel.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkcombo.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkcompat.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkcontainer.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkctree.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkcurve.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkdata.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkdebug.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkdialog.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkdnd.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkdrawingarea.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkeditable.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkentry.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkenums.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkeventbox.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkfilesel.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkfixed.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkfontsel.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkframe.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkgamma.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkgc.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkhandlebox.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkhbbox.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkhbox.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkhpaned.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkhruler.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkhscale.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkhscrollbar.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkhseparator.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkimage.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkinputdialog.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkitem.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkitemfactory.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtklabel.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtklayout.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtklist.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtklistitem.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkmain.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkmarshal.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkmenu.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkmenubar.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkmenufactory.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkmenuitem.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkmenushell.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath=".\gtkmisc.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkmisc.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtknotebook.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkobject.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkoptionmenu.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkpacker.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkpaned.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkpixmap.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkplug.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkpreview.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkprogress.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkprogressbar.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkradiobutton.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkradiomenuitem.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkrange.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkrc.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkruler.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkscale.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkscrollbar.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkscrolledwindow.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkselection.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkseparator.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtksignal.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtksocket.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkspinbutton.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkstatusbar.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkstyle.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtktable.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtktearoffmenuitem.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtktext.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkthemes.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtktipsquery.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtktogglebutton.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtktoolbar.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtktooltips.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtktree.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtktreeitem.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtktypebuiltins.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtktypeutils.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkvbbox.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkvbox.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkviewport.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkvpaned.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkvruler.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkvscale.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkvscrollbar.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkvseparator.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkwidget.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\gtk+\gtk\gtkwindow.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gtree.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gtypes.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gunicode.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gutils.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\src\glib\gwin32.h"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
+                       <Filter\r
+                               Name="libs"\r
+                               >\r
+                               <File\r
+                                       RelativePath="..\libs\cmdlib.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\libs\jpeg6\Jconfig.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\libs\jpeg6\Jmorecfg.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\libs\jpeglib.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\libs\l_net\l_net.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\libs\missing.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\libs\str.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\libs\xmlio.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\libs\xmlparser.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\libs\libxml2\libxml\xmlversion.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\libs\xmlwriter.h"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
+                       <Filter\r
+                               Name="stl"\r
+                               >\r
+                               <File\r
+                                       RelativePath="..\include\gtkr_list.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\gtkr_vector.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\include\stl_check.h"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Code"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\bp_dlg.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\brush.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\brush_primit.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\brushscript.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\camwindow.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\csg.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\dialog.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\dialoginfo.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\drag.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\eclass.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\eclass_def.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\error.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\file.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\filters.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\findtexturedialog.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\glinterface.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\glwidget.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\glwindow.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\groupdialog.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\gtkdlgs.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\gtkmisc.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\main.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\mainframe.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\map.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\missing.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\parse.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\patchdialog.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\pluginentities.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\pluginmanager.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\pmesh.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\points.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\preferences.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\profile.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\qe3.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\qgl.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\qgl_ext.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\select.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\selectedface.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\surfacedialog.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\surfaceplugin.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\targetname.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\texmanip.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\texwindow.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\ui.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\undo.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\vertsel.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\winding.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\xywindow.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\z.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\zwindow.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <Filter\r
+                               Name="BSP monitoring"\r
+                               >\r
+                               <File\r
+                                       RelativePath=".\feedback.cpp"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath=".\watchbsp.cpp"\r
+                                       >\r
+                                       <FileConfiguration\r
+                                               Name="Debug|Win32"\r
+                                               >\r
+                                               <Tool\r
+                                                       Name="VCCLCompilerTool"\r
+                                                       AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                                       PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                                       BrowseInformation="1"\r
+                                                       DisableSpecificWarnings="4996;4244;4267"\r
+                                               />\r
+                                       </FileConfiguration>\r
+                               </File>\r
+                       </Filter>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Stdafx"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\stdafx.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               UsePrecompiledHeader="1"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"\r
+                                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                                               UsePrecompiledHeader="1"\r
+                                               PrecompiledHeaderThrough="stdafx.h"\r
+                                               DisableSpecificWarnings="4996;4244;4267"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\stdafx.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Misc"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\src\gtk+\gdk\win32\makefile.msc"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\src\gtk+\gtk\makefile.msc"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\src\glib\makefile.msc"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\src\gtk+\gdk\makefile.msc"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <File\r
+                       RelativePath="..\setup\changelog.txt"\r
+                       >\r
+               </File>\r
+               <File\r
+                       RelativePath="..\docs\developer\CHANGES"\r
+                       >\r
+               </File>\r
+               <File\r
+                       RelativePath="..\COMPILING"\r
+                       >\r
+               </File>\r
+               <File\r
+                       RelativePath=".\radiant.ico"\r
+                       >\r
+               </File>\r
+               <File\r
+                       RelativePath=".\radiant.rc"\r
+                       >\r
+               </File>\r
+               <File\r
+                       RelativePath="..\win32_install.py"\r
+                       >\r
+               </File>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
index b325df5903329db5cd2a38e3a255c6bf6cc97061..69025b5d5deba14a6fabe08f7ef25eedbfd8d75f 100644 (file)
@@ -55,7 +55,7 @@ brush_t* WINAPI QERApp_GetSelectedFaceBrush(int iface)
 // NOTE: we expect pWinding to have MAX_POINTS_ON_WINDING points ready for writing
 int WINAPI QERApp_GetFaceInfo(int iface, _QERFaceData *pFaceData, winding_t *pWinding)
 {
-  int size;
+  size_t size;
 
   if (iface>=g_ptrSelectedFaces.GetSize())
   {
@@ -74,7 +74,7 @@ int WINAPI QERApp_GetFaceInfo(int iface, _QERFaceData *pFaceData, winding_t *pWi
   VectorCopy( selFace->planepts[2], pFaceData->m_v3 );
   pFaceData->m_bBPrimit = true;
   memcpy( &pFaceData->brushprimit_texdef, &selFace->brushprimit_texdef, sizeof(brushprimit_texdef_t) );
-  size = (int)((winding_t *)0)->points[selFace->face_winding->numpoints];
+  size = (size_t)((winding_t *)0)->points[selFace->face_winding->numpoints];
   memcpy( pWinding, selFace->face_winding, size );
   return 1;
 }
index 6fc608ca19ff38ec7df7136db1a806a3076eb05e..88e02c345743507b1c52a75951c63ddd7a4b2c6d 100644 (file)
@@ -250,7 +250,7 @@ void Winding_RemovePoint(winding_t *w, int point)
 
        if (point < w->numpoints-1)
        {
-               memmove(&w->points[point], &w->points[point+1], (int)((winding_t *)0)->points[w->numpoints - point - 1]);
+               memmove(&w->points[point], &w->points[point+1], (size_t)((winding_t *)0)->points[w->numpoints - point - 1]);
        }
        w->numpoints--;
 }
index 68a16d8278b35f4467eb6dd5c58155d0cdf1f939..f1ade4aa2e615b20b1d09f9203c9ccba1ed5c7e5 100644 (file)
@@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#ifdef _WIN32
+#ifdef WIN32
 #include <direct.h>
 #include <windows.h>
 #endif
@@ -93,7 +93,7 @@ Mimic unix command line expansion
 #define        MAX_EX_ARGC     1024
 int            ex_argc;
 char   *ex_argv[MAX_EX_ARGC];
-#ifdef _WIN32
+#ifdef WIN32
 #include "io.h"
 void ExpandWildcards( int *argc, char ***argv )
 {
@@ -337,7 +337,7 @@ void Q_getwd (char *out)
 {
        int i = 0;
 
-#ifdef _WIN32
+#ifdef WIN32
    _getcwd (out, 256);
    strcat (out, "\\");
 #else
@@ -356,7 +356,7 @@ void Q_getwd (char *out)
 
 void Q_mkdir (const char *path)
 {
-#ifdef _WIN32
+#ifdef WIN32
        if (_mkdir (path) != -1)
                return;
 #else
@@ -1159,7 +1159,7 @@ void      CreatePath (const char *path)
        char            c;
        char            dir[1024];
 
-#ifdef _WIN32
+#ifdef WIN32
        int             olddrive = -1;
 
        if ( path[1] == ':' )
@@ -1183,7 +1183,7 @@ void      CreatePath (const char *path)
                }
        }
 
-#ifdef _WIN32
+#ifdef WIN32
        if ( olddrive != -1 )
        {
                _chdrive( olddrive );
@@ -1212,7 +1212,7 @@ void QCopyFile (const char *from, const char *to)
 
 void Sys_Sleep(int n)
 {
-#ifdef _WIN32
+#ifdef WIN32
   Sleep (n);
 #endif
 #if defined (__linux__) || defined (__APPLE__)
index 02ced5bea779e0865c0ca189b58c6123a8a80eb2..8dbf9e61ac6b42da3c62f2a8c6a9c0bbe43031c2 100644 (file)
@@ -32,7 +32,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include <time.h>
 #include <stdarg.h>
 
-#ifdef _WIN32
+#ifdef WIN32
        #ifdef NDEBUG                                                   // Don't show in a Release build
                #pragma warning(disable : 4305)     // truncate from double to float
                #pragma warning(disable : 4244)     // conversion from double to float
@@ -40,7 +40,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
        #endif
 #endif
 
-#ifdef _WIN32
+#ifdef WIN32
        #pragma intrinsic( memset, memcpy )
 #endif
 
index 33eac6517a1f10d6358a22df0ac577553a07fb22..9153077cb5ac136dc9f7a11d418e99d875f5889a 100644 (file)
@@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#ifdef _WIN32
+#ifdef WIN32
 #include <direct.h>
 #include <windows.h>
 #endif
@@ -42,7 +42,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "l_net/l_net.h"
 #include "libxml/tree.h"
 
-#ifdef _WIN32
+#ifdef WIN32
 HWND hwndOut = NULL;
 qboolean lookedForServer = false;
 UINT wm_BroadcastCommand = -1;
index bf731c99caf097f8cae487f157d3d05bec2353f6..9a6596fa738f295e78bb19cc3b679bcf5ab71d13 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -17,6 +18,9 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with GtkRadiant; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+Nurail: Swiped from Q3Map2
+
 */
 
 
index 1dd9d0ae7796a6c1d7ee7011d3a77ac11c8c7a8e..13542402a55104c229d6b96872f9bd111c0d381a 100644 (file)
@@ -32,7 +32,7 @@ The .pak files are just a linear collapse of a directory tree
 ========================================================================
 */
 
-#ifdef _WIN32
+#ifdef WIN32
        #ifdef NDEBUG                                                   // Don't show in a Release build
                #pragma warning(disable : 4305)     // truncate from double to float
                #pragma warning(disable : 4244)     // conversion from double to float
index a2e8a8108850e2527e8d0d7005fa320914f6e032..0f5d36686fb93fb7214545e8df4abaadb33f892a 100644 (file)
@@ -110,7 +110,7 @@ WIN32
 
 ===================================================================
 */
-#ifdef _WIN32
+#ifdef WIN32
 
 #define        USED
 
index 7303263cd688bffcc6b49d0d249229553393407e..75938f60072f364bbb46e41acca76e8a5c402909 100644 (file)
@@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
        #include <limits.h>
 #endif
 
-#ifdef _WIN32
+#ifdef WIN32
        #include <windows.h>
 #endif
 
index 47d8d4b5b0c757f2895a84c414b221c93a357855..1ba1b75d4ab6028b32c91b261eb978c0447be18b 100644 (file)
@@ -46,7 +46,7 @@ writebsp.c
 #include "bspfile.h"
 #include "inout.h"
 
-#ifdef _WIN32
+#ifdef WIN32
        #ifdef NDEBUG                                                   // Don't show in a Release build
                #pragma warning(disable : 4305)     // truncate from double to float
                #pragma warning(disable : 4244)     // conversion from double to float
index 2eef8bc4c2aef63f24c79a40f659d416791f4004..62ee38c3abaa9a16a77a44d167d5de836e90ead3 100644 (file)
@@ -36,11 +36,11 @@ trace.c
 #include "lbmlib.h"
 #include "inout.h"
 
-#ifdef _WIN32
+#ifdef WIN32
 #include <windows.h>
 #endif
 
-#ifdef _WIN32
+#ifdef WIN32
        #ifdef NDEBUG                                                   // Don't show in a Release build
                #pragma warning(disable : 4305)     // truncate from double to float
                #pragma warning(disable : 4244)     // conversion from double to float
index 44c8451660ee6c0888f3117b55e86cc306dd6904..b951770427af84e0ab48da268ff457be8ef97ed8 100644 (file)
@@ -30,7 +30,7 @@ qvis3.c
 #include "bspfile.h"
 #include "inout.h"
 
-#ifdef _WIN32
+#ifdef WIN32
        #ifdef NDEBUG                                                   // Don't show in a Release build
                #pragma warning(disable : 4305)     // truncate from double to float
                #pragma warning(disable : 4244)     // conversion from double to float
index 7ab613fd1f39ca5e7bb3e69155b87f42dc8b19cd..8c45d5305c02672aec05d09ac286fa6eb3b44ba1 100644 (file)
@@ -495,17 +495,31 @@ void BeginBSPFile (void)
 EndBSPFile
 ============
 */
-void EndBSPFile( void ) {
+void EndBSPFile (void)
+{
        char    path[1024];
 
-       EmitBrushes();
-       EmitPlanes();
-       UnparseEntities();
+#if 0
+       int             len;
+       byte    *buf;
+#endif
+
+       EmitBrushes ();
+       EmitPlanes ();
+       UnparseEntities ();
+
+       // load the pop
+#if 0
+       sprintf (path, "%s/pics/pop.lmp", gamedir);
+       len = LoadFile (path, &buf);
+       memcpy (dpop, buf, sizeof(dpop));
+       free (buf);
+#endif
 
        // write the map
-       sprintf( path, "%s.bsp", source );
-       Sys_Printf( "Writing %s\n", path );
-       WriteBSPFile( path );
+       sprintf (path, "%s.bsp", source);
+       Sys_Printf ("Writing %s\n", path);
+       WriteBSPFile (path);
 }
 
 
index 37a2fc1915d5e2834cedaee6e83e8058d534a958..2d18588becbafa8555cb2c5dff5de67df5a1e8b4 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include "qdata.h"
 #include "inout.h"
 
index 76713a5bad71fcb8280ab6688f91911fd62f724c..508d1378d298165ea05c392ec544cc591a133e3d 100644 (file)
@@ -1,3 +1,23 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
 
 #include "qdata.h"
 #include "inout.h"
index 0502ec89341e6420b53419f8d7dcb7893bdc221e..6c001a7570860543e722f05191dcdf7a51478d21 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include "qdata.h"
 #include "inout.h"
 
@@ -26,6 +47,8 @@ void InitPaths( int *argc, char **argv );
 =======================================================
 */
 
+unsigned Com_BlockChecksum (void *buffer, int length);
+
 typedef struct
 {
        char    name[56];
@@ -143,6 +166,7 @@ void FinishPak (void)
        int             dirlen;
        int             d;
        int             i;
+       unsigned        checksum;
 
        if (!g_pak)
                return;
@@ -155,6 +179,8 @@ void FinishPak (void)
        pakheader.dirofs = LittleLong(ftell(pakfile));
        pakheader.dirlen = LittleLong(dirlen);
        
+       checksum = Com_BlockChecksum ( (void *)pfiles, dirlen );
+
        SafeWrite (pakfile, pfiles, dirlen);
 
        i = ftell (pakfile);
@@ -165,6 +191,7 @@ void FinishPak (void)
        
        d = pf - pfiles;
        printf ("%i files packed in %i bytes\n",d, i);
+       printf ("checksum: 0x%x\n", checksum);
 }
 
 
index 2a1da9cbb2a30723cc34967967f7ac7a7c0e20eb..81418175b76d7a4f10a32a7d49d4e1b65c43c1b4 100644 (file)
@@ -1,5 +1,23 @@
-// qdata.h
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
 
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -16,7 +34,7 @@
 #include "l3dslib.h"
 #include "bspfile.h"
 
-#ifdef _WIN32
+#ifdef WIN32
        #ifdef NDEBUG                                                   // Don't show in a Release build
                #pragma warning(disable : 4305)     // truncate from double to float
                #pragma warning(disable : 4244)     // conversion from double to float
index db812751f1e409bad76154275e9d699319fa5093..dc85da434d8e590635b2fef3de17651fd889e14d 100644 (file)
@@ -1,3 +1,23 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
 
 #include "qdata.h"
 #include "inout.h"
index 6aee61269789393613e15bb6536c57a0c7a5cf27..837c7b42441a711f8de866ca51b309f0852fc759 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include "qdata.h"
 
 /*
index 370f5e9597d1b9ade8be41e9458b5f33ff410ea6..4ad90c9b520bee27b4edaea00d2e3509b78170cc 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include "qdata.h"
 #include "inout.h"
 
index f240902b085cdc5ca5c4e72f1a2e8872d95259b8..82e4df36e1bcfb1c96b2312aac6f47fe83371b17 100644 (file)
@@ -180,4 +180,5 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   {-0.425325f, 0.688191f, -0.587785f},
   {-0.425325f, -0.688191f, -0.587785f},
   {-0.587785f, -0.425325f, -0.688191f},
-  {-0.688191f, -0.587785f, -0.425325f},
\ No newline at end of file
+  {-0.688191f, -0.587785f, -0.425325f},
+
index c5f5c3a679ae328e611f261c4eaf673ee2aa8614..104a61b8cea391e8b79f6722f6338f9145bb2725 100644 (file)
@@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#ifdef _WIN32
+#ifdef WIN32
 #include <direct.h>
 #include <windows.h>
 #endif
@@ -356,7 +356,7 @@ void Q_getwd (char *out)
 {
        int i = 0;
 
-#ifdef _WIN32
+#ifdef WIN32
    _getcwd (out, 256);
    strcat (out, "\\");
 #else
@@ -375,7 +375,7 @@ void Q_getwd (char *out)
 
 void Q_mkdir (const char *path)
 {
-#ifdef _WIN32
+#ifdef WIN32
        if (_mkdir (path) != -1)
                return;
 #else
@@ -1229,7 +1229,7 @@ void QCopyFile (const char *from, const char *to)
 
 void Sys_Sleep(int n)
 {
-#ifdef _WIN32
+#ifdef WIN32
   Sleep (n);
 #endif
 #if defined (__linux__) || defined (__APPLE__)
index 33eac6517a1f10d6358a22df0ac577553a07fb22..9153077cb5ac136dc9f7a11d418e99d875f5889a 100644 (file)
@@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#ifdef _WIN32
+#ifdef WIN32
 #include <direct.h>
 #include <windows.h>
 #endif
@@ -42,7 +42,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "l_net/l_net.h"
 #include "libxml/tree.h"
 
-#ifdef _WIN32
+#ifdef WIN32
 HWND hwndOut = NULL;
 qboolean lookedForServer = false;
 UINT wm_BroadcastCommand = -1;
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7398d4e4f1ddf941415802d6f77a74a5561fca5c 100644 (file)
@@ -0,0 +1,298 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
+/* GLOBAL.H - RSAREF types and constants */
+
+#include <string.h>
+
+/* POINTER defines a generic pointer type */
+typedef unsigned char *POINTER;
+
+/* UINT2 defines a two byte word */
+typedef unsigned short int UINT2;
+
+/* UINT4 defines a four byte word */
+typedef unsigned long int UINT4;
+
+  
+/* MD4.H - header file for MD4C.C */
+
+/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. 
+
+All rights reserved.
+  
+License to copy and use this software is granted provided that it is identified as the \93RSA Data Security, Inc. MD4 Message-Digest Algorithm\94 in all material mentioning or referencing this software or this function.
+License is also granted to make and use derivative works provided that such works are identified as \93derived from the RSA Data Security, Inc. MD4 Message-Digest Algorithm\94 in all material mentioning or referencing the derived work.
+RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided \93as is\94 without express or implied warranty of any kind.
+  
+These notices must be retained in any copies of any part of this documentation and/or software. */
+
+/* MD4 context. */
+typedef struct {
+       UINT4 state[4];                         /* state (ABCD) */
+       UINT4 count[2];                         /* number of bits, modulo 2^64 (lsb first) */
+       unsigned char buffer[64];                       /* input buffer */
+} MD4_CTX;
+
+void MD4Init (MD4_CTX *);
+void MD4Update (MD4_CTX *, unsigned char *, unsigned int);
+void MD4Final (unsigned char [16], MD4_CTX *);
+  
+
+  
+/* MD4C.C - RSA Data Security, Inc., MD4 message-digest algorithm */
+/* Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved.
+  
+License to copy and use this software is granted provided that it is identified as the
+RSA Data Security, Inc. MD4 Message-Digest Algorithm
+ in all material mentioning or referencing this software or this function.
+License is also granted to make and use derivative works provided that such works are identified as 
+derived from the RSA Data Security, Inc. MD4 Message-Digest Algorithm
+in all material mentioning or referencing the derived work.
+RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided
+as is without express or implied warranty of any kind.
+  
+These notices must be retained in any copies of any part of this documentation and/or software. */
+
+/* Constants for MD4Transform routine.  */
+#define S11 3
+#define S12 7
+#define S13 11
+#define S14 19
+#define S21 3
+#define S22 5
+#define S23 9
+#define S24 13
+#define S31 3
+#define S32 9
+#define S33 11
+#define S34 15
+
+static void MD4Transform (UINT4 [4], unsigned char [64]);
+static void Encode (unsigned char *, UINT4 *, unsigned int);
+static void Decode (UINT4 *, unsigned char *, unsigned int);
+static void MD4_memcpy (POINTER, POINTER, unsigned int);
+static void MD4_memset (POINTER, int, unsigned int);
+
+static unsigned char PADDING[64] = {
+0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/* F, G and H are basic MD4 functions. */
+#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
+#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
+#define H(x, y, z) ((x) ^ (y) ^ (z))
+
+/* ROTATE_LEFT rotates x left n bits. */
+#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
+
+/* FF, GG and HH are transformations for rounds 1, 2 and 3 */
+/* Rotation is separate from addition to prevent recomputation */
+#define FF(a, b, c, d, x, s) {(a) += F ((b), (c), (d)) + (x); (a) = ROTATE_LEFT ((a), (s));}
+
+#define GG(a, b, c, d, x, s) {(a) += G ((b), (c), (d)) + (x) + (UINT4)0x5a827999; (a) = ROTATE_LEFT ((a), (s));}
+
+#define HH(a, b, c, d, x, s) {(a) += H ((b), (c), (d)) + (x) + (UINT4)0x6ed9eba1; (a) = \
+ROTATE_LEFT ((a), (s)); }
+
+
+/* MD4 initialization. Begins an MD4 operation, writing a new context. */
+void MD4Init (MD4_CTX *context)
+{
+       context->count[0] = context->count[1] = 0;
+
+/* Load magic initialization constants.*/
+context->state[0] = 0x67452301;
+context->state[1] = 0xefcdab89;
+context->state[2] = 0x98badcfe;
+context->state[3] = 0x10325476;
+}
+
+/* MD4 block update operation. Continues an MD4 message-digest operation, processing another message block, and updating the context. */
+void MD4Update (MD4_CTX *context, unsigned char *input, unsigned int inputLen)
+{
+       unsigned int i, index, partLen;
+
+       /* Compute number of bytes mod 64 */
+       index = (unsigned int)((context->count[0] >> 3) & 0x3F);
+
+       /* Update number of bits */
+       if ((context->count[0] += ((UINT4)inputLen << 3))< ((UINT4)inputLen << 3))
+               context->count[1]++;
+
+       context->count[1] += ((UINT4)inputLen >> 29);
+
+       partLen = 64 - index;
+
+       /* Transform as many times as possible.*/
+       if (inputLen >= partLen)
+       {
+               memcpy((POINTER)&context->buffer[index], (POINTER)input, partLen);
+               MD4Transform (context->state, context->buffer);
+
+               for (i = partLen; i + 63 < inputLen; i += 64)
+                       MD4Transform (context->state, &input[i]);
+
+               index = 0;
+       }
+       else
+               i = 0;
+
+       /* Buffer remaining input */
+       memcpy ((POINTER)&context->buffer[index], (POINTER)&input[i], inputLen-i);
+}
+
+
+/* MD4 finalization. Ends an MD4 message-digest operation, writing the the message digest and zeroizing the context. */
+void MD4Final (unsigned char digest[16], MD4_CTX *context)
+{
+       unsigned char bits[8];
+       unsigned int index, padLen;
+
+       /* Save number of bits */
+       Encode (bits, context->count, 8);
+
+       /* Pad out to 56 mod 64.*/
+       index = (unsigned int)((context->count[0] >> 3) & 0x3f);
+       padLen = (index < 56) ? (56 - index) : (120 - index);
+       MD4Update (context, PADDING, padLen);
+
+       /* Append length (before padding) */
+       MD4Update (context, bits, 8);
+       
+       /* Store state in digest */
+       Encode (digest, context->state, 16);
+
+       /* Zeroize sensitive information.*/
+       memset ((POINTER)context, 0, sizeof (*context));
+}
+
+
+/* MD4 basic transformation. Transforms state based on block. */
+static void MD4Transform (UINT4 state[4], unsigned char block[64])
+{
+       UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
+
+       Decode (x, block, 64);
+
+/* Round 1 */
+FF (a, b, c, d, x[ 0], S11);                           /* 1 */
+FF (d, a, b, c, x[ 1], S12);                           /* 2 */
+FF (c, d, a, b, x[ 2], S13);                           /* 3 */
+FF (b, c, d, a, x[ 3], S14);                           /* 4 */
+FF (a, b, c, d, x[ 4], S11);                           /* 5 */
+FF (d, a, b, c, x[ 5], S12);                           /* 6 */
+FF (c, d, a, b, x[ 6], S13);                           /* 7 */
+FF (b, c, d, a, x[ 7], S14);                           /* 8 */
+FF (a, b, c, d, x[ 8], S11);                           /* 9 */
+FF (d, a, b, c, x[ 9], S12);                           /* 10 */
+FF (c, d, a, b, x[10], S13);                   /* 11 */
+FF (b, c, d, a, x[11], S14);                   /* 12 */
+FF (a, b, c, d, x[12], S11);                   /* 13 */
+FF (d, a, b, c, x[13], S12);                   /* 14 */
+FF (c, d, a, b, x[14], S13);                   /* 15 */
+FF (b, c, d, a, x[15], S14);                   /* 16 */
+
+/* Round 2 */
+GG (a, b, c, d, x[ 0], S21);                   /* 17 */
+GG (d, a, b, c, x[ 4], S22);                   /* 18 */
+GG (c, d, a, b, x[ 8], S23);                   /* 19 */
+GG (b, c, d, a, x[12], S24);                   /* 20 */
+GG (a, b, c, d, x[ 1], S21);                   /* 21 */
+GG (d, a, b, c, x[ 5], S22);                   /* 22 */
+GG (c, d, a, b, x[ 9], S23);                   /* 23 */
+GG (b, c, d, a, x[13], S24);                   /* 24 */
+GG (a, b, c, d, x[ 2], S21);                   /* 25 */
+GG (d, a, b, c, x[ 6], S22);                   /* 26 */
+GG (c, d, a, b, x[10], S23);                   /* 27 */
+GG (b, c, d, a, x[14], S24);                   /* 28 */
+GG (a, b, c, d, x[ 3], S21);                   /* 29 */
+GG (d, a, b, c, x[ 7], S22);                   /* 30 */
+GG (c, d, a, b, x[11], S23);                   /* 31 */
+GG (b, c, d, a, x[15], S24);                   /* 32 */
+
+/* Round 3 */
+HH (a, b, c, d, x[ 0], S31);                           /* 33 */
+HH (d, a, b, c, x[ 8], S32);                   /* 34 */
+HH (c, d, a, b, x[ 4], S33);                   /* 35 */
+HH (b, c, d, a, x[12], S34);                   /* 36 */
+HH (a, b, c, d, x[ 2], S31);                   /* 37 */
+HH (d, a, b, c, x[10], S32);                   /* 38 */
+HH (c, d, a, b, x[ 6], S33);                   /* 39 */
+HH (b, c, d, a, x[14], S34);                   /* 40 */
+HH (a, b, c, d, x[ 1], S31);                   /* 41 */
+HH (d, a, b, c, x[ 9], S32);                   /* 42 */
+HH (c, d, a, b, x[ 5], S33);                   /* 43 */
+HH (b, c, d, a, x[13], S34);                   /* 44 */
+HH (a, b, c, d, x[ 3], S31);                   /* 45 */
+HH (d, a, b, c, x[11], S32);                   /* 46 */
+HH (c, d, a, b, x[ 7], S33);                   /* 47 */
+HH (b, c, d, a, x[15], S34);                   /* 48 */
+
+state[0] += a;
+state[1] += b;
+state[2] += c;
+state[3] += d;
+
+       /* Zeroize sensitive information.*/
+       memset ((POINTER)x, 0, sizeof (x));
+}
+
+
+/* Encodes input (UINT4) into output (unsigned char). Assumes len is a multiple of 4. */
+static void Encode (unsigned char *output, UINT4 *input, unsigned int len)
+{
+       unsigned int i, j;
+
+       for (i = 0, j = 0; j < len; i++, j += 4) {
+               output[j] = (unsigned char)(input[i] & 0xff);
+               output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
+               output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
+               output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
+       }
+}
+
+
+/* Decodes input (unsigned char) into output (UINT4). Assumes len is a multiple of 4. */
+static void Decode (UINT4 *output, unsigned char *input, unsigned int len)
+{
+unsigned int i, j;
+
+for (i = 0, j = 0; j < len; i++, j += 4)
+       output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
+}
+
+//===================================================================
+
+unsigned Com_BlockChecksum (void *buffer, int length)
+{
+       int                     digest[4];
+       unsigned        val;
+       MD4_CTX         ctx;
+
+       MD4Init (&ctx);
+       MD4Update (&ctx, (unsigned char *)buffer, length);
+       MD4Final ( (unsigned char *)digest, &ctx);
+       
+       val = digest[0] ^ digest[1] ^ digest[2] ^ digest[3];
+
+       return val;
+}
index 644908eab29820e2a318985df2ae927fc92dfeeb..5554d02a09229f62f09203cafcadba691296b8f6 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index ce51fb32246d1351d93a2777b755a09bb981f087..58462e16c5c4c52e799d9bab2004278e0a10b8e0 100644 (file)
@@ -110,7 +110,7 @@ WIN32
 
 ===================================================================
 */
-#ifdef _WIN32
+#ifdef WIN32
 
 #define        USED
 
index 64edf0a3ecf796a5e7635506fb29d6b5943e8ece..ee84c3b84c3bc87c9b10a22a8853f1c5bf4371e6 100644 (file)
@@ -55,6 +55,8 @@ extern qboolean       g_nomkdir;
 =======================================================
 */
 
+unsigned Com_BlockChecksum (void *buffer, int length);
+
 typedef struct
 {
        char    name[56];
@@ -153,6 +155,7 @@ void FinishPak (void)
        int             dirlen;
        int             d;
        int             i;
+       unsigned        checksum;
 
        if (!g_pak)
                return;
@@ -165,6 +168,8 @@ void FinishPak (void)
        pakheader.dirofs = LittleLong(ftell(pakfile));
        pakheader.dirlen = LittleLong(dirlen);
        
+       checksum = Com_BlockChecksum ( (void *)pfiles, dirlen );
+
        SafeWrite (pakfile, pfiles, dirlen);
 
        i = ftell (pakfile);
@@ -175,6 +180,7 @@ void FinishPak (void)
        
        d = pf - pfiles;
        printf ("%i files packed in %i bytes\n",d, i);
+       printf ("checksum: 0x%x\n", checksum);
 }
 
 
index e2ea8f0afc5963966175885715f0108e3c428b33..24c9811f638a44a434c30f332ce84954a3a2c31b 100644 (file)
@@ -333,7 +333,7 @@ void Q_getwd (char *out)
 {
        int i = 0;
 
-#ifdef _WIN32
+#ifdef WIN32
    _getcwd (out, 256);
    strcat (out, "\\");
 #else
@@ -352,7 +352,7 @@ void Q_getwd (char *out)
 
 void Q_mkdir (const char *path)
 {
-#ifdef _WIN32
+#ifdef WIN32
        if (_mkdir (path) != -1)
                return;
 #else
@@ -1144,7 +1144,7 @@ void QCopyFile (const char *from, const char *to)
 
 void Sys_Sleep(int n)
 {
-#ifdef _WIN32
+#ifdef WIN32
   Sleep (n);
 #endif
 #if defined (__linux__) || defined (__APPLE__)
index 7a0d22cf2ffbb0084f42a8f2041f02f45ac81d47..f575202355f10b0258a31a3ec9ffc0dd843a07bd 100644 (file)
@@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 // imagelib.c
 
+#include "inout.h"
 #include "cmdlib.h"
 #include "imagelib.h"
 #include "vfs.h"
@@ -884,233 +885,242 @@ typedef struct _TargaHeader {
        unsigned char   pixel_size, attributes;
 } TargaHeader;
 
+void TargaError(TargaHeader *t, const char *message)
+{
+       Sys_Printf("%s\n:TargaHeader:\nuint8 id_length = %i;\nuint8 colormap_type = %i;\nuint8 image_type = %i;\nuint16 colormap_index = %i;\nuint16 colormap_length = %i;\nuint8 colormap_size = %i;\nuint16 x_origin = %i;\nuint16 y_origin = %i;\nuint16 width = %i;\nuint16 height = %i;\nuint8 pixel_size = %i;\nuint8 attributes = %i;\n", message, t->id_length, t->colormap_type, t->image_type, t->colormap_index, t->colormap_length, t->colormap_size, t->x_origin, t->y_origin, t->width, t->height, t->pixel_size, t->attributes);
+}
+
 /*
 =============
 LoadTGABuffer
 =============
 */
-void LoadTGABuffer ( byte *buffer, byte **pic, int *width, int *height)
+void LoadTGABuffer (const byte *f, const byte *enddata, byte **pic, int *width, int *height)
 {
-       int             columns, rows, numPixels;
-       byte    *pixbuf;
-       int             row, column;
-       byte    *buf_p;
-       TargaHeader     targa_header;
-       byte            *targa_rgba;
+       int x, y, row_inc, compressed, readpixelcount, red, green, blue, alpha, runlen, pindex, alphabits, image_width, image_height;
+       byte *pixbuf, *image_rgba;
+       const byte *fin;
+       unsigned char *p;
+       TargaHeader targa_header;
+       unsigned char palette[256*4];
 
        *pic = NULL;
 
-       buf_p = buffer;
+       // abort if it is too small to parse
+       if (enddata - f < 19)
+               return;
 
-       targa_header.id_length = *buf_p++;
-       targa_header.colormap_type = *buf_p++;
-       targa_header.image_type = *buf_p++;
-       
-       targa_header.colormap_index = LittleShort ( *(short *)buf_p );
-       buf_p += 2;
-       targa_header.colormap_length = LittleShort ( *(short *)buf_p );
-       buf_p += 2;
-       targa_header.colormap_size = *buf_p++;
-       targa_header.x_origin = LittleShort ( *(short *)buf_p );
-       buf_p += 2;
-       targa_header.y_origin = LittleShort ( *(short *)buf_p );
-       buf_p += 2;
-       targa_header.width = LittleShort ( *(short *)buf_p );
-       buf_p += 2;
-       targa_header.height = LittleShort ( *(short *)buf_p );
-       buf_p += 2;
-       targa_header.pixel_size = *buf_p++;
-       targa_header.attributes = *buf_p++;
-
-       if (targa_header.image_type!=2 
-               && targa_header.image_type!=10
-               && targa_header.image_type != 3 ) 
+       targa_header.id_length = f[0];
+       targa_header.colormap_type = f[1];
+       targa_header.image_type = f[2];
+
+       targa_header.colormap_index = f[3] + f[4] * 256;
+       targa_header.colormap_length = f[5] + f[6] * 256;
+       targa_header.colormap_size = f[7];
+       targa_header.x_origin = f[8] + f[9] * 256;
+       targa_header.y_origin = f[10] + f[11] * 256;
+       targa_header.width = image_width = f[12] + f[13] * 256;
+       targa_header.height = image_height = f[14] + f[15] * 256;
+
+       targa_header.pixel_size = f[16];
+       targa_header.attributes = f[17];
+
+       // advance to end of header
+       fin = f + 18;
+
+       // skip TARGA image comment (usually 0 bytes)
+       fin += targa_header.id_length;
+
+       // read/skip the colormap if present (note: according to the TARGA spec it
+       // can be present even on truecolor or greyscale images, just not used by
+       // the image data)
+       if (targa_header.colormap_type)
        {
-               Error("LoadTGA: Only type 2 (RGB), 3 (gray), and 10 (RGB) TGA images supported\n");
+               if (targa_header.colormap_length > 256)
+               {
+                       TargaError(&targa_header, "LoadTGA: only up to 256 colormap_length supported\n");
+                       return;
+               }
+               if (targa_header.colormap_index)
+               {
+                       TargaError(&targa_header, "LoadTGA: colormap_index not supported\n");
+                       return;
+               }
+               if (targa_header.colormap_size == 24)
+               {
+                       for (x = 0;x < targa_header.colormap_length;x++)
+                       {
+                               palette[x*4+2] = *fin++;
+                               palette[x*4+1] = *fin++;
+                               palette[x*4+0] = *fin++;
+                               palette[x*4+3] = 255;
+                       }
+               }
+               else if (targa_header.colormap_size == 32)
+               {
+                       for (x = 0;x < targa_header.colormap_length;x++)
+                       {
+                               palette[x*4+2] = *fin++;
+                               palette[x*4+1] = *fin++;
+                               palette[x*4+0] = *fin++;
+                               palette[x*4+3] = *fin++;
+                       }
+               }
+               else
+               {
+                       TargaError(&targa_header, "LoadTGA: Only 32 and 24 bit colormap_size supported\n");
+                       return;
+               }
        }
 
-       if ( targa_header.colormap_type != 0 )
+       // check our pixel_size restrictions according to image_type
+       if (targa_header.image_type == 2 || targa_header.image_type == 10)
        {
-               Error("LoadTGA: colormaps not supported\n" );
+               if (targa_header.pixel_size != 24 && targa_header.pixel_size != 32)
+               {
+                       TargaError(&targa_header, "LoadTGA: only 24bit and 32bit pixel sizes supported for type 2 and type 10 images\n");
+                       return;
+               }
+       }
+       else if (targa_header.image_type == 1 || targa_header.image_type == 9)
+       {
+               if (targa_header.pixel_size != 8)
+               {
+                       TargaError(&targa_header, "LoadTGA: only 8bit pixel size for type 1, 3, 9, and 11 images supported\n");
+                       return;
+               }
+       }
+       else if (targa_header.image_type == 3 || targa_header.image_type == 11)
+       {
+               if (targa_header.pixel_size != 8)
+               {
+                       TargaError(&targa_header, "LoadTGA: only 8bit pixel size for type 1, 3, 9, and 11 images supported\n");
+                       return;
+               }
+       }
+       else
+       {
+               TargaError(&targa_header, "LoadTGA: Only type 1, 2, 3, 9, 10, and 11 targa RGB images supported");
+               return;
        }
 
-       if ( ( targa_header.pixel_size != 32 && targa_header.pixel_size != 24 ) && targa_header.image_type != 3 )
+       if (targa_header.attributes & 0x10)
        {
-               Error("LoadTGA: Only 32 or 24 bit images supported (no colormaps)\n");
+               TargaError(&targa_header, "LoadTGA: origin must be in top left or bottom left, top right and bottom right are not supported\n");
+               return;
        }
 
-       columns = targa_header.width;
-       rows = targa_header.height;
-       numPixels = columns * rows;
+       // number of attribute bits per pixel, we only support 0 or 8
+       alphabits = targa_header.attributes & 0x0F;
+       if (alphabits != 8 && alphabits != 0)
+       {
+               TargaError(&targa_header, "LoadTGA: only 0 or 8 attribute (alpha) bits supported\n");
+               return;
+       }
 
-       if (width)
-               *width = columns;
-       if (height)
-               *height = rows;
+       image_rgba = safe_malloc(image_width * image_height * 4);
+       if (!image_rgba)
+       {
+               Sys_Printf("LoadTGA: not enough memory for %i by %i image\n", image_width, image_height);
+               return;
+       }
 
-       targa_rgba = safe_malloc (numPixels*4);
-       *pic = targa_rgba;
+       // If bit 5 of attributes isn't set, the image has been stored from bottom to top
+       if ((targa_header.attributes & 0x20) == 0)
+       {
+               pixbuf = image_rgba + (image_height - 1)*image_width*4;
+               row_inc = -image_width*4*2;
+       }
+       else
+       {
+               pixbuf = image_rgba;
+               row_inc = 0;
+       }
 
-       if (targa_header.id_length != 0)
-               buf_p += targa_header.id_length;  // skip TARGA image comment
-       
-       if ( targa_header.image_type==2 || targa_header.image_type == 3 )
-       { 
-               // Uncompressed RGB or gray scale image
-               for(row=rows-1; row>=0; row--) 
+       compressed = targa_header.image_type == 9 || targa_header.image_type == 10 || targa_header.image_type == 11;
+       x = 0;
+       y = 0;
+       red = green = blue = alpha = 255;
+       while (y < image_height)
+       {
+               // decoder is mostly the same whether it's compressed or not
+               readpixelcount = 1000000;
+               runlen = 1000000;
+               if (compressed && fin < enddata)
+               {
+                       runlen = *fin++;
+                       // high bit indicates this is an RLE compressed run
+                       if (runlen & 0x80)
+                               readpixelcount = 1;
+                       runlen = 1 + (runlen & 0x7f);
+               }
+
+               while((runlen--) && y < image_height)
                {
-                       pixbuf = targa_rgba + row*columns*4;
-                       for(column=0; column<columns; column++) 
+                       if (readpixelcount > 0)
                        {
-                               unsigned char red,green,blue,alphabyte;
-                               switch (targa_header.pixel_size) 
+                               readpixelcount--;
+                               red = green = blue = alpha = 255;
+                               if (fin < enddata)
                                {
-                                       
-                               case 8:
-                                       blue = *buf_p++;
-                                       green = blue;
-                                       red = blue;
-                                       *pixbuf++ = red;
-                                       *pixbuf++ = green;
-                                       *pixbuf++ = blue;
-                                       *pixbuf++ = 255;
-                                       break;
-
-                               case 24:
-                                       blue = *buf_p++;
-                                       green = *buf_p++;
-                                       red = *buf_p++;
-                                       *pixbuf++ = red;
-                                       *pixbuf++ = green;
-                                       *pixbuf++ = blue;
-                                       *pixbuf++ = 255;
-                                       break;
-                               case 32:
-                                       blue = *buf_p++;
-                                       green = *buf_p++;
-                                       red = *buf_p++;
-                                       alphabyte = *buf_p++;
-                                       *pixbuf++ = red;
-                                       *pixbuf++ = green;
-                                       *pixbuf++ = blue;
-                                       *pixbuf++ = alphabyte;
-                                       break;
-                               default:
-                                       //Error("LoadTGA: illegal pixel_size '%d' in file '%s'\n", targa_header.pixel_size, name );
-                                       break;
-                               }
-                       }
-               }
-       }
-       else if (targa_header.image_type==10) {   // Runlength encoded RGB images
-               unsigned char red,green,blue,alphabyte,packetHeader,packetSize,j;
-
-               red = 0;
-               green = 0;
-               blue = 0;
-               alphabyte = 0xff;
-
-               for(row=rows-1; row>=0; row--) {
-                       pixbuf = targa_rgba + row*columns*4;
-                       for(column=0; column<columns; ) {
-                               packetHeader= *buf_p++;
-                               packetSize = 1 + (packetHeader & 0x7f);
-                               if (packetHeader & 0x80) {        // run-length packet
-                                       switch (targa_header.pixel_size) {
-                                               case 24:
-                                                               blue = *buf_p++;
-                                                               green = *buf_p++;
-                                                               red = *buf_p++;
-                                                               alphabyte = 255;
-                                                               break;
-                                               case 32:
-                                                               blue = *buf_p++;
-                                                               green = *buf_p++;
-                                                               red = *buf_p++;
-                                                               alphabyte = *buf_p++;
-                                                               break;
-                                               default:
-                                                       //Error("LoadTGA: illegal pixel_size '%d' in file '%s'\n", targa_header.pixel_size, name );
-                                                       break;
-                                       }
-       
-                                       for(j=0;j<packetSize;j++) {
-                                               *pixbuf++=red;
-                                               *pixbuf++=green;
-                                               *pixbuf++=blue;
-                                               *pixbuf++=alphabyte;
-                                               column++;
-                                               if (column==columns) { // run spans across rows
-                                                       column=0;
-                                                       if (row>0)
-                                                               row--;
-                                                       else
-                                                               goto breakOut;
-                                                       pixbuf = targa_rgba + row*columns*4;
-                                               }
-                                       }
-                               }
-                               else {                            // non run-length packet
-                                       for(j=0;j<packetSize;j++) {
-                                               switch (targa_header.pixel_size) {
-                                                       case 24:
-                                                                       blue = *buf_p++;
-                                                                       green = *buf_p++;
-                                                                       red = *buf_p++;
-                                                                       *pixbuf++ = red;
-                                                                       *pixbuf++ = green;
-                                                                       *pixbuf++ = blue;
-                                                                       *pixbuf++ = 255;
-                                                                       break;
-                                                       case 32:
-                                                                       blue = *buf_p++;
-                                                                       green = *buf_p++;
-                                                                       red = *buf_p++;
-                                                                       alphabyte = *buf_p++;
-                                                                       *pixbuf++ = red;
-                                                                       *pixbuf++ = green;
-                                                                       *pixbuf++ = blue;
-                                                                       *pixbuf++ = alphabyte;
-                                                                       break;
-                                                       default:
-                                                               //Sysprintf("LoadTGA: illegal pixel_size '%d' in file '%s'\n", targa_header.pixel_size, name );
-                                                               break;
-                                               }
-                                               column++;
-                                               if (column==columns) { // pixel packet run spans across rows
-                                                       column=0;
-                                                       if (row>0)
-                                                               row--;
-                                                       else
-                                                               goto breakOut;
-                                                       pixbuf = targa_rgba + row*columns*4;
-                                               }                                               
+                                       switch(targa_header.image_type)
+                                       {
+                                       case 1:
+                                       case 9:
+                                               // colormapped
+                                               pindex = *fin++;
+                                               if (pindex >= targa_header.colormap_length)
+                                                       pindex = 0; // error
+                                               p = palette + pindex * 4;
+                                               red = p[0];
+                                               green = p[1];
+                                               blue = p[2];
+                                               alpha = p[3];
+                                               break;
+                                       case 2:
+                                       case 10:
+                                               // BGR or BGRA
+                                               blue = *fin++;
+                                               if (fin < enddata)
+                                                       green = *fin++;
+                                               if (fin < enddata)
+                                                       red = *fin++;
+                                               if (targa_header.pixel_size == 32 && fin < enddata)
+                                                       alpha = *fin++;
+                                               break;
+                                       case 3:
+                                       case 11:
+                                               // greyscale
+                                               red = green = blue = *fin++;
+                                               break;
                                        }
+                                       if (!alphabits)
+                                               alpha = 255;
                                }
                        }
-                       breakOut:;
-               }
-       }
-
-       // vertically flipped
-       if ( (targa_header.attributes & (1<<5)) ) {
-               int flip;
-               for (row = 0; row < .5f * rows; row++)
-               {
-                       for (column = 0; column < columns; column++)
+                       *pixbuf++ = red;
+                       *pixbuf++ = green;
+                       *pixbuf++ = blue;
+                       *pixbuf++ = alpha;
+                       x++;
+                       if (x == image_width)
                        {
-                               flip = *( (int*)targa_rgba + row * columns + column);
-                               *( (int*)targa_rgba + row * columns + column) = *( (int*)targa_rgba + ( ( rows - 1 ) - row ) * columns + column );
-                               *( (int*)targa_rgba + ( ( rows - 1 ) - row ) * columns + column ) = flip;
+                               // end of line, advance to next
+                               x = 0;
+                               y++;
+                               pixbuf += row_inc;
                        }
                }
        }
 
-       //free(buffer);
+       *pic = image_rgba;
+       if (width)
+               *width = image_width;
+       if (height)
+               *height = image_height;
 }
 
 
-
 /*
 =============
 LoadTGA
@@ -1119,17 +1129,17 @@ LoadTGA
 void LoadTGA (const char *name, byte **pixels, int *width, int *height)
 {
        byte                    *buffer;
-  int nLen;
+       int nLen;
        //
        // load the file
        //
        nLen = vfsLoadFile ( ( char * ) name, (void **)&buffer, 0);
-       if (nLen == -1) 
-  {
+       if (nLen == -1)
+       {
                Error ("Couldn't read %s", name);
-  }
+       }
 
-  LoadTGABuffer(buffer, pixels, width, height);
+       LoadTGABuffer(buffer, buffer + nLen, pixels, width, height);
 
 }
 
index 9a99d6afb8eb8e558860123a794cb68fdab0cfc7..1379427de8c6fe92a1331767669f3ef55b11980a 100644 (file)
@@ -36,9 +36,10 @@ void Save256Image (const char *name, byte *pixels, byte *palette,
                                   int width, int height);
 
 
-void LoadTGA( const char *filename, byte **pixels, int *width, int *height );
-void LoadTGABuffer( byte *buffer, byte **pic, int *width, int *height );
-void WriteTGA( const char *filename, byte *data, int width, int height );
+void LoadTGA (const char *filename, byte **pixels, int *width, int *height);
+void LoadTGABuffer ( const byte *buffer, const byte* enddata, byte **pic, int *width, int *height);
+void WriteTGA (const char *filename, byte *data, int width, int height);
 int LoadJPGBuff( void *src_buffer, int src_size, unsigned char **pic, int *width, int *height );
 
-void Load32BitImage( const char *name, unsigned **pixels, int *width, int *height );
+void Load32BitImage (const char *name, unsigned **pixels, int *width, int *height);
+
index dcdd08932ae2aa838d33afb402e37230434e3c1d..6f127e3e5f45cb0c1bfebf7f7de8193e40271b28 100644 (file)
@@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#ifdef _WIN32
+#ifdef WIN32
 #include <direct.h>
 #include <windows.h>
 #endif
@@ -42,7 +42,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "l_net/l_net.h"
 #include "libxml/tree.h"
 
-#ifdef _WIN32
+// utf8 conversion
+#include <glib/gconvert.h>
+#include <glib/gmem.h>
+
+#ifdef WIN32
 HWND hwndOut = NULL;
 qboolean lookedForServer = qfalse;
 UINT wm_BroadcastCommand = -1;
@@ -289,7 +293,11 @@ void FPrintf (int flag, char *buf)
     bGotXML = qtrue;
   }
   node = xmlNewNode (NULL, "message");
-  xmlNodeSetContent (node, buf);
+  {
+    gchar* utf8 = g_locale_to_utf8(buf, -1, NULL, NULL, NULL); 
+    xmlNodeSetContent(node, utf8);
+    g_free(utf8);
+  }
   level[0] = (int)'0' + flag;
   level[1] = 0;
   xmlSetProp (node, "level", (char *)&level );
index d417a583f554a08c51d2f8f2179733551c47daaf..aa40ebdcc3e73431406776d82194fb4c16010f68 100644 (file)
@@ -24,6 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 // inout is the only stuff relying on xml, include the headers there
 #include "libxml/tree.h"
+#include "mathlib.h"
 
 // some useful xml routines
 xmlNodePtr xml_NodeForVec( vec3_t v );
index f7be7f5f49c0f993ccebc13604dd776001697ca8..acca4a5d5e8986b496e8e2715b69167c3261c931 100644 (file)
@@ -31,7 +31,7 @@ WIN32
 
 ===================================================================
 */
-#ifdef _WIN32
+#ifdef WIN32
 
 #define        USED
 
index 187b1e70285ed0fc2f871fd1d2d0c4b02a4d94c3..75caec6bcd4c93046bbc167994427131abf12d9c 100644 (file)
@@ -249,8 +249,11 @@ winding_t *BaseWindingForPlane (vec3_t normal, vec_t dist)
        
        CrossProduct (vup, normal, vright);
        
-       VectorScale (vup, MAX_WORLD_COORD, vup);
-       VectorScale (vright, MAX_WORLD_COORD, vright);
+       // LordHavoc: this has to use *2 because otherwise some created points may
+       // be inside the world (think of a diagonal case), and any brush with such
+       // points should be removed, failure to detect such cases is disasterous
+       VectorScale (vup, MAX_WORLD_COORD*2, vup);
+       VectorScale (vright, MAX_WORLD_COORD*2, vright);
 
   // project a really big      axis aligned box onto the plane
        w = AllocWinding (4);
@@ -283,7 +286,7 @@ winding_t   *CopyWinding (winding_t *w)
        winding_t       *c;
 
        c = AllocWinding (w->numpoints);
-       size = (int)((winding_t *)0)->p[w->numpoints];
+       size = (int)((size_t)((winding_t *)0)->p[w->numpoints]);
        memcpy (c, w, size);
        return c;
 }
index 425e4f28437043acd412661675b927ae3a6600a0..0267a18af815a8469d66fa9e26086341c22c1cfa 100644 (file)
@@ -19,6 +19,8 @@ along with GtkRadiant; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
+// Copyright (C) 1999-2000 Id Software, Inc.
+//
 // This file must be identical in the quake and utils directories
 
 // contents flags are seperate bits
index 463d32bdd300fbde7756afebef2a01d4ba191961..abdf2055d286d554d30b1831e3cd273314f10d9c 100644 (file)
@@ -110,7 +110,7 @@ WIN32
 
 ===================================================================
 */
-#ifdef _WIN32
+#ifdef WIN32
 
 #define        USED
 
@@ -602,7 +602,6 @@ RunThreadsOn
 */
 void RunThreadsOn (int workcnt, qboolean showpacifier, void(*func)(int))
 {
-       int             i;
        int             start, end;
 
        dispatch = 0;
index 3afb00c6305e714e0bb6bbf4880d55323aa934aa..258656612827fb9ae69dd23966b66ce1aedb1f57 100644 (file)
@@ -60,7 +60,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "cmdlib.h"
 #include "mathlib.h"
-#include "glib.h"
+#include <glib.h>
 #include "inout.h"
 #include "vfs.h"
 #include "unzip.h"
index 719a487fbda66ab818e6f9f909a1c94ff4542d01..cecfb621e3eed1bf30b020205c933d5fe9737f07 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include <assert.h>
 #include "q3data.h"
 
index cd73cb437a8fe08f37ecc16c3430a2bd8b3f6bdc..a24523c6db2f5dc01a9c3dead700ffb1540716ab 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 typedef struct
 {
        float x, y, z;
index af9669ab5ed45b729cd8d96004fbf2c9772fb43f..b4b4892b4c73f2f717eb32a3d54bf8fdebd87f21 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include "q3data.h"
 
 #if 0
index de872d2b91206451a91fbf6f2db0abcce1c6e534..6f8819ad17d86c8bdafd2e36c30bb3740f6103a1 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include "q3data.h"
 
 byte                   *byteimage, *lbmpalette;
index e959a4115b5eced1a0eaeaa461053c2ffb5ef5a0..4778017c147bcae0cdc9506db84637589f53e87e 100644 (file)
@@ -1,5 +1,26 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include <assert.h>
-#ifdef _WIN32
+#ifdef WIN32
 #include <io.h>
 #endif
 #include "md3lib.h"
index bdee0bd9df98d5fff7549d4d704b4595128b4295..b6fdd16a2cd135f23a6dc778a0b7773a5922a3cd 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include <stdio.h>
 #include "../common/cmdlib.h"
 #include "mathlib.h"
index 1d2d6904b7f9e54d83b83daf205c22c7fb02b6e3..3c31f7bca1ac585d4131c8106759ea6daf85e10d 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include <assert.h>
 #include "q3data.h"
 
index c6083cf533530278168f28059012c86e725da439..5f36f8bf5ecaa2e13c2905c856f68e7b670a8b98 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #if 0
 
 /*
index 0c3b6026e1fef6a5191ff0ad258a57b1dee5d168..d115f22d9251cf5b519cce566e46c704de6d1dcd 100644 (file)
@@ -1,6 +1,27 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include "p3dlib.h"
 
-#ifdef _WIN32
+#ifdef WIN32
 #include <io.h>
 #endif
 #include <stdlib.h>
index 24e446d1d7f8768347ee1490e018118d311eb9e7..9d0bd6e4bee9a0d8838766852843d1a338d6fa57 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 
 #define P3D_GET_CROSSLINE              1
 #define P3D_GET_RESTOFLINE             2
index f89a8cc0f85e9487952801070783992d67e9da46..388f8984eeaa16e743eee911661e2ee2c888f6a9 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include <assert.h>
 #include "q3data.h"
 
index 202f21ddda87b239b08c9a0c516afc85f3fe6f23..746fdc002bd9dacbbc5c8956500654b4efb8c78a 100644 (file)
@@ -1,4 +1,25 @@
-#ifdef _WIN32
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
+#ifdef WIN32
 #include <io.h>
 #endif
 #include "q3data.h"
@@ -31,6 +52,8 @@ char writedir[1024];
 =======================================================
 */
 
+unsigned Com_BlockChecksum (void *buffer, int length);
+
 typedef struct
 {
        char    name[56];
index 458d4ed6eb2da3aa42495ec71727ee07d0b9e9da..727afcdeb0ac27a29b86443bdc4fb56575623ade 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 // q3data.h
 
 
index c42d4420418fcf5a6f348f0c1062fbcc2d605a9b..4c8b9b1c840b79ae0eb7676d8e53e9f0bc929f71 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index 9054d5e90700419de03309cda1a28a98553b19ba..aae09f079a111d2dc266fab8f35a18c8645833fe 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
 #include <assert.h>
 #include "q3data.h"
 
index 28ade081bb46e0fcd05bf9e3625827464ba7099e..2517ca63d210e28ed1778863fedf2b102800e8f7 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -77,7 +78,7 @@ int   CountBrushList( brush_t *brushes )
        
        
        /* count brushes */
-       for( brushes; brushes != NULL; brushes = brushes->next )
+       for( ; brushes != NULL; brushes = brushes->next )
                c++;
        return c;
 }
@@ -92,13 +93,13 @@ allocates a new brush
 brush_t *AllocBrush( int numSides )
 {
        brush_t         *bb;
-       int                     c;
+       size_t          c;
        
        
        /* allocate and clear */
        if( numSides <= 0 )
                Error( "AllocBrush called with numsides = %d", numSides );
-       c = (int) &(((brush_t*) 0)->sides[ numSides ]);
+       c = (size_t)&(((brush_t*) 0)->sides[ numSides ]);
        bb = safe_malloc( c );
        memset( bb, 0, c );
        if( numthreads == 1 )
@@ -121,7 +122,7 @@ void FreeBrush( brush_t *b )
        
        
        /* error check */
-       if( *((int*) b) == 0xFEFEFEFE )
+       if( *((unsigned int*) b) == 0xFEFEFEFE )
        {
                Sys_FPrintf( SYS_VRB, "WARNING: Attempt to free an already freed brush!\n" );
                return;
@@ -133,8 +134,8 @@ void FreeBrush( brush_t *b )
                        FreeWinding( b->sides[ i ].winding );
        
        /* ydnar: overwrite it */
-       memset( b, 0xFE, (int) &(((brush_t*) 0)->sides[ b->numsides ]) );
-       *((int*) b) = 0xFEFEFEFE;
+       memset( b, 0xFE, (size_t)&(((brush_t*) 0)->sides[ b->numsides ]) );
+       *((unsigned int*) b) = 0xFEFEFEFE;
        
        /* free it */
        free( b );
@@ -155,7 +156,7 @@ void FreeBrushList( brush_t *brushes )
        
        
        /* walk brush list */
-       for( brushes; brushes != NULL; brushes = next )
+       for( ; brushes != NULL; brushes = next )
        {
                next = brushes->next;
                FreeBrush( brushes );
@@ -172,12 +173,12 @@ duplicates the brush, sides, and windings
 brush_t *CopyBrush( brush_t *brush )
 {
        brush_t         *newBrush;
-       int                     size;
+       size_t          size;
        int                     i;
        
        
        /* copy brush */
-       size = (int) &(((brush_t*) 0)->sides[ brush->numsides ]);
+       size = (size_t)&(((brush_t*) 0)->sides[ brush->numsides ]);
        newBrush = AllocBrush( brush->numsides );
        memcpy( newBrush, brush, size );
        
@@ -376,8 +377,6 @@ qboolean CreateBrushWindings( brush_t *brush )
                                continue;               /* back side clipaway */
                        if( brush->sides[ j ].bevel )
                                continue;
-                       if( brush->sides[ j ].backSide )
-                               continue;
                        plane = &mapplanes[ brush->sides[ j ].planenum ^ 1 ];
                        ChopWindingInPlace( &w, plane->normal, plane->dist, 0 ); // CLIP_EPSILON );
                        
@@ -850,9 +849,6 @@ void SplitBrush( brush_t *brush, int planenum, brush_t **front, brush_t **back )
        w = BaseWindingForPlane (plane->normal, plane->dist);
        for (i=0 ; i<brush->numsides && w ; i++)
        {
-               if ( brush->sides[i].backSide ) {
-                       continue;       // fake back-sided polygons never split
-               }
                plane2 = &mapplanes[brush->sides[i].planenum ^ 1];
                ChopWindingInPlace (&w, plane2->normal, plane2->dist, 0); // PLANESIDE_EPSILON);
        }
@@ -910,18 +906,10 @@ void SplitBrush( brush_t *brush, int planenum, brush_t **front, brush_t **back )
        // see if we have valid polygons on both sides
        for (i=0 ; i<2 ; i++)
        {
-               BoundBrush (b[i]);
-               for (j=0 ; j<3 ; j++)
+               if (b[i]->numsides < 3 || !BoundBrush (b[i]))
                {
-                       if (b[i]->mins[j] < MIN_WORLD_COORD || b[i]->maxs[j] > MAX_WORLD_COORD)
-                       {
+                       if (b[i]->numsides >= 3)
                                Sys_FPrintf (SYS_VRB,"bogus brush after clip\n");
-                               break;
-                       }
-               }
-
-               if (b[i]->numsides < 3 || j < 3)
-               {
                        FreeBrush (b[i]);
                        b[i] = NULL;
                }
index 9bc2ab62aec854f5677049725f14cf27d8ca5a77..4a0d2520be3c870cbfb2d52fd3a2d248b8c0ffb1 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index ed3d243079cacf2b6df87f94e90281b378fa3997..b05901fa99c309d8b9c7cfeefc4dcae3c928c204 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -586,7 +587,9 @@ int BSPMain( int argc, char **argv )
        
        tempSource[ 0 ] = '\0';
        
-       /* set flares flag */
+       /* set standard game flags */
+       maxSurfaceVerts = game->maxSurfaceVerts;
+       maxSurfaceIndexes = game->maxSurfaceIndexes;
        emitFlares = game->emitFlares;
        
        /* process arguments */
@@ -687,11 +690,13 @@ int BSPMain( int argc, char **argv )
                }
                else if( !strcmp( argv[ i ],  "-mv" ) )
                {
-                       maxSurfaceVerts = atoi( argv[ i + 1 ] );
-                       if( maxSurfaceVerts < 3 )
-                               maxSurfaceVerts = 3;
+                       maxLMSurfaceVerts = atoi( argv[ i + 1 ] );
+                       if( maxLMSurfaceVerts < 3 )
+                               maxLMSurfaceVerts = 3;
+                       if( maxLMSurfaceVerts > maxSurfaceVerts )
+                               maxSurfaceVerts = maxLMSurfaceVerts;
                        i++;
-                       Sys_Printf( "Maximum per-surface vertex count set to %d\n", maxSurfaceVerts );
+                       Sys_Printf( "Maximum lightmapped surface vertex count set to %d\n", maxLMSurfaceVerts );
                }
                else if( !strcmp( argv[ i ],  "-mi" ) )
                {
index ae2fec3091c7bb89916f85d12d03d3d485c6e371..a79d65b2b14515dfdfa0953e633a076dd92aa0fc 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -435,7 +436,7 @@ void PrintBSPFileSizes( void )
        Sys_Printf( "\n");
        
        Sys_Printf( "%9d lightmaps     %9d\n",
-               numBSPLightBytes / (LIGHTMAP_WIDTH * LIGHTMAP_HEIGHT * 3), numBSPLightBytes );
+               numBSPLightBytes / (game->lightmapSize * game->lightmapSize * 3), numBSPLightBytes );
        Sys_Printf( "%9d lightgrid     %9d *\n",
                numBSPGridPoints, (int) (numBSPGridPoints * sizeof( *bspGridPoints )) );
        Sys_Printf( "          visibility    %9d\n",
index 71b982da5604f25553c945aec66e276fd6fe5e08..abcfab99815757d6d0d98d4aa808d37d48199613 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index 1f4f1f770f4789b071408f80723cc8029bd6ad0c..74d77ae9f67a8519c6780a26c30596c82c006fec 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index e9be59b69578a264a16d1ed4527b72ae4f501b7f..21b0cb99ff929fba670849570a5defd5c29d38bc 100644 (file)
-Old Q3Map 1.x and Early Q3Map2 Changelog (Chronological Order)\r
-\r
-- FILE IS STATIC. IF YOU MAKE CHANGES, UPDATE CHANGELOG.Q3MAP2 -\r
-\r
-\r
-Date           Version                                 Notes\r
-----------------------------------------------------------------\r
-2001-12-03     1.2 (ydnar) Alpha               Initial version (win32)\r
-\r
-2001-12-03     1.2 (ydnar 2) Alpha             Tolerance expanded\r
-                                                                       (more brush faces caught)\r
-                                                                       \r
-2001-12-04     1.2 (ydnar 3) Alpha             Detail faces inside other\r
-                                                                       detail brushes now culled,\r
-                                                                       Small against large detail\r
-                                                                       faces also culled.\r
-\r
-2001-12-04     1.2 (ydnar 4) Alpha             djbob found a bug where\r
-                                                                       coincident caulk faces\r
-                                                                       were causing textured\r
-                                                                       faces to be caulked. Fixed.\r
-\r
-2001-12-04     1.2 (ydnar 7) Alpha             5 and 6 were internal test\r
-                                                                       versions. This version\r
-                                                                       takes into account extra\r
-                                                                       surface info, so coplanar\r
-                                                                       clip brushes no longer\r
-                                                                       cull away textured sides.\r
-\r
-2001-12-22     1.2 (ydnar 8) Alpha             Optimized light. Lighting\r
-                                                                       for most maps should now\r
-                                                                       be measurable in minutes\r
-                                                                       as opposed to hours.\r
-\r
-2001-12-24     1.2 (ydnar 9) Alpha             Fixed light. It is still\r
-                                                                       faster, but to enable\r
-                                                                       "blinding fast" mode,\r
-                                                                       you must supply the -fast\r
-                                                                       switch on the commandline\r
-                                                                       after -light. Fast mode\r
-                                                                       should be approximately\r
-                                                                       2x as fast as build 8.\r
-\r
-2001-12-24     1.2 (ydnar 10) Alpha    Grid lighting is now\r
-                                                                       optimized. Not as much\r
-                                                                       as I would like, but\r
-                                                                       a distance^2 cull before\r
-                                                                       traces on EVERY SINGLE\r
-                                                                       SURFACE LIGHT IN THE MAP\r
-                                                                       certainly speeds things\r
-                                                                       the fuck up. -fast not\r
-                                                                       necessary to see this\r
-                                                                       optimization. Also added\r
-                                                                       the -cheap switch to\r
-                                                                       limit light contributions\r
-                                                                       to a point when it exceeds\r
-                                                                       255 in R, G, and B. This\r
-                                                                       *may* cause artifacts.\r
-                                                                       Test away...\r
-\r
-2001-12-24     1.2 (ydnar 11) Alpha    Now using PVS data (vis).\r
-                                                                       Well constructed and\r
-                                                                       hinted maps should now\r
-                                                                       see a bit of a speedup.\r
-                                                                       Lights in the void are\r
-                                                                       also now removed as a\r
-                                                                       byproduct.\r
-\r
-2001-12-24     1.2 (ydnar 12) Alpha    Fixed bug that caused\r
-                                                                       vlight to crash.\r
-\r
-2001-12-27     1.2 (ydnar 13) Alpha    - Fixed broken PVS check.\r
-                                                                       - Cheap now supresses sun\r
-                                                                       Sun trace skipped if\r
-                                                                       sample is "cheapened."\r
-                                                                       - Experimental -smooth\r
-                                                                       option for subsampling\r
-                                                                       shadow edges.\r
-                                                                       - Experimental radiosity\r
-                                                                       code. Will probably crash.\r
-                                                                       - Other minor optimizations.\r
-\r
-2001-12-27     1.2 (ydnar 14) Alpha    Build 13 always subsampled,\r
-                                                                       making it slower. Fixed.\r
-\r
-2001-12-28     1.2 (ydnar 15) Alpha    Bad windings from edge- or\r
-                                                                       vertex- manipulated brushes\r
-                                                                       no longer created. Vertex\r
-                                                                       lighting on func_* with\r
-                                                                       an origin now works.\r
-                                                                       Radiosity should be more\r
-                                                                       stable (but not fully\r
-                                                                       correct yet). Light\r
-                                                                       envelopes now properly\r
-                                                                       calculated for entities\r
-                                                                       with origins.\r
-\r
-2001-12-28     1.2 (ydnar 16) Alpha    Un-vised maps will now light.\r
-                                                                       \r
-2001-12-30     1.2 (ydnar 17) Alpha    Radiosity. Use q3map_bounce\r
-                                                                       in shaders to specify\r
-                                                                       amount of light to reflect.\r
-                                                                       Use -bounce N after -light\r
-                                                                       to enable radiosity. Use\r
-                                                                       -dump to emit radiosity\r
-                                                                       lights as a prefab.\r
-\r
-2001-12-31     1.2 (ydnar 18) Alpha    Normalization release. New\r
-                                                                       features include -fastgrid,\r
-                                                                       -cheapgrid, and -fastbounce.\r
-                                                                       Running with -fastgrid and\r
-                                                                       -cheapgrid will produce\r
-                                                                       results identical to normal\r
-                                                                       q3map (with the lightgrid\r
-                                                                       being a little darker).\r
-                                                                       Also added q3map_nofast to\r
-                                                                       shaders to override -fast\r
-                                                                       switch for a surface light.\r
-\r
-2002-01-01     1.2 (ydnar 19) Alpha    Fixed an odd vertex lighting\r
-                                                                       bug (thanks Quakin) that was\r
-                                                                       causing sun to leak to brush\r
-                                                                       faces when using r_vertexlight\r
-                                                                       ingame. Changed a little bit\r
-                                                                       of the default behavior, so\r
-                                                                       test with vertex lighting\r
-                                                                       and with terrain. Minor\r
-                                                                       shader changes might be\r
-                                                                       necessary to get some maps to\r
-                                                                       look as before.\r
-\r
-2002-01-01     1.2 (ydnar 20) Alpha    Colored alpha shadows. Some\r
-                                                                       minor optimizations in\r
-                                                                       shadow tracing. Should be\r
-                                                                       slightly faster than 19.\r
-\r
-2002-01-02     1.2 (ydnar 21) Alpha    Set up colored shadows\r
-                                                                       properly to use\r
-                                                                       surfaceparm lightfilter.\r
-                                                                       Shaders must use this parm\r
-                                                                       to have colored shadows.\r
-                                                                       Can be used with alphashadow\r
-                                                                       as well.\r
-\r
-2002-01-04     1.2.1-y1 (nightly)              This version is all new,\r
-                                                                       based off the official\r
-                                                                       GtkRadiant tree, which has\r
-                                                                       all the previous enhancements.\r
-                                                                       New features include colored\r
-                                                                       lightgrid tracing through\r
-                                                                       lightfilter shaders, and\r
-                                                                       surfaceparm lightgrid, for\r
-                                                                       large/space maps with large\r
-                                                                       volumes. Also fixed are\r
-                                                                       potential broken brush\r
-                                                                       winding radiosity crashes.\r
-                                                                       Maybe.\r
-\r
-2002-01-05     1.2.1-y2 (nightly)              Merged latest CVS. Removed\r
-                                                                       bug where ambient was getting\r
-                                                                       calculated into the radiosity\r
-                                                                       solution for every pass,\r
-                                                                       leading to overbright maps\r
-                                                                       in a hurry. Also removed\r
-                                                                       the bad PTPFF reporting,\r
-                                                                       as it only caused problems\r
-                                                                       with radiosity in a big way.\r
-                                                                       Sue me.\r
-\r
-2002-01-05     1.2.1-y3 (nightly)              I really suck. Sample color\r
-                                                                       now properly cleared to 0\r
-                                                                       when bouncing.\r
-\r
-2002-01-07     1.2.1-y4 (nightly)              Particle Studio generated\r
-                                                                       brush faces should no longer\r
-                                                                       be culled. I no longer cull\r
-                                                                       faces that are autosprite.\r
-                                                                       Added -bouncegrid to have\r
-                                                                       radiosity add to lightgrid.\r
-\r
-2002-01-08     1.2.1-y5 (nightly)              Same as y4, but compiled with\r
-                                                                       full optimizations. Should\r
-                                                                       be 10-25% faster in all,\r
-                                                                       including BSP and vis\r
-                                                                       stages.\r
-\r
-2002-01-09     1.2.1-y6 (nightly)              Brushfaces with polygonoffset\r
-                                                                       in their shader will no longer\r
-                                                                       be faceculled.\r
-\r
-2002-01-11     1.2.1-y7 (nightly)              Increased stack size for threads\r
-                                                                       to 4MB on Win32 to (hopefully)\r
-                                                                       elminate stack overflow\r
-                                                                       crash with radiosity. Also\r
-                                                                       made subdivision use the heap\r
-                                                                       to lessen the stack load. Fixed\r
-                                                                       bug where q3map_bounce was not\r
-                                                                       being used in shader parsing.\r
-                                                                       Redid some of the divide math\r
-                                                                       to work in 0-255 instead of\r
-                                                                       0-256.\r
-\r
-2002-01-11     1.2.1-y8 (nightly)              More Win32 threading\r
-                                                                       crutches. Eat me, Bill.\r
-\r
-2002-01-15     1.2.1-y9                                RR2DO2 noticed a stupid bug\r
-                                                                       in my PVS code. Fixed it,\r
-                                                                       so the PVS light opts work as\r
-                                                                       they should. Lighting is\r
-                                                                       faster. Also got rid of some\r
-                                                                       redundant square roots from\r
-                                                                       the raytracing, speeding up\r
-                                                                       lighting another ~25%.\r
-\r
-2002-01-20     1.2.1-y10                               Fixed a potential crash bug\r
-                                                                       with maps with 0 lights. Also\r
-                                                                       changed how lightmaps are\r
-                                                                       projected onto patches that\r
-                                                                       lie in a single plane (bevel\r
-                                                                       endcaps, floors, etc). Shadows\r
-                                                                       now work properly on them.\r
-\r
-2002-01-22     1.2.1-y11                               Fixed a divide-by-zero crash\r
-                                                                       with maps with no lights or\r
-                                                                       no tracing. Also added\r
-                                                                       code to make brush/patch\r
-                                                                       vertex lighting more closely\r
-                                                                       resemble lightmap, even on\r
-                                                                       less-than-perfect maps. And\r
-                                                                       -light is faster, too...about\r
-                                                                       25% on q3dm17. 34->25 seconds.\r
-\r
-2002-01-24     1.2.1-y12                               Completely rewrote the path\r
-                                                                       argument handling. Should find\r
-                                                                       the Quake 3 dir and other\r
-                                                                       dirs properly now. Needs to\r
-                                                                       be tested on Linux though.\r
-                                                                       Also made lights linear by\r
-                                                                       default when run with -game\r
-                                                                       wolf. This is to match the\r
-                                                                       Gray Matter q3map and\r
-                                                                       entity definition.\r
-\r
-2002-01-28     1.2.4-y1                                Merged from 1.2.4-nightly CVS\r
-                                                                       sources. Fog sparklies gone.\r
-                                                                       -nopatchfix so vlight works\r
-                                                                       properly again. Cleaned up\r
-                                                                       paths processing some more,\r
-                                                                       including Linux stuff. Added\r
-                                                                       _lightmapscale entity key.\r
-                                                                       Brought -game wolf lighting\r
-                                                                       to parity with GM tools.\r
-                                                                       RR2DO2's PCX loading fix. A\r
-                                                                       bunch of other useful fun shit.\r
-\r
-2002-01-29     1.2.4-y2                                Fixed a bug in RR2DO2's PCX fix.\r
-                                                                       Fixed a stupid bug in lightmap\r
-                                                                       dimension bounds checking (thanks\r
-                                                                       Laerth).\r
-\r
-2002-01-29     1.2.4-y3                                Now will detect (and report to\r
-                                                                       GtkRadiant) all degenerate patches\r
-                                                                       like those created by capping a\r
-                                                                       cone.\r
-\r
-2002-02-23     2.0.0-a1 thru a3                Rewrote about 30% of the code.\r
-                                                                       Lots of cool new shit.\r
-\r
-2002-02-24     2.0.0-a4 thru a8                Terrain fix (thx Pointy), patches\r
-                                                                       are no longer circus colored, more\r
-                                                                       terrain texturing fixes.\r
-\r
-2002-02-26     2.0.0-a10 thru a11              Adjacent coplanar surfaces now\r
-                                                                       will share lightmaps. This prevents\r
-                                                                       most wierd edge cases with filter\r
-                                                                       and speeds things up a bit. Patches\r
-                                                                       too.\r
-\r
-2002-02-27     2.0.0-a12                               More lightmap fixes for non-planar\r
-                                                                       surfaces. Bugfixes in allocation/\r
-                                                                       compression of lightmaps as well.\r
-\r
-2002-03-02     2.0.0-a13                               Fixed some surface light bugs,\r
-                                                                       adjusted the occluded-luxel finding\r
-                                                                       code, and amped the radiosity. Other\r
-                                                                       fixes to RTCW lighting code (better\r
-                                                                       angle attenuation on linear lights).\r
-\r
-2002-03-04     2.0.0-a14                               Vertex light should now be near-\r
-                                                                       perfect on clean (and mostly on not-\r
-                                                                       so-clean) maps. Unlit maps will no\r
-                                                                       longer have tri-fanned brush faces\r
-                                                                       with random vertex colors. VLight is\r
-                                                                       now totally gone (reverts to -light).\r
-\r
-2002-03-06     2.0.0-a15                               Relaxed the planar check, should now\r
-                                                                       classify all slightly-off plane brush\r
-                                                                       face metasurfaces as planar. Triangle\r
-                                                                       checking much more stringent as well.\r
-\r
-2002-03-11     2.0.0-a16                               Vis crash gone. Lightmap allocation\r
-                                                                       now sorted by shader to minimize \r
-                                                                       shader count (and lessen chance for\r
-                                                                       RTCW shader substitution bug). Hit\r
-                                                                       big quarter-century also.\r
-\r
-2002-03-12     2.0.0-a17                               Dammit.\r
-\r
-2002-03-12     2.0.0-a18                               Hunting phantom lights...\r
-\r
-2002-03-16     2.0.0-a19                               Fogclip and _celshader. Check the\r
-                                                                       extras folder...\r
-\r
-2002-03-18     2.0.0-b1-rc1                    Beta release candidate. Fixed the\r
-                                                                       stupid phantom light bug finally.\r
-                                                                       Tricked out the sun tracing a wee\r
-                                                                       bit as well, should be a little\r
-                                                                       faster + more accurate. Other little\r
-                                                                       bits fixed up as well. Thanks to K,\r
-                                                                       {wf}ShadowSpawn and RR2DO2 for their\r
-                                                                       help tracking these last bugs down.\r
-\r
-2002-03-19     2.0.0-b1-rc2                    Increased some maximums, and got\r
-                                                                       rid of some cruft.\r
-\r
-2002-03-22     2.0.0-b1-rc3                    Some minor optimizations.\r
-\r
-2002-03-30     2.0.0-b1-rc5                    Now with fur (see extras/fur.shader).\r
-\r
-2002-04-01     2.0.0-b1-rc6                    Enhanced with baby seal technology.\r
-\r
-2002-05-01     2.0.1                                   OK, better late than never. Fixed the\r
-                                                                       alphashadow = 255 = transparent bug.\r
-\r
-2002-06-24     2.1.0-b1                                Added _foghull functionality. Works\r
-                                                                       like terrain "_shader" where\r
-                                                                       you don't need "textures/" prefix.\r
-                                                                       Also added q3map_normalmap. See\r
-                                                                       NVIDIA's website for Photoshop filter\r
-                                                                       to generate normalmaps from grayscale\r
-                                                                       heightmaps. This makes lightmaps\r
-                                                                       look bumpmapped. Currently 50% broken.\r
-\r
-2002-07-06     2.2.0-b1                                Empty epairs now stripped from map,\r
-                                                                       fixing Wolfenstein crash bug. Func_*\r
-                                                                       entities are now fogged properly.\r
-                                                                       Sort of. This will be enhanced later.\r
-                                                                       Added the .srf file to store all the\r
-                                                                       extra crap I was hiding in the BSP.\r
-                                                                       It's an editable text file that\r
-                                                                       -light uses, so you can change the\r
-                                                                       samplesize w/o recompiling the map\r
-                                                                       (just -light'ing it). Changed color\r
-                                                                       normalization to clamping, because\r
-                                                                       it looks better. Other stuff got\r
-                                                                       fixed as well.\r
-                                                                       \r
-2002-07-08     2.2.0-b2 thru b11               Test versions. Thanks jer and jet!\r
-\r
-2002-07-09     2.2.0-b12                               Larger-than-life lightmaps are now\r
-                                                                       supported, up to 1024x1024. Add\r
-                                                                       q3map_lightmapSize H W to a shader\r
-                                                                       to use. Lightmaps are stored in\r
-                                                                       maps/{mapname}/_lm_NNN.tga and a\r
-                                                                       shader script q3map_{mapname}.shader\r
-                                                                       is generated. Also added\r
-                                                                       q3map_lightmapGamma N.N. Use a\r
-                                                                       value of 2.0 to simulate\r
-                                                                       r_overBrightBits 1 and\r
-                                                                       r_mapOverBrightBits 2 on external\r
-                                                                       lightmap images.\r
+Old Q3Map 1.x and Early Q3Map2 Changelog (Chronological Order)
+
+- FILE IS STATIC. IF YOU MAKE CHANGES, UPDATE CHANGELOG.Q3MAP2 -
+
+
+Date           Version                                 Notes
+----------------------------------------------------------------
+2001-12-03     1.2 (ydnar) Alpha               Initial version (win32)
+
+2001-12-03     1.2 (ydnar 2) Alpha             Tolerance expanded
+                                                                       (more brush faces caught)
+                                                                       
+2001-12-04     1.2 (ydnar 3) Alpha             Detail faces inside other
+                                                                       detail brushes now culled,
+                                                                       Small against large detail
+                                                                       faces also culled.
+
+2001-12-04     1.2 (ydnar 4) Alpha             djbob found a bug where
+                                                                       coincident caulk faces
+                                                                       were causing textured
+                                                                       faces to be caulked. Fixed.
+
+2001-12-04     1.2 (ydnar 7) Alpha             5 and 6 were internal test
+                                                                       versions. This version
+                                                                       takes into account extra
+                                                                       surface info, so coplanar
+                                                                       clip brushes no longer
+                                                                       cull away textured sides.
+
+2001-12-22     1.2 (ydnar 8) Alpha             Optimized light. Lighting
+                                                                       for most maps should now
+                                                                       be measurable in minutes
+                                                                       as opposed to hours.
+
+2001-12-24     1.2 (ydnar 9) Alpha             Fixed light. It is still
+                                                                       faster, but to enable
+                                                                       "blinding fast" mode,
+                                                                       you must supply the -fast
+                                                                       switch on the commandline
+                                                                       after -light. Fast mode
+                                                                       should be approximately
+                                                                       2x as fast as build 8.
+
+2001-12-24     1.2 (ydnar 10) Alpha    Grid lighting is now
+                                                                       optimized. Not as much
+                                                                       as I would like, but
+                                                                       a distance^2 cull before
+                                                                       traces on EVERY SINGLE
+                                                                       SURFACE LIGHT IN THE MAP
+                                                                       certainly speeds things
+                                                                       the fuck up. -fast not
+                                                                       necessary to see this
+                                                                       optimization. Also added
+                                                                       the -cheap switch to
+                                                                       limit light contributions
+                                                                       to a point when it exceeds
+                                                                       255 in R, G, and B. This
+                                                                       *may* cause artifacts.
+                                                                       Test away...
+
+2001-12-24     1.2 (ydnar 11) Alpha    Now using PVS data (vis).
+                                                                       Well constructed and
+                                                                       hinted maps should now
+                                                                       see a bit of a speedup.
+                                                                       Lights in the void are
+                                                                       also now removed as a
+                                                                       byproduct.
+
+2001-12-24     1.2 (ydnar 12) Alpha    Fixed bug that caused
+                                                                       vlight to crash.
+
+2001-12-27     1.2 (ydnar 13) Alpha    - Fixed broken PVS check.
+                                                                       - Cheap now supresses sun
+                                                                       Sun trace skipped if
+                                                                       sample is "cheapened."
+                                                                       - Experimental -smooth
+                                                                       option for subsampling
+                                                                       shadow edges.
+                                                                       - Experimental radiosity
+                                                                       code. Will probably crash.
+                                                                       - Other minor optimizations.
+
+2001-12-27     1.2 (ydnar 14) Alpha    Build 13 always subsampled,
+                                                                       making it slower. Fixed.
+
+2001-12-28     1.2 (ydnar 15) Alpha    Bad windings from edge- or
+                                                                       vertex- manipulated brushes
+                                                                       no longer created. Vertex
+                                                                       lighting on func_* with
+                                                                       an origin now works.
+                                                                       Radiosity should be more
+                                                                       stable (but not fully
+                                                                       correct yet). Light
+                                                                       envelopes now properly
+                                                                       calculated for entities
+                                                                       with origins.
+
+2001-12-28     1.2 (ydnar 16) Alpha    Un-vised maps will now light.
+                                                                       
+2001-12-30     1.2 (ydnar 17) Alpha    Radiosity. Use q3map_bounce
+                                                                       in shaders to specify
+                                                                       amount of light to reflect.
+                                                                       Use -bounce N after -light
+                                                                       to enable radiosity. Use
+                                                                       -dump to emit radiosity
+                                                                       lights as a prefab.
+
+2001-12-31     1.2 (ydnar 18) Alpha    Normalization release. New
+                                                                       features include -fastgrid,
+                                                                       -cheapgrid, and -fastbounce.
+                                                                       Running with -fastgrid and
+                                                                       -cheapgrid will produce
+                                                                       results identical to normal
+                                                                       q3map (with the lightgrid
+                                                                       being a little darker).
+                                                                       Also added q3map_nofast to
+                                                                       shaders to override -fast
+                                                                       switch for a surface light.
+
+2002-01-01     1.2 (ydnar 19) Alpha    Fixed an odd vertex lighting
+                                                                       bug (thanks Quakin) that was
+                                                                       causing sun to leak to brush
+                                                                       faces when using r_vertexlight
+                                                                       ingame. Changed a little bit
+                                                                       of the default behavior, so
+                                                                       test with vertex lighting
+                                                                       and with terrain. Minor
+                                                                       shader changes might be
+                                                                       necessary to get some maps to
+                                                                       look as before.
+
+2002-01-01     1.2 (ydnar 20) Alpha    Colored alpha shadows. Some
+                                                                       minor optimizations in
+                                                                       shadow tracing. Should be
+                                                                       slightly faster than 19.
+
+2002-01-02     1.2 (ydnar 21) Alpha    Set up colored shadows
+                                                                       properly to use
+                                                                       surfaceparm lightfilter.
+                                                                       Shaders must use this parm
+                                                                       to have colored shadows.
+                                                                       Can be used with alphashadow
+                                                                       as well.
+
+2002-01-04     1.2.1-y1 (nightly)              This version is all new,
+                                                                       based off the official
+                                                                       GtkRadiant tree, which has
+                                                                       all the previous enhancements.
+                                                                       New features include colored
+                                                                       lightgrid tracing through
+                                                                       lightfilter shaders, and
+                                                                       surfaceparm lightgrid, for
+                                                                       large/space maps with large
+                                                                       volumes. Also fixed are
+                                                                       potential broken brush
+                                                                       winding radiosity crashes.
+                                                                       Maybe.
+
+2002-01-05     1.2.1-y2 (nightly)              Merged latest CVS. Removed
+                                                                       bug where ambient was getting
+                                                                       calculated into the radiosity
+                                                                       solution for every pass,
+                                                                       leading to overbright maps
+                                                                       in a hurry. Also removed
+                                                                       the bad PTPFF reporting,
+                                                                       as it only caused problems
+                                                                       with radiosity in a big way.
+                                                                       Sue me.
+
+2002-01-05     1.2.1-y3 (nightly)              I really suck. Sample color
+                                                                       now properly cleared to 0
+                                                                       when bouncing.
+
+2002-01-07     1.2.1-y4 (nightly)              Particle Studio generated
+                                                                       brush faces should no longer
+                                                                       be culled. I no longer cull
+                                                                       faces that are autosprite.
+                                                                       Added -bouncegrid to have
+                                                                       radiosity add to lightgrid.
+
+2002-01-08     1.2.1-y5 (nightly)              Same as y4, but compiled with
+                                                                       full optimizations. Should
+                                                                       be 10-25% faster in all,
+                                                                       including BSP and vis
+                                                                       stages.
+
+2002-01-09     1.2.1-y6 (nightly)              Brushfaces with polygonoffset
+                                                                       in their shader will no longer
+                                                                       be faceculled.
+
+2002-01-11     1.2.1-y7 (nightly)              Increased stack size for threads
+                                                                       to 4MB on Win32 to (hopefully)
+                                                                       elminate stack overflow
+                                                                       crash with radiosity. Also
+                                                                       made subdivision use the heap
+                                                                       to lessen the stack load. Fixed
+                                                                       bug where q3map_bounce was not
+                                                                       being used in shader parsing.
+                                                                       Redid some of the divide math
+                                                                       to work in 0-255 instead of
+                                                                       0-256.
+
+2002-01-11     1.2.1-y8 (nightly)              More Win32 threading
+                                                                       crutches. Eat me, Bill.
+
+2002-01-15     1.2.1-y9                                RR2DO2 noticed a stupid bug
+                                                                       in my PVS code. Fixed it,
+                                                                       so the PVS light opts work as
+                                                                       they should. Lighting is
+                                                                       faster. Also got rid of some
+                                                                       redundant square roots from
+                                                                       the raytracing, speeding up
+                                                                       lighting another ~25%.
+
+2002-01-20     1.2.1-y10                               Fixed a potential crash bug
+                                                                       with maps with 0 lights. Also
+                                                                       changed how lightmaps are
+                                                                       projected onto patches that
+                                                                       lie in a single plane (bevel
+                                                                       endcaps, floors, etc). Shadows
+                                                                       now work properly on them.
+
+2002-01-22     1.2.1-y11                               Fixed a divide-by-zero crash
+                                                                       with maps with no lights or
+                                                                       no tracing. Also added
+                                                                       code to make brush/patch
+                                                                       vertex lighting more closely
+                                                                       resemble lightmap, even on
+                                                                       less-than-perfect maps. And
+                                                                       -light is faster, too...about
+                                                                       25% on q3dm17. 34->25 seconds.
+
+2002-01-24     1.2.1-y12                               Completely rewrote the path
+                                                                       argument handling. Should find
+                                                                       the Quake 3 dir and other
+                                                                       dirs properly now. Needs to
+                                                                       be tested on Linux though.
+                                                                       Also made lights linear by
+                                                                       default when run with -game
+                                                                       wolf. This is to match the
+                                                                       Gray Matter q3map and
+                                                                       entity definition.
+
+2002-01-28     1.2.4-y1                                Merged from 1.2.4-nightly CVS
+                                                                       sources. Fog sparklies gone.
+                                                                       -nopatchfix so vlight works
+                                                                       properly again. Cleaned up
+                                                                       paths processing some more,
+                                                                       including Linux stuff. Added
+                                                                       _lightmapscale entity key.
+                                                                       Brought -game wolf lighting
+                                                                       to parity with GM tools.
+                                                                       RR2DO2's PCX loading fix. A
+                                                                       bunch of other useful fun shit.
+
+2002-01-29     1.2.4-y2                                Fixed a bug in RR2DO2's PCX fix.
+                                                                       Fixed a stupid bug in lightmap
+                                                                       dimension bounds checking (thanks
+                                                                       Laerth).
+
+2002-01-29     1.2.4-y3                                Now will detect (and report to
+                                                                       GtkRadiant) all degenerate patches
+                                                                       like those created by capping a
+                                                                       cone.
+
+2002-02-23     2.0.0-a1 thru a3                Rewrote about 30% of the code.
+                                                                       Lots of cool new shit.
+
+2002-02-24     2.0.0-a4 thru a8                Terrain fix (thx Pointy), patches
+                                                                       are no longer circus colored, more
+                                                                       terrain texturing fixes.
+
+2002-02-26     2.0.0-a10 thru a11              Adjacent coplanar surfaces now
+                                                                       will share lightmaps. This prevents
+                                                                       most wierd edge cases with filter
+                                                                       and speeds things up a bit. Patches
+                                                                       too.
+
+2002-02-27     2.0.0-a12                               More lightmap fixes for non-planar
+                                                                       surfaces. Bugfixes in allocation/
+                                                                       compression of lightmaps as well.
+
+2002-03-02     2.0.0-a13                               Fixed some surface light bugs,
+                                                                       adjusted the occluded-luxel finding
+                                                                       code, and amped the radiosity. Other
+                                                                       fixes to RTCW lighting code (better
+                                                                       angle attenuation on linear lights).
+
+2002-03-04     2.0.0-a14                               Vertex light should now be near-
+                                                                       perfect on clean (and mostly on not-
+                                                                       so-clean) maps. Unlit maps will no
+                                                                       longer have tri-fanned brush faces
+                                                                       with random vertex colors. VLight is
+                                                                       now totally gone (reverts to -light).
+
+2002-03-06     2.0.0-a15                               Relaxed the planar check, should now
+                                                                       classify all slightly-off plane brush
+                                                                       face metasurfaces as planar. Triangle
+                                                                       checking much more stringent as well.
+
+2002-03-11     2.0.0-a16                               Vis crash gone. Lightmap allocation
+                                                                       now sorted by shader to minimize 
+                                                                       shader count (and lessen chance for
+                                                                       RTCW shader substitution bug). Hit
+                                                                       big quarter-century also.
+
+2002-03-12     2.0.0-a17                               Dammit.
+
+2002-03-12     2.0.0-a18                               Hunting phantom lights...
+
+2002-03-16     2.0.0-a19                               Fogclip and _celshader. Check the
+                                                                       extras folder...
+
+2002-03-18     2.0.0-b1-rc1                    Beta release candidate. Fixed the
+                                                                       stupid phantom light bug finally.
+                                                                       Tricked out the sun tracing a wee
+                                                                       bit as well, should be a little
+                                                                       faster + more accurate. Other little
+                                                                       bits fixed up as well. Thanks to K,
+                                                                       {wf}ShadowSpawn and RR2DO2 for their
+                                                                       help tracking these last bugs down.
+
+2002-03-19     2.0.0-b1-rc2                    Increased some maximums, and got
+                                                                       rid of some cruft.
+
+2002-03-22     2.0.0-b1-rc3                    Some minor optimizations.
+
+2002-03-30     2.0.0-b1-rc5                    Now with fur (see extras/fur.shader).
+
+2002-04-01     2.0.0-b1-rc6                    Enhanced with baby seal technology.
+
+2002-05-01     2.0.1                                   OK, better late than never. Fixed the
+                                                                       alphashadow = 255 = transparent bug.
+
+2002-06-24     2.1.0-b1                                Added _foghull functionality. Works
+                                                                       like terrain "_shader" where
+                                                                       you don't need "textures/" prefix.
+                                                                       Also added q3map_normalmap. See
+                                                                       NVIDIA's website for Photoshop filter
+                                                                       to generate normalmaps from grayscale
+                                                                       heightmaps. This makes lightmaps
+                                                                       look bumpmapped. Currently 50% broken.
+
+2002-07-06     2.2.0-b1                                Empty epairs now stripped from map,
+                                                                       fixing Wolfenstein crash bug. Func_*
+                                                                       entities are now fogged properly.
+                                                                       Sort of. This will be enhanced later.
+                                                                       Added the .srf file to store all the
+                                                                       extra crap I was hiding in the BSP.
+                                                                       It's an editable text file that
+                                                                       -light uses, so you can change the
+                                                                       samplesize w/o recompiling the map
+                                                                       (just -light'ing it). Changed color
+                                                                       normalization to clamping, because
+                                                                       it looks better. Other stuff got
+                                                                       fixed as well.
+                                                                       
+2002-07-08     2.2.0-b2 thru b11               Test versions. Thanks jer and jet!
+
+2002-07-09     2.2.0-b12                               Larger-than-life lightmaps are now
+                                                                       supported, up to 1024x1024. Add
+                                                                       q3map_lightmapSize H W to a shader
+                                                                       to use. Lightmaps are stored in
+                                                                       maps/{mapname}/_lm_NNN.tga and a
+                                                                       shader script q3map_{mapname}.shader
+                                                                       is generated. Also added
+                                                                       q3map_lightmapGamma N.N. Use a
+                                                                       value of 2.0 to simulate
+                                                                       r_overBrightBits 1 and
+                                                                       r_mapOverBrightBits 2 on external
+                                                                       lightmap images.
index 47bceb51a6ce143b61c0a3b33fbc2561d8788fda..d58c02421c9f8de09cf08edddaf87910adb70d3a 100644 (file)
@@ -1,5 +1,107 @@
 Q3Map2 Version History + Changelog (Reverse Chronological Order)
 
+2.5.16 (2004-10-18)
+
+- New: -fixaas mode to reassociate an AAS file with a changed BSP
+- New: -nostyles switch on light phase disabling lightstyles
+- Using libmhash cryptographic hashing library instead of md5lib
+
+
+2.5.15 (2004-07-08)
+
+- New: q3map_rgbGen, q3map_rgbMod or q3map_colorGen, q3map_colorMod
+- New: q3map_alphaGen const (like q3map_alphaMod set)
+- New: q3map_noVertexLight to suppress overwriting of vertex rgb
+- q3map_backShader now works again, can be used instead of
+  q3map_cloneShader + q3map_invert on the target shader
+- q3map_alphaMod volume brushes in func_group entities will now only
+  affect that entity's surfaces
+- q3map_clipModel now works on trans/nonsolid shaders, allowing
+  simplified clipping surfaces in models
+- Fixed bug in alphaMod code where only the first vertex was being
+  modded (thanks Ratty)
+- Vis exits instead of crashing with divide-by-zero when there are
+  no portals on simple box maps
+- All of a surface's lightmaps must be solid or not solid, fixing
+  ST coord problem with non-Raven games using lightstyles
+- Reverted a change in the meta code which was causing lightmap coord
+  overflows and ugly self-shadowing errors on surface boundaries
+- Any use of lightstyles automatically sets -nocollapse to reduce
+  total shader counts
+- Tenebrae lightmap size changed to 512x512
+
+
+2.5.14 (2004-04-09)
+
+- New: -dirty mode courtesy of RaP7oR (dirtmapping/ambient occlusion)
+- New: q3map_skyLight code using more uniform angular distribution about
+  the sky hemisphere
+- New: q3map_alphaMod set N.N
+- New: q3map_alphaMod scale N.N
+- New: q3map_alphaMod volume - applies all other q3map_alphaMod directives
+  to each vertex inside a brush textured with this shader, allowing large
+  faded scrolling fire shaders, waterfalls, marquees, explicit dotProduct
+  terrain blending control, etc.
+- Fixed a bug in alphaMod code where the type of the first alphaMod was
+  being used for all subsequent alphaMods
+- Lowered vertex-lit surface limits to 999 verts, 1000 was breaking Quake 3
+- Tightened up solid lightmap tolerances
+- Fixed bug in solid lightmap code where lightmap SD coords were being
+  incorrectly set
+
+
+2.5.13 (2004-03-03)
+
+- New: -convert -format <game> to convert between different BSP formats.
+  Example, to convert a Jedi Academy map to Enemy Territory:
+  -game ja -convert -format et
+- New: -game etut support for Urban Terror on Enemy Territory
+- New: -analyze mode for reverse engineering a BSP format
+- New: -compensate N.N (default 1.0) for descaling lightmap/vertex/grid
+  data to compensate for ingame overbrighting. 4.0 is a good value for
+  Quake 3 if used in combination with -gamma 2.2
+- New: compensate/gamma per-game setting
+- New: -light -cpma argument for "classic" (sic) vertex lighting
+- Replaced malloc() with stack allocation in IlluminateRawLightmap for
+  most small/medium lightmap calculations
+- Misc cleanups in q3map2.h
+- Support for non-128x128 lightmaps
+- The -meta process will now generate surfaces with more than 64
+  verts that have non-lightmapped shaders
+- Extended lightmap size tolerance to 2x for merging meta triangles in
+  maps with aggressive lightmapscale. Sorry kids!
+- Moved surface finish pass (celshading, cloning) to final surface pass.
+  This should fix a bug involving fog/tesselation/celshading/cloning
+- Solid-color lightmaps (within 1/255 in RGB) are detected and replaced
+  with a single pixel lightmap, saving space
+
+
+2.5.12 (2004-01-18)
+
+- New: -dark option for dark lightmap/brush seams in -light (Unreal 1-ish)
+- New: spawnflags 4 on misc_model entities makes them forcemeta/lightmapped
+  unless explicitly set as vertex lit in their shader(s). This can be
+  combined with spawnflags 2 (solid) as spawnflags 6
+- New: -gamma N.N switch sets lightmap/vertex gamma value for more
+  realistic lighting, instead of using high ambient/minlight. Default
+  is 1.0 (linear ramp), good values are between 1.5 and 2.2
+- Changed q3map_lightmapGamma N.N to q3map_lightmapBrightness N.N, to
+  better match its intended function
+- Ported to VS.NET 2003 and GtkRadiant 1.5 (spog_branch)
+- Fixed bug in _skybox maps where sunlight was leaking through brushes.
+  Thanks pjw!
+- Fixed bug in ASE loader where models without submodels/submaterials
+  would not load properly.
+- Fixed bug where q3map_tcGen was not being applied to models
+- Optimized MergeMetaTriangles a bit
+- Added KOR's fix to raytracer
+- -bouncegrid no longer affects the lightgrid dir
+- Added feature to PicoModel where spaces in material names in 3DS, ASE
+  and LWO models will mark the end of the shader name, so you can have
+  "textures/foo/bar 1" and "textures/foo/bar 2" in Lightwave, and both
+  surfaces will map to "textures/foo/bar"
+
+
 2.5.11 (2003-12-01)
 
 - New: added support for _skybox entities to generate "portal sky"
index f0ac6df5f3a4edc076331ad111b6ff60fa8d5b12..2be25a4357b991f39cfa5f3eda8ba75881acfece 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index ca0ba7fb31eeafa8119940c91ddbdee016096cb0..1fabbc6366216bffaca73ceb8d1a62c3e7352d0b 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index 5260437d1fcbddbd162c2364a3e0a9252dea8186..f4de7cea8da3de3aa974d87ad17cdef56569ec91 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -659,9 +660,6 @@ static void ProjectDecalOntoWinding( decalProjector_t *dp, mapDrawSurface_t *ds,
                        dv->color[ j ][ 3 ] = alpha;
                }
        }
-       
-       /* ydnar: finish the surface */
-       FinishSurface( ds2 );
 }
 
 
@@ -788,8 +786,7 @@ static void ProjectDecalOntoTriangles( decalProjector_t *dp, mapDrawSurface_t *d
        
        
        /* triangle surfaces without shaders don't get marks by default */
-       if( (ds->type == SURFACE_TRIANGLES || ds->type == SURFACE_FORCED_META) &&
-               ds->shaderInfo->shaderText == NULL )
+       if( ds->type == SURFACE_TRIANGLES && ds->shaderInfo->shaderText == NULL )
                return;
        
        /* backface check */
index 484a7489280c288356eb0de123ef45a328d42de7..270eefe280014c415b15031a73ed1b331834a0f9 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -179,7 +180,7 @@ int CountFaceList( face_t *list )
        
 
        c = 0;
-       for( list; list != NULL; list = list->next )
+       for( ; list != NULL; list = list->next )
                c++;
        return c;
 }
index 0cfdc924511ae260cffcdeb5108686dc5213923d..c9ee6e25421fca0b974c4805143c443089d840a5 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -396,8 +397,6 @@ qboolean ChopFaceSurfaceByBrush( entity_t *e, mapDrawSurface_t *ds, brush_t *b )
        {
                /* get brush side and plane */
                s = &b->sides[ i ];
-               if( s->backSide )
-                       continue;
                plane = &mapplanes[ s->planenum ];
                
                /* handle coplanar outfacing (don't fog) */
index 8d15c732bc6b310d7c94e18845b129bd05234b92..f8d21d1a59ef0629dd9baa69d3bd38b420ff9dc0 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -104,11 +105,18 @@ game_t struct
        ".ef",                          /* unix home sub-dir */
        "elite",                        /* magic path word */
        "scripts",                      /* shader directory */
-       qfalse,                         /* wolf lighting model? */
+       64,                                     /* max lightmapped surface verts */
+       999,                            /* max surface verts */
+       6000,                           /* max surface indexes */
        qfalse,                         /* flares */
        "flareshader",          /* default flare shader */
+       qfalse,                         /* wolf lighting model? */
+       128,                            /* lightmap width/height */
+       1.0f,                           /* lightmap gamma */
+       1.0f,                           /* lightmap compensate */
        "IBSP",                         /* bsp file prefix */
        46,                                     /* bsp file version */
+       qfalse,                         /* cod-style lump len/ofs order */
        LoadIBSPFile,           /* bsp load function */
        WriteIBSPFile,          /* bsp write function */
        
diff --git a/tools/quake3/q3map2/game_etut.h b/tools/quake3/q3map2/game_etut.h
new file mode 100644 (file)
index 0000000..9823ff9
--- /dev/null
@@ -0,0 +1,264 @@
+/* -------------------------------------------------------------------------------
+
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+----------------------------------------------------------------------------------
+
+This code has been altered significantly from its original form, to support
+several games based on the Quake III Arena engine, in the form of "Q3Map2."
+
+------------------------------------------------------------------------------- */
+
+
+
+/* marker */
+#ifndef GAME_ETUT_H
+#define GAME_ETUT_H
+
+
+
+/* -------------------------------------------------------------------------------
+
+content and surface flags
+
+------------------------------------------------------------------------------- */
+
+/* game flags */
+#define U_CONT_SOLID                           1                       /* an eye is never valid in a solid */
+#define U_CONT_LAVA                                    8
+#define U_CONT_SLIME                           16
+#define U_CONT_WATER                           32
+#define U_CONT_FOG                                     64
+
+#define U_CONT_AREAPORTAL                      0x8000
+
+#define U_CONT_PLAYERCLIP                      0x10000
+#define U_CONT_MONSTERCLIP                     0x20000
+#define U_CONT_TELEPORTER                      0x40000
+#define U_CONT_JUMPPAD                         0x80000
+#define U_CONT_CLUSTERPORTAL           0x100000
+#define U_CONT_DONOTENTER                      0x200000
+#define U_CONT_BOTCLIP                         0x400000
+
+#define U_CONT_ORIGIN                          0x1000000       /* removed before bsping an entity */
+
+#define U_CONT_BODY                                    0x2000000       /* should never be on a brush, only in game */
+#define U_CONT_CORPSE                          0x4000000
+#define U_CONT_DETAIL                          0x8000000       /* brushes not used for the bsp */
+#define U_CONT_STRUCTURAL                      0x10000000      /* brushes used for the bsp */
+#define U_CONT_TRANSLUCENT                     0x20000000      /* don't consume surface fragments inside */
+#define U_CONT_TRIGGER                         0x40000000
+#define U_CONT_NODROP                          0x80000000      /* don't leave bodies or items (death fog, lava) */
+
+#define U_SURF_NODAMAGE                                0x1                     /* never give falling damage */
+#define U_SURF_SLICK                           0x2                     /* effects game physics */
+#define U_SURF_SKY                                     0x4                     /* lighting from environment map */
+#define U_SURF_LADDER                          0x8
+#define U_SURF_NOIMPACT                                0x10            /* don't make missile explosions */
+#define U_SURF_NOMARKS                         0x20            /* don't leave missile marks */
+#define U_SURF_FLESH                           0x40            /* make flesh sounds and effects */
+#define U_SURF_NODRAW                          0x80            /* don't generate a drawsurface at all */
+#define U_SURF_HINT                                    0x100           /* make a primary bsp splitter */
+#define U_SURF_SKIP                                    0x200           /* completely ignore, allowing non-closed brushes */
+#define U_SURF_NOLIGHTMAP                      0x400           /* surface doesn't need a lightmap */
+#define U_SURF_POINTLIGHT                      0x800           /* generate lighting info at vertexes */
+#define U_SURF_METALSTEPS                      0x1000          /* clanking footsteps */
+#define U_SURF_NOSTEPS                         0x2000          /* no footstep sounds */
+#define U_SURF_NONSOLID                                0x4000          /* don't collide against curves with this set */
+#define U_SURF_LIGHTFILTER                     0x8000          /* act as a light filter during q3map -light */
+#define U_SURF_ALPHASHADOW                     0x10000         /* do per-pixel light shadow casting in q3map */
+#define U_SURF_NODLIGHT                                0x20000         /* don't dlight even if solid (solid lava, skies) */
+#define U_SURF_DUST                                    0x40000         /* leave a dust trail when walking on this surface */
+
+/* ydnar flags */
+#define U_SURF_VERTEXLIT                       (U_SURF_POINTLIGHT | U_SURF_NOLIGHTMAP)
+
+/* materials */
+#define U_MAT_MASK                                     0xFFF00000      /* mask to get the material type */
+
+#define U_MAT_NONE                                     0x00000000
+#define U_MAT_TIN                                      0x00100000
+#define U_MAT_ALUMINUM                         0x00200000
+#define U_MAT_IRON                                     0x00300000
+#define U_MAT_TITANIUM                         0x00400000
+#define U_MAT_STEEL                                    0x00500000
+#define U_MAT_BRASS                                    0x00600000
+#define U_MAT_COPPER                           0x00700000
+#define U_MAT_CEMENT                           0x00800000
+#define U_MAT_ROCK                                     0x00900000
+#define U_MAT_GRAVEL                           0x00A00000
+#define U_MAT_PAVEMENT                         0x00B00000
+#define U_MAT_BRICK                                    0x00C00000
+#define U_MAT_CLAY                                     0x00D00000
+#define U_MAT_GRASS                                    0x00E00000
+#define U_MAT_DIRT                                     0x00F00000
+#define U_MAT_MUD                                      0x01000000
+#define U_MAT_SNOW                                     0x01100000
+#define U_MAT_ICE                                      0x01200000
+#define U_MAT_SAND                                     0x01300000
+#define U_MAT_CERAMICTILE                      0x01400000
+#define U_MAT_LINOLEUM                         0x01500000
+#define U_MAT_RUG                                      0x01600000
+#define U_MAT_PLASTER                          0x01700000
+#define U_MAT_PLASTIC                          0x01800000
+#define U_MAT_CARDBOARD                                0x01900000
+#define U_MAT_HARDWOOD                         0x01A00000
+#define U_MAT_SOFTWOOD                         0x01B00000
+#define U_MAT_PLANK                                    0x01C00000
+#define U_MAT_GLASS                                    0x01D00000
+#define U_MAT_WATER                                    0x01E00000
+#define U_MAT_STUCCO                           0x01F00000
+
+
+
+/* -------------------------------------------------------------------------------
+
+game_t struct
+
+------------------------------------------------------------------------------- */
+
+{
+       "etut",                         /* -game x */
+       "etut",                         /* default base game data dir */
+       ".etwolf",                      /* unix home sub-dir */
+       "et",                           /* magic path word */
+       "scripts",                      /* shader directory */
+       1024,                           /* max lightmapped surface verts */
+       1024,                           /* max surface verts */
+       6144,                           /* max surface indexes */
+       qfalse,                         /* flares */
+       "flareshader",          /* default flare shader */
+       qfalse,                         /* wolf lighting model? */
+       128,                            /* lightmap width/height */
+       2.2f,                           /* lightmap gamma */
+       1.0f,                           /* lightmap compensate */
+       "IBSP",                         /* bsp file prefix */
+       47,                                     /* bsp file version */
+       qfalse,                         /* cod-style lump len/ofs order */
+       LoadIBSPFile,           /* bsp load function */
+       WriteIBSPFile,          /* bsp write function */
+
+       {
+               /* name                         contentFlags                            contentFlagsClear                       surfaceFlags                            surfaceFlagsClear                       compileFlags                            compileFlagsClear */
+               
+               /* default */
+               { "default",            U_CONT_SOLID,                           -1,                                                     0,                                                      -1,                                                     C_SOLID,                                        -1 },
+               
+               
+               /* ydnar */
+               { "lightgrid",          0,                                                      0,                                                      0,                                                      0,                                                      C_LIGHTGRID,                            0 },
+               { "antiportal",         0,                                                      0,                                                      0,                                                      0,                                                      C_ANTIPORTAL,                           0 },
+               { "skip",                       0,                                                      0,                                                      0,                                                      0,                                                      C_SKIP,                                         0 },
+               
+               
+               /* compiler */
+               { "origin",                     U_CONT_ORIGIN,                          U_CONT_SOLID,                           0,                                                      0,                                                      C_ORIGIN | C_TRANSLUCENT,       C_SOLID },
+               { "areaportal",         U_CONT_AREAPORTAL,                      U_CONT_SOLID,                           0,                                                      0,                                                      C_AREAPORTAL | C_TRANSLUCENT,   C_SOLID },
+               { "trans",                      U_CONT_TRANSLUCENT,                     0,                                                      0,                                                      0,                                                      C_TRANSLUCENT,                          0 },
+               { "detail",                     U_CONT_DETAIL,                          0,                                                      0,                                                      0,                                                      C_DETAIL,                                       0 },
+               { "structural",         U_CONT_STRUCTURAL,                      0,                                                      0,                                                      0,                                                      C_STRUCTURAL,                           0 },
+               { "hint",                       0,                                                      0,                                                      U_SURF_HINT,                            0,                                                      C_HINT,                                         0 },
+               { "nodraw",                     0,                                                      0,                                                      U_SURF_NODRAW,                          0,                                                      C_NODRAW,                                       0 },
+               
+               { "alphashadow",        0,                                                      0,                                                      U_SURF_ALPHASHADOW,                     0,                                                      C_ALPHASHADOW | C_TRANSLUCENT,  0 },
+               { "lightfilter",        0,                                                      0,                                                      U_SURF_LIGHTFILTER,                     0,                                                      C_LIGHTFILTER | C_TRANSLUCENT,  0 },
+               { "nolightmap",         0,                                                      0,                                                      U_SURF_VERTEXLIT,                       0,                                                      C_VERTEXLIT,                            0 },
+               { "pointlight",         0,                                                      0,                                                      U_SURF_VERTEXLIT,                       0,                                                      C_VERTEXLIT,                            0 },
+               
+               
+               /* game */
+               { "nonsolid",           0,                                                      U_CONT_SOLID,                           U_SURF_NONSOLID,                        0,                                                      0,                                                      C_SOLID },
+               
+               { "trigger",            U_CONT_TRIGGER,                         U_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               
+               { "water",                      U_CONT_WATER,                           U_CONT_SOLID,                           0,                                                      0,                                                      C_LIQUID | C_TRANSLUCENT,       C_SOLID },
+               { "slime",                      U_CONT_SLIME,                           U_CONT_SOLID,                           0,                                                      0,                                                      C_LIQUID | C_TRANSLUCENT,       C_SOLID },
+               { "lava",                       U_CONT_LAVA,                            U_CONT_SOLID,                           0,                                                      0,                                                      C_LIQUID | C_TRANSLUCENT,       C_SOLID },
+               
+               { "playerclip",         U_CONT_PLAYERCLIP,                      U_CONT_SOLID,                           0,                                                      0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
+               { "monsterclip",        U_CONT_MONSTERCLIP,                     U_CONT_SOLID,                           0,                                                      0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
+               { "nodrop",                     U_CONT_NODROP,                          U_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               
+               { "clusterportal",      U_CONT_CLUSTERPORTAL,           U_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               { "donotenter",         U_CONT_DONOTENTER,                      U_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               { "botclip",            U_CONT_BOTCLIP,                         U_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               
+               { "fog",                        U_CONT_FOG,                                     U_CONT_SOLID,                           0,                                                      0,                                                      C_FOG,                                          C_SOLID },
+               { "sky",                        0,                                                      0,                                                      U_SURF_SKY,                                     0,                                                      C_SKY,                                          0 },
+               
+               { "slick",                      0,                                                      0,                                                      U_SURF_SLICK,                           0,                                                      0,                                                      0 },
+               
+               { "noimpact",           0,                                                      0,                                                      U_SURF_NOIMPACT,                        0,                                                      0,                                                      0 },
+               { "nomarks",            0,                                                      0,                                                      U_SURF_NOMARKS,                         0,                                                      C_NOMARKS,                                      0 },
+               { "ladder",                     0,                                                      0,                                                      U_SURF_LADDER,                          0,                                                      0,                                                      0 },
+               { "nodamage",           0,                                                      0,                                                      U_SURF_NODAMAGE,                        0,                                                      0,                                                      0 },
+               { "metalsteps",         0,                                                      0,                                                      U_SURF_METALSTEPS,                      0,                                                      0,                                                      0 },
+               { "flesh",                      0,                                                      0,                                                      U_SURF_FLESH,                           0,                                                      0,                                                      0 },
+               { "nosteps",            0,                                                      0,                                                      U_SURF_NOSTEPS,                         0,                                                      0,                                                      0 },
+               { "nodlight",           0,                                                      0,                                                      U_SURF_NODLIGHT,                        0,                                                      0,                                                      0 },
+               { "dust",                       0,                                                      0,                                                      U_SURF_DUST,                            0,                                                      0,                                                      0 },
+               
+               
+               /* materials */
+               { "*mat_none",          0,                                                      0,                                                      U_MAT_NONE,                                     U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_tin",           0,                                                      0,                                                      U_MAT_TIN,                                      U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_aluminum",      0,                                                      0,                                                      U_MAT_ALUMINUM,                         U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_iron",          0,                                                      0,                                                      U_MAT_IRON,                                     U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_titanium",      0,                                                      0,                                                      U_MAT_TITANIUM,                         U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_steel",         0,                                                      0,                                                      U_MAT_STEEL,                            U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_brass",         0,                                                      0,                                                      U_MAT_BRASS,                            U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_copper",        0,                                                      0,                                                      U_MAT_COPPER,                           U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_cement",        0,                                                      0,                                                      U_MAT_CEMENT,                           U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_rock",          0,                                                      0,                                                      U_MAT_ROCK,                                     U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_gravel",        0,                                                      0,                                                      U_MAT_GRAVEL,                           U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_pavement",      0,                                                      0,                                                      U_MAT_PAVEMENT,                         U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_brick",         0,                                                      0,                                                      U_MAT_BRICK,                            U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_clay",          0,                                                      0,                                                      U_MAT_CLAY,                                     U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_grass",         0,                                                      0,                                                      U_MAT_GRASS,                            U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_dirt",          0,                                                      0,                                                      U_MAT_DIRT,                                     U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_mud",           0,                                                      0,                                                      U_MAT_MUD,                                      U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_snow",          0,                                                      0,                                                      U_MAT_SNOW,                                     U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_ice",           0,                                                      0,                                                      U_MAT_ICE,                                      U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_sand",          0,                                                      0,                                                      U_MAT_SAND,                                     U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_ceramic",       0,                                                      0,                                                      U_MAT_CERAMICTILE,                      U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_ceramictile",   0,                                              0,                                                      U_MAT_CERAMICTILE,                      U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_linoleum",      0,                                                      0,                                                      U_MAT_LINOLEUM,                         U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_rug",           0,                                                      0,                                                      U_MAT_RUG,                                      U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_plaster",       0,                                                      0,                                                      U_MAT_PLASTER,                          U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_plastic",       0,                                                      0,                                                      U_MAT_PLASTIC,                          U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_cardboard",     0,                                                      0,                                                      U_MAT_CARDBOARD,                        U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_hardwood",      0,                                                      0,                                                      U_MAT_HARDWOOD,                         U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_softwood",      0,                                                      0,                                                      U_MAT_SOFTWOOD,                         U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_plank",         0,                                                      0,                                                      U_MAT_PLANK,                            U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_glass",         0,                                                      0,                                                      U_MAT_GLASS,                            U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_water",         0,                                                      0,                                                      U_MAT_WATER,                            U_MAT_MASK,                                     0,                                                      0 },
+               { "*mat_stucco",        0,                                                      0,                                                      U_MAT_STUCCO,                           U_MAT_MASK,                                     0,                                                      0 },
+
+               
+               /* null */
+               { NULL, 0, 0, 0, 0, 0, 0 }
+       }
+}
+
+
+
+/* end marker */
+#endif
+
index d7b397620293658533768b2ce099faa4e7f830f2..79007ed67508158ef08a150ee2d22bdb9daf8809 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -58,11 +59,18 @@ game_t struct
        ".ja",                          /* unix home sub-dir */
        "GameData",                     /* magic path word */
        "shaders",                      /* shader directory */
-       qfalse,                         /* wolf lighting model? */
+       64,                                     /* max lightmapped surface verts */
+       999,                            /* max surface verts */
+       6000,                           /* max surface indexes */
        qtrue,                          /* flares */
        "gfx/misc/flare",       /* default flare shader */
+       qfalse,                         /* wolf lighting model? */
+       128,                            /* lightmap width/height */
+       1.0f,                           /* lightmap gamma */
+       1.0f,                           /* lightmap compensate */
        "RBSP",                         /* bsp file prefix */
        1,                                      /* bsp file version */
+       qfalse,                         /* cod-style lump len/ofs order */
        LoadRBSPFile,           /* bsp load function */
        WriteRBSPFile,          /* bsp write function */
        
index 086eacedd2682c9bbab0b1f01e69a5bc6a0d883b..a8dc01a079d02a176f76282e12de799b97ba67fd 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -55,11 +56,18 @@ game_t struct
        ".jk2",                         /* unix home sub-dir */
        "GameData",                     /* magic path word */
        "shaders",                      /* shader directory */
-       qfalse,                         /* wolf lighting model? */
+       64,                                     /* max lightmapped surface verts */
+       999,                            /* max surface verts */
+       6000,                           /* max surface indexes */
        qtrue,                          /* flares */
        "gfx/misc/flare",       /* default flare shader */
+       qfalse,                         /* wolf lighting model? */
+       128,                            /* lightmap width/height */
+       1.0f,                           /* lightmap gamma */
+       1.0f,                           /* lightmap compensate */
        "RBSP",                         /* bsp file prefix */
        1,                                      /* bsp file version */
+       qfalse,                         /* cod-style lump len/ofs order */
        LoadRBSPFile,           /* bsp load function */
        WriteRBSPFile,          /* bsp write function */
        
diff --git a/tools/quake3/q3map2/game_qfusion.h b/tools/quake3/q3map2/game_qfusion.h
new file mode 100644 (file)
index 0000000..43c27fc
--- /dev/null
@@ -0,0 +1,195 @@
+/* -------------------------------------------------------------------------------
+
+This code is based on source provided under the terms of the Id Software 
+LIMITED USE SOFTWARE LICENSE AGREEMENT, a copy of which is included with the
+GtkRadiant sources (see LICENSE_ID). If you did not receive a copy of 
+LICENSE_ID, please contact Id Software immediately at info@idsoftware.com.
+
+All changes and additions to the original source which have been developed by
+other contributors (see CONTRIBUTORS) are provided under the terms of the
+license the contributors choose (see LICENSE), to the extent permitted by the
+LICENSE_ID. If you did not receive a copy of the contributor license,
+please contact the GtkRadiant maintainers at info@gtkradiant.com immediately.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------------------
+
+This code has been altered significantly from its original form, to support
+several games based on the Quake III Arena engine, in the form of "Q3Map2."
+
+------------------------------------------------------------------------------- */
+
+
+
+/* marker */
+#ifndef GAME_QFUSION_H
+#define GAME_QFUSION_H
+
+
+
+/* -------------------------------------------------------------------------------
+
+content and surface flags
+
+------------------------------------------------------------------------------- */
+
+/* game flags */
+#define F_CONT_SOLID                           1                       /* an eye is never valid in a solid */
+#define F_CONT_LAVA                                    8
+#define F_CONT_SLIME                           16
+#define F_CONT_WATER                           32
+#define F_CONT_FOG                                     64
+
+#define F_CONT_AREAPORTAL                      0x8000
+
+#define F_CONT_PLAYERCLIP                      0x10000
+#define F_CONT_MONSTERCLIP                     0x20000
+#define F_CONT_TELEPORTER                      0x40000
+#define F_CONT_JUMPPAD                         0x80000
+#define F_CONT_CLUSTERPORTAL           0x100000
+#define F_CONT_DONOTENTER                      0x200000
+#define F_CONT_BOTCLIP                         0x400000
+
+#define F_CONT_ORIGIN                          0x1000000       /* removed before bsping an entity */
+
+#define F_CONT_BODY                                    0x2000000       /* should never be on a brush, only in game */
+#define F_CONT_CORPSE                          0x4000000
+#define F_CONT_DETAIL                          0x8000000       /* brushes not used for the bsp */
+#define F_CONT_STRUCTURAL                      0x10000000      /* brushes used for the bsp */
+#define F_CONT_TRANSLUCENT                     0x20000000      /* don't consume surface fragments inside */
+#define F_CONT_TRIGGER                         0x40000000
+#define F_CONT_NODROP                          0x80000000      /* don't leave bodies or items (death fog, lava) */
+
+#define F_SURF_NODAMAGE                                0x1                     /* never give falling damage */
+#define F_SURF_SLICK                           0x2                     /* effects game physics */
+#define F_SURF_SKY                                     0x4                     /* lighting from environment map */
+#define F_SURF_LADDER                          0x8
+#define F_SURF_NOIMPACT                                0x10            /* don't make missile explosions */
+#define F_SURF_NOMARKS                         0x20            /* don't leave missile marks */
+#define F_SURF_FLESH                           0x40            /* make flesh sounds and effects */
+#define F_SURF_NODRAW                          0x80            /* don't generate a drawsurface at all */
+#define F_SURF_HINT                                    0x100           /* make a primary bsp splitter */
+#define F_SURF_SKIP                                    0x200           /* completely ignore, allowing non-closed brushes */
+#define F_SURF_NOLIGHTMAP                      0x400           /* surface doesn't need a lightmap */
+#define F_SURF_POINTLIGHT                      0x800           /* generate lighting info at vertexes */
+#define F_SURF_METALSTEPS                      0x1000          /* clanking footsteps */
+#define F_SURF_NOSTEPS                         0x2000          /* no footstep sounds */
+#define F_SURF_NONSOLID                                0x4000          /* don't collide against curves with this set */
+#define F_SURF_LIGHTFILTER                     0x8000          /* act as a light filter during q3map -light */
+#define F_SURF_ALPHASHADOW                     0x10000         /* do per-pixel light shadow casting in q3map */
+#define F_SURF_NODLIGHT                                0x20000         /* don't dlight even if solid (solid lava, skies) */
+#define F_SURF_DUST                                    0x40000         /* leave a dust trail when walking on this surface */
+
+/* ydnar flags */
+#define F_SURF_VERTEXLIT                       (F_SURF_POINTLIGHT | F_SURF_NOLIGHTMAP)
+
+
+
+/* -------------------------------------------------------------------------------
+
+game_t struct
+
+------------------------------------------------------------------------------- */
+
+{
+       "qfusion",                      /* -game x */
+       "baseq3",                       /* default base game data dir */
+       ".q3a",                         /* unix home sub-dir */
+       "quake",                        /* magic path word */
+       "scripts",                      /* shader directory */
+       2048,                           /* max lightmapped surface verts */
+       2048,                           /* max surface verts */
+       12288,                          /* max surface indexes */
+       qtrue,                          /* flares */
+       "flareshader",          /* default flare shader */
+       qfalse,                         /* wolf lighting model? */
+       512,                            /* lightmap width/height */
+       1.0f,                           /* lightmap gamma */
+       1.0f,                           /* lightmap compensate */
+       "FBSP",                         /* bsp file prefix */
+       1,                                      /* bsp file version */
+       qfalse,                         /* cod-style lump len/ofs order */
+       LoadRBSPFile,           /* bsp load function */
+       WriteRBSPFile,          /* bsp write function */
+
+       {
+               /* name                         contentFlags                            contentFlagsClear                       surfaceFlags                            surfaceFlagsClear                       compileFlags                            compileFlagsClear */
+               
+               /* default */
+               { "default",            F_CONT_SOLID,                           -1,                                                     0,                                                      -1,                                                     C_SOLID,                                        -1 },
+               
+               
+               /* ydnar */
+               { "lightgrid",          0,                                                      0,                                                      0,                                                      0,                                                      C_LIGHTGRID,                            0 },
+               { "antiportal",         0,                                                      0,                                                      0,                                                      0,                                                      C_ANTIPORTAL,                           0 },
+               { "skip",                       0,                                                      0,                                                      0,                                                      0,                                                      C_SKIP,                                         0 },
+               
+               
+               /* compiler */
+               { "origin",                     F_CONT_ORIGIN,                          F_CONT_SOLID,                           0,                                                      0,                                                      C_ORIGIN | C_TRANSLUCENT,       C_SOLID },
+               { "areaportal",         F_CONT_AREAPORTAL,                      F_CONT_SOLID,                           0,                                                      0,                                                      C_AREAPORTAL | C_TRANSLUCENT,   C_SOLID },
+               { "trans",                      F_CONT_TRANSLUCENT,                     0,                                                      0,                                                      0,                                                      C_TRANSLUCENT,                          0 },
+               { "detail",                     F_CONT_DETAIL,                          0,                                                      0,                                                      0,                                                      C_DETAIL,                                       0 },
+               { "structural",         F_CONT_STRUCTURAL,                      0,                                                      0,                                                      0,                                                      C_STRUCTURAL,                           0 },
+               { "hint",                       0,                                                      0,                                                      F_SURF_HINT,                            0,                                                      C_HINT,                                         0 },
+               { "nodraw",                     0,                                                      0,                                                      F_SURF_NODRAW,                          0,                                                      C_NODRAW,                                       0 },
+               
+               { "alphashadow",        0,                                                      0,                                                      F_SURF_ALPHASHADOW,                     0,                                                      C_ALPHASHADOW | C_TRANSLUCENT,  0 },
+               { "lightfilter",        0,                                                      0,                                                      F_SURF_LIGHTFILTER,                     0,                                                      C_LIGHTFILTER | C_TRANSLUCENT,  0 },
+               { "nolightmap",         0,                                                      0,                                                      F_SURF_VERTEXLIT,                       0,                                                      C_VERTEXLIT,                            0 },
+               { "pointlight",         0,                                                      0,                                                      F_SURF_VERTEXLIT,                       0,                                                      C_VERTEXLIT,                            0 },
+               
+               
+               /* game */
+               { "nonsolid",           0,                                                      F_CONT_SOLID,                           F_SURF_NONSOLID,                        0,                                                      0,                                                      C_SOLID },
+               
+               { "trigger",            F_CONT_TRIGGER,                         F_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               
+               { "water",                      F_CONT_WATER,                           F_CONT_SOLID,                           0,                                                      0,                                                      C_LIQUID | C_TRANSLUCENT,       C_SOLID },
+               { "slime",                      F_CONT_SLIME,                           F_CONT_SOLID,                           0,                                                      0,                                                      C_LIQUID | C_TRANSLUCENT,       C_SOLID },
+               { "lava",                       F_CONT_LAVA,                            F_CONT_SOLID,                           0,                                                      0,                                                      C_LIQUID | C_TRANSLUCENT,       C_SOLID },
+               
+               { "playerclip",         F_CONT_PLAYERCLIP,                      F_CONT_SOLID,                           0,                                                      0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
+               { "monsterclip",        F_CONT_MONSTERCLIP,                     F_CONT_SOLID,                           0,                                                      0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
+               { "nodrop",                     F_CONT_NODROP,                          F_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               
+               { "clusterportal",      F_CONT_CLUSTERPORTAL,           F_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               { "donotenter",         F_CONT_DONOTENTER,                      F_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               { "botclip",            F_CONT_BOTCLIP,                         F_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               
+               { "fog",                        F_CONT_FOG,                                     F_CONT_SOLID,                           0,                                                      0,                                                      C_FOG,                                          C_SOLID },
+               { "sky",                        0,                                                      0,                                                      F_SURF_SKY,                                     0,                                                      C_SKY,                                          0 },
+               
+               { "slick",                      0,                                                      0,                                                      F_SURF_SLICK,                           0,                                                      0,                                                      0 },
+               
+               { "noimpact",           0,                                                      0,                                                      F_SURF_NOIMPACT,                        0,                                                      0,                                                      0 },
+               { "nomarks",            0,                                                      0,                                                      F_SURF_NOMARKS,                         0,                                                      C_NOMARKS,                                      0 },
+               { "ladder",                     0,                                                      0,                                                      F_SURF_LADDER,                          0,                                                      0,                                                      0 },
+               { "nodamage",           0,                                                      0,                                                      F_SURF_NODAMAGE,                        0,                                                      0,                                                      0 },
+               { "metalsteps",         0,                                                      0,                                                      F_SURF_METALSTEPS,                      0,                                                      0,                                                      0 },
+               { "flesh",                      0,                                                      0,                                                      F_SURF_FLESH,                           0,                                                      0,                                                      0 },
+               { "nosteps",            0,                                                      0,                                                      F_SURF_NOSTEPS,                         0,                                                      0,                                                      0 },
+               { "nodlight",           0,                                                      0,                                                      F_SURF_NODLIGHT,                        0,                                                      0,                                                      0 },
+               { "dust",                       0,                                                      0,                                                      F_SURF_DUST,                            0,                                                      0,                                                      0 },
+               
+               
+               /* null */
+               { NULL, 0, 0, 0, 0, 0, 0 }
+       }
+}
+
+
+
+/* end marker */
+#endif
+
index 9b55787d83df536d5cc039d07430a36cada08eaf..1aad043d2b4d6e3f1069b9b5133b362af8912511 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -103,11 +104,18 @@ game_t struct
        ".q3a",                         /* unix home sub-dir */
        "quake",                        /* magic path word */
        "scripts",                      /* shader directory */
-       qfalse,                         /* wolf lighting model? */
+       64,                                     /* max lightmapped surface verts */
+       999,                            /* max surface verts */
+       6000,                           /* max surface indexes */
        qfalse,                         /* flares */
        "flareshader",          /* default flare shader */
+       qfalse,                         /* wolf lighting model? */
+       128,                            /* lightmap width/height */
+       1.0f,                           /* lightmap gamma */
+       1.0f,                           /* lightmap compensate */
        "IBSP",                         /* bsp file prefix */
        46,                                     /* bsp file version */
+       qfalse,                         /* cod-style lump len/ofs order */
        LoadIBSPFile,           /* bsp load function */
        WriteIBSPFile,          /* bsp write function */
 
index 5d12d07da386393b002a7151a4a4c16f379e0b26..c97603928e8a26c796850e3924d2f93f87a09300 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -130,11 +131,18 @@ game_t struct
        ".sof2",                                /* unix home sub-dir */
        "soldier",                              /* magic path word */
        "shaders",                              /* shader directory */
-       qfalse,                                 /* wolf lighting model? */
+       64,                                             /* max lightmapped surface verts */
+       999,                                    /* max surface verts */
+       6000,                                   /* max surface indexes */
        qtrue,                                  /* flares */
        "gfx/misc/lens_flare",  /* default flare shader */
+       qfalse,                                 /* wolf lighting model? */
+       128,                                    /* lightmap width/height */
+       1.0f,                                   /* lightmap gamma */
+       1.0f,                                   /* lightmap compensate */
        "RBSP",                                 /* bsp file prefix */
        1,                                              /* bsp file version */
+       qfalse,                                 /* cod-style lump len/ofs order */
        LoadRBSPFile,                   /* bsp load function */
        WriteRBSPFile,                  /* bsp write function */
        
index a639288f7bc0a1858b442cbe0aaa002afa2e4796..355c926338cd5ee1ee9f60e9a88cc50241206c67 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -103,11 +104,18 @@ game_t struct
        ".tenebrae",            /* unix home sub-dir */
        "tenebrae",                     /* magic path word */
        "scripts",                      /* shader directory */
-       qfalse,                         /* wolf lighting model? */
+       1024,                           /* max lightmapped surface verts */
+       1024,                           /* max surface verts */
+       6144,                           /* max surface indexes */
        qfalse,                         /* flares */
        "flareshader",          /* default flare shader */
+       qfalse,                         /* wolf lighting model? */
+       512,                            /* lightmap width/height */
+       2.0f,                           /* lightmap gamma */
+       1.0f,                           /* lightmap compensate */
        "IBSP",                         /* bsp file prefix */
        46,                                     /* bsp file version */
+       qfalse,                         /* cod-style lump len/ofs order */
        LoadIBSPFile,           /* bsp load function */
        WriteIBSPFile,          /* bsp write function */
 
diff --git a/tools/quake3/q3map2/game_tremulous.h b/tools/quake3/q3map2/game_tremulous.h
new file mode 100644 (file)
index 0000000..9864cb9
--- /dev/null
@@ -0,0 +1,160 @@
+/* -------------------------------------------------------------------------------
+
+Copyright (C) 1999-2007 id Software, Inc. and contributors.
+For a list of contributors, see the accompanying CONTRIBUTORS file.
+
+This file is part of GtkRadiant.
+
+GtkRadiant is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+GtkRadiant is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GtkRadiant; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+----------------------------------------------------------------------------------
+
+This code has been altered significantly from its original form, to support
+several games based on the Quake III Arena engine, in the form of "Q3Map2."
+
+------------------------------------------------------------------------------- */
+
+/* Tremulous support, by LinuxManMikeC */
+
+
+/* marker */
+#ifndef GAME_TREMULOUS_H
+#define GAME_TREMULOUS_H
+
+
+
+/* -------------------------------------------------------------------------------
+
+content and surface flags - also uses defines from game_quake3.h
+
+------------------------------------------------------------------------------- */
+#define TREM_CONT_NOALIENBUILD         0x1000
+#define TREM_CONT_NOHUMANBUILD         0x2000
+#define TREM_CONT_NOBUILD              0x4000
+  
+#define TREM_SURF_NOALIENBUILDSURFACE  0x80000 
+#define TREM_SURF_NOHUMANBUILDSURFACE  0x100000
+#define TREM_SURF_NOBUILDSURFACE       0x200000
+
+
+
+/* -------------------------------------------------------------------------------
+
+game_t struct
+
+------------------------------------------------------------------------------- */
+
+{
+       "tremulous",                    /* -game x */
+       "base",                 /* default base game data dir */
+       ".tremulous",                           /* unix home sub-dir */
+       "tremulous",                    /* magic path word - think this is right for trem*/
+       "scripts",                      /* shader directory */
+       64,                                     /* max lightmapped surface verts */
+       999,                            /* max surface verts */
+       6000,                           /* max surface indexes */
+       qfalse,                         /* flares */
+       "flareshader",          /* default flare shader */
+       qfalse,                         /* wolf lighting model? */
+       128,                            /* lightmap width/height */
+       1.0f,                           /* lightmap gamma */
+       1.0f,                           /* lightmap compensate */
+       "IBSP",                         /* bsp file prefix */
+       46,                                     /* bsp file version */
+       qfalse,                         /* cod-style lump len/ofs order */
+       LoadIBSPFile,           /* bsp load function */
+       WriteIBSPFile,          /* bsp write function */
+
+       {
+               /* name                         contentFlags                            contentFlagsClear                       surfaceFlags                            surfaceFlagsClear                       compileFlags                            compileFlagsClear */
+               
+               /* default */
+               { "default",            Q_CONT_SOLID,                           -1,                                                     0,                                                      -1,                                                     C_SOLID,                                        -1 },
+               
+               
+               /* ydnar */
+               { "lightgrid",          0,                                                      0,                                                      0,                                                      0,                                                      C_LIGHTGRID,                            0 },
+               { "antiportal",         0,                                                      0,                                                      0,                                                      0,                                                      C_ANTIPORTAL,                           0 },
+               { "skip",                       0,                                                      0,                                                      0,                                                      0,                                                      C_SKIP,                                         0 },
+               
+               
+               /* compiler */
+               { "origin",                     Q_CONT_ORIGIN,                          Q_CONT_SOLID,                           0,                                                      0,                                                      C_ORIGIN | C_TRANSLUCENT,       C_SOLID },
+               { "areaportal",         Q_CONT_AREAPORTAL,                      Q_CONT_SOLID,                           0,                                                      0,                                                      C_AREAPORTAL | C_TRANSLUCENT,   C_SOLID },
+               { "trans",                      Q_CONT_TRANSLUCENT,                     0,                                                      0,                                                      0,                                                      C_TRANSLUCENT,                          0 },
+               { "detail",                     Q_CONT_DETAIL,                          0,                                                      0,                                                      0,                                                      C_DETAIL,                                       0 },
+               { "structural",         Q_CONT_STRUCTURAL,                      0,                                                      0,                                                      0,                                                      C_STRUCTURAL,                           0 },
+               { "hint",                       0,                                                      0,                                                      Q_SURF_HINT,                            0,                                                      C_HINT,                                         0 },
+               { "nodraw",                     0,                                                      0,                                                      Q_SURF_NODRAW,                          0,                                                      C_NODRAW,                                       0 },
+               
+               { "alphashadow",        0,                                                      0,                                                      Q_SURF_ALPHASHADOW,                     0,                                                      C_ALPHASHADOW | C_TRANSLUCENT,  0 },
+               { "lightfilter",        0,                                                      0,                                                      Q_SURF_LIGHTFILTER,                     0,                                                      C_LIGHTFILTER | C_TRANSLUCENT,  0 },
+               { "nolightmap",         0,                                                      0,                                                      Q_SURF_VERTEXLIT,                       0,                                                      C_VERTEXLIT,                            0 },
+               { "pointlight",         0,                                                      0,                                                      Q_SURF_VERTEXLIT,                       0,                                                      C_VERTEXLIT,                            0 },
+               
+               
+               /* game */
+               { "nonsolid",           0,                                                      Q_CONT_SOLID,                           Q_SURF_NONSOLID,                        0,                                                      0,                                                      C_SOLID },
+               
+               { "trigger",            Q_CONT_TRIGGER,                         Q_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               
+               { "water",                      Q_CONT_WATER,                           Q_CONT_SOLID,                           0,                                                      0,                                                      C_LIQUID | C_TRANSLUCENT,       C_SOLID },
+               { "slime",                      Q_CONT_SLIME,                           Q_CONT_SOLID,                           0,                                                      0,                                                      C_LIQUID | C_TRANSLUCENT,       C_SOLID },
+               { "lava",                       Q_CONT_LAVA,                            Q_CONT_SOLID,                           0,                                                      0,                                                      C_LIQUID | C_TRANSLUCENT,       C_SOLID },
+               
+               { "playerclip",         Q_CONT_PLAYERCLIP,                      Q_CONT_SOLID,                           0,                                                      0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
+               { "monsterclip",        Q_CONT_MONSTERCLIP,                     Q_CONT_SOLID,                           0,                                                      0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
+               { "nodrop",                     Q_CONT_NODROP,                          Q_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               
+               { "clusterportal",      Q_CONT_CLUSTERPORTAL,           Q_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               { "donotenter",         Q_CONT_DONOTENTER,                      Q_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               { "botclip",            Q_CONT_BOTCLIP,                         Q_CONT_SOLID,                           0,                                                      0,                                                      C_TRANSLUCENT,                          C_SOLID },
+               
+               { "fog",                        Q_CONT_FOG,                                     Q_CONT_SOLID,                           0,                                                      0,                                                      C_FOG,                                          C_SOLID },
+               { "sky",                        0,                                                      0,                                                      Q_SURF_SKY,                                     0,                                                      C_SKY,                                          0 },
+               
+               { "slick",                      0,                                                      0,                                                      Q_SURF_SLICK,                           0,                                                      0,                                                      0 },
+               
+               { "noimpact",           0,                                                      0,                                                      Q_SURF_NOIMPACT,                        0,                                                      0,                                                      0 },
+               { "nomarks",            0,                                                      0,                                                      Q_SURF_NOMARKS,                         0,                                                      C_NOMARKS,                                      0 },
+               { "ladder",                     0,                                                      0,                                                      Q_SURF_LADDER,                          0,                                                      0,                                                      0 },
+               { "nodamage",           0,                                                      0,                                                      Q_SURF_NODAMAGE,                        0,                                                      0,                                                      0 },
+               { "metalsteps",         0,                                                      0,                                                      Q_SURF_METALSTEPS,                      0,                                                      0,                                                      0 },
+               { "flesh",                      0,                                                      0,                                                      Q_SURF_FLESH,                           0,                                                      0,                                                      0 },
+               { "nosteps",            0,                                                      0,                                                      Q_SURF_NOSTEPS,                         0,                                                      0,                                                      0 },
+               { "nodlight",           0,                                                      0,                                                      Q_SURF_NODLIGHT,                        0,                                                      0,                                                      0 },
+               { "dust",                       0,                                                      0,                                                      Q_SURF_DUST,                            0,                                                      0,                                                      0 },
+               
+               
+               /* tremulous */
+               {"noalienbuild",                        TREM_CONT_NOALIENBUILD,0,0,0,0,0},
+               {"nohumanbuild",                        TREM_CONT_NOHUMANBUILD,0,0,0,0,0},
+               {"nobuild",                                     TREM_CONT_NOBUILD,0,0,0,0,0},
+               
+               {"noalienbuildsurface", 0,0,TREM_SURF_NOALIENBUILDSURFACE,0,0,0},
+               {"nohumanbuildsurface", 0,0,TREM_SURF_NOHUMANBUILDSURFACE,0,0,0},
+               {"nobuildsurface",              0,0,TREM_SURF_NOBUILDSURFACE,0,0,0},
+               
+               
+               /* null */
+               { NULL, 0, 0, 0, 0, 0, 0 }
+       }
+}
+
+
+
+/* end marker */
+#endif
+
index 0e882868958fcbb2fbc9ff8ac1bb680917a50584..3200d162fecc06fb1ce428d5e3f6823ff7d0f384 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -120,11 +121,18 @@ game_t struct
        ".wolf",                        /* unix home sub-dir */
        "wolf",                         /* magic path word */
        "scripts",                      /* shader directory */
-       qtrue,                          /* wolf lighting model? */
+       64,                                     /* max lightmapped surface verts */
+       999,                            /* max surface verts */
+       6000,                           /* max surface indexes */
        qfalse,                         /* flares */
        "flareshader",          /* default flare shader */
+       qtrue,                          /* wolf lighting model? */
+       128,                            /* lightmap width/height */
+       1.0f,                           /* lightmap gamma */
+       1.0f,                           /* lightmap compensate */
        "IBSP",                         /* bsp file prefix */
        47,                                     /* bsp file version */
+       qfalse,                         /* cod-style lump len/ofs order */
        LoadIBSPFile,           /* bsp load function */
        WriteIBSPFile,          /* bsp write function */
        
index fdc5b7e87a3c3bcfb4fdeb36235113d0b0e8f6bf..a6ca181f5b2debbd0fa79757c00f9cc426d8773e 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -57,11 +58,18 @@ game_t struct
        ".etwolf",                      /* unix home sub-dir */
        "et",                           /* magic path word */
        "scripts",                      /* shader directory */
-       qtrue,                          /* wolf lighting model? */
+       1024,                           /* max lightmapped surface verts */
+       1024,                           /* max surface verts */
+       6144,                           /* max surface indexes */
        qfalse,                         /* flares */
        "flareshader",          /* default flare shader */
+       qtrue,                          /* wolf lighting model? */
+       128,                            /* lightmap width/height */
+       1.0f,                           /* lightmap gamma */
+       1.0f,                           /* lightmap compensate */
        "IBSP",                         /* bsp file prefix */
        47,                                     /* bsp file version */
+       qfalse,                         /* cod-style lump len/ofs order */
        LoadIBSPFile,           /* bsp load function */
        WriteIBSPFile,          /* bsp write function */
        
index fec9f6f5e4eae708e19b1115ab929653f28c07dc..0ddcaf86bc59e556fa7d3e2cb5127a95dfdf1b00 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -390,7 +391,7 @@ image_t *ImageLoad( const char *filename )
        strcat( name, ".tga" );
        size = vfsLoadFile( (const char*) name, (void**) &buffer, 0 );
        if( size > 0 )
-               LoadTGABuffer( buffer, &image->pixels, &image->width, &image->height );
+               LoadTGABuffer( buffer, buffer + size, &image->pixels, &image->width, &image->height );
        else
        {
                /* attempt to load png */
index 1d72604bb7d9033a486572619db17c88258b6168..51fda30021cea41edcbe2bad23bcd87ee88a3898 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index 670c9a0ed21ce2935b9ce45293dcf365c5e614a6..25d40a9a336d62ea675868e5acf5a1907599a650 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -115,6 +116,7 @@ static void CreateSunLight( sun_t *sun )
                light->fade = 1.0f;
                light->falloffTolerance = falloffTolerance;
                light->filterRadius = sun->filterRadius / sun->numSamples;
+               light->style = noStyles ? LS_NORMAL : sun->style;
                
                /* set the light's position out to infinity */
                VectorMA( vec3_origin, (MAX_WORLD_COORD * 8.0f), direction, light->origin );    /* MAX_WORLD_COORD * 2.0f */
@@ -140,11 +142,13 @@ CreateSkyLights() - ydnar
 simulates sky light with multiple suns
 */
 
-static void CreateSkyLights( vec3_t color, float value, int iterations, float filterRadius )
+static void CreateSkyLights( vec3_t color, float value, int iterations, float filterRadius, int style )
 {
-       int                     c, i, j, k, numSuns;
+       int                     i, j, numSuns;
+       int                     angleSteps, elevationSteps;
+       float           angle, elevation;
+       float           angleStep, elevationStep;
        float           step, start;
-       vec3_t          in;
        sun_t           sun;
        
        
@@ -161,36 +165,49 @@ static void CreateSkyLights( vec3_t color, float value, int iterations, float fi
        sun.deviance = 0.0f;
        sun.filterRadius = filterRadius;
        sun.numSamples = 1;
+       sun.style = noStyles ? LS_NORMAL : style;
        sun.next = NULL;
        
-       /* iterate */
-       numSuns = 0;
-       for( c = 0; c < 2; c++ )
+       /* setup */
+       elevationSteps = iterations - 1;
+       angleSteps = elevationSteps * 4;
+       angle = 0.0f;
+       elevationStep = DEG2RAD( 90.0f / iterations );  /* skip elevation 0 */
+       angleStep = DEG2RAD( 360.0f / angleSteps );
+       
+       /* calc individual sun brightness */
+       numSuns = angleSteps * elevationSteps + 1;
+       sun.photons = value / numSuns;
+       
+       /* iterate elevation */
+       elevation = elevationStep * 0.5f;
+       angle = 0.0f;
+       for( i = 0, elevation = elevationStep * 0.5f; i < elevationSteps; i++ )
        {
-               for( k = 0, in[ 2 ] = start; k < iterations; k++, in[ 2 ] += step )
-               {
-                       /* don't create sky light below the horizon */
-                       if( in[ 2 ] <= 0.0f )
-                               continue;
+               /* iterate angle */
+               for( j = 0; j < angleSteps; j++ )
+               {
+                       /* create sun */
+                       sun.direction[ 0 ] = cos( angle ) * cos( elevation );
+                       sun.direction[ 1 ] = sin( angle ) * cos( elevation );
+                       sun.direction[ 2 ] = sin( elevation );
+                       CreateSunLight( &sun );
                        
-                       for( j = 0, in[ 1 ] = start; j < iterations; j++, in[ 1 ] += step )
-                       {
-                               for( i = 0, in[ 0 ] = start; i < iterations; i++, in[ 0 ] += step )
-                               {
-                                       if( VectorNormalize( in, sun.direction ) )
-                                       {
-                                               if( c > 0 && numSuns > 0 )
-                                               {
-                                                       sun.photons = value / numSuns;
-                                                       CreateSunLight( &sun );
-                                               }
-                                               else
-                                                       numSuns++;
-                                       }
-                               }
-                       }
+                       /* move */
+                       angle += angleStep;
                }
+                       
+               /* move */
+               elevation += elevationStep;
+               angle += angleStep / elevationSteps;
        }
+       
+       /* create vertical sun */
+       VectorSet( sun.direction, 0.0f, 0.0f, 1.0f );
+       CreateSunLight( &sun );
+       
+       /* short circuit */
+       return;
 }
 
 
@@ -245,7 +262,7 @@ void CreateEntityLights( void )
                spawnflags = IntForKey( e, "spawnflags" );
                
                /* ydnar: quake 3+ light behavior */
-               if( game->wolfLight == qfalse )
+               if( wolfLight == qfalse )
                {
                        /* set default flags */
                        flags = LIGHT_Q3A_DEFAULT;
@@ -317,11 +334,15 @@ void CreateEntityLights( void )
                /* set origin */
                GetVectorForKey( e, "origin", light->origin);
                light->style = IntForKey( e, "_style" );
-               if( light->style == 0 )
+               if( light->style == LS_NORMAL )
                        light->style = IntForKey( e, "style" );
                if( light->style < LS_NORMAL || light->style >= LS_NONE )
                        Error( "Invalid lightstyle (%d) on entity %d", light->style, i );
                
+               /* override */
+               if( noStyles )
+                       light->style = LS_NORMAL;
+               
                /* set light intensity */
                intensity = FloatForKey( e, "_light" );
                if( intensity == 0.0f )
@@ -433,6 +454,7 @@ void CreateEntityLights( void )
                                        sun.photons = (intensity / pointScale);
                                        sun.deviance = deviance / 180.0f * Q_PI;
                                        sun.numSamples = numSamples;
+                                       sun.style = noStyles ? LS_NORMAL : light->style;
                                        sun.next = NULL;
                                        
                                        /* make a sun light */
@@ -516,7 +538,7 @@ void CreateSurfaceLights( void )
                if( si->skyLightValue > 0.0f )
                {
                        Sys_FPrintf( SYS_VRB, "Sky: %s\n", si->shader );
-                       CreateSkyLights( si->color, si->skyLightValue, si->skyLightIterations, si->lightFilterRadius );
+                       CreateSkyLights( si->color, si->skyLightValue, si->skyLightIterations, si->lightFilterRadius, si->lightStyle );
                        si->skyLightValue = 0.0f;       /* FIXME: hack! */
                }
                
@@ -546,7 +568,7 @@ void CreateSurfaceLights( void )
                        VectorCopy( origin, light->origin );
                        VectorCopy( si->color, light->color );
                        light->falloffTolerance = falloffTolerance;
-                       light->style = light->style;
+                       light->style = si->lightStyle;
                        
                        /* add to point light count and continue */
                        numPointLights++;
@@ -737,35 +759,8 @@ int LightContributionToSample( trace_t *trace )
                        return 0;
        }
        
-       /* ptpff approximation */
-       if( light->type == EMIT_AREA && faster )
-       {
-               /* get direction and distance */
-               VectorCopy( light->origin, trace->end );
-               dist = SetupTrace( trace );
-               if( dist >= light->envelope )
-                       return 0;
-               
-               /* clamp the distance to prevent super hot spots */
-               if( dist < 16.0f )
-                       dist = 16.0f;
-               
-               /* angle attenuation */
-               angle = DotProduct( trace->normal, trace->direction );
-               
-               /* twosided lighting */
-               if( trace->twoSided )
-                       angle = fabs( angle );
-               
-               /* attenuate */
-               angle *= -DotProduct( light->normal, trace->direction );
-               if( angle <= 0.0f )
-                       return 0;
-               add = light->photons / (dist * dist) * angle;
-       }
-       
        /* exact point to polygon form factor */
-       else if( light->type == EMIT_AREA )
+       if( light->type == EMIT_AREA )
        {
                float           factor;
                float           d;
@@ -774,8 +769,6 @@ int LightContributionToSample( trace_t *trace )
                
                /* project sample point into light plane */
                d = DotProduct( trace->origin, light->normal ) - light->dist;
-               //%     if( !(light->flags & LIGHT_TWOSIDED) && d < -1.0f )
-               //%             return 0;
                if( d < 3.0f )
                {
                        /* sample point behind plane? */
@@ -800,29 +793,51 @@ int LightContributionToSample( trace_t *trace )
                if( dist >= light->envelope )
                        return 0;
                
-               /* calculate the contribution */
-               factor = PointToPolygonFormFactor( pushedOrigin, trace->normal, light->w );
-               if( factor == 0.0f )
-                       return 0;
-               else if( factor < 0.0f )
+               /* ptpff approximation */
+               if( faster )
                {
+                       /* angle attenuation */
+                       angle = DotProduct( trace->normal, trace->direction );
+                       
                        /* twosided lighting */
-                       if( trace->twoSided || (light->flags & LIGHT_TWOSIDED) )
+                       if( trace->twoSided )
+                               angle = fabs( angle );
+                       
+                       /* attenuate */
+                       angle *= -DotProduct( light->normal, trace->direction );
+                       if( angle == 0.0f )
+                               return 0;
+                       else if( angle < 0.0f &&
+                               (trace->twoSided || (light->flags & LIGHT_TWOSIDED)) )
+                               angle = -angle;
+                       add = light->photons / (dist * dist) * angle;
+               }
+               else
+               {
+                       /* calculate the contribution */
+                       factor = PointToPolygonFormFactor( pushedOrigin, trace->normal, light->w );
+                       if( factor == 0.0f )
+                               return 0;
+                       else if( factor < 0.0f )
                        {
-                               factor = -factor;
+                               /* twosided lighting */
+                               if( trace->twoSided || (light->flags & LIGHT_TWOSIDED) )
+                               {
+                                       factor = -factor;
 
-                               /* push light origin to other side of the plane */
-                               VectorMA( light->origin, -2.0f, light->normal, trace->end );
-                               dist = SetupTrace( trace );
-                               if( dist >= light->envelope )
+                                       /* push light origin to other side of the plane */
+                                       VectorMA( light->origin, -2.0f, light->normal, trace->end );
+                                       dist = SetupTrace( trace );
+                                       if( dist >= light->envelope )
+                                               return 0;
+                               }
+                               else
                                        return 0;
                        }
-                       else
-                               return 0;
+                       
+                       /* ydnar: moved to here */
+                       add = factor * light->add;
                }
-               
-               /* ydnar: moved to here */
-               add = factor * light->add;
        }
        
        /* point/spot lights */
@@ -1436,7 +1451,8 @@ void TraceGrid( int num )
        #endif
        
        /* store direction */
-       NormalToLatLong( gp->dir, bgp->latLong );
+       if( !bouncing )
+               NormalToLatLong( gp->dir, bgp->latLong );
 }
 
 
@@ -1633,6 +1649,18 @@ void LightWorld( void )
        Sys_Printf( "%9d luxels\n", numLuxels );
        Sys_Printf( "%9d luxels mapped\n", numLuxelsMapped );
        Sys_Printf( "%9d luxels occluded\n", numLuxelsOccluded );
+       
+       /* dirty them up */
+       if( dirty )
+       {
+               Sys_Printf( "--- DirtyRawLightmap ---\n" );
+
+
+
+
+               RunThreadsOnIndividual( numRawLightmaps, qtrue, DirtyRawLightmap );
+       }
+       
 
        /* ydnar: set up light envelopes */
        SetupEnvelopes( qfalse, fast );
@@ -1747,6 +1775,12 @@ int LightMain( int argc, char **argv )
        /* note it */
        Sys_Printf( "--- Light ---\n" );
        
+       /* set standard game flags */
+       wolfLight = game->wolfLight;
+       lmCustomSize = game->lightmapSize;
+       lightmapGamma = game->lightmapGamma;
+       lightmapCompensate = game->lightmapCompensate;
+       
        /* process commandline arguments */
        for( i = 1; i < (argc - 1); i++ )
        {
@@ -1794,6 +1828,24 @@ int LightMain( int argc, char **argv )
                        i++;
                }
                
+               else if( !strcmp( argv[ i ], "-gamma" ) )
+               {
+                       f = atof( argv[ i + 1 ] );
+                       lightmapGamma = f;
+                       Sys_Printf( "Lighting gamma set to %f\n", lightmapGamma );
+                       i++;
+               }
+               
+               else if( !strcmp( argv[ i ], "-compensate" ) )
+               {
+                       f = atof( argv[ i + 1 ] );
+                       if( f <= 0.0f )
+                               f = 1.0f;
+                       lightmapCompensate = f;
+                       Sys_Printf( "Lighting compensation set to 1/%f\n", lightmapCompensate );
+                       i++;
+               }
+               
                /* ydnar switches */
                else if( !strcmp( argv[ i ], "-bounce" ) )
                {
@@ -1831,6 +1883,18 @@ int LightMain( int argc, char **argv )
                        Sys_Printf( "Lightmap filtering enabled\n" );
                }
                
+               else if( !strcmp( argv[ i ], "-dark" ) )
+               {
+                       dark = qtrue;
+                       Sys_Printf( "Dark lightmap seams enabled\n" );
+               }
+               
+
+
+
+
+
+
                else if( !strcmp( argv[ i ], "-shadeangle" ) )
                {
                        shadeAngleDegrees = atof( argv[ i + 1 ] );
@@ -1884,13 +1948,13 @@ int LightMain( int argc, char **argv )
                        if( ((lmCustomSize - 1) & lmCustomSize) || lmCustomSize < 2 )
                        {
                                Sys_Printf( "WARNING: Lightmap size must be a power of 2, greater or equal to 2 pixels.\n" );
-                               lmCustomSize = LIGHTMAP_WIDTH;
+                               lmCustomSize = game->lightmapSize;
                        }
                        i++;
                        Sys_Printf( "Default lightmap size set to %d x %d pixels\n", lmCustomSize, lmCustomSize );
                        
                        /* enable external lightmaps */
-                       if( lmCustomSize != LIGHTMAP_WIDTH )
+                       if( lmCustomSize != game->lightmapSize )
                        {
                                externalLightmaps = qtrue;
                                Sys_Printf( "Storing all lightmaps externally\n" );
@@ -1907,8 +1971,15 @@ int LightMain( int argc, char **argv )
                else if( !strcmp( argv[ i ], "-wolf" ) )
                {
                        /* -game should already be set */
-                       game->wolfLight = qtrue;
-                       Sys_Printf( "Enabling Wolf lighting model\n" );
+                       wolfLight = qtrue;
+                       Sys_Printf( "Enabling Wolf lighting model (linear default)\n" );
+               }
+               
+               else if( !strcmp( argv[ i ], "-q3" ) )
+               {
+                       /* -game should already be set */
+                       wolfLight = qfalse;
+                       Sys_Printf( "Enabling Quake 3 lighting model (nonlinear default)\n" );
                }
                
                else if( !strcmp( argv[ i ], "-sunonly" ) )
@@ -1944,7 +2015,6 @@ int LightMain( int argc, char **argv )
                
                else if( !strcmp( argv[ i ], "-smooth" ) )
                {
-                       smooth = qtrue;
                        lightSamples = EXTRA_SCALE;
                        Sys_Printf( "The -smooth argument is deprecated, use \"-samples 2\" instead\n" );
                }
@@ -2064,14 +2134,11 @@ int LightMain( int argc, char **argv )
                }
                else if( !strcmp( argv[ i ], "-extra" ) )
                {
-                       extra = qtrue;
                        superSample = EXTRA_SCALE;              /* ydnar */
                        Sys_Printf( "The -extra argument is deprecated, use \"-super 2\" instead\n" );
                }
                else if( !strcmp( argv[ i ], "-extrawide" ) )
                {
-                       extra = qtrue;
-                       extraWide = qtrue;
                        superSample = EXTRAWIDE_SCALE;  /* ydnar */
                        filter = qtrue;                                 /* ydnar */
                        Sys_Printf( "The -extrawide argument is deprecated, use \"-filter [-super 2]\" instead\n");
@@ -2114,9 +2181,64 @@ int LightMain( int argc, char **argv )
                        loMem = qtrue;
                        Sys_Printf( "Enabling low-memory (potentially slower) lighting mode\n" );
                }
+               else if( !strcmp( argv[ i ], "-nostyle" ) || !strcmp( argv[ i ], "-nostyles" ) )
+               {
+                       noStyles = qtrue;
+                       Sys_Printf( "Disabling lightstyles\n" );
+               }
+               else if( !strcmp( argv[ i ], "-cpma" ) )
+               {
+                       cpmaHack = qtrue;
+                       Sys_Printf( "Enabling Challenge Pro Mode Asstacular Vertex Lighting Mode (tm)\n" );
+               }
                
+               /* r7: dirtmapping */
+               else if( !strcmp( argv[ i ], "-dirty" ) )
+               {
+                       dirty = qtrue;
+                       Sys_Printf( "Dirtmapping enabled\n" );
+               }
+               else if( !strcmp( argv[ i ], "-dirtdebug" ) || !strcmp( argv[ i ], "-debugdirt" ) )
+               {
+                       dirtDebug = qtrue;
+                       Sys_Printf( "Dirtmap debugging enabled\n" );
+               }
+               else if( !strcmp( argv[ i ], "-dirtmode" ) )
+               {
+                       dirtMode = atoi( argv[ i + 1 ] );
+                       if( dirtMode != 0 && dirtMode != 1 )
+                               dirtMode = 0;
+                       if( dirtMode == 1 )
+                               Sys_Printf( "Enabling randomized dirtmapping\n" );
+                       else
+                               Sys_Printf( "Enabling ordered dir mapping\n" );
+               }
+               else if( !strcmp( argv[ i ], "-dirtdepth" ) )
+               {
+                       dirtDepth = atof( argv[ i + 1 ] );
+                       if( dirtDepth <= 0.0f )
+                               dirtDepth = 128.0f;
+                       Sys_Printf( "Dirtmapping depth set to %.1f\n", dirtDepth );
+               }
+               else if( !strcmp( argv[ i ], "-dirtscale" ) )
+               {
+                       dirtScale = atof( argv[ i + 1 ] );
+                       if( dirtScale <= 0.0f )
+                               dirtScale = 1.0f;
+                       Sys_Printf( "Dirtmapping scale set to %.1f\n", dirtScale );
+               }
+               else if( !strcmp( argv[ i ], "-dirtgain" ) )
+               {
+                       dirtGain = atof( argv[ i + 1 ] );
+                       if( dirtGain <= 0.0f )
+                               dirtGain = 1.0f;
+                       Sys_Printf( "Dirtmapping gain set to %.1f\n", dirtGain );
+               }
+               
+               /* unhandled args */
                else
-                       Sys_Printf( "WARNING: Unknown option \"%s\"\n", argv[ i ] );
+                       Sys_Printf( "WARNING: Unknown argument \"%s\"\n", argv[ i ] );
+
        }
        
        /* clean up map name */
@@ -2156,6 +2278,7 @@ int LightMain( int argc, char **argv )
        
        /* ydnar: set up optimization */
        SetupBrushes();
+       SetupDirt();
        SetupSurfaceLightmaps();
        
        /* initialize the surface facet tracing */
index 4181ce53b70a430c776450cb4212cf6f1b7adb74..dba5b131500c0390a09b4fb55f0da6c45b46d107 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -509,7 +510,7 @@ static void RadSubdivideDiffuseLight( int lightmapNum, bspDrawSurface_t *ds, raw
                        break;
                
                case MST_TRIANGLE_SOUP:
-                       numTriangleDiffuseLights;
+                       numTriangleDiffuseLights++;
                        break;
                
                case MST_PATCH:
@@ -546,9 +547,9 @@ static void RadSubdivideDiffuseLight( int lightmapNum, bspDrawSurface_t *ds, raw
                light->add = value * formFactorValueScale * areaScale;
                VectorCopy( si->color, light->color );
                VectorScale( light->color, light->add, light->emitColor );
-               light->style = si->lightStyle;
-               if( light->style < 0 || light->style >= LS_NONE )
-                       light->style = 0;
+               light->style = noStyles ? LS_NORMAL : si->lightStyle;
+               if( light->style < LS_NORMAL || light->style >= LS_NONE )
+                       light->style = LS_NORMAL;
                
                /* set origin */
                VectorAdd( mins, maxs, light->origin );
@@ -577,7 +578,7 @@ static void RadSubdivideDiffuseLight( int lightmapNum, bspDrawSurface_t *ds, raw
                        VectorMA( light->origin, si->backsplashDistance, normal, splash->origin );
                        VectorCopy( si->color, splash->color );
                        splash->falloffTolerance = falloffTolerance;
-                       splash->style = light->style;
+                       splash->style = noStyles ? LS_NORMAL : light->style;
                        
                        /* add to counts */
                        numPointLights++;
@@ -591,9 +592,9 @@ static void RadSubdivideDiffuseLight( int lightmapNum, bspDrawSurface_t *ds, raw
                light->add = value * formFactorValueScale * bounceScale;
                VectorCopy( color, light->color );
                VectorScale( light->color, light->add, light->emitColor );
-               light->style = style;
-               if( light->style < 0 || light->style >= LS_NONE )
-                       light->style = 0;
+               light->style = noStyles ? LS_NORMAL : style;
+               if( light->style < LS_NORMAL || light->style >= LS_NONE )
+                       light->style = LS_NORMAL;
                
                /* set origin */
                WindingCenter( w, light->origin );
@@ -952,3 +953,4 @@ void RadCreateDiffuseLights( void )
 
 
 
+
index 287b22dda146257383580337eb1584ca3d92cafb..2a4e7e464b9fe84706f122940058a94f32ba2f41 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -72,7 +73,7 @@ traceVert_t;
 typedef struct traceInfo_s
 {
        shaderInfo_t                            *si;
-       int                                                     surfaceNum, castShadows, padding;
+       int                                                     surfaceNum, castShadows;
 }
 traceInfo_t;
 
@@ -87,7 +88,7 @@ traceWinding_t;
 typedef struct traceTriangle_s
 {
        vec3_t                                          edge1, edge2;
-       int                                                     infoNum, padding;
+       int                                                     infoNum;
        traceVert_t                                     v[ 3 ];
 }
 traceTriangle_t;
@@ -326,6 +327,8 @@ static int AddItemToTraceNode( traceNode_t *node, int num )
                        node->maxItems *= 2;
                else
                        node->maxItems += GROW_NODE_ITEMS;
+               if( node->maxItems <= 0 )
+                       node->maxItems = GROW_NODE_ITEMS;
                temp = safe_malloc( node->maxItems * sizeof( *node->items ) );
                if( node->items != NULL )
                {
@@ -384,16 +387,6 @@ static int SetupTraceNodes_r( int bspNodeNum )
                {
                        bspLeafNum = -bspNode->children[ i ] - 1;
                        
-                       #if 0
-                       /* solid leaf */
-                       if( bspLeafs[ bspLeafNum ].cluster == -1 )
-                               traceNodes[ nodeNum ].children[ i ] = -1;
-                       
-                       /* passable leaf */
-                       else
-                               traceNodes[ nodeNum ].children[ i ] = AllocTraceNode();
-                       #endif
-                       
                        /* new code */
                        traceNodes[ nodeNum ].children[ i ] = AllocTraceNode();
                        if( bspLeafs[ bspLeafNum ].cluster == -1 )
@@ -968,17 +961,23 @@ static void PopulateWithBSPModel( bspModel_t *model, m4x4_t transform )
                ti.castShadows = info->castShadows;
                ti.surfaceNum = model->firstBSPBrush + i;
                
-               /* setup trace winding */
-               memset( &tw, 0, sizeof( tw ) );
-               tw.infoNum = AddTraceInfo( &ti );
-               tw.numVerts = 3;
-               
                /* choose which node (normal or skybox) */
                if( info->parentSurfaceNum >= 0 )
+               {
                        nodeNum = skyboxNodeNum;
+                       
+                       /* sky surfaces in portal skies are ignored */
+                       if( info->si->compileFlags & C_SKY )
+                               continue;
+               }
                else
                        nodeNum = headNodeNum;
                
+               /* setup trace winding */
+               memset( &tw, 0, sizeof( tw ) );
+               tw.infoNum = AddTraceInfo( &ti );
+               tw.numVerts = 3;
+               
                /* switch on type */
                switch( ds->surfaceType )
                {
@@ -1436,7 +1435,7 @@ qboolean TraceTriangle( traceInfo_t *ti, traceTriangle_t *tt, trace_t *trace )
        det = DotProduct( tt->edge1, pvec );
        
        /* the non-culling branch */
-       if( det > -COPLANAR_EPSILON && det < COPLANAR_EPSILON )
+       if( fabs( det ) < COPLANAR_EPSILON )
                return qfalse;
        invDet = 1.0f / det;
        
@@ -1458,8 +1457,6 @@ qboolean TraceTriangle( traceInfo_t *ti, traceTriangle_t *tt, trace_t *trace )
        
        /* calculate t (depth) */
        depth = DotProduct( tt->edge2, qvec ) * invDet;
-       //%     if( depth <= SELF_SHADOW_EPSILON || depth >= (trace->dist - SELF_SHADOW_EPSILON) )
-       //%             return qfalse;
        if( depth <= trace->inhibitRadius || depth >= trace->distance )
                return qfalse;
        
@@ -1485,6 +1482,7 @@ qboolean TraceTriangle( traceInfo_t *ti, traceTriangle_t *tt, trace_t *trace )
        if( !(si->compileFlags & (C_ALPHASHADOW | C_LIGHTFILTER)) ||
                si->lightImage == NULL || si->lightImage->pixels == NULL )
        {
+               VectorMA( trace->origin, depth, trace->direction, trace->hit );
                VectorClear( trace->color );
                trace->opaque = qtrue;
                return qtrue;
@@ -1531,6 +1529,7 @@ qboolean TraceTriangle( traceInfo_t *ti, traceTriangle_t *tt, trace_t *trace )
        /* check filter for opaque */
        if( trace->color[ 0 ] <= 0.001f && trace->color[ 1 ] <= 0.001f && trace->color[ 2 ] <= 0.001f )
        {
+               VectorMA( trace->origin, depth, trace->direction, trace->hit );
                trace->opaque = qtrue;
                return qtrue;
        }
@@ -1596,6 +1595,7 @@ static qboolean TraceLine_r( int nodeNum, vec3_t origin, vec3_t end, trace_t *tr
        /* bogus node number means solid, end tracing unless testing all */
        if( nodeNum < 0 )
        {
+               VectorCopy( origin, trace->hit );
                trace->passSolid = qtrue;
                return qtrue;
        }
@@ -1606,6 +1606,7 @@ static qboolean TraceLine_r( int nodeNum, vec3_t origin, vec3_t end, trace_t *tr
        /* solid? */
        if( node->type == TRACE_LEAF_SOLID )
        {
+               VectorCopy( origin, trace->hit );
                trace->passSolid = qtrue;
                return qtrue;
        }
@@ -1666,6 +1667,9 @@ static qboolean TraceLine_r( int nodeNum, vec3_t origin, vec3_t end, trace_t *tr
        
        /* fixme: check inhibit radius, then solid nodes and ignore */
        
+       /* set trace hit here */
+       //%     VectorCopy( mid, trace->hit );
+       
        /* trace first side */
        r = TraceLine_r( node->children[ side ], origin, mid, trace );
        if( r )
@@ -1702,7 +1706,7 @@ void TraceLine( trace_t *trace )
        
        /* trace through nodes */
        TraceLine_r( headNodeNum, trace->origin, trace->end, trace );
-       if( (trace->passSolid && !trace->testAll) )
+       if( trace->passSolid && !trace->testAll )
        {
                trace->opaque = qtrue;
                return;
@@ -1714,6 +1718,7 @@ void TraceLine( trace_t *trace )
        
        /* testall means trace through sky */   
        if( trace->testAll && trace->numTestNodes < MAX_TRACE_TEST_NODES &&
+               trace->compileFlags & C_SKY &&
                (trace->numSurfaces == 0 || surfaceInfos[ trace->surfaces[ 0 ] ].childSurfaceNum < 0) )
        {
                //%     trace->testNodes[ trace->numTestNodes++ ] = skyboxNodeNum;
@@ -1750,5 +1755,6 @@ float SetupTrace( trace_t *trace )
 {
        VectorSubtract( trace->end, trace->origin, trace->displacement );
        trace->distance = VectorNormalize( trace->displacement, trace->direction );
+       VectorCopy( trace->origin, trace->hit );
        return trace->distance;
 }
index 6a2921563040b411a38909a476e48419a5abc590..44d60d8a202da1f2a574ee6014e68b83d3d4b6a3 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -45,7 +46,8 @@ ydnar: moved to here 2001-02-04
 
 void ColorToBytes( const float *color, byte *colorBytes, float scale )
 {
-       float   max;
+       int             i;
+       float   max, gamma;
        vec3_t  sample;
        
        
@@ -56,13 +58,20 @@ void ColorToBytes( const float *color, byte *colorBytes, float scale )
        /* make a local copy */
        VectorScale( color, scale, sample );
        
-       /* handle negative light */
-       if( sample[ 0 ] < 0.0f )
-               sample[ 0 ] = 0.0f;
-       if( sample[ 1 ] < 0.0f )
-               sample[ 1 ] = 0.0f;
-       if( sample[ 2 ] < 0.0f )
-               sample[ 2 ] = 0.0f;
+       /* muck with it */
+       gamma = 1.0f / lightmapGamma;
+       for( i = 0; i < 3; i++ )
+       {
+               /* handle negative light */
+               if( sample[ i ] < 0.0f )
+               {
+                       sample[ i ] = 0.0f;
+                       continue;
+               }
+               
+               /* gamma */
+               sample[ i ] = pow( sample[ i ] / 255.0f, gamma ) * 255.0f;
+       }
        
        /* clamp with color normalization */
        max = sample[ 0 ];
@@ -73,6 +82,9 @@ void ColorToBytes( const float *color, byte *colorBytes, float scale )
        if( max > 255.0f )
                VectorScale( sample, (255.0f / max), sample );
        
+       /* compensate for ingame overbrighting/bitshifting */
+       VectorScale( sample, (1.0f / lightmapCompensate), sample );
+       
        /* store it off */
        colorBytes[ 0 ] = sample[ 0 ];
        colorBytes[ 1 ] = sample[ 1 ];
@@ -510,8 +522,8 @@ static int MapSingleLuxel( rawLightmap_t *lm, surfaceInfo_t *info, bspDrawVert_t
        /* another retarded hack, storing nudge count in luxel[ 1 ] */
        luxel[ 1 ] = 0.0f;      
        
-       /* point in solid? */
-       if( pointCluster < 0 )
+       /* point in solid? (except in dark mode) */
+       if( pointCluster < 0 && dark == qfalse )
        {
                /* nudge the the location around */
                nudge = nudges[ 0 ];
@@ -533,8 +545,8 @@ static int MapSingleLuxel( rawLightmap_t *lm, surfaceInfo_t *info, bspDrawVert_t
                }
        }
        
-       /* as a last resort, if still in solid, try drawvert origin offset by normal */
-       if( pointCluster < 0 && si != NULL )
+       /* as a last resort, if still in solid, try drawvert origin offset by normal (except in dark mode) */
+       if( pointCluster < 0 && si != NULL && dark == qfalse )
        {
                VectorMA( dv->xyz, lightmapSampleOffset, dv->normal, nudged );
                pointCluster = ClusterForPointExtFilter( nudged, LUXEL_EPSILON, numClusters, clusters );
@@ -1244,6 +1256,310 @@ void MapRawLightmap( int rawLightmapNum )
 
 
 
+/*
+SetupDirt()
+sets up dirtmap (ambient occlusion)
+*/
+
+#define DIRT_CONE_ANGLE                                88      /* degrees */
+#define DIRT_NUM_ANGLE_STEPS           16
+#define DIRT_NUM_ELEVATION_STEPS       3
+#define        DIRT_NUM_VECTORS                        (DIRT_NUM_ANGLE_STEPS * DIRT_NUM_ELEVATION_STEPS)
+
+static vec3_t          dirtVectors[ DIRT_NUM_VECTORS ];
+static int                     numDirtVectors = 0;
+
+void SetupDirt( void )
+{
+       int             i, j;
+       float   angle, elevation, angleStep, elevationStep;
+       
+       
+       /* note it */
+       Sys_FPrintf( SYS_VRB, "--- SetupDirt ---\n" );
+       
+       /* calculate angular steps */
+       angleStep = DEG2RAD( 360.0f / DIRT_NUM_ANGLE_STEPS );
+       elevationStep = DEG2RAD( DIRT_CONE_ANGLE / DIRT_NUM_ELEVATION_STEPS );
+       
+       /* iterate angle */
+       angle = 0.0f;
+       for( i = 0, angle = 0.0f; i < DIRT_NUM_ANGLE_STEPS; i++, angle += angleStep )
+       {
+               /* iterate elevation */
+               for( j = 0, elevation = elevationStep * 0.5f; j < DIRT_NUM_ELEVATION_STEPS; j++, elevation += elevationStep )
+               {
+                       dirtVectors[ numDirtVectors ][ 0 ] = sin( elevation ) * cos( angle );
+                       dirtVectors[ numDirtVectors ][ 1 ] = sin( elevation ) * sin( angle );
+                       dirtVectors[ numDirtVectors ][ 2 ] = cos( elevation );
+                       numDirtVectors++;
+               }
+       }
+       
+       /* emit some statistics */
+       Sys_FPrintf( SYS_VRB, "%9d dirtmap vectors\n", numDirtVectors );
+}
+
+
+/*
+DirtForSample()
+calculates dirt value for a given sample
+*/
+
+float DirtForSample( trace_t *trace )
+{
+       int             i;
+       float   gatherDirt, outDirt, angle, elevation, ooDepth;
+       vec3_t  normal, worldUp, myUp, myRt, temp, direction, displacement;
+       
+       
+       /* dummy check */
+       if( !dirty )
+               return 1.0f;
+       if( trace == NULL || trace->cluster < 0 )
+               return 0.0f;
+       
+       /* setup */
+       gatherDirt = 0.0f;
+       ooDepth = 1.0f / dirtDepth;
+       VectorCopy( trace->normal, normal );
+       
+       /* check if the normal is aligned to the world-up */
+       if( normal[ 0 ] == 0.0f && normal[ 1 ] == 0.0f )
+       {
+               if( normal[ 2 ] == 1.0f )               
+               {
+                       VectorSet( myRt, 1.0f, 0.0f, 0.0f );
+                       VectorSet( myUp, 0.0f, 1.0f, 0.0f );
+               }
+               else if( normal[ 2 ] == -1.0f )
+               {
+                       VectorSet( myRt, -1.0f, 0.0f, 0.0f );
+                       VectorSet( myUp,  0.0f, 1.0f, 0.0f );
+               }
+       }
+       else
+       {
+               VectorSet( worldUp, 0.0f, 0.0f, 1.0f );
+               CrossProduct( normal, worldUp, myRt );
+               VectorNormalize( myRt, myRt );
+               CrossProduct( myRt, normal, myUp );
+               VectorNormalize( myUp, myUp );
+       }
+       
+       /* 1 = random mode, 0 (well everything else) = non-random mode */
+       if( dirtMode == 1 )
+       {
+               /* iterate */
+               for( i = 0; i < numDirtVectors; i++ )
+               {
+                       /* get random vector */
+                       angle = Random() * DEG2RAD( 360.0f );
+                       elevation = Random() * DEG2RAD( DIRT_CONE_ANGLE );
+                       temp[ 0 ] = cos( angle ) * sin( elevation );
+                       temp[ 1 ] = sin( angle ) * sin( elevation );
+                       temp[ 2 ] = cos( elevation );
+                       
+                       /* transform into tangent space */
+                       direction[ 0 ] = myRt[ 0 ] * temp[ 0 ] + myUp[ 0 ] * temp[ 1 ] + normal[ 0 ] * temp[ 2 ];
+                       direction[ 1 ] = myRt[ 1 ] * temp[ 0 ] + myUp[ 1 ] * temp[ 1 ] + normal[ 1 ] * temp[ 2 ];
+                       direction[ 2 ] = myRt[ 2 ] * temp[ 0 ] + myUp[ 2 ] * temp[ 1 ] + normal[ 2 ] * temp[ 2 ];
+                       
+                       /* set endpoint */
+                       VectorMA( trace->origin, dirtDepth, direction, trace->end );
+                       SetupTrace( trace );
+                       
+                       /* trace */
+                       TraceLine( trace );
+                       if( trace->opaque )
+                       {
+                               VectorSubtract( trace->hit, trace->origin, displacement );
+                               gatherDirt += 1.0f - ooDepth * VectorLength( displacement );
+                       }
+               }
+       }
+       else
+       {
+               /* iterate through ordered vectors */
+               for( i = 0; i < numDirtVectors; i++ )
+               {
+                       /* transform vector into tangent space */
+                       direction[ 0 ] = myRt[ 0 ] * dirtVectors[ i ][ 0 ] + myUp[ 0 ] * dirtVectors[ i ][ 1 ] + normal[ 0 ] * dirtVectors[ i ][ 2 ];
+                       direction[ 1 ] = myRt[ 1 ] * dirtVectors[ i ][ 0 ] + myUp[ 1 ] * dirtVectors[ i ][ 1 ] + normal[ 1 ] * dirtVectors[ i ][ 2 ];
+                       direction[ 2 ] = myRt[ 2 ] * dirtVectors[ i ][ 0 ] + myUp[ 2 ] * dirtVectors[ i ][ 1 ] + normal[ 2 ] * dirtVectors[ i ][ 2 ];
+                       
+                       /* set endpoint */
+                       VectorMA( trace->origin, dirtDepth, direction, trace->end );
+                       SetupTrace( trace );
+                       
+                       /* trace */
+                       TraceLine( trace );
+                       if( trace->opaque )
+                       {
+                               VectorSubtract( trace->hit, trace->origin, displacement );
+                               gatherDirt += 1.0f - ooDepth * VectorLength( displacement );
+                       }
+               }
+       }
+       
+       /* direct ray */
+       VectorMA( trace->origin, dirtDepth, normal, trace->end );
+       SetupTrace( trace );
+       
+       /* trace */
+       TraceLine( trace );
+       if( trace->opaque )
+       {
+               VectorSubtract( trace->hit, trace->origin, displacement );
+               gatherDirt += 1.0f - ooDepth * VectorLength( displacement );
+       }
+       
+       /* early out */
+       if( gatherDirt <= 0.0f )
+               return 1.0f;
+       
+       /* apply gain (does this even do much? heh) */
+       outDirt = pow( gatherDirt / (numDirtVectors + 1), dirtGain );
+       if( outDirt > 1.0f )
+               outDirt = 1.0f;
+       
+       /* apply scale */
+       outDirt *= dirtScale;
+       if( outDirt > 1.0f )
+               outDirt = 1.0f;
+       
+       /* return to sender */
+       return 1.0f - outDirt;
+}
+
+
+
+/*
+DirtyRawLightmap()
+calculates dirty fraction for each luxel
+*/
+
+void DirtyRawLightmap( int rawLightmapNum )
+{
+       int                                     i, x, y, sx, sy, *cluster;
+       float                           *origin, *normal, *dirt, *dirt2, average, samples;
+       rawLightmap_t           *lm;
+       surfaceInfo_t           *info;
+       trace_t                         trace;
+       
+       
+       /* bail if this number exceeds the number of raw lightmaps */
+       if( rawLightmapNum >= numRawLightmaps )
+               return;
+       
+       /* get lightmap */
+       lm = &rawLightmaps[ rawLightmapNum ];
+       
+       /* setup trace */
+       trace.testOcclusion = qtrue;
+       trace.forceSunlight = qfalse;
+       trace.recvShadows = lm->recvShadows;
+       trace.numSurfaces = lm->numLightSurfaces;
+       trace.surfaces = &lightSurfaces[ lm->firstLightSurface ];
+       trace.inhibitRadius = DEFAULT_INHIBIT_RADIUS;
+       trace.testAll = qfalse;
+       
+       /* twosided lighting (may or may not be a good idea for lightmapped stuff) */
+       trace.twoSided = qfalse;
+       for( i = 0; i < trace.numSurfaces; i++ )
+       {
+               /* get surface */
+               info = &surfaceInfos[ trace.surfaces[ i ] ];
+               
+               /* check twosidedness */
+               if( info->si->twoSided )
+               {
+                       trace.twoSided = qtrue;
+                       break;
+               }
+       }
+       
+       /* gather dirt */
+       for( y = 0; y < lm->sh; y++ )
+       {
+               for( x = 0; x < lm->sw; x++ )
+               {
+                       /* get luxel */
+                       cluster = SUPER_CLUSTER( x, y );
+                       origin = SUPER_ORIGIN( x, y );
+                       normal = SUPER_NORMAL( x, y );
+                       dirt = SUPER_DIRT( x, y );
+                       
+                       /* set default dirt */
+                       *dirt = 0.0f;
+                       
+                       /* only look at mapped luxels */
+                       if( *cluster < 0 )
+                               continue;
+                       
+                       /* copy to trace */
+                       trace.cluster = *cluster;
+                       VectorCopy( origin, trace.origin );
+                       VectorCopy( normal, trace.normal );
+                       
+                       /* get dirt */
+                       *dirt = DirtForSample( &trace );
+               }
+       }
+       
+       /* testing no filtering */
+       //%     return;
+       
+       /* filter dirt */
+       for( y = 0; y < lm->sh; y++ )
+       {
+               for( x = 0; x < lm->sw; x++ )
+               {
+                       /* get luxel */
+                       cluster = SUPER_CLUSTER( x, y );
+                       dirt = SUPER_DIRT( x, y );
+                       
+                       /* filter dirt by adjacency to unmapped luxels */
+                       average = *dirt;
+                       samples = 1.0f;
+                       for( sy = (y - 1); sy <= (y + 1); sy++ )
+                       {
+                               if( sy < 0 || sy >= lm->sh )
+                                       continue;
+                               
+                               for( sx = (x - 1); sx <= (x + 1); sx++ )
+                               {
+                                       if( sx < 0 || sx >= lm->sw || (sx == x && sy == y) )
+                                               continue;
+                                       
+                                       /* get neighboring luxel */
+                                       cluster = SUPER_CLUSTER( sx, sy );
+                                       dirt2 = SUPER_DIRT( sx, sy );
+                                       if( *cluster < 0 || *dirt2 <= 0.0f )
+                                               continue;
+                                       
+                                       /* add it */
+                                       average += *dirt2;
+                                       samples += 1.0f;
+                               }
+                               
+                               /* bail */
+                               if( samples <= 0.0f )
+                                       break;
+                       }
+                       
+                       /* bail */
+                       if( samples <= 0.0f )
+                               continue;
+                       
+                       /* scale dirt */
+                       *dirt = average / samples;
+               }
+       }
+}
+
+
+
 /*
 SubmapRawLuxel()
 calculates the pvs cluster, origin, normal of a sub-luxel
@@ -1335,7 +1651,7 @@ SubsampleRawLuxel_r()
 recursively subsamples a luxel until its color gradient is low enough or subsampling limit is reached
 */
 
-void SubsampleRawLuxel_r( rawLightmap_t *lm, trace_t *trace, vec3_t sampleOrigin, int x, int y, float bias, float *lightLuxel )
+static void SubsampleRawLuxel_r( rawLightmap_t *lm, trace_t *trace, vec3_t sampleOrigin, int x, int y, float bias, float *lightLuxel )
 {
        int                     b, samples, mapped, lighted;
        int                     cluster[ 4 ];
@@ -1377,7 +1693,7 @@ void SubsampleRawLuxel_r( rawLightmap_t *lm, trace_t *trace, vec3_t sampleOrigin
                VectorCopy( normal[ b ], trace->normal );
                
                /* sample light */
-               //%     LightContributionToSample( light, cluster[ b ], origin[ b ], normal[ b ], luxel[ b ], qtrue, qfalse, lm->numLightSurfaces, &lightSurfaces[ lm->firstLightSurface ] );
+
                LightContributionToSample( trace );
                
                /* add to totals (fixme: make contrast function) */
@@ -1434,6 +1750,7 @@ IlluminateRawLightmap()
 illuminates the luxels
 */
 
+#define STACK_LL_SIZE                  (SUPER_LUXEL_SIZE * 64 * 64)
 #define LIGHT_LUXEL( x, y )            (lightLuxels + ((((y) * lm->sw) + (x)) * SUPER_LUXEL_SIZE))
 
 void IlluminateRawLightmap( int rawLightmapNum )
@@ -1444,11 +1761,12 @@ void IlluminateRawLightmap( int rawLightmapNum )
        surfaceInfo_t           *info;
        qboolean                        filterColor, filterDir;
        float                           brightness;
-       float                           *origin, *normal, *luxel, *luxel2, *deluxel, *deluxel2;
+       float                           *origin, *normal, *dirt, *luxel, *luxel2, *deluxel, *deluxel2;
        float                           *lightLuxels, *lightLuxel, samples, filterRadius, weight;
        vec3_t                          color, averageColor, averageDir, total, temp, temp2;
        float                           tests[ 4 ][ 2 ] = { { 0.0f, 0 }, { 1, 0 }, { 0, 1 }, { 1, 1 } };
        trace_t                         trace;
+       float                           stackLightLuxels[ STACK_LL_SIZE ];
        
        
        /* bail if this number exceeds the number of raw lightmaps */
@@ -1488,8 +1806,11 @@ void IlluminateRawLightmap( int rawLightmapNum )
           fill pass
           ----------------------------------------------------------------- */
        
+       /* set counts */
+       numLuxelsIlluminated += (lm->sw * lm->sh);
+       
        /* test debugging state */
-       if( debugSurfaces || debugAxis || debugCluster || debugOrigin || normalmap )
+       if( debugSurfaces || debugAxis || debugCluster || debugOrigin || dirtDebug || normalmap )
        {
                /* debug fill the luxels */
                for( y = 0; y < lm->sh; y++ )
@@ -1543,8 +1864,11 @@ void IlluminateRawLightmap( int rawLightmapNum )
                                        luxel[ 2 ] = (normal[ 2 ] + 1.0f) * 127.5f;
                                }
                                
+                               /* otherwise clear it */
+                               else
+                                       VectorClear( luxel );
+                               
                                /* add to counts */
-                               numLuxelsIlluminated++;
                                luxel[ 3 ] = 1.0f;
                        }
                }
@@ -1553,7 +1877,10 @@ void IlluminateRawLightmap( int rawLightmapNum )
        {
                /* allocate temporary per-light luxel storage */
                llSize = lm->sw * lm->sh * SUPER_LUXEL_SIZE * sizeof( float );
-               lightLuxels = safe_malloc( llSize );
+               if( llSize <= (STACK_LL_SIZE * sizeof( float )) )
+                       lightLuxels = stackLightLuxels;
+               else
+                       lightLuxels = safe_malloc( llSize );
                
                /* clear luxels */
                //%     memset( lm->superLuxels[ 0 ], 0, llSize );
@@ -1751,6 +2078,29 @@ void IlluminateRawLightmap( int rawLightmapNum )
                                }
                        }
                        
+                       /* tertiary pass, apply dirt map (ambient occlusion) */
+                       if( 0 && dirty )
+                       {
+                               /* walk luxels */
+                               for( y = 0; y < lm->sh; y++ )
+                               {
+                                       for( x = 0; x < lm->sw; x++ )
+                                       {
+                                               /* get cluster  */
+                                               cluster = SUPER_CLUSTER( x, y );
+                                               if( *cluster < 0 )
+                                                       continue;
+                                               
+                                               /* get particulars */
+                                               lightLuxel = LIGHT_LUXEL( x, y );
+                                               dirt = SUPER_DIRT( x, y );
+                                               
+                                               /* scale light value */
+                                               VectorScale( lightLuxel, *dirt, lightLuxel );
+                                       }
+                               }
+                       }
+                       
                        /* allocate sampling lightmap storage */
                        if( lm->superLuxels[ lightmapNum ] == NULL )
                        {
@@ -1865,12 +2215,51 @@ void IlluminateRawLightmap( int rawLightmapNum )
                }
                
                /* free temporary luxels */
-               free( lightLuxels );
+               if( lightLuxels != stackLightLuxels )
+                       free( lightLuxels );
        }
        
        /* free light list */
        FreeTraceLights( &trace );
        
+       /*      -----------------------------------------------------------------
+               dirt pass
+               ----------------------------------------------------------------- */
+       
+       if( dirty )
+       {
+               /* walk lightmaps */
+               for( lightmapNum = 0; lightmapNum < MAX_LIGHTMAPS; lightmapNum++ )
+               {
+                       /* early out */
+                       if( lm->superLuxels[ lightmapNum ] == NULL )
+                               continue;
+                       
+                       /* apply dirt to each luxel */
+                       for( y = 0; y < lm->sh; y++ )
+                       {
+                               for( x = 0; x < lm->sw; x++ )
+                               {
+                                       /* get cluster */
+                                       cluster = SUPER_CLUSTER( x, y );
+                                       //%     if( *cluster < 0 )
+                                       //%             continue;
+                                       
+                                       /* get particulars */
+                                       luxel = SUPER_LUXEL( lightmapNum, x, y );
+                                       dirt = SUPER_DIRT( x, y );
+                                       
+                                       /* apply dirt */
+                                       VectorScale( luxel, *dirt, luxel );
+                                       
+                                       /* debugging */
+                                       if( dirtDebug )
+                                               VectorSet( luxel, *dirt * 255.0f, *dirt * 255.0f, *dirt * 255.0f );
+                               }
+                       }
+               }
+       }
+       
        /* -----------------------------------------------------------------
           filter pass
           ----------------------------------------------------------------- */
@@ -1908,7 +2297,7 @@ void IlluminateRawLightmap( int rawLightmapNum )
                                /* choose seed amount */
                                VectorClear( averageColor );
                                VectorClear( averageDir );
-                               samples = 0;
+                               samples = 0.0f;
                                
                                /* walk 3x3 matrix */
                                for( sy = (y - 1); sy <= (y + 1); sy++ )
@@ -1940,9 +2329,17 @@ void IlluminateRawLightmap( int rawLightmapNum )
                                }
                                
                                /* fall through */
-                               if( samples == 0.0f )
+                               if( samples <= 0.0f )
                                        continue;
                                
+                               /* dark lightmap seams */
+                               if( dark )
+                               {
+                                       if( lightmapNum == 0 )
+                                               VectorMA( averageColor, 2.0f, ambientColor, averageColor );
+                                       samples += 2.0f;
+                               }
+                               
                                /* average it */
                                if( filterColor )
                                {
@@ -1967,14 +2364,14 @@ IlluminateVertexes()
 light the surface vertexes
 */
 
-#define VERTEX_NUDGE   2.0f
+#define VERTEX_NUDGE   4.0f
 
 void IlluminateVertexes( int num )
 {
        int                                     i, x, y, z, x1, y1, z1, sx, sy, radius, maxRadius, *cluster;
-       int                                     lightmapNum;
-       float                           samples, *vertLuxel, *radVertLuxel, *luxel;
-       vec3_t                          origin, temp, temp2, colors[ MAX_LIGHTMAPS ];
+       int                                     lightmapNum, numAvg;
+       float                           samples, *vertLuxel, *radVertLuxel, *luxel, dirt;
+       vec3_t                          origin, temp, temp2, colors[ MAX_LIGHTMAPS ], avgColors[ MAX_LIGHTMAPS ];
        bspDrawSurface_t        *ds;
        surfaceInfo_t           *info;
        rawLightmap_t           *lm;
@@ -1982,10 +2379,6 @@ void IlluminateVertexes( int num )
        trace_t                         trace;
        
        
-       /* der... */
-       if( noVertexLighting )
-               return;
-       
        /* get surface, info, and raw lightmap */
        ds = &bspDrawSurfaces[ num ];
        info = &surfaceInfos[ num ];
@@ -1996,10 +2389,10 @@ void IlluminateVertexes( int num )
           ----------------------------------------------------------------- */
        
        /* calculate vertex lighting for surfaces without lightmaps */
-       if( lm == NULL )
+       if( lm == NULL || cpmaHack )
        {
                /* setup trace */
-               trace.testOcclusion = !noTrace;
+               trace.testOcclusion = (cpmaHack && lm != NULL) ? qfalse : !noTrace;
                trace.forceSunlight = info->si->forceSunlight;
                trace.recvShadows = info->recvShadows;
                trace.numSurfaces = 1;
@@ -2012,8 +2405,12 @@ void IlluminateVertexes( int num )
                /* make light list for this surface */
                CreateTraceLightsForSurface( num, &trace );
                
-               /* walk the surface verts */
+               /* setup */
                verts = yDrawVerts + ds->firstVert;
+               numAvg = 0;
+               memset( avgColors, 0, sizeof( avgColors ) );
+               
+               /* walk the surface verts */
                for( i = 0; i < ds->numVerts; i++ )
                {
                        /* get vertex luxel */
@@ -2046,7 +2443,7 @@ void IlluminateVertexes( int num )
                        else
                        {
                                /* clear vertex luxel */
-                               VectorCopy( ambientColor, radVertLuxel );
+                               VectorSet( radVertLuxel, -1.0f, -1.0f, -1.0f );
                                
                                /* try at initial origin */
                                trace.cluster = ClusterForPointExtFilter( verts[ i ].xyz, VERTEX_EPSILON, info->numSurfaceClusters, &surfaceClusters[ info->firstSurfaceCluster ] );
@@ -2056,18 +2453,30 @@ void IlluminateVertexes( int num )
                                        VectorCopy( verts[ i ].xyz, trace.origin );
                                        VectorCopy( verts[ i ].normal, trace.normal );
                                        
+                                       /* r7 dirt */
+                                       if( dirty )
+                                               dirt = DirtForSample( &trace );
+                                       else
+                                               dirt = 1.0f;
+
                                        /* trace */
                                        LightingAtSample( &trace, ds->vertexStyles, colors );
                                        
                                        /* store */
                                        for( lightmapNum = 0; lightmapNum < MAX_LIGHTMAPS; lightmapNum++ )
                                        {
+                                               /* r7 dirt */
+                                               VectorScale( colors[ lightmapNum ], dirt, colors[ lightmapNum ] );
+                                               
+                                               /* store */
                                                radVertLuxel = RAD_VERTEX_LUXEL( lightmapNum, ds->firstVert + i );
                                                VectorCopy( colors[ lightmapNum ], radVertLuxel );
+                                               VectorAdd( avgColors[ lightmapNum ], colors[ lightmapNum ], colors[ lightmapNum ] );
                                        }
                                }
                                
                                /* is this sample bright enough? */
+                               radVertLuxel = RAD_VERTEX_LUXEL( 0, ds->firstVert + i );
                                if( radVertLuxel[ 0 ] <= ambientColor[ 0 ] &&
                                        radVertLuxel[ 1 ] <= ambientColor[ 1 ] &&
                                        radVertLuxel[ 2 ] <= ambientColor[ 2 ] )
@@ -2102,6 +2511,10 @@ void IlluminateVertexes( int num )
                                                                /* store */
                                                                for( lightmapNum = 0; lightmapNum < MAX_LIGHTMAPS; lightmapNum++ )
                                                                {
+                                                                       /* r7 dirt */
+                                                                       VectorScale( colors[ lightmapNum ], dirt, colors[ lightmapNum ] );
+                                                                       
+                                                                       /* store */
                                                                        radVertLuxel = RAD_VERTEX_LUXEL( lightmapNum, ds->firstVert + i );
                                                                        VectorCopy( colors[ lightmapNum ], radVertLuxel );
                                                                }
@@ -2116,10 +2529,55 @@ void IlluminateVertexes( int num )
                                                }
                                        }
                                }
+                               
+                               /* add to average? */
+                               radVertLuxel = RAD_VERTEX_LUXEL( 0, ds->firstVert + i );
+                               if( radVertLuxel[ 0 ] > ambientColor[ 0 ] ||
+                                       radVertLuxel[ 1 ] > ambientColor[ 1 ] ||
+                                       radVertLuxel[ 2 ] > ambientColor[ 2 ] )
+                               {
+                                       numAvg++;
+                                       for( lightmapNum = 0; lightmapNum < MAX_LIGHTMAPS; lightmapNum++ )
+                                       {
+                                               radVertLuxel = RAD_VERTEX_LUXEL( lightmapNum, ds->firstVert + i );
+                                               VectorAdd( avgColors[ lightmapNum ], radVertLuxel, avgColors[ lightmapNum ] );
+                                       }
+                               }
                        }
                        
                        /* another happy customer */
                        numVertsIlluminated++;
+               }
+               
+               /* set average color */
+               if( numAvg > 0 )
+               {
+                       for( lightmapNum = 0; lightmapNum < MAX_LIGHTMAPS; lightmapNum++ )
+                               VectorScale( avgColors[ lightmapNum ], (1.0f / numAvg), avgColors[ lightmapNum ] );
+               }
+               else
+               {
+                       VectorCopy( ambientColor, avgColors[ 0 ] );
+               }
+               
+               /* clean up and store vertex color */
+               for( i = 0; i < ds->numVerts; i++ )
+               {
+                       /* get vertex luxel */
+                       radVertLuxel = RAD_VERTEX_LUXEL( 0, ds->firstVert + i );
+                       
+                       /* store average in occluded vertexes */
+                       if( radVertLuxel[ 0 ] < 0.0f )
+                       {
+                               for( lightmapNum = 0; lightmapNum < MAX_LIGHTMAPS; lightmapNum++ )
+                               {
+                                       radVertLuxel = RAD_VERTEX_LUXEL( lightmapNum, ds->firstVert + i );
+                                       VectorCopy( avgColors[ lightmapNum ], radVertLuxel );
+                                       
+                                       /* debug code */
+                                       //%     VectorSet( radVertLuxel, 255.0f, 0.0f, 0.0f );
+                               }
+                       }
                        
                        /* store it */
                        for( lightmapNum = 0; lightmapNum < MAX_LIGHTMAPS; lightmapNum++ )
@@ -2131,7 +2589,8 @@ void IlluminateVertexes( int num )
                                /* store */
                                if( bouncing || bounce == 0 || !bounceOnly )
                                        VectorAdd( vertLuxel, radVertLuxel, vertLuxel );
-                               ColorToBytes( vertLuxel, verts[ i ].color[ lightmapNum ], info->si->vertexScale );
+                               if( !info->si->noVertexLight )
+                                       ColorToBytes( vertLuxel, verts[ i ].color[ lightmapNum ], info->si->vertexScale );
                        }
                }
                
@@ -2241,7 +2700,8 @@ void IlluminateVertexes( int num )
                        numVertsIlluminated++;
                        
                        /* store into bytes (for vertex approximation) */
-                       ColorToBytes( vertLuxel, verts[ i ].color[ lightmapNum ], 1.0f );
+                       if( !info->si->noVertexLight )
+                               ColorToBytes( vertLuxel, verts[ i ].color[ lightmapNum ], 1.0f );
                }
        }
 }
@@ -2923,6 +3383,10 @@ void SetupEnvelopes( qboolean forGrid, qboolean fastFlag )
                /* filter into correct bucket */
                light->next = buckets[ light->style ];
                buckets[ light->style ] = light;
+               
+               /* if any styled light is present, automatically set nocollapse */
+               if( light->style != LS_NORMAL )
+                       noCollapse = qtrue;
        }
        
        /* filter back into light list */
index df1693513fbbca684d09183f4e89bb28da2b6c7a..8ae0d75addeca924a73c4b746136eed3bbb62b43 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -136,12 +137,12 @@ void ExportLightmaps( void )
        Q_mkdir( dirname );
        
        /* iterate through the lightmaps */
-       for( i = 0, lightmap = bspLightBytes; lightmap < (bspLightBytes + numBSPLightBytes); i++, lightmap += (LIGHTMAP_WIDTH * LIGHTMAP_HEIGHT * 3) )
+       for( i = 0, lightmap = bspLightBytes; lightmap < (bspLightBytes + numBSPLightBytes); i++, lightmap += (game->lightmapSize * game->lightmapSize * 3) )
        {
                /* write a tga image out */
                sprintf( filename, "%s/lightmap_%04d.tga", dirname, i );
                Sys_Printf( "Writing %s\n", filename );
-               WriteTGA24( filename, lightmap, LIGHTMAP_WIDTH, LIGHTMAP_HEIGHT, qfalse );
+               WriteTGA24( filename, lightmap, game->lightmapSize, game->lightmapSize, qfalse );
        }
 }
 
@@ -222,7 +223,7 @@ int ImportLightmapsMain( int argc, char **argv )
        Q_mkdir( dirname );
        
        /* iterate through the lightmaps */
-       for( i = 0, lightmap = bspLightBytes; lightmap < (bspLightBytes + numBSPLightBytes); i++, lightmap += (LIGHTMAP_WIDTH * LIGHTMAP_HEIGHT * 3) )
+       for( i = 0, lightmap = bspLightBytes; lightmap < (bspLightBytes + numBSPLightBytes); i++, lightmap += (game->lightmapSize * game->lightmapSize * 3) )
        {
                /* read a tga image */
                sprintf( filename, "%s/lightmap_%04d.tga", dirname, i );
@@ -237,7 +238,7 @@ int ImportLightmapsMain( int argc, char **argv )
                
                /* parse file into an image */
                pixels = NULL;
-               LoadTGABuffer( buffer, &pixels, &width, &height );
+               LoadTGABuffer( buffer, buffer + len, &pixels, &width, &height );
                free( buffer );
                
                /* sanity check it */
@@ -246,16 +247,16 @@ int ImportLightmapsMain( int argc, char **argv )
                        Sys_Printf( "WARNING: Unable to load image %s\n", filename );
                        continue;
                }
-               if( width != LIGHTMAP_WIDTH || height != LIGHTMAP_HEIGHT )
+               if( width != game->lightmapSize || height != game->lightmapSize )
                        Sys_Printf( "WARNING: Image %s is not the right size (%d, %d) != (%d, %d)\n",
-                               filename, width, height, LIGHTMAP_WIDTH, LIGHTMAP_HEIGHT );
+                               filename, width, height, game->lightmapSize, game->lightmapSize );
                
                /* copy the pixels */
                in = pixels;
-               for( y = 1; y <= LIGHTMAP_HEIGHT; y++ )
+               for( y = 1; y <= game->lightmapSize; y++ )
                {
-                       out = lightmap + ((LIGHTMAP_HEIGHT - y) * LIGHTMAP_WIDTH * 3);
-                       for( x = 0; x < LIGHTMAP_WIDTH; x++, in += 4, out += 3 )
+                       out = lightmap + ((game->lightmapSize - y) * game->lightmapSize * 3);
+                       for( x = 0; x < game->lightmapSize; x++, in += 4, out += 3 )
                                VectorCopy( in, out );
                }
                
@@ -615,7 +616,7 @@ qboolean AddSurfaceToRawLightmap( int num, rawLightmap_t *lm )
                        info->recvShadows != lm->recvShadows ||
                        info->si->lmCustomWidth != lm->customWidth ||
                        info->si->lmCustomHeight != lm->customHeight ||
-                       info->si->lmGamma != lm->gamma ||
+                       info->si->lmBrightness != lm->brightness ||
                        info->si->lmFilterRadius != lm->filterRadius ||
                        info->si->splotchFix != lm->splotchFix )
                        return qfalse;
@@ -1095,7 +1096,7 @@ void SetupSurfaceLightmaps( void )
                lm->actualSampleSize = info->sampleSize;
                lm->entityNum = info->entityNum;
                lm->recvShadows = info->recvShadows;
-               lm->gamma = info->si->lmGamma;
+               lm->brightness = info->si->lmBrightness;
                lm->filterRadius = info->si->lmFilterRadius;
                VectorCopy( info->axis, lm->axis );
                lm->plane = info->plane;        
@@ -1327,6 +1328,7 @@ CompareBSPLuxels()
 compares two surface lightmaps' bsp luxels, ignoring occluded luxels
 */
 
+#define SOLID_EPSILON          0.0625
 #define LUXEL_TOLERANCE                0.0025
 #define LUXEL_COLOR_FRAC       0.001302083     /* 1 / 3 / 256 */
 
@@ -1343,13 +1345,33 @@ static qboolean CompareBSPLuxels( rawLightmap_t *a, int aNum, rawLightmap_t *b,
                ((aNum == 0 && bNum != 0) || (aNum != 0 && bNum == 0)) )
                return qfalse;
        
-       /* compare */
-       if( a->w != b->w || a->h != b->h ||
-               a->customWidth != b->customWidth || a->customHeight != b->customHeight ||
-               a->gamma != b->gamma ||
+       /* basic tests */
+       if( a->customWidth != b->customWidth || a->customHeight != b->customHeight ||
+               a->brightness != b->brightness ||
+               a->solid[ aNum ] != b->solid[ bNum ] ||
                a->bspLuxels[ aNum ] == NULL || b->bspLuxels[ bNum ] == NULL )
                return qfalse;
        
+       /* compare solid color lightmaps */
+       if( a->solid[ aNum ] && b->solid[ bNum ] )
+       {
+               /* get deltas */
+               rd = fabs( a->solidColor[ aNum ][ 0 ] - b->solidColor[ bNum ][ 0 ] );
+               gd = fabs( a->solidColor[ aNum ][ 1 ] - b->solidColor[ bNum ][ 1 ] );
+               bd = fabs( a->solidColor[ aNum ][ 2 ] - b->solidColor[ bNum ][ 2 ] );
+               
+               /* compare color */
+               if( rd > SOLID_EPSILON || gd > SOLID_EPSILON|| bd > SOLID_EPSILON )
+                       return qfalse;
+               
+               /* okay */
+               return qtrue;
+       }
+       
+       /* compare nonsolid lightmaps */
+       if( a->w != b->w || a->h != b->h )
+               return qfalse;
+       
        /* compare luxels */
        delta = 0.0;
        total = 0.0;
@@ -1399,19 +1421,38 @@ MergeBSPLuxels()
 merges two surface lightmaps' bsp luxels, overwriting occluded luxels
 */
 
-static void MergeBSPLuxels( rawLightmap_t *a, int aNum, rawLightmap_t *b, int bNum )
+static qboolean MergeBSPLuxels( rawLightmap_t *a, int aNum, rawLightmap_t *b, int bNum )
 {
        rawLightmap_t   *lm;
        int                             x, y;
        float                   luxel[ 3 ], *aLuxel, *bLuxel;
        
        
-       /* compare */
-       if( a->w != b->w || a->h != b->h ||
-               a->customWidth != b->customWidth || a->customHeight != b->customHeight ||
-               a->gamma != b->gamma ||
+       /* basic tests */
+       if( a->customWidth != b->customWidth || a->customHeight != b->customHeight ||
+               a->brightness != b->brightness ||
+               a->solid[ aNum ] != b->solid[ bNum ] ||
                a->bspLuxels[ aNum ] == NULL || b->bspLuxels[ bNum ] == NULL )
-               return;
+               return qfalse;
+       
+       /* compare solid lightmaps */
+       if( a->solid[ aNum ] && b->solid[ bNum ] )
+       {
+               /* average */
+               VectorAdd( a->solidColor[ aNum ], b->solidColor[ bNum ], luxel );
+               VectorScale( luxel, 0.5f, luxel );
+               
+               /* copy to both */
+               VectorCopy( luxel, a->solidColor[ aNum ] );
+               VectorCopy( luxel, b->solidColor[ bNum ] );
+               
+               /* return to sender */
+               return qtrue;
+       }
+       
+       /* compare nonsolid lightmaps */
+       if( a->w != b->w || a->h != b->h )
+               return qfalse;
        
        /* merge luxels */
        for( y = 0; y < a->h; y++ )
@@ -1442,6 +1483,9 @@ static void MergeBSPLuxels( rawLightmap_t *a, int aNum, rawLightmap_t *b, int bN
                        }
                }
        }
+       
+       /* done */
+       return qtrue;
 }
 
 
@@ -1631,18 +1675,23 @@ static qboolean ApproximateLightmap( rawLightmap_t *lm )
                ds = &bspDrawSurfaces[ num ];
                info = &surfaceInfos[ num ];
                
+               /* assume not-reduced initially */
+               info->approximated = qfalse;
+               
                /* bail if lightmap doesn't match up */
                if( info->lm != lm )
                        continue;
                
-               /* assume reduced initially */
-               info->approximated = qtrue;
+               /* bail if not vertex lit */
+               if( info->si->noVertexLight )
+                       continue;
                
                /* assume that surfaces whose bounding boxes is smaller than 2x samplesize will be forced to vertex */
                if( (info->maxs[ 0 ] - info->mins[ 0 ]) <= (2.0f * info->sampleSize) &&
                        (info->maxs[ 1 ] - info->mins[ 1 ]) <= (2.0f * info->sampleSize) &&
                        (info->maxs[ 2 ] - info->mins[ 2 ]) <= (2.0f * info->sampleSize) )
                {
+                       info->approximated = qtrue;
                        numSurfsVertexForced++;
                        continue;
                }
@@ -1655,6 +1704,7 @@ static qboolean ApproximateLightmap( rawLightmap_t *lm )
                                verts = yDrawVerts + ds->firstVert;
                                
                                /* map the triangles */
+                               info->approximated = qtrue;
                                for( i = 0; i < ds->numIndexes && info->approximated; i += 3 )
                                {
                                        dv[ 0 ] = &verts[ bspDrawIndexes[ ds->firstIndex + i ] ];
@@ -1681,6 +1731,7 @@ static qboolean ApproximateLightmap( rawLightmap_t *lm )
                                verts = mesh->verts;
                                
                                /* map the mesh quads */
+                               info->approximated = qtrue;
                                for( y = 0; y < (mesh->height - 1) && info->approximated; y++ )
                                {
                                        for( x = 0; x < (mesh->width - 1) && info->approximated; x++ )
@@ -1746,6 +1797,15 @@ static qboolean TestOutLightmapStamp( rawLightmap_t *lm, int lightmapNum, outLig
        if( x < 0 || y < 0 || (x + lm->w) > olm->customWidth || (y + lm->h) > olm->customHeight )
                return qfalse;
        
+       /* solid lightmaps test a 1x1 stamp */
+       if( lm->solid[ lightmapNum ] )
+       {
+               offset = (y * olm->customWidth) + x;
+               if( olm->lightBits[ offset >> 3 ] & (1 << (offset & 7)) )
+                       return qfalse;
+               return qtrue;
+       }
+       
        /* test the stamp */
        for( sy = 0; sy < lm->h; sy++ )
        {
@@ -1783,7 +1843,7 @@ static void SetupOutLightmap( rawLightmap_t *lm, outLightmap_t *olm )
                return;
        
        /* is this a "normal" bsp-stored lightmap? */
-       if( (lm->customWidth == LIGHTMAP_WIDTH && lm->customHeight == LIGHTMAP_HEIGHT) || externalLightmaps )
+       if( (lm->customWidth == game->lightmapSize && lm->customHeight == game->lightmapSize) || externalLightmaps )
        {
                olm->lightmapNum = numBSPLightmaps;
                numBSPLightmaps++;
@@ -1838,7 +1898,7 @@ static void FindOutLightmaps( rawLightmap_t *lm )
        /* set default lightmap number (-3 = LIGHTMAP_BY_VERTEX) */
        for( lightmapNum = 0; lightmapNum < MAX_LIGHTMAPS; lightmapNum++ )
                lm->outLightmapNums[ lightmapNum ] = -3;
-               
+       
        /* can this lightmap be approximated with vertex color? */
        if( ApproximateLightmap( lm ) )
                return;
@@ -1936,8 +1996,16 @@ static void FindOutLightmaps( rawLightmap_t *lm )
                                        continue;
                                
                                /* set maxs */
-                               xMax = (olm->customWidth - lm->w) + 1;
-                               yMax = (olm->customHeight - lm->h) + 1;
+                               if( lm->solid[ lightmapNum ] )
+                               {
+                                       xMax = olm->customWidth;
+                                       yMax = olm->customHeight;
+                               }
+                               else
+                               {
+                                       xMax = (olm->customWidth - lm->w) + 1;
+                                       yMax = (olm->customHeight - lm->h) + 1;
+                               }
                                
                                /* walk the origin around the lightmap */
                                for( y = 0; y < yMax; y++ )
@@ -1994,7 +2062,7 @@ static void FindOutLightmaps( rawLightmap_t *lm )
                }
                
                /* if this is a style-using lightmap, it must be exported */
-               if( lightmapNum > 0 )
+               if( lightmapNum > 0 && game->load != LoadRBSPFile )
                        olm->extLightmapNum = 0;
                
                /* add the surface lightmap to the bsp lightmap */
@@ -2025,20 +2093,40 @@ static void FindOutLightmaps( rawLightmap_t *lm )
                        }
                }
                
+               /* set maxs */
+               if( lm->solid[ lightmapNum ] )
+               {
+                       xMax = 1;
+                       yMax = 1;
+               }
+               else
+               {
+                       xMax = lm->w;
+                       yMax = lm->h;
+               }
+               
                /* mark the bits used */
-               for( y = 0; y < lm->h; y++ )
+               for( y = 0; y < yMax; y++ )
                {
-                       for( x = 0; x < lm->w; x++ )
+                       for( x = 0; x < xMax; x++ )
                        {
                                /* get luxel */
                                luxel = BSP_LUXEL( lightmapNum, x, y );
                                deluxel = BSP_DELUXEL( x, y );
-                               if( luxel[ 0 ] < 0.0f )
+                               if( luxel[ 0 ] < 0.0f && !lm->solid[ lightmapNum ])
                                        continue;
                                
                                /* set minimum light */
-                               VectorCopy( luxel, color );
-
+                               if( lm->solid[ lightmapNum ] )
+                               {
+                                       if( debug )
+                                               VectorSet( color, 255.0f, 0.0f, 0.0f );
+                                       else
+                                               VectorCopy( lm->solidColor[ lightmapNum ], color );
+                               }
+                               else
+                                       VectorCopy( luxel, color );
+                               
                                /* styles are not affected by minlight */
                                if( lightmapNum == 0 )
                                {
@@ -2060,7 +2148,7 @@ static void FindOutLightmaps( rawLightmap_t *lm )
                                
                                /* store color */
                                pixel = olm->bspLightBytes + (((oy * olm->customWidth) + ox) * 3);
-                               ColorToBytes( color, pixel, lm->gamma );
+                               ColorToBytes( color, pixel, lm->brightness );
                                
                                /* store direction */
                                if( deluxemap )
@@ -2149,7 +2237,7 @@ void StoreSurfaceLightmaps( void )
        int                                     i, j, k, x, y, lx, ly, sx, sy, *cluster, mappedSamples;
        int                                     style, size, lightmapNum, lightmapNum2;
        float                           *normal, *luxel, *bspLuxel, *bspLuxel2, *radLuxel, samples, occludedSamples;
-       vec3_t                          sample, occludedSample, dirSample;
+       vec3_t                          sample, occludedSample, dirSample, colorMins, colorMaxs;
        float                           *deluxel, *bspDeluxel, *bspDeluxel2;
        byte                            *lb;
        int                                     numUsed, numTwins, numTwinLuxels, numStored;
@@ -2187,6 +2275,7 @@ void StoreSurfaceLightmaps( void )
        numUsed = 0;
        numTwins = 0;
        numTwinLuxels = 0;
+       numSolidLightmaps = 0;
        for( i = 0; i < numRawLightmaps; i++ )
        {
                /* get lightmap */
@@ -2336,8 +2425,11 @@ void StoreSurfaceLightmaps( void )
                                }
                        }
                        
-                       /* clean up and store into bsp luxels */
+                       /* setup */
                        lm->used = 0;
+                       ClearBounds( colorMins, colorMaxs );
+                       
+                       /* clean up and store into bsp luxels */
                        for( y = 0; y < lm->h; y++ )
                        {
                                for( x = 0; x < lm->w; x++ )
@@ -2433,6 +2525,41 @@ void StoreSurfaceLightmaps( void )
                                        VectorAdd( bspLuxel, sample, bspLuxel );
                                        if( deluxemap && lightmapNum == 0 )
                                                VectorAdd( bspDeluxel, dirSample, bspDeluxel );
+                                       
+                                       /* add color to bounds for solid checking */
+                                       if( samples > 0.0f )
+                                               AddPointToBounds( bspLuxel, colorMins, colorMaxs );
+                               }
+                       }
+                       
+                       /* set solid color */
+                       lm->solid[ lightmapNum ] = qfalse;
+                       VectorAdd( colorMins, colorMaxs, lm->solidColor[ lightmapNum ] );
+                       VectorScale( lm->solidColor[ lightmapNum ], 0.5f, lm->solidColor[ lightmapNum ] );
+                       
+                       /* nocollapse prevents solid lightmaps */
+                       if( noCollapse == qfalse )
+                       {
+                               /* check solid color */
+                               VectorSubtract( colorMaxs, colorMins, sample );
+                               if( (sample[ 0 ] <= SOLID_EPSILON && sample[ 1 ] <= SOLID_EPSILON && sample[ 2 ] <= SOLID_EPSILON) ||
+                                       (lm->w <= 2 && lm->h <= 2) )    /* small lightmaps get forced to solid color */
+                               {
+                                       /* set to solid */
+                                       VectorCopy( colorMins, lm->solidColor[ lightmapNum ] );
+                                       lm->solid[ lightmapNum ] = qtrue;
+                                       numSolidLightmaps++;
+                               }
+                               
+                               /* if all lightmaps aren't solid, then none of them are solid */
+                               if( lm->solid[ lightmapNum ] != lm->solid[ 0 ] )
+                               {
+                                       for( y = 0; y < MAX_LIGHTMAPS; y++ )
+                                       {
+                                               if( lm->solid[ y ] )
+                                                       numSolidLightmaps--;
+                                               lm->solid[ y ] = qfalse;
+                                       }
                                }
                        }
                        
@@ -2530,15 +2657,17 @@ void StoreSurfaceLightmaps( void )
                                                if( CompareBSPLuxels( lm, lightmapNum, lm2, lightmapNum2 ) )
                                                {
                                                        /* merge and set twin */
-                                                       MergeBSPLuxels( lm, lightmapNum, lm2, lightmapNum2 );
-                                                       lm2->twins[ lightmapNum2 ] = lm;
-                                                       lm2->twinNums[ lightmapNum2 ] = lightmapNum;
-                                                       numTwins++;
-                                                       numTwinLuxels += (lm->w * lm->h);
-                                                       
-                                                       /* count styled twins */
-                                                       if( lightmapNum > 0 )
-                                                               lm->numStyledTwins++;
+                                                       if( MergeBSPLuxels( lm, lightmapNum, lm2, lightmapNum2 ) )
+                                                       {
+                                                               lm2->twins[ lightmapNum2 ] = lm;
+                                                               lm2->twinNums[ lightmapNum2 ] = lightmapNum;
+                                                               numTwins++;
+                                                               numTwinLuxels += (lm->w * lm->h);
+                                                               
+                                                               /* count styled twins */
+                                                               if( lightmapNum > 0 )
+                                                                       lm->numStyledTwins++;
+                                                       }
                                                }
                                        }
                                }
@@ -2632,7 +2761,7 @@ void StoreSurfaceLightmaps( void )
        }
        else
        {
-               numBSPLightBytes = (numBSPLightmaps * LIGHTMAP_WIDTH * LIGHTMAP_HEIGHT * 3);
+               numBSPLightBytes = (numBSPLightmaps * game->lightmapSize * game->lightmapSize * 3);
                bspLightBytes = safe_malloc( numBSPLightBytes );
                memset( bspLightBytes, 0, numBSPLightBytes );
        }
@@ -2647,14 +2776,14 @@ void StoreSurfaceLightmaps( void )
                if( olm->lightmapNum >= 0 && !externalLightmaps )
                {
                        /* copy lighting data */
-                       lb = bspLightBytes + (olm->lightmapNum * LIGHTMAP_HEIGHT * LIGHTMAP_WIDTH * 3);
-                       memcpy( lb, olm->bspLightBytes, LIGHTMAP_HEIGHT * LIGHTMAP_WIDTH * 3 );
+                       lb = bspLightBytes + (olm->lightmapNum * game->lightmapSize * game->lightmapSize * 3);
+                       memcpy( lb, olm->bspLightBytes, game->lightmapSize * game->lightmapSize * 3 );
                        
                        /* copy direction data */
                        if( deluxemap )
                        {
-                               lb = bspLightBytes + ((olm->lightmapNum + 1) * LIGHTMAP_HEIGHT * LIGHTMAP_WIDTH * 3);
-                               memcpy( lb, olm->bspDirBytes, LIGHTMAP_HEIGHT * LIGHTMAP_WIDTH * 3 );
+                               lb = bspLightBytes + ((olm->lightmapNum + 1) * game->lightmapSize * game->lightmapSize * 3);
+                               memcpy( lb, olm->bspDirBytes, game->lightmapSize * game->lightmapSize * 3 );
                        }
                }
                
@@ -2787,13 +2916,21 @@ void StoreSurfaceLightmaps( void )
                                lmx = (float) lm->lightmapX[ lightmapNum ] / (float) olm->customWidth;
                                lmy = (float) lm->lightmapY[ lightmapNum ] / (float) olm->customHeight;
                                
-                               /* calc lightmap st coords and store lighting values */
+                               /* calc lightmap st coords */
                                dv = &bspDrawVerts[ ds->firstVert ];
                                ydv = &yDrawVerts[ ds->firstVert ];
                                for( j = 0; j < ds->numVerts; j++ )
                                {
-                                       dv[ j ].lightmap[ lightmapNum ][ 0 ] = lmx + (ydv[ j ].lightmap[ 0 ][ 0 ] / (superSample * olm->customWidth));
-                                       dv[ j ].lightmap[ lightmapNum ][ 1 ] = lmy + (ydv[ j ].lightmap[ 0 ][ 1 ] / (superSample * olm->customHeight));
+                                       if( lm->solid[ lightmapNum ] )
+                                       {
+                                               dv[ j ].lightmap[ lightmapNum ][ 0 ] = lmx + (0.5f / (float) olm->customWidth);
+                                               dv[ j ].lightmap[ lightmapNum ][ 1 ] = lmy + (0.5f / (float) olm->customWidth);
+                                       }
+                                       else
+                                       {
+                                               dv[ j ].lightmap[ lightmapNum ][ 0 ] = lmx + (ydv[ j ].lightmap[ 0 ][ 0 ] / (superSample * olm->customWidth));
+                                               dv[ j ].lightmap[ lightmapNum ][ 1 ] = lmy + (ydv[ j ].lightmap[ 0 ][ 1 ] / (superSample * olm->customHeight));
+                                       }
                                }
                        }
                }
@@ -2824,7 +2961,8 @@ void StoreSurfaceLightmaps( void )
                                }
                                
                                /* store to bytes */
-                               ColorToBytes( color, dv[ j ].color[ lightmapNum ], info->si->vertexScale );
+                               if( !info->si->noVertexLight )
+                                       ColorToBytes( color, dv[ j ].color[ lightmapNum ], info->si->vertexScale );
                        }
                }
                
@@ -2947,7 +3085,7 @@ void StoreSurfaceLightmaps( void )
                
                /* devise a custom shader for this surface (fixme: make this work with light styles) */
                else if( olm != NULL && lm != NULL && !externalLightmaps &&
-                       (olm->customWidth != LIGHTMAP_WIDTH || olm->customHeight != LIGHTMAP_HEIGHT) )
+                       (olm->customWidth != game->lightmapSize || olm->customHeight != game->lightmapSize) )
                {
                        /* get output lightmap */
                        olm = &outLightmaps[ lm->outLightmapNums[ 0 ] ];
@@ -2981,6 +3119,7 @@ void StoreSurfaceLightmaps( void )
        /* print stats */
        Sys_Printf( "%9d luxels used\n", numUsed );
        Sys_Printf( "%9d luxels stored (%3.2f percent efficiency)\n", numStored, efficiency * 100.0f );
+       Sys_Printf( "%9d solid surface lightmaps\n", numSolidLightmaps );
        Sys_Printf( "%9d identical surface lightmaps, using %d luxels\n", numTwins, numTwinLuxels );
        Sys_Printf( "%9d vertex forced surfaces\n", numSurfsVertexForced );
        Sys_Printf( "%9d vertex approximated surfaces\n", numSurfsVertexApproximated );
index 4da3bcf8488f2f2d2453e261bd1e2d290b1cd271..25eff79144e1bf92a712ec326ce00942270c9452 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -63,6 +64,264 @@ static void ExitQ3Map( void )
 
 
 
+/*
+MD4BlockChecksum()
+calculates an md4 checksum for a block of data
+*/
+
+static int MD4BlockChecksum( void *buffer, int length )
+{
+       MHASH   mh;
+       int             digest[ 4 ], checksum;
+       
+       
+       /* make md4 hash */
+       mh = mhash_init( MHASH_MD4 );
+       if( !mh )
+               Error( "Unable to initialize MD4 hash context" );
+       mhash( mh, buffer, length );
+       mhash_deinit( mh, digest );
+       
+       /* xor the bits and return */
+       checksum = digest[ 0 ] ^ digest[ 1 ] ^ digest[ 2 ] ^ digest[ 3 ];
+       return checksum;
+}
+
+
+
+/*
+FixAAS()
+resets an aas checksum to match the given BSP
+*/
+
+int FixAAS( int argc, char **argv )
+{
+       int                     length, checksum;
+       void            *buffer;
+       FILE            *file;
+       char            aas[ 1024 ], **ext;
+       char            *exts[] =
+                               {
+                                       ".aas",
+                                       "_b0.aas",
+                                       "_b1.aas",
+                                       NULL
+                               };
+       
+       
+       /* arg checking */
+       if( argc < 2 )
+       {
+               Sys_Printf( "Usage: q3map -fixaas [-v] <mapname>\n" );
+               return 0;
+       }
+       
+       /* do some path mangling */
+       strcpy( source, ExpandArg( argv[ argc - 1 ] ) );
+       StripExtension( source );
+       DefaultExtension( source, ".bsp" );
+       
+       /* note it */
+       Sys_Printf( "--- FixAAS ---\n" );
+       
+       /* load the bsp */
+       Sys_Printf( "Loading %s\n", source );
+       length = LoadFile( source, &buffer );
+       
+       /* create bsp checksum */
+       Sys_Printf( "Creating checksum...\n" );
+       checksum = LittleLong( MD4BlockChecksum( buffer, length ) );
+       
+       /* write checksum to aas */
+       ext = exts;
+       while( *ext )
+       {
+               /* mangle name */
+               strcpy( aas, source );
+               StripExtension( aas );
+               strcat( aas, *ext );
+               Sys_Printf( "Trying %s\n", aas );
+               ext++;
+               
+               /* fix it */
+               file = fopen( aas, "r+b" );
+               if( !file )
+                       continue;
+               if( fwrite( &checksum, 4, 1, file ) != 1 )
+                       Error( "Error writing checksum to %s", aas );
+               fclose( file );
+       }
+       
+       /* return to sender */
+       return 0;
+}
+
+
+
+/*
+AnalyzeBSP() - ydnar
+analyzes a Quake engine BSP file
+*/
+
+typedef struct abspHeader_s
+{
+       char                    ident[ 4 ];
+       int                             version;
+       
+       bspLump_t               lumps[ 1 ];     /* unknown size */
+}
+abspHeader_t;
+
+typedef struct abspLumpTest_s
+{
+       int                             radix, minCount;
+       char                    *name;
+}
+abspLumpTest_t;
+
+int AnalyzeBSP( int argc, char **argv )
+{
+       abspHeader_t                    *header;
+       int                                             size, i, version, offset, length, lumpInt, count;
+       char                                    ident[ 5 ];
+       void                                    *lump;
+       float                                   lumpFloat;
+       char                                    lumpString[ 1024 ], source[ 1024 ];
+       qboolean                                lumpSwap = qfalse;
+       abspLumpTest_t                  *lumpTest;
+       static abspLumpTest_t   lumpTests[] =
+                                                       {
+                                                               { sizeof( bspPlane_t ),                 6,              "IBSP LUMP_PLANES" },
+                                                               { sizeof( bspBrush_t ),                 1,              "IBSP LUMP_BRUSHES" },
+                                                               { 8,                                                    6,              "IBSP LUMP_BRUSHSIDES" },
+                                                               { sizeof( bspBrushSide_t ),             6,              "RBSP LUMP_BRUSHSIDES" },
+                                                               { sizeof( bspModel_t ),                 1,              "IBSP LUMP_MODELS" },
+                                                               { sizeof( bspNode_t ),                  2,              "IBSP LUMP_NODES" },
+                                                               { sizeof( bspLeaf_t ),                  1,              "IBSP LUMP_LEAFS" },
+                                                               { 104,                                                  3,              "IBSP LUMP_DRAWSURFS" },
+                                                               { 44,                                                   3,              "IBSP LUMP_DRAWVERTS" },
+                                                               { 4,                                                    6,              "IBSP LUMP_DRAWINDEXES" },
+                                                               { 128 * 128 * 3,                                1,              "IBSP LUMP_LIGHTMAPS" },
+                                                               { 256 * 256 * 3,                                1,              "IBSP LUMP_LIGHTMAPS (256 x 256)" },
+                                                               { 512 * 512 * 3,                                1,              "IBSP LUMP_LIGHTMAPS (512 x 512)" },
+                                                               { 0, 0, NULL }
+                                                       };
+       
+       
+       /* arg checking */
+       if( argc < 1 )
+       {
+               Sys_Printf( "Usage: q3map -analyze [-lumpswap] [-v] <mapname>\n" );
+               return 0;
+       }
+       
+       /* process arguments */
+       for( i = 1; i < (argc - 1); i++ )
+       {
+               /* -format map|ase|... */
+               if( !strcmp( argv[ i ],  "-lumpswap" ) )
+               {
+                       Sys_Printf( "Swapped lump structs enabled\n" );
+                       lumpSwap = qtrue;
+               }
+       }
+       
+       /* clean up map name */
+       strcpy( source, ExpandArg( argv[ i ] ) );
+       Sys_Printf( "Loading %s\n", source );
+       
+       /* load the file */
+       size = LoadFile( source, (void**) &header );
+       if( size == 0 || header == NULL )
+       {
+               Sys_Printf( "Unable to load %s.\n", source );
+               return -1;
+       }
+       
+       /* analyze ident/version */
+       memcpy( ident, header->ident, 4 );
+       ident[ 4 ] = '\0';
+       version = LittleLong( header->version );
+       
+       Sys_Printf( "Identity:      %s\n", ident );
+       Sys_Printf( "Version:       %d\n", version );
+       Sys_Printf( "---------------------------------------\n" );
+       
+       /* analyze each lump */
+       for( i = 0; i < 100; i++ )
+       {
+               /* call of duty swapped lump pairs */
+               if( lumpSwap )
+               {
+                       offset = LittleLong( header->lumps[ i ].length );
+                       length = LittleLong( header->lumps[ i ].offset );
+               }
+               
+               /* standard lump pairs */
+               else
+               {
+                       offset = LittleLong( header->lumps[ i ].offset );
+                       length = LittleLong( header->lumps[ i ].length );
+               }
+               
+               /* extract data */
+               lump = (byte*) header + offset;
+               lumpInt = LittleLong( (int) *((int*) lump) );
+               lumpFloat = LittleFloat( (float) *((float*) lump) );
+               memcpy( lumpString, (char*) lump, (length < 1024 ? length : 1024) );
+               lumpString[ 1024 ] = '\0';
+               
+               /* print basic lump info */
+               Sys_Printf( "Lump:          %d\n", i );
+               Sys_Printf( "Offset:        %d bytes\n", offset );
+               Sys_Printf( "Length:        %d bytes\n", length );
+               
+               /* only operate on valid lumps */
+               if( length > 0 )
+               {
+                       /* print data in 4 formats */
+                       Sys_Printf( "As hex:        %08X\n", lumpInt );
+                       Sys_Printf( "As int:        %d\n", lumpInt );
+                       Sys_Printf( "As float:      %f\n", lumpFloat );
+                       Sys_Printf( "As string:     %s\n", lumpString );
+                       
+                       /* guess lump type */
+                       if( lumpString[ 0 ] == '{' && lumpString[ 2 ] == '"' )
+                               Sys_Printf( "Type guess:    IBSP LUMP_ENTITIES\n" );
+                       else if( strstr( lumpString, "textures/" ) )
+                               Sys_Printf( "Type guess:    IBSP LUMP_SHADERS\n" );
+                       else
+                       {
+                               /* guess based on size/count */
+                               for( lumpTest = lumpTests; lumpTest->radix > 0; lumpTest++ )
+                               {
+                                       if( (length % lumpTest->radix) != 0 )
+                                               continue;
+                                       count = length / lumpTest->radix;
+                                       if( count < lumpTest->minCount )
+                                               continue;
+                                       Sys_Printf( "Type guess:    %s (%d x %d)\n", lumpTest->name, count, lumpTest->radix );
+                               }
+                       }
+               }
+               
+               Sys_Printf( "---------------------------------------\n" );
+               
+               /* end of file */
+               if( offset + length >= size )
+                       break;
+       }
+       
+       /* last stats */
+       Sys_Printf( "Lump count:    %d\n", i + 1 );
+       Sys_Printf( "File size:     %d bytes\n", size );
+       
+       /* return to caller */
+       return 0;
+}
+
+
+
 /*
 BSPInfo()
 emits statistics about the bsp file
@@ -250,10 +509,12 @@ int ConvertBSPMain( int argc, char **argv )
 {
        int             i;
        int             (*convertFunc)( char * );
+       game_t  *convertGame;
        
        
        /* set default */
        convertFunc = ConvertBSPToASE;
+       convertGame = NULL;
        
        /* arg checking */
        if( argc < 1 )
@@ -274,7 +535,11 @@ int ConvertBSPMain( int argc, char **argv )
                        else if( !Q_stricmp( argv[ i ], "map" ) )
                                convertFunc = ConvertBSPToMap;
                        else
-                               Sys_Printf( "Unknown conversion format \"%s\". Defaulting to ASE.\n", argv[ i ] );
+                       {
+                               convertGame = GetGame( argv[ i ] );
+                               if( convertGame == NULL )
+                                       Sys_Printf( "Unknown conversion format \"%s\". Defaulting to ASE.\n", argv[ i ] );
+                       }
                }
        }
        
@@ -295,7 +560,23 @@ int ConvertBSPMain( int argc, char **argv )
        /* parse bsp entities */
        ParseEntities();
        
-       /* convert */
+       /* bsp format convert? */
+       if( convertGame != NULL )
+       {
+               /* set global game */
+               game = convertGame;
+               
+               /* write bsp */
+               StripExtension( source );
+               DefaultExtension( source, "_c.bsp" );
+               Sys_Printf( "Writing %s\n", source );
+               WriteBSPFile( source );
+               
+               /* return to sender */
+               return 0;
+       }
+       
+       /* normal convert */
        return convertFunc( source );
 }
 
@@ -404,8 +685,16 @@ int main( int argc, char **argv )
        if( argc < 2 )
                Error( "Usage: %s [general options] [options] mapfile", argv[ 0 ] );
        
+       /* fixaas */
+       if( !strcmp( argv[ 1 ], "-fixaas" ) )
+               r = FixAAS( argc - 1, argv + 1 );
+       
+       /* analyze */
+       else if( !strcmp( argv[ 1 ], "-analyze" ) )
+               r = AnalyzeBSP( argc - 1, argv + 1 );
+       
        /* info */
-       if( !strcmp( argv[ 1 ], "-info" ) )
+       else if( !strcmp( argv[ 1 ], "-info" ) )
                r = BSPInfo( argc - 2, argv + 2 );
        
        /* vis */
index 633d327a24339a80ec167af808e8a3d2cc0adfe2..1e2f3267fd9251dbda57136f9ed887676c6083fb 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -185,6 +186,13 @@ snaps a plane to normal/distance epsilons
 
 void SnapPlane( vec3_t normal, vec_t *dist )
 {
+// SnapPlane disabled by LordHavoc because it often messes up collision
+// brushes made from triangles of embedded models, and it has little effect
+// on anything else (axial planes are usually derived from snapped points)
+/*
+  SnapPlane reenabled by namespace because of multiple reports of
+  q3map2-crashes which were triggered by this patch.
+*/
        SnapNormal( normal );
 
        if( fabs( *dist - Q_rint( *dist ) ) < distanceEpsilon )
@@ -573,7 +581,7 @@ and links it to the current entity
 
 brush_t *FinishBrush( void )
 {
-       brush_t *b;
+       brush_t         *b;
        
        
        /* create windings for sides and bounds for brush */
@@ -644,6 +652,15 @@ brush_t *FinishBrush( void )
                mapEnt->lastBrush = b;
        }
        
+       /* link colorMod volume brushes to the entity directly */
+       if( b->contentShader != NULL &&
+               b->contentShader->colorMod != NULL &&
+               b->contentShader->colorMod->type == CM_VOLUME )
+       {
+               b->nextColorModBrush = mapEnt->colorModBrushes;
+               mapEnt->colorModBrushes = b;
+       }
+       
        /* return to sender */
        return b;
 }
@@ -1062,16 +1079,24 @@ void MoveBrushesToWorld( entity_t *ent )
                        entities[ 0 ].lastBrush->next = b;
                        entities[ 0 ].lastBrush = b;
                }
-               
-               //%     b->next = entities[ 0 ].brushes;
-               //%     entities[ 0 ].brushes = b;
        }
        ent->brushes = NULL;
        
+       /* ydnar: move colormod brushes */
+       if( ent->colorModBrushes != NULL )
+       {
+               for( b = ent->colorModBrushes; b->nextColorModBrush != NULL; b = b->nextColorModBrush );
+               
+               b->nextColorModBrush = entities[ 0 ].colorModBrushes;
+               entities[ 0 ].colorModBrushes = ent->colorModBrushes;
+               
+               ent->colorModBrushes = NULL;
+       }
+       
        /* move patches */
        if( ent->patches != NULL )
        {
-               for( pm = ent->patches; pm->next; pm = pm->next );
+               for( pm = ent->patches; pm->next != NULL; pm = pm->next );
                
                pm->next = entities[ 0 ].patches;
                entities[ 0 ].patches = ent->patches;
index 9e205da78e529b2ace74d238961bcced67b784bd..288525cfcfc46210bd87c0069d93a78487e22484 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -381,7 +382,8 @@ mesh_t *SubdivideMesh( mesh_t in, float maxError, float minLength )
        float                                           len;
        mesh_t                                          out;
        
-       static bspDrawVert_t expand[MAX_EXPANDED_AXIS][MAX_EXPANDED_AXIS];
+       /* ydnar: static for os x */
+       MAC_STATIC bspDrawVert_t        expand[MAX_EXPANDED_AXIS][MAX_EXPANDED_AXIS];
        
        
        out.width = in.width;
@@ -547,7 +549,8 @@ mesh_t *SubdivideMesh2( mesh_t in, int iterations )
        bspDrawVert_t                           prev, next, mid;
        mesh_t                                          out;
        
-       static bspDrawVert_t expand[ MAX_EXPANDED_AXIS ][ MAX_EXPANDED_AXIS ];
+       /* ydnar: static for os x */
+       MAC_STATIC bspDrawVert_t        expand[ MAX_EXPANDED_AXIS ][ MAX_EXPANDED_AXIS ];
        
        
        /* initial setup */
@@ -560,7 +563,7 @@ mesh_t *SubdivideMesh2( mesh_t in, int iterations )
        }
        
        /* keep chopping */
-       for( iterations; iterations > 0; iterations-- )
+       for( ; iterations > 0; iterations-- )
        {
                /* horizontal subdivisions */
                for( j = 0; j + 2 < out.width; j += 4 )
@@ -652,7 +655,8 @@ mesh_t *RemoveLinearMeshColumnsRows( mesh_t *in ) {
        vec3_t                                          proj, dir;
        mesh_t                                          out;
        
-       static bspDrawVert_t expand[MAX_EXPANDED_AXIS][MAX_EXPANDED_AXIS];
+       /* ydnar: static for os x */
+       MAC_STATIC bspDrawVert_t        expand[MAX_EXPANDED_AXIS][MAX_EXPANDED_AXIS];
        
 
        out.width = in->width;
@@ -728,8 +732,7 @@ mesh_t *SubdivideMeshQuads( mesh_t *in, float minLength, int maxsize, int *width
        vec3_t                  dir;
        float                   length, maxLength, amount;
        mesh_t                  out;
-
-       static bspDrawVert_t expand[MAX_EXPANDED_AXIS][MAX_EXPANDED_AXIS];
+       bspDrawVert_t   expand[MAX_EXPANDED_AXIS][MAX_EXPANDED_AXIS];
 
        out.width = in->width;
        out.height = in->height;
index f303df75a7972d9d81467868b84e385823e6e518..4200368bbddb58b7df28205e3696b4d22d13a0bf 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -322,7 +323,7 @@ void InsertModel( char *name, int frame, m4x4_t transform, remap_t *remap, shade
                ds->lightmapScale = lightmapScale;
                
                /* force to meta? */
-               if( si != NULL && si->forceMeta )
+               if( (si != NULL && si->forceMeta) || (spawnFlags & 4) ) /* 3rd bit */
                        ds->type = SURFACE_FORCED_META;
                
                /* set particulars */
@@ -366,6 +367,7 @@ void InsertModel( char *name, int frame, m4x4_t transform, remap_t *remap, shade
                        }
                        
                        /* normal texture coordinates */
+                       else
                        {
                                st = PicoGetSurfaceST( surface, 0, i );
                                dv->st[ 0 ] = st[ 0 ];
@@ -393,9 +395,6 @@ void InsertModel( char *name, int frame, m4x4_t transform, remap_t *remap, shade
                /* set cel shader */
                ds->celShader = celShader;
                
-               /* finish surface */
-               FinishSurface( ds );
-               
                /* ydnar: giant hack land: generate clipping brushes for model triangles */
                if( si->clipModel || (spawnFlags & 2) ) /* 2nd bit */
                {
@@ -405,7 +404,8 @@ void InsertModel( char *name, int frame, m4x4_t transform, remap_t *remap, shade
                        
                        
                        /* temp hack */
-                       if( (si->compileFlags & C_TRANSLUCENT) || !(si->compileFlags & C_SOLID) )
+                       if( !si->clipModel &&
+                               ((si->compileFlags & C_TRANSLUCENT) || !(si->compileFlags & C_SOLID)) )
                                continue;
                        
                        /* overflow check */
index a1134db3eac47284d518c0a19a10634e996553cb..58b8ea207940edf63e281570eeecced407e05187 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index 80e3c6d3bfc392455f754c2f72721a2163df34e1..186102b0f16bb06e282435ccfd64d643b4c5bbb5 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -200,19 +201,19 @@ void CleanPath( char *path )
 
 
 /*
-SetGame() - ydnar
-sets the game based on a -game argument
-doesn't set it if the game doesn't match any known games
+GetGame() - ydnar
+gets the game_t based on a -game argument
+returns NULL if no match found
 */
 
-void SetGame( char *arg )
+game_t *GetGame( char *arg )
 {
        int     i;
        
        
        /* dummy check */
        if( arg == NULL || arg[ 0 ] == '\0' )
-               return;
+               return NULL;
        
        /* joke */
        if( !Q_stricmp( arg, "quake1" ) ||
@@ -232,9 +233,12 @@ void SetGame( char *arg )
        while( games[ i ].arg != NULL )
        {
                if( Q_stricmp( arg, games[ i ].arg ) == 0 )
-                       game = &games[ i ];
+                       return &games[ i ];
                i++;
        }
+       
+       /* no matching game */
+       return NULL;
 }
 
 
@@ -349,7 +353,9 @@ void InitPaths( int *argc, char **argv )
                        if( ++i >= *argc )
                                Error( "Out of arguments: No game specified after %s", argv[ i - 1 ] );
                        argv[ i - 1 ] = NULL;
-                       SetGame( argv[ i ] );
+                       game = GetGame( argv[ i ] );
+                       if( game == NULL )
+                               game = &games[ 0 ];
                        argv[ i ] = NULL;
                }
 
@@ -377,7 +383,7 @@ void InitPaths( int *argc, char **argv )
        /* remove processed arguments */
        for( i = 0, j = 0, k = 0; i < *argc && j < *argc; i++, j++ )
        {
-               for( j; j < *argc && argv[ j ] == NULL; j++ );
+               for( ; j < *argc && argv[ j ] == NULL; j++ );
                argv[ i ] = argv[ j ];
                if( argv[ i ] != NULL )
                        k++;
index 59ed6daf03e3ce5c27f010a3da3d6417724b8b25..02209d542bfa17a633fce97be609b24fbaeaa9e8 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index 43fcbb034554a2ab07f36ec44ce4b3487b11b49a..6f36f7582cb554000541e5b6b4579199df6d86d9 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index a1e27a0ca550e24967a9d644f289e2319357399d..e79736f54fa95c3fe214be3e8ae18a9af21db8a8 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -34,8 +35,8 @@ several games based on the Quake III Arena engine, in the form of "Q3Map2."
 
 
 /* version */
-#define Q3MAP_VERSION  "2.5.11"
-#define Q3MAP_MOTD             "A well-oiled toaster oven"
+#define Q3MAP_VERSION  "2.5.17"
+#define Q3MAP_MOTD             "Last one turns the lights off"
 
 
 
@@ -56,7 +57,7 @@ dependencies
        #include <limits.h>
 #endif
 
-#ifdef _WIN32
+#ifdef WIN32
        #include <windows.h>
 #endif
 
@@ -78,6 +79,7 @@ dependencies
 #include "inout.h"
 #include "vfs.h"
 #include "png.h"
+#include "mhash.h"
 
 #include <stdlib.h>
 
@@ -97,7 +99,7 @@ port-related hacks
 #endif
 
 #if 1
-       #ifdef _WIN32
+       #ifdef WIN32
                #define Q_stricmp                       stricmp
                #define Q_strncasecmp           strnicmp
        #else
@@ -262,7 +264,7 @@ constants
 #define RAD_LUXEL_SIZE                 3
 #define SUPER_LUXEL_SIZE               4
 #define SUPER_ORIGIN_SIZE              3
-#define SUPER_NORMAL_SIZE              3
+#define SUPER_NORMAL_SIZE              4
 #define SUPER_DELUXEL_SIZE             3
 #define BSP_DELUXEL_SIZE               3
 
@@ -271,11 +273,12 @@ constants
 #define BSP_LUXEL( s, x, y )   (lm->bspLuxels[ s ] + ((((y) * lm->w) + (x)) * BSP_LUXEL_SIZE))
 #define RAD_LUXEL( s, x, y )   (lm->radLuxels[ s ] + ((((y) * lm->w) + (x)) * RAD_LUXEL_SIZE))
 #define SUPER_LUXEL( s, x, y ) (lm->superLuxels[ s ] + ((((y) * lm->sw) + (x)) * SUPER_LUXEL_SIZE))
-#define SUPER_ORIGIN( x, y )   (lm->superOrigins + ((((y) * lm->sw) + (x)) * SUPER_ORIGIN_SIZE))
-#define SUPER_NORMAL( x, y )   (lm->superNormals + ((((y) * lm->sw) + (x)) * SUPER_NORMAL_SIZE))
-#define SUPER_CLUSTER( x, y )  (lm->superClusters + (((y) * lm->sw) + (x)))
 #define SUPER_DELUXEL( x, y )  (lm->superDeluxels + ((((y) * lm->sw) + (x)) * SUPER_DELUXEL_SIZE))
 #define BSP_DELUXEL( x, y )            (lm->bspDeluxels + ((((y) * lm->w) + (x)) * BSP_DELUXEL_SIZE))
+#define SUPER_CLUSTER( x, y )  (lm->superClusters + (((y) * lm->sw) + (x)))
+#define SUPER_ORIGIN( x, y )   (lm->superOrigins + ((((y) * lm->sw) + (x)) * SUPER_ORIGIN_SIZE))
+#define SUPER_NORMAL( x, y )   (lm->superNormals + ((((y) * lm->sw) + (x)) * SUPER_NORMAL_SIZE))
+#define SUPER_DIRT( x, y )             (lm->superNormals + ((((y) * lm->sw) + (x)) * SUPER_NORMAL_SIZE) + 3)   /* stash dirtyness in normal[ 3 ] */
 
 
 
@@ -301,7 +304,7 @@ abstracted bsp file
 #define        MAX_MAP_BRUSHES                 0x8000
 #define        MAX_MAP_ENTITIES                0x1000          //%     0x800   /* ydnar */
 #define        MAX_MAP_ENTSTRING               0x80000         //%     0x40000 /* ydnar */
-#define        MAX_MAP_SHADERS                 0x400
+#define        MAX_MAP_SHADERS                 0x800           //%     0x400   /* ydnar */
 
 #define        MAX_MAP_AREAS                   0x100           /* MAX_MAP_AREA_BYTES in q_shared must match! */
 #define        MAX_MAP_FOGS                    30                      //& 0x100       /* RBSP (32 - world fog - goggles) */
@@ -309,7 +312,7 @@ abstracted bsp file
 #define        MAX_MAP_NODES                   0x20000
 #define        MAX_MAP_BRUSHSIDES              0x100000        //%     0x20000 /* ydnar */
 #define        MAX_MAP_LEAFS                   0x20000
-#define        MAX_MAP_LEAFFACES               0x20000
+#define        MAX_MAP_LEAFFACES               0x100000        //%     0x20000 /* ydnar */
 #define        MAX_MAP_LEAFBRUSHES             0x40000
 #define        MAX_MAP_PORTALS                 0x20000
 #define        MAX_MAP_LIGHTING                0x800000
@@ -342,7 +345,7 @@ typedef void                                        (*bspFunc)( const char * );
 
 typedef struct
 {
-       int             offset, length;
+       int                     offset, length;
 }
 bspLump_t;
 
@@ -532,11 +535,18 @@ typedef struct game_s
        char                            *homeBasePath;                                  /* home sub-dir on unix */
        char                            *magic;                                                 /* magic word for figuring out base path */
        char                            *shaderPath;                                    /* shader directory */
-       qboolean                        wolfLight;                                              /* when true, lights work like wolf q3map  */
+       int                                     maxLMSurfaceVerts;                              /* default maximum meta surface verts */
+       int                                     maxSurfaceVerts;                                /* default maximum surface verts */
+       int                                     maxSurfaceIndexes;                              /* default maximum surface indexes (tris * 3) */
        qboolean                        emitFlares;                                             /* when true, emit flare surfaces */
        char                            *flareShader;                                   /* default flare shader (MUST BE SET) */
+       qboolean                        wolfLight;                                              /* when true, lights work like wolf q3map  */
+       int                                     lightmapSize;                                   /* bsp lightmap width/height */
+       float                           lightmapGamma;                                  /* default lightmap gamma */
+       float                           lightmapCompensate;                             /* default lightmap compensate value */
        char                            *bspIdent;                                              /* 4-letter bsp file prefix */
-       int                                     bspVersion;                                             /* BSP version to use */
+       int                                     bspVersion;                                             /* bsp version to use */
+       qboolean                        lumpSwap;                                               /* cod-style len/ofs order */
        bspFunc                         load, write;                                    /* load/write function pointers */
        surfaceParm_t           surfaceParms[ 128 ];                    /* surfaceparm array */
 }
@@ -558,7 +568,7 @@ typedef struct sun_s
        struct sun_s            *next;
        vec3_t                          direction, color;
        float                           photons, deviance, filterRadius;
-       int                                     numSamples;
+       int                                     numSamples, style;
 }
 sun_t;
 
@@ -601,21 +611,32 @@ typedef struct remap_s
 remap_t;
 
 
+/* wingdi.h hack, it's the same: 0 */
+#undef CM_NONE
+
 typedef enum
 {
-       AM_NONE,
-       AM_DOT_PRODUCT
+       CM_NONE,
+       CM_VOLUME,
+       CM_COLOR_SET,
+       CM_ALPHA_SET,
+       CM_COLOR_SCALE,
+       CM_ALPHA_SCALE,
+       CM_COLOR_DOT_PRODUCT,
+       CM_ALPHA_DOT_PRODUCT,
+       CM_COLOR_DOT_PRODUCT_2,
+       CM_ALPHA_DOT_PRODUCT_2
 }
-alphaModType_t;
+colorModType_t;
 
 
-typedef struct alphaMod_s
+typedef struct colorMod_s
 {
-       struct alphaMod_s       *next;
-       alphaModType_t          type;
+       struct colorMod_s       *next;
+       colorModType_t          type;
        vec_t                           data[ 16 ];
 }
-alphaMod_t;
+colorMod_t;
 
 
 typedef enum
@@ -636,10 +657,11 @@ typedef struct shaderInfo_s
        int                                     compileFlags;
        float                           value;                                                  /* light value */
        
-       char                            backShader[ MAX_QPATH ];                /* for surfaces that generate different front and back passes */
-       char                            flareShader[ MAX_QPATH ];               /* for light flares */
-       char                            cloneShader[ MAX_QPATH ];               /* ydnar: for cloning of a surface */
-       char                            damageShader[ MAX_QPATH ];              /* ydnar: sof2 damage shader name */
+       char                            *flareShader;                                   /* for light flares */
+       char                            *damageShader;                                  /* ydnar: sof2 damage shader name */
+       char                            *backShader;                                    /* for surfaces that generate different front and back passes */
+       char                            *cloneShader;                                   /* ydnar: for cloning of a surface */
+       char                            *remapShader;                                   /* ydnar: remap a shader in final stage */
 
        surfaceModel_t          *surfaceModel;                                  /* ydnar: for distribution of models */
        foliage_t                       *foliage;                                               /* ydnar/splash damage: wolf et foliage */
@@ -670,7 +692,7 @@ typedef struct shaderInfo_s
        vec3_t                          vecs[ 2 ];                                              /* ydnar: explicit texture vectors for [0,1] texture space */
        tcMod_t                         mod;                                                    /* ydnar: q3map_tcMod matrix for djbob :) */
        vec3_t                          lightmapAxis;                                   /* ydnar: explicit lightmap axis projection */
-       alphaMod_t                      *alphaMod;                                              /* ydnar: q3map_alphaMod support */
+       colorMod_t                      *colorMod;                                              /* ydnar: q3map_rgb/color/alpha/Set/Mod support */
        
        int                                     furNumLayers;                                   /* ydnar: number of fur layers */
        float                           furOffset;                                              /* ydnar: offset of each layer */
@@ -689,8 +711,8 @@ typedef struct shaderInfo_s
        qb_t                            notjunc;                                                /* don't use this surface for tjunction fixing */
        qb_t                            fogParms;                                               /* ydnar: has fogparms */
        qb_t                            noFog;                                                  /* ydnar: supress fogging */
-       
        qb_t                            clipModel;                                              /* ydnar: solid model hack */
+       qb_t                            noVertexLight;                                  /* ydnar: leave vertex color alone */
        
        byte                            styleMarker;                                    /* ydnar: light styles hack */
        
@@ -719,7 +741,7 @@ typedef struct shaderInfo_s
        
        qb_t                            lmMergable;                                             /* ydnar */
        int                                     lmCustomWidth, lmCustomHeight;  /* ydnar */
-       float                           lmGamma;                                                /* ydnar */
+       float                           lmBrightness;                                   /* ydnar */
        float                           lmFilterRadius;                                 /* ydnar: lightmap filtering/blurring radius for this shader (default: 0) */
        
        int                                     shaderWidth, shaderHeight;              /* ydnar */
@@ -784,8 +806,6 @@ typedef struct side_s
 
        qboolean                        visible;                        /* choose visble planes first */
        qboolean                        bevel;                          /* don't ever use for bsp splitting, and don't bother making windings for it */
-       qboolean                        backSide;                       /* generated side for a q3map_backShader */
-       
        qboolean                        culled;                         /* ydnar: face culling */
 }
 side_t;
@@ -813,6 +833,7 @@ indexMap_t;
 typedef struct brush_s
 {
        struct brush_s          *next;
+       struct brush_s          *nextColorModBrush;     /* ydnar: colorMod volume brushes go here */
        struct brush_s          *original;                      /* chopped up brushes will reference the originals */
        
        int                                     entityNum, brushNum;/* editor numbering */
@@ -948,8 +969,11 @@ typedef struct mapDrawSurface_s
        
        qboolean                        fur;                            /* ydnar: this is kind of a hack, but hey... */
        qboolean                        skybox;                         /* ydnar: yet another fun hack */
+       qboolean                        backSide;                       /* ydnar: q3map_backShader support */
        
        struct mapDrawSurface_s *parent;                /* ydnar: for cloned (skybox) surfaces to share lighting data */
+       struct mapDrawSurface_s *clone;                 /* ydnar: for cloned surfaces */
+       struct mapDrawSurface_s *cel;                   /* ydnar: for cloned cel surfaces */
        
        shaderInfo_t            *shaderInfo;
        shaderInfo_t            *celShader;
@@ -1032,7 +1056,7 @@ epair_t;
 typedef struct
 {
        vec3_t                          origin;
-       brush_t                         *brushes, *lastBrush;
+       brush_t                         *brushes, *lastBrush, *colorModBrushes;
        parseMesh_t                     *patches;
        int                                     mapEntityNum, firstDrawSurf;
        int                                     firstBrush, numBrushes;         /* only valid during BSP compile */
@@ -1274,6 +1298,7 @@ typedef struct
        vec3_t                          color;                  /* starts out at full color, may be reduced if transparent surfaces are crossed */
        
        /* output */
+       vec3_t                          hit;
        int                                     compileFlags;   /* for determining surface compile flags traced through */
        qboolean                        passSolid;
        qboolean                        opaque;
@@ -1335,7 +1360,7 @@ typedef struct rawLightmap_s
 {
        qboolean                                finished, splotchFix, wrap[ 2 ];
        int                                             customWidth, customHeight;
-       float                                   gamma;
+       float                                   brightness;
        float                                   filterRadius;
        
        int                                             firstLightSurface, numLightSurfaces;    /* index into lightSurfaces */
@@ -1348,6 +1373,9 @@ typedef struct rawLightmap_s
        float                                   *plane;
        int                                             w, h, sw, sh, used;
        
+       qboolean                                solid[ MAX_LIGHTMAPS ];
+       vec3_t                                  solidColor[ MAX_LIGHTMAPS ];
+       
        int                                             numStyledTwins;
        struct rawLightmap_s    *twins[ MAX_LIGHTMAPS ];
 
@@ -1409,6 +1437,7 @@ int                                                       ConvertMain( int argc, char **argv );
 
 
 /* path_init.c */
+game_t                                         *GetGame( char *arg );
 void                                           InitPaths( int *argc, char **argv );
 
 
@@ -1670,6 +1699,11 @@ void                                             ColorToBytes( const float *color, byte *colorBytes, float scale );
 void                                           SmoothNormals( void );
 
 void                                           MapRawLightmap( int num );
+
+void                                           SetupDirt();
+float                                          DirtForSample( trace_t *trace );
+void                                           DirtyRawLightmap( int num );
+
 void                                           IlluminateRawLightmap( int num );
 void                                           IlluminateVertexes( int num );
 
@@ -1705,14 +1739,14 @@ image_t                                         *ImageLoad( const char *filename );
 
 
 /* shaders.c */
-void                                           AlphaMod( alphaMod_t *am, int numVerts, bspDrawVert_t *drawVerts );
+void                                           ColorMod( colorMod_t *am, int numVerts, bspDrawVert_t *drawVerts );
 
-void                                           TcMod( tcMod_t mod, float st[ 2 ] );
-void                                           TcModIdentity( tcMod_t mod );
-void                                           TcModMultiply( tcMod_t a, tcMod_t b, tcMod_t out );
-void                                           TcModTranslate( tcMod_t mod, float s, float t );
-void                                           TcModScale( tcMod_t mod, float s, float t );
-void                                           TcModRotate( tcMod_t mod, float euler );
+void                                           TCMod( tcMod_t mod, float st[ 2 ] );
+void                                           TCModIdentity( tcMod_t mod );
+void                                           TCModMultiply( tcMod_t a, tcMod_t b, tcMod_t out );
+void                                           TCModTranslate( tcMod_t mod, float s, float t );
+void                                           TCModScale( tcMod_t mod, float s, float t );
+void                                           TCModRotate( tcMod_t mod, float euler );
 
 qboolean                                       ApplySurfaceParm( char *name, int *contentFlags, int *surfaceFlags, int *compileFlags );
 
@@ -1791,12 +1825,16 @@ Q_EXTERN game_t                         games[]
                                                        {
                                                                #include "game_quake3.h"
                                                                ,
+                                                               #include "game_tremulous.h" /*LinuxManMikeC: must be after game_quake3.h, depends on #define's set in it */
+                                                               ,
                                                                #include "game_tenebrae.h"
                                                                ,
                                                                #include "game_wolf.h"
                                                                ,
                                                                #include "game_wolfet.h"/* most be after game_wolf.h as they share defines! */
                                                                ,
+                                                               #include "game_etut.h"
+                                                               ,
                                                                #include "game_ef.h"
                                                                ,
                                                                #include "game_sof2.h"
@@ -1805,7 +1843,9 @@ Q_EXTERN game_t                           games[]
                                                                ,
                                                                #include "game_ja.h"    /* most be after game_jk2.h as they share defines! */
                                                                ,
-                                                               { NULL, NULL, NULL, NULL, NULL, qfalse, 0, 0, NULL }    /* null game */
+                                                               #include "game_qfusion.h"       /* qfusion game */
+                                                               ,
+                                                               { NULL }        /* null game */
                                                        };
 #endif
 Q_EXTERN game_t                                *game Q_ASSIGN( &games[ 0 ] );
@@ -1856,8 +1896,9 @@ Q_EXTERN qboolean                 skyFixHack Q_ASSIGN( qfalse );                  /* ydnar */
 
 Q_EXTERN int                           patchSubdivisions Q_ASSIGN( 8 );                /* ydnar: -patchmeta subdivisions */
 
-Q_EXTERN int                           maxSurfaceVerts Q_ASSIGN( 64 );                 /* ydnar */
-Q_EXTERN int                           maxSurfaceIndexes Q_ASSIGN( 1000 );             /* ydnar */
+Q_EXTERN int                           maxLMSurfaceVerts Q_ASSIGN( 64 );               /* ydnar */
+Q_EXTERN int                           maxSurfaceVerts Q_ASSIGN( 999 );                /* ydnar */
+Q_EXTERN int                           maxSurfaceIndexes Q_ASSIGN( 6000 );             /* ydnar */
 Q_EXTERN float                         npDegrees Q_ASSIGN( 0.0f );                             /* ydnar: nonplanar degrees */
 Q_EXTERN int                           bevelSnap Q_ASSIGN( 0 );                                /* ydnar: bevel plane snap */
 Q_EXTERN int                           texRange Q_ASSIGN( 0 );
@@ -2009,57 +2050,61 @@ light global variables
 ------------------------------------------------------------------------------- */
 
 /* commandline arguments */
-Q_EXTERN qboolean                      noSurfaces;
-
-Q_EXTERN qboolean                      deluxemap;
-Q_EXTERN qboolean                      debugDeluxemap;
-
+Q_EXTERN qboolean                      wolfLight Q_ASSIGN( qfalse );
 Q_EXTERN qboolean                      loMem Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      noStyles Q_ASSIGN( qfalse );
 
-Q_EXTERN qboolean                      fast;
-Q_EXTERN qboolean                      faster;
-Q_EXTERN qboolean                      fastgrid;
-Q_EXTERN qboolean                      fastbounce;
-Q_EXTERN qboolean                      cheap;
-Q_EXTERN qboolean                      cheapgrid;
-Q_EXTERN qboolean                      smooth;
-Q_EXTERN int                           bounce;
-Q_EXTERN qboolean                      bounceOnly;
-Q_EXTERN qboolean                      bouncing;
-Q_EXTERN qboolean                      bouncegrid;
-Q_EXTERN qboolean                      normalmap;
-Q_EXTERN qboolean                      trisoup;
-Q_EXTERN qboolean                      shade;
+Q_EXTERN int                           sampleSize Q_ASSIGN( DEFAULT_LIGHTMAP_SAMPLE_SIZE );
+Q_EXTERN qboolean                      noVertexLighting Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      noGridLighting Q_ASSIGN( qfalse );
+
+Q_EXTERN qboolean                      noTrace Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      noSurfaces Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      patchShadows Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      cpmaHack Q_ASSIGN( qfalse );
+
+Q_EXTERN qboolean                      deluxemap Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      debugDeluxemap Q_ASSIGN( qfalse );
+
+Q_EXTERN qboolean                      fast Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      faster Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      fastgrid Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      fastbounce Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      cheap Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      cheapgrid Q_ASSIGN( qfalse );
+Q_EXTERN int                           bounce Q_ASSIGN( 0 );
+Q_EXTERN qboolean                      bounceOnly Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      bouncing Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      bouncegrid Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      normalmap Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      trisoup Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      shade Q_ASSIGN( qfalse );
 Q_EXTERN float                         shadeAngleDegrees Q_ASSIGN( 0.0f );
 Q_EXTERN int                           superSample Q_ASSIGN( 0 );
 Q_EXTERN int                           lightSamples Q_ASSIGN( 1 );
-Q_EXTERN qboolean                      filter;
-Q_EXTERN qboolean                      sunOnly;
+Q_EXTERN qboolean                      filter Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      dark Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      sunOnly Q_ASSIGN( qfalse );
 Q_EXTERN int                           approximateTolerance Q_ASSIGN( 0 );
-Q_EXTERN qboolean                      noCollapse;
-Q_EXTERN qboolean                      debug;
-Q_EXTERN qboolean                      debugSurfaces;
-Q_EXTERN qboolean                      debugUnused;
-Q_EXTERN qboolean                      debugAxis;
-Q_EXTERN qboolean                      debugCluster;
-Q_EXTERN qboolean                      debugOrigin;
-Q_EXTERN qboolean                      exportLightmaps;
-Q_EXTERN qboolean                      externalLightmaps;
+Q_EXTERN qboolean                      noCollapse Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      exportLightmaps Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      externalLightmaps Q_ASSIGN( qfalse );
 Q_EXTERN int                           lmCustomSize Q_ASSIGN( LIGHTMAP_WIDTH );
 
-/* standard flags */
-Q_EXTERN qboolean                      noTrace;
-Q_EXTERN qboolean                      patchShadows;
-Q_EXTERN qboolean                      dump;
-Q_EXTERN qboolean                      extra;
-Q_EXTERN qboolean                      extraWide;
-Q_EXTERN qboolean                      lightmapBorder;
-
-Q_EXTERN qboolean                      noSurfaces;
-
-Q_EXTERN int                           sampleSize Q_ASSIGN( DEFAULT_LIGHTMAP_SAMPLE_SIZE );
-Q_EXTERN qboolean                      noVertexLighting Q_ASSIGN( qfalse );
-Q_EXTERN qboolean                      noGridLighting Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      dirty Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      dirtDebug Q_ASSIGN( qfalse );
+Q_EXTERN int                           dirtMode Q_ASSIGN( 0 );
+Q_EXTERN float                         dirtDepth Q_ASSIGN( 128.0f );
+Q_EXTERN float                         dirtScale Q_ASSIGN( 1.0f );
+Q_EXTERN float                         dirtGain Q_ASSIGN( 1.0f );
+
+Q_EXTERN qboolean                      dump Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      debug Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      debugUnused Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      debugAxis Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      debugCluster Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      debugOrigin Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      lightmapBorder Q_ASSIGN( qfalse );
 
 /* longest distance across the map */
 Q_EXTERN float                         maxMapDistance Q_ASSIGN( 0 );
@@ -2070,13 +2115,14 @@ Q_EXTERN float                          areaScale Q_ASSIGN( 0.25f );
 Q_EXTERN float                         skyScale Q_ASSIGN( 1.0f );
 Q_EXTERN float                         bounceScale Q_ASSIGN( 0.25f );
 
+/* ydnar: lightmap gamma/compensation */
+Q_EXTERN float                         lightmapGamma Q_ASSIGN( 1.0f );
+Q_EXTERN float                         lightmapCompensate Q_ASSIGN( 1.0f );
+
 /* ydnar: for runtime tweaking of falloff tolerance */
 Q_EXTERN float                         falloffTolerance Q_ASSIGN( 1.0f );
-
 Q_EXTERN qboolean                      exactPointToPolygon Q_ASSIGN( qtrue );
-
 Q_EXTERN float                         formFactorValueScale Q_ASSIGN( 3.0f );
-
 Q_EXTERN float                         linearScale Q_ASSIGN( 1.0f / 8000.0f );
 
 Q_EXTERN light_t                       *lights;
@@ -2169,6 +2215,7 @@ Q_EXTERN float                            *radVertexLuxels[ MAX_LIGHTMAPS ];
 
 /* bsp lightmaps */
 Q_EXTERN int                           numLightmapShaders Q_ASSIGN( 0 );
+Q_EXTERN int                           numSolidLightmaps Q_ASSIGN( 0 );
 Q_EXTERN int                           numOutLightmaps Q_ASSIGN( 0 );
 Q_EXTERN int                           numBSPLightmaps Q_ASSIGN( 0 );
 Q_EXTERN int                           numExtLightmaps Q_ASSIGN( 0 );
index a3a45dae12b721f9ea024efa23ada3ad96af87b5..31e947e67256b9cca11b97f425a744ac8874382c 100644 (file)
@@ -40,7 +40,7 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\tools\quake3\common&quot;;&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\mhash-0.9\lib&quot;;&quot;$(SolutionDir)\tools\quake3\common&quot;;&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
                                PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="3"
@@ -61,8 +61,8 @@
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="md5lib.lib ddslib.lib l_net.lib mathlib.lib picomodel.lib libxml2.lib libpng.lib glib-2.0.lib gobject-2.0.lib Wsock32.lib libjpeg.lib"
-                               AdditionalLibraryDirectories="&quot;$(SolutionDir)\..\libxml2\lib&quot;;&quot;$(SolutionDir)\..\gtk2\lib&quot;;&quot;$(SolutionDir)\build\$(ConfigurationName)\libs&quot;;&quot;$(SolutionDir)\..\jpeg-6b&quot;"
+                               AdditionalDependencies="ddslib.lib l_net.lib mathlib.lib picomodel.lib libxml2.lib libpng.lib glib-2.0.lib gobject-2.0.lib Wsock32.lib libjpeg.lib libmhash.lib"
+                               AdditionalLibraryDirectories="&quot;$(SolutionDir)\..\mhash-0.9\win32\libmhash\Debug&quot;;&quot;$(SolutionDir)\..\libxml2\lib&quot;;&quot;$(SolutionDir)\..\gtk2\lib&quot;;&quot;$(SolutionDir)\build\$(ConfigurationName)\libs&quot;;&quot;$(SolutionDir)\..\jpeg-6b&quot;"
                                IgnoreAllDefaultLibraries="false"
                                IgnoreDefaultLibraryNames=""
                                GenerateDebugInformation="true"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\tools\quake3\common&quot;;&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\mhash-0.9\lib&quot;;&quot;$(SolutionDir)\tools\quake3\common&quot;;&quot;$(SolutionDir)\include&quot;;&quot;$(SolutionDir)\libs&quot;;&quot;$(SolutionDir)\..\STLPort\stlport&quot;;&quot;$(SolutionDir)\..\gtk2\include&quot;;&quot;$(SolutionDir)\..\gtk2\include\glib-2.0&quot;;&quot;$(SolutionDir)\..\gtk2\lib\glib-2.0\include&quot;;&quot;$(SolutionDir)\..\libxml2\include&quot;"
                                PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
                                RuntimeLibrary="2"
                                WarningLevel="3"
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="md5lib.lib ddslib.lib l_net.lib mathlib.lib picomodel.lib libxml2.lib libpng.lib glib-2.0.lib gobject-2.0.lib Wsock32.lib libjpeg.lib"
-                               AdditionalLibraryDirectories="&quot;$(SolutionDir)\..\libxml2\lib&quot;;&quot;$(SolutionDir)\..\gtk2\lib&quot;;&quot;$(SolutionDir)\build\$(ConfigurationName)\libs&quot;;&quot;$(SolutionDir)\..\jpeg-6b&quot;"
+                               AdditionalDependencies="ddslib.lib l_net.lib mathlib.lib picomodel.lib libxml2.lib libpng.lib glib-2.0.lib gobject-2.0.lib Wsock32.lib libjpeg.lib libmhash.lib"
+                               AdditionalLibraryDirectories="&quot;$(SolutionDir)\..\mhash-0.9\lib&quot;;&quot;$(SolutionDir)\..\libxml2\lib&quot;;&quot;$(SolutionDir)\..\gtk2\lib&quot;;&quot;$(SolutionDir)\build\$(ConfigurationName)\libs&quot;;&quot;$(SolutionDir)\..\jpeg-6b&quot;"
                                GenerateDebugInformation="true"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
index a0988938374f91075b58fcfc4c002798178257a4..476894f2d06cf741dd15ba76c8a189c3eea9e221 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -38,20 +39,21 @@ several games based on the Quake III Arena engine, in the form of "Q3Map2."
 
 
 /*
-AlphaMod()
-routines for dealing with vertex alpha modification
+ColorMod()
+routines for dealing with vertex color/alpha modification
 */
 
-void AlphaMod( alphaMod_t *am, int numVerts, bspDrawVert_t *drawVerts )
+void ColorMod( colorMod_t *cm, int numVerts, bspDrawVert_t *drawVerts )
 {
-       int                             i, j;
-       float                   mult, add, a;
+       int                             i, j, k;
+       float                   c;
+       vec4_t                  mult, add;
        bspDrawVert_t   *dv;
-       alphaMod_t              *am2;
+       colorMod_t              *cm2;
        
        
        /* dummy check */
-       if( am == NULL || numVerts < 1 || drawVerts == NULL )
+       if( cm == NULL || numVerts < 1 || drawVerts == NULL )
                return;
        
        
@@ -61,32 +63,72 @@ void AlphaMod( alphaMod_t *am, int numVerts, bspDrawVert_t *drawVerts )
                /* get vertex */
                dv = &drawVerts[ i ];
                
-               /* walk alphamod list */
-               for( am2 = am; am2 != NULL; am2 = am2->next )
+               /* walk colorMod list */
+               for( cm2 = cm; cm2 != NULL; cm2 = cm2->next )
                {
+                       /* default */
+                       VectorSet( mult, 1.0f, 1.0f, 1.0f );
+                       mult[ 3 ] = 1.0f;
+                       VectorSet( add, 0.0f, 0.0f, 0.0f );
+                       mult[ 3 ] = 0.0f;
+                       
                        /* switch on type */
-                       switch( am->type )
+                       switch( cm2->type )
                        {
-                               case AM_DOT_PRODUCT:
-                                       mult = DotProduct( dv->normal, am2->data );
-                                       add = 0.0f;
+                               case CM_COLOR_SET:
+                                       VectorClear( mult );
+                                       VectorScale( cm2->data, 255.0f, add );
+                                       break;
+                               
+                               case CM_ALPHA_SET:
+                                       mult[ 3 ] = 0.0f;
+                                       add[ 3 ] = cm2->data[ 0 ] * 255.0f;
+                                       break;
+                               
+                               case CM_COLOR_SCALE:
+                                       VectorCopy( cm2->data, mult );
+                                       break;
+                               
+                               case CM_ALPHA_SCALE:
+                                       mult[ 3 ] = cm2->data[ 0 ];
+                                       break;
+                               
+                               case CM_COLOR_DOT_PRODUCT:
+                                       c = DotProduct( dv->normal, cm2->data );
+                                       VectorSet( mult, c, c, c );
+                                       break;
+                               
+                               case CM_ALPHA_DOT_PRODUCT:
+                                       mult[ 3 ] = DotProduct( dv->normal, cm2->data );
+                                       break;
+                               
+                               case CM_COLOR_DOT_PRODUCT_2:
+                                       c = DotProduct( dv->normal, cm2->data );
+                                       c *= c;
+                                       VectorSet( mult, c, c, c );
+                                       break;
+                               
+                               case CM_ALPHA_DOT_PRODUCT_2:
+                                       mult[ 3 ] = DotProduct( dv->normal, cm2->data );
+                                       mult[ 3 ] *= mult[ 3 ];
                                        break;
                                
                                default:
-                                       mult = 1.0f;
-                                       add = 0.0f;
                                        break;
                        }
                        
                        /* apply mod */
                        for( j = 0; j < MAX_LIGHTMAPS; j++ )
                        {
-                               a = (mult * dv->color[ j ][ 3 ]) + add;
-                               if( a < 0 )
-                                       a = 0;
-                               else if( a > 255 )
-                                       a = 255;
-                               dv->color[ j ][ 3 ] = a;
+                               for( k = 0; k < 4; k++ )
+                               {
+                                       c = (mult[ k ] * dv->color[ j ][ k ]) + add[ k ];
+                                       if( c < 0 )
+                                               c = 0;
+                                       else if( c > 255 )
+                                               c = 255;
+                                       dv->color[ j ][ k ] = c;
+                               }
                        }
                }
        }
@@ -95,11 +137,11 @@ void AlphaMod( alphaMod_t *am, int numVerts, bspDrawVert_t *drawVerts )
 
 
 /*
-TcMod*()
+TCMod*()
 routines for dealing with a 3x3 texture mod matrix
 */
 
-void TcMod( tcMod_t mod, float st[ 2 ] )
+void TCMod( tcMod_t mod, float st[ 2 ] )
 {
        float   old[ 2 ];
        
@@ -111,7 +153,7 @@ void TcMod( tcMod_t mod, float st[ 2 ] )
 }
 
 
-void TcModIdentity( tcMod_t mod )
+void TCModIdentity( tcMod_t mod )
 {
        mod[ 0 ][ 0 ] = 1.0f;   mod[ 0 ][ 1 ] = 0.0f;   mod[ 0 ][ 2 ] = 0.0f;
        mod[ 1 ][ 0 ] = 0.0f;   mod[ 1 ][ 1 ] = 1.0f;   mod[ 1 ][ 2 ] = 0.0f;
@@ -119,7 +161,7 @@ void TcModIdentity( tcMod_t mod )
 }
 
 
-void TcModMultiply( tcMod_t a, tcMod_t b, tcMod_t out )
+void TCModMultiply( tcMod_t a, tcMod_t b, tcMod_t out )
 {
        int             i;
        
@@ -133,28 +175,28 @@ void TcModMultiply( tcMod_t a, tcMod_t b, tcMod_t out )
 }
 
 
-void TcModTranslate( tcMod_t mod, float s, float t )
+void TCModTranslate( tcMod_t mod, float s, float t )
 {
        mod[ 0 ][ 2 ] += s;
        mod[ 1 ][ 2 ] += t;
 }
 
 
-void TcModScale( tcMod_t mod, float s, float t )
+void TCModScale( tcMod_t mod, float s, float t )
 {
        mod[ 0 ][ 0 ] *= s;
        mod[ 1 ][ 1 ] *= t;
 }
 
 
-void TcModRotate( tcMod_t mod, float euler )
+void TCModRotate( tcMod_t mod, float euler )
 {
        tcMod_t old, temp;
        float   radians, sinv, cosv;
        
        
        memcpy( old, mod, sizeof( tcMod_t ) );
-       TcModIdentity( temp );
+       TCModIdentity( temp );
 
        radians = euler / 180 * Q_PI;
        sinv = sin( radians );
@@ -163,7 +205,7 @@ void TcModRotate( tcMod_t mod, float euler )
        temp[ 0 ][ 0 ] = cosv;  temp[ 0 ][ 1 ] = -sinv;
        temp[ 1 ][ 0 ] = sinv;  temp[ 1 ][ 1 ] = cosv;
        
-       TcModMultiply( old, temp, mod );
+       TCModMultiply( old, temp, mod );
 }
 
 
@@ -365,7 +407,7 @@ shaderInfo_t *CustomShader( shaderInfo_t *si, char *find, char *replace )
        char                    shader[ MAX_QPATH ];
        char                    *s;
        int                             loc;
-       md5_state_t             md5;
+       MHASH                   mh;
        byte                    digest[ 16 ];
        char                    *srcShaderText, temp[ 8192 ], shaderText[ 8192 ];       /* ydnar: fixme (make this bigger?) */
        
@@ -487,9 +529,11 @@ shaderInfo_t *CustomShader( shaderInfo_t *si, char *find, char *replace )
        }
        
        /* make md5 hash of the shader text */
-       md5_init( &md5 );
-       md5_append( &md5, shaderText, strlen( shaderText ) );
-       md5_finish( &md5, digest );
+       mh = mhash_init( MHASH_MD5 );
+       if( !mh )
+               Error( "Unable to initialize MD5 hash context" );
+       mhash( mh, shaderText, strlen( shaderText ) );
+       mhash_deinit( mh, digest );
        
        /* mangle hash into a shader name */
        sprintf( shader, "%s/%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", mapName,
@@ -525,7 +569,7 @@ adds a vertexremapshader key/value pair to worldspawn
 
 void EmitVertexRemapShader( char *from, char *to )
 {
-       md5_state_t             md5;
+       MHASH                   mh;
        byte                    digest[ 16 ];
        char                    key[ 64 ], value[ 256 ];
        
@@ -539,9 +583,11 @@ void EmitVertexRemapShader( char *from, char *to )
        sprintf( value, "%s;%s", from, to );
        
        /* make md5 hash */
-       md5_init( &md5 );
-       md5_append( &md5, value, strlen( value ) );
-       md5_finish( &md5, digest );
+       mh = mhash_init( MHASH_MD5 );
+       if( !mh )
+               Error( "Unable to initialize MD5 hash context" );
+       mhash( mh, value, strlen( value ) );
+       mhash_deinit( mh, digest );
 
        /* make key (this is annoying, as vertexremapshader is precisely 17 characters,
           which is one too long, so we leave off the last byte of the md5 digest) */
@@ -603,11 +649,11 @@ static shaderInfo_t       *AllocShaderInfo( void )
        si->notjunc = qfalse;
        
        /* ydnar: set texture coordinate transform matrix to identity */
-       TcModIdentity( si->mod );
+       TCModIdentity( si->mod );
        
-       /* ydnar: lightmaps can now be > 128x128 in an externally generated tga */
-       si->lmCustomWidth = lmCustomSize;       //%     LIGHTMAP_WIDTH;
-       si->lmCustomHeight = lmCustomSize;      //%     LIGHTMAP_HEIGHT;
+       /* ydnar: lightmaps can now be > 128x128 in certain games or an externally generated tga */
+       si->lmCustomWidth = lmCustomSize;
+       si->lmCustomHeight = lmCustomSize;
        
        /* return to sender */
        return si;
@@ -783,7 +829,7 @@ shaderInfo_t *ShaderInfoForShader( const char *shaderName )
                if( !Q_stricmp( shader, si->shader ) )
                {
                        /* load image if necessary */
-                       if( si->shaderImage == NULL )
+                       if( si->finished == qfalse )
                        {
                                LoadShaderImages( si );
                                FinishShader( si );
@@ -1078,17 +1124,21 @@ static void ParseShaderFile( const char *filename )
                        else if( !Q_stricmp( token, "light" ) )
                        {
                                GetTokenAppend( shaderText, qfalse );
-                               strcpy( si->flareShader, "flareshader" );
+                               si->flareShader = game->flareShader;
                        }
                        
                        /* ydnar: damageShader <shader> <health> (sof2 mods) */
                        else if( !Q_stricmp( token, "damageShader" ) )
                        {
                                GetTokenAppend( shaderText, qfalse );
-                               strcpy( si->damageShader, token );
+                               if( token[ 0 ] != '\0' )
+                               {
+                                       si->damageShader = safe_malloc( strlen( token ) + 1 );
+                                       strcpy( si->damageShader, token );
+                               }
                                GetTokenAppend( shaderText, qfalse );   /* don't do anything with health */
                        }
-
+                       
                        /* ydnar: enemy territory implicit shaders */
                        else if( !Q_stricmp( token, "implicitMap" ) )
                        {
@@ -1194,6 +1244,9 @@ static void ParseShaderFile( const char *filename )
                                sun = safe_malloc( sizeof( *sun ) );
                                memset( sun, 0, sizeof( *sun ) );
                                
+                               /* set style */
+                               sun->style = si->lightStyle;
+                               
                                /* get color */
                                GetTokenAppend( shaderText, qfalse );
                                sun->color[ 0 ] = atof( token );
@@ -1276,6 +1329,8 @@ static void ParseShaderFile( const char *filename )
                                                
                                                /* restore name and set to unfinished */
                                                strcpy( si->shader, temp );
+                                               si->shaderWidth = 0;
+                                               si->shaderHeight = 0;
                                                si->finished = qfalse;
                                        }
                                }
@@ -1348,8 +1403,8 @@ static void ParseShaderFile( const char *filename )
                                        si->bounceScale = atof( token );
                                }
 
-                               /* ydnar/splashdamage: q3map_skylight <value> <iterations> */
-                               else if( !Q_stricmp( token, "q3map_skylight" )  )
+                               /* ydnar/splashdamage: q3map_skyLight <value> <iterations> */
+                               else if( !Q_stricmp( token, "q3map_skyLight" )  )
                                {
                                        GetTokenAppend( shaderText, qfalse );
                                        si->skyLightValue = atof( token );
@@ -1370,7 +1425,6 @@ static void ParseShaderFile( const char *filename )
                                        si->value = atof( token );
                                }
                                
-                               
                                /* q3map_lightStyle (sof2/jk2 lightstyle) */
                                else if( !Q_stricmp( token, "q3map_lightStyle" ) )
                                {
@@ -1466,18 +1520,18 @@ static void ParseShaderFile( const char *filename )
                                        {
                                                Sys_Printf( "WARNING: Non power-of-two lightmap size specified (%d, %d)\n",
                                                         si->lmCustomWidth, si->lmCustomHeight );
-                                               si->lmCustomWidth = LIGHTMAP_WIDTH;
-                                               si->lmCustomHeight = LIGHTMAP_HEIGHT;
+                                               si->lmCustomWidth = lmCustomSize;
+                                               si->lmCustomHeight = lmCustomSize;
                                        }
                                }
 
-                               /* ydnar: q3map_lightmapGamma N (for autogenerated shaders + external tga lightmaps) */
-                               else if( !Q_stricmp( token, "q3map_lightmapGamma" ) )
+                               /* ydnar: q3map_lightmapBrightness N (for autogenerated shaders + external tga lightmaps) */
+                               else if( !Q_stricmp( token, "q3map_lightmapBrightness" ) || !Q_stricmp( token, "q3map_lightmapGamma" ) )
                                {
                                        GetTokenAppend( shaderText, qfalse );
-                                       si->lmGamma = atof( token );
-                                       if( si->lmGamma < 0 )
-                                               si->lmGamma = 1.0;
+                                       si->lmBrightness = atof( token );
+                                       if( si->lmBrightness < 0 )
+                                               si->lmBrightness = 1.0;
                                }
                                
                                /* q3map_vertexScale (scale vertex lighting by this fraction) */
@@ -1487,32 +1541,61 @@ static void ParseShaderFile( const char *filename )
                                        si->vertexScale = atof( token );
                                }
                                
-                               /* q3map_flare <shader> */
+                               /* q3map_noVertexLight */
+                               else if( !Q_stricmp( token, "q3map_noVertexLight" )  )
+                               {
+                                       si->noVertexLight = qtrue;
+                               }
+                               
+                               /* q3map_flare[Shader] <shader> */
                                else if( !Q_stricmp( token, "q3map_flare" ) || !Q_stricmp( token, "q3map_flareShader" ) )
                                {
                                        GetTokenAppend( shaderText, qfalse );
-                                       strcpy( si->flareShader, token );
+                                       if( token[ 0 ] != '\0' )
+                                       {
+                                               si->flareShader = safe_malloc( strlen( token ) + 1 );
+                                               strcpy( si->flareShader, token );
+                                       }
                                }
                                
                                /* q3map_backShader <shader> */
                                else if( !Q_stricmp( token, "q3map_backShader" ) )
                                {
                                        GetTokenAppend( shaderText, qfalse );
-                                       strcpy( si->backShader, token );
+                                       if( token[ 0 ] != '\0' )
+                                       {
+                                               si->backShader = safe_malloc( strlen( token ) + 1 );
+                                               strcpy( si->backShader, token );
+                                       }
                                }
                                
-                               /* ydnar: q3map_offset <value> */
-                               else if( !Q_stricmp( token, "q3map_offset" ) )
+                               /* ydnar: q3map_cloneShader <shader> */
+                               else if ( !Q_stricmp( token, "q3map_cloneShader" ) )
                                {
                                        GetTokenAppend( shaderText, qfalse );
-                                       si->offset = atof( token );
+                                       if( token[ 0 ] != '\0' )
+                                       {
+                                               si->cloneShader = safe_malloc( strlen( token ) + 1 );
+                                               strcpy( si->cloneShader, token );
+                                       }
                                }
                                
-                               /* ydnar: q3map_cloneShader <shader> */
-                               else if ( !Q_stricmp( token, "q3map_cloneShader" ) )
+                               /* q3map_remapShader <shader> */
+                               else if( !Q_stricmp( token, "q3map_remapShader" ) )
+                               {
+                                       GetTokenAppend( shaderText, qfalse );
+                                       if( token[ 0 ] != '\0' )
+                                       {
+                                               si->remapShader = safe_malloc( strlen( token ) + 1 );
+                                               strcpy( si->remapShader, token );
+                                       }
+                               }
+                               
+                               /* ydnar: q3map_offset <value> */
+                               else if( !Q_stricmp( token, "q3map_offset" ) )
                                {
                                        GetTokenAppend( shaderText, qfalse );
-                                       strcpy( si->cloneShader, token );
+                                       si->offset = atof( token );
                                }
                                
                                /* ydnar: q3map_textureSize <width> <height> (substitute for q3map_lightimage derivation for terrain) */
@@ -1595,26 +1678,32 @@ static void ParseShaderFile( const char *filename )
                                        }
                                }
                                
-                               /* ydnar: gs mods: q3map_alphaMod <style> <parameters> */
-                               else if( !Q_stricmp( token, "q3map_alphaMod" ) )
+                               /* ydnar: gs mods: q3map_[color|rgb|alpha][Gen|Mod] <style> <parameters> */
+                               else if( !Q_stricmp( token, "q3map_colorGen" ) || !Q_stricmp( token, "q3map_colorMod" ) ||
+                                       !Q_stricmp( token, "q3map_rgbGen" ) || !Q_stricmp( token, "q3map_rgbMod" ) ||
+                                       !Q_stricmp( token, "q3map_alphaGen" ) || !Q_stricmp( token, "q3map_alphaMod" ) )
                                {
-                                       alphaMod_t      *am, *am2;
+                                       colorMod_t      *cm, *cm2;
+                                       int                     alpha;
+                                       
                                        
+                                       /* alphamods are colormod + 1 */
+                                       alpha = (!Q_stricmp( token, "q3map_alphaGen" ) || !Q_stricmp( token, "q3map_alphaMod" )) ? 1 : 0;
                                        
-                                       /* allocate new alpha mod */
-                                       am = safe_malloc( sizeof( *am ) );
-                                       memset( am, 0, sizeof( *am ) );
+                                       /* allocate new colormod */
+                                       cm = safe_malloc( sizeof( *cm ) );
+                                       memset( cm, 0, sizeof( *cm ) );
                                        
                                        /* attach to shader */
-                                       if( si->alphaMod == NULL )
-                                               si->alphaMod = am;
+                                       if( si->colorMod == NULL )
+                                               si->colorMod = cm;
                                        else
                                        {
-                                               for( am2 = si->alphaMod; am2 != NULL; am2 = am2->next )
+                                               for( cm2 = si->colorMod; cm2 != NULL; cm2 = cm2->next )
                                                {
-                                                       if( am2->next == NULL )
+                                                       if( cm2->next == NULL )
                                                        {
-                                                               am2->next = am;
+                                                               cm2->next = cm;
                                                                break;
                                                        }
                                                }
@@ -1623,14 +1712,60 @@ static void ParseShaderFile( const char *filename )
                                        /* get type */
                                        GetTokenAppend( shaderText, qfalse );
                                        
-                                       /* q3map_alphaMod dotproduct ( X Y Z ) */
-                                       if( !Q_stricmp( token, "dotproduct" ) )
+                                       /* alpha set|const A */
+                                       if( alpha && (!Q_stricmp( token, "set" ) || !Q_stricmp( token, "const" )) )
+                                       {
+                                               cm->type = CM_ALPHA_SET;
+                                               GetTokenAppend( shaderText, qfalse );
+                                               cm->data[ 0 ] = atof( token );
+                                       }
+                                       
+                                       /* color|rgb set|const ( X Y Z ) */
+                                       else if( !Q_stricmp( token, "set" ) || !Q_stricmp( token, "const" ) )
                                        {
-                                               am->type = AM_DOT_PRODUCT;
-                                               Parse1DMatrixAppend( shaderText, 3, am->data );
+                                               cm->type = CM_COLOR_SET;
+                                               Parse1DMatrixAppend( shaderText, 3, cm->data );
                                        }
+                                       
+                                       /* alpha scale A */
+                                       else if( alpha && !Q_stricmp( token, "scale" ) )
+                                       {
+                                               cm->type = CM_ALPHA_SCALE;
+                                               GetTokenAppend( shaderText, qfalse );
+                                               cm->data[ 0 ] = atof( token );
+                                       }
+                                       
+                                       /* color|rgb scale ( X Y Z ) */
+                                       else if( !Q_stricmp( token, "scale" ) )
+                                       {
+                                               cm->type = CM_COLOR_SCALE;
+                                               Parse1DMatrixAppend( shaderText, 3, cm->data );
+                                       }
+                                       
+                                       /* dotProduct ( X Y Z ) */
+                                       else if( !Q_stricmp( token, "dotProduct" ) )
+                                       {
+                                               cm->type = CM_COLOR_DOT_PRODUCT + alpha;
+                                               Parse1DMatrixAppend( shaderText, 3, cm->data );
+                                       }
+                                       
+                                       /* dotProduct2 ( X Y Z ) */
+                                       else if( !Q_stricmp( token, "dotProduct2" ) )
+                                       {
+                                               cm->type = CM_COLOR_DOT_PRODUCT_2 + alpha;
+                                               Parse1DMatrixAppend( shaderText, 3, cm->data );
+                                       }
+                                       
+                                       /* volume */
+                                       else if( !Q_stricmp( token, "volume" ) )
+                                       {
+                                               /* special stub mode for flagging volume brushes */
+                                               cm->type = CM_VOLUME;
+                                       }
+                                       
+                                       /* unknown */
                                        else
-                                               Sys_Printf( "WARNING: Unknown q3map_alphaMod method: %s\n", token );
+                                               Sys_Printf( "WARNING: Unknown colorMod method: %s\n", token );
                                }
                                
                                /* ydnar: gs mods: q3map_tcMod <style> <parameters> */
@@ -1649,7 +1784,7 @@ static void ParseShaderFile( const char *filename )
                                                GetTokenAppend( shaderText, qfalse );
                                                b = atof( token );
                                                
-                                               TcModTranslate( si->mod, a, b );
+                                               TCModTranslate( si->mod, a, b );
                                        }
 
                                        /* q3map_tcMod scale <s> <t> */
@@ -1660,7 +1795,7 @@ static void ParseShaderFile( const char *filename )
                                                GetTokenAppend( shaderText, qfalse );
                                                b = atof( token );
                                                
-                                               TcModScale( si->mod, a, b );
+                                               TCModScale( si->mod, a, b );
                                        }
                                        
                                        /* q3map_tcMod rotate <s> <t> (fixme: make this communitive) */
@@ -1668,7 +1803,7 @@ static void ParseShaderFile( const char *filename )
                                        {
                                                GetTokenAppend( shaderText, qfalse );
                                                a = atof( token );
-                                               TcModRotate( si->mod, a );
+                                               TCModRotate( si->mod, a );
                                        }
                                        else
                                                Sys_Printf( "WARNING: Unknown q3map_tcMod method: %s\n", token );
index 79649c89d58d915155bea343a610bfd7df6ea5e4..5415ae105d8f89e65f935b386bb5bc3fd8780626 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -37,12 +38,6 @@ several games based on the Quake III Arena engine, in the form of "Q3Map2."
 
 
 
-/*
-
-this section handles drawsurface allocation and creation
-
-*/
-
 /*
 AllocDrawSurface()
 ydnar: gs mods: changed to force an explicit type when allocating
@@ -83,17 +78,31 @@ ydnar: general surface finish pass
 
 void FinishSurface( mapDrawSurface_t *ds )
 {
+       mapDrawSurface_t        *ds2;
+       
+       
        /* dummy check */
-       if( ds == NULL || ds->shaderInfo == NULL )
+       if( ds->type <= SURFACE_BAD || ds->type >= NUM_SURFACE_TYPES || ds == NULL || ds->shaderInfo == NULL )
                return;
        
        /* ydnar: rocking tek-fu celshading */
        if( ds->celShader != NULL )
                MakeCelSurface( ds, ds->celShader );
        
+       /* backsides stop here */
+       if( ds->backSide )
+               return;
+       
        /* ydnar: rocking surface cloning (fur baby yeah!) */
-       if( ds->shaderInfo->cloneShader[ 0 ] != '\0' )
+       if( ds->shaderInfo->cloneShader != NULL && ds->shaderInfo->cloneShader[ 0 ] != '\0' )
                CloneSurface( ds, ShaderInfoForShader( ds->shaderInfo->cloneShader ) );
+       
+       /* ydnar: q3map_backShader support */
+       if( ds->shaderInfo->backShader != NULL && ds->shaderInfo->backShader[ 0 ] != '\0' )
+       {
+               ds2 = CloneSurface( ds, ShaderInfoForShader( ds->shaderInfo->backShader ) );
+               ds2->backSide = qtrue;
+       }
 }
 
 
@@ -295,7 +304,7 @@ void TidyEntitySurfaces( entity_t *e )
                out = &mapDrawSurfs[ i ];
                
                /* walk the surface list again until a proper surface is found */
-               for( j; j < numMapDrawSurfs; j++ )
+               for( ; j < numMapDrawSurfs; j++ )
                {
                        /* get in surface */
                        in = &mapDrawSurfs[ j ];
@@ -475,7 +484,7 @@ void ClassifySurfaces( int numSurfs, mapDrawSurface_t *ds )
        
        
        /* walk the list of surfaces */
-       for( numSurfs; numSurfs > 0; numSurfs--, ds++ )
+       for( ; numSurfs > 0; numSurfs--, ds++ )
        {
                /* ignore bogus (or flare) surfaces */
                if( ds->type == SURFACE_BAD || ds->numVerts <= 0 )
@@ -654,7 +663,10 @@ void ClassifyEntitySurfaces( entity_t *e )
        
        /* walk the surface list */
        for( i = e->firstDrawSurf; i < numMapDrawSurfs; i++ )
+       {
+               FinishSurface( &mapDrawSurfs[ i ] );
                ClassifySurfaces( 1, &mapDrawSurfs[ i ] );
+       }
        
        /* tidy things up */
        TidyEntitySurfaces( e );
@@ -975,9 +987,6 @@ mapDrawSurface_t *DrawSurfaceForSide( entity_t *e, brush_t *b, side_t *s, windin
        /* set cel shader */
        ds->celShader = b->celShader;
        
-       /* finish surface */
-       FinishSurface( ds );
-       
        /* ydnar: gs mods: moved st biasing elsewhere */
        return ds;
 }
@@ -1173,9 +1182,6 @@ mapDrawSurface_t *DrawSurfaceForMesh( entity_t *e, parseMesh_t *p, mesh_t *mesh
        /* set cel shader */
        ds->celShader = p->celShader;
        
-       /* finish surface */
-       FinishSurface( ds );
-       
        /* return the drawsurface */
        return ds;
 }
@@ -1295,7 +1301,7 @@ SubdivideFace()
 subdivides a face surface until it is smaller than the specified size (subdivisions)
 */
 
-static void SubdivideFace( entity_t *e, brush_t *brush, side_t *side, winding_t *w, int fogNum, float subdivisions )
+static void SubdivideFace_r( entity_t *e, brush_t *brush, side_t *side, winding_t *w, int fogNum, float subdivisions )
 {
        int                                     i;
        int                                     axis;
@@ -1310,7 +1316,7 @@ static void SubdivideFace( entity_t *e, brush_t *brush, side_t *side, winding_t
        if( w == NULL )
                return;
        if( w->numpoints < 3 )
-               Error( "SubdivideFaceSurface: Bad w->numpoints" );
+               Error( "SubdivideFace_r: Bad w->numpoints (%d < 3)", w->numpoints );
        
        /* determine surface bounds */
        ClearBounds( bounds[ 0 ], bounds[ 1 ] );
@@ -1345,8 +1351,8 @@ static void SubdivideFace( entity_t *e, brush_t *brush, side_t *side, winding_t
                                w = frontWinding;
                        else
                        {
-                               SubdivideFace( e, brush, side, frontWinding, fogNum, subdivisions );
-                               SubdivideFace( e, brush, side, backWinding, fogNum, subdivisions );
+                               SubdivideFace_r( e, brush, side, frontWinding, fogNum, subdivisions );
+                               SubdivideFace_r( e, brush, side, backWinding, fogNum, subdivisions );
                                return;
                        }
                }
@@ -1444,7 +1450,7 @@ void SubdivideFaceSurfaces( entity_t *e, tree_t *tree )
                ClearSurface( ds );
                
                /* subdivide it */
-               SubdivideFace( e, brush, side, w, fogNum, subdivisions );
+               SubdivideFace_r( e, brush, side, w, fogNum, subdivisions );
        }
 }
 
@@ -2454,7 +2460,7 @@ void EmitPatchSurface( mapDrawSurface_t *ds )
        
        
        /* invert the surface if necessary */
-       if( ds->shaderInfo->invert )
+       if( ds->backSide || ds->shaderInfo->invert )
        {
                bspDrawVert_t   *dv1, *dv2, temp;
                
@@ -2674,7 +2680,7 @@ static void EmitTriangleSurface( mapDrawSurface_t *ds )
        
        
        /* invert the surface if necessary */
-       if( ds->shaderInfo->invert )
+       if( ds->backSide || ds->shaderInfo->invert )
        {
                /* walk the indexes, reverse the triangle order */
                for( i = 0; i < ds->numIndexes; i += 3 )
@@ -2706,7 +2712,11 @@ static void EmitTriangleSurface( mapDrawSurface_t *ds )
        
        /* ydnar: gs mods: handle lightmapped terrain (force to planar type) */
        //%     else if( VectorLength( ds->lightmapAxis ) <= 0.0f || ds->type == SURFACE_TRIANGLES || ds->type == SURFACE_FOGHULL || debugSurfaces )
-       else if( (VectorLength( ds->lightmapAxis ) <= 0.0f && ds->planar == qfalse) || ds->type == SURFACE_TRIANGLES || ds->type == SURFACE_FOGHULL || debugSurfaces )
+       else if( (VectorLength( ds->lightmapAxis ) <= 0.0f && ds->planar == qfalse) ||
+               ds->type == SURFACE_TRIANGLES ||
+               ds->type == SURFACE_FOGHULL ||
+               ds->numVerts > maxLMSurfaceVerts ||
+               debugSurfaces )
                out->surfaceType = MST_TRIANGLE_SOUP;
        
        /* set to a planar face */
@@ -3329,6 +3339,58 @@ void AddEntitySurfaceModels( entity_t *e )
 
 
 
+/*
+VolumeColorMods() - ydnar
+applies brush/volumetric color/alpha modulation to vertexes
+*/
+
+static void VolumeColorMods( entity_t *e, mapDrawSurface_t *ds )
+{
+       int                     i, j;
+       float           d;
+       brush_t         *b;
+       plane_t         *plane;
+       
+       
+       /* early out */
+       if( e->colorModBrushes == NULL )
+               return;
+       
+       /* iterate brushes */
+       for( b = e->colorModBrushes; b != NULL; b = b->nextColorModBrush )
+       {
+               /* worldspawn alpha brushes affect all, grouped ones only affect original entity */
+               if( b->entityNum != 0 && b->entityNum != ds->entityNum )
+                       continue;
+               
+               /* test bbox */
+               if( b->mins[ 0 ] > ds->maxs[ 0 ] || b->maxs[ 0 ] < ds->mins[ 0 ] ||
+                       b->mins[ 1 ] > ds->maxs[ 1 ] || b->maxs[ 1 ] < ds->mins[ 1 ] ||
+                       b->mins[ 2 ] > ds->maxs[ 2 ] || b->maxs[ 2 ] < ds->mins[ 2 ] )
+                       continue;
+               
+               /* iterate verts */
+               for( i = 0; i < ds->numVerts; i++ )
+               {
+                       /* iterate planes */
+                       for( j = 0; j < b->numsides; j++ )
+                       {
+                               /* point-plane test */
+                               plane = &mapplanes[ b->sides[ j ].planenum ];
+                               d = DotProduct( ds->verts[ i ].xyz, plane->normal ) - plane->dist;
+                               if( d > 1.0f )
+                                       break;
+                       }
+                       
+                       /* apply colormods */
+                       if( j == b->numsides )
+                               ColorMod( b->contentShader->colorMod, 1, &ds->verts[ i ] );
+               }
+       }
+}
+
+
+
 /*
 FilterDrawsurfsIntoTree()
 upon completion, all drawsurfs that actually generate a reference
@@ -3374,12 +3436,15 @@ void FilterDrawsurfsIntoTree( entity_t *e, tree_t *tree )
                        /* refs initially zero */
                        refs = 0;
                        
-                       /* ydnar: apply alphamod */
-                       AlphaMod( ds->shaderInfo->alphaMod, ds->numVerts, ds->verts );
-                       
                        /* apply texture coordinate mods */
                        for( j = 0; j < ds->numVerts; j++ )
-                               TcMod( si->mod, ds->verts[ j ].st );
+                               TCMod( si->mod, ds->verts[ j ].st );
+                       
+                       /* ydnar: apply shader colormod */
+                       ColorMod( ds->shaderInfo->colorMod, ds->numVerts, ds->verts );
+                       
+                       /* ydnar: apply brush colormod */
+                       VolumeColorMods( e, ds );
                        
                        /* ydnar: make fur surfaces */
                        if( si->furNumLayers > 0 )
@@ -3390,7 +3455,7 @@ void FilterDrawsurfsIntoTree( entity_t *e, tree_t *tree )
                                Foliage( ds );
                        
                        /* create a flare surface if necessary */
-                       if( si->flareShader[ 0 ] )
+                       if( si->flareShader != NULL && si->flareShader[ 0 ] )
                                AddSurfaceFlare( ds, e->origin );
                        
                        /* ydnar: don't emit nodraw surfaces (like nodraw fog) */
@@ -3416,6 +3481,10 @@ void FilterDrawsurfsIntoTree( entity_t *e, tree_t *tree )
                        }
                }
                
+               /* ydnar: remap shader */
+               if( ds->shaderInfo->remapShader && ds->shaderInfo->remapShader[ 0 ] )
+                       ds->shaderInfo = ShaderInfoForShader( ds->shaderInfo->remapShader );
+               
                /* ydnar: gs mods: handle the various types of surfaces */
                switch( ds->type )
                {
index ffb8ad9e61eb747f082cbae4b731a405484c5a9f..440fd94694b217209405962b74d87290debf79c7 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index e7d5fe8b80f17bed6052d46358e85d56c57cb39f..e9a8ec71f91f4466b88712b32b40a958f0c704b8 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index 7af5e0dc0e1fd9d3e0e7ff9cef6855db7a2c6738..8d7ebad496b099fab8f6c9eccd3659166b2dc55a 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index f0c3d0a02eb625b9b8cba840d5f89f637853d78c..9191ac146ed8ca47d76dea44716a4316134754fd 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -1159,7 +1160,7 @@ int AddMetaVertToSurface( mapDrawSurface_t *ds, bspDrawVert_t *dv1, int *coincid
        }
 
        /* overflow check */
-       if( ds->numVerts >= maxSurfaceVerts )
+       if( ds->numVerts >= ((ds->shaderInfo->compileFlags & C_VERTEXLIT) ? maxSurfaceVerts : maxLMSurfaceVerts) )
                return VERTS_EXCEEDED;
        
        /* made it this far, add the vert and return */
@@ -1265,6 +1266,8 @@ static int AddMetaTriangleToSurface( mapDrawSurface_t *ds, metaTriangle_t *tri,
                (VectorCompare( ds->mins, mins ) == qfalse || VectorCompare( ds->maxs, maxs ) == qfalse) )
        {
                /* set maximum size before lightmap scaling (normally 2032 units) */
+               /* 2004-02-24: scale lightmap test size by 2 to catch larger brush faces */
+               /* 2004-04-11: reverting to actual lightmap size */
                lmMax = (ds->sampleSize * (ds->shaderInfo->lmCustomWidth - 1));
                for( i = 0; i < 3; i++ )
                {
@@ -1458,6 +1461,10 @@ static void MetaTrianglesToSurface( int numPossibles, metaTriangle_t *possibles,
                        /* walk the list of possible candidates for merging */
                        for( j = i + 1, test = &possibles[ j ]; j < numPossibles; j++, test++ )
                        {
+                               /* skip this triangle if it has already been merged */
+                               if( test->si == NULL )
+                                       continue;
+                               
                                /* score this triangle */
                                score = AddMetaTriangleToSurface( ds, test, qtrue );
                                if( score > bestScore )
@@ -1533,33 +1540,55 @@ static int CompareMetaTriangles( const void *a, const void *b )
        else if( ((metaTriangle_t*) a)->fogNum > ((metaTriangle_t*) b)->fogNum )
                return -1;
        
-       /* then position in world */
-       else
-       {
-               /* find mins */
-               VectorSet( aMins, 999999, 999999, 999999 );
-               VectorSet( bMins, 999999, 999999, 999999 );
-               for( i = 0; i < 3; i++ )
-               {
-                       av = ((metaTriangle_t*) a)->indexes[ i ];
-                       bv = ((metaTriangle_t*) b)->indexes[ i ];
-                       for( j = 0; j < 3; j++ )
-                       {
-                               if( metaVerts[ av ].xyz[ j ] < aMins[ j ] )
-                                       aMins[ j ] = metaVerts[ av ].xyz[ j ];
-                               if( metaVerts[ bv ].xyz[ j ] < bMins[ j ] )
-                                       bMins[ j ] = metaVerts[ bv ].xyz[ j ];
-                       }
-               }
-               
-               /* test it */
-               for( i = 0; i < 3; i++ )
+       /* then plane */
+       #if 0
+               else if( npDegrees == 0.0f && ((metaTriangle_t*) a)->si->nonplanar == qfalse &&
+                       ((metaTriangle_t*) a)->planeNum >= 0 && ((metaTriangle_t*) a)->planeNum >= 0 )
                {
-                       if( aMins[ i ] < bMins[ i ] )
+                       if( ((metaTriangle_t*) a)->plane[ 3 ] < ((metaTriangle_t*) b)->plane[ 3 ] )
+                               return 1;
+                       else if( ((metaTriangle_t*) a)->plane[ 3 ] > ((metaTriangle_t*) b)->plane[ 3 ] )
+                               return -1;
+                       else if( ((metaTriangle_t*) a)->plane[ 0 ] < ((metaTriangle_t*) b)->plane[ 0 ] )
+                               return 1;
+                       else if( ((metaTriangle_t*) a)->plane[ 0 ] > ((metaTriangle_t*) b)->plane[ 0 ] )
+                               return -1;
+                       else if( ((metaTriangle_t*) a)->plane[ 1 ] < ((metaTriangle_t*) b)->plane[ 1 ] )
+                               return 1;
+                       else if( ((metaTriangle_t*) a)->plane[ 1 ] > ((metaTriangle_t*) b)->plane[ 1 ] )
+                               return -1;
+                       else if( ((metaTriangle_t*) a)->plane[ 2 ] < ((metaTriangle_t*) b)->plane[ 2 ] )
                                return 1;
-                       else if( aMins[ i ] > bMins[ i ] )
+                       else if( ((metaTriangle_t*) a)->plane[ 2 ] > ((metaTriangle_t*) b)->plane[ 2 ] )
                                return -1;
                }
+       #endif
+       
+       /* then position in world */
+       
+       /* find mins */
+       VectorSet( aMins, 999999, 999999, 999999 );
+       VectorSet( bMins, 999999, 999999, 999999 );
+       for( i = 0; i < 3; i++ )
+       {
+               av = ((metaTriangle_t*) a)->indexes[ i ];
+               bv = ((metaTriangle_t*) b)->indexes[ i ];
+               for( j = 0; j < 3; j++ )
+               {
+                       if( metaVerts[ av ].xyz[ j ] < aMins[ j ] )
+                               aMins[ j ] = metaVerts[ av ].xyz[ j ];
+                       if( metaVerts[ bv ].xyz[ j ] < bMins[ j ] )
+                               bMins[ j ] = metaVerts[ bv ].xyz[ j ];
+               }
+       }
+       
+       /* test it */
+       for( i = 0; i < 3; i++ )
+       {
+               if( aMins[ i ] < bMins[ i ] )
+                       return 1;
+               else if( aMins[ i ] > bMins[ i ] )
+                       return -1;
        }
        
        /* functionally equivalent */
@@ -1595,18 +1624,25 @@ void MergeMetaTriangles( void )
        numAdded = 0;
        
        /* merge */
-       for( i = 0; i < numMetaTriangles; i = j )
+       for( i = 0, j = 0; i < numMetaTriangles; i = j )
        {
                /* get head of list */
                head = &metaTriangles[ i ];
                
+               /* skip this triangle if it has already been merged */
+               if( head->si == NULL )
+                       continue;
+               
                /* find end */
-               for( j = i + 1; j < numMetaTriangles; j++ )
+               if( j <= i )
                {
-                       /* get end of list */
-                       end = &metaTriangles[ j ];
-                       if( head->si != end->si || head->fogNum != end->fogNum )
-                               break;
+                       for( j = i + 1; j < numMetaTriangles; j++ )
+                       {
+                               /* get end of list */
+                               end = &metaTriangles[ j ];
+                               if( head->si != end->si || head->fogNum != end->fogNum )
+                                       break;
+                       }
                }
                
                /* try to merge this list of possible merge candidates */
index 46390dd0662daac127fb825a1e37c91d504717b2..220e9fd660c9d3622b81d63b2b124cb02de44d16 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index 6ed8c49f7d877417b6095a86682b6ecc42e77c99..45f759db36b76ab991028f6a51d979b415df62b6 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
index 464b23ecde6a3b3582820a387d27de152e7f8110..4ee843a0b96800a08c89f28b36fb124f7149a430 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -65,7 +66,7 @@ fixedWinding_t *NewFixedWinding( int points )
        if (points > MAX_POINTS_ON_WINDING)
                Error ("NewWinding: %i points", points);
        
-       size = (int)((fixedWinding_t *)0)->points[points];
+       size = (int)((size_t)((fixedWinding_t *)0)->points[points]);
        w = safe_malloc (size);
        memset (w, 0, size);
        
@@ -870,7 +871,7 @@ void LoadPortals (char *name)
        Sys_Printf ("%6i portalclusters\n", portalclusters);
        Sys_Printf ("%6i numportals\n", numportals);
        Sys_Printf ("%6i numfaces\n", numfaces);
-
+       
        // these counts should take advantage of 64 bit systems automatically
        leafbytes = ((portalclusters+63)&~63)>>3;
        leaflongs = leafbytes/sizeof(long);
@@ -1094,6 +1095,13 @@ int VisMain (int argc, char **argv)
        Sys_Printf( "Loading %s\n", portalfile );
        LoadPortals( portalfile );
        
+       /* ydnar: exit if no portals, hence no vis */
+       if( numportals == 0 )
+       {
+               Sys_Printf( "No portals means no vis, exiting.\n" );
+               return 0;
+       }
+       
        /* ydnar: for getting far plane */
        ParseEntities();
        
index 880ab70dcec32f6fcad3b4dd5eea0c9abd9c2218..c3bdfdda92dff86fb172cb11a0e563fda0502374 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -1400,7 +1401,7 @@ void CreatePassages(int portalnum)
                        /* ydnar: prefer correctness to stack overflow  */
                        //% memcpy( &in, p->winding, (int)((fixedWinding_t *)0)->points[p->winding->numpoints] );
                        if( p->winding->numpoints <= MAX_POINTS_ON_FIXED_WINDING )
-                               memcpy( &in, p->winding, (int) &(((fixedWinding_t*) 0)->points[ p->winding->numpoints ]) );
+                               memcpy( &in, p->winding, (size_t) &(((fixedWinding_t*) 0)->points[ p->winding->numpoints ]) );
                        else
                                memcpy( &in, p->winding, sizeof( fixedWinding_t ) );
                        
index 7fb51d83630e85baa920a8836f4f1107abfb2796..591ccdc7d0c6911e1e218b7a53c56ccfd686e221 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -84,7 +85,7 @@ int   EmitShader( const char *shader, int *contentFlags, int *surfaceFlags )
                bspShaders[ i ].contentFlags = *contentFlags;
        
        /* recursively emit any damage shaders */
-       if( si->damageShader[ 0 ] != '\0' )
+       if( si->damageShader != NULL && si->damageShader[ 0 ] != '\0' )
        {
                Sys_FPrintf( SYS_VRB, "Shader %s has damage shader %s\n", si->shader, si->damageShader );
                EmitShader( si->damageShader, NULL, NULL );
@@ -135,7 +136,6 @@ void EmitLeaf( node_t *node )
        bspLeaf_t               *leaf_p;
        brush_t                 *b;
        drawSurfRef_t   *dsr;
-       int                             i = 0;
 
        
        /* check limits */
@@ -157,7 +157,7 @@ void EmitLeaf( node_t *node )
        for( b = node->brushlist; b; b = b->next )
        {
                /* something is corrupting brushes */
-               if( (int) b < 256 )
+               if( (size_t) b < 256 )
                {
                        Sys_Printf( "WARNING: Node brush list corrupted (0x%08X)\n", b );
                        break;
@@ -459,10 +459,6 @@ void EmitBrushes( brush_t *brushes, int *firstBrush, int *numBrushes )
                        /* set output number to bogus initially */
                        b->sides[ j ].outputNum = -1;
                        
-                       /* don't emit generated backSide sides */
-                       if ( b->sides[ j ].backSide )
-                               continue;
-                       
                        /* check count */
                        if( numBSPBrushSides == MAX_MAP_BRUSHSIDES )
                                Error( "MAX_MAP_BRUSHSIDES ");