14 Jun 2019
This commit is contained in:
parent
dd84b2a02d
commit
f7b7c67b97
10
change.log
10
change.log
|
@ -16,6 +16,16 @@ VGUI: - a VGUI implementation code in xash.dll
|
|||
Memory: - a memory manager in xash.dll
|
||||
Physic: - a server physics code in xash.dll
|
||||
|
||||
build 4511
|
||||
|
||||
Engine: some expansion of RenderAPI (with keep compatibility of course)
|
||||
Render: fixup screen clearing while SCR_BeginLoadingPlaque is called
|
||||
Engine: cl_testlights now supports custom rendering
|
||||
Render: fixup cubemap rendering code, reset gamma
|
||||
Console: allow to drawing progress-bar in console without carriage return call
|
||||
Engine: small fix for system logging
|
||||
ImageLib: ignore to process emboss-filter with scale <= 0
|
||||
|
||||
build 4483
|
||||
|
||||
Engine: implementation of improved line trace that can be collided with solid-pixels on grates or fences. (see features.h for details)
|
||||
|
|
|
@ -570,9 +570,6 @@ qboolean VID_CubemapShot( const char *base, uint size, const float *vieworg, qbo
|
|||
if( size > glState.width || size > glState.height )
|
||||
return false;
|
||||
|
||||
// setup refdef
|
||||
RI.params |= RP_ENVVIEW; // do not render non-bmodel entities
|
||||
|
||||
// alloc space
|
||||
temp = Mem_Malloc( r_temppool, size * size * 3 );
|
||||
buffer = Mem_Malloc( r_temppool, size * size * 3 * 6 );
|
||||
|
@ -582,6 +579,8 @@ qboolean VID_CubemapShot( const char *base, uint size, const float *vieworg, qbo
|
|||
// use client vieworg
|
||||
if( !vieworg ) vieworg = RI.vieworg;
|
||||
|
||||
R_CheckGamma();
|
||||
|
||||
for( i = 0; i < 6; i++ )
|
||||
{
|
||||
// go into 3d mode
|
||||
|
@ -609,8 +608,6 @@ qboolean VID_CubemapShot( const char *base, uint size, const float *vieworg, qbo
|
|||
memcpy( buffer + (size * size * 3 * i), r_side->buffer, size * size * 3 );
|
||||
}
|
||||
|
||||
RI.params &= ~RP_ENVVIEW;
|
||||
|
||||
r_shot->flags = IMAGE_HAS_COLOR;
|
||||
r_shot->flags |= (skyshot) ? IMAGE_SKYBOX : IMAGE_CUBEMAP;
|
||||
r_shot->width = size;
|
||||
|
|
|
@ -75,7 +75,8 @@ void GL_Bind( GLint tmu, GLenum texnum )
|
|||
// missed or invalid texture?
|
||||
if( texnum <= 0 || texnum >= MAX_TEXTURES )
|
||||
{
|
||||
Con_DPrintf( S_ERROR "GL_Bind: invalid texturenum %d\n", texnum );
|
||||
if( texnum != 0 )
|
||||
Con_DPrintf( S_ERROR "GL_Bind: invalid texturenum %d\n", texnum );
|
||||
texnum = tr.defaultTexture;
|
||||
}
|
||||
if( tmu != GL_KEEP_UNIT )
|
||||
|
|
|
@ -365,6 +365,7 @@ qboolean R_InitRenderAPI( void );
|
|||
void R_AllowFog( int allowed );
|
||||
void R_SetupFrustum( void );
|
||||
void R_FindViewLeaf( void );
|
||||
void R_CheckGamma( void );
|
||||
void R_PushScene( void );
|
||||
void R_PopScene( void );
|
||||
void R_DrawFog( void );
|
||||
|
|
|
@ -985,30 +985,41 @@ some type of screenshots
|
|||
*/
|
||||
qboolean R_DoResetGamma( void )
|
||||
{
|
||||
// FIXME: this looks ugly. apply the backward gamma changes to the output image
|
||||
return false;
|
||||
|
||||
switch( cls.scrshot_action )
|
||||
{
|
||||
case scrshot_normal:
|
||||
if( CL_IsDevOverviewMode( ))
|
||||
return true;
|
||||
return false;
|
||||
case scrshot_snapshot:
|
||||
if( CL_IsDevOverviewMode( ))
|
||||
return true;
|
||||
return false;
|
||||
case scrshot_plaque:
|
||||
case scrshot_savegame:
|
||||
case scrshot_envshot:
|
||||
case scrshot_skyshot:
|
||||
case scrshot_mapshot:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
R_CheckGamma
|
||||
===============
|
||||
*/
|
||||
void R_CheckGamma( void )
|
||||
{
|
||||
if( R_DoResetGamma( ))
|
||||
{
|
||||
// paranoia cubemaps uses this
|
||||
BuildGammaTable( 1.8f, 0.0f );
|
||||
|
||||
// paranoia cubemap rendering
|
||||
if( clgame.drawFuncs.GL_BuildLightmaps )
|
||||
clgame.drawFuncs.GL_BuildLightmaps( );
|
||||
}
|
||||
else if( FBitSet( vid_gamma->flags, FCVAR_CHANGED ) || FBitSet( vid_brightness->flags, FCVAR_CHANGED ))
|
||||
{
|
||||
BuildGammaTable( vid_gamma->value, vid_brightness->value );
|
||||
glConfig.softwareGammaUpdate = true;
|
||||
GL_RebuildLightmaps();
|
||||
glConfig.softwareGammaUpdate = false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
R_BeginFrame
|
||||
|
@ -1023,24 +1034,7 @@ void R_BeginFrame( qboolean clearScene )
|
|||
pglClear( GL_COLOR_BUFFER_BIT );
|
||||
}
|
||||
|
||||
if( R_DoResetGamma( ))
|
||||
{
|
||||
BuildGammaTable( 1.8f, 0.0f );
|
||||
glConfig.softwareGammaUpdate = true;
|
||||
GL_RebuildLightmaps();
|
||||
glConfig.softwareGammaUpdate = false;
|
||||
|
||||
// next frame will be restored gamma
|
||||
SetBits( vid_brightness->flags, FCVAR_CHANGED );
|
||||
SetBits( vid_gamma->flags, FCVAR_CHANGED );
|
||||
}
|
||||
else if( FBitSet( vid_gamma->flags, FCVAR_CHANGED ) || FBitSet( vid_brightness->flags, FCVAR_CHANGED ))
|
||||
{
|
||||
BuildGammaTable( vid_gamma->value, vid_brightness->value );
|
||||
glConfig.softwareGammaUpdate = true;
|
||||
GL_RebuildLightmaps();
|
||||
glConfig.softwareGammaUpdate = false;
|
||||
}
|
||||
R_CheckGamma();
|
||||
|
||||
R_Set2DMode( true );
|
||||
|
||||
|
@ -1072,8 +1066,14 @@ void R_SetupRefParams( const ref_viewpass_t *rvp )
|
|||
RI.farClip = 0;
|
||||
|
||||
if( !FBitSet( rvp->flags, RF_DRAW_CUBEMAP ))
|
||||
{
|
||||
RI.drawOrtho = FBitSet( rvp->flags, RF_DRAW_OVERVIEW );
|
||||
else RI.drawOrtho = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBits( RI.params, RP_ENVVIEW );
|
||||
RI.drawOrtho = false;
|
||||
}
|
||||
|
||||
// setup viewport
|
||||
RI.viewport[0] = rvp->viewport[0];
|
||||
|
|
|
@ -306,7 +306,7 @@ void CEngineSurface :: drawPrintChar( int x, int y, int wide, int tall, float s0
|
|||
|
||||
if( !ClipRect( ul, lr, &clippedRect[0], &clippedRect[1] ))
|
||||
return;
|
||||
#if 0
|
||||
#if 1
|
||||
// TESTTEST: needs to be more tested
|
||||
addCharToBuffer( &clippedRect[0], &clippedRect[1], color );
|
||||
#else
|
||||
|
|
|
@ -23,7 +23,7 @@ static char mond[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
|||
int Q_buildnum( void )
|
||||
{
|
||||
// do not touch this! Only author of Xash3D can increase buildnumbers!
|
||||
#if 1
|
||||
#if 0
|
||||
int m = 0, d = 0, y = 0;
|
||||
static int b = 0;
|
||||
|
||||
|
@ -48,6 +48,6 @@ int Q_buildnum( void )
|
|||
|
||||
return b;
|
||||
#else
|
||||
return 4260;
|
||||
return 4511;
|
||||
#endif
|
||||
}
|
|
@ -254,7 +254,7 @@ qboolean Sound_LoadWAV( const char *name, const byte *buffer, size_t filesize )
|
|||
|
||||
if( sound.samples <= 0 )
|
||||
{
|
||||
Con_DPrintf( S_ERROR "Sound_LoadWAV: file with %i samples (%s)\n", sound.samples, name );
|
||||
Con_Reportf( S_ERROR "Sound_LoadWAV: file with %i samples (%s)\n", sound.samples, name );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -285,6 +285,8 @@ void SV_NextMap_f( void )
|
|||
search_t *t;
|
||||
|
||||
t = FS_Search( "maps\\*.bsp", true, CVAR_TO_BOOL( con_gamemaps )); // only in gamedir
|
||||
if( !t ) t = FS_Search( "maps/*.bsp", true, CVAR_TO_BOOL( con_gamemaps )); // only in gamedir
|
||||
|
||||
if( !t )
|
||||
{
|
||||
Con_Printf( "next map can't be found\n" );
|
||||
|
|
Reference in New Issue