mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-27 22:42:29 +00:00
- Backported blood_fade_scalar from Skulltag
- Added new pickup_fade_scalar which works the same way for pickups - Default for blood_fade_scalar is 1.0 instead of 0.5 from Skulltag.
This commit is contained in:
parent
99c4d03ad4
commit
02f66fa34e
2 changed files with 12 additions and 2 deletions
|
@ -52,7 +52,8 @@
|
|||
#include "v_palette.h"
|
||||
#include "d_player.h"
|
||||
|
||||
|
||||
CVAR( Float, blood_fade_scalar, 1.0f, CVAR_ARCHIVE ) // [SP] Pulled from Skulltag - changed default from 0.5 to 1.0
|
||||
CVAR( Float, pickup_fade_scalar, 1.0f, CVAR_ARCHIVE ) // [SP] Uses same logic as blood_fade_scalar except for pickups
|
||||
|
||||
// [RH] Amount of red flash for up to 114 damage points. Calculated by hand
|
||||
// using a logarithmic scale and my trusty HP48G.
|
||||
|
@ -113,6 +114,9 @@ void V_AddPlayerBlend (player_t *CPlayer, float blend[4], float maxinvalpha, int
|
|||
if (CPlayer->bonuscount)
|
||||
{
|
||||
cnt = CPlayer->bonuscount << 3;
|
||||
|
||||
// [SP] Allow player to tone down intensity of pickup flash.
|
||||
cnt = (int)( cnt * pickup_fade_scalar );
|
||||
|
||||
V_AddBlend (RPART(gameinfo.pickupcolor)/255.f, GPART(gameinfo.pickupcolor)/255.f,
|
||||
BPART(gameinfo.pickupcolor)/255.f, cnt > 128 ? 0.5f : cnt / 255.f, blend);
|
||||
|
@ -124,7 +128,10 @@ void V_AddPlayerBlend (player_t *CPlayer, float blend[4], float maxinvalpha, int
|
|||
if (painFlash.a != 0)
|
||||
{
|
||||
cnt = DamageToAlpha[MIN (113, CPlayer->damagecount * painFlash.a / 255)];
|
||||
|
||||
|
||||
// [BC] Allow users to tone down the intensity of the blood on the screen.
|
||||
cnt = (int)( cnt * blood_fade_scalar );
|
||||
|
||||
if (cnt)
|
||||
{
|
||||
if (cnt > maxpainblend)
|
||||
|
|
|
@ -660,6 +660,8 @@ OptionMenu "VideoOptions"
|
|||
Slider "$DSPLYMNU_BRIGHTNESS", "Gamma", 0.75, 3.0, 0.05, 2
|
||||
Option "$DSPLYMNU_VSYNC", "vid_vsync", "OnOff"
|
||||
Option "$DSPLYMNU_CAPFPS", "cl_capfps", "OffOn"
|
||||
Slider "$DSPLYMNU_BLOODFADE", "blood_fade_scalar", 0.0, 1.0, 0.05, 1
|
||||
Slider "$DSPLYMNU_PICKUPFADE", "pickup_fade_scalar", 0.0, 1.0, 0.05, 1
|
||||
Option "$DSPLYMNU_COLUMNMETHOD", "r_columnmethod", "ColumnMethods"
|
||||
|
||||
StaticText " "
|
||||
|
@ -692,6 +694,7 @@ OptionMenu "VideoOptions"
|
|||
Slider "$DSPLYMNU_MOVEBOB", "movebob", 0, 1.0, 0.05, 2
|
||||
Slider "$DSPLYMNU_STILLBOB", "stillbob", 0, 1.0, 0.05, 2
|
||||
Slider "$DSPLYMNU_BOBSPEED", "wbobspeed", 0, 2.0, 0.1, 2
|
||||
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue