mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-17 18:21:10 +00:00
doesn't do anything in ogl sorry, inu might change that later but
This commit is contained in:
parent
9fc757f388
commit
a66567ea0f
5 changed files with 45 additions and 23 deletions
|
@ -7672,6 +7672,7 @@ struct {
|
|||
{"V_70TRANS",V_70TRANS},
|
||||
{"V_80TRANS",V_80TRANS},
|
||||
{"V_90TRANS",V_90TRANS},
|
||||
{"V_STATIC",V_STATIC},
|
||||
{"V_HUDTRANSHALF",V_HUDTRANSHALF},
|
||||
{"V_HUDTRANS",V_HUDTRANS},
|
||||
{"V_HUDTRANSDOUBLE",V_HUDTRANSDOUBLE},
|
||||
|
|
|
@ -152,7 +152,9 @@ void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
|
|||
float pdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f*FIXED_TO_FLOAT(pscale);
|
||||
float pdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f*FIXED_TO_FLOAT(pscale);
|
||||
|
||||
if (alphalevel >= 10 && alphalevel < 13)
|
||||
if (alphalevel == 12)
|
||||
alphalevel = 0;
|
||||
else if (alphalevel >= 10 && alphalevel < 13)
|
||||
return;
|
||||
|
||||
// make patch ready in hardware cache
|
||||
|
@ -252,7 +254,9 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
|||
float pdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f*FIXED_TO_FLOAT(pscale);
|
||||
float pdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f*FIXED_TO_FLOAT(pscale);
|
||||
|
||||
if (alphalevel >= 10 && alphalevel < 13)
|
||||
if (alphalevel == 12)
|
||||
alphalevel = 0;
|
||||
else if (alphalevel >= 10 && alphalevel < 13)
|
||||
return;
|
||||
|
||||
// make patch ready in hardware cache
|
||||
|
|
17
src/m_menu.c
17
src/m_menu.c
|
@ -209,7 +209,7 @@ menu_t SPauseDef;
|
|||
// Level Select
|
||||
static levelselect_t levelselect = {0, NULL};
|
||||
static UINT8 levelselectselect[4];
|
||||
static patch_t *levselp[4];
|
||||
static patch_t *levselp[3];
|
||||
static INT32 lsoffs[2];
|
||||
|
||||
#define lsrow levelselectselect[0]
|
||||
|
@ -3803,13 +3803,11 @@ static boolean M_PrepareLevelPlatter(INT32 gt)
|
|||
W_UnlockCachedPatch(levselp[0]);
|
||||
W_UnlockCachedPatch(levselp[1]);
|
||||
W_UnlockCachedPatch(levselp[2]);
|
||||
W_UnlockCachedPatch(levselp[3]);
|
||||
}
|
||||
|
||||
levselp[0] = W_CachePatchName("SLCT1LVL", PU_STATIC);
|
||||
levselp[1] = W_CachePatchName("SLCT2LVL", PU_STATIC);
|
||||
levselp[2] = W_CachePatchName("BLANKLVL", PU_STATIC);
|
||||
levselp[3] = W_CachePatchName("STATCLVL", PU_STATIC);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -3979,13 +3977,16 @@ static void M_DrawLevelPlatterMap(UINT8 row, UINT8 col, INT32 x, INT32 y, boolea
|
|||
|
||||
// A 160x100 image of the level as entry MAPxxP
|
||||
if (!(levelselect.rows[row].mapavailable[col]))
|
||||
patch = ((lstic & 1) ? levselp[2] : levselp[3]); // static - make secret maps look ENTICING
|
||||
else if (W_CheckNumForName(va("%sP", G_BuildMapName(map))) != LUMPERROR)
|
||||
patch = W_CachePatchName(va("%sP", G_BuildMapName(map)), PU_CACHE);
|
||||
V_DrawSmallScaledPatch(x, y, V_STATIC, levselp[2]); // static - make secret maps look ENTICING
|
||||
else
|
||||
patch = levselp[2]; // don't flash to indicate that it's just a normal level
|
||||
{
|
||||
if (W_CheckNumForName(va("%sP", G_BuildMapName(map))) != LUMPERROR)
|
||||
patch = W_CachePatchName(va("%sP", G_BuildMapName(map)), PU_CACHE);
|
||||
else
|
||||
patch = levselp[2]; // don't flash to indicate that it's just a normal level
|
||||
|
||||
V_DrawSmallScaledPatch(x, y, 0, patch);
|
||||
V_DrawSmallScaledPatch(x, y, 0, patch);
|
||||
}
|
||||
|
||||
if ((y+50) < 200)
|
||||
{
|
||||
|
|
|
@ -325,6 +325,13 @@ static inline UINT8 transmappedpdraw(const UINT8 *dest, const UINT8 *source, fix
|
|||
{
|
||||
return *(v_translevel + (((*(v_colormap + source[ofs>>FRACBITS]))<<8)&0xff00) + (*dest&0xff));
|
||||
}
|
||||
static inline UINT8 staticpdraw(const UINT8 *dest, const UINT8 *source, fixed_t ofs)
|
||||
{
|
||||
UINT8 val = source[ofs>>FRACBITS];
|
||||
(void)dest;
|
||||
if (val < 7) return val;
|
||||
return M_RandomKey(7+1)+(val-7);//M_RandomByte();
|
||||
}
|
||||
|
||||
// Draws a patch scaled to arbitrary size.
|
||||
void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t *patch, const UINT8 *colormap)
|
||||
|
@ -356,22 +363,30 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
|||
patchdrawfunc = standardpdraw;
|
||||
|
||||
v_translevel = NULL;
|
||||
if ((alphalevel = ((scrn & V_ALPHAMASK) >> V_ALPHASHIFT)))
|
||||
if ((alphalevel = ((scrn & V_ALPHAMASK) >> V_ALPHASHIFT)) == 12) // static
|
||||
{
|
||||
if (alphalevel == 13)
|
||||
alphalevel = hudminusalpha[cv_translucenthud.value];
|
||||
else if (alphalevel == 14)
|
||||
alphalevel = 10 - cv_translucenthud.value;
|
||||
else if (alphalevel == 15)
|
||||
alphalevel = hudplusalpha[cv_translucenthud.value];
|
||||
|
||||
if (alphalevel >= 10)
|
||||
return; // invis
|
||||
alphalevel = 0;
|
||||
patchdrawfunc = staticpdraw;
|
||||
}
|
||||
if (alphalevel)
|
||||
else
|
||||
{
|
||||
v_translevel = transtables + ((alphalevel-1)<<FF_TRANSSHIFT);
|
||||
patchdrawfunc = translucentpdraw;
|
||||
if (alphalevel)
|
||||
{
|
||||
if (alphalevel == 13)
|
||||
alphalevel = hudminusalpha[cv_translucenthud.value];
|
||||
else if (alphalevel == 14)
|
||||
alphalevel = 10 - cv_translucenthud.value;
|
||||
else if (alphalevel == 15)
|
||||
alphalevel = hudplusalpha[cv_translucenthud.value];
|
||||
|
||||
if (alphalevel >= 10)
|
||||
return; // invis
|
||||
}
|
||||
if (alphalevel)
|
||||
{
|
||||
v_translevel = transtables + ((alphalevel-1)<<FF_TRANSSHIFT);
|
||||
patchdrawfunc = translucentpdraw;
|
||||
}
|
||||
}
|
||||
|
||||
v_colormap = NULL;
|
||||
|
|
|
@ -90,6 +90,7 @@ extern RGBA_t *pLocalPalette;
|
|||
#define V_70TRANS 0x00070000
|
||||
#define V_80TRANS 0x00080000 // used to be V_8020TRANS
|
||||
#define V_90TRANS 0x00090000
|
||||
#define V_STATIC 0x000C0000 // ogl unsupported kthnxbai
|
||||
#define V_HUDTRANSHALF 0x000D0000
|
||||
#define V_HUDTRANS 0x000E0000 // draw the hud translucent
|
||||
#define V_HUDTRANSDOUBLE 0x000F0000
|
||||
|
|
Loading…
Reference in a new issue