24 #ifndef RESOURCES_DYE_DYEPALETTE_H
25 #define RESOURCES_DYE_DYEPALETTE_H
37 #define DYEPALETTE(palette, color) \
38 ((palette).*DyePalette::funcReplace##color)
40 #define DYEPALETTEP(palette, color) \
41 ((palette)->*DyePalette::funcReplace##color)
55 const uint8_t blockSize);
63 void getColor(
const unsigned int intensity,
89 void replaceSColorSse2(uint32_t *
restrict pixels,
96 void replaceSColorAvx2(uint32_t *
restrict pixels,
103 void replaceAColorSse2(uint32_t *
restrict pixels,
110 void replaceAColorAvx2(uint32_t *
restrict pixels,
120 #ifdef SIMD_SUPPORTED
125 void replaceAOGLColorAvx2(uint32_t *
restrict pixels,
132 void replaceSOGLColorSse2(uint32_t *
restrict pixels,
138 void replaceSOGLColorAvx2(uint32_t *
restrict pixels,
145 void replaceAOGLColorSse2(uint32_t *
restrict pixels,
157 static unsigned int hexDecode(
const signed char c)
161 const uint8_t blockSize,
static void initFunctions()
static DyeFunctionPtr funcReplaceAOGLColorSse2
void getColor(const unsigned int intensity, unsigned int(&color)[3]) const
static DyeFunctionPtr funcReplaceSColorAvx2
void replaceAColorDefault(uint32_t *pixels, const int bufSize) const
static DyeFunctionPtr funcReplaceAColorSse2
static DyeFunctionPtr funcReplaceSColor
void replaceAOGLColorDefault(uint32_t *pixels, const int bufSize) const
static DyeFunctionPtr funcReplaceAColor
static DyeFunctionPtr funcReplaceSOGLColor
void replaceSOGLColorDefault(uint32_t *pixels, const int bufSize) const
static void hexToColor(const std::string &hexStr, const uint8_t blockSize, DyeColor &color)
void replaceSColorDefault(uint32_t *pixels, const int bufSize) const
static DyeFunctionPtr funcReplaceSOGLColorSse2
static DyeFunctionPtr funcReplaceSColorSse2
static DyeFunctionPtr funcReplaceAOGLColorAvx2
static unsigned int hexDecode(const signed char c) A_CONST
DyePalette(const std::string &pallete, const uint8_t blockSize)
static DyeFunctionPtr funcReplaceAOGLColor
static DyeFunctionPtr funcReplaceSOGLColorAvx2
static DyeFunctionPtr funcReplaceAColorAvx2
std::vector< DyeColor > mColors
void(DyePalette::* DyeFunctionPtr)(uint32_t *pixels, const int bufSize) const
#define A_DELETE_COPY(func)
union EAthena::ItemFlags __attribute__((packed))