From cf0bae88ff1cd3379e595d957a37a5e10c514ec7 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 7 Feb 2016 13:57:59 -1000 Subject: [PATCH] Add atVec4f constructor to CColor --- include/CColor.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/CColor.hpp b/include/CColor.hpp index c9b77b1..62de34f 100644 --- a/include/CColor.hpp +++ b/include/CColor.hpp @@ -57,6 +57,14 @@ public: CColor(float r, float g, float b, float a = 1.0f) {v[0] = r; v[1] = g; v[2] = b; v[3] = a; } #if ZE_ATHENA_TYPES CColor(Athena::io::IStreamReader& reader) {readRGBA(reader);} + CColor(const atVec4f& vec) +#if __SSE__ || __GEKKO_PS__ + : mVec128(vec.mVec128){} +#else + { + r = vec.vec[0], g = vec.vec[1], b = vec.vec[2], a = vec.vec[3]; + } +#endif #endif CColor(Comp32 rgba) { fromRGBA32(rgba); }