mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 15:22:20 +00:00
Partial undo of what I did last commit to make Inu happy again.
Note: polyobj_t's "translucency" is apparently a SIGNED integer, so in theory it's possible to get polyobj flats to use the "spanfunc = splatfunc" line using negative values. If this is not meant to happen, this should probably be fixed asap Conflicts: src/f_wipe.c
This commit is contained in:
parent
734419d549
commit
1e131d2786
5 changed files with 30 additions and 30 deletions
|
@ -750,8 +750,8 @@ void R_DrawSinglePlane(visplane_t *pl)
|
|||
// Hacked up support for alpha value in software mode Tails 09-24-2002 (sidenote: ported to polys 10-15-2014, there was no time travel involved -Red)
|
||||
if (pl->polyobj->translucency >= 10)
|
||||
return; // Don't even draw it
|
||||
else if (pl->polyobj->translucency <= 9 && pl->polyobj->translucency > 0)
|
||||
ds_transmap = transtables + ((pl->polyobj->translucency-1)<<16);
|
||||
else if (pl->polyobj->translucency > 0)
|
||||
ds_transmap = transtables + ((pl->polyobj->translucency-1)<<FF_TRANSSHIFT);
|
||||
else // Opaque, but allow transparent flat pixels
|
||||
spanfunc = splatfunc;
|
||||
|
||||
|
@ -789,23 +789,23 @@ void R_DrawSinglePlane(visplane_t *pl)
|
|||
if (pl->ffloor->alpha < 12)
|
||||
return; // Don't even draw it
|
||||
else if (pl->ffloor->alpha < 38)
|
||||
ds_transmap = transtables + ((tr_trans90-1)<<16);
|
||||
ds_transmap = transtables + ((tr_trans90-1)<<FF_TRANSSHIFT);
|
||||
else if (pl->ffloor->alpha < 64)
|
||||
ds_transmap = transtables + ((tr_trans80-1)<<16);
|
||||
ds_transmap = transtables + ((tr_trans80-1)<<FF_TRANSSHIFT);
|
||||
else if (pl->ffloor->alpha < 89)
|
||||
ds_transmap = transtables + ((tr_trans70-1)<<16);
|
||||
ds_transmap = transtables + ((tr_trans70-1)<<FF_TRANSSHIFT);
|
||||
else if (pl->ffloor->alpha < 115)
|
||||
ds_transmap = transtables + ((tr_trans60-1)<<16);
|
||||
ds_transmap = transtables + ((tr_trans60-1)<<FF_TRANSSHIFT);
|
||||
else if (pl->ffloor->alpha < 140)
|
||||
ds_transmap = transtables + ((tr_trans50-1)<<16);
|
||||
ds_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||
else if (pl->ffloor->alpha < 166)
|
||||
ds_transmap = transtables + ((tr_trans40-1)<<16);
|
||||
ds_transmap = transtables + ((tr_trans40-1)<<FF_TRANSSHIFT);
|
||||
else if (pl->ffloor->alpha < 192)
|
||||
ds_transmap = transtables + ((tr_trans30-1)<<16);
|
||||
ds_transmap = transtables + ((tr_trans30-1)<<FF_TRANSSHIFT);
|
||||
else if (pl->ffloor->alpha < 217)
|
||||
ds_transmap = transtables + ((tr_trans20-1)<<16);
|
||||
ds_transmap = transtables + ((tr_trans20-1)<<FF_TRANSSHIFT);
|
||||
else if (pl->ffloor->alpha < 243)
|
||||
ds_transmap = transtables + ((tr_trans10-1)<<16);
|
||||
ds_transmap = transtables + ((tr_trans10-1)<<FF_TRANSSHIFT);
|
||||
else // Opaque, but allow transparent flat pixels
|
||||
spanfunc = splatfunc;
|
||||
|
||||
|
@ -1066,7 +1066,7 @@ using the palette colors.
|
|||
if (spanfunc == R_DrawSpan_8)
|
||||
{
|
||||
INT32 i;
|
||||
ds_transmap = transtables + ((tr_trans50-1)<<16);
|
||||
ds_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||
spanfunc = R_DrawTranslucentSpan_8;
|
||||
for (i=0; i<4; i++)
|
||||
{
|
||||
|
|
24
src/r_segs.c
24
src/r_segs.c
|
@ -183,7 +183,7 @@ static void R_DrawWallSplats(void)
|
|||
colfunc = basecolfunc;
|
||||
else
|
||||
{
|
||||
dc_transmap = transtables + ((tr_trans50 - 1)<<16);
|
||||
dc_transmap = transtables + ((tr_trans50 - 1)<<FF_TRANSSHIFT);
|
||||
colfunc = fuzzcolfunc;
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
case 906:
|
||||
case 907:
|
||||
case 908:
|
||||
dc_transmap = transtables + ((ldef->special-900)<<16);
|
||||
dc_transmap = transtables + ((ldef->special-900)<<FF_TRANSSHIFT);
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 909:
|
||||
|
@ -330,7 +330,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
if (curline->polyseg->translucency >= NUMTRANSMAPS)
|
||||
return;
|
||||
|
||||
dc_transmap = transtables + ((curline->polyseg->translucency-1)<<16);
|
||||
dc_transmap = transtables + ((curline->polyseg->translucency-1)<<FF_TRANSSHIFT);
|
||||
colfunc = fuzzcolfunc;
|
||||
}
|
||||
|
||||
|
@ -709,23 +709,23 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
if (pfloor->alpha < 12)
|
||||
return; // Don't even draw it
|
||||
else if (pfloor->alpha < 38)
|
||||
dc_transmap = transtables + ((tr_trans90-1)<<16);
|
||||
dc_transmap = transtables + ((tr_trans90-1)<<FF_TRANSSHIFT);
|
||||
else if (pfloor->alpha < 64)
|
||||
dc_transmap = transtables + ((tr_trans80-1)<<16);
|
||||
dc_transmap = transtables + ((tr_trans80-1)<<FF_TRANSSHIFT);
|
||||
else if (pfloor->alpha < 89)
|
||||
dc_transmap = transtables + ((tr_trans70-1)<<16);
|
||||
dc_transmap = transtables + ((tr_trans70-1)<<FF_TRANSSHIFT);
|
||||
else if (pfloor->alpha < 115)
|
||||
dc_transmap = transtables + ((tr_trans60-1)<<16);
|
||||
dc_transmap = transtables + ((tr_trans60-1)<<FF_TRANSSHIFT);
|
||||
else if (pfloor->alpha < 140)
|
||||
dc_transmap = transtables + ((tr_trans50-1)<<16);
|
||||
dc_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||
else if (pfloor->alpha < 166)
|
||||
dc_transmap = transtables + ((tr_trans40-1)<<16);
|
||||
dc_transmap = transtables + ((tr_trans40-1)<<FF_TRANSSHIFT);
|
||||
else if (pfloor->alpha < 192)
|
||||
dc_transmap = transtables + ((tr_trans30-1)<<16);
|
||||
dc_transmap = transtables + ((tr_trans30-1)<<FF_TRANSSHIFT);
|
||||
else if (pfloor->alpha < 217)
|
||||
dc_transmap = transtables + ((tr_trans20-1)<<16);
|
||||
dc_transmap = transtables + ((tr_trans20-1)<<FF_TRANSSHIFT);
|
||||
else if (pfloor->alpha < 243)
|
||||
dc_transmap = transtables + ((tr_trans10-1)<<16);
|
||||
dc_transmap = transtables + ((tr_trans10-1)<<FF_TRANSSHIFT);
|
||||
else
|
||||
fuzzy = false; // Opaque
|
||||
|
||||
|
|
|
@ -503,7 +503,7 @@ static void R_RenderFloorSplat(floorsplat_t *pSplat, vertex_t *verts, UINT8 *pTe
|
|||
{
|
||||
ds_x1 = x1;
|
||||
ds_x2 = x2;
|
||||
ds_transmap = transtables + ((tr_trans50-1)<<16);
|
||||
ds_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||
splatfunc();
|
||||
}
|
||||
|
||||
|
|
|
@ -1321,9 +1321,9 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
if (!cv_translucency.value)
|
||||
; // no translucency
|
||||
else if (thing->flags2 & MF2_SHADOW) // actually only the player should use this (temporary invisibility)
|
||||
vis->transmap = transtables + ((tr_trans80-1)<<16); // because now the translucency is set through FF_TRANSMASK
|
||||
vis->transmap = transtables + ((tr_trans80-1)<<FF_TRANSSHIFT); // because now the translucency is set through FF_TRANSMASK
|
||||
else if (thing->frame & FF_TRANSMASK)
|
||||
vis->transmap = transtables + ((((thing->frame & FF_TRANSMASK)>>FF_TRANSSHIFT)-1)<<16);
|
||||
vis->transmap = transtables + (thing->frame & FF_TRANSMASK) - 0x10000;
|
||||
|
||||
if (((thing->frame & FF_FULLBRIGHT) || (thing->flags2 & MF2_SHADOW))
|
||||
&& (!vis->extra_colormap || !vis->extra_colormap->fog))
|
||||
|
|
|
@ -366,7 +366,7 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
|||
}
|
||||
if (alphalevel)
|
||||
{
|
||||
v_translevel = transtables + ((alphalevel-1)<<16);
|
||||
v_translevel = transtables + ((alphalevel-1)<<FF_TRANSSHIFT);
|
||||
patchdrawfunc = translucentpdraw;
|
||||
}
|
||||
|
||||
|
@ -1869,7 +1869,7 @@ void V_DoPostProcessor(INT32 view, postimg_t type, INT32 param)
|
|||
angle_t disStart = (leveltime * 128) & FINEMASK; // in 0 to FINEANGLE
|
||||
INT32 newpix;
|
||||
INT32 sine;
|
||||
//UINT8 *transme = transtables + ((tr_trans50-1)<<16);
|
||||
//UINT8 *transme = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||
|
||||
for (y = yoffset; y < yoffset+height; y++)
|
||||
{
|
||||
|
@ -1926,7 +1926,7 @@ Unoptimized version
|
|||
INT32 x, y;
|
||||
|
||||
// TODO: Add a postimg_param so that we can pick the translucency level...
|
||||
UINT8 *transme = transtables + ((param-1)<<16);
|
||||
UINT8 *transme = transtables + ((param-1)<<FF_TRANSSHIFT);
|
||||
|
||||
for (y = yoffset; y < yoffset+height; y++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue