diff --git a/src/dehacked.c b/src/dehacked.c index 6a59df31c..57571b0c0 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -11653,6 +11653,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}, diff --git a/src/hardware/hw_draw.c b/src/hardware/hw_draw.c index 0fe237e24..69f37a29b 100644 --- a/src/hardware/hw_draw.c +++ b/src/hardware/hw_draw.c @@ -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]; diff --git a/src/v_video.c b/src/v_video.c index 89020eae8..3e2935a46 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -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 } diff --git a/src/v_video.h b/src/v_video.h index 49ab33028..7dd44a460 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -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