mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Change all remaining instances (hopefully) of UINT32 to fixed_t for alpha
This commit is contained in:
parent
5668e02857
commit
509adc3454
3 changed files with 8 additions and 8 deletions
|
@ -3000,7 +3000,7 @@ static void HWR_SplitSprite(gl_vissprite_t *spr)
|
|||
// co-ordinates
|
||||
memcpy(wallVerts, baseWallVerts, sizeof(baseWallVerts));
|
||||
|
||||
UINT32 newalpha = spr->mobj->alpha;
|
||||
fixed_t newalpha = spr->mobj->alpha;
|
||||
|
||||
// if sprite has linkdraw, then dont write to z-buffer (by not using PF_Occlude)
|
||||
// this will result in sprites drawn afterwards to be drawn on top like intended when using linkdraw.
|
||||
|
@ -3495,7 +3495,7 @@ static void HWR_DrawSprite(gl_vissprite_t *spr)
|
|||
FBITFIELD blend = 0;
|
||||
FBITFIELD occlusion;
|
||||
boolean use_linkdraw_hack = false;
|
||||
UINT32 newalpha = spr->mobj->alpha;
|
||||
fixed_t newalpha = spr->mobj->alpha;
|
||||
|
||||
// if sprite has linkdraw, then dont write to z-buffer (by not using PF_Occlude)
|
||||
// this will result in sprites drawn afterwards to be drawn on top like intended when using linkdraw.
|
||||
|
|
|
@ -763,7 +763,7 @@ UINT8 *R_GetTranslationForThing(mobj_t *mobj, skincolornum_t color, UINT16 trans
|
|||
return NULL;
|
||||
}
|
||||
|
||||
transnum_t R_GetTransmapFromAlpha(UINT32 alpha, transnum_t transmap)
|
||||
transnum_t R_GetTransmapFromAlpha(fixed_t alpha, transnum_t transmap)
|
||||
{
|
||||
INT32 value = 10 - transmap;
|
||||
value = 10 - (FixedCeil(alpha * value)>>FRACBITS);
|
||||
|
@ -1276,7 +1276,7 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t scale,
|
|||
floordiff = abs((isflipped ? interp.height : 0) + interp.z - groundz);
|
||||
|
||||
trans = floordiff / (100*FRACUNIT) + 3;
|
||||
trans = R_GetTransmapFromAlpha((UINT32)thing->alpha, trans);
|
||||
trans = R_GetTransmapFromAlpha(thing->alpha, trans);
|
||||
if (trans >= 9) return;
|
||||
|
||||
scalemul = FixedMul(FRACUNIT - floordiff/640, scale);
|
||||
|
@ -1963,9 +1963,9 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
trans = 0;
|
||||
|
||||
if ((oldthing->flags2 & MF2_LINKDRAW) && oldthing->tracer)
|
||||
trans = R_GetTransmapFromAlpha((UINT32)oldthing->tracer->alpha, trans);
|
||||
trans = R_GetTransmapFromAlpha(oldthing->tracer->alpha, trans);
|
||||
else
|
||||
trans = R_GetTransmapFromAlpha((UINT32)oldthing->alpha, trans);
|
||||
trans = R_GetTransmapFromAlpha(oldthing->alpha, trans);
|
||||
|
||||
// Check if this sprite needs to be rendered like a shadow
|
||||
shadowdraw = (!!(thing->renderflags & RF_SHADOWDRAW) && !(papersprite || splat));
|
||||
|
@ -3428,7 +3428,7 @@ boolean R_ThingVisible (mobj_t *thing)
|
|||
(thing->sprite == SPR_NULL) || // Don't draw null-sprites
|
||||
(thing->flags2 & MF2_DONTDRAW) || // Don't draw MF2_LINKDRAW objects
|
||||
(thing->drawonlyforplayer && thing->drawonlyforplayer != viewplayer) || // Don't draw other players' personal objects
|
||||
((rendermode == render_soft && R_GetTransmapFromAlpha((UINT32)thing->alpha, (thing->frame & FF_TRANSMASK)>>FF_TRANSSHIFT) >= 10) ||
|
||||
((rendermode == render_soft && R_GetTransmapFromAlpha(thing->alpha, (thing->frame & FF_TRANSMASK)>>FF_TRANSSHIFT) >= 10) ||
|
||||
(rendermode == render_opengl && thing->alpha == 0)) ||
|
||||
(!P_MobjWasRemoved(r_viewmobj) && (
|
||||
(r_viewmobj == thing) || // Don't draw first-person players or awayviewmobj objects
|
||||
|
|
|
@ -90,7 +90,7 @@ boolean R_ThingIsFullDark (mobj_t *thing);
|
|||
boolean R_ThingIsFlashing (mobj_t *thing);
|
||||
|
||||
UINT8 *R_GetTranslationForThing(mobj_t *mobj, skincolornum_t color, UINT16 translation);
|
||||
transnum_t R_GetTransmapFromAlpha(UINT32 alpha, transnum_t transmap);
|
||||
transnum_t R_GetTransmapFromAlpha(fixed_t alpha, transnum_t transmap);
|
||||
|
||||
void R_ThingOffsetOverlay (mobj_t *thing, fixed_t *outx, fixed_t *outy);
|
||||
|
||||
|
|
Loading…
Reference in a new issue