22 Aug 2009

This commit is contained in:
g-cont 2009-08-22 00:00:00 +04:00 committed by Alibek Omarov
parent 2794dda4a5
commit 2e75e81169
18 changed files with 338 additions and 229 deletions

74
engine/engine.plg Normal file
View File

@ -0,0 +1,74 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: engine - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP3209.tmp" with contents
[
/nologo /MDd /W3 /Gm /Gi /GX /ZI /Od /I "./" /I "common" /I "server" /I "client" /I "../public" /I "../common" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR"..\temp\engine\!debug/" /Fo"..\temp\engine\!debug/" /Fd"..\temp\engine\!debug/" /FD /c
"D:\Xash3D\src_main\engine\client\cl_cmds.c"
]
Creating command line "cl.exe @C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP3209.tmp"
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP320A.tmp" with contents
[
user32.lib msvcrtd.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"..\temp\engine\!debug/engine.pdb" /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"..\temp\engine\!debug/engine.dll" /implib:"..\temp\engine\!debug/engine.lib" /pdbtype:sept
"\Xash3D\src_main\temp\engine\!debug\cinematic.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_cmds.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_demo.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_effects.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_frame.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_game.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_input.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_main.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_parse.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_phys.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_scrn.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_view.obj"
"\Xash3D\src_main\temp\engine\!debug\com_library.obj"
"\Xash3D\src_main\temp\engine\!debug\con_keys.obj"
"\Xash3D\src_main\temp\engine\!debug\con_main.obj"
"\Xash3D\src_main\temp\engine\!debug\con_utils.obj"
"\Xash3D\src_main\temp\engine\!debug\engfuncs.obj"
"\Xash3D\src_main\temp\engine\!debug\engine.obj"
"\Xash3D\src_main\temp\engine\!debug\host.obj"
"\Xash3D\src_main\temp\engine\!debug\infostring.obj"
"\Xash3D\src_main\temp\engine\!debug\input.obj"
"\Xash3D\src_main\temp\engine\!debug\menu.obj"
"\Xash3D\src_main\temp\engine\!debug\net_chan.obj"
"\Xash3D\src_main\temp\engine\!debug\net_huff.obj"
"\Xash3D\src_main\temp\engine\!debug\net_msg.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_client.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_cmds.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_frame.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_game.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_init.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_main.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_move.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_phys.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_save.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_world.obj"
]
Creating command line "link.exe @C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP320A.tmp"
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP320B.bat" with contents
[
@echo off
copy \Xash3D\src_main\temp\engine\!debug\engine.dll "D:\Xash3D\bin\engine.dll"
]
Creating command line "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP320B.bat"
Compiling...
cl_cmds.c
Linking...
<h3>Output Window</h3>
Performing Custom Build Step on \Xash3D\src_main\temp\engine\!debug\engine.dll
‘ª®¯¨à®¢ ­® ä ©«®¢: 1.
<h3>Results</h3>
engine.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -1,64 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: launch - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP2979.tmp" with contents
[
/nologo /MD /W3 /GX /O2 /I "./" /I "imagelib" /I "../public" /I "../common" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fo"..\temp\launch\!release/" /Fd"..\temp\launch\!release/" /FD /c
"D:\Xash3D\src_main\launch\system.c"
]
Creating command line "cl.exe @C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP2979.tmp"
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP297A.tmp" with contents
[
zlib.lib png.lib jpg.lib user32.lib gdi32.lib advapi32.lib winmm.lib /nologo /dll /pdb:none /machine:I386 /nodefaultlib:"libc.lib" /out:"..\temp\launch\!release/launch.dll" /implib:"..\temp\launch\!release/launch.lib" /libpath:"./imagelib" /opt:nowin98
"\Xash3D\src_main\temp\launch\!release\cmd.obj"
"\Xash3D\src_main\temp\launch\!release\console.obj"
"\Xash3D\src_main\temp\launch\!release\cpuinfo.obj"
"\Xash3D\src_main\temp\launch\!release\crclib.obj"
"\Xash3D\src_main\temp\launch\!release\cvar.obj"
"\Xash3D\src_main\temp\launch\!release\export.obj"
"\Xash3D\src_main\temp\launch\!release\filesystem.obj"
"\Xash3D\src_main\temp\launch\!release\img_bmp.obj"
"\Xash3D\src_main\temp\launch\!release\img_dds.obj"
"\Xash3D\src_main\temp\launch\!release\img_jpg.obj"
"\Xash3D\src_main\temp\launch\!release\img_main.obj"
"\Xash3D\src_main\temp\launch\!release\img_pcx.obj"
"\Xash3D\src_main\temp\launch\!release\img_png.obj"
"\Xash3D\src_main\temp\launch\!release\img_tga.obj"
"\Xash3D\src_main\temp\launch\!release\img_utils.obj"
"\Xash3D\src_main\temp\launch\!release\img_vtf.obj"
"\Xash3D\src_main\temp\launch\!release\img_wad.obj"
"\Xash3D\src_main\temp\launch\!release\memlib.obj"
"\Xash3D\src_main\temp\launch\!release\network.obj"
"\Xash3D\src_main\temp\launch\!release\parselib.obj"
"\Xash3D\src_main\temp\launch\!release\patch.obj"
"\Xash3D\src_main\temp\launch\!release\stdlib.obj"
"\Xash3D\src_main\temp\launch\!release\system.obj"
"\Xash3D\src_main\temp\launch\!release\utils.obj"
]
Creating command line "link.exe @C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP297A.tmp"
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP297B.bat" with contents
[
@echo off
copy \Xash3D\src_main\temp\launch\!release\launch.dll "D:\Xash3D\bin\launch.dll"
]
Creating command line "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP297B.bat"
Compiling...
system.c
Linking...
Creating library ..\temp\launch\!release/launch.lib and object ..\temp\launch\!release/launch.exp
<h3>Output Window</h3>
Performing Custom Build Step on \Xash3D\src_main\temp\launch\!release\launch.dll
‘ª®¯¨à®¢ ­® ä ©«®¢: 1.
<h3>Results</h3>
launch.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -600,11 +600,19 @@ R_TraceAgainstSurface
*/
static bool R_TraceAgainstSurface( msurface_t *surf )
{
int i;
mesh_t *mesh = surf->mesh;
elem_t *elem = mesh->elems;
vec4_t *verts = mesh->xyzArray;
float old_frac = trace_fraction;
int i;
mesh_t *mesh;
elem_t *elem;
vec4_t *verts;
float old_frac = trace_fraction;
if( !surf ) return false;
mesh = surf->mesh;
if( !mesh ) return false;
elem = mesh->elems;
if( !elem ) return false;
verts = mesh->xyzArray;
if( !verts ) return false;
// clip each triangle individually
for( i = 0; i < mesh->numElems; i += 3, elem += 3 )

View File

@ -70,7 +70,9 @@ bool R_CullSurface( msurface_t *surf, uint clipflags )
return false;
if( shader->flags & SHADER_AUTOSPRITE )
return false;
// never cull turblent or warp surfaces
if( shader->tessSize ) return false;
// flare
if( surf->facetype == MST_FLARE )
{

View File

@ -6,13 +6,13 @@
--------------------Configuration: render - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP28F5.tmp" with contents
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP32DD.tmp" with contents
[
/nologo /MD /W3 /GX /O2 /I "../public" /I "../common" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fo"..\temp\render\!release/" /Fd"..\temp\render\!release/" /FD /c
"D:\Xash3D\src_main\render\r_backend.c"
"D:\Xash3D\src_main\render\r_surf.c"
]
Creating command line "cl.exe @C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP28F5.tmp"
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP28F6.tmp" with contents
Creating command line "cl.exe @C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP32DD.tmp"
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP32DE.tmp" with contents
[
msvcrt.lib user32.lib gdi32.lib /nologo /subsystem:windows /dll /pdb:none /machine:I386 /nodefaultlib:"libc.lib" /out:"..\temp\render\!release/render.dll" /implib:"..\temp\render\!release/render.lib" /libpath:"../public/libs/"
"\Xash3D\src_main\temp\render\!release\cin.obj"
@ -40,15 +40,15 @@ msvcrt.lib user32.lib gdi32.lib /nologo /subsystem:windows /dll /pdb:none /machi
"\Xash3D\src_main\temp\render\!release\r_studio.obj"
"\Xash3D\src_main\temp\render\!release\r_surf.obj"
]
Creating command line "link.exe @C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP28F6.tmp"
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP28F7.bat" with contents
Creating command line "link.exe @C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP32DE.tmp"
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP32DF.bat" with contents
[
@echo off
copy \Xash3D\src_main\temp\render\!release\render.dll "D:\Xash3D\bin\render.dll"
]
Creating command line "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP28F7.bat"
Creating command line "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP32DF.bat"
Compiling...
r_backend.c
r_surf.c
Linking...
Creating library ..\temp\render\!release/render.lib and object ..\temp\render\!release/render.exp
<h3>Output Window</h3>

View File

@ -130,4 +130,4 @@ Beta 13.12.08
106. implement q3map2 into xtools.dll OK
107. implement shader sorting for rendermodes OK
108. prepare QuArK to Xash-ready OK
109. implement csg into bsplib
109.

View File

@ -619,10 +619,6 @@ int BSPMain( int argc, char **argv )
char path[ 1024 ];
bool onlyents = false;
/* note it */
MsgDev( D_INFO, "--- BSP ---\n" );
SetDrawSurfacesBuffer();
mapDrawSurfs = Malloc( sizeof( mapDrawSurface_t ) * MAX_MAP_DRAW_SURFS );
numMapDrawSurfs = 0;
@ -788,18 +784,22 @@ int BSPMain( int argc, char **argv )
SetDefaultSampleSize( sampleSize );
/* delete portal, line and surface files */
com.sprintf( path, "%s.prt", source );
com.sprintf( path, "%s/maps/%s.prt", com.GameInfo->gamedir, source );
FS_Delete( path );
com.sprintf( path, "%s.lin", source );
com.sprintf( path, "%s/maps/%s.lin", com.GameInfo->gamedir, source );
FS_Delete( path );
com.sprintf( path, "%s/maps/%s.log", com.GameInfo->gamedir, source );
FS_Delete( path );
com.snprintf( name, sizeof( name ), "maps/%s.map", gs_filename );
enable_log = true;
if( onlyents )
{
OnlyEnts();
return 0;
}
MsgDev( D_INFO, "--- BSP ---\n" );
/* load shaders */
LoadShaderInfo();

View File

@ -528,7 +528,6 @@ void WriteIBSPFile( const char *filename )
{
ibspHeader_t outheader, *header;
file_t *file;
time_t t;
char marker[ 1024 ];
int size;
@ -547,10 +546,9 @@ void WriteIBSPFile( const char *filename )
file = FS_Open( filename, "wb" );
FS_Write( file, (bspHeader_t*)header, sizeof( *header )); /* overwritten later */
/* add marker lump */
time( &t );
com.sprintf( marker, "I LOVE MY Q3MAP2 %s on %s)", Q3MAP_VERSION, asctime( localtime( &t )));
AddLump( file, (bspHeader_t*) header, 0, marker, strlen( marker ) + 1 );
// add marker lump
com.sprintf( marker, "Written by Xash BspLib at %s)", timestamp( TIME_NO_SECONDS ));
AddLump( file, (bspHeader_t*) header, 0, marker, com.strlen( marker ) + 1 );
/* add lumps */
AddLump( file, (bspHeader_t*) header, LUMP_SHADERS, bspShaders, numBSPShaders * sizeof( bspShader_t ));

View File

@ -271,7 +271,6 @@ void WriteRBSPFile( const char *filename )
{
rbspHeader_t outheader, *header;
file_t *file;
time_t t;
char marker[MAX_SYSPATH];
int size;
@ -290,10 +289,9 @@ void WriteRBSPFile( const char *filename )
file = FS_Open( filename, "wb" );
FS_Write( file, (bspHeader_t *)header, sizeof( *header )); /* overwritten later */
/* add marker lump */
time( &t );
com.sprintf( marker, "I LOVE MY Q3MAP2 %s on %s)", Q3MAP_VERSION, asctime( localtime( &t )));
AddLump( file, (bspHeader_t *) header, 0, marker, com.strlen( marker ) + 1 );
// add marker lump
com.sprintf( marker, "Written by Xash BspLib at %s)", timestamp( TIME_NO_SECONDS ));
AddLump( file, (bspHeader_t*) header, 0, marker, com.strlen( marker ) + 1 );
/* add lumps */
AddLump( file, (bspHeader_t*) header, LUMP_SHADERS, bspShaders, numBSPShaders * sizeof( bspShader_t ) );

View File

@ -54,7 +54,7 @@ vec_t Random( void )
void Bsp_PrintLog( const char *pMsg )
{
if( !enable_log ) return;
if( !bsplog ) bsplog = FS_Open( va( "maps/%s.log", gs_filename ), "wb" );
if( !bsplog ) bsplog = FS_Open( va( "maps/%s.log", gs_filename ), "ab" );
FS_Print( bsplog, pMsg );
}
@ -514,9 +514,6 @@ bool PrepareBSPModel( int argc, char **argv )
com_argc = argc;
com_argv = argv;
Msg( Q3MAP_VERSION "\n" );
Msg( "%s\n", Q3MAP_MOTD );
// check for general parms
if( FS_CheckParm( "-force" )) force = true;
@ -535,10 +532,9 @@ bool PrepareBSPModel( int argc, char **argv )
for( i = 0; i < MAX_JITTERS; i++ )
jitters[ i ] = sin( i * 139.54152147 );
game = &games[1]; // defaulting to Q3A ...
game = &games[1]; // defaulting to Xash
FS_LoadGameInfo( "gameinfo.txt" );
BspFunc = NULL;
enable_log = true;
if( FS_CheckParm( "-analyze" )) BspFunc = AnalyzeBSP;
else if( FS_CheckParm( "-info" )) BspFunc = BSPInfo;

View File

@ -56,7 +56,7 @@ game_t struct
12288, // max surface indexes
true, // flares
"engine/flare", // default flare shader
false, // wolf lighting model?
true, // wolf lighting model?
128, // lightmap width/height
1.0f, // lightmap gamma
1.0f, // lightmap compensate

View File

@ -218,42 +218,38 @@ creates lights from light entities
void CreateEntityLights( void )
{
int i, j;
light_t *light, *light2;
int i, j;
light_t *light, *light2;
entity_t *e, *e2;
const char *name;
const char *target;
vec3_t dest;
const char *_color;
float intensity, scale, deviance, filterRadius;
int spawnflags, flags, numSamples;
bool junior;
const char *name;
const char *target;
vec3_t dest;
const char *value;
float intensity, scale, deviance, filterRadius;
int spawnflags, flags, numSamples;
bool junior, monolight;
double vec[4], col[3];
/* go throught entity list and find lights */
for( i = 0; i < numEntities; i++ )
{
/* get entity */
e = &entities[ i ];
e = &entities[i];
name = ValueForKey( e, "classname" );
/* ydnar: check for lightJunior */
if( com.strnicmp( name, "lightJunior", 11 ) == 0 )
// check for lightJunior
if( !com.strnicmp( name, "lightJunior", 11 ))
junior = true;
else if( com.strnicmp( name, "light", 5 ) == 0 )
else if( !com.strnicmp( name, "light", 5 ))
junior = false;
else
continue;
else continue;
/* lights with target names (and therefore styles) are only parsed from BSP */
// lights with target names (and therefore styles) are only parsed from BSP
target = ValueForKey( e, "targetname" );
if( target[ 0 ] != '\0' && i >= numBSPEntities )
if( target[0] != '\0' && i >= numBSPEntities )
continue;
/* create a light */
numPointLights++;
light = Malloc( sizeof( *light ) );
memset( light, 0, sizeof( *light ) );
light = Malloc( sizeof( *light ));
light->next = lights;
lights = light;
@ -298,68 +294,100 @@ void CreateEntityLights( void )
/* other flags (borrowed from wolf) */
/* wolf dark light? */
if( (spawnflags & 4) || (spawnflags & 8) )
// wolf dark light
if(( spawnflags & 4 ) || ( spawnflags & 8 ))
flags |= LIGHT_DARK;
/* nogrid? */
if( spawnflags & 16 )
flags &= ~LIGHT_GRID;
// disable lightgrid for this source
if( spawnflags & 16 ) flags &= ~LIGHT_GRID;
/* junior? */
if( junior )
{
flags |= LIGHT_GRID;
flags &= ~LIGHT_SURFACES;
}
/* store the flags */
light->flags = flags;
/* ydnar: set fade key (from wolf) */
// set fade key (from wolf)
light->fade = 1.0f;
if( light->flags & LIGHT_ATTEN_LINEAR )
{
light->fade = FloatForKey( e, "fade" );
if( light->fade == 0.0f )
light->fade = 1.0f;
if( light->fade == 0.0f ) light->fade = 1.0f;
}
/* ydnar: set angle scaling (from vlight) */
// set angle scaling (from vlight)
light->angleScale = FloatForKey( e, "_anglescale" );
if( light->angleScale != 0.0f )
light->flags |= LIGHT_ATTEN_ANGLE;
if( light->angleScale != 0.0f ) light->flags |= LIGHT_ATTEN_ANGLE;
/* set origin */
GetVectorForKey( e, "origin", light->origin);
GetVectorForKey( e, "origin", light->origin );
light->style = IntForKey( e, "_style" );
if( light->style == LS_NORMAL )
light->style = IntForKey( e, "style" );
if( light->style == LS_NORMAL ) light->style = IntForKey( e, "style" );
if( light->style < LS_NORMAL || light->style >= LS_NONE )
Sys_Break( "Invalid lightstyle (%d) on entity %d", light->style, i );
if( light->style != LS_NORMAL )
MsgDev( D_NOTE, "styled light found targeting %s\n **", target );
/* set light intensity */
intensity = FloatForKey( e, "_light" );
if( intensity == 0.0f )
intensity = FloatForKey( e, "light" );
if( intensity == 0.0f)
intensity = 300.0f;
/* ydnar: set light scale (sof2) */
value = ValueForKey( e, "light" );
if( !value[0] ) value = ValueForKey( e, "_light" );
// assume default light color
VectorSet( light->color, 1.0f, 1.0f, 1.0f );
intensity = 300.0f;
if( value[0] )
{
switch( sscanf( value, "%lf %lf %lf %lf", &vec[0], &vec[1], &vec[2], &vec[3] ))
{
case 4: // HalfLife light
VectorSet( light->color, vec[0], vec[1], vec[2] );
VectorDivide( light->color, 255.0f, light->color );
intensity = vec[3];
break;
case 3: // Half-Life light_environment
VectorSet( light->intensity, vec[0], vec[1], vec[2] );
VectorDivide( light->color, 255.0f, light->color );
break;
case 1: // Quake light
intensity = vec[0];
monolight = true;
break;
default:
MsgDev( D_WARN, "%s [%i]: '_light' key must be 1 (q1) or 3 or 4 (hl) numbers\n", name, i );
break;
}
}
// set light color
if( monolight )
{
value = ValueForKey( e, "color" );
if( !value[0] ) value = ValueForKey( e, "_color" );
if( value[0] )
{
if(sscanf( value, "%lf %lf %lf", &col[0], &col[1], &col[2] ) != 3 )
{
MsgDev( D_WARN, "light at %.0f %.0f %.0f:\ncolor must be given 3 values\n",
light->origin[0], light->origin[1], light->origin[2] );
}
VectorCopy( col, light->color );
}
else VectorScale( light->color, 0.5f, light->color );
}
ColorNormalize( light->color, light->color );
// set light scale (sof2)
scale = FloatForKey( e, "scale" );
if( scale == 0.0f )
scale = 1.0f;
if( scale == 0.0f ) scale = 1.0f;
intensity *= scale;
/* ydnar: get deviance and samples */
deviance = FloatForKey( e, "_deviance" );
if( deviance == 0.0f )
deviance = FloatForKey( e, "_deviation" );
if( deviance == 0.0f )
deviance = FloatForKey( e, "_jitter" );
if( deviance == 0.0f ) deviance = FloatForKey( e, "_deviation" );
if( deviance == 0.0f ) deviance = FloatForKey( e, "_jitter" );
numSamples = IntForKey( e, "_samples" );
if( deviance < 0.0f || numSamples < 1 )
{
@ -368,25 +396,13 @@ void CreateEntityLights( void )
}
intensity /= numSamples;
/* ydnar: get filter radius */
// get filter radius
filterRadius = FloatForKey( e, "_filterradius" );
if( filterRadius == 0.0f )
filterRadius = FloatForKey( e, "_filteradius" );
if( filterRadius == 0.0f )
filterRadius = FloatForKey( e, "_filter" );
if( filterRadius < 0.0f )
filterRadius = 0.0f;
if( filterRadius == 0.0f ) filterRadius = FloatForKey( e, "_filteradius" );
if( filterRadius == 0.0f ) filterRadius = FloatForKey( e, "_filter" );
if( filterRadius < 0.0f ) filterRadius = 0.0f;
light->filterRadius = filterRadius;
/* set light color */
_color = ValueForKey( e, "_color" );
if( _color && _color[ 0 ] )
{
sscanf( _color, "%f %f %f", &light->color[ 0 ], &light->color[ 1 ], &light->color[ 2 ] );
ColorNormalize( light->color, light->color );
}
else light->color[0] = light->color[1] = light->color[2] = 1.0f;
intensity = intensity * pointScale;
light->photons = intensity;
@ -1750,8 +1766,7 @@ int LightMain( int argc, char **argv )
char mapSource[ 1024 ];
const char *value;
/* note it */
enable_log = true;
Msg( "--- Light ---\n" );
/* set standard game flags */
@ -2206,7 +2221,7 @@ int LightMain( int argc, char **argv )
else MsgDev( D_WARN, "unknown argument \"%s\"\n", argv[i] );
}
/* clean up map name */
com.sprintf( source, "maps/%s", gs_filename );
FS_StripExtension( source );

View File

@ -3401,8 +3401,8 @@ void SetupEnvelopes( bool forGrid, bool fastFlag )
}
/* emit some statistics */
Msg( "%9d total lights\n", numLights );
Msg( "%9d culled lights\n", numCulledLights );
MsgDev( D_NOTE, "%9d total lights\n", numLights );
MsgDev( D_NOTE, "%9d culled lights\n", numCulledLights );
}

View File

@ -2202,7 +2202,7 @@ void StoreSurfaceLightmaps( void )
/* note it */
Msg( "--- StoreSurfaceLightmaps ---\n");
MsgDev( D_NOTE, "--- StoreSurfaceLightmaps ---\n");
/* setup */
com.strcpy( dirname, source );
@ -3059,16 +3059,16 @@ void StoreSurfaceLightmaps( void )
? 0
: (float) numUsed / (float) numStored;
/* print stats */
Msg( "%9d luxels used\n", numUsed );
Msg( "%9d luxels stored (%3.2f percent efficiency)\n", numStored, efficiency * 100.0f );
Msg( "%9d solid surface lightmaps\n", numSolidLightmaps );
Msg( "%9d identical surface lightmaps, using %d luxels\n", numTwins, numTwinLuxels );
Msg( "%9d vertex forced surfaces\n", numSurfsVertexForced );
Msg( "%9d vertex approximated surfaces\n", numSurfsVertexApproximated );
Msg( "%9d BSP lightmaps\n", numBSPLightmaps );
Msg( "%9d total lightmaps\n", numOutLightmaps );
Msg( "%9d unique lightmap/shader combinations\n", numLightmapShaders );
// print stats
MsgDev( D_NOTE, "%9d luxels used\n", numUsed );
MsgDev( D_NOTE, "%9d luxels stored (%3.2f percent efficiency)\n", numStored, efficiency * 100.0f );
MsgDev( D_NOTE, "%9d solid surface lightmaps\n", numSolidLightmaps );
MsgDev( D_NOTE, "%9d identical surface lightmaps, using %d luxels\n", numTwins, numTwinLuxels );
MsgDev( D_NOTE, "%9d vertex forced surfaces\n", numSurfsVertexForced );
MsgDev( D_NOTE, "%9d vertex approximated surfaces\n", numSurfsVertexApproximated );
MsgDev( D_NOTE, "%9d BSP lightmaps\n", numBSPLightmaps );
MsgDev( D_NOTE, "%9d total lightmaps\n", numOutLightmaps );
MsgDev( D_NOTE, "%9d unique lightmap/shader combinations\n", numLightmapShaders );
/* write map shader file */
WriteMapShaderFile();

View File

@ -26,25 +26,16 @@ several games based on the Quake III Arena engine, in the form of "Q3Map2."
------------------------------------------------------------------------------- */
/* marker */
#ifndef Q3MAP2_H
#define Q3MAP2_H
/* version */
#define Q3MAP_VERSION "2.5.17"
#define Q3MAP_MOTD "Last one turns the lights off"
/* -------------------------------------------------------------------------------
/*
-------------------------------------------------------------------------------
dependencies
------------------------------------------------------------------------------- */
-------------------------------------------------------------------------------
*/
/* platform-specific */
#include <windows.h>
@ -95,7 +86,7 @@ enum
BRUSH_COUNT
};
/* ydnar: compiler flags, because games have widely varying content/surface flags */
// compiler flags, because games have widely varying content/surface flags
#define C_SOLID 0x00000001
#define C_TRANSLUCENT 0x00000002
#define C_STRUCTURAL 0x00000004
@ -1149,34 +1140,40 @@ light structures
/* ydnar: new light struct with flags */
typedef struct light_s
{
struct light_s *next;
struct light_s *next;
int type;
int flags; /* ydnar: condensed all the booleans into one flags int */
shaderInfo_t *si;
int type;
int flags; // condensed all the booleans into one flags int
shaderInfo_t *si;
vec3_t origin;
vec3_t normal; /* for surfaces, spotlights, and suns */
float dist; /* plane location along normal */
vec3_t origin;
vec3_t normal; // for surfaces, spotlights, and suns
float dist; // plane location along normal
float photons;
int style;
vec3_t color;
float radiusByDist; /* for spotlights */
float fade; /* ydnar: from wolf, for linear lights */
float angleScale; /* ydnar: stolen from vlight for K */
float photons;
int style;
float add; /* ydnar: used for area lights */
float envelope; /* ydnar: units until falloff < tolerance */
float envelope2; /* ydnar: envelope squared (tiny optimization) */
vec3_t mins, maxs; /* ydnar: pvs envelope */
int cluster; /* ydnar: cluster light falls into */
union
{
vec3_t color;
vec3_t intensity;
};
float radiusByDist; // for spotlights
float fade; // from wolf, for linear lights
float angleScale; // stolen from vlight for K
float add; // used for area lights
float envelope; // units until falloff < tolerance
float envelope2; // envelope squared (tiny optimization)
vec3_t mins, maxs; // pvs envelope
int cluster; // cluster light falls into
winding_t *w;
vec3_t emitColor; /* full out-of-gamut value */
winding_t *w;
vec3_t emitColor; // full out-of-gamut value
float falloffTolerance; /* ydnar: minimum attenuation threshold */
float filterRadius; /* ydnar: lightmap filter radius in world units, 0 == default */
float falloffTolerance; // minimum attenuation threshold
float filterRadius; // lightmap filter radius in world units, 0 == default
} light_t;

View File

@ -1655,12 +1655,11 @@ void CullSides( entity_t *e )
if( (side1->planenum & ~0x00000001) != (side2->planenum & ~0x00000001) )
continue;
// FIXME: get work
// FIXME: get work it properly
if( (side1->compileFlags & C_LIQUID) && (side2->compileFlags & C_LIQUID))
{
if( mapplanes[side1->planenum].type == mapplanes[side2->planenum].type && mapplanes[side1->planenum].type != PLANE_Z )
{
Msg( "Cull sides %s and %s\n", side1->shaderInfo->shader, side2->shaderInfo->shader );
side1->culled = true;
side2->culled = true;
g_numCoinFaces++;

View File

@ -1016,7 +1016,7 @@ int VisMain( int argc, char **argv )
char portalfile[1024];
int i;
enable_log = true;
Msg( "--- Vis ---\n" );
// process arguments
@ -1073,7 +1073,7 @@ int VisMain( int argc, char **argv )
com.strcpy( portalfile, source );
FS_StripExtension( portalfile );
FS_DefaultExtension( portalfile, ".prt" );
MsgDev( D_INFO, "Loading %s\n", portalfile );
Msg( "Loading %s\n", portalfile );
LoadPortals( portalfile );
/* ydnar: exit if no portals, hence no vis */

View File

@ -6,6 +6,92 @@
--------------------Configuration: xtools - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP3334.tmp" with contents
[
/nologo /MD /W3 /GX /O2 /I "./" /I "../public" /I "bsplib" /I "models" /I "ripper" /I "../common" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fo"..\temp\xtools\!release/" /Fd"..\temp\xtools\!release/" /FD /c
"D:\Xash3D\src_main\xtools\bsplib\surface.c"
]
Creating command line "cl.exe @C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP3334.tmp"
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP3335.tmp" with contents
[
msvcrt.lib /nologo /dll /pdb:none /machine:I386 /nodefaultlib:"libc.lib" /out:"..\temp\xtools\!release/xtools.dll" /implib:"..\temp\xtools\!release/xtools.lib" /opt:nowin98
"\Xash3D\src_main\temp\xtools\!release\brush.obj"
"\Xash3D\src_main\temp\xtools\!release\brush_primit.obj"
"\Xash3D\src_main\temp\xtools\!release\bsp.obj"
"\Xash3D\src_main\temp\xtools\!release\bspfile_abstract.obj"
"\Xash3D\src_main\temp\xtools\!release\bspfile_ibsp.obj"
"\Xash3D\src_main\temp\xtools\!release\bspfile_rbsp.obj"
"\Xash3D\src_main\temp\xtools\!release\bsplib.obj"
"\Xash3D\src_main\temp\xtools\!release\conv_bsplumps.obj"
"\Xash3D\src_main\temp\xtools\!release\conv_doom.obj"
"\Xash3D\src_main\temp\xtools\!release\conv_image.obj"
"\Xash3D\src_main\temp\xtools\!release\conv_main.obj"
"\Xash3D\src_main\temp\xtools\!release\conv_shader.obj"
"\Xash3D\src_main\temp\xtools\!release\conv_sprite.obj"
"\Xash3D\src_main\temp\xtools\!release\convert_ase.obj"
"\Xash3D\src_main\temp\xtools\!release\convert_map.obj"
"\Xash3D\src_main\temp\xtools\!release\decals.obj"
"\Xash3D\src_main\temp\xtools\!release\dpvencoder.obj"
"\Xash3D\src_main\temp\xtools\!release\facebsp.obj"
"\Xash3D\src_main\temp\xtools\!release\fog.obj"
"\Xash3D\src_main\temp\xtools\!release\image.obj"
"\Xash3D\src_main\temp\xtools\!release\leakfile.obj"
"\Xash3D\src_main\temp\xtools\!release\light.obj"
"\Xash3D\src_main\temp\xtools\!release\light_bounce.obj"
"\Xash3D\src_main\temp\xtools\!release\light_trace.obj"
"\Xash3D\src_main\temp\xtools\!release\light_ydnar.obj"
"\Xash3D\src_main\temp\xtools\!release\lightmaps_ydnar.obj"
"\Xash3D\src_main\temp\xtools\!release\map.obj"
"\Xash3D\src_main\temp\xtools\!release\md5.obj"
"\Xash3D\src_main\temp\xtools\!release\mesh.obj"
"\Xash3D\src_main\temp\xtools\!release\model.obj"
"\Xash3D\src_main\temp\xtools\!release\patch.obj"
"\Xash3D\src_main\temp\xtools\!release\picointernal.obj"
"\Xash3D\src_main\temp\xtools\!release\picomodel.obj"
"\Xash3D\src_main\temp\xtools\!release\picomodules.obj"
"\Xash3D\src_main\temp\xtools\!release\pm_3ds.obj"
"\Xash3D\src_main\temp\xtools\!release\pm_ase.obj"
"\Xash3D\src_main\temp\xtools\!release\pm_fm.obj"
"\Xash3D\src_main\temp\xtools\!release\pm_md2.obj"
"\Xash3D\src_main\temp\xtools\!release\pm_md3.obj"
"\Xash3D\src_main\temp\xtools\!release\pm_mdc.obj"
"\Xash3D\src_main\temp\xtools\!release\pm_ms3d.obj"
"\Xash3D\src_main\temp\xtools\!release\pm_obj.obj"
"\Xash3D\src_main\temp\xtools\!release\polylib.obj"
"\Xash3D\src_main\temp\xtools\!release\portals.obj"
"\Xash3D\src_main\temp\xtools\!release\prtfile.obj"
"\Xash3D\src_main\temp\xtools\!release\shaders.obj"
"\Xash3D\src_main\temp\xtools\!release\spritegen.obj"
"\Xash3D\src_main\temp\xtools\!release\studio.obj"
"\Xash3D\src_main\temp\xtools\!release\studio_utils.obj"
"\Xash3D\src_main\temp\xtools\!release\surface.obj"
"\Xash3D\src_main\temp\xtools\!release\surface_extra.obj"
"\Xash3D\src_main\temp\xtools\!release\surface_foliage.obj"
"\Xash3D\src_main\temp\xtools\!release\surface_fur.obj"
"\Xash3D\src_main\temp\xtools\!release\surface_meta.obj"
"\Xash3D\src_main\temp\xtools\!release\tjunction.obj"
"\Xash3D\src_main\temp\xtools\!release\tree.obj"
"\Xash3D\src_main\temp\xtools\!release\utils.obj"
"\Xash3D\src_main\temp\xtools\!release\vis.obj"
"\Xash3D\src_main\temp\xtools\!release\visflow.obj"
"\Xash3D\src_main\temp\xtools\!release\wadlib.obj"
"\Xash3D\src_main\temp\xtools\!release\writebsp.obj"
"\Xash3D\src_main\temp\xtools\!release\xtools.obj"
]
Creating command line "link.exe @C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP3335.tmp"
Creating temporary file "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP3336.bat" with contents
[
@echo off
copy \Xash3D\src_main\temp\xtools\!release\xtools.dll "D:\Xash3D\bin\xtools.dll"
]
Creating command line "C:\DOCUME~1\MIKE~1.MIK\LOCALS~1\Temp\RSP3336.bat"
Compiling...
surface.c
Linking...
Creating library ..\temp\xtools\!release/xtools.lib and object ..\temp\xtools\!release/xtools.exp
<h3>Output Window</h3>
Performing Custom Build Step on \Xash3D\src_main\temp\xtools\!release\xtools.dll
‘ª®¯¨à®¢ ­® ä ©«®¢: 1.