inline V_LocalTransFlag
its very smol
This commit is contained in:
1 parent
90bdd24de2
commit
2f66ba0126
2 files changed
+11
-12
No files matched your search
+4
-10
@@ -589,28 +589,22 @@ static UINT8 hudplusalpha[11] = { 10, 8, 6, 4, 2, 0, 0, 0, 0, 0, 0};
|
||||
static UINT8 hudminusalpha[11] = { 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5};
|
||||
UINT8 hudtrans = 0;
|
||||
|
||||
// this is pretty dumb, but has to be done like this, otherwise the fps counter just disappears sometimes for no reason lol
|
||||
INT32 V_LocalTransFlag(void)
|
||||
{
|
||||
return ((10-cv_translucenthud.value)*V_10TRANS);
|
||||
}
|
||||
|
||||
static const UINT8 *v_colormap = NULL;
|
||||
static const UINT8 *v_translevel = NULL;
|
||||
|
||||
static inline UINT8 standardpdraw(const UINT8 *dest, const UINT8 *source, fixed_t ofs)
|
||||
FUNCINLINE static ATTRINLINE UINT8 standardpdraw(const UINT8 *dest, const UINT8 *source, fixed_t ofs)
|
||||
{
|
||||
(void)dest; return source[ofs>>FRACBITS];
|
||||
}
|
||||
static inline UINT8 mappedpdraw(const UINT8 *dest, const UINT8 *source, fixed_t ofs)
|
||||
FUNCINLINE static ATTRINLINE UINT8 mappedpdraw(const UINT8 *dest, const UINT8 *source, fixed_t ofs)
|
||||
{
|
||||
(void)dest; return *(v_colormap + source[ofs>>FRACBITS]);
|
||||
}
|
||||
static inline UINT8 translucentpdraw(const UINT8 *dest, const UINT8 *source, fixed_t ofs)
|
||||
FUNCINLINE static ATTRINLINE UINT8 translucentpdraw(const UINT8 *dest, const UINT8 *source, fixed_t ofs)
|
||||
{
|
||||
return *(v_translevel + ((source[ofs>>FRACBITS]<<8)&0xff00) + (*dest&0xff));
|
||||
}
|
||||
static inline UINT8 transmappedpdraw(const UINT8 *dest, const UINT8 *source, fixed_t ofs)
|
||||
FUNCINLINE static ATTRINLINE UINT8 transmappedpdraw(const UINT8 *dest, const UINT8 *source, fixed_t ofs)
|
||||
{
|
||||
return *(v_translevel + (((*(v_colormap + source[ofs>>FRACBITS]))<<8)&0xff00) + (*dest&0xff));
|
||||
}
|
||||
|
||||
+7
-2
@@ -17,6 +17,7 @@
|
||||
#include "doomdef.h"
|
||||
#include "doomtype.h"
|
||||
#include "r_defs.h"
|
||||
#include "r_main.h"
|
||||
|
||||
//
|
||||
// VIDEO
|
||||
@@ -64,8 +65,6 @@ extern RGBA_t *pLocalPalette;
|
||||
|
||||
extern UINT8 hudtrans;
|
||||
|
||||
extern INT32 V_LocalTransFlag(void);
|
||||
|
||||
void V_CubeApply(UINT8 *red, UINT8 *green, UINT8 *blue);
|
||||
|
||||
// Retrieve the ARGB value from a palette color index
|
||||
@@ -256,6 +255,12 @@ char V_GetSkincolorChar(INT32 color);
|
||||
|
||||
INT32 V_SkinColorToHighlightcolor(skincolors_t color);
|
||||
|
||||
// this is pretty dumb, but has to be done like this, otherwise the fps counter just disappears sometimes for no reason lol
|
||||
FUNCINLINE static ATTRINLINE INT32 V_LocalTransFlag(void)
|
||||
{
|
||||
return ((10-cv_translucenthud.value)*V_10TRANS);
|
||||
}
|
||||
|
||||
typedef struct player_s player_t;
|
||||
|
||||
void V_DoPostProcessor(INT32 view, INT32 param);
|
||||
|
||||
Reference in new issue
Block a user