- improved underwater lighting for sprites.

- fixed: The translation addition broke parsing of palette index based translations.
- fixed: Fullbright application for weapons did not clear the light color.

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@553 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2009-10-17 07:44:31 +00:00
parent 07cdcec5d8
commit a38fdfb569
7 changed files with 32 additions and 14 deletions

View file

@ -6502,13 +6502,6 @@
<File
RelativePath=".\src\gl\shaders\gl_texshader.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\src\gl\shaders\gl_texshader.h"

View file

@ -641,6 +641,12 @@ void GLSprite::Process(AActor* thing,sector_t * sector)
Colormap.LightColor.g=
Colormap.LightColor.b=0xff;
}
else
{
Colormap.LightColor.r = (3*Colormap.LightColor.r + 0xff)/4;
Colormap.LightColor.g = (3*Colormap.LightColor.g + 0xff)/4;
Colormap.LightColor.b = (3*Colormap.LightColor.b + 0xff)/4;
}
}
else if (glset.nocoloredspritelighting)
{

View file

@ -178,6 +178,7 @@ void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
lightlevel=255;
cm.GetFixedColormap();
statebright[0] = statebright[1] = true;
fakesec = viewsector;
}
else
{
@ -262,9 +263,26 @@ void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
{
if (psp->state)
{
FColormap cmc = cm;
if (statebright[i])
{
if (fakesec == viewsector || in_area != area_below)
// under water areas keep most of their color for fullbright objects
{
cmc.LightColor.r=
cmc.LightColor.g=
cmc.LightColor.b=0xff;
}
else
{
cmc.LightColor.r = (3*cmc.LightColor.r + 0xff)/4;
cmc.LightColor.g = (3*cmc.LightColor.g + 0xff)/4;
cmc.LightColor.b = (3*cmc.LightColor.b + 0xff)/4;
}
}
// set the lighting parameters (only calls glColor and glAlphaFunc)
gl_SetSpriteLighting(vis.RenderStyle, playermo, statebright[i]? 255 : lightlevel,
0, &cm, 0xffffff, trans, statebright[i], true);
0, &cmc, 0xffffff, trans, statebright[i], true);
DrawPSprite (player,psp,psp->sx+ofsx, psp->sy+ofsy, cm.colormap, hudModelStep);
}
}

View file

@ -193,6 +193,7 @@ bool OpenGLFrameBuffer::WipeDo(int ticks)
gl_RenderState.EnableTexture(true);
gl_RenderState.EnableFog(false);
gl.Disable(GL_DEPTH_TEST);
bool done = ScreenWipe->Run(ticks, this);
//DrawLetterbox();

View file

@ -463,7 +463,7 @@ void FRemapTable::AddToTranslation(const char * range)
{
int pal1,pal2;
sc.MustGetToken(TK_IntConst);
sc.TokenMustBe(TK_IntConst);
pal1 = sc.Number;
sc.MustGetToken(':');
sc.MustGetToken(TK_IntConst);

View file

@ -3,5 +3,5 @@
// This file was automatically generated by the
// updaterevision tool. Do not edit by hand.
#define ZD_SVN_REVISION_STRING "1921"
#define ZD_SVN_REVISION_NUMBER 1921
#define ZD_SVN_REVISION_STRING "1925"
#define ZD_SVN_REVISION_NUMBER 1925

View file

@ -41,15 +41,15 @@
/** Lots of different version numbers **/
#define DOTVERSIONSTR_NOREV "1.3.0 beta"
#define DOTVERSIONSTR_NOREV "1.3.1 beta"
#define ZDVER_STRING "2.3.1"
// The version string the user actually sees.
#define DOTVERSIONSTR DOTVERSIONSTR_NOREV " (r" SVN_REVISION_STRING ") / ZDoom" ZDVER_STRING " (r" ZD_SVN_REVISION_STRING ")"
// The version as seen in the Windows resource
#define RC_FILEVERSION 1,3,0,SVN_REVISION_NUMBER
#define RC_PRODUCTVERSION 1,3,0,0
#define RC_FILEVERSION 1,3,1,SVN_REVISION_NUMBER
#define RC_PRODUCTVERSION 1,3,1,0
#define RC_FILEVERSION2 DOTVERSIONSTR
#define RC_PRODUCTVERSION2 "1.3"