From 1dcb529da1483ef67426236480abe79e5e952ef0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 20 Dec 2016 23:51:08 +0300 Subject: Add simd function for dye replace color (software). --- src/resources/dye/dyecolor.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/resources/dye/dyecolor.h') diff --git a/src/resources/dye/dyecolor.h b/src/resources/dye/dyecolor.h index c28428a0d..11e12a038 100644 --- a/src/resources/dye/dyecolor.h +++ b/src/resources/dye/dyecolor.h @@ -21,6 +21,10 @@ #ifndef RESOURCES_DYE_DYECOLOR_H #define RESOURCES_DYE_DYECOLOR_H +#ifndef SDL_BIG_ENDIAN +#include +#endif // SDL_BYTEORDER + #include "localconsts.h" struct DyeColor final @@ -38,6 +42,7 @@ struct DyeColor final value[1] = g; value[2] = b; value[3] = 255; +// value2 = buildHex(r, g, b, 255); } DyeColor(const uint8_t r, @@ -49,9 +54,15 @@ struct DyeColor final value[1] = g; value[2] = b; value[3] = a; +// value2 = buildHex(r, g, b, a); } - uint8_t value[4]; + union + { + uint8_t value[4]; + uint32_t value1; + }; +// uint32_t value2; }; #endif // RESOURCES_DYE_DYECOLOR_H -- cgit v1.2.3-70-g09d2