Making CColor use floats instead of u8s

This commit is contained in:
parax0
2015-12-16 03:28:40 -07:00
parent f11a8b938b
commit 6b8966f0b9
24 changed files with 267 additions and 269 deletions

View File

@@ -201,7 +201,7 @@ void CDamageableTriggerExtra::AddToRenderer(CRenderer *pRenderer, const SViewInf
void CDamageableTriggerExtra::Draw(ERenderOptions Options, int /*ComponentIndex*/, const SViewInfo& ViewInfo)
{
LoadModelMatrix();
CGraphics::sPixelBlock.TintColor = mpParent->TintColor(ViewInfo).ToVector4f();
CGraphics::sPixelBlock.TintColor = mpParent->TintColor(ViewInfo);
mpMat->SetCurrent(Options);
// Note: The plane the game renders this onto is 5x4.5, which is why we divide the tex coords by this value

View File

@@ -67,8 +67,8 @@ void CDoorExtra::Draw(ERenderOptions Options, int ComponentIndex, const SViewInf
if (mpShieldColorProp)
Tint *= mpShieldColorProp->Get();
CGraphics::sPixelBlock.TintColor = Tint.ToVector4f();
CGraphics::sPixelBlock.TevColor = CColor::skWhite.ToVector4f();
CGraphics::sPixelBlock.TintColor = Tint;
CGraphics::sPixelBlock.TevColor = CColor::skWhite;
CGraphics::UpdatePixelBlock();
if (ComponentIndex < 0)

View File

@@ -1,7 +1,7 @@
#include "CPointOfInterestExtra.h"
const CColor CPointOfInterestExtra::skRegularColor ((u32) 0xFF7000FF);
const CColor CPointOfInterestExtra::skImportantColor((u32) 0xFF0000FF);
const CColor CPointOfInterestExtra::skRegularColor = CColor::Integral(0xFF,0x70,0x00);
const CColor CPointOfInterestExtra::skImportantColor = CColor::Integral(0xFF,0x00,0x00);
CPointOfInterestExtra::CPointOfInterestExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent)
: CScriptExtra(pInstance, pScene, pParent)