mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Implement tint in gl modes
# Conflicts: # source/build/include/palette.h # source/build/src/palette.cpp # source/build/src/sdlayer.cpp # source/build/src/sdlayer12.cpp # source/build/src/winlayer.cpp
This commit is contained in:
parent
2ef835fcb8
commit
aa922dcd25
1 changed files with 18 additions and 0 deletions
|
@ -391,6 +391,9 @@ void FixPalette()
|
|||
|
||||
nPalDelay = 5;
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
if (videoGetRenderMode() == REND_CLASSIC)
|
||||
#endif
|
||||
for (int i = 0; i < 256; i++)
|
||||
{
|
||||
short nVal;
|
||||
|
@ -438,6 +441,7 @@ void FixPalette()
|
|||
nPalDiff -= 20;
|
||||
gtint -= 20;
|
||||
rtint -= 20;
|
||||
btint -= 20;
|
||||
|
||||
if (gtint < 0) {
|
||||
gtint = 0;
|
||||
|
@ -447,10 +451,18 @@ void FixPalette()
|
|||
rtint = 0;
|
||||
}
|
||||
|
||||
if (btint < 0) {
|
||||
btint = 0;
|
||||
}
|
||||
|
||||
if (nPalDiff < 0) {
|
||||
nPalDiff = 0;
|
||||
}
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
if (videoGetRenderMode() >= REND_POLYMOST) videoTintBlood(rtint, gtint, btint);
|
||||
else
|
||||
#endif
|
||||
videoUpdatePalette(0, 256);
|
||||
}
|
||||
|
||||
|
@ -515,6 +527,8 @@ void TintPalette(int r, int g, int b)
|
|||
|
||||
rtint += r;
|
||||
|
||||
btint += b;
|
||||
|
||||
// do not modify r, g or b variables from this point on
|
||||
b2 = b;
|
||||
int nVal;
|
||||
|
@ -533,6 +547,10 @@ void TintPalette(int r, int g, int b)
|
|||
|
||||
nPalDiff += nVal;
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
if (videoGetRenderMode() >= REND_POLYMOST) videoTintBlood(rtint, gtint, btint);
|
||||
else
|
||||
#endif
|
||||
for (int i = 0; i < 256; i++)
|
||||
{
|
||||
pPal->r += r;
|
||||
|
|
Loading…
Reference in a new issue