add CColor::writeRGBA8

This commit is contained in:
Jack Andersen 2018-03-27 22:07:14 -10:00
parent ca54d1b54d
commit 0756f4ec76
3 changed files with 7 additions and 2 deletions

View File

@ -21,7 +21,6 @@ set(SOURCES
src/CTransform.cpp src/CTransform.cpp
src/CColor.cpp src/CColor.cpp
src/CVector2f.cpp src/CVector2f.cpp
src/CRectangle.cpp
src/CVector4f.cpp src/CVector4f.cpp
src/CMatrix4f.cpp src/CMatrix4f.cpp
src/CAABox.cpp src/CAABox.cpp

View File

@ -122,6 +122,13 @@ public:
writer.writeFloatBig(r); writer.writeFloatBig(r);
writer.writeFloatBig(a); writer.writeFloatBig(a);
} }
inline void writeRGBA8(athena::io::IStreamWriter& writer) const
{
writer.writeUByte(this->r * 255);
writer.writeUByte(this->g * 255);
writer.writeUByte(this->b * 255);
writer.writeUByte(this->a * 255);
}
#endif #endif
inline bool operator==(const CColor& rhs) const { return (r == rhs.r && g == rhs.g && b == rhs.b && a == rhs.a); } inline bool operator==(const CColor& rhs) const { return (r == rhs.r && g == rhs.g && b == rhs.b && a == rhs.a); }

View File

@ -1 +0,0 @@
#include "zeus/CRectangle.hpp"