engine: client: fix ScreenFade under quake compatibility mode
This commit is contained in:
parent
465e812ed9
commit
2fddbdddee
1 changed files with 13 additions and 6 deletions
|
@ -560,7 +560,19 @@ static void CL_DrawScreenFade( void )
|
||||||
if( !alpha )
|
if( !alpha )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( FBitSet( sf->fadeFlags, FFADE_MODULATE ))
|
if( !FBitSet( sf->fadeFlags, FFADE_MODULATE ))
|
||||||
|
{
|
||||||
|
ref.dllFuncs.GL_SetRenderMode( kRenderTransTexture );
|
||||||
|
ref.dllFuncs.Color4ub( sf->fader, sf->fadeg, sf->fadeb, alpha );
|
||||||
|
}
|
||||||
|
else if( Host_IsQuakeCompatible( ))
|
||||||
|
{
|
||||||
|
// Quake Wrapper and Quake Remake use FFADE_MODULATE for item pickups
|
||||||
|
// so hack the check here
|
||||||
|
ref.dllFuncs.GL_SetRenderMode( kRenderTransAdd );
|
||||||
|
ref.dllFuncs.Color4ub( sf->fader, sf->fadeg, sf->fadeb, alpha );
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
ref.dllFuncs.GL_SetRenderMode( kRenderScreenFadeModulate );
|
ref.dllFuncs.GL_SetRenderMode( kRenderScreenFadeModulate );
|
||||||
|
|
||||||
|
@ -570,11 +582,6 @@ static void CL_DrawScreenFade( void )
|
||||||
(uint16_t)( sf->fadeb * alpha + ( 255 - alpha ) * 255 ) >> 8,
|
(uint16_t)( sf->fadeb * alpha + ( 255 - alpha ) * 255 ) >> 8,
|
||||||
255 );
|
255 );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
ref.dllFuncs.GL_SetRenderMode( kRenderTransTexture );
|
|
||||||
ref.dllFuncs.Color4ub( sf->fader, sf->fadeg, sf->fadeb, alpha );
|
|
||||||
}
|
|
||||||
|
|
||||||
ref.dllFuncs.R_DrawStretchPic( 0, 0, refState.width, refState.height, 0, 0, 1, 1,
|
ref.dllFuncs.R_DrawStretchPic( 0, 0, refState.width, refState.height, 0, 0, 1, 1,
|
||||||
R_GetBuiltinTexture( REF_WHITE_TEXTURE ));
|
R_GetBuiltinTexture( REF_WHITE_TEXTURE ));
|
||||||
|
|
Loading…
Add table
Reference in a new issue