Build Fixes

This commit is contained in:
Phillip Stephens 2015-11-25 18:38:43 -08:00
parent a073e690cd
commit 24886ff8c7
2 changed files with 16 additions and 13 deletions

View File

@ -1,12 +1,16 @@
#ifndef CCOLOR_HPP
#define CCOLOR_HPP
#include "Global.hpp"
#include "Math.hpp"
#include "TVectorUnion.hpp"
#if ZE_ATHENA_TYPES
#include <Athena/FileReader.hpp>
#endif
#include <iostream>
#if BYTE_ORDER == __ORDER_LITTLE_ENDIAN__
#define COLOR(rgba) ( ( (rgba) & 0x000000FF ) << 24 | ( (rgba) & 0x0000FF00 ) << 8 \
#define COLOR(rgba) (unsigned)( ( (rgba) & 0x000000FF ) << 24 | ( (rgba) & 0x0000FF00 ) << 8 \
| ( (rgba) & 0x00FF0000 ) >> 8 | ( (rgba) & 0xFF000000 ) >> 24 )
#else
#define COLOR(rgba) rgba
@ -188,17 +192,16 @@ public:
inline void normalize()
{
float mag = magnitude();
assert(mag != 0.0);
mag = 1.0 / mag;
*this *= mag;
}
inline CColor normalized()
inline CColor normalized() const
{
float mag = magnitude();
assert(mag != 0.0);
mag = 1.0 / mag;
return *this * mag;
}
inline float magSquared() const
{
#if __SSE__

View File

@ -3,15 +3,15 @@
namespace Zeus
{
const CColor CColor::skRed (0xFF0000FFul);
const CColor CColor::skBlack (0x000000FFul);
const CColor CColor::skBlue (0x0000FFFFul);
const CColor CColor::skGreen (0x00FF00FFul);
const CColor CColor::skGrey (0x808080FFul);
const CColor CColor::skOrange(0xFF7000FFul);
const CColor CColor::skPurple(0xA000FFFFul);
const CColor CColor::skYellow(0xFFFF00FFul);
const CColor CColor::skWhite (0xFFFFFFFFul);
const CColor CColor::skRed (Comp32(0xFF0000FFul));
const CColor CColor::skBlack (Comp32(0x000000FFul));
const CColor CColor::skBlue (Comp32(0x0000FFFFul));
const CColor CColor::skGreen (Comp32(0x00FF00FFul));
const CColor CColor::skGrey (Comp32(0x808080FFul));
const CColor CColor::skOrange(Comp32(0xFF7000FFul));
const CColor CColor::skPurple(Comp32(0xA000FFFFul));
const CColor CColor::skYellow(Comp32(0xFFFF00FFul));
const CColor CColor::skWhite (Comp32(0xFFFFFFFFul));
float hueToRgb(float p, float q, float t)
{