mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Additive and subtractive for the HUD
This commit is contained in:
parent
320cdf2108
commit
a06e4da65b
4 changed files with 15 additions and 7 deletions
|
|
@ -11644,6 +11644,8 @@ struct {
|
|||
{"V_70TRANS",V_70TRANS},
|
||||
{"V_80TRANS",V_80TRANS},
|
||||
{"V_90TRANS",V_90TRANS},
|
||||
{"V_ADDTRANS",V_ADDTRANS},
|
||||
{"V_SUBTRANS",V_SUBTRANS},
|
||||
{"V_HUDTRANSHALF",V_HUDTRANSHALF},
|
||||
{"V_HUDTRANS",V_HUDTRANS},
|
||||
{"V_RETURN8",V_RETURN8},
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ void HWR_DrawStretchyFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t
|
|||
// 0--1
|
||||
float dupx, dupy, fscalew, fscaleh, fwidth, fheight;
|
||||
|
||||
if (alphalevel >= 10 && alphalevel < 13)
|
||||
if (alphalevel >= 12 && alphalevel < 13)
|
||||
return;
|
||||
|
||||
// make patch ready in hardware cache
|
||||
|
|
@ -268,7 +268,9 @@ void HWR_DrawStretchyFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t
|
|||
{
|
||||
FSurfaceInfo Surf;
|
||||
Surf.PolyColor.s.red = Surf.PolyColor.s.green = Surf.PolyColor.s.blue = 0xff;
|
||||
if (alphalevel == 13) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency];
|
||||
if (alphalevel == 10) { flags &= ~PF_Translucent; flags |= PF_Additive; }
|
||||
else if (alphalevel == 11) { flags &= ~PF_Translucent; flags |= PF_Substractive; }
|
||||
else if (alphalevel == 13) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency];
|
||||
else if (alphalevel == 14) Surf.PolyColor.s.alpha = softwaretranstogl[st_translucency];
|
||||
else if (alphalevel == 15) Surf.PolyColor.s.alpha = softwaretranstogl_hi[st_translucency];
|
||||
else Surf.PolyColor.s.alpha = softwaretranstogl[10-alphalevel];
|
||||
|
|
@ -293,7 +295,7 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
|||
// 0--1
|
||||
float dupx, dupy, fscale, fwidth, fheight;
|
||||
|
||||
if (alphalevel >= 10 && alphalevel < 13)
|
||||
if (alphalevel >= 12 && alphalevel < 13)
|
||||
return;
|
||||
|
||||
// make patch ready in hardware cache
|
||||
|
|
@ -426,7 +428,9 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
|||
{
|
||||
FSurfaceInfo Surf;
|
||||
Surf.PolyColor.s.red = Surf.PolyColor.s.green = Surf.PolyColor.s.blue = 0xff;
|
||||
if (alphalevel == 13) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency];
|
||||
if (alphalevel == 10) { flags &= ~PF_Translucent; flags |= PF_Additive; }
|
||||
else if (alphalevel == 11) { flags &= ~PF_Translucent; flags |= PF_Substractive; }
|
||||
else if (alphalevel == 13) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency];
|
||||
else if (alphalevel == 14) Surf.PolyColor.s.alpha = softwaretranstogl[st_translucency];
|
||||
else if (alphalevel == 15) Surf.PolyColor.s.alpha = softwaretranstogl_hi[st_translucency];
|
||||
else Surf.PolyColor.s.alpha = softwaretranstogl[10-alphalevel];
|
||||
|
|
|
|||
|
|
@ -551,7 +551,7 @@ void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vsca
|
|||
else if (alphalevel == 15)
|
||||
alphalevel = hudplusalpha[st_translucency];
|
||||
|
||||
if (alphalevel >= 10)
|
||||
if (alphalevel >= 12)
|
||||
return; // invis
|
||||
|
||||
if (alphalevel)
|
||||
|
|
@ -744,7 +744,7 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
|
|||
else if (alphalevel == 15)
|
||||
alphalevel = hudplusalpha[st_translucency];
|
||||
|
||||
if (alphalevel >= 10)
|
||||
if (alphalevel >= 12)
|
||||
return; // invis
|
||||
|
||||
if (alphalevel)
|
||||
|
|
@ -997,7 +997,7 @@ void V_DrawFillConsoleMap(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
|
|||
else if (alphalevel == 15)
|
||||
alphalevel = hudplusalpha[st_translucency];
|
||||
|
||||
if (alphalevel >= 10)
|
||||
if (alphalevel >= 12)
|
||||
return; // invis
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -120,6 +120,8 @@ void V_CubeApply(UINT8 *red, UINT8 *green, UINT8 *blue);
|
|||
#define V_70TRANS 0x00070000
|
||||
#define V_80TRANS 0x00080000 // used to be V_8020TRANS
|
||||
#define V_90TRANS 0x00090000
|
||||
#define V_ADDTRANS 0x000A0000
|
||||
#define V_SUBTRANS 0x000B0000
|
||||
#define V_HUDTRANSHALF 0x000D0000
|
||||
#define V_HUDTRANS 0x000E0000 // draw the hud translucent
|
||||
#define V_HUDTRANSDOUBLE 0x000F0000
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue