mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Blendmode support for weather
This commit is contained in:
parent
f84baf47d5
commit
35cc746adf
1 changed files with 15 additions and 6 deletions
|
|
@ -2188,6 +2188,9 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||||
//SoM: 3/17/2000
|
//SoM: 3/17/2000
|
||||||
fixed_t gz, gzt;
|
fixed_t gz, gzt;
|
||||||
|
|
||||||
|
UINT32 blendmode;
|
||||||
|
UINT32 trans;
|
||||||
|
|
||||||
// uncapped/interpolation
|
// uncapped/interpolation
|
||||||
interpmobjstate_t interp = {0};
|
interpmobjstate_t interp = {0};
|
||||||
|
|
||||||
|
|
@ -2281,6 +2284,17 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||||
goto weatherthink;
|
goto weatherthink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Determine the blendmode and translucency value
|
||||||
|
{
|
||||||
|
blendmode = (thing->frame & FF_BLENDMASK) >> FF_BLENDSHIFT;
|
||||||
|
if (blendmode)
|
||||||
|
blendmode++; // realign to constants
|
||||||
|
|
||||||
|
trans = (thing->frame & FF_TRANSMASK) >> FF_TRANSSHIFT;
|
||||||
|
if (trans >= NUMTRANSMAPS)
|
||||||
|
goto weatherthink; // cap
|
||||||
|
}
|
||||||
|
|
||||||
// store information in a vissprite
|
// store information in a vissprite
|
||||||
vis = R_NewVisSprite();
|
vis = R_NewVisSprite();
|
||||||
vis->scale = vis->sortscale = yscale; //<<detailshift;
|
vis->scale = vis->sortscale = yscale; //<<detailshift;
|
||||||
|
|
@ -2318,12 +2332,7 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||||
// than lumpid for sprites-in-pwad : the graphics are patched
|
// than lumpid for sprites-in-pwad : the graphics are patched
|
||||||
vis->patch = W_CachePatchNum(sprframe->lumppat[0], PU_SPRITE);
|
vis->patch = W_CachePatchNum(sprframe->lumppat[0], PU_SPRITE);
|
||||||
|
|
||||||
// specific translucency
|
vis->transmap = R_GetBlendTable(blendmode, trans);
|
||||||
// (no draw flags)
|
|
||||||
if (thing->frame & FF_TRANSMASK)
|
|
||||||
vis->transmap = ((thing->frame & FF_TRANSMASK) - FF_TRANS10) + transtables;
|
|
||||||
else
|
|
||||||
vis->transmap = NULL;
|
|
||||||
|
|
||||||
vis->mobj = (mobj_t *)thing;
|
vis->mobj = (mobj_t *)thing;
|
||||||
vis->mobjflags = 0;
|
vis->mobjflags = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue