mirror of
https://github.com/ZDoom/Raze.git
synced 2025-04-23 00:11:03 +00:00
- WH: make screen blends work.
This commit is contained in:
parent
de61f6d746
commit
8ad31a03ed
2 changed files with 8 additions and 5 deletions
|
@ -108,6 +108,7 @@ void drawscreen(int num, double dasmoothratio, bool sceneonly)
|
|||
|
||||
if (!sceneonly)
|
||||
{
|
||||
applyflash();
|
||||
if (!plr.over_shoulder_on)
|
||||
{
|
||||
DrawHud(dasmoothratio);
|
||||
|
|
|
@ -51,11 +51,13 @@ void resetflash()
|
|||
|
||||
void applyflash()
|
||||
{
|
||||
// no idea if this is righz. Needs to be tested.
|
||||
if (redcount) videoTintBlood(5*redcount/2, -5*redcount/2, -5*redcount/2);
|
||||
else if (greencount) videoTintBlood(-5*redcount/2, 5*redcount/2, -5*redcount/2);
|
||||
else if (bluecount) videoTintBlood(-5*redcount/2, -5*redcount/2, 5*redcount/2);
|
||||
else if (whitecount) videoTintBlood(5*redcount/2, 5*redcount/2, 5*redcount/2);
|
||||
const int factor = 2;
|
||||
const int factor2 = 5;
|
||||
|
||||
if (redcount) videoTintBlood(factor * redcount / 2, -factor2 * redcount / 2, -factor2 * redcount / 2);
|
||||
else if (greencount) videoTintBlood(-factor2 * greencount / 2, factor * greencount / 2, -factor2 * greencount / 2);
|
||||
else if (bluecount) videoTintBlood(-factor2 * bluecount / 2, -factor2 * bluecount / 2, factor * bluecount / 2);
|
||||
else if (whitecount) videoTintBlood(factor * whitecount / 2, factor * whitecount / 2, factor * whitecount / 2);
|
||||
else videoTintBlood(0, 0, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue