Move alpha blend test to helper to simplify merge
This commit is contained in:
parent
828ced10a5
commit
1b44fe5844
|
@ -177,6 +177,11 @@ void flash_frame()
|
|||
extern int Current_level_num;
|
||||
#endif
|
||||
|
||||
static inline int is_alphablend_eclip(int eclip_num)
|
||||
{
|
||||
return eclip_num == ECLIP_NUM_FUELCEN;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Render a face.
|
||||
// It would be nice to not have to pass in segnum and sidenum, but they are used for our
|
||||
|
@ -280,7 +285,7 @@ void render_face(int segnum, int sidenum, int nv, int *vp, int tmap1, int tmap2,
|
|||
}
|
||||
|
||||
|
||||
if ( PlayerCfg.AlphaEffects && ( TmapInfo[tmap1].eclip_num == ECLIP_NUM_FUELCEN ) ) // set nice transparency/blending for some special effects (if we do more, we should maybe use switch here)
|
||||
if ( PlayerCfg.AlphaEffects && is_alphablend_eclip(TmapInfo[tmap1].eclip_num) ) // set nice transparency/blending for some special effects (if we do more, we should maybe use switch here)
|
||||
gr_settransblend(GR_FADE_OFF, GR_BLEND_ADDITIVE_C);
|
||||
|
||||
#ifdef EDITOR
|
||||
|
|
|
@ -191,6 +191,13 @@ void flash_frame()
|
|||
|
||||
}
|
||||
|
||||
static inline int is_alphablend_eclip(int eclip_num)
|
||||
{
|
||||
if (eclip_num == ECLIP_NUM_FORCE_FIELD)
|
||||
return 1;
|
||||
return eclip_num == ECLIP_NUM_FUELCEN;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Render a face.
|
||||
// It would be nice to not have to pass in segnum and sidenum, but
|
||||
|
@ -313,7 +320,7 @@ void render_face(int segnum, int sidenum, int nv, int *vp, int tmap1, int tmap2,
|
|||
}
|
||||
}
|
||||
|
||||
if ( PlayerCfg.AlphaEffects && ( TmapInfo[tmap1].eclip_num == ECLIP_NUM_FUELCEN || TmapInfo[tmap1].eclip_num == ECLIP_NUM_FORCE_FIELD ) ) // set nice transparency/blending for some special effects (if we do more, we should maybe use switch here)
|
||||
if ( PlayerCfg.AlphaEffects && is_alphablend_eclip(TmapInfo[tmap1].eclip_num) ) // set nice transparency/blending for some special effects (if we do more, we should maybe use switch here)
|
||||
gr_settransblend(GR_FADE_OFF, GR_BLEND_ADDITIVE_C);
|
||||
|
||||
#ifdef EDITOR
|
||||
|
|
Loading…
Reference in a new issue