'Fix' Mauro Mania static effect (by shuffling video flags)
This commit is contained in:
parent
ebea1395d4
commit
5259bab788
3 changed files with 38 additions and 31 deletions
|
|
@ -326,14 +326,16 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p
|
|||
|
||||
flags |= HWR_GetBlendModeFlag(blendmode);
|
||||
|
||||
if (alphalevel == 10)
|
||||
if (alphalevel == 13)
|
||||
Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency];
|
||||
else if (alphalevel == 11)
|
||||
else if (alphalevel == 14)
|
||||
Surf.PolyColor.s.alpha = softwaretranstogl[st_translucency];
|
||||
else if (alphalevel == 12)
|
||||
else if (alphalevel == 15)
|
||||
Surf.PolyColor.s.alpha = softwaretranstogl_hi[st_translucency];
|
||||
else if (alphalevel < 10)
|
||||
Surf.PolyColor.s.alpha = softwaretranstogl[min(max((10 - alphalevel), 0), 10)];
|
||||
else
|
||||
Surf.PolyColor.s.alpha = 0;
|
||||
|
||||
HWD.pfnDrawPolygon(&Surf, v, 4, flags|PF_Modulated);
|
||||
}
|
||||
|
|
@ -480,14 +482,16 @@ void HWR_DrawCroppedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
|
|||
|
||||
flags |= HWR_GetBlendModeFlag(blendmode);
|
||||
|
||||
if (alphalevel == 10)
|
||||
if (alphalevel == 13)
|
||||
Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency];
|
||||
else if (alphalevel == 11)
|
||||
else if (alphalevel == 14)
|
||||
Surf.PolyColor.s.alpha = softwaretranstogl[st_translucency];
|
||||
else if (alphalevel == 12)
|
||||
else if (alphalevel == 15)
|
||||
Surf.PolyColor.s.alpha = softwaretranstogl_hi[st_translucency];
|
||||
else
|
||||
else if (alphalevel < 10)
|
||||
Surf.PolyColor.s.alpha = softwaretranstogl[min(max((10 - alphalevel), 0), 10)];
|
||||
else
|
||||
Surf.PolyColor.s.alpha = 0;
|
||||
|
||||
HWD.pfnDrawPolygon(&Surf, v, 4, flags|PF_Modulated);
|
||||
}
|
||||
|
|
@ -1195,10 +1199,11 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
|
|||
|
||||
if (alphalevel)
|
||||
{
|
||||
if (alphalevel == 10) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency]; // V_HUDTRANSHALF
|
||||
else if (alphalevel == 11) Surf.PolyColor.s.alpha = softwaretranstogl[st_translucency]; // V_HUDTRANS
|
||||
else if (alphalevel == 12) Surf.PolyColor.s.alpha = softwaretranstogl_hi[st_translucency]; // V_HUDTRANSDOUBLE
|
||||
else Surf.PolyColor.s.alpha = softwaretranstogl[min(max((10 - alphalevel), 0), 10)];
|
||||
if (alphalevel == 13) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency]; // V_HUDTRANSHALF
|
||||
else if (alphalevel == 14) Surf.PolyColor.s.alpha = softwaretranstogl[st_translucency]; // V_HUDTRANS
|
||||
else if (alphalevel == 15) Surf.PolyColor.s.alpha = softwaretranstogl_hi[st_translucency]; // V_HUDTRANSDOUBLE
|
||||
else if (alphalevel < 10) Surf.PolyColor.s.alpha = softwaretranstogl[min(max((10 - alphalevel), 0), 10)];
|
||||
else Surf.PolyColor.s.alpha = 0;
|
||||
}
|
||||
|
||||
HWD.pfnDrawPolygon(&Surf, v, 4,
|
||||
|
|
|
|||
|
|
@ -788,11 +788,11 @@ void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vsca
|
|||
blendmode++; // realign to constants
|
||||
if ((alphalevel = ((scrn & V_ALPHAMASK) >> V_ALPHASHIFT)))
|
||||
{
|
||||
if (alphalevel == 10) // V_HUDTRANSHALF
|
||||
if (alphalevel == 13) // V_HUDTRANSHALF
|
||||
alphalevel = hudminusalpha[st_translucency];
|
||||
else if (alphalevel == 11) // V_HUDTRANS
|
||||
else if (alphalevel == 14) // V_HUDTRANS
|
||||
alphalevel = 10 - st_translucency;
|
||||
else if (alphalevel == 12) // V_HUDTRANSDOUBLE
|
||||
else if (alphalevel == 15) // V_HUDTRANSDOUBLE
|
||||
alphalevel = hudplusalpha[st_translucency];
|
||||
|
||||
if (alphalevel >= 10) // Still inelegible to render?
|
||||
|
|
@ -1065,11 +1065,11 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
|
|||
v_translevel = NULL;
|
||||
if (alphalevel || blendmode)
|
||||
{
|
||||
if (alphalevel == 10) // V_HUDTRANSHALF
|
||||
if (alphalevel == 13) // V_HUDTRANSHALF
|
||||
alphalevel = hudminusalpha[st_translucency];
|
||||
else if (alphalevel == 11) // V_HUDTRANS
|
||||
else if (alphalevel == 14) // V_HUDTRANS
|
||||
alphalevel = 10 - st_translucency;
|
||||
else if (alphalevel == 12) // V_HUDTRANSDOUBLE
|
||||
else if (alphalevel == 15) // V_HUDTRANSDOUBLE
|
||||
alphalevel = hudplusalpha[st_translucency];
|
||||
|
||||
if (alphalevel >= 10)
|
||||
|
|
@ -1211,11 +1211,11 @@ void V_DrawFillConsoleMap(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
|
|||
|
||||
if ((alphalevel = ((c & V_ALPHAMASK) >> V_ALPHASHIFT)))
|
||||
{
|
||||
if (alphalevel == 10) // V_HUDTRANSHALF
|
||||
if (alphalevel == 13) // V_HUDTRANSHALF
|
||||
alphalevel = hudminusalpha[st_translucency];
|
||||
else if (alphalevel == 11) // V_HUDTRANS
|
||||
else if (alphalevel == 14) // V_HUDTRANS
|
||||
alphalevel = 10 - st_translucency;
|
||||
else if (alphalevel == 12) // V_HUDTRANSDOUBLE
|
||||
else if (alphalevel == 15) // V_HUDTRANSDOUBLE
|
||||
alphalevel = hudplusalpha[st_translucency];
|
||||
|
||||
if (alphalevel >= 10) // Still inelegible to render?
|
||||
|
|
|
|||
|
|
@ -141,17 +141,24 @@ 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_HUDTRANSHALF 0x000A0000
|
||||
#define V_HUDTRANS 0x000B0000 // draw the hud translucent
|
||||
#define V_HUDTRANSDOUBLE 0x000C0000
|
||||
#define V_HUDTRANSHALF 0x000D0000
|
||||
#define V_HUDTRANS 0x000E0000 // draw the hud translucent
|
||||
#define V_HUDTRANSDOUBLE 0x000F0000
|
||||
// Macros follow
|
||||
#define V_USERHUDTRANSHALF ((10-(cv_translucenthud.value/2))<<V_ALPHASHIFT)
|
||||
#define V_USERHUDTRANS ((10-cv_translucenthud.value)<<V_ALPHASHIFT)
|
||||
#define V_USERHUDTRANSDOUBLE ((10-min(cv_translucenthud.value*2, 10))<<V_ALPHASHIFT)
|
||||
|
||||
// use bits 21-23 for blendmodes
|
||||
#define V_BLENDSHIFT 20
|
||||
#define V_BLENDMASK 0x00700000
|
||||
// careful with the 4 bits after V_ALPHAMASK; mauromania inadvertently sets these
|
||||
|
||||
#define V_SNAPTOTOP 0x00100000 // for centering
|
||||
#define V_SNAPTOBOTTOM 0x00200000 // for centering
|
||||
#define V_SNAPTOLEFT 0x00400000 // for centering
|
||||
#define V_SNAPTORIGHT 0x00800000 // for centering
|
||||
|
||||
// use bits 25-27 for blendmodes
|
||||
#define V_BLENDSHIFT 24
|
||||
#define V_BLENDMASK 0x07000000
|
||||
// preshifted blend flags minus 1 as effects don't distinguish between AST_COPY and AST_TRANSLUCENT
|
||||
#define V_ADD ((AST_ADD-1)<<V_BLENDSHIFT) // Additive
|
||||
#define V_SUBTRACT ((AST_SUBTRACT-1)<<V_BLENDSHIFT) // Subtractive
|
||||
|
|
@ -159,11 +166,6 @@ void V_CubeApply(UINT8 *red, UINT8 *green, UINT8 *blue);
|
|||
#define V_MODULATE ((AST_MODULATE-1)<<V_BLENDSHIFT) // Modulate
|
||||
#define V_OVERLAY ((AST_OVERLAY-1)<<V_BLENDSHIFT) // Overlay
|
||||
|
||||
#define V_SNAPTOTOP 0x01000000 // for centering
|
||||
#define V_SNAPTOBOTTOM 0x02000000 // for centering
|
||||
#define V_SNAPTOLEFT 0x04000000 // for centering
|
||||
#define V_SNAPTORIGHT 0x08000000 // for centering
|
||||
|
||||
#define V_ALLOWLOWERCASE 0x10000000 // (strings only) allow fonts that have lowercase letters to use them
|
||||
#define V_FLIP 0x10000000 // (patches only) Horizontal flip
|
||||
#define V_SLIDEIN 0x20000000 // Slide in from the sides on level load, depending on snap flags
|
||||
|
|
|
|||
Loading…
Reference in a new issue