2008-12-02 10:44:39 +00:00
|
|
|
#ifndef HIGHTILE_PRIV_H
|
|
|
|
#define HIGHTILE_PRIV_H
|
|
|
|
|
2017-06-21 13:46:44 +00:00
|
|
|
typedef struct {
|
|
|
|
polytintflags_t f;
|
|
|
|
uint8_t r, g, b;
|
2017-12-12 05:13:58 +00:00
|
|
|
uint8_t sr, sg, sb;
|
2017-06-21 13:46:44 +00:00
|
|
|
} polytint_t;
|
|
|
|
|
|
|
|
extern polytint_t hictinting[MAXPALOOKUPS];
|
2014-05-28 22:40:16 +00:00
|
|
|
|
2018-01-26 04:35:11 +00:00
|
|
|
static inline void globaltinting_apply(float *color)
|
|
|
|
{
|
|
|
|
color[0] *= (float)globalr * (1.f/255.f);
|
|
|
|
color[1] *= (float)globalg * (1.f/255.f);
|
|
|
|
color[2] *= (float)globalb * (1.f/255.f);
|
|
|
|
}
|
|
|
|
|
2014-05-28 22:40:16 +00:00
|
|
|
|
2019-10-17 10:45:25 +00:00
|
|
|
// replacement flags
|
2014-05-28 22:40:16 +00:00
|
|
|
enum
|
|
|
|
{
|
2015-03-28 09:49:37 +00:00
|
|
|
HICR_FORCEFILTER = 2,
|
2014-05-28 22:40:16 +00:00
|
|
|
};
|
|
|
|
|
2016-03-04 19:24:54 +00:00
|
|
|
// hictinting[].f / gloadtile_hi() and mdloadskin() <effect> arg bits
|
2014-05-28 22:40:16 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
HICTINT_GRAYSCALE = 1,
|
|
|
|
HICTINT_INVERT = 2,
|
|
|
|
HICTINT_COLORIZE = 4,
|
|
|
|
HICTINT_USEONART = 8,
|
2015-03-09 20:32:11 +00:00
|
|
|
HICTINT_APPLYOVERPALSWAP = 16,
|
|
|
|
HICTINT_APPLYOVERALTPAL = 32,
|
2014-05-28 22:40:16 +00:00
|
|
|
|
2015-04-14 08:08:02 +00:00
|
|
|
HICTINT_BLEND_MULTIPLY = 0<<6,
|
|
|
|
HICTINT_BLEND_SCREEN = 1<<6,
|
|
|
|
HICTINT_BLEND_OVERLAY = 2<<6,
|
|
|
|
HICTINT_BLEND_HARDLIGHT = 3<<6,
|
|
|
|
|
|
|
|
HICTINT_BLENDMASK = 64|128,
|
|
|
|
|
|
|
|
HICTINT_PRECOMPUTED = HICTINT_COLORIZE | HICTINT_BLENDMASK,
|
2015-04-14 21:17:36 +00:00
|
|
|
HICTINT_IN_MEMORY = HICTINT_PRECOMPUTED | HICTINT_GRAYSCALE | HICTINT_INVERT,
|
2015-04-14 08:08:02 +00:00
|
|
|
|
2017-06-21 13:46:36 +00:00
|
|
|
HICTINT_MEMORY_COMBINATIONS = 1<<5,
|
2014-05-28 22:40:16 +00:00
|
|
|
};
|
2008-12-02 10:44:39 +00:00
|
|
|
|
|
|
|
#endif
|