mirror of
https://github.com/UberGames/GtkRadiant.git
synced 2024-11-10 06:31:41 +00:00
ported over the 1.5 branch version of q3map2 which is newer
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
This commit is contained in:
parent
995f6a1011
commit
88cea027e6
126 changed files with 6908 additions and 3792 deletions
|
@ -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() ]
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,89 +1,248 @@
|
|||
<?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=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\gtk2\lib\gtk-2.0\include";"$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include";"$(SolutionDir)\..\gtk2\include\gtk-2.0";"$(SolutionDir)\..\gtk2\include\cairo";"$(SolutionDir)\..\gtk2\include\pango-1.0";"$(SolutionDir)\..\gtk2\include\atk-1.0";"$(SolutionDir)\..\gtk2\include\gtkglext-1.0";"$(SolutionDir)\..\libxml2\include"" 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=""$(SolutionDir)\..\libxml2\lib";"$(SolutionDir)\..\gtk2\lib";"$(SolutionDir)\build\$(ConfigurationName)\libs"" 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=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\gtk2\lib\gtk-2.0\include";"$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include";"$(SolutionDir)\..\gtk2\include\gtk-2.0";"$(SolutionDir)\..\gtk2\include\cairo";"$(SolutionDir)\..\gtk2\include\pango-1.0";"$(SolutionDir)\..\gtk2\include\atk-1.0";"$(SolutionDir)\..\gtk2\include\gtkglext-1.0";"$(SolutionDir)\..\libxml2\include"" 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=""$(SolutionDir)\..\libxml2\lib";"$(SolutionDir)\..\gtk2\lib";"$(SolutionDir)\build\$(ConfigurationName)\libs"" 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>
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="camera"
|
||||
ProjectGUID="{A43B5811-4BCC-483A-BDAC-F5721DCF9B4A}"
|
||||
RootNamespace="camera"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)\install\modules"
|
||||
IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\gtk2\lib\gtk-2.0\include";"$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include";"$(SolutionDir)\..\gtk2\include\gtk-2.0";"$(SolutionDir)\..\gtk2\include\cairo";"$(SolutionDir)\..\gtk2\include\pango-1.0";"$(SolutionDir)\..\gtk2\include\atk-1.0";"$(SolutionDir)\..\gtk2\include\gtkglext-1.0";"$(SolutionDir)\..\libxml2\include""
|
||||
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="synapse.lib splines.lib libxml2.lib glib-2.0.lib gobject-2.0.lib gtk-win32-2.0.lib intl.lib"
|
||||
AdditionalLibraryDirectories=""$(SolutionDir)\..\libxml2\lib";"$(SolutionDir)\..\gtk2\lib";"$(SolutionDir)\build\$(ConfigurationName)\libs""
|
||||
ModuleDefinitionFile="camera.def"
|
||||
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\modules"
|
||||
IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\gtk2\lib\gtk-2.0\include";"$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include";"$(SolutionDir)\..\gtk2\include\gtk-2.0";"$(SolutionDir)\..\gtk2\include\cairo";"$(SolutionDir)\..\gtk2\include\pango-1.0";"$(SolutionDir)\..\gtk2\include\atk-1.0";"$(SolutionDir)\..\gtk2\include\gtkglext-1.0";"$(SolutionDir)\..\libxml2\include""
|
||||
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="synapse.lib splines.lib libxml2.lib glib-2.0.lib gobject-2.0.lib gtk-win32-2.0.lib intl.lib"
|
||||
AdditionalLibraryDirectories=""$(SolutionDir)\..\libxml2\lib";"$(SolutionDir)\..\gtk2\lib";"$(SolutionDir)\build\$(ConfigurationName)\libs""
|
||||
ModuleDefinitionFile="camera.def"
|
||||
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="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<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
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl"
|
||||
>
|
||||
<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
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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++ )
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ float CalculateLightRadius(entity_t * e, bool outer)
|
|||
|
||||
if (!outer) {
|
||||
if (iSpawnFlags & 2)
|
||||
fIntensity *= .9;
|
||||
fIntensity *= .9f;
|
||||
else
|
||||
fIntensity *= .25f;
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
//#include "afxres.h"
|
||||
#include "windows.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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--;
|
||||
}
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -110,7 +110,7 @@ WIN32
|
|||
|
||||
===================================================================
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#ifdef WIN32
|
||||
|
||||
#define USED
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
/*
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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},
|
||||
{-0.688191f, -0.587785f, -0.425325f},
|
||||
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 “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. */
|
||||
|
||||
/* 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;
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
/* -------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1999-2007 id Software, Inc. and contributors.
|
||||
For a list of contributors, see the accompanying CONTRIBUTORS file.
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ WIN32
|
|||
|
||||
===================================================================
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#ifdef WIN32
|
||||
|
||||
#define USED
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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++;
|
||||
targa_header.id_length = f[0];
|
||||
targa_header.colormap_type = f[1];
|
||||
targa_header.image_type = f[2];
|
||||
|
||||
if (targa_header.image_type!=2
|
||||
&& targa_header.image_type!=10
|
||||
&& targa_header.image_type != 3 )
|
||||
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_type != 0 )
|
||||
{
|
||||
Error("LoadTGA: colormaps not supported\n" );
|
||||
}
|
||||
|
||||
if ( ( targa_header.pixel_size != 32 && targa_header.pixel_size != 24 ) && targa_header.image_type != 3 )
|
||||
{
|
||||
Error("LoadTGA: Only 32 or 24 bit images supported (no colormaps)\n");
|
||||
}
|
||||
|
||||
columns = targa_header.width;
|
||||
rows = targa_header.height;
|
||||
numPixels = columns * rows;
|
||||
|
||||
if (width)
|
||||
*width = columns;
|
||||
if (height)
|
||||
*height = rows;
|
||||
|
||||
targa_rgba = safe_malloc (numPixels*4);
|
||||
*pic = targa_rgba;
|
||||
|
||||
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--)
|
||||
if (targa_header.colormap_length > 256)
|
||||
{
|
||||
pixbuf = targa_rgba + row*columns*4;
|
||||
for(column=0; column<columns; column++)
|
||||
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++)
|
||||
{
|
||||
unsigned char red,green,blue,alphabyte;
|
||||
switch (targa_header.pixel_size)
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
// check our pixel_size restrictions according to image_type
|
||||
if (targa_header.image_type == 2 || targa_header.image_type == 10)
|
||||
{
|
||||
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.attributes & 0x10)
|
||||
{
|
||||
TargaError(&targa_header, "LoadTGA: origin must be in top left or bottom left, top right and bottom right are not supported\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
if (readpixelcount > 0)
|
||||
{
|
||||
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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -31,7 +31,7 @@ WIN32
|
|||
|
||||
===================================================================
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#ifdef WIN32
|
||||
|
||||
#define USED
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
/*
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
/* -------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1999-2007 id Software, Inc. and contributors.
|
||||
For a list of contributors, see the accompanying CONTRIBUTORS 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" ) )
|
||||
{
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
/* -------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1999-2007 id Software, Inc. and contributors.
|
||||
For a list of contributors, see the accompanying CONTRIBUTORS file.
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
/* -------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1999-2007 id Software, Inc. and contributors.
|
||||
For a list of contributors, see the accompanying CONTRIBUTORS file.
|
||||
|
||||
|
|
|
@ -1,371 +1,371 @@
|
|||
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.
|
||||
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.
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
/* -------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1999-2007 id Software, Inc. and contributors.
|
||||
For a list of contributors, see the accompanying CONTRIBUTORS file.
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
/* -------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1999-2007 id Software, Inc. and contributors.
|
||||
For a list of contributors, see the accompanying CONTRIBUTORS 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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) */
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
264
tools/quake3/q3map2/game_etut.h
Normal file
264
tools/quake3/q3map2/game_etut.h
Normal file
|
@ -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
|
||||
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
195
tools/quake3/q3map2/game_qfusion.h
Normal file
195
tools/quake3/q3map2/game_qfusion.h
Normal file
|
@ -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
|
||||
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
160
tools/quake3/q3map2/game_tremulous.h
Normal file
160
tools/quake3/q3map2/game_tremulous.h
Normal file
|
@ -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
|
||||
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
/* -------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1999-2007 id Software, Inc. and contributors.
|
||||
For a list of contributors, see the accompanying CONTRIBUTORS file.
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue