diff --git a/include/eepp/gaming/cgameobjectsubtextureex.hpp b/include/eepp/gaming/cgameobjectsubtextureex.hpp index 26ae72038..de5c4df6d 100644 --- a/include/eepp/gaming/cgameobjectsubtextureex.hpp +++ b/include/eepp/gaming/cgameobjectsubtextureex.hpp @@ -8,7 +8,7 @@ namespace EE { namespace Gaming { class EE_API cGameObjectSubTextureEx : public cGameObjectSubTexture { public: - cGameObjectSubTextureEx( const Uint32& Flags, cLayer * Layer, cSubTexture * SubTexture = NULL, const eeVector2f& Pos = eeVector2f(), EE_BLEND_MODE Blend = ALPHA_NORMAL, EE_RENDER_MODE Render = RN_NORMAL, Float Angle = 0.f, eeVector2f Scale = eeVector2f::One, eeColorA Color = eeColorA() ); + cGameObjectSubTextureEx( const Uint32& Flags, cLayer * Layer, cSubTexture * SubTexture = NULL, const eeVector2f& Pos = eeVector2f(), EE_BLEND_MODE Blend = ALPHA_NORMAL, EE_RENDER_MODE Render = RN_NORMAL, Float Angle = 0.f, eeVector2f Scale = eeVector2f::One, ColorA Color = ColorA() ); virtual ~cGameObjectSubTextureEx(); @@ -24,8 +24,8 @@ class EE_API cGameObjectSubTextureEx : public cGameObjectSubTexture { EE_RENDER_MODE mRender; Float mAngle; eeVector2f mScale; - eeColorA mColor; - eeColorA * mVertexColors; + ColorA mColor; + ColorA * mVertexColors; }; }} diff --git a/include/eepp/gaming/clight.hpp b/include/eepp/gaming/clight.hpp index 5f0ec5a77..b72c0d4bd 100644 --- a/include/eepp/gaming/clight.hpp +++ b/include/eepp/gaming/clight.hpp @@ -15,19 +15,19 @@ class EE_API cLight { public: cLight(); - cLight( const Float& Radius, const Float& x, const Float& y, const eeColor& Color = eeColor(255,255,255), LIGHT_TYPE Type = LIGHT_NORMAL ); + cLight( const Float& Radius, const Float& x, const Float& y, const RGB& Color = RGB(255,255,255), LIGHT_TYPE Type = LIGHT_NORMAL ); virtual ~cLight(); - void Create( const Float& Radius, const Float& x, const Float& y, const eeColor& Color = eeColor(255,255,255), LIGHT_TYPE Type = LIGHT_NORMAL ); + void Create( const Float& Radius, const Float& x, const Float& y, const RGB& Color = RGB(255,255,255), LIGHT_TYPE Type = LIGHT_NORMAL ); - virtual eeColor ProcessVertex( const Float& PointX, const Float& PointY, const eeColor& VertexColor, const eeColor& BaseColor ); + virtual RGB ProcessVertex( const Float& PointX, const Float& PointY, const RGB& VertexColor, const RGB& BaseColor ); - virtual eeColorA ProcessVertex( const Float& PointX, const Float& PointY, const eeColorA& VertexColor, const eeColorA& BaseColor ); + virtual ColorA ProcessVertex( const Float& PointX, const Float& PointY, const ColorA& VertexColor, const ColorA& BaseColor ); - eeColor ProcessVertex( const eeVector2f& Pos, const eeColor& VertexColor, const eeColor& BaseColor ); + RGB ProcessVertex( const eeVector2f& Pos, const RGB& VertexColor, const RGB& BaseColor ); - eeColorA ProcessVertex( const eeVector2f& Pos, const eeColorA& VertexColor, const eeColorA& BaseColor ); + ColorA ProcessVertex( const eeVector2f& Pos, const ColorA& VertexColor, const ColorA& BaseColor ); void Move( const Float& addtox, const Float& addtoy ); @@ -45,9 +45,9 @@ class EE_API cLight { void Active( const bool& active ); - void Color( const eeColor& color ); + void Color( const RGB& color ); - const eeColor& Color() const; + const RGB& Color() const; void Type( const LIGHT_TYPE& type ); @@ -59,7 +59,7 @@ class EE_API cLight { protected: Float mRadius; eeVector2f mPos; - eeColor mColor; + RGB mColor; LIGHT_TYPE mType; eeAABB mAABB; bool mActive; diff --git a/include/eepp/gaming/clightmanager.hpp b/include/eepp/gaming/clightmanager.hpp index 439c42752..3e4bc40a9 100644 --- a/include/eepp/gaming/clightmanager.hpp +++ b/include/eepp/gaming/clightmanager.hpp @@ -27,11 +27,11 @@ class EE_API cLightManager { Uint32 Count(); - const eeColorA * GetTileColor( const eeVector2i& TilePos ); + const ColorA * GetTileColor( const eeVector2i& TilePos ); - const eeColorA * GetTileColor( const eeVector2i& TilePos, const Uint32& Vertex ); + const ColorA * GetTileColor( const eeVector2i& TilePos, const Uint32& Vertex ); - eeColorA GetColorFromPos( const eeVector2f& Pos ); + ColorA GetColorFromPos( const eeVector2f& Pos ); const bool& IsByVertex() const; @@ -41,7 +41,7 @@ class EE_API cLightManager { protected: cMap * mMap; Int32 mNumVertex; - eeColorA**** mTileColors; + ColorA**** mTileColors; LightsList mLights; bool mIsByVertex; diff --git a/include/eepp/gaming/cmap.hpp b/include/eepp/gaming/cmap.hpp index ad643531f..6510f2de3 100644 --- a/include/eepp/gaming/cmap.hpp +++ b/include/eepp/gaming/cmap.hpp @@ -170,9 +170,9 @@ class EE_API cMap { const std::string& Path() const; - void BaseColor( const eeColorA& color ); + void BaseColor( const ColorA& color ); - const eeColorA& BaseColor() const; + const ColorA& BaseColor() const; const eeAABB& GetViewAreaAABB() const; @@ -203,9 +203,9 @@ class EE_API cMap { void BackAlpha( const Uint8& alpha ); - const eeColorA& BackColor() const; + const ColorA& BackColor() const; - void BackColor( const eeColorA& col ); + void BackColor( const ColorA& col ); const Float& Scale() const; @@ -221,9 +221,9 @@ class EE_API cMap { void DisableForcedHeaders(); - void GridLinesColor( const eeColorA& Col ); + void GridLinesColor( const ColorA& Col ); - const eeColorA& GridLinesColor() const; + const ColorA& GridLinesColor() const; protected: friend class EE::Gaming::MapEditor::cUIMapNew; @@ -262,7 +262,7 @@ class EE_API cMap { eeVector2i mMouseOverTile; eeVector2i mMouseOverTileFinal; eeVector2i mMouseMapPos; - eeColorA mBaseColor; + ColorA mBaseColor; PropertiesMap mProperties; GOTypesList mObjTypes; CreateGOCb mCreateGOCb; @@ -272,9 +272,9 @@ class EE_API cMap { MapDrawCb mDrawCb; MapUpdateCb mUpdateCb; void * mData; - eeColorA mTileOverColor; - eeColorA mBackColor; - eeColorA mGridLinesColor; + ColorA mTileOverColor; + ColorA mBackColor; + ColorA mGridLinesColor; Uint8 mBackAlpha; bool mMouseOver; std::string mPath; diff --git a/include/eepp/graphics/cbatchrenderer.hpp b/include/eepp/graphics/cbatchrenderer.hpp index 519b1a8aa..eacdd54ca 100755 --- a/include/eepp/graphics/cbatchrenderer.hpp +++ b/include/eepp/graphics/cbatchrenderer.hpp @@ -15,7 +15,7 @@ struct eeTexCoord { struct eeVertex { eeVector2f pos; eeTexCoord tex; - eeColorA color; + ColorA color; }; class cTextureFactory; @@ -91,7 +91,7 @@ class EE_API cBatchRenderer { /** Add to the batch a quad with the vertex freely seted ( this will change your batch rendering method to DM_QUADS, so if you were using another one will Draw all the batched vertexs first ) */ void BatchQuadFreeEx( const Float& x0, const Float& y0, const Float& x1, const Float& y1, const Float& x2, const Float& y2, const Float& x3, const Float& y3, const Float& Angle = 0.0f, const Float& Scale = 1.0f ); - /** This will set as the default batch rendering to GL_QUADS. WIll reset the texture subset rendering to the whole texture. Will reset the default color rendering to eeColorA(255,255,255,255). */ + /** This will set as the default batch rendering to GL_QUADS. WIll reset the texture subset rendering to the whole texture. Will reset the default color rendering to ColorA(255,255,255,255). */ void QuadsBegin(); /** Set the texture sector to be rendered */ @@ -101,40 +101,40 @@ class EE_API cBatchRenderer { void QuadsSetSubsetFree( const Float& x0, const Float& y0, const Float& x1, const Float& y1, const Float& x2, const Float& y2, const Float& x3, const Float& y3 ); /** Set the quad color */ - void QuadsSetColor( const eeColorA& Color ); + void QuadsSetColor( const ColorA& Color ); /** Set the quad color per vertex */ - void QuadsSetColorFree( const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3 ); + void QuadsSetColorFree( const ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3 ); - /** This will set as the default batch rendering to DM_POINTS. And will reset the point color to eeColorA(255,255,255,255). */ + /** This will set as the default batch rendering to DM_POINTS. And will reset the point color to ColorA(255,255,255,255). */ void PointsBegin(); /** Set the point color */ - void PointSetColor( const eeColorA& Color ); + void PointSetColor( const ColorA& Color ); /** Add to the batch a point ( this will change your batch rendering method to DM_POINTS, so if you were using another one will Draw all the batched vertexs first ) */ void BatchPoint( const Float& x, const Float& y ); - /** This will set as the default batch rendering to DM_LINES. And will reset the line color to eeColorA(255,255,255,255). */ + /** This will set as the default batch rendering to DM_LINES. And will reset the line color to ColorA(255,255,255,255). */ void LinesBegin(); /** Set the line color */ - void LinesSetColor( const eeColorA& Color ); + void LinesSetColor( const ColorA& Color ); /** Set the line color, per vertex */ - void LinesSetColorFree( const eeColorA& Color0, const eeColorA& Color1 ); + void LinesSetColorFree( const ColorA& Color0, const ColorA& Color1 ); /** Add to the batch a line ( this will change your batch rendering method to DM_LINES, so if you were using another one will Draw all the batched vertexs first ) */ void BatchLine( const Float& x0, const Float& y0, const Float& x1, const Float& y1 ); - /** This will set as the default batch rendering to GL_LINE_LOOP. And will reset the line color to eeColorA(255,255,255,255). */ + /** This will set as the default batch rendering to GL_LINE_LOOP. And will reset the line color to ColorA(255,255,255,255). */ void LineLoopBegin(); /** Set the line color */ - void LineLoopSetColor( const eeColorA& Color ); + void LineLoopSetColor( const ColorA& Color ); /** Set the line color, per vertex */ - void LineLoopSetColorFree( const eeColorA& Color0, const eeColorA& Color1 ); + void LineLoopSetColorFree( const ColorA& Color0, const ColorA& Color1 ); /** Add to the batch a line ( this will change your batch rendering method to DM_LINE_LOOP, so if you were using another one will Draw all the batched vertexs first ) */ void BatchLineLoop( const Float& x0, const Float& y0, const Float& x1, const Float& y1 ); @@ -148,14 +148,14 @@ class EE_API cBatchRenderer { /** Add to the batch a point to the line loop batch ( this will change your batch rendering method to DM_LINE_LOOP, so if you were using another one will Draw all the batched vertexs first ) */ void BatchLineLoop( const eeVector2f& vector1 ); - /** This will set as the default batch rendering to DM_TRIANGLE_FAN. And will reset the line color to eeColorA(255,255,255,255). */ + /** This will set as the default batch rendering to DM_TRIANGLE_FAN. And will reset the line color to ColorA(255,255,255,255). */ void TriangleFanBegin(); /** Set the triangle fan color */ - void TriangleFanSetColor( const eeColorA& Color ); + void TriangleFanSetColor( const ColorA& Color ); /** Set the triangle fan color, per vertex */ - void TriangleFanSetColorFree( const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2 ); + void TriangleFanSetColorFree( const ColorA& Color0, const ColorA& Color1, const ColorA& Color2 ); /** Set the texture sector to be rendered but freely seted */ void TriangleFanSetSubset( const Float& x0, const Float& y0, const Float& x1, const Float& y1, const Float& x2, const Float& y2 ); @@ -166,14 +166,14 @@ class EE_API cBatchRenderer { /** Add to the batch a triangle fan ( this will change your batch rendering method to DM_TRIANGLE_FAN, so if you were using another one will Draw all the batched vertexs first ) */ void BatchTriangleFan( const Float& x0, const Float& y0 ); - /** This will set as the default batch rendering to DM_TRIANGLES. And will reset the line color to eeColorA(255,255,255,255). */ + /** This will set as the default batch rendering to DM_TRIANGLES. And will reset the line color to ColorA(255,255,255,255). */ void TrianglesBegin(); /** Set the triangles color */ - void TrianglesSetColor( const eeColorA& Color ); + void TrianglesSetColor( const ColorA& Color ); /** Set the triangles color, per vertex */ - void TrianglesSetColorFree( const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2 ); + void TrianglesSetColorFree( const ColorA& Color0, const ColorA& Color1, const ColorA& Color2 ); /** Set the texture sector to be rendered but freely seted */ void TrianglesSetSubset( const Float& x0, const Float& y0, const Float& x1, const Float& y1, const Float& x2, const Float& y2 ); @@ -182,7 +182,7 @@ class EE_API cBatchRenderer { void BatchTriangle( const Float& x0, const Float& y0, const Float& x1, const Float& y1, const Float& x2, const Float& y2 ); /** Set the polygon color */ - void PolygonSetColor( const eeColorA& Color ); + void PolygonSetColor( const ColorA& Color ); /** Add to the batch a polygon ( this will change your batch rendering method to DM_POLYGON, so if you were using another one will Draw all the batched vertexs first ) */ void BatchPolygon( const eePolygon2f& Polygon ); @@ -221,7 +221,7 @@ class EE_API cBatchRenderer { EE_BLEND_MODE mBlend; eeTexCoord mTexCoord[4]; - eeColorA mVerColor[4]; + ColorA mVerColor[4]; EE_DRAW_MODE mCurrentMode; diff --git a/include/eepp/graphics/cconsole.hpp b/include/eepp/graphics/cconsole.hpp index 064c1e073..5846d82c5 100755 --- a/include/eepp/graphics/cconsole.hpp +++ b/include/eepp/graphics/cconsole.hpp @@ -39,28 +39,28 @@ class EE_API cConsole : protected LogReaderInterface { Uint32 TextureId() const { return mTexId; } /** Set the Console Background Color */ - void BackgroundColor( const eeColorA& BackColor ) { mConColor = BackColor; } + void BackgroundColor( const ColorA& BackColor ) { mConColor = BackColor; } /** Get the Console Background Color */ - const eeColorA& BackgroundColor() const { return mConColor; } + const ColorA& BackgroundColor() const { return mConColor; } /** Set the Console Border Line Background Color */ - void BackgroundLineColor( const eeColorA& BackColor ) { mConLineColor = BackColor; } + void BackgroundLineColor( const ColorA& BackColor ) { mConLineColor = BackColor; } /** Get the Console Border Line Background Color */ - const eeColorA& BackgroundLineColor() const { return mConLineColor; } + const ColorA& BackgroundLineColor() const { return mConLineColor; } /** Set the Console Font Color */ - void FontColor( const eeColorA& FntColor ) { mFontColor = FntColor; } + void FontColor( const ColorA& FntColor ) { mFontColor = FntColor; } /** Get the Console Font Color */ - const eeColorA& FontColor() const { return mFontColor; } + const ColorA& FontColor() const { return mFontColor; } /** Set the Console Client Input ( Writeable Line ) Font Color */ - void FontLineColor( const eeColorA& FntColor ) { mFontLineColor = FntColor; } + void FontLineColor( const ColorA& FntColor ) { mFontLineColor = FntColor; } /** Get the Console Client Input ( Writeable Line ) Font Color */ - const eeColorA& FontLineColor() const { return mFontLineColor; } + const ColorA& FontLineColor() const { return mFontLineColor; } /** Toogle the console between visible and hided with Fade In or Fade Out effect. */ void Toggle(); @@ -128,10 +128,10 @@ class EE_API cConsole : protected LogReaderInterface { Window::cWindow * mWindow; - eeColorA mConColor; - eeColorA mConLineColor; - eeColorA mFontColor; - eeColorA mFontLineColor; + ColorA mConColor; + ColorA mConLineColor; + ColorA mFontColor; + ColorA mFontLineColor; Float mWidth; Float mHeight; diff --git a/include/eepp/graphics/cfont.hpp b/include/eepp/graphics/cfont.hpp index 8f9705596..5c16b2525 100755 --- a/include/eepp/graphics/cfont.hpp +++ b/include/eepp/graphics/cfont.hpp @@ -31,16 +31,16 @@ class EE_API cFont { virtual int GetNumLines(); /** @return The Font Color */ - const eeColorA& Color() const; + const ColorA& Color() const; /** Set the color of the string rendered */ - void Color(const eeColorA& Color); + void Color(const ColorA& Color); /** @return The Shadow Font Color */ - const eeColorA& ShadowColor() const; + const ColorA& ShadowColor() const; /** Set the shadow color of the string rendered */ - void ShadowColor(const eeColorA& Color); + void ShadowColor(const ColorA& Color); /** @return The current font size */ Uint32 GetFontSize() const; diff --git a/include/eepp/graphics/cframebuffer.hpp b/include/eepp/graphics/cframebuffer.hpp index 674ef81c0..2a49a4f30 100644 --- a/include/eepp/graphics/cframebuffer.hpp +++ b/include/eepp/graphics/cframebuffer.hpp @@ -48,10 +48,10 @@ class EE_API cFrameBuffer { cTexture * GetTexture() const; /** @brief Sets the frame buffer clear color. */ - void ClearColor( eeColorAf Color ); + void ClearColor( ColorAf Color ); /** @return The clear color used for the frame buffer. */ - eeColorAf ClearColor() const; + ColorAf ClearColor() const; /** @return The frame buffer width. */ const Int32& GetWidth() const; @@ -67,7 +67,7 @@ class EE_API cFrameBuffer { Int32 mHeight; bool mHasDepthBuffer; cTexture * mTexture; - eeColorAf mClearColor; + ColorAf mClearColor; cView mPrevView; float mProjMat[16]; diff --git a/include/eepp/graphics/cimage.hpp b/include/eepp/graphics/cimage.hpp index 5539b54ad..7ba904cdf 100644 --- a/include/eepp/graphics/cimage.hpp +++ b/include/eepp/graphics/cimage.hpp @@ -64,7 +64,7 @@ class EE_API cImage { cImage( const Uint8* data, const unsigned int& Width, const unsigned int& Height, const unsigned int& Channels ); /** Create an empty image */ - cImage( const Uint32& Width, const Uint32& Height, const Uint32& Channels, const eeColorA& DefaultColor = eeColorA(0,0,0,0), const bool& initWithDefaultColor = true ); + cImage( const Uint32& Width, const Uint32& Height, const Uint32& Channels, const ColorA& DefaultColor = ColorA(0,0,0,0), const bool& initWithDefaultColor = true ); /** Load an image from path * @param Path The path to the file. @@ -82,13 +82,13 @@ class EE_API cImage { virtual ~cImage(); /** Create an empty image data */ - void Create( const Uint32& Width, const Uint32& Height, const Uint32& Channels, const eeColorA &DefaultColor = eeColorA(0,0,0,0), const bool& initWithDefaultColor = true ); + void Create( const Uint32& Width, const Uint32& Height, const Uint32& Channels, const ColorA &DefaultColor = ColorA(0,0,0,0), const bool& initWithDefaultColor = true ); /** Return the pixel color from the image. \n You must have a copy of the image on local memory. For that you need to Lock the image first. */ - virtual eeColorA GetPixel(const unsigned int& x, const unsigned int& y); + virtual ColorA GetPixel(const unsigned int& x, const unsigned int& y); /** Set the pixel color to the image. \n You must have a copy of the image on local memory. For that you need to Lock the image first. */ - virtual void SetPixel(const unsigned int& x, const unsigned int& y, const eeColorA& Color); + virtual void SetPixel(const unsigned int& x, const unsigned int& y, const ColorA& Color); /** Assign a new array of pixels to the image in local memory ( it has to be exactly of the same size of the image ) */ virtual void SetPixels( const Uint8* data ); @@ -130,16 +130,16 @@ class EE_API cImage { virtual bool SaveToFile( const std::string& filepath, const EE_SAVE_TYPE& Format ); /** Create an Alpha mask from a Color */ - virtual void CreateMaskFromColor( const eeColorA& ColorKey, Uint8 Alpha ); + virtual void CreateMaskFromColor( const ColorA& ColorKey, Uint8 Alpha ); /** Create an Alpha mask from a Color */ - void CreateMaskFromColor( const eeColor& ColorKey, Uint8 Alpha ); + void CreateMaskFromColor( const RGB& ColorKey, Uint8 Alpha ); /** Replace a color on the image */ - virtual void ReplaceColor( const eeColorA& ColorKey, const eeColorA& NewColor ); + virtual void ReplaceColor( const ColorA& ColorKey, const ColorA& NewColor ); /** Fill the image with a color */ - virtual void FillWithColor( const eeColorA& Color ); + virtual void FillWithColor( const ColorA& Color ); /** Copy the image to this image data, starting from the position x,y */ virtual void CopyImage( cImage * image, const Uint32& x = 0, const Uint32& y = 0 ); @@ -184,7 +184,7 @@ class EE_API cImage { bool mAvoidFree; bool mLoadedFromStbi; - void Allocate( const Uint32& size, eeColorA DefaultColor = eeColorA(0,0,0,0), bool memsetData = true ); + void Allocate( const Uint32& size, ColorA DefaultColor = ColorA(0,0,0,0), bool memsetData = true ); void LoadFromPack( Pack * Pack, const std::string& FilePackPath ); }; diff --git a/include/eepp/graphics/cparticle.hpp b/include/eepp/graphics/cparticle.hpp index 77b58320b..01409438e 100755 --- a/include/eepp/graphics/cparticle.hpp +++ b/include/eepp/graphics/cparticle.hpp @@ -12,8 +12,8 @@ class EE_API cParticle{ cParticle(); ~cParticle(); - void Color(eeColorAf Color, Float AlphaDecay); - eeColorAf Color() const { return mColor; } + void Color(ColorAf Color, Float AlphaDecay); + ColorAf Color() const { return mColor; } Float R() { return mColor.R(); } Float G() { return mColor.G(); } @@ -54,7 +54,7 @@ class EE_API cParticle{ Uint32 Id() const { return cId; } private: Float mX, mY; - eeColorAf mColor; + ColorAf mColor; Float mXSpeed, mYSpeed, mXAcc, mYAcc, mAlphaDecay, mSize; bool cUsed; diff --git a/include/eepp/graphics/cparticlesystem.hpp b/include/eepp/graphics/cparticlesystem.hpp index 0bea21ca9..4314d2f13 100755 --- a/include/eepp/graphics/cparticlesystem.hpp +++ b/include/eepp/graphics/cparticlesystem.hpp @@ -61,7 +61,7 @@ class EE_API cParticleSystem { const Float& PartSize = 16.0f, const bool& AnimLoop = false, const Uint32& NumLoops = 1, - const eeColorAf& Color = eeColorAf( 1.0f, 1.0f, 1.0f, 1.0f ), + const ColorAf& Color = ColorAf( 1.0f, 1.0f, 1.0f, 1.0f ), const eeVector2f& Pos2 = eeVector2f( 0, 0 ), const Float& AlphaDecay = 0.01f, const eeVector2f& Speed = eeVector2f( 0.1f, 0.1f ), @@ -128,10 +128,10 @@ class EE_API cParticleSystem { void BlendMode( const EE_BLEND_MODE& mode ); /** @return The color of the effect */ - const eeColorAf& Color() const; + const ColorAf& Color() const; /** Set the color of the effect */ - void Color( const eeColorAf& Col ); + void Color( const ColorAf& Col ); /** @return The alpha decay of the effect */ const Float& AlphaDecay() const; @@ -160,7 +160,7 @@ class EE_API cParticleSystem { EE_PARTICLE_EFFECT mEffect; EE_BLEND_MODE mBlend; - eeColorAf mColor; + ColorAf mColor; int mProgression; int mDirection; diff --git a/include/eepp/graphics/cprimitives.hpp b/include/eepp/graphics/cprimitives.hpp index e787b41ca..ff49e61d0 100755 --- a/include/eepp/graphics/cprimitives.hpp +++ b/include/eepp/graphics/cprimitives.hpp @@ -42,7 +42,7 @@ class EE_API cPrimitives { * @param Color2 Second Point Color * @param Color3 Third Point Color */ - void DrawTriangle( const eeTriangle2f& t, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3 ); + void DrawTriangle( const eeTriangle2f& t, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3 ); /** Draw a rectangle on the screen * @param R The Rectangle eeRectf @@ -68,7 +68,7 @@ class EE_API cPrimitives { * @param Angle Rectangle Angle * @param Scale Rectangle Scale ( default 1.0f ) */ - void DrawRectangle( const eeRectf& R, const eeColorA& TopLeft, const eeColorA& BottomLeft, const eeColorA& BottomRight, const eeColorA& TopRight, const Float& Angle = 0, const eeVector2f& Scale = eeVector2f::One ); + void DrawRectangle( const eeRectf& R, const ColorA& TopLeft, const ColorA& BottomLeft, const ColorA& BottomRight, const ColorA& TopRight, const Float& Angle = 0, const eeVector2f& Scale = eeVector2f::One ); /** Draw a rounded rectangle on the screen setting per vertex color * @param R The Rectangle eeRectf @@ -80,7 +80,7 @@ class EE_API cPrimitives { * @param Scale Rectangle Scale ( default 1.0f ) * @param Corners Number of vertices per corner ( how rounded is each corner ) */ - void DrawRoundedRectangle( const eeRectf& R, const eeColorA& TopLeft, const eeColorA& BottomLeft, const eeColorA& BottomRight, const eeColorA& TopRight, const Float& Angle = 0, const eeVector2f& Scale = eeVector2f::One, const unsigned int& Corners = 8 ); + void DrawRoundedRectangle( const eeRectf& R, const ColorA& TopLeft, const ColorA& BottomLeft, const ColorA& BottomRight, const ColorA& TopRight, const Float& Angle = 0, const eeVector2f& Scale = eeVector2f::One, const unsigned int& Corners = 8 ); /** Draw a four edges polygon on screen * @param q The Quad @@ -98,7 +98,7 @@ class EE_API cPrimitives { * @param OffsetX X offset for the quad * @param OffsetY Y offset for the quad */ - void DrawQuad( const eeQuad2f& q, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3, const eeColorA& Color4, const Float& OffsetX = 0, const Float& OffsetY = 0 ); + void DrawQuad( const eeQuad2f& q, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3, const ColorA& Color4, const Float& OffsetX = 0, const Float& OffsetY = 0 ); /** Draw a polygon on screen * @param p The Polygon @@ -106,7 +106,7 @@ class EE_API cPrimitives { void DrawPolygon( const eePolygon2f& p ); /** Set the current color for drawing primitives */ - void SetColor( const eeColorA& Color ); + void SetColor( const ColorA& Color ); /** Forcing the draw, will force the batch renderer to draw the batched vertexs immediately ( active by default ). */ void ForceDraw( const bool& force ); @@ -134,7 +134,7 @@ class EE_API cPrimitives { /** @return The line with to draw primitives */ const Float& LineWidth() const; private: - eeColorA mColor; + ColorA mColor; EE_FILL_MODE mFillMode; EE_BLEND_MODE mBlendMode; Float mLineWidth; diff --git a/include/eepp/graphics/cscrollparallax.hpp b/include/eepp/graphics/cscrollparallax.hpp index 7bd10d6ef..7d58dbfc9 100755 --- a/include/eepp/graphics/cscrollparallax.hpp +++ b/include/eepp/graphics/cscrollparallax.hpp @@ -23,7 +23,7 @@ class EE_API cScrollParallax { * @param Speed Speed of movement ( in Pixels Per Second ) * @param Color The Texture Color * @param Blend The Blend Mode ( default ALPHA_NORMAL ) */ - cScrollParallax( cSubTexture * SubTexture, const eeVector2f& Position = eeVector2f(), const eeSizef& Size = eeSizef(), const eeVector2f& Speed = eeVector2f(), const eeColorA& Color = eeColorA(), const EE_BLEND_MODE& Blend = ALPHA_NORMAL ); + cScrollParallax( cSubTexture * SubTexture, const eeVector2f& Position = eeVector2f(), const eeSizef& Size = eeSizef(), const eeVector2f& Speed = eeVector2f(), const ColorA& Color = ColorA(), const EE_BLEND_MODE& Blend = ALPHA_NORMAL ); /** Create's the Scroll Parallax * @param SubTexture The SubTexture to Draw @@ -34,13 +34,13 @@ class EE_API cScrollParallax { * @param Blend The Blend Mode ( default ALPHA_NORMAL ) * @return True if success */ - bool Create( cSubTexture * SubTexture, const eeVector2f& Position = eeVector2f(), const eeSizef& Size = eeSizef(), const eeVector2f& Speed = eeVector2f(), const eeColorA& Color = eeColorA(), const EE_BLEND_MODE& Blend = ALPHA_NORMAL ); + bool Create( cSubTexture * SubTexture, const eeVector2f& Position = eeVector2f(), const eeSizef& Size = eeSizef(), const eeVector2f& Speed = eeVector2f(), const ColorA& Color = ColorA(), const EE_BLEND_MODE& Blend = ALPHA_NORMAL ); /** Set the parallax texture color. */ - void Color( const eeColorA& Color ) { mColor = Color; } + void Color( const ColorA& Color ) { mColor = Color; } /** Get the parallax texture color. */ - eeColorA Color() const { return mColor; } + ColorA Color() const { return mColor; } /** Set the Blend Mode used. */ void BlendMode( const EE_BLEND_MODE& Blend ) { mBlend = Blend; } @@ -79,7 +79,7 @@ class EE_API cScrollParallax { private: cSubTexture * mSubTexture; EE_BLEND_MODE mBlend; - eeColorA mColor; + ColorA mColor; eeVector2f mInitPos; eeVector2f mPos; eeVector2f mSpeed; diff --git a/include/eepp/graphics/csprite.hpp b/include/eepp/graphics/csprite.hpp index cd8cb7268..444de75d1 100755 --- a/include/eepp/graphics/csprite.hpp +++ b/include/eepp/graphics/csprite.hpp @@ -125,10 +125,10 @@ class EE_API cSprite { void AnimPaused( const bool& Pause ); /** Set the sprite color */ - void Color( const eeColorA& Color); + void Color( const ColorA& Color); /** @return The sprite color */ - const eeColorA& Color() const; + const ColorA& Color() const; /** Set the sprite Color Alpha */ void Alpha( const Uint8& Alpha ); @@ -189,7 +189,7 @@ class EE_API cSprite { * @param Color2 The Right - Bottom vertex color * @param Color3 The Right - Top vertex color */ - void UpdateVertexColors( const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3 ); + void UpdateVertexColors( const ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3 ); /** This will disable the vertex colors */ void DisableVertexColors(); @@ -365,8 +365,8 @@ class EE_API cSprite { eeVector2f mScale; Float mAnimSpeed; - eeColorA mColor; - eeColorA * mVertexColors; + ColorA mColor; + ColorA * mVertexColors; int mRepeations; //!< Number of repetions of the animation, default -1 that equals to loop. diff --git a/include/eepp/graphics/csubtexture.hpp b/include/eepp/graphics/csubtexture.hpp index 40a31b4f7..a2c8b3e12 100644 --- a/include/eepp/graphics/csubtexture.hpp +++ b/include/eepp/graphics/csubtexture.hpp @@ -80,23 +80,23 @@ class EE_API cSubTexture { /** Set the SubTexture offset. */ void Offset( const eeVector2i& offset ); - void Draw( const Float& X, const Float& Y, const eeColorA& Color = eeColorA(), const Float& Angle = 0.f, const eeVector2f& Scale = eeVector2f::One, const EE_BLEND_MODE& Blend = ALPHA_NORMAL, const EE_RENDER_MODE& Effect = RN_NORMAL, eeOriginPoint Center = eeOriginPoint(eeOriginPoint::OriginCenter) ); + void Draw( const Float& X, const Float& Y, const ColorA& Color = ColorA(), const Float& Angle = 0.f, const eeVector2f& Scale = eeVector2f::One, const EE_BLEND_MODE& Blend = ALPHA_NORMAL, const EE_RENDER_MODE& Effect = RN_NORMAL, eeOriginPoint Center = eeOriginPoint(eeOriginPoint::OriginCenter) ); - void Draw( const Float& X, const Float& Y, const Float& Angle, const eeVector2f& Scale, const eeColorA& Color0 = eeColorA(), const eeColorA& Color1 = eeColorA(), const eeColorA& Color2 = eeColorA(), const eeColorA& Color3 = eeColorA(), const EE_BLEND_MODE& Blend = ALPHA_NORMAL, const EE_RENDER_MODE& Effect = RN_NORMAL, eeOriginPoint Center = eeOriginPoint(eeOriginPoint::OriginCenter) ); + void Draw( const Float& X, const Float& Y, const Float& Angle, const eeVector2f& Scale, const ColorA& Color0 = ColorA(), const ColorA& Color1 = ColorA(), const ColorA& Color2 = ColorA(), const ColorA& Color3 = ColorA(), const EE_BLEND_MODE& Blend = ALPHA_NORMAL, const EE_RENDER_MODE& Effect = RN_NORMAL, eeOriginPoint Center = eeOriginPoint(eeOriginPoint::OriginCenter) ); - void Draw( const eeQuad2f Q, const eeVector2f& Offset = eeVector2f(), const Float& Angle = 0.f, const eeVector2f& Scale = eeVector2f::One, const eeColorA& Color0 = eeColorA(), const eeColorA& Color1 = eeColorA(), const eeColorA& Color2 = eeColorA(), const eeColorA& Color3 = eeColorA(), const EE_BLEND_MODE& Blend = ALPHA_NORMAL ); + void Draw( const eeQuad2f Q, const eeVector2f& Offset = eeVector2f(), const Float& Angle = 0.f, const eeVector2f& Scale = eeVector2f::One, const ColorA& Color0 = ColorA(), const ColorA& Color1 = ColorA(), const ColorA& Color2 = ColorA(), const ColorA& Color3 = ColorA(), const EE_BLEND_MODE& Blend = ALPHA_NORMAL ); /** @return The texture instance used by the SubTexture. */ cTexture * GetTexture(); /** Replaces a color in the SubTexture ( needs Lock() ) */ - void ReplaceColor( eeColorA ColorKey, eeColorA NewColor ); + void ReplaceColor( ColorA ColorKey, ColorA NewColor ); /** Creates a mask from a color. */ - void CreateMaskFromColor( eeColorA ColorKey, Uint8 Alpha ); + void CreateMaskFromColor( ColorA ColorKey, Uint8 Alpha ); /** Creates a mask from a color. */ - void CreateMaskFromColor( eeColor ColorKey, Uint8 Alpha ); + void CreateMaskFromColor( RGB ColorKey, Uint8 Alpha ); /** Creates a copy of the alpha mask to memory from the texture loaded in VRAM. */ void CacheAlphaMask(); @@ -110,12 +110,12 @@ class EE_API cSubTexture { /** @return The color that corresponds to the position indicated in the SubTexture. * If the SubTexture wasn't locked before this call, it will be locked automatically. */ - eeColorA GetColorAt( const Int32& X, const Int32& Y ); + ColorA GetColorAt( const Int32& X, const Int32& Y ); /** @brief Set a color to the position indicated in the SubTexture. * If the SubTexture wasn't locked before this call, it will be locked automatically. */ - void SetColorAt( const Int32& X, const Int32& Y, const eeColorA& Color ); + void SetColorAt( const Int32& X, const Int32& Y, const ColorA& Color ); /** Deletes the texture buffer from memory ( not from VRAM ) if it was cached before ( using Lock() ). */ void ClearCache(); diff --git a/include/eepp/graphics/ctextcache.hpp b/include/eepp/graphics/ctextcache.hpp index 29ac82023..fe2833361 100644 --- a/include/eepp/graphics/ctextcache.hpp +++ b/include/eepp/graphics/ctextcache.hpp @@ -12,14 +12,14 @@ class cFont; class EE_API cTextCache { public: /** Create a text from a font */ - cTextCache( cFont * font, const String& text = "", eeColorA FontColor = eeColorA(255,255,255,255), eeColorA FontShadowColor = eeColorA(0,0,0,255) ); + cTextCache( cFont * font, const String& text = "", ColorA FontColor = ColorA(255,255,255,255), ColorA FontShadowColor = ColorA(0,0,0,255) ); cTextCache(); ~cTextCache(); /** Create a text from a font */ - void Create( cFont * font, const String& text = "", eeColorA FontColor = eeColorA(255,255,255,255), eeColorA FontShadowColor = eeColorA(0,0,0,255) ); + void Create( cFont * font, const String& text = "", ColorA FontColor = ColorA(255,255,255,255), ColorA FontShadowColor = ColorA(0,0,0,255) ); /** @return The font used for the text cache */ cFont * Font() const; @@ -46,16 +46,16 @@ class EE_API cTextCache { std::vector& VertextCoords(); /** @return The text colors cached */ - std::vector& Colors(); + std::vector& Colors(); /** Draw the cached text on screen */ void Draw( const Float& X, const Float& Y, const eeVector2f& Scale = eeVector2f::One, const Float& Angle = 0, EE_BLEND_MODE Effect = ALPHA_NORMAL ); /** @return The Font Color */ - const eeColorA& Color() const; + const ColorA& Color() const; /** Set the color of the string rendered */ - void Color(const eeColorA& color); + void Color(const ColorA& color); /** @see Set the alpha of each individual character. ** This doesn't break any custom color per-character setted. */ @@ -66,13 +66,13 @@ class EE_API cTextCache { * @param from The first char to change the color * @param to The last char to change the color */ - void Color(const eeColorA& color, Uint32 from, Uint32 to ); + void Color(const ColorA& color, Uint32 from, Uint32 to ); /** @return The Shadow Font Color */ - const eeColorA& ShadowColor() const; + const ColorA& ShadowColor() const; /** Set the shadow color of the string rendered */ - void ShadowColor(const eeColorA& color); + void ShadowColor(const ColorA& color); /** @return The number of lines that the cached text contains */ const int& GetNumLines() const; @@ -95,8 +95,8 @@ class EE_API cTextCache { int mNumLines; int mLargestLineCharCount; - eeColorA mFontColor; - eeColorA mFontShadowColor; + ColorA mFontColor; + ColorA mFontShadowColor; Uint32 mFlags; Uint32 mVertexNumCached; @@ -105,7 +105,7 @@ class EE_API cTextCache { std::vector mLinesWidth; std::vector mRenderCoords; - std::vector mColors; + std::vector mColors; void UpdateCoords(); diff --git a/include/eepp/graphics/ctexture.hpp b/include/eepp/graphics/ctexture.hpp index 471f1a91b..6a093521a 100755 --- a/include/eepp/graphics/ctexture.hpp +++ b/include/eepp/graphics/ctexture.hpp @@ -1,9 +1,9 @@ #ifndef EE_GRAPHICSCTEXTURE_H #define EE_GRAPHICSCTEXTURE_H -#include +#include #include -#include +#include #include #include @@ -68,13 +68,13 @@ class EE_API cTexture : public cImage, private NonCopyable { bool SaveToFile( const std::string& filepath, const EE_SAVE_TYPE& Format ); /** Replace a color on the texture */ - void ReplaceColor( const eeColorA& ColorKey, const eeColorA& NewColor); + void ReplaceColor( const ColorA& ColorKey, const ColorA& NewColor); /** Create an Alpha mask from a Color */ - void CreateMaskFromColor( const eeColorA& ColorKey, Uint8 Alpha ); + void CreateMaskFromColor( const ColorA& ColorKey, Uint8 Alpha ); /** Fill a texture with a color */ - void FillWithColor( const eeColorA& Color ); + void FillWithColor( const ColorA& Color ); /** Resize the texture */ void Resize( const Uint32& newWidth, const Uint32& newHeight, EE_RESAMPLER_FILTER filter = RESAMPLER_LANCZOS4 ); @@ -152,7 +152,7 @@ class EE_API cTexture : public cImage, private NonCopyable { * @param width The width of the texture rendered * @param height The height of the texture rendered */ - void DrawFast( const Float& x, const Float& y, const Float& Angle = 0.0f, const eeVector2f& Scale = eeVector2f::One, const eeColorA& Color = eeColorA(), const EE_BLEND_MODE &Blend = ALPHA_NORMAL, const Float &width = 0, const Float &height = 0 ); + void DrawFast( const Float& x, const Float& y, const Float& Angle = 0.0f, const eeVector2f& Scale = eeVector2f::One, const ColorA& Color = ColorA(), const EE_BLEND_MODE &Blend = ALPHA_NORMAL, const Float &width = 0, const Float &height = 0 ); /** Render the texture on screen * @param x The x position on screen @@ -165,7 +165,7 @@ class EE_API cTexture : public cImage, private NonCopyable { * @param Center The rotation and scaling center. The center point is relative to the top-left corner of the object. * @param texSector The texture sector to render. You can render only a part of the texture. ( default render all the texture ) */ - void Draw( const Float &x, const Float &y, const Float &Angle = 0, const eeVector2f &Scale = eeVector2f::One, const eeColorA& Color = eeColorA(255,255,255,255), const EE_BLEND_MODE &Blend = ALPHA_NORMAL, const EE_RENDER_MODE &Effect = RN_NORMAL, eeOriginPoint Center = eeOriginPoint(eeOriginPoint::OriginCenter), const eeRecti& texSector = eeRecti(0,0,0,0) ); + void Draw( const Float &x, const Float &y, const Float &Angle = 0, const eeVector2f &Scale = eeVector2f::One, const ColorA& Color = ColorA(255,255,255,255), const EE_BLEND_MODE &Blend = ALPHA_NORMAL, const EE_RENDER_MODE &Effect = RN_NORMAL, eeOriginPoint Center = eeOriginPoint(eeOriginPoint::OriginCenter), const eeRecti& texSector = eeRecti(0,0,0,0) ); /** Render the texture on screen. Extended because can set the vertex colors individually * @param x The x position on screen @@ -183,7 +183,7 @@ class EE_API cTexture : public cImage, private NonCopyable { * @param Center The rotation and scaling center. The center point is relative to the top-left corner of the object. * @param texSector The texture sector to render. You can render only a part of the texture. ( default render all the texture ) */ - void DrawEx( Float x, Float y, Float width = 0.0f, Float height = 0.0f, const Float &Angle = 0, const eeVector2f &Scale = eeVector2f::One, const eeColorA& Color0 = eeColorA(255,255,255,255), const eeColorA& Color1 = eeColorA(255,255,255,255), const eeColorA& Color2 = eeColorA(255,255,255,255), const eeColorA& Color3 = eeColorA(255,255,255,255), const EE_BLEND_MODE &Blend = ALPHA_NORMAL, const EE_RENDER_MODE &Effect = RN_NORMAL, eeOriginPoint Center = eeOriginPoint(eeOriginPoint::OriginCenter), const eeRecti& texSector = eeRecti(0,0,0,0) ); + void DrawEx( Float x, Float y, Float width = 0.0f, Float height = 0.0f, const Float &Angle = 0, const eeVector2f &Scale = eeVector2f::One, const ColorA& Color0 = ColorA(255,255,255,255), const ColorA& Color1 = ColorA(255,255,255,255), const ColorA& Color2 = ColorA(255,255,255,255), const ColorA& Color3 = ColorA(255,255,255,255), const EE_BLEND_MODE &Blend = ALPHA_NORMAL, const EE_RENDER_MODE &Effect = RN_NORMAL, eeOriginPoint Center = eeOriginPoint(eeOriginPoint::OriginCenter), const eeRecti& texSector = eeRecti(0,0,0,0) ); /** Render a quad on Screen * @param Q The eeQuad2f @@ -194,7 +194,7 @@ class EE_API cTexture : public cImage, private NonCopyable { * @param Blend Set the Blend Mode ( default ALPHA_NORMAL ) * @param texSector The texture sector to render. You can render only a part of the texture. ( default render all the texture ) */ - void DrawQuad( const eeQuad2f& Q, const eeVector2f& Offset = eeVector2f(), const Float &Angle = 0.0f, const eeVector2f &Scale = eeVector2f::One, const eeColorA& Color = eeColorA(255,255,255,255), const EE_BLEND_MODE &Blend = ALPHA_NORMAL, const eeRecti& texSector = eeRecti(0,0,0,0) ); + void DrawQuad( const eeQuad2f& Q, const eeVector2f& Offset = eeVector2f(), const Float &Angle = 0.0f, const eeVector2f &Scale = eeVector2f::One, const ColorA& Color = ColorA(255,255,255,255), const EE_BLEND_MODE &Blend = ALPHA_NORMAL, const eeRecti& texSector = eeRecti(0,0,0,0) ); /** Render a quad on Screen * @param Q The eeQuad2f @@ -208,7 +208,7 @@ class EE_API cTexture : public cImage, private NonCopyable { * @param Blend Set the Blend Mode ( default ALPHA_NORMAL ) * @param texSector The texture sector to render. You can render only a part of the texture. ( default render all the texture ) */ - void DrawQuadEx( eeQuad2f Q, const eeVector2f& Offset = eeVector2f(), const Float &Angle = 0.0f, const eeVector2f &Scale = eeVector2f::One, const eeColorA& Color0 = eeColorA(255,255,255,255), const eeColorA& Color1 = eeColorA(255,255,255,255), const eeColorA& Color2 = eeColorA(255,255,255,255), const eeColorA& Color3 = eeColorA(255,255,255,255), const EE_BLEND_MODE &Blend = ALPHA_NORMAL, eeRecti texSector = eeRecti(0,0,0,0) ); + void DrawQuadEx( eeQuad2f Q, const eeVector2f& Offset = eeVector2f(), const Float &Angle = 0.0f, const eeVector2f &Scale = eeVector2f::One, const ColorA& Color0 = ColorA(255,255,255,255), const ColorA& Color1 = ColorA(255,255,255,255), const ColorA& Color2 = ColorA(255,255,255,255), const ColorA& Color3 = ColorA(255,255,255,255), const EE_BLEND_MODE &Blend = ALPHA_NORMAL, eeRecti texSector = eeRecti(0,0,0,0) ); /** Set the texture factory internal id of the texture */ void Id( const Uint32& id ); @@ -220,7 +220,7 @@ class EE_API cTexture : public cImage, private NonCopyable { void Reload(); /** Set a pixel to the locked texture. */ - void SetPixel( const unsigned int& x, const unsigned int& y, const eeColorA& Color ); + void SetPixel( const unsigned int& x, const unsigned int& y, const ColorA& Color ); /** Bind the texture. Activate the texture for rendering. */ void Bind(); diff --git a/include/eepp/graphics/ctexturefactory.hpp b/include/eepp/graphics/ctexturefactory.hpp index ddec72b28..8f32e274f 100755 --- a/include/eepp/graphics/ctexturefactory.hpp +++ b/include/eepp/graphics/ctexturefactory.hpp @@ -24,7 +24,7 @@ class EE_API cTextureFactory : protected Mutex { * @param KeepLocalCopy Keep the array data copy. ( useful if want to reload the texture ) * @return Internal Texture Id */ - Uint32 CreateEmptyTexture( const unsigned int& Width, const unsigned int& Height, const unsigned int& Channels = 4, const eeColorA& DefaultColor = eeColorA(0,0,0,255), const bool& Mipmap = false, const EE_CLAMP_MODE& ClampMode = CLAMP_TO_EDGE, const bool& CompressTexture = false, const bool& KeepLocalCopy = false ); + Uint32 CreateEmptyTexture( const unsigned int& Width, const unsigned int& Height, const unsigned int& Channels = 4, const ColorA& DefaultColor = ColorA(0,0,0,255), const bool& Mipmap = false, const EE_CLAMP_MODE& ClampMode = CLAMP_TO_EDGE, const bool& CompressTexture = false, const bool& KeepLocalCopy = false ); /** Loads a RAW Texture from Memory * @param Pixels The Texture array diff --git a/include/eepp/graphics/ctextureloader.hpp b/include/eepp/graphics/ctextureloader.hpp index 3714afb74..f7cc900ca 100644 --- a/include/eepp/graphics/ctextureloader.hpp +++ b/include/eepp/graphics/ctextureloader.hpp @@ -67,7 +67,7 @@ class EE_API cTextureLoader : public ObjectLoader { virtual ~cTextureLoader(); /** A color key can be set to be transparent in the texture. This must be set before the loading is done. */ - void SetColorKey( eeColor Color ); + void SetColorKey( RGB Color ); /** This must be called for the asynchronous mode to update the texture data to the GPU, the call must be done from the same thread that the GL context was created ( the main thread ). ** @see ObjectLoader::Update */ @@ -105,7 +105,7 @@ class EE_API cTextureLoader : public ObjectLoader { const Uint8 * mImagePtr; Uint32 mSize; - eeColor * mColorKey; + RGB * mColorKey; void Start(); diff --git a/include/eepp/graphics/cttffont.hpp b/include/eepp/graphics/cttffont.hpp index ef0a90add..2333a4b04 100755 --- a/include/eepp/graphics/cttffont.hpp +++ b/include/eepp/graphics/cttffont.hpp @@ -40,7 +40,7 @@ class EE_API cTTFFont : public cFont { * @param AddPixelSeparator Indicates if separates the glyphs by a pixel to avoid problems with font scaling * @return If success */ - bool Load( const std::string& Filepath, const unsigned int& Size, EE_TTF_FONT_STYLE Style = TTF_STYLE_NORMAL, const Uint16& NumCharsToGen = 512, const eeColor& FontColor = eeColor(), const Uint8& OutlineSize = 0, const eeColor& OutlineColor = eeColor(0,0,0), const bool& AddPixelSeparator = true ); + bool Load( const std::string& Filepath, const unsigned int& Size, EE_TTF_FONT_STYLE Style = TTF_STYLE_NORMAL, const Uint16& NumCharsToGen = 512, const RGB& FontColor = RGB(), const Uint8& OutlineSize = 0, const RGB& OutlineColor = RGB(0,0,0), const bool& AddPixelSeparator = true ); /** Loads a True Type Font from pack * @param Pack Pointer to the pack instance @@ -54,7 +54,7 @@ class EE_API cTTFFont : public cFont { * @param AddPixelSeparator Indicates if separates the glyphs by a pixel to avoid problems with font scaling * @return If success */ - bool LoadFromPack( Pack* Pack, const std::string& FilePackPath, const unsigned int& Size, EE_TTF_FONT_STYLE Style = TTF_STYLE_NORMAL, const Uint16& NumCharsToGen = 512, const eeColor& FontColor = eeColor(), const Uint8& OutlineSize = 0, const eeColor& OutlineColor = eeColor(0,0,0), const bool& AddPixelSeparator = true ); + bool LoadFromPack( Pack* Pack, const std::string& FilePackPath, const unsigned int& Size, EE_TTF_FONT_STYLE Style = TTF_STYLE_NORMAL, const Uint16& NumCharsToGen = 512, const RGB& FontColor = RGB(), const Uint8& OutlineSize = 0, const RGB& OutlineColor = RGB(0,0,0), const bool& AddPixelSeparator = true ); /** Loads a True Type Font from memory * @param TTFData The pointer to the data @@ -68,7 +68,7 @@ class EE_API cTTFFont : public cFont { * @param AddPixelSeparator Indicates if separates the glyphs by a pixel to avoid problems with font scaling * @return If success */ - bool LoadFromMemory( Uint8* TTFData, const unsigned int& TTFDataSize, const unsigned int& Size, EE_TTF_FONT_STYLE Style = TTF_STYLE_NORMAL, const Uint16& NumCharsToGen = 512, const eeColor& FontColor = eeColor(), const Uint8& OutlineSize = 0, const eeColor& OutlineColor = eeColor(0,0,0), const bool& AddPixelSeparator = true ); + bool LoadFromMemory( Uint8* TTFData, const unsigned int& TTFDataSize, const unsigned int& Size, EE_TTF_FONT_STYLE Style = TTF_STYLE_NORMAL, const Uint16& NumCharsToGen = 512, const RGB& FontColor = RGB(), const Uint8& OutlineSize = 0, const RGB& OutlineColor = RGB(0,0,0), const bool& AddPixelSeparator = true ); /** Save the texture generated from the TTF file to disk */ bool SaveTexture( const std::string& Filepath, const EE_SAVE_TYPE& Format = SAVE_TYPE_PNG ); @@ -83,14 +83,14 @@ class EE_API cTTFFont : public cFont { HaikuTTF::hkFont * mFont; HaikuTTF::hkFont * mFontOutline; - eeColorA * mPixels; + ColorA * mPixels; std::string mFilepath; Uint32 mNumChars; Uint8 mOutlineSize; - eeColor mFontColor; - eeColor mOutlineColor; + RGB mFontColor; + RGB mOutlineColor; EE_TTF_FONT_STYLE mStyle; @@ -109,7 +109,7 @@ class EE_API cTTFFont : public cFont { void UpdateLoading(); - bool iLoad( const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const eeColor& FontColor, Uint8 OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ); + bool iLoad( const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const RGB& FontColor, Uint8 OutlineSize, const RGB& OutlineColor, const bool& AddPixelSeparator ); void MakeOutline( Uint8 *in, Uint8 *out, Int16 w, Int16 h, Int16 OutlineSize ); diff --git a/include/eepp/graphics/cttffontloader.hpp b/include/eepp/graphics/cttffontloader.hpp index d0cef3171..69197dce0 100644 --- a/include/eepp/graphics/cttffontloader.hpp +++ b/include/eepp/graphics/cttffontloader.hpp @@ -24,7 +24,7 @@ class EE_API cTTFFontLoader : public ObjectLoader { * @param OutlineColor The Outline Color * @param AddPixelSeparator Indicates if separates the glyphs by a pixel to avoid problems with font scaling */ - cTTFFontLoader( const std::string& FontName, const std::string& Filepath, const unsigned int& Size, EE_TTF_FONT_STYLE Style = TTF_STYLE_NORMAL, const Uint16& NumCharsToGen = 512, const eeColor& FontColor = eeColor(), const Uint8& OutlineSize = 0, const eeColor& OutlineColor = eeColor(0,0,0), const bool& AddPixelSeparator = true ); + cTTFFontLoader( const std::string& FontName, const std::string& Filepath, const unsigned int& Size, EE_TTF_FONT_STYLE Style = TTF_STYLE_NORMAL, const Uint16& NumCharsToGen = 512, const RGB& FontColor = RGB(), const Uint8& OutlineSize = 0, const RGB& OutlineColor = RGB(0,0,0), const bool& AddPixelSeparator = true ); /** Load a True Type Font from a Pack * @param FontName The font name @@ -38,7 +38,7 @@ class EE_API cTTFFontLoader : public ObjectLoader { * @param OutlineColor The Outline Color * @param AddPixelSeparator Indicates if separates the glyphs by a pixel to avoid problems with font scaling */ - cTTFFontLoader( const std::string& FontName, Pack * Pack, const std::string& FilePackPath, const unsigned int& Size, EE_TTF_FONT_STYLE Style = TTF_STYLE_NORMAL, const Uint16& NumCharsToGen = 512, const eeColor& FontColor = eeColor(), const Uint8& OutlineSize = 0, const eeColor& OutlineColor = eeColor(0,0,0), const bool& AddPixelSeparator = true ); + cTTFFontLoader( const std::string& FontName, Pack * Pack, const std::string& FilePackPath, const unsigned int& Size, EE_TTF_FONT_STYLE Style = TTF_STYLE_NORMAL, const Uint16& NumCharsToGen = 512, const RGB& FontColor = RGB(), const Uint8& OutlineSize = 0, const RGB& OutlineColor = RGB(0,0,0), const bool& AddPixelSeparator = true ); /** Loads a True Type Font from memory * @param FontName The font name @@ -52,7 +52,7 @@ class EE_API cTTFFontLoader : public ObjectLoader { * @param OutlineColor The Outline Color * @param AddPixelSeparator Indicates if separates the glyphs by a pixel to avoid problems with font scaling */ - cTTFFontLoader( const std::string& FontName, Uint8* TTFData, const unsigned int& TTFDataSize, const unsigned int& Size, EE_TTF_FONT_STYLE Style = TTF_STYLE_NORMAL, const Uint16& NumCharsToGen = 512, const eeColor& FontColor = eeColor(), const Uint8& OutlineSize = 0, const eeColor& OutlineColor = eeColor(0,0,0), const bool& AddPixelSeparator = true ); + cTTFFontLoader( const std::string& FontName, Uint8* TTFData, const unsigned int& TTFDataSize, const unsigned int& Size, EE_TTF_FONT_STYLE Style = TTF_STYLE_NORMAL, const Uint16& NumCharsToGen = 512, const RGB& FontColor = RGB(), const Uint8& OutlineSize = 0, const RGB& OutlineColor = RGB(0,0,0), const bool& AddPixelSeparator = true ); virtual ~cTTFFontLoader(); @@ -86,9 +86,9 @@ class EE_API cTTFFontLoader : public ObjectLoader { unsigned int mSize; EE_TTF_FONT_STYLE mStyle; Uint16 mNumCharsToGen; - eeColor mFontColor; + RGB mFontColor; Uint8 mOutlineSize; - eeColor mOutlineColor; + RGB mOutlineColor; bool mAddPixelSeparator; Pack * mPack; Uint8 * mData; diff --git a/include/eepp/graphics/cvertexbuffer.hpp b/include/eepp/graphics/cvertexbuffer.hpp index aeef13176..54aa9cca9 100644 --- a/include/eepp/graphics/cvertexbuffer.hpp +++ b/include/eepp/graphics/cvertexbuffer.hpp @@ -40,7 +40,7 @@ class EE_API cVertexBuffer { /** @brief Adds a color to the buffer. * @param Color The color value. */ - void AddColor( const eeColorA& Color ); + void AddColor( const ColorA& Color ); /** @brief Adds an index to the buffer. * @param Index The index value. @@ -83,7 +83,7 @@ class EE_API cVertexBuffer { /** @return The color at the buffer position. * @param Index The position in the buffer. */ - eeColorA GetColor( const Uint32& Index ); + ColorA GetColor( const Uint32& Index ); /** @return The index at the buffer position. * @param Index The position in the buffer. @@ -150,7 +150,7 @@ class EE_API cVertexBuffer { // Upload the rounded rectangle data to the vertex buffer. for ( Uint32 i = 0; i < Poly.Size(); i++ ) { VBO->AddVertex( Poly[i] ); // Adds the vertex position - VBO->AddColor( eeColorA( 255, 255, 255, 255 ) ); // Adds the vertex color + VBO->AddColor( ColorA( 255, 255, 255, 255 ) ); // Adds the vertex color } // Compiles the buffered data diff --git a/include/eepp/physics/physicshelper.hpp b/include/eepp/physics/physicshelper.hpp index 18a9af1dd..c8792af86 100644 --- a/include/eepp/physics/physicshelper.hpp +++ b/include/eepp/physics/physicshelper.hpp @@ -78,7 +78,7 @@ typedef cpBB cBB; #ifdef PHYSICS_RENDERER_ENABLED -inline eeColorA ColorFromPointer(void *ptr) { +inline ColorA ColorFromPointer(void *ptr) { unsigned long val = (long)ptr; // hash the pointer up nicely @@ -101,10 +101,10 @@ inline eeColorA ColorFromPointer(void *ptr) { g = (g*mult)/max + add; b = (b*mult)/max + add; - return eeColorA(r, g, b, 255); + return ColorA(r, g, b, 255); } -inline eeColorA ColorForShape( cpShape *shape, cpSpace *space ) { +inline ColorA ColorForShape( cpShape *shape, cpSpace *space ) { cpBody *body = shape->body; int nc; @@ -112,11 +112,11 @@ inline eeColorA ColorForShape( cpShape *shape, cpSpace *space ) { if(cpBodyIsSleeping(body)){ float v = 0.25f; nc = (int)( v * 255 ); - return eeColorA( nc, nc, nc, 255 ); + return ColorA( nc, nc, nc, 255 ); } else if(body->CP_PRIVATE(node).idleTime > space->sleepTimeThreshold) { float v = 0.9f; nc = (int)( v * 255 ); - return eeColorA( nc, nc, nc, 255 ); + return ColorA( nc, nc, nc, 255 ); } } diff --git a/include/eepp/system/colors.hpp b/include/eepp/system/colors.hpp index 6709c5d27..9aa8ea601 100755 --- a/include/eepp/system/colors.hpp +++ b/include/eepp/system/colors.hpp @@ -191,40 +191,69 @@ const tColorA tColorA::Transparent = tColorA(0,0,0,0); template const tColorA tColorA::Black = tColorA(0,0,0,255); -typedef tColor eeColor; -typedef tColor eeColorf; -typedef tColorA eeColorA; -typedef tColorA eeColorAf; -typedef tColorA eeColorAff; +typedef tColor Colorf; +typedef tColorA ColorA; +typedef tColorA ColorAf; +typedef tColorA ColorAff; //! @brief Small class to help in some color operations -class Color { +class Color : public tColor { public: + Color() : tColor() + { + } + + /** Creates an RGB color from each component. + ** @param r Red component + ** @param g Green component + ** @param b Blue component + */ + Color(Uint8 r, Uint8 g, Uint8 b) : tColor( r, g, b ) + { + } + + Color( const tColor& color ) : + tColor( color.Red, color.Green, color.Blue ) + { + } + + Color( Uint32 Col ) + { + Col = BitOp::SwapLE32( Col ); + Red = static_cast( Col >> 16 ); + Green = static_cast( Col >> 8 ); + Blue = static_cast( Col >> 0 ); + } + /** Blend a source color to destination color */ - static inline eeColorAf Blend( eeColorAf srcf, eeColorAf dstf ) { + static inline ColorAf Blend( ColorAf srcf, ColorAf dstf ) { Float alpha = srcf.Alpha + dstf.Alpha * ( 1.f - srcf.Alpha ); Float red = ( srcf.Red * srcf.Alpha + dstf.Red * dstf.Alpha * ( 1.f - srcf.Alpha ) ) / alpha; Float green = ( srcf.Green * srcf.Alpha + dstf.Green * dstf.Alpha * ( 1.f - srcf.Alpha ) ) / alpha; Float blue = ( srcf.Blue * srcf.Alpha + dstf.Blue * dstf.Alpha * ( 1.f - srcf.Alpha ) ) / alpha; - return eeColorAf( red, green, blue, alpha ); + return ColorAf( red, green, blue, alpha ); } #define EE_COLOR_BLEND_FTOU8(color) (Uint8)( color == 1.f ? 255 : (color * 255.99f)) /** Blend a source color to destination color */ - static inline eeColorA Blend( eeColorA src, eeColorA dst ) { - eeColorAf srcf( (Float)src.Red / 255.f, (Float)src.Green / 255.f, (Float)src.Blue / 255.f, (Float)src.Alpha / 255.f ); - eeColorAf dstf( (Float)dst.Red / 255.f, (Float)dst.Green / 255.f, (Float)dst.Blue / 255.f, (Float)dst.Alpha / 255.f ); + static inline ColorA Blend( ColorA src, ColorA dst ) { + ColorAf srcf( (Float)src.Red / 255.f, (Float)src.Green / 255.f, (Float)src.Blue / 255.f, (Float)src.Alpha / 255.f ); + ColorAf dstf( (Float)dst.Red / 255.f, (Float)dst.Green / 255.f, (Float)dst.Blue / 255.f, (Float)dst.Alpha / 255.f ); Float alpha = srcf.Alpha + dstf.Alpha * ( 1.f - srcf.Alpha ); - Float red = ( srcf.Red * srcf.Alpha + dstf.Red * dstf.Alpha * ( 1.f - srcf.Alpha ) ) / alpha; + Float red = ( srcf.Red * srcf.Alpha + dstf.Red * dstf.Alpha * ( 1.f - srcf.Alpha ) ) / alpha; Float green = ( srcf.Green * srcf.Alpha + dstf.Green * dstf.Alpha * ( 1.f - srcf.Alpha ) ) / alpha; Float blue = ( srcf.Blue * srcf.Alpha + dstf.Blue * dstf.Alpha * ( 1.f - srcf.Alpha ) ) / alpha; - return eeColorA( EE_COLOR_BLEND_FTOU8(red), EE_COLOR_BLEND_FTOU8(green), EE_COLOR_BLEND_FTOU8(blue), EE_COLOR_BLEND_FTOU8(alpha) ); + return ColorA( EE_COLOR_BLEND_FTOU8(red), EE_COLOR_BLEND_FTOU8(green), EE_COLOR_BLEND_FTOU8(blue), EE_COLOR_BLEND_FTOU8(alpha) ); } }; +typedef Color RGB; +typedef Colorf RGBf; +typedef ColorA RGBA; +typedef ColorAf RGBAf; }} diff --git a/include/eepp/ui/cuibackground.hpp b/include/eepp/ui/cuibackground.hpp index 9a1a18c02..baf90fdaa 100644 --- a/include/eepp/ui/cuibackground.hpp +++ b/include/eepp/ui/cuibackground.hpp @@ -8,19 +8,19 @@ namespace EE { namespace UI { class EE_API cUIBackground { public: cUIBackground(); - cUIBackground( const eeColorA& Color, const unsigned int& Corners = 0, const EE_BLEND_MODE& BlendMode = ALPHA_NORMAL ); + cUIBackground( const ColorA& Color, const unsigned int& Corners = 0, const EE_BLEND_MODE& BlendMode = ALPHA_NORMAL ); cUIBackground( const cUIBackground& Back ); - cUIBackground( const eeColorA& TopLeftColor, const eeColorA& BottomLeftColor, const eeColorA& BottomRightColor, const eeColorA& TopRightColor, const unsigned int& Corners, const EE_BLEND_MODE& BlendMode ); + cUIBackground( const ColorA& TopLeftColor, const ColorA& BottomLeftColor, const ColorA& BottomRightColor, const ColorA& TopRightColor, const unsigned int& Corners, const EE_BLEND_MODE& BlendMode ); - eeColorA& Color( const unsigned int& index = 0 ); + ColorA& Color( const unsigned int& index = 0 ); - void Color( const eeColorA& Col ); + void Color( const ColorA& Col ); - const std::vector& Colors(); + const std::vector& Colors(); - void Colors( const eeColorA& TopLeftColor, const eeColorA& BottomLeftColor, const eeColorA& BottomRightColor, const eeColorA& TopRightColor ); + void Colors( const ColorA& TopLeftColor, const ColorA& BottomLeftColor, const ColorA& BottomRightColor, const ColorA& TopRightColor ); - void ColorsTo( const eeColorA& Color ); + void ColorsTo( const ColorA& Color ); const EE_BLEND_MODE& Blend() const; void Blend( const EE_BLEND_MODE& blend ); @@ -28,7 +28,7 @@ class EE_API cUIBackground { const unsigned int& Corners() const; void Corners( const unsigned int& corners ); protected: - std::vector mColor; + std::vector mColor; EE_BLEND_MODE mBlendMode; unsigned int mCorners; diff --git a/include/eepp/ui/cuiborder.hpp b/include/eepp/ui/cuiborder.hpp index 9a28ed1af..18691c500 100644 --- a/include/eepp/ui/cuiborder.hpp +++ b/include/eepp/ui/cuiborder.hpp @@ -10,13 +10,13 @@ class EE_API cUIBorder { cUIBorder(); cUIBorder( const cUIBorder& border ); - const eeColorA& Color() const; - void Color( const eeColorA& Col ); + const ColorA& Color() const; + void Color( const ColorA& Col ); const unsigned int& Width() const; void Width( const unsigned int& width ); protected: - eeColorA mColor; + ColorA mColor; unsigned int mWidth; }; diff --git a/include/eepp/ui/cuicontrolanim.hpp b/include/eepp/ui/cuicontrolanim.hpp index bbc956902..f01b6267e 100644 --- a/include/eepp/ui/cuicontrolanim.hpp +++ b/include/eepp/ui/cuicontrolanim.hpp @@ -82,7 +82,7 @@ class EE_API cUIControlAnim : public cUIDragable { virtual void BorderDraw(); - eeColorA GetColor( const eeColorA& Col ); + ColorA GetColor( const ColorA& Col ); virtual void UpdateQuad(); diff --git a/include/eepp/ui/cuigfx.hpp b/include/eepp/ui/cuigfx.hpp index d0b48f561..2049fca11 100644 --- a/include/eepp/ui/cuigfx.hpp +++ b/include/eepp/ui/cuigfx.hpp @@ -20,7 +20,7 @@ class EE_API cUIGfx : public cUIComplexControl { inline ~CreateParams() {} cSubTexture * SubTexture; - eeColorA SubTextureColor; + ColorA SubTextureColor; EE_RENDER_MODE SubTextureRender; }; @@ -40,9 +40,9 @@ class EE_API cUIGfx : public cUIComplexControl { void SubTexture( cSubTexture * subTexture ); - const eeColorA& Color() const; + const ColorA& Color() const; - void Color( const eeColorA& color ); + void Color( const ColorA& color ); const EE_RENDER_MODE& RenderMode() const; @@ -51,7 +51,7 @@ class EE_API cUIGfx : public cUIComplexControl { const eeVector2i& AlignOffset() const; protected: cSubTexture * mSubTexture; - eeColorA mColor; + ColorA mColor; EE_RENDER_MODE mRender; eeVector2i mAlignOffset; diff --git a/include/eepp/ui/cuilistbox.hpp b/include/eepp/ui/cuilistbox.hpp index 7979759db..41e52ce5f 100644 --- a/include/eepp/ui/cuilistbox.hpp +++ b/include/eepp/ui/cuilistbox.hpp @@ -48,9 +48,9 @@ class EE_API cUIListBox : public cUIComplexControl { eeRecti HScrollPadding; eeRecti VScrollPadding; cFont * Font; - eeColorA FontColor; - eeColorA FontOverColor; - eeColorA FontSelectedColor; + ColorA FontColor; + ColorA FontOverColor; + ColorA FontSelectedColor; Float TouchDragDeceleration; }; @@ -102,17 +102,17 @@ class EE_API cUIListBox : public cUIComplexControl { std::list GetItemsSelected(); - void FontColor( const eeColorA& Color ); + void FontColor( const ColorA& Color ); - const eeColorA& FontColor() const; + const ColorA& FontColor() const; - void FontOverColor( const eeColorA& Color ); + void FontOverColor( const ColorA& Color ); - const eeColorA& FontOverColor() const; + const ColorA& FontOverColor() const; - void FontSelectedColor( const eeColorA& Color ); + void FontSelectedColor( const ColorA& Color ); - const eeColorA& FontSelectedColor() const; + const ColorA& FontSelectedColor() const; void Font( cFont * Font ); @@ -177,9 +177,9 @@ class EE_API cUIListBox : public cUIComplexControl { cUIScrollBar * mVScrollBar; cUIScrollBar * mHScrollBar; cFont * mFont; - eeColorA mFontColor; - eeColorA mFontOverColor; - eeColorA mFontSelectedColor; + ColorA mFontColor; + ColorA mFontOverColor; + ColorA mFontSelectedColor; Uint32 mLastPos; Uint32 mMaxTextWidth; Int32 mHScrollInit; diff --git a/include/eepp/ui/cuimanager.hpp b/include/eepp/ui/cuimanager.hpp index 4777c2451..21e9b0289 100644 --- a/include/eepp/ui/cuimanager.hpp +++ b/include/eepp/ui/cuimanager.hpp @@ -61,17 +61,17 @@ class EE_API cUIManager { bool HighlightFocus() const; - void HighlightFocusColor( const eeColorA& Color ); + void HighlightFocusColor( const ColorA& Color ); - const eeColorA& HighlightFocusColor() const; + const ColorA& HighlightFocusColor() const; void HighlightOver( bool Highlight ); bool HighlightOver() const; - void HighlightOverColor( const eeColorA& Color ); + void HighlightOverColor( const ColorA& Color ); - const eeColorA& HighlightOverColor() const; + const ColorA& HighlightOverColor() const; void SendMouseClick( cUIControl * ToCtrl, const eeVector2i& Pos, const Uint32 Flags ); @@ -120,8 +120,8 @@ class EE_API cUIManager { Uint32 mResizeCb; Uint32 mFlags; - eeColorA mHighlightFocusColor; - eeColorA mHighlightOverColor; + ColorA mHighlightFocusColor; + ColorA mHighlightOverColor; eeVector2i mMouseDownPos; bool mInit; diff --git a/include/eepp/ui/cuimenu.hpp b/include/eepp/ui/cuimenu.hpp index a1c360418..c2f9fb511 100644 --- a/include/eepp/ui/cuimenu.hpp +++ b/include/eepp/ui/cuimenu.hpp @@ -48,10 +48,10 @@ class EE_API cUIMenu : public cUIComplexControl { Uint32 MinSpaceForIcons; Uint32 MinRightMargin; cFont * Font; - eeColorA FontColor; - eeColorA FontShadowColor; - eeColorA FontOverColor; - eeColorA FontSelectedColor; + ColorA FontColor; + ColorA FontShadowColor; + ColorA FontOverColor; + ColorA FontSelectedColor; }; @@ -108,10 +108,10 @@ class EE_API cUIMenu : public cUIComplexControl { std::deque mItems; eeRecti mPadding; cFont * mFont; - eeColorA mFontColor; - eeColorA mFontShadowColor; - eeColorA mFontOverColor; - eeColorA mFontSelectedColor; + ColorA mFontColor; + ColorA mFontShadowColor; + ColorA mFontOverColor; + ColorA mFontSelectedColor; Uint32 mMinWidth; Uint32 mMinSpaceForIcons; Uint32 mMinRightMargin; diff --git a/include/eepp/ui/cuipushbutton.hpp b/include/eepp/ui/cuipushbutton.hpp index a3ced4c32..1ca0edd24 100644 --- a/include/eepp/ui/cuipushbutton.hpp +++ b/include/eepp/ui/cuipushbutton.hpp @@ -45,9 +45,9 @@ class EE_API cUIPushButton : public cUIComplexControl { } cFont * Font; - eeColorA FontColor; - eeColorA FontShadowColor; - eeColorA FontOverColor; + ColorA FontColor; + ColorA FontShadowColor; + ColorA FontOverColor; cSubTexture * Icon; Int32 IconHorizontalMargin; bool IconAutoMargin; @@ -82,16 +82,16 @@ class EE_API cUIPushButton : public cUIComplexControl { cUITextBox * TextBox() const; - const eeColorA& FontColor() const; + const ColorA& FontColor() const; - void FontColor( const eeColorA& color ); + void FontColor( const ColorA& color ); - const eeColorA& FontOverColor() const; + const ColorA& FontOverColor() const; - void FontOverColor( const eeColorA& color ); + void FontOverColor( const ColorA& color ); protected: - eeColorA mFontColor; - eeColorA mFontOverColor; + ColorA mFontColor; + ColorA mFontOverColor; cUIGfx * mIcon; cUITextBox * mTextBox; Int32 mIconSpace; diff --git a/include/eepp/ui/cuiskin.hpp b/include/eepp/ui/cuiskin.hpp index 41d746f85..bbc85950b 100644 --- a/include/eepp/ui/cuiskin.hpp +++ b/include/eepp/ui/cuiskin.hpp @@ -32,9 +32,9 @@ class EE_API cUISkin { virtual cSubTexture * GetSubTexture( const Uint32& State ) const = 0; - virtual void SetColor( const Uint32& State, const eeColorA& Color ); + virtual void SetColor( const Uint32& State, const ColorA& Color ); - virtual const eeColorA& GetColor( const Uint32& State ) const; + virtual const ColorA& GetColor( const Uint32& State ) const; virtual void SetSkins(); @@ -59,7 +59,7 @@ class EE_API cUISkin { std::string mName; Uint32 mNameHash; Uint32 mColorDefault; - eeColorA mColor[ cUISkinState::StateCount ]; + ColorA mColor[ cUISkinState::StateCount ]; cUITheme * mTheme; void StateBack( const Uint32& State ); diff --git a/include/eepp/ui/cuiskincomplex.hpp b/include/eepp/ui/cuiskincomplex.hpp index 352823efe..0ed163058 100644 --- a/include/eepp/ui/cuiskincomplex.hpp +++ b/include/eepp/ui/cuiskincomplex.hpp @@ -40,7 +40,7 @@ class EE_API cUISkinComplex : public cUISkin { virtual cUISkin * Copy(); protected: cSubTexture * mSubTexture[ cUISkinState::StateCount ][ SideCount ]; - eeColorA mTempColor; + ColorA mTempColor; void StateNormalToState( const Uint32& State ); }; diff --git a/include/eepp/ui/cuiskinsimple.hpp b/include/eepp/ui/cuiskinsimple.hpp index 9cb6b4bb8..d7fcabc86 100644 --- a/include/eepp/ui/cuiskinsimple.hpp +++ b/include/eepp/ui/cuiskinsimple.hpp @@ -23,7 +23,7 @@ class EE_API cUISkinSimple : public cUISkin { virtual cUISkin * Copy(); protected: cSubTexture * mSubTexture[ cUISkinState::StateCount ]; - eeColorA mTempColor; + ColorA mTempColor; void StateNormalToState( const Uint32& State ); }; diff --git a/include/eepp/ui/cuisprite.hpp b/include/eepp/ui/cuisprite.hpp index 12d11536b..b149a8bcf 100644 --- a/include/eepp/ui/cuisprite.hpp +++ b/include/eepp/ui/cuisprite.hpp @@ -44,9 +44,9 @@ class EE_API cUISprite : public cUIComplexControl { void Sprite( cSprite * sprite ); - eeColorA Color() const; + ColorA Color() const; - void Color( const eeColorA& color ); + void Color( const ColorA& color ); const EE_RENDER_MODE& RenderMode() const; diff --git a/include/eepp/ui/cuitabwidget.hpp b/include/eepp/ui/cuitabwidget.hpp index c92781a32..ed2f7f422 100644 --- a/include/eepp/ui/cuitabwidget.hpp +++ b/include/eepp/ui/cuitabwidget.hpp @@ -47,10 +47,10 @@ class EE_API cUITabWidget : public cUIComplexControl { inline ~CreateParams() {} cFont * Font; - eeColorA FontColor; - eeColorA FontShadowColor; - eeColorA FontOverColor; - eeColorA FontSelectedColor; + ColorA FontColor; + ColorA FontShadowColor; + ColorA FontOverColor; + ColorA FontSelectedColor; Int32 TabSeparation; Uint32 MaxTextLength; Uint32 TabWidgetHeight; @@ -60,7 +60,7 @@ class EE_API cUITabWidget : public cUIComplexControl { bool TabsClosable; bool SpecialBorderTabs; //! Indicates if the periferical tabs ( the left and right border tab ) are different from the central tabs. bool DrawLineBelowTabs; - eeColorA LineBelowTabsColor; + ColorA LineBelowTabsColor; Int32 LineBewowTabsYOffset; }; @@ -112,10 +112,10 @@ class EE_API cUITabWidget : public cUIComplexControl { cUIComplexControl * mCtrlContainer; cUIComplexControl * mTabContainer; cFont * mFont; - eeColorA mFontColor; - eeColorA mFontShadowColor; - eeColorA mFontOverColor; - eeColorA mFontSelectedColor; + ColorA mFontColor; + ColorA mFontShadowColor; + ColorA mFontOverColor; + ColorA mFontSelectedColor; Int32 mTabSeparation; Uint32 mMaxTextLength; Uint32 mTabWidgetHeight; @@ -124,7 +124,7 @@ class EE_API cUITabWidget : public cUIComplexControl { bool mTabsClosable; bool mSpecialBorderTabs; bool mDrawLineBelowTabs; - eeColorA mLineBelowTabsColor; + ColorA mLineBelowTabsColor; Int32 mLineBewowTabsYOffset; std::deque mTabs; diff --git a/include/eepp/ui/cuitextbox.hpp b/include/eepp/ui/cuitextbox.hpp index c4fb25e49..a4039a409 100644 --- a/include/eepp/ui/cuitextbox.hpp +++ b/include/eepp/ui/cuitextbox.hpp @@ -31,9 +31,9 @@ class EE_API cUITextBox : public cUIComplexControl { inline ~CreateParams() {} cFont * Font; - eeColorA FontColor; - eeColorA FontShadowColor; - eeColorA FontSelectionBackColor; + ColorA FontColor; + ColorA FontShadowColor; + ColorA FontSelectionBackColor; }; cUITextBox( const cUITextBox::CreateParams& Params ); @@ -56,17 +56,17 @@ class EE_API cUITextBox : public cUIComplexControl { virtual void Text( const String& text ); - const eeColorA& Color() const; + const ColorA& Color() const; - void Color( const eeColorA& color ); + void Color( const ColorA& color ); - const eeColorA& ShadowColor() const; + const ColorA& ShadowColor() const; - void ShadowColor( const eeColorA& color ); + void ShadowColor( const ColorA& color ); - const eeColorA& SelectionBackColor() const; + const ColorA& SelectionBackColor() const; - void SelectionBackColor( const eeColorA& color ); + void SelectionBackColor( const ColorA& color ); virtual void OnTextChanged(); @@ -94,9 +94,9 @@ class EE_API cUITextBox : public cUIComplexControl { protected: cTextCache * mTextCache; String mString; - eeColorA mFontColor; - eeColorA mFontShadowColor; - eeColorA mFontSelectionBackColor; + ColorA mFontColor; + ColorA mFontShadowColor; + ColorA mFontSelectionBackColor; eeVector2f mAlignOffset; eeRecti mPadding; Int32 mSelCurInit; diff --git a/include/eepp/ui/cuitheme.hpp b/include/eepp/ui/cuitheme.hpp index 2b3f794e4..029aeb459 100644 --- a/include/eepp/ui/cuitheme.hpp +++ b/include/eepp/ui/cuitheme.hpp @@ -78,21 +78,21 @@ class EE_API cUITheme : protected ResourceManager { cFont * Font() const; - const eeColorA& FontColor() const; + const ColorA& FontColor() const; - const eeColorA& FontShadowColor() const; + const ColorA& FontShadowColor() const; - const eeColorA& FontOverColor() const; + const ColorA& FontOverColor() const; - const eeColorA& FontSelectedColor() const; + const ColorA& FontSelectedColor() const; - void FontColor( const eeColorA& Color ); + void FontColor( const ColorA& Color ); - void FontShadowColor( const eeColorA& Color ); + void FontShadowColor( const ColorA& Color ); - void FontOverColor( const eeColorA& Color ); + void FontOverColor( const ColorA& Color ); - void FontSelectedColor( const eeColorA& Color ); + void FontSelectedColor( const ColorA& Color ); void UseDefaultThemeValues( const bool& Use ); @@ -102,7 +102,7 @@ class EE_API cUITheme : protected ResourceManager { cSubTexture * GetIconByName( const std::string& name ); - virtual cUIGfx * CreateGfx( cSubTexture * SubTexture, cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, eeColorA SubTextureColor = eeColorA(255,255,255,255), EE_RENDER_MODE SubTextureRender = RN_NORMAL ); + virtual cUIGfx * CreateGfx( cSubTexture * SubTexture, cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, ColorA SubTextureColor = ColorA(255,255,255,255), EE_RENDER_MODE SubTextureRender = RN_NORMAL ); virtual cUISprite * CreateSprite( cSprite * Sprite, cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, bool DeallocSprite = true, EE_RENDER_MODE SpriteRender = RN_NORMAL ); @@ -157,10 +157,10 @@ class EE_API cUITheme : protected ResourceManager { std::string mAbbr; cTextureAtlas * mTextureAtlas; cFont * mFont; - eeColorA mFontColor; - eeColorA mFontShadowColor; - eeColorA mFontOverColor; - eeColorA mFontSelectedColor; + ColorA mFontColor; + ColorA mFontShadowColor; + ColorA mFontOverColor; + ColorA mFontSelectedColor; bool mUseDefaultThemeValues; std::list mUIElements; std::list mUIIcons; diff --git a/include/eepp/ui/cuitooltip.hpp b/include/eepp/ui/cuitooltip.hpp index 09ba87451..28edfb7cf 100644 --- a/include/eepp/ui/cuitooltip.hpp +++ b/include/eepp/ui/cuitooltip.hpp @@ -34,8 +34,8 @@ class EE_API cUITooltip : public cUIControlAnim { inline ~CreateParams() {} cFont * Font; - eeColorA FontColor; - eeColorA FontShadowColor; + ColorA FontColor; + ColorA FontShadowColor; eeRecti Padding; }; @@ -65,13 +65,13 @@ class EE_API cUITooltip : public cUIControlAnim { virtual void Text( const String& text ); - const eeColorA& Color() const; + const ColorA& Color() const; - void Color( const eeColorA& color ); + void Color( const ColorA& color ); - const eeColorA& ShadowColor() const; + const ColorA& ShadowColor() const; - void ShadowColor( const eeColorA& color ); + void ShadowColor( const ColorA& color ); virtual void OnTextChanged(); @@ -98,8 +98,8 @@ class EE_API cUITooltip : public cUIControlAnim { const Time & TooltipTime() const; protected: cTextCache * mTextCache; - eeColorA mFontColor; - eeColorA mFontShadowColor; + ColorA mFontColor; + ColorA mFontShadowColor; eeVector2f mAlignOffset; eeRecti mPadding; Time mTooltipTime; diff --git a/include/eepp/ui/cuiwindow.hpp b/include/eepp/ui/cuiwindow.hpp index 7fe5532c6..884d23780 100644 --- a/include/eepp/ui/cuiwindow.hpp +++ b/include/eepp/ui/cuiwindow.hpp @@ -32,7 +32,7 @@ class EE_API cUIWindow : public cUIComplexControl { eeVector2i ButtonsPositionFixer; Uint32 ButtonsSeparation; Int32 MinCornerDistance; - eeColorA TitleFontColor; + ColorA TitleFontColor; Uint8 BaseAlpha; bool DecorationAutoSize; bool BorderAutoSize; @@ -158,7 +158,7 @@ class EE_API cUIWindow : public cUIComplexControl { UI_RESIZE_TYPE mResizeType; eeVector2i mResizePos; - eeColorA mTitleFontColor; + ColorA mTitleFontColor; KeyboardShortcuts mKbShortcuts; diff --git a/include/eepp/ui/cuiwinmenu.hpp b/include/eepp/ui/cuiwinmenu.hpp index e645c03c0..28f65b2a2 100644 --- a/include/eepp/ui/cuiwinmenu.hpp +++ b/include/eepp/ui/cuiwinmenu.hpp @@ -39,10 +39,10 @@ class EE_API cUIWinMenu : public cUIComplexControl { } cFont * Font; - eeColorA FontColor; - eeColorA FontShadowColor; - eeColorA FontOverColor; - eeColorA FontSelectedColor; + ColorA FontColor; + ColorA FontShadowColor; + ColorA FontOverColor; + ColorA FontSelectedColor; Uint32 MarginBetweenButtons; Uint32 ButtonMargin; Uint32 MenuHeight; @@ -63,17 +63,17 @@ class EE_API cUIWinMenu : public cUIComplexControl { virtual void SetTheme( cUITheme * Theme ); - void FontColor( const eeColorA& Color ); + void FontColor( const ColorA& Color ); - const eeColorA& FontColor() const; + const ColorA& FontColor() const; - void FontOverColor( const eeColorA& Color ); + void FontOverColor( const ColorA& Color ); - const eeColorA& FontOverColor() const; + const ColorA& FontOverColor() const; - void FontSelectedColor( const eeColorA& Color ); + void FontSelectedColor( const ColorA& Color ); - const eeColorA& FontSelectedColor() const; + const ColorA& FontSelectedColor() const; cFont * Font() const; @@ -84,10 +84,10 @@ class EE_API cUIWinMenu : public cUIComplexControl { typedef std::list< std::pair< cUISelectButton *, cUIPopUpMenu * > > WinMenuList; cFont * mFont; - eeColorA mFontColor; - eeColorA mFontShadowColor; - eeColorA mFontOverColor; - eeColorA mFontSelectedColor; + ColorA mFontColor; + ColorA mFontShadowColor; + ColorA mFontOverColor; + ColorA mFontSelectedColor; cUIPopUpMenu * mCurrentMenu; Uint32 mMarginBetweenButtons; Uint32 mButtonMargin; diff --git a/include/eepp/window/ccursor.hpp b/include/eepp/window/ccursor.hpp index 62ea16e2e..d1e4691ea 100644 --- a/include/eepp/window/ccursor.hpp +++ b/include/eepp/window/ccursor.hpp @@ -1,16 +1,18 @@ #ifndef EE_WINDOWCCURSOR_HPP #define EE_WINDOWCCURSOR_HPP -#include +#include #include #include using namespace EE::Graphics; -#include +#include namespace EE { namespace Window { +class cWindow; + class EE_API cCursor { public: /** @return The cursor id */ diff --git a/include/eepp/window/cplatformimpl.hpp b/include/eepp/window/cplatformimpl.hpp index d7950aa55..8a1968ad6 100644 --- a/include/eepp/window/cplatformimpl.hpp +++ b/include/eepp/window/cplatformimpl.hpp @@ -1,7 +1,13 @@ #ifndef EE_WINDOWCPLATFORMIMPL_HPP #define EE_WINDOWCPLATFORMIMPL_HPP -#include +#include + +#include +using namespace EE::Math; + +#include +#include #include namespace EE { @@ -21,6 +27,7 @@ class cCursor; namespace EE { namespace Window { namespace Platform { using namespace EE::Window; +using namespace EE::Graphics; /** This is an abstraction of some platform specific implementations * It's not garanteed that everything is implemented in every platform. diff --git a/include/eepp/window/cwindow.hpp b/include/eepp/window/cwindow.hpp index d904b8755..233c2e588 100644 --- a/include/eepp/window/cwindow.hpp +++ b/include/eepp/window/cwindow.hpp @@ -115,7 +115,7 @@ class WindowInfo { eeSize DesktopResolution; eeSize WindowSize; Uint32 Flags; - eeColor BackgroundColor; + RGB BackgroundColor; bool Created; bool Maximized; eeWindowContex Context; @@ -238,7 +238,7 @@ class EE_API cWindow { virtual void Display( bool clear = false ); /** @return The elapsed time for the last frame rendered */ - virtual Time Elapsed() const; + virtual System::Time Elapsed() const; /** @return The current frames per second of the screen */ virtual Uint32 FPS() const; @@ -294,10 +294,10 @@ class EE_API cWindow { void SetViewport( const Int32& x, const Int32& y, const Uint32& Width, const Uint32& Height, const bool& UpdateProjectionMatrix = true ); /** Set the window background color */ - void BackColor( const eeColor& Color ); + void BackColor( const RGB& Color ); /** @return The background clear color */ - const eeColor& BackColor() const; + const RGB& BackColor() const; /** Captures the window front buffer and saves it to disk. \n * You have to call it before Display, and after render all the objects. \n @@ -481,8 +481,8 @@ class EE_API cWindow { }; cFPSData FPS; - Clock * FrameElapsed; - Time ElapsedTime; + Clock * FrameElapsed; + System::Time ElapsedTime; cFrameData(); diff --git a/projects/linux/ee.files b/projects/linux/ee.files index ed96333fe..120c48048 100644 --- a/projects/linux/ee.files +++ b/projects/linux/ee.files @@ -479,7 +479,6 @@ ../../src/eepp/graphics/cimage.cpp ../../src/eepp/graphics/cglobaltextureatlas.cpp ../../src/eepp/graphics/cglobalbatchrenderer.cpp -../../src/eepp/graphics/cframebufferpbuffer.cpp ../../src/eepp/graphics/cframebuffermanager.cpp ../../src/eepp/graphics/cframebufferfbo.cpp ../../src/eepp/graphics/cframebuffer.cpp @@ -547,7 +546,6 @@ ../../src/eepp/window/backend/SFML/ccursormanagersfml.cpp ../../src/eepp/window/backend/SFML/cclipboardsfml.cpp ../../src/eepp/window/cbackend.hpp -../../src/eepp/graphics/cframebufferpbuffer.hpp ../../src/eepp/graphics/cframebufferfbo.hpp ../../src/eepp/graphics/renderer/rendererhelper.hpp ../../include/eepp/graphics/packerhelper.hpp @@ -678,3 +676,5 @@ ../../src/eepp/core/version.cpp ../../include/eepp/system/clock.hpp ../../include/eepp/system/clock.hpp +../../src/eepp/window/backend/SDL2/wminfo.cpp +../../src/eepp/window/backend/SDL2/wminfo.hpp diff --git a/src/eepp/gaming/cgameobjectobject.cpp b/src/eepp/gaming/cgameobjectobject.cpp index f4b9045fe..c1ab4e48e 100644 --- a/src/eepp/gaming/cgameobjectobject.cpp +++ b/src/eepp/gaming/cgameobjectobject.cpp @@ -40,11 +40,11 @@ void cGameObjectObject::Draw() { cPrimitives P; P.FillMode( DRAW_FILL ); - P.SetColor( eeColorA( colFill, colFill, colFill, colFill ) ); + P.SetColor( ColorA( colFill, colFill, colFill, colFill ) ); P.DrawRectangle( mRect ); P.FillMode( DRAW_LINE ); - P.SetColor( eeColorA( 255, 255, 0, 200 ) ); + P.SetColor( ColorA( 255, 255, 0, 200 ) ); P.DrawRectangle( mRect ); } diff --git a/src/eepp/gaming/cgameobjectpolygon.cpp b/src/eepp/gaming/cgameobjectpolygon.cpp index 4d8053f6b..8161bb2c9 100644 --- a/src/eepp/gaming/cgameobjectpolygon.cpp +++ b/src/eepp/gaming/cgameobjectpolygon.cpp @@ -33,11 +33,11 @@ void cGameObjectPolygon::Draw() { cPrimitives P; P.FillMode( DRAW_FILL ); - P.SetColor( eeColorA( colFill, colFill, colFill, colFill ) ); + P.SetColor( ColorA( colFill, colFill, colFill, colFill ) ); P.DrawPolygon( mPoly ); P.FillMode( DRAW_LINE ); - P.SetColor( eeColorA( 255, 255, 0, 200 ) ); + P.SetColor( ColorA( 255, 255, 0, 200 ) ); P.DrawPolygon( mPoly ); } diff --git a/src/eepp/gaming/cgameobjectpolyline.cpp b/src/eepp/gaming/cgameobjectpolyline.cpp index 21852a265..9b3a5fb30 100644 --- a/src/eepp/gaming/cgameobjectpolyline.cpp +++ b/src/eepp/gaming/cgameobjectpolyline.cpp @@ -27,12 +27,12 @@ void cGameObjectPolyline::Draw() { if ( mSelected ) { P.FillMode( DRAW_FILL ); - P.SetColor( eeColorA( 150, 150, 150, 150 ) ); + P.SetColor( ColorA( 150, 150, 150, 150 ) ); P.DrawPolygon( mPoly ); } P.FillMode( DRAW_LINE ); - P.SetColor( eeColorA( 255, 255, 0, 200 ) ); + P.SetColor( ColorA( 255, 255, 0, 200 ) ); P.DrawPolygon( mPoly ); } diff --git a/src/eepp/gaming/cgameobjectsubtexture.cpp b/src/eepp/gaming/cgameobjectsubtexture.cpp index e9175dd98..a02fe2e80 100644 --- a/src/eepp/gaming/cgameobjectsubtexture.cpp +++ b/src/eepp/gaming/cgameobjectsubtexture.cpp @@ -68,7 +68,7 @@ void cGameObjectSubTexture::Draw() { } } } else { - mSubTexture->Draw( mPos.x, mPos.y, eeColorA(), GetAngle(), eeVector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); + mSubTexture->Draw( mPos.x, mPos.y, ColorA(), GetAngle(), eeVector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); } } } diff --git a/src/eepp/gaming/cgameobjectsubtextureex.cpp b/src/eepp/gaming/cgameobjectsubtextureex.cpp index c4bbdc6eb..81124ffa1 100644 --- a/src/eepp/gaming/cgameobjectsubtextureex.cpp +++ b/src/eepp/gaming/cgameobjectsubtextureex.cpp @@ -4,7 +4,7 @@ namespace EE { namespace Gaming { -cGameObjectSubTextureEx::cGameObjectSubTextureEx( const Uint32& Flags, cLayer * Layer, cSubTexture * SubTexture, const eeVector2f& Pos, EE_BLEND_MODE Blend, EE_RENDER_MODE Render, Float Angle, eeVector2f Scale, eeColorA Color ) : +cGameObjectSubTextureEx::cGameObjectSubTextureEx( const Uint32& Flags, cLayer * Layer, cSubTexture * SubTexture, const eeVector2f& Pos, EE_BLEND_MODE Blend, EE_RENDER_MODE Render, Float Angle, eeVector2f Scale, ColorA Color ) : cGameObjectSubTexture( Flags, Layer, SubTexture, Pos ), mBlend( Blend ), mRender( Render ), diff --git a/src/eepp/gaming/cgameobjectvirtual.cpp b/src/eepp/gaming/cgameobjectvirtual.cpp index bd3b524ab..faf123172 100644 --- a/src/eepp/gaming/cgameobjectvirtual.cpp +++ b/src/eepp/gaming/cgameobjectvirtual.cpp @@ -98,12 +98,12 @@ void cGameObjectVirtual::Draw() { } } } else { - mSubTexture->Draw( mPos.x, mPos.y, eeColorA(), GetAngle(), eeVector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); + mSubTexture->Draw( mPos.x, mPos.y, ColorA(), GetAngle(), eeVector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); } } else { cPrimitives P; - eeColorA C( mDataId ); + ColorA C( mDataId ); C.Alpha = 255; P.SetColor( C ); diff --git a/src/eepp/gaming/clight.cpp b/src/eepp/gaming/clight.cpp index 459f337dd..6c2757729 100755 --- a/src/eepp/gaming/clight.cpp +++ b/src/eepp/gaming/clight.cpp @@ -13,13 +13,13 @@ cLight::cLight() : cLight::~cLight() { } -cLight::cLight( const Float& Radius, const Float& x, const Float& y, const eeColor& Color, LIGHT_TYPE Type ) : +cLight::cLight( const Float& Radius, const Float& x, const Float& y, const RGB& Color, LIGHT_TYPE Type ) : mActive( true ) { Create( Radius, x, y, Color, Type ); } -void cLight::Create( const Float& Radius, const Float& x, const Float& y, const eeColor& Color, LIGHT_TYPE Type ) { +void cLight::Create( const Float& Radius, const Float& x, const Float& y, const RGB& Color, LIGHT_TYPE Type ) { mRadius = Radius; mColor = Color; mType = Type; @@ -27,7 +27,7 @@ void cLight::Create( const Float& Radius, const Float& x, const Float& y, const UpdatePos( x, y ); } -eeColor cLight::ProcessVertex( const Float& PointX, const Float& PointY, const eeColor& VertexColor, const eeColor& BaseColor ) { +RGB cLight::ProcessVertex( const Float& PointX, const Float& PointY, const RGB& VertexColor, const RGB& BaseColor ) { Float VertexDist; if ( mActive ) { @@ -40,7 +40,7 @@ eeColor cLight::ProcessVertex( const Float& PointX, const Float& PointY, const e } if ( VertexDist <= mRadius ) { - eeColor TmpRGB; + RGB TmpRGB; Uint8 TmpColor; Float LightC; @@ -67,7 +67,7 @@ eeColor cLight::ProcessVertex( const Float& PointX, const Float& PointY, const e return BaseColor; } -eeColorA cLight::ProcessVertex( const Float& PointX, const Float& PointY, const eeColorA& VertexColor, const eeColorA& BaseColor ) { +ColorA cLight::ProcessVertex( const Float& PointX, const Float& PointY, const ColorA& VertexColor, const ColorA& BaseColor ) { Float VertexDist; if ( mActive ) { @@ -80,7 +80,7 @@ eeColorA cLight::ProcessVertex( const Float& PointX, const Float& PointY, const } if ( VertexDist <= mRadius ) { - eeColorA TmpRGB; + ColorA TmpRGB; Uint8 TmpColor; Float LightC; @@ -107,11 +107,11 @@ eeColorA cLight::ProcessVertex( const Float& PointX, const Float& PointY, const return BaseColor; } -eeColor cLight::ProcessVertex( const eeVector2f& Pos, const eeColor& VertexColor, const eeColor& BaseColor ) { +RGB cLight::ProcessVertex( const eeVector2f& Pos, const RGB& VertexColor, const RGB& BaseColor ) { return ProcessVertex( Pos.x, Pos.y, VertexColor, BaseColor ); } -eeColorA cLight::ProcessVertex( const eeVector2f& Pos, const eeColorA& VertexColor, const eeColorA& BaseColor ) { +ColorA cLight::ProcessVertex( const eeVector2f& Pos, const ColorA& VertexColor, const ColorA& BaseColor ) { return ProcessVertex( Pos.x, Pos.y, VertexColor, BaseColor ); } @@ -163,11 +163,11 @@ void cLight::Active( const bool& active ) { mActive = active; } -void cLight::Color( const eeColor& color ) { +void cLight::Color( const RGB& color ) { mColor = color; } -const eeColor& cLight::Color() const { +const RGB& cLight::Color() const { return mColor; } diff --git a/src/eepp/gaming/clightmanager.cpp b/src/eepp/gaming/clightmanager.cpp index 0ec6120d6..ba925b3a8 100644 --- a/src/eepp/gaming/clightmanager.cpp +++ b/src/eepp/gaming/clightmanager.cpp @@ -39,7 +39,7 @@ void cLightManager::UpdateByVertex() { eeVector2i end = mMap->EndTile(); eeAABB VisibleArea = mMap->GetViewAreaAABB(); eeSize TileSize = mMap->TileSize(); - eeColorA BaseColor = mMap->BaseColor(); + ColorA BaseColor = mMap->BaseColor(); bool firstLight = true; eeVector2i Pos; @@ -92,7 +92,7 @@ void cLightManager::UpdateByTile() { eeAABB VisibleArea = mMap->GetViewAreaAABB(); eeSize TileSize = mMap->TileSize(); eeSize HalfTileSize = mMap->TileSize() / 2; - eeColorA BaseColor = mMap->BaseColor(); + ColorA BaseColor = mMap->BaseColor(); bool firstLight = true; eeVector2i Pos; @@ -127,8 +127,8 @@ void cLightManager::UpdateByTile() { } } -eeColorA cLightManager::GetColorFromPos( const eeVector2f& Pos ) { - eeColorA Col( mMap->BaseColor() ); +ColorA cLightManager::GetColorFromPos( const eeVector2f& Pos ) { + ColorA Col( mMap->BaseColor() ); if ( !mLights.size() ) return Col; @@ -167,7 +167,7 @@ void cLightManager::RemoveLight( const eeVector2f& OverPos ) { } } -const eeColorA * cLightManager::GetTileColor( const eeVector2i& TilePos ) { +const ColorA * cLightManager::GetTileColor( const eeVector2i& TilePos ) { eeASSERT( 1 == mNumVertex ); if ( !mLights.size() ) @@ -176,7 +176,7 @@ const eeColorA * cLightManager::GetTileColor( const eeVector2i& TilePos ) { return mTileColors[ TilePos.x ][ TilePos.y ][0]; } -const eeColorA * cLightManager::GetTileColor( const eeVector2i& TilePos, const Uint32& Vertex ) { +const ColorA * cLightManager::GetTileColor( const eeVector2i& TilePos, const Uint32& Vertex ) { eeASSERT( 4 == mNumVertex ); if ( !mLights.size() ) @@ -187,16 +187,16 @@ const eeColorA * cLightManager::GetTileColor( const eeVector2i& TilePos, const U void cLightManager::AllocateColors() { eeSize Size = mMap->Size(); - mTileColors = eeNewArray( eeColorA***, Size.Width() ); + mTileColors = eeNewArray( ColorA***, Size.Width() ); for ( Int32 x = 0; x < Size.x; x++ ) { - mTileColors[x] = eeNewArray( eeColorA**, Size.Height() ); + mTileColors[x] = eeNewArray( ColorA**, Size.Height() ); for ( Int32 y = 0; y < Size.y; y++ ) { - mTileColors[x][y] = eeNewArray( eeColorA*, mNumVertex ); + mTileColors[x][y] = eeNewArray( ColorA*, mNumVertex ); for ( Int32 v = 0; v < mNumVertex; v++ ) { - mTileColors[x][y][v] = eeNew( eeColorA, (255,255,255,255) ); + mTileColors[x][y][v] = eeNew( ColorA, (255,255,255,255) ); } } } diff --git a/src/eepp/gaming/cmap.cpp b/src/eepp/gaming/cmap.cpp index b2201a17c..3c4faaabb 100644 --- a/src/eepp/gaming/cmap.cpp +++ b/src/eepp/gaming/cmap.cpp @@ -61,7 +61,7 @@ void cMap::Reset() { mMaxLayers = 0; mMouseOver = false; mViewSize = eeSize( 800, 600 ); - mBaseColor = eeColorA( 255, 255, 255, 255 ); + mBaseColor = ColorA( 255, 255, 255, 255 ); } void cMap::ForceHeadersOnLoad( eeSize mapSize, eeSize tileSize, Uint32 numLayers, Uint32 flags ) { @@ -125,11 +125,11 @@ void cMap::CreateEmptyTile() { if ( NULL == Tex ) { Uint32 x, y; - eeColorA Col( mGridLinesColor ); + ColorA Col( mGridLinesColor ); cImage Img( mTileSize.Width(), mTileSize.Height(), 4 ); - Img.FillWithColor( eeColorA( 0, 0, 0, 0 ) ); + Img.FillWithColor( ColorA( 0, 0, 0, 0 ) ); for ( x = 0; x < Img.Width(); x++ ) { Img.SetPixel( x, 0, Col ); @@ -222,9 +222,9 @@ void cMap::Draw() { Uint8 Alpha = static_cast( (Float)mBackColor.A() * ( (Float)mBackAlpha / 255.f ) ); - P.SetColor( eeColorA( mBackColor.R(), mBackColor.G(), mBackColor.B(), Alpha ) ); + P.SetColor( ColorA( mBackColor.R(), mBackColor.G(), mBackColor.B(), Alpha ) ); P.DrawRectangle( eeRectf( eeVector2f( mScreenPos.x, mScreenPos.y ), eeSizef( mViewSize.x, mViewSize.y ) ), 0.f, eeVector2f::One ); - P.SetColor( eeColorA( 255, 255, 255, 255 ) ); + P.SetColor( ColorA( 255, 255, 255, 255 ) ); } float oldM[16]; @@ -276,7 +276,7 @@ void cMap::GridDraw() { eeVector2i end = EndTile(); Float tx, ty; - eeColorA TileTexCol( 255, 255, 255, mBackAlpha ); + ColorA TileTexCol( 255, 255, 255, mBackAlpha ); for ( Int32 x = start.x; x < end.x; x++ ) { for ( Int32 y = start.y; y < end.y; y++ ) { @@ -288,10 +288,10 @@ void cMap::GridDraw() { eeVector2i TPos( x, y ); if ( mLightManager->IsByVertex() ) { - eeColorA TileTexCol0( *mLightManager->GetTileColor( TPos, 0 ) ); - eeColorA TileTexCol1( *mLightManager->GetTileColor( TPos, 1 ) ); - eeColorA TileTexCol2( *mLightManager->GetTileColor( TPos, 2 ) ); - eeColorA TileTexCol3( *mLightManager->GetTileColor( TPos, 3 ) ); + ColorA TileTexCol0( *mLightManager->GetTileColor( TPos, 0 ) ); + ColorA TileTexCol1( *mLightManager->GetTileColor( TPos, 1 ) ); + ColorA TileTexCol2( *mLightManager->GetTileColor( TPos, 2 ) ); + ColorA TileTexCol3( *mLightManager->GetTileColor( TPos, 3 ) ); TileTexCol0.Alpha = TileTexCol1.Alpha = TileTexCol2.Alpha = TileTexCol3.Alpha = mBackAlpha; @@ -519,11 +519,11 @@ const eeVector2i& cMap::ExtraTiles() const { return mExtraTiles; } -void cMap::BaseColor( const eeColorA& color ) { +void cMap::BaseColor( const ColorA& color ) { mBaseColor = color; } -const eeColorA& cMap::BaseColor() const { +const ColorA& cMap::BaseColor() const { return mBaseColor; } @@ -806,7 +806,7 @@ bool cMap::LoadFromStream( IOStream& IOS ) { Create( mForcedHeaders->MapSize, mForcedHeaders->NumLayers, mForcedHeaders->TileSize, mForcedHeaders->Flags ); } - BaseColor( eeColorA( MapHdr.BaseColor ) ); + BaseColor( ColorA( MapHdr.BaseColor ) ); //! Load Properties if ( MapHdr.PropertyCount ) { @@ -1009,8 +1009,11 @@ bool cMap::LoadFromStream( IOStream& IOS ) { for ( i = 0; i < MapHdr.LightsCount; i++ ) { tLightHdr = &( tLighsHdr[ i ] ); + ColorA color( tLightHdr->Color ); + RGB rgb( color.ToColor() ); + mLightManager->AddLight( - eeNew( cLight, ( tLightHdr->Radius, tLightHdr->PosX, tLightHdr->PosY, eeColorA( tLightHdr->Color ).ToColor(), (LIGHT_TYPE)tLightHdr->Type ) ) + eeNew( cLight, ( tLightHdr->Radius, tLightHdr->PosX, tLightHdr->PosY, rgb, (LIGHT_TYPE)tLightHdr->Type ) ) ); } @@ -1349,7 +1352,7 @@ void cMap::SaveToStream( IOStream& IOS ) { tLightHdr.Radius = Light->Radius(); tLightHdr.PosX = (Int32)Light->Position().x; tLightHdr.PosY = (Int32)Light->Position().y; - tLightHdr.Color = eeColorA( Light->Color() ).GetValue(); + tLightHdr.Color = ColorA( Light->Color() ).GetValue(); tLightHdr.Type = Light->Type(); IOS.Write( (const char*)&tLightHdr, sizeof(sMapLightHdr) ); @@ -1452,11 +1455,11 @@ void cMap::BackAlpha( const Uint8& alpha ) { mBackAlpha = alpha; } -const eeColorA& cMap::BackColor() const { +const ColorA& cMap::BackColor() const { return mBackColor; } -void cMap::BackColor( const eeColorA& col ) { +void cMap::BackColor( const ColorA& col ) { mBackColor = col; } @@ -1464,11 +1467,11 @@ Uint32 cMap::GetNewObjectId() { return ++mLastObjId; } -void cMap::GridLinesColor( const eeColorA& Col ) { +void cMap::GridLinesColor( const ColorA& Col ) { mGridLinesColor = Col; } -const eeColorA& cMap::GridLinesColor() const { +const ColorA& cMap::GridLinesColor() const { return mGridLinesColor; } diff --git a/src/eepp/gaming/cobjectlayer.cpp b/src/eepp/gaming/cobjectlayer.cpp index 264afac3c..2a87ca711 100644 --- a/src/eepp/gaming/cobjectlayer.cpp +++ b/src/eepp/gaming/cobjectlayer.cpp @@ -44,7 +44,7 @@ void cObjectLayer::Draw( const eeVector2f &Offset ) { cTexture * Tex = mMap->GetBlankTileTexture(); if ( mMap->ShowBlocked() && NULL != Tex ) { - eeColorA Col( 255, 0, 0, 200 ); + ColorA Col( 255, 0, 0, 200 ); for ( it = mObjects.begin(); it != mObjects.end(); it++ ) { cGameObject * Obj = (*it); diff --git a/src/eepp/gaming/ctilelayer.cpp b/src/eepp/gaming/ctilelayer.cpp index 43202931c..2839b06ea 100644 --- a/src/eepp/gaming/ctilelayer.cpp +++ b/src/eepp/gaming/ctilelayer.cpp @@ -46,7 +46,7 @@ void cTileLayer::Draw( const eeVector2f& Offset ) { for ( Int32 y = start.y; y < end.y; y++ ) { if ( NULL != mTiles[x][y] ) { if ( mTiles[x][y]->Blocked() ) { - Tex->Draw( x * mMap->TileSize().x, y * mMap->TileSize().y, 0 , eeVector2f::One, eeColorA( 255, 0, 0, 200 ) ); + Tex->Draw( x * mMap->TileSize().x, y * mMap->TileSize().y, 0 , eeVector2f::One, ColorA( 255, 0, 0, 200 ) ); } } } diff --git a/src/eepp/gaming/mapeditor/cmapeditor.cpp b/src/eepp/gaming/mapeditor/cmapeditor.cpp index cd00216b6..dda2ccf55 100644 --- a/src/eepp/gaming/mapeditor/cmapeditor.cpp +++ b/src/eepp/gaming/mapeditor/cmapeditor.cpp @@ -316,7 +316,7 @@ void cMapEditor::CreateSubTextureContainer( Int32 Width ) { mGfxPreview = mTheme->CreateGfx( NULL, mSGCont, eeSize( Width, Width ), eeVector2i( 0, mSubTextureList->Pos().y + mSubTextureList->Size().Height() + 4 ), UI_VALIGN_CENTER | UI_HALIGN_CENTER | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP | UI_AUTO_FIT ); mGfxPreview->Border( true ); - mGfxPreview->Border()->Color( eeColorA( 0, 0, 0, 200 ) ); + mGfxPreview->Border()->Color( ColorA( 0, 0, 0, 200 ) ); cUIComplexControl::CreateParams DIParams; DIParams.Parent( mSubTextureCont ); @@ -345,8 +345,8 @@ void cMapEditor::CreateLighContainer() { ComParams.Parent( mLightCont ); ComParams.PosSet( Txt->Pos().x, Txt->Pos().y + Txt->Size().Height() + 4 ); ComParams.SizeSet( 58, 64 ); - ComParams.Background.Color( eeColorA(255,255,255,255) ); - ComParams.Border.Color( eeColorA( 100, 100, 100, 200 ) ); + ComParams.Background.Color( ColorA(255,255,255,255) ); + ComParams.Border.Color( ColorA( 100, 100, 100, 200 ) ); ComParams.Flags |= UI_FILL_BACKGROUND | UI_BORDER; mUIBaseColor = eeNew( cUIComplexControl, ( ComParams ) ); mUIBaseColor->Visible( true ); @@ -530,7 +530,7 @@ void cMapEditor::OnLightRadiusChange( cLight * Light ) { } void cMapEditor::OnLightSelect( cLight * Light ) { - eeColorA Col( Light->Color() ); + ColorA Col( Light->Color() ); mUIRedSlider->Value( Col.R() ); mUIGreenSlider->Value( Col.G() ); @@ -549,39 +549,39 @@ void cMapEditor::OnNewLight( const cUIEvent * Event ) { } void cMapEditor::OnRedChange( const cUIEvent * Event ) { - eeColorA Col = mUIBaseColor->Background()->Color(); + ColorA Col = mUIBaseColor->Background()->Color(); Col.Red = (Uint8)mUIRedSlider->Value(); mUIBaseColor->Background()->Color( Col ); mUIRedTxt->Text( String::ToStr( (Int32)mUIRedSlider->Value() ) ); if ( NULL != mUIMap->GetSelectedLight() ) { - eeColor lCol( mUIMap->GetSelectedLight()->Color() ); + RGB lCol( mUIMap->GetSelectedLight()->Color() ); lCol.Red = Col.R(); mUIMap->GetSelectedLight()->Color( lCol ); } } void cMapEditor::OnGreenChange( const cUIEvent * Event ) { - eeColorA Col = mUIBaseColor->Background()->Color(); + ColorA Col = mUIBaseColor->Background()->Color(); Col.Green = (Uint8)mUIGreenSlider->Value(); mUIBaseColor->Background()->Color( Col ); mUIGreenTxt->Text( String::ToStr( (Uint32)mUIGreenSlider->Value() ) ); if ( NULL != mUIMap->GetSelectedLight() ) { - eeColor lCol( mUIMap->GetSelectedLight()->Color() ); + RGB lCol( mUIMap->GetSelectedLight()->Color() ); lCol.Green = Col.G(); mUIMap->GetSelectedLight()->Color( lCol ); } } void cMapEditor::OnBlueChange( const cUIEvent * Event ) { - eeColorA Col = mUIBaseColor->Background()->Color(); + ColorA Col = mUIBaseColor->Background()->Color(); Col.Blue = (Uint8)mUIBlueSlider->Value(); mUIBaseColor->Background()->Color( Col ); mUIBlueTxt->Text( String::ToStr( (Uint32)mUIBlueSlider->Value() ) ); if ( NULL != mUIMap->GetSelectedLight() ) { - eeColor lCol( mUIMap->GetSelectedLight()->Color() ); + RGB lCol( mUIMap->GetSelectedLight()->Color() ); lCol.Blue = Col.B(); mUIMap->GetSelectedLight()->Color( lCol ); } diff --git a/src/eepp/gaming/mapeditor/cmapproperties.cpp b/src/eepp/gaming/mapeditor/cmapproperties.cpp index d422d5b94..ca7492c88 100644 --- a/src/eepp/gaming/mapeditor/cmapproperties.cpp +++ b/src/eepp/gaming/mapeditor/cmapproperties.cpp @@ -35,7 +35,7 @@ cMapProperties::cMapProperties( cMap * Map ) : ComParams.PosSet( Txt->Pos().x, Txt->Pos().y + Txt->Size().Height() + 4 ); ComParams.SizeSet( 64, 64 ); ComParams.Background.Color( mMap->BaseColor() ); - ComParams.Border.Color( eeColorA( 100, 100, 100, 200 ) ); + ComParams.Border.Color( ColorA( 100, 100, 100, 200 ) ); ComParams.Flags |= UI_FILL_BACKGROUND | UI_BORDER; mUIBaseColor = eeNew( cUIComplexControl, ( ComParams ) ); mUIBaseColor->Visible( true ); @@ -122,34 +122,34 @@ cMapProperties::~cMapProperties() { } void cMapProperties::OnRedChange( const cUIEvent * Event ) { - eeColorA Col = mUIBaseColor->Background()->Color(); + ColorA Col = mUIBaseColor->Background()->Color(); Col.Red = (Uint8)mUIRedSlider->Value(); mUIBaseColor->Background()->Color( Col ); mUIRedTxt->Text( String::ToStr( (Int32)mUIRedSlider->Value() ) ); - eeColorA MapCol = mMap->BaseColor(); + ColorA MapCol = mMap->BaseColor(); MapCol.Red = Col.Red; mMap->BaseColor( MapCol ); } void cMapProperties::OnGreenChange( const cUIEvent * Event ) { - eeColorA Col = mUIBaseColor->Background()->Color(); + ColorA Col = mUIBaseColor->Background()->Color(); Col.Green = (Uint8)mUIGreenSlider->Value(); mUIBaseColor->Background()->Color( Col ); mUIGreenTxt->Text( String::ToStr( (Uint32)mUIGreenSlider->Value() ) ); - eeColorA MapCol = mMap->BaseColor(); + ColorA MapCol = mMap->BaseColor(); MapCol.Green = Col.Green; mMap->BaseColor( MapCol ); } void cMapProperties::OnBlueChange( const cUIEvent * Event ) { - eeColorA Col = mUIBaseColor->Background()->Color(); + ColorA Col = mUIBaseColor->Background()->Color(); Col.Blue = (Uint8)mUIBlueSlider->Value(); mUIBaseColor->Background()->Color( Col ); mUIBlueTxt->Text( String::ToStr( (Uint32)mUIBlueSlider->Value() ) ); - eeColorA MapCol = mMap->BaseColor(); + ColorA MapCol = mMap->BaseColor(); MapCol.Blue = Col.Blue; mMap->BaseColor( MapCol ); } diff --git a/src/eepp/gaming/mapeditor/cuimap.cpp b/src/eepp/gaming/mapeditor/cuimap.cpp index 50e036eac..5c8c0bd0f 100644 --- a/src/eepp/gaming/mapeditor/cuimap.cpp +++ b/src/eepp/gaming/mapeditor/cuimap.cpp @@ -29,8 +29,8 @@ cUIMap::cUIMap( const cUIComplexControl::CreateParams& Params, cUITheme * Theme, mMap = eeNew( cMap, () ); } - mMap->BackColor( eeColorA( 100, 100, 100, 100 ) ); - mMap->GridLinesColor( eeColorA( 150, 150, 150, 150 ) ); + mMap->BackColor( ColorA( 100, 100, 100, 100 ) ); + mMap->GridLinesColor( ColorA( 150, 150, 150, 150 ) ); mMap->SetDrawCallback( cb::Make0( this, &cUIMap::MapDraw ) ); @@ -366,7 +366,7 @@ void cUIMap::AddLight( cLight * Light ) { void cUIMap::MapDraw() { if ( EDITING_LIGHT == mEditingMode ) { if ( NULL != mSelLight ) { - mP.SetColor( eeColorA( 255, 0, 0, (Uint8)mAlpha ) ); + mP.SetColor( ColorA( 255, 0, 0, (Uint8)mAlpha ) ); eeVector2f Pos( mSelLight->GetAABB().Left, mSelLight->GetAABB().Top ); eeAABB AB( mSelLight->GetAABB() ); @@ -380,11 +380,11 @@ void cUIMap::MapDraw() { { if ( mObjRECTEditing ) { mP.FillMode( DRAW_FILL ); - mP.SetColor( eeColorA( 100, 100, 100, 20 ) ); + mP.SetColor( ColorA( 100, 100, 100, 20 ) ); mP.DrawRectangle( mObjRECT ); mP.FillMode( DRAW_LINE ); - mP.SetColor( eeColorA( 255, 0, 0, 200 ) ); + mP.SetColor( ColorA( 255, 0, 0, 200 ) ); mP.DrawRectangle( mObjRECT ); } @@ -393,22 +393,22 @@ void cUIMap::MapDraw() { case INSERT_POLYGON: { mP.FillMode( DRAW_FILL ); - mP.SetColor( eeColorA( 50, 50, 50, 50 ) ); + mP.SetColor( ColorA( 50, 50, 50, 50 ) ); mP.DrawPolygon( mObjPoly ); mP.FillMode( DRAW_LINE ); - mP.SetColor( eeColorA( 255, 0, 0, 200 ) ); + mP.SetColor( ColorA( 255, 0, 0, 200 ) ); mP.DrawPolygon( mObjPoly ); eePolygon2f polyN( mObjPoly ); polyN.PushBack( GetMouseMapPos() ); mP.FillMode( DRAW_FILL ); - mP.SetColor( eeColorA( 100, 100, 100, 100 ) ); + mP.SetColor( ColorA( 100, 100, 100, 100 ) ); mP.DrawPolygon( polyN ); mP.FillMode( DRAW_LINE ); - mP.SetColor( eeColorA( 255, 255, 0, 200 ) ); + mP.SetColor( ColorA( 255, 255, 0, 200 ) ); mP.DrawPolygon( polyN ); break; @@ -416,14 +416,14 @@ void cUIMap::MapDraw() { case INSERT_POLYLINE: { mP.FillMode( DRAW_LINE ); - mP.SetColor( eeColorA( 255, 0, 0, 200 ) ); + mP.SetColor( ColorA( 255, 0, 0, 200 ) ); mP.DrawPolygon( mObjPoly ); eePolygon2f polyN( mObjPoly ); polyN.PushBack( GetMouseMapPos() ); mP.FillMode( DRAW_LINE ); - mP.SetColor( eeColorA( 255, 255, 0, 200 ) ); + mP.SetColor( ColorA( 255, 255, 0, 200 ) ); mP.DrawPolygon( polyN ); break; @@ -431,7 +431,7 @@ void cUIMap::MapDraw() { case EDIT_POLYGONS: { if ( NULL != mSelObj && eeINDEX_NOT_FOUND != mSelPointIndex ) { - mP.SetColor( eeColorA( 255, 255, 100, 100 ) ); + mP.SetColor( ColorA( 255, 255, 100, 100 ) ); mP.FillMode( DRAW_FILL ); mP.DrawRectangle( mSelPointRect ); diff --git a/src/eepp/gaming/mapeditor/cuimapnew.cpp b/src/eepp/gaming/mapeditor/cuimapnew.cpp index 26755c3a5..b61ed87dc 100644 --- a/src/eepp/gaming/mapeditor/cuimapnew.cpp +++ b/src/eepp/gaming/mapeditor/cuimapnew.cpp @@ -114,13 +114,13 @@ cUIMapNew::cUIMapNew( cUIMap * Map, cb::Callback0 NewMapCb, bool ResizeMap ComParams.Parent( mUIWindow->Container() ); ComParams.PosSet( Txt->Pos().x, Txt->Pos().y + Txt->Size().Height() + 4 ); ComParams.SizeSet( 64, 64 ); - ComParams.Background.Color( eeColorA( 255, 255, 255, 255 ) ); + ComParams.Background.Color( ColorA( 255, 255, 255, 255 ) ); if ( ResizeMap ) { ComParams.Background.Color( mUIMap->Map()->BaseColor() ); } - ComParams.Border.Color( eeColorA( 100, 100, 100, 200 ) ); + ComParams.Border.Color( ColorA( 100, 100, 100, 200 ) ); ComParams.Flags |= UI_FILL_BACKGROUND | UI_BORDER; mUIBaseColor = eeNew( cUIComplexControl, ( ComParams ) ); mUIBaseColor->Visible( true ); @@ -183,21 +183,21 @@ cUIMapNew::~cUIMapNew() { } void cUIMapNew::OnRedChange( const cUIEvent * Event ) { - eeColorA Col = mUIBaseColor->Background()->Color(); + ColorA Col = mUIBaseColor->Background()->Color(); Col.Red = (Uint8)mUIRedSlider->Value(); mUIBaseColor->Background()->Color( Col ); mUIRedTxt->Text( String::ToStr( (Int32)mUIRedSlider->Value() ) ); } void cUIMapNew::OnGreenChange( const cUIEvent * Event ) { - eeColorA Col = mUIBaseColor->Background()->Color(); + ColorA Col = mUIBaseColor->Background()->Color(); Col.Green = (Uint8)mUIGreenSlider->Value(); mUIBaseColor->Background()->Color( Col ); mUIGreenTxt->Text( String::ToStr( (Uint32)mUIGreenSlider->Value() ) ); } void cUIMapNew::OnBlueChange( const cUIEvent * Event ) { - eeColorA Col = mUIBaseColor->Background()->Color(); + ColorA Col = mUIBaseColor->Background()->Color(); Col.Blue = (Uint8)mUIBlueSlider->Value(); mUIBaseColor->Background()->Color( Col ); mUIBlueTxt->Text( String::ToStr( (Uint32)mUIBlueSlider->Value() ) ); @@ -234,8 +234,8 @@ void cUIMapNew::OKClick( const cUIEvent * Event ) { mUIMap->Map()->Save( mapPath ); cMap * Map = eeNew( cMap, () ); - Map->BackColor( eeColorA( 100, 100, 100, 100 ) ); - Map->GridLinesColor( eeColorA( 150, 150, 150, 150 ) ); + Map->BackColor( ColorA( 100, 100, 100, 100 ) ); + Map->GridLinesColor( ColorA( 150, 150, 150, 150 ) ); Map->ForceHeadersOnLoad( eeSize( w, h ), eeSize( tw, th ), ml, Flags ); Map->Load( mapPath ); Map->DisableForcedHeaders(); diff --git a/src/eepp/graphics/cbatchrenderer.cpp b/src/eepp/graphics/cbatchrenderer.cpp index 3bee6d974..9b1f91dca 100755 --- a/src/eepp/graphics/cbatchrenderer.cpp +++ b/src/eepp/graphics/cbatchrenderer.cpp @@ -426,14 +426,14 @@ void cBatchRenderer::BatchQuadFreeEx( const Float& x0, const Float& y0, const Fl void cBatchRenderer::QuadsBegin() { SetBlendMode( DM_QUADS, true ); QuadsSetSubset( 0, 0, 1, 1 ); - QuadsSetColor( eeColorA() ); + QuadsSetColor( ColorA() ); } -void cBatchRenderer::QuadsSetColor( const eeColorA& Color ) { +void cBatchRenderer::QuadsSetColor( const ColorA& Color ) { mVerColor[0] = mVerColor[1] = mVerColor[2] = mVerColor[3] = Color; } -void cBatchRenderer::QuadsSetColorFree( const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3 ) { +void cBatchRenderer::QuadsSetColorFree( const ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3 ) { mVerColor[0] = Color0; mVerColor[1] = Color1; mVerColor[2] = Color2; @@ -467,10 +467,10 @@ void cBatchRenderer::Rotate( const eeVector2f& center, eeVector2f* point, const void cBatchRenderer::PointsBegin() { SetBlendMode( DM_POINTS, true ); QuadsSetSubset( 0, 0, 1, 1 ); - PointSetColor( eeColorA() ); + PointSetColor( ColorA() ); } -void cBatchRenderer::PointSetColor( const eeColorA& Color ) { +void cBatchRenderer::PointSetColor( const ColorA& Color ) { QuadsSetColor( Color ); } @@ -492,14 +492,14 @@ void cBatchRenderer::BatchPoint( const Float& x, const Float& y ) { void cBatchRenderer::LinesBegin() { SetBlendMode( DM_LINES, true ); QuadsSetSubset( 0, 0, 1, 1 ); - PointSetColor( eeColorA() ); + PointSetColor( ColorA() ); } -void cBatchRenderer::LinesSetColor( const eeColorA& Color ) { +void cBatchRenderer::LinesSetColor( const ColorA& Color ) { QuadsSetColor( Color ); } -void cBatchRenderer::LinesSetColorFree( const eeColorA& Color0, const eeColorA& Color1 ) { +void cBatchRenderer::LinesSetColorFree( const ColorA& Color0, const ColorA& Color1 ) { QuadsSetColorFree( Color0, Color1, Color0, Color0 ); } @@ -527,14 +527,14 @@ void cBatchRenderer::BatchLine( const Float& x0, const Float& y0, const Float& x void cBatchRenderer::LineLoopBegin() { SetBlendMode( DM_LINE_LOOP, true ); QuadsSetSubset( 0, 0, 1, 1 ); - PointSetColor( eeColorA() ); + PointSetColor( ColorA() ); } -void cBatchRenderer::LineLoopSetColor( const eeColorA& Color ) { +void cBatchRenderer::LineLoopSetColor( const ColorA& Color ) { QuadsSetColor( Color ); } -void cBatchRenderer::LineLoopSetColorFree( const eeColorA& Color0, const eeColorA& Color1 ) { +void cBatchRenderer::LineLoopSetColorFree( const ColorA& Color0, const ColorA& Color1 ) { QuadsSetColorFree( Color0, Color1, Color0, Color0 ); } @@ -585,14 +585,14 @@ void cBatchRenderer::BatchLineLoop( const eeVector2f& vector1 ) { void cBatchRenderer::TriangleFanBegin() { SetBlendMode( DM_TRIANGLE_FAN, true ); TriangleFanSetSubset( 0, 0, 0, 1, 1, 1 ); - TriangleFanSetColor( eeColorA() ); + TriangleFanSetColor( ColorA() ); } -void cBatchRenderer::TriangleFanSetColor( const eeColorA& Color ) { +void cBatchRenderer::TriangleFanSetColor( const ColorA& Color ) { QuadsSetColor( Color ); } -void cBatchRenderer::TriangleFanSetColorFree( const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2 ) { +void cBatchRenderer::TriangleFanSetColorFree( const ColorA& Color0, const ColorA& Color1, const ColorA& Color2 ) { QuadsSetColorFree( Color0, Color1, Color2, Color0 ); } @@ -648,14 +648,14 @@ void cBatchRenderer::BatchTriangleFan( const Float& x0, const Float& y0 ) { void cBatchRenderer::TrianglesBegin() { SetBlendMode( DM_TRIANGLES, true ); TrianglesSetSubset( 0, 0, 0, 1, 1, 1 ); - TrianglesSetColor( eeColorA() ); + TrianglesSetColor( ColorA() ); } -void cBatchRenderer::TrianglesSetColor( const eeColorA& Color ) { +void cBatchRenderer::TrianglesSetColor( const ColorA& Color ) { QuadsSetColor( Color ); } -void cBatchRenderer::TrianglesSetColorFree( const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2 ) { +void cBatchRenderer::TrianglesSetColorFree( const ColorA& Color0, const ColorA& Color1, const ColorA& Color2 ) { QuadsSetColorFree( Color0, Color1, Color2, Color0 ); } @@ -693,7 +693,7 @@ void cBatchRenderer::BatchTriangle( const Float& x0, const Float& y0, const Floa AddVertexs(3); } -void cBatchRenderer::PolygonSetColor( const eeColorA& Color ) { +void cBatchRenderer::PolygonSetColor( const ColorA& Color ) { PointSetColor( Color ); } diff --git a/src/eepp/graphics/cconsole.cpp b/src/eepp/graphics/cconsole.cpp index e8365a61b..2af42a964 100755 --- a/src/eepp/graphics/cconsole.cpp +++ b/src/eepp/graphics/cconsole.cpp @@ -155,23 +155,23 @@ void cConsole::AddCommand( const String& Command, ConsoleCallback CB ) { void cConsole::Draw() { if ( mEnabled && NULL != mFont ) { - eeColorA OldColor( mFont->Color() ); + ColorA OldColor( mFont->Color() ); Fade(); if ( mY > 0.0f ) { if ( mTexId == 0 ) { - mPri.SetColor( eeColorA( mConColor.R(), mConColor.G(), mConColor.B(), static_cast(mA) ) ); + mPri.SetColor( ColorA( mConColor.R(), mConColor.G(), mConColor.B(), static_cast(mA) ) ); mPri.DrawRectangle( eeRectf( eeVector2f( 0.0f, 0.0f ), eeSizef( mWidth, mY ) ) ); } else { - eeColorA C( mConColor.R(), mConColor.G(), mConColor.B(), static_cast(mA) ); + ColorA C( mConColor.R(), mConColor.G(), mConColor.B(), static_cast(mA) ); cTexture * Tex = cTextureFactory::instance()->GetTexture( mTexId ); if ( NULL != Tex ) Tex->DrawEx( 0.0f, 0.0f, mWidth, mY, 0.0f, eeVector2f::One, C, C, C, C ); } - mPri.SetColor( eeColorA( mConLineColor.R(), mConLineColor.G(), mConLineColor.B(), static_cast(mA) ) ); + mPri.SetColor( ColorA( mConLineColor.R(), mConLineColor.G(), mConLineColor.B(), static_cast(mA) ) ); mPri.DrawRectangle( eeRectf( eeVector2f( 0.0f, mY ), eeSizef( mWidth, 4.0f ) ) ); Int32 linesInScreen = LinesInScreen(); @@ -188,7 +188,7 @@ void cConsole::Draw() { mCon.ConMin = mEx; mCon.ConMax = (int)mCmdLog.size() - 1; - mFont->Color( eeColorA ( mFontColor.R(), mFontColor.G(), mFontColor.B(), static_cast(mA) ) ); + mFont->Color( ColorA ( mFontColor.R(), mFontColor.G(), mFontColor.B(), static_cast(mA) ) ); for (int i = mCon.ConMax - mCon.ConModif; i >= mCon.ConMin - mCon.ConModif; i-- ) { if ( i < static_cast( mCmdLog.size() ) && i >= 0 ) { @@ -202,11 +202,11 @@ void cConsole::Draw() { CurY = mTempY + mY + mCurHeight - mFontSize - 1; - mFont->Color( eeColorA ( mFontLineColor.R(), mFontLineColor.G(), mFontLineColor.B(), static_cast(mA) ) ); + mFont->Color( ColorA ( mFontLineColor.R(), mFontLineColor.G(), mFontLineColor.B(), static_cast(mA) ) ); mFont->SetText( "> " + mTBuf->Buffer() ); mFont->Draw( mFontSize, CurY ); - mFont->Color( eeColorA ( mFontLineColor.R(), mFontLineColor.G(), mFontLineColor.B(), static_cast(mCurAlpha) ) ); + mFont->Color( ColorA ( mFontLineColor.R(), mFontLineColor.G(), mFontLineColor.B(), static_cast(mCurAlpha) ) ); if ( (unsigned int)mTBuf->CurPos() == mTBuf->Buffer().size() ) { mFont->Draw( "_", mFontSize + mFont->GetTextWidth() , CurY ); @@ -220,8 +220,8 @@ void cConsole::Draw() { } if ( mShowFps && NULL != mFont ) { - eeColorA OldColor1( mFont->Color() ); - mFont->Color( eeColorA () ); + ColorA OldColor1( mFont->Color() ); + mFont->Color( ColorA () ); mFont->SetText( "FPS: " + String::ToStr( mWindow->FPS() ) ); mFont->Draw( mWindow->GetWidth() - mFont->GetTextWidth() - 15, 6 ); mFont->Color( OldColor1 ); diff --git a/src/eepp/graphics/cfont.cpp b/src/eepp/graphics/cfont.cpp index 193dd2c24..007b259e4 100644 --- a/src/eepp/graphics/cfont.cpp +++ b/src/eepp/graphics/cfont.cpp @@ -32,19 +32,19 @@ void cFont::SetText( const String& Text ) { mTextCache.Text( Text ); } -const eeColorA& cFont::Color() const { +const ColorA& cFont::Color() const { return mTextCache.Color(); } -void cFont::Color(const eeColorA& Color) { +void cFont::Color(const ColorA& Color) { mTextCache.Color( Color ); } -const eeColorA& cFont::ShadowColor() const { +const ColorA& cFont::ShadowColor() const { return mTextCache.ShadowColor(); } -void cFont::ShadowColor(const eeColorA& Color) { +void cFont::ShadowColor(const ColorA& Color) { mTextCache.ShadowColor( Color ); } @@ -116,12 +116,12 @@ void cFont::Draw( cTextCache& TextCache, const Float& X, const Float& Y, const U f &= ~FONT_DRAW_SHADOW; - eeColorA Col = TextCache.Color(); + ColorA Col = TextCache.Color(); SetText( TextCache.Text() ); if ( Col.A() != 255 ) { - eeColorA ShadowColor = TextCache.ShadowColor(); + ColorA ShadowColor = TextCache.ShadowColor(); ShadowColor.Alpha = (Uint8)( (Float)ShadowColor.Alpha * ( (Float)Col.A() / (Float)255 ) ); @@ -156,7 +156,7 @@ void cFont::Draw( cTextCache& TextCache, const Float& X, const Float& Y, const U } std::vector& RenderCoords = TextCache.VertextCoords(); - std::vector& Colors = TextCache.Colors(); + std::vector& Colors = TextCache.Colors(); if ( !TextCache.CachedCoords() ) { if ( !( Flags & FONT_DRAW_VERTICAL ) ) { diff --git a/src/eepp/graphics/cframebuffer.cpp b/src/eepp/graphics/cframebuffer.cpp index a50c55ba0..79bab9471 100644 --- a/src/eepp/graphics/cframebuffer.cpp +++ b/src/eepp/graphics/cframebuffer.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include using namespace EE::Graphics::Private; @@ -15,9 +14,6 @@ cFrameBuffer * cFrameBuffer::New( const Uint32& Width, const Uint32& Height, boo if ( cFrameBufferFBO::IsSupported() ) return eeNew( cFrameBufferFBO, ( Width, Height, DepthBuffer, window ) ); - if ( cFrameBufferPBuffer::IsSupported() ) - return eeNew( cFrameBufferPBuffer, ( Width, Height, DepthBuffer, window ) ); - return NULL; } @@ -48,11 +44,11 @@ cTexture * cFrameBuffer::GetTexture() const { return mTexture; } -void cFrameBuffer::ClearColor( eeColorAf Color ) { +void cFrameBuffer::ClearColor( ColorAf Color ) { mClearColor = Color; } -eeColorAf cFrameBuffer::ClearColor() const { +ColorAf cFrameBuffer::ClearColor() const { return mClearColor; } diff --git a/src/eepp/graphics/cframebufferfbo.cpp b/src/eepp/graphics/cframebufferfbo.cpp index 739ec01e8..3f0700524 100644 --- a/src/eepp/graphics/cframebufferfbo.cpp +++ b/src/eepp/graphics/cframebufferfbo.cpp @@ -95,7 +95,7 @@ bool cFrameBufferFBO::Create( const Uint32& Width, const Uint32& Height, bool De } if ( NULL == mTexture ) { - Uint32 TexId = cTextureFactory::instance()->CreateEmptyTexture( Width, Height, 4, eeColorA(0,0,0,0) ); + Uint32 TexId = cTextureFactory::instance()->CreateEmptyTexture( Width, Height, 4, ColorA(0,0,0,0) ); if ( cTextureFactory::instance()->TextureIdExists( TexId ) ) { mTexture = cTextureFactory::instance()->GetTexture( TexId ); diff --git a/src/eepp/graphics/cframebufferpbuffer.cpp b/src/eepp/graphics/cframebufferpbuffer.cpp deleted file mode 100644 index e5dc6bead..000000000 --- a/src/eepp/graphics/cframebufferpbuffer.cpp +++ /dev/null @@ -1,314 +0,0 @@ -#include -#include -#include - -#ifdef EE_GLEW_AVAILABLE - -#include -#include - -#if EE_PLATFORM == EE_PLATFORM_WIN -#include -#elif defined( EE_X11_PLATFORM ) -#include -#include -#else -#warning No PBuffer implemented on this platform -#endif - -#endif - -#include -#include -#include - -namespace EE { namespace Graphics { - -cFrameBufferPBuffer::cFrameBufferPBuffer( Window::cWindow * window ) -#if EE_PLATFORM == EE_PLATFORM_WIN - : cFrameBuffer( window ), - mDeviceContext( NULL ), - mPBuffer( NULL ), - mContext( NULL ) -#elif defined( EE_X11_PLATFORM ) - : cFrameBuffer( window ), - mDisplay( NULL ), - mPBuffer( 0 ), - mContext( NULL ) -#else - : cFrameBuffer( window ) -#endif -{ -#if defined( EE_GLEW_AVAILABLE ) && defined( EE_X11_PLATFORM ) - mDisplay = XOpenDisplay(NULL); -#endif -} - -cFrameBufferPBuffer::cFrameBufferPBuffer( const Uint32& Width, const Uint32& Height, bool DepthBuffer, Window::cWindow * window ) -#if EE_PLATFORM == EE_PLATFORM_WIN - : cFrameBuffer( window ), - mDeviceContext( NULL ), - mPBuffer( NULL ), - mContext( NULL ) -#elif defined( EE_X11_PLATFORM ) - : cFrameBuffer( window ), - mDisplay( NULL ), - mPBuffer( 0 ), - mContext( NULL ) -#else - : cFrameBuffer( window ) -#endif -{ -#if defined( EE_GLEW_AVAILABLE ) && defined( EE_X11_PLATFORM ) - mDisplay = XOpenDisplay(NULL); -#endif - Create( Width, Height, DepthBuffer ); -} - -cFrameBufferPBuffer::~cFrameBufferPBuffer() { -#ifdef EE_GLEW_AVAILABLE - -#if EE_PLATFORM == EE_PLATFORM_WIN - if ( mContext ) - wglDeleteContext( (HGLRC)mContext ); - - if ( mPBuffer && mDeviceContext ) { - wglReleasePbufferDCARB( (HPBUFFERARB)mPBuffer, (HDC)mDeviceContext ); - wglDestroyPbufferARB( (HPBUFFERARB)mPBuffer ); - } -#elif defined( EE_X11_PLATFORM ) - if ( mContext ) - glXDestroyContext( (Display*)mDisplay, (GLXContext)mContext ); - - if ( mPBuffer ) - glXDestroyGLXPbufferSGIX( (Display*)mDisplay, mPBuffer ); - - if ( mDisplay ) - XCloseDisplay( (Display*)mDisplay ); -#endif - -#endif - if ( Window::cEngine::instance()->ExistsWindow( mWindow ) ) { - mWindow->SetDefaultContext(); - } -} - -bool cFrameBufferPBuffer::IsSupported() { -#ifdef EE_GLEW_AVAILABLE - -#if EE_PLATFORM == EE_PLATFORM_WIN - return WGLEW_ARB_pbuffer && WGLEW_ARB_pixel_format; -#elif defined( EE_X11_PLATFORM ) - return glxewIsSupported("GLX_SGIX_pbuffer"); -#else - return false; -#endif - -#else - return false; -#endif -} - -bool cFrameBufferPBuffer::Create( const Uint32& Width, const Uint32& Height ) { - return Create( Width, Height, false ); -} - -bool cFrameBufferPBuffer::Create( const Uint32& Width, const Uint32& Height, bool DepthBuffer ) { - if ( !IsSupported() ) - return false; - - if ( NULL == mWindow ) { - mWindow = cEngine::instance()->GetCurrentWindow(); - } - - mWidth = Width; - mHeight = Height; - mHasDepthBuffer = DepthBuffer; - -#ifdef EE_GLEW_AVAILABLE - -#if EE_PLATFORM == EE_PLATFORM_WIN - HDC currentDC = wglGetCurrentDC(); - - int attributes[] = - { - WGL_SUPPORT_OPENGL_ARB, GL_TRUE, - WGL_DRAW_TO_PBUFFER_ARB, GL_TRUE, - WGL_RED_BITS_ARB, 8, - WGL_GREEN_BITS_ARB, 8, - WGL_BLUE_BITS_ARB, 8, - WGL_ALPHA_BITS_ARB, 8, - WGL_DEPTH_BITS_ARB, ( DepthBuffer ? 24 : 0 ), - WGL_DOUBLE_BUFFER_ARB, GL_FALSE, - 0 - }; - - unsigned int nbFormats = 0; - int pixelFormat = -1; - wglChoosePixelFormatARB( currentDC, attributes, NULL, 1, &pixelFormat, &nbFormats ); - - if ( nbFormats == 0 ) - return false; - - mPBuffer = wglCreatePbufferARB( currentDC, pixelFormat, Width, Height, NULL ); - mDeviceContext = wglGetPbufferDCARB( (HPBUFFERARB)mPBuffer ); - mContext = wglCreateContext( (HDC)mDeviceContext ); - - if ( !mPBuffer || !mDeviceContext || !mContext ) - return false; - - int actualWidth, actualHeight; - wglQueryPbufferARB( (HPBUFFERARB)mPBuffer, WGL_PBUFFER_WIDTH_ARB, &actualWidth ); - wglQueryPbufferARB( (HPBUFFERARB)mPBuffer, WGL_PBUFFER_HEIGHT_ARB, &actualHeight ); - - if ( ( actualWidth != static_cast(Width) ) || ( actualHeight != static_cast(Height) ) ) - return false; - - HGLRC currentContext = wglGetCurrentContext(); - if (currentContext) { - wglMakeCurrent( NULL, NULL ); - wglShareLists( currentContext, (HGLRC)mContext ); - wglMakeCurrent( currentDC, currentContext ); - } -#elif defined( EE_X11_PLATFORM ) - int visualAttributes[] = - { - GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - GLX_ALPHA_SIZE, 8, - GLX_DEPTH_SIZE, ( DepthBuffer ? 24 : 0 ), - 0 - }; - - int PBufferAttributes[] = - { - GLX_PBUFFER_WIDTH, (int)Width, - GLX_PBUFFER_HEIGHT, (int)Height, - 0 - }; - - int nbConfigs = 0; - GLXFBConfig* configs = glXChooseFBConfigSGIX( (Display*)mDisplay, DefaultScreen( (Display*)mDisplay ), visualAttributes, &nbConfigs ); - - if (!configs || !nbConfigs) - return false; - - mPBuffer = glXCreateGLXPbufferSGIX( (Display*)mDisplay, configs[0], Width, Height, PBufferAttributes ); - - if ( !mPBuffer ) { - XFree(configs); - return false; - } - - unsigned int actualWidth, actualHeight; - glXQueryGLXPbufferSGIX( (Display*)mDisplay, mPBuffer, GLX_WIDTH_SGIX, &actualWidth); - glXQueryGLXPbufferSGIX( (Display*)mDisplay, mPBuffer, GLX_HEIGHT_SGIX, &actualHeight); - - if ( ( actualWidth != Width ) || ( actualHeight != Height ) ) { - XFree(configs); - return false; - } - - GLXDrawable currentDrawable = glXGetCurrentDrawable(); - GLXContext currentContext = glXGetCurrentContext(); - - if ( currentContext ) - glXMakeCurrent( (Display*)mDisplay, 0, NULL ); - - XVisualInfo* visual = glXGetVisualFromFBConfig( (Display*)mDisplay, configs[0] ); - mContext = glXCreateContext( (Display*)mDisplay, visual, currentContext, true ); - - if ( !mContext ) { - XFree(configs); - XFree(visual); - return false; - } - - if ( currentContext ) - glXMakeCurrent( (Display*)mDisplay, currentDrawable, currentContext ); - - XFree(configs); - XFree(visual); -#endif - -#endif - - if ( NULL == mTexture ) { - Uint32 TexId = cTextureFactory::instance()->CreateEmptyTexture( Width, Height, 4, eeColorA(0,0,0,0) ); - - if ( cTextureFactory::instance()->TextureIdExists( TexId ) ) { - mTexture = cTextureFactory::instance()->GetTexture( TexId ); - } else { - return false; - } - } - - return true; -} - -void cFrameBufferPBuffer::Bind() { - bool ChangeContext = false; - - cGlobalBatchRenderer::instance()->Draw(); - -#ifdef EE_GLEW_AVAILABLE - - #if EE_PLATFORM == EE_PLATFORM_WIN - if ( mDeviceContext && mContext ) { - if ( wglGetCurrentContext() != mContext ) { - ChangeContext = true; - wglMakeCurrent( (HDC)mDeviceContext, (HGLRC)mContext ); - } - } - #elif defined( EE_X11_PLATFORM ) - if ( mPBuffer && mContext ) { - if ( glXGetCurrentContext() != mContext ) { - ChangeContext = true; - glXMakeCurrent( (Display*)mDisplay, mPBuffer, (GLXContext)mContext ); - } - } - #endif - -#endif - - if ( ChangeContext ) { - #ifdef EE_GL3_ENABLED - if ( GLv_3 == GLi->Version() ) { - GLi->GetRendererGL3()->ReloadCurrentShader(); - } - - if ( GLv_ES2 == GLi->Version() ) { - GLi->GetRendererGLES2()->ReloadCurrentShader(); - } - #endif - - mWindow->Setup2D( true ); - - SetBufferView(); - } -} - -void cFrameBufferPBuffer::Unbind() { - RecoverView(); - - int previousTexture; - glGetIntegerv( GL_TEXTURE_BINDING_2D, &previousTexture ); - - GLi->BindTexture( GL_TEXTURE_2D, (int)mTexture->Handle() ); - - glCopyTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, 0, 0, mWidth, mHeight ); - - GLi->BindTexture( GL_TEXTURE_2D, previousTexture ); - - mWindow->SetDefaultContext(); -} - - -void cFrameBufferPBuffer::Reload() { - Create( mWidth, mHeight, mHasDepthBuffer ); -} - -}} diff --git a/src/eepp/graphics/cframebufferpbuffer.hpp b/src/eepp/graphics/cframebufferpbuffer.hpp deleted file mode 100644 index 1d4c2157e..000000000 --- a/src/eepp/graphics/cframebufferpbuffer.hpp +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef EE_GRAPHICSCFRAMEBUFFERPBUFFER_HPP -#define EE_GRAPHICSCFRAMEBUFFERPBUFFER_HPP - -/** Part of this code is based on the implementation of PBuffers from: -* -// SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com) -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it freely, -// subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; -// you must not claim that you wrote the original software. -// If you use this software in a product, an acknowledgment -// in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, -// and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -* -* NOTE by Martin Lucas Golini: This is not the original version, so differs from SFML implementation. -*/ - -#include -#include - -namespace EE { namespace Graphics { - -class EE_API cFrameBufferPBuffer : public cFrameBuffer { - public: - cFrameBufferPBuffer( Window::cWindow * window = NULL ); - - ~cFrameBufferPBuffer(); - - cFrameBufferPBuffer( const Uint32& Width, const Uint32& Height, bool DepthBuffer = false, Window::cWindow * window = NULL ); - - void Bind(); - - void Unbind(); - - void Reload(); - - static bool IsSupported(); - protected: - #ifdef EE_GLEW_AVAILABLE - - #if EE_PLATFORM == EE_PLATFORM_WIN - void * mDeviceContext; - void * mPBuffer; - void * mContext; - #elif defined( EE_X11_PLATFORM ) - void * mDisplay; - unsigned long mPBuffer; - void * mContext; - #endif - - #endif - - bool Create( const Uint32& Width, const Uint32& Height ); - - bool Create( const Uint32& Width, const Uint32& Height, bool DepthBuffer ); -}; - -}} - -#endif diff --git a/src/eepp/graphics/cimage.cpp b/src/eepp/graphics/cimage.cpp index 94cc51857..4e5d05e4f 100644 --- a/src/eepp/graphics/cimage.cpp +++ b/src/eepp/graphics/cimage.cpp @@ -262,7 +262,7 @@ cImage::cImage( const Uint8* data, const unsigned int& Width, const unsigned int SetPixels( data ); } -cImage::cImage( const Uint32& Width, const Uint32& Height, const Uint32& Channels, const eeColorA& DefaultColor, const bool& initWithDefaultColor ) : +cImage::cImage( const Uint32& Width, const Uint32& Height, const Uint32& Channels, const ColorA& DefaultColor, const bool& initWithDefaultColor ) : mPixels(NULL), mWidth(Width), mHeight(Height), @@ -373,7 +373,7 @@ void cImage::LoadFromPack( Pack * Pack, const std::string& FilePackPath ) { void cImage::SetPixels( const Uint8* data ) { if ( data != NULL ) { - Allocate( mWidth * mHeight * mChannels, eeColorA(0,0,0,0), false ); + Allocate( mWidth * mHeight * mChannels, ColorA(0,0,0,0), false ); memcpy( reinterpret_cast( &mPixels[0] ), reinterpret_cast ( data ), mSize ); } @@ -383,19 +383,19 @@ const Uint8* cImage::GetPixelsPtr() { return reinterpret_cast (&mPixels[0]); } -eeColorA cImage::GetPixel( const unsigned int& x, const unsigned int& y ) { +ColorA cImage::GetPixel( const unsigned int& x, const unsigned int& y ) { eeASSERT( !( mPixels == NULL || x > mWidth || y > mHeight ) ); - eeColorA dst; + ColorA dst; memcpy( &dst, &mPixels[ ( ( x + y * mWidth ) * mChannels ) ], mChannels ); return dst; } -void cImage::SetPixel(const unsigned int& x, const unsigned int& y, const eeColorA& Color) { +void cImage::SetPixel(const unsigned int& x, const unsigned int& y, const ColorA& Color) { eeASSERT( !( mPixels == NULL || x > mWidth || y > mHeight ) ); memcpy( &mPixels[ ( ( x + y * mWidth ) * mChannels ) ], &Color, mChannels ); } -void cImage::Create( const Uint32& Width, const Uint32& Height, const Uint32& Channels, const eeColorA& DefaultColor, const bool& initWithDefaultColor ) { +void cImage::Create( const Uint32& Width, const Uint32& Height, const Uint32& Channels, const ColorA& DefaultColor, const bool& initWithDefaultColor ) { mWidth = Width; mHeight = Height; mChannels = Channels; @@ -407,7 +407,7 @@ Uint8* cImage::GetPixels() const { return mPixels; } -void cImage::Allocate( const Uint32& size, eeColorA DefaultColor, bool memsetData ) { +void cImage::Allocate( const Uint32& size, ColorA DefaultColor, bool memsetData ) { ClearCache(); mPixels = eeNewArray( unsigned char, size ); @@ -480,7 +480,7 @@ bool cImage::SaveToFile( const std::string& filepath, const EE_SAVE_TYPE& Format return Res; } -void cImage::ReplaceColor( const eeColorA& ColorKey, const eeColorA& NewColor ) { +void cImage::ReplaceColor( const ColorA& ColorKey, const ColorA& NewColor ) { unsigned int Pos = 0; if ( NULL == mPixels ) @@ -517,15 +517,15 @@ void cImage::ReplaceColor( const eeColorA& ColorKey, const eeColorA& NewColor ) } } -void cImage::CreateMaskFromColor( const eeColorA& ColorKey, Uint8 Alpha ) { - ReplaceColor( ColorKey, eeColorA( ColorKey.R(), ColorKey.G(), ColorKey.B(), Alpha ) ); +void cImage::CreateMaskFromColor( const ColorA& ColorKey, Uint8 Alpha ) { + ReplaceColor( ColorKey, ColorA( ColorKey.R(), ColorKey.G(), ColorKey.B(), Alpha ) ); } -void cImage::CreateMaskFromColor( const eeColor& ColorKey, Uint8 Alpha ) { - CreateMaskFromColor( eeColorA( ColorKey.R(), ColorKey.G(), ColorKey.B(), 255 ), Alpha ); +void cImage::CreateMaskFromColor( const RGB& ColorKey, Uint8 Alpha ) { + CreateMaskFromColor( ColorA( ColorKey.R(), ColorKey.G(), ColorKey.B(), 255 ), Alpha ); } -void cImage::FillWithColor( const eeColorA& Color ) { +void cImage::FillWithColor( const ColorA& Color ) { if ( NULL == mPixels ) return; @@ -659,8 +659,8 @@ void cImage::Blit( cImage * image, const Uint32& x, const Uint32& y ) { for ( unsigned int ty = y; ty < dh; ty++ ) { for ( unsigned int tx = x; tx < dw; tx++ ) { - eeColorA ts( image->GetPixel( tx - x, ty - y ) ); - eeColorA td( GetPixel( tx, ty ) ); + ColorA ts( image->GetPixel( tx - x, ty - y ) ); + ColorA td( GetPixel( tx, ty ) ); SetPixel( tx, ty, Color::Blend( ts, td ) ); } diff --git a/src/eepp/graphics/cparticle.cpp b/src/eepp/graphics/cparticle.cpp index bbc570d94..552b2e44d 100755 --- a/src/eepp/graphics/cparticle.cpp +++ b/src/eepp/graphics/cparticle.cpp @@ -8,7 +8,7 @@ cParticle::cParticle() { cParticle::~cParticle() {} -void cParticle::Color(eeColorAf Color, Float AlphaDecay) { +void cParticle::Color(ColorAf Color, Float AlphaDecay) { mColor = Color; mAlphaDecay = AlphaDecay; } @@ -21,7 +21,7 @@ void cParticle::Reset(const Float &x, const Float &y, const Float &xspeed, const mXAcc = xacc; mYAcc = yacc; mSize = size; - mColor = eeColorAf(1.0f,1.0f,1.0f,1.0f); + mColor = ColorAf(1.0f,1.0f,1.0f,1.0f); mAlphaDecay = 0.01f; } diff --git a/src/eepp/graphics/cparticlesystem.cpp b/src/eepp/graphics/cparticlesystem.cpp index cd00b2b87..4f75d64f7 100755 --- a/src/eepp/graphics/cparticlesystem.cpp +++ b/src/eepp/graphics/cparticlesystem.cpp @@ -39,7 +39,7 @@ cParticleSystem::~cParticleSystem() { eeSAFE_DELETE_ARRAY( mParticle ); } -void cParticleSystem::Create( const EE_PARTICLE_EFFECT& Effect, const Uint32& NumParticles, const Uint32& TexId, const eeVector2f& Pos, const Float& PartSize, const bool& AnimLoop, const Uint32& NumLoops, const eeColorAf& Color, const eeVector2f& Pos2, const Float& AlphaDecay, const eeVector2f& Speed, const eeVector2f& Acc ) { +void cParticleSystem::Create( const EE_PARTICLE_EFFECT& Effect, const Uint32& NumParticles, const Uint32& TexId, const eeVector2f& Pos, const Float& PartSize, const bool& AnimLoop, const Uint32& NumLoops, const ColorAf& Color, const eeVector2f& Pos2, const Float& AlphaDecay, const eeVector2f& Speed, const eeVector2f& Acc ) { mPointsSup = GLi->PointSpriteSupported(); mEffect = Effect; mPos = Pos; @@ -106,7 +106,7 @@ void cParticleSystem::Reset( cParticle * P ) { case PSE_BlueBall: { P->Reset( mPos.x, mPos.y, -10, ( -1 * Math::Randf() ), 0.01f, Math::Randf(), mSize ); - P->Color( eeColorAf( 0.25f ,0.25f ,1 ,1 ), 0.1f + ( 0.1f * Math::Randf() ) ); + P->Color( ColorAf( 0.25f ,0.25f ,1 ,1 ), 0.1f + ( 0.1f * Math::Randf() ) ); break; } case PSE_Fire: @@ -115,7 +115,7 @@ void cParticleSystem::Reset( cParticle * P ) { y = ( mPos2.y - mPos.y + 1 ) * Math::Randf() + mPos.y; P->Reset( x, y, Math::Randf() - 0.5f, ( Math::Randf() - 1.1f ) * 8.5f, 0.f, 0.05f, mSize ); - P->Color( eeColorAf( 1.f, 0.5f, 0.1f, ( Math::Randf() * 0.5f ) ), Math::Randf() * 0.4f + 0.01f ); + P->Color( ColorAf( 1.f, 0.5f, 0.1f, ( Math::Randf() * 0.5f ) ), Math::Randf() * 0.4f + 0.01f ); break; } case PSE_Smoke: @@ -124,7 +124,7 @@ void cParticleSystem::Reset( cParticle * P ) { y = ( mPos2.y - mPos.y + 1 ) * Math::Randf() + mPos.y; P->Reset( x, y, -( Math::Randf() / 3.f + 0.1f ), ( ( Math::Randf() * 0.5f ) - 0.7f ) * 3, ( Math::Randf() / 200.f ), ( Math::Randf() - 0.5f ) / 200.f ); - P->Color( eeColorAf( 0.8f, 0.8f, 0.8f, 0.3f ), ( Math::Randf() * 0.005f ) + 0.005f ); + P->Color( ColorAf( 0.8f, 0.8f, 0.8f, 0.3f ), ( Math::Randf() * 0.005f ) + 0.005f ); break; } case PSE_Snow: @@ -134,31 +134,31 @@ void cParticleSystem::Reset( cParticle * P ) { w = ( Math::Randf() + 0.3f ) * 4; P->Reset( x, y, Math::Randf() - 0.5f, w, 0.f, 0.f, w * 3 ); - P->Color( eeColorAf( 1.f, 1.f, 1.f, 0.5f ), 0 ); + P->Color( ColorAf( 1.f, 1.f, 1.f, 0.5f ), 0 ); break; } case PSE_MagicFire: { P->Reset( mPos.x + Math::Randf() , mPos.y, -0.4f + Math::Randf() * 0.8f, -0.5f - Math::Randf() * 0.4f, 0.f, -( Math::Randf() * 0.3f ) ); - P->Color( eeColorAf( 1.f, 0.5f, 0.1f, 0.7f + 0.2f * Math::Randf() ), 0.01f + Math::Randf() * 0.05f ); + P->Color( ColorAf( 1.f, 0.5f, 0.1f, 0.7f + 0.2f * Math::Randf() ), 0.01f + Math::Randf() * 0.05f ); break; } case PSE_LevelUp: { P->Reset( mPos.x, mPos.y, Math::Randf() * 1.5f - 0.75f, Math::Randf() * 1.5f - 0.75f, Math::Randf() * 4 - 2, Math::Randf() * -4 + 2 ); - P->Color( eeColorAf( 1.f, 0.5f, 0.1f, 1.f ), 0.07f + Math::Randf() * 0.01f ); + P->Color( ColorAf( 1.f, 0.5f, 0.1f, 1.f ), 0.07f + Math::Randf() * 0.01f ); break; } case PSE_LevelUp2: { P->Reset( mPos.x + Math::Randf() * 32 - 16, mPos.y + Math::Randf() * 64 - 32, Math::Randf() - 0.5f, Math::Randf() - 0.5f, Math::Randf() - 0.5f, Math::Randf() * -0.9f + 0.45f ); - P->Color( eeColorAf( 0.1f + Math::Randf() * 0.1f, 0.1f + Math::Randf() * 0.1f, 0.8f + Math::Randf() * 0.3f, 1 ), 0.07f + Math::Randf() * 0.01f ); + P->Color( ColorAf( 0.1f + Math::Randf() * 0.1f, 0.1f + Math::Randf() * 0.1f, 0.8f + Math::Randf() * 0.3f, 1 ), 0.07f + Math::Randf() * 0.01f ); break; } case PSE_Heal: { P->Reset( mPos.x, mPos.y, Math::Randf() * 1.4f - 0.7f, Math::Randf() * -0.4f - 1.5f, Math::Randf() - 0.5f, Math::Randf() * -0.2f + 0.1f ); - P->Color( eeColorAf( 0.2f, 0.3f, 0.9f, 0.4f ), 0.01f + Math::Randf() * 0.01f ); + P->Color( ColorAf( 0.2f, 0.3f, 0.9f, 0.4f ), 0.01f + Math::Randf() * 0.01f ); break; } case PSE_WormHole: @@ -180,7 +180,7 @@ void cParticleSystem::Reset( cParticle * P ) { y = mPos.y + ( radio * eesin( (Float)P->Id() ) ); P->Reset( x, y, VarB[0], VarB[1], VarB[2], VarB[3] ); - P->Color( eeColorAf( 1.f, 0.6f, 0.3f, 1.f ), 0.02f + Math::Randf() * 0.3f ); + P->Color( ColorAf( 1.f, 0.6f, 0.3f, 1.f ), 0.02f + Math::Randf() * 0.3f ); break; } case PSE_Twirl: @@ -200,7 +200,7 @@ void cParticleSystem::Reset( cParticle * P ) { y = mPos.y - z * eecos( q ); P->Reset( x, y, 1, 1, 0, 0 ); - P->Color( eeColorAf( 1.f, 0.25f, 0.25f, 1 ), 0.6f + Math::Randf() * 0.3f ); + P->Color( ColorAf( 1.f, 0.25f, 0.25f, 1 ), 0.6f + Math::Randf() * 0.3f ); break; } case PSE_Flower: @@ -210,7 +210,7 @@ void cParticleSystem::Reset( cParticle * P ) { y = mPos.y + radio * eesin( (Float)P->Id() * 0.1f ); P->Reset( x, y, 1, 1, 0, 0 ); - P->Color( eeColorAf( 1.f, 0.25f, 0.1f, 0.1f ), 0.3f + ( 0.2f * Math::Randf()) + Math::Randf() * 0.3f ); + P->Color( ColorAf( 1.f, 0.25f, 0.1f, 0.1f ), 0.3f + ( 0.2f * Math::Randf()) + Math::Randf() * 0.3f ); break; } case PSE_Galaxy: @@ -220,7 +220,7 @@ void cParticleSystem::Reset( cParticle * P ) { y = mPos.y + radio * eesin( (Float)P->Id() ); P->Reset( x, y, 0, 0, 0, 0 ); - P->Color( eeColorAf( 0.2f, 0.2f, 0.6f + 0.4f * Math::Randf(), 1.f ), Math::Randf( 0.05f, 0.15f ) ); + P->Color( ColorAf( 0.2f, 0.2f, 0.6f + 0.4f * Math::Randf(), 1.f ), Math::Randf( 0.05f, 0.15f ) ); break; } case PSE_Heart: @@ -230,7 +230,7 @@ void cParticleSystem::Reset( cParticle * P ) { y = mPos.y - 50 * eecos( q * 2 ) * eesqrt( eeabs( eesin( q ) ) ); P->Reset( x, y, 0.f, 0.f, 0.f, -( Math::Randf() * 0.2f ) ); - P->Color( eeColorAf( 1.f, 0.5f, 0.2f, 0.6f + 0.2f * Math::Randf() ), 0.01f + Math::Randf() * 0.08f ); + P->Color( ColorAf( 1.f, 0.5f, 0.2f, 0.6f + 0.2f * Math::Randf() ), 0.01f + Math::Randf() * 0.08f ); break; } case PSE_BlueExplosion: @@ -243,7 +243,7 @@ void cParticleSystem::Reset( cParticle * P ) { y = mPos.y + ( radio * eesin( (Float)P->Id() / mProgression ) * 30 ); P->Reset(x, y, eecos( (Float)P->Id() ), eesin( (Float)P->Id() ), 0, 0 ); - P->Color( eeColorAf( 0.3f, 0.6f, 1.f, 1.f ), 0.03f ); + P->Color( ColorAf( 0.3f, 0.6f, 1.f, 1.f ), 0.03f ); break; } case PSE_GP: @@ -253,7 +253,7 @@ void cParticleSystem::Reset( cParticle * P ) { y = mPos.y + ( radio * eesin( (Float)P->Id() * (Float)0.01428571428 ) ); P->Reset( x, y, 0, 0, 0, 0 ); - P->Color( eeColorAf( 0.2f, 0.8f, 0.4f, 0.5f ), Math::Randf() * 0.3f ); + P->Color( ColorAf( 0.2f, 0.8f, 0.4f, 0.5f ), Math::Randf() * 0.3f ); break; } case PSE_BTwirl: @@ -272,7 +272,7 @@ void cParticleSystem::Reset( cParticle * P ) { y = mPos.y - w * eecos( q ); P->Reset( x, y, 1, 1, 0, 0 ); - P->Color( eeColorAf( 0.25f, 0.25f, 1.f, 1.f ), 0.1f + Math::Randf() * 0.3f + Math::Randf() * 0.3f ); + P->Color( ColorAf( 0.25f, 0.25f, 1.f, 1.f ), 0.1f + Math::Randf() * 0.3f + Math::Randf() * 0.3f ); break; } case PSE_BT: @@ -291,7 +291,7 @@ void cParticleSystem::Reset( cParticle * P ) { y = mPos.y - w * eecos( q ); P->Reset( x, y, -10, -1 * Math::Randf(), 0, Math::Randf() ); - P->Color( eeColorAf( 0.25f, 0.25f, 1.f, 1.f ), 0.1f + Math::Randf() * 0.1f + Math::Randf() * 0.3f ); + P->Color( ColorAf( 0.25f, 0.25f, 1.f, 1.f ), 0.1f + Math::Randf() * 0.1f + Math::Randf() * 0.3f ); break; } case PSE_Atomic: @@ -301,7 +301,7 @@ void cParticleSystem::Reset( cParticle * P ) { y = mPos.y + radio * eesin( (Float)P->Id() * 0.033333 ); P->Reset( x, y, 1, 1, 0, 0 ); - P->Color( eeColorAf( 0.4f, 0.25f, 1.f, 1.f ), 0.3f + Math::Randf() * 0.2f + Math::Randf() * 0.3f ); + P->Color( ColorAf( 0.4f, 0.25f, 1.f, 1.f ), 0.3f + Math::Randf() * 0.2f + Math::Randf() * 0.3f ); break; } case PSE_Callback: @@ -353,7 +353,7 @@ void cParticleSystem::Draw() { P = &mParticle[i]; if ( P->Used() ) { - BR->QuadsSetColor( eeColorA( static_cast ( P->R() * 255 ), static_cast ( P->G() * 255 ), static_cast( P->B() * 255 ), static_cast( P->A() * 255 ) ) ); + BR->QuadsSetColor( ColorA( static_cast ( P->R() * 255 ), static_cast ( P->G() * 255 ), static_cast( P->B() * 255 ), static_cast( P->A() * 255 ) ) ); BR->BatchQuad( P->X() - mHSize, P->Y() - mHSize, mSize, mSize ); } } @@ -470,11 +470,11 @@ void cParticleSystem::BlendMode( const EE_BLEND_MODE& mode ) { mBlend = mode; } -const eeColorAf& cParticleSystem::Color() const { +const ColorAf& cParticleSystem::Color() const { return mColor; } -void cParticleSystem::Color( const eeColorAf& Col ) { +void cParticleSystem::Color( const ColorAf& Col ) { mColor = Col; } diff --git a/src/eepp/graphics/cprimitives.cpp b/src/eepp/graphics/cprimitives.cpp index 757da98e8..2bc024484 100755 --- a/src/eepp/graphics/cprimitives.cpp +++ b/src/eepp/graphics/cprimitives.cpp @@ -47,7 +47,7 @@ void cPrimitives::DrawLine( const eeLine2f& line ) { DrawBatch(); } -void cPrimitives::DrawTriangle( const eeTriangle2f& t, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3 ) { +void cPrimitives::DrawTriangle( const eeTriangle2f& t, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3 ) { sBR->SetTexture( NULL ); sBR->SetBlendMode( mBlendMode ); @@ -128,7 +128,7 @@ void cPrimitives::DrawCircle( const eeVector2f& p, const Float& radius, Uint32 p GLi->VertexPointer( 2, GL_FLOAT, 0, circleVAR, circleVAR_count * sizeof(float) * 2 ); - std::vector colors( circleVAR_count - 1 ,mColor ); + std::vector colors( circleVAR_count - 1 ,mColor ); GLi->ColorPointer( 4, GL_UNSIGNED_BYTE, 0, &colors[0], circleVAR_count * 4 ); @@ -186,7 +186,7 @@ void cPrimitives::DrawCircle( const eeVector2f& p, const Float& radius, Uint32 p DrawBatch(); } -void cPrimitives::DrawRectangle( const eeRectf& R, const eeColorA& TopLeft, const eeColorA& BottomLeft, const eeColorA& BottomRight, const eeColorA& TopRight, const Float& Angle, const eeVector2f& Scale ) { +void cPrimitives::DrawRectangle( const eeRectf& R, const ColorA& TopLeft, const ColorA& BottomLeft, const ColorA& BottomRight, const ColorA& TopRight, const Float& Angle, const eeVector2f& Scale ) { sBR->SetTexture( NULL ); sBR->SetBlendMode( mBlendMode ); @@ -235,7 +235,7 @@ void cPrimitives::DrawRectangle( const eeRectf& R, const Float& Angle, const eeV DrawRectangle( R, mColor, mColor, mColor, mColor, Angle, Scale ); } -void cPrimitives::DrawRoundedRectangle( const eeRectf& R, const eeColorA& TopLeft, const eeColorA& BottomLeft, const eeColorA& BottomRight, const eeColorA& TopRight, const Float& Angle, const eeVector2f& Scale, const unsigned int& Corners ) { +void cPrimitives::DrawRoundedRectangle( const eeRectf& R, const ColorA& TopLeft, const ColorA& BottomLeft, const ColorA& BottomRight, const ColorA& TopRight, const Float& Angle, const eeVector2f& Scale, const unsigned int& Corners ) { sBR->SetTexture( NULL ); sBR->SetBlendMode( mBlendMode ); @@ -318,7 +318,7 @@ void cPrimitives::DrawRoundedRectangle( const eeRectf& R, const Float& Angle, co DrawRoundedRectangle( R, mColor, mColor, mColor, mColor, Angle, Scale, Corners ); } -void cPrimitives::DrawQuad( const eeQuad2f& q, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3, const eeColorA& Color4, const Float& OffsetX, const Float& OffsetY ) { +void cPrimitives::DrawQuad( const eeQuad2f& q, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3, const ColorA& Color4, const Float& OffsetX, const Float& OffsetY ) { sBR->SetTexture( NULL ); sBR->SetBlendMode( mBlendMode ); @@ -396,7 +396,7 @@ const bool& cPrimitives::ForceDraw() const { return mForceDraw; } -void cPrimitives::SetColor( const eeColorA& Color ) { +void cPrimitives::SetColor( const ColorA& Color ) { mColor = Color; } diff --git a/src/eepp/graphics/cscrollparallax.cpp b/src/eepp/graphics/cscrollparallax.cpp index 57effa29e..f4c4d94cf 100755 --- a/src/eepp/graphics/cscrollparallax.cpp +++ b/src/eepp/graphics/cscrollparallax.cpp @@ -12,7 +12,7 @@ cScrollParallax::cScrollParallax() : cScrollParallax::~cScrollParallax() {} -cScrollParallax::cScrollParallax( cSubTexture * SubTexture, const eeVector2f& Position, const eeSizef& Size, const eeVector2f& Speed, const eeColorA& Color, const EE_BLEND_MODE& Blend ) { +cScrollParallax::cScrollParallax( cSubTexture * SubTexture, const eeVector2f& Position, const eeSizef& Size, const eeVector2f& Speed, const ColorA& Color, const EE_BLEND_MODE& Blend ) { Create( SubTexture, Position, Size, Speed, Color, Blend ); } @@ -40,7 +40,7 @@ void cScrollParallax::SetAABB() { mAABB = eeRectf( mInitPos.x, mInitPos.y, mInitPos.x + mSize.Width(), mInitPos.y + mSize.Height() ); } -bool cScrollParallax::Create( cSubTexture * SubTexture, const eeVector2f& Position, const eeSizef& Size, const eeVector2f& Speed, const eeColorA& Color, const EE_BLEND_MODE& Blend ) { +bool cScrollParallax::Create( cSubTexture * SubTexture, const eeVector2f& Position, const eeSizef& Size, const eeVector2f& Speed, const ColorA& Color, const EE_BLEND_MODE& Blend ) { mSubTexture = SubTexture; mPos = Position; mSize = Size; diff --git a/src/eepp/graphics/csprite.cpp b/src/eepp/graphics/csprite.cpp index 04c1096b1..e00482f94 100755 --- a/src/eepp/graphics/csprite.cpp +++ b/src/eepp/graphics/csprite.cpp @@ -120,7 +120,7 @@ cSprite& cSprite::operator =( const cSprite& Other ) { mCb = Other.mCb; if ( NULL != Other.mVertexColors ) { - mVertexColors = eeNewArray( eeColorA, 4 ); + mVertexColors = eeNewArray( ColorA, 4 ); mVertexColors[0] = Other.mVertexColors[0]; mVertexColors[1] = Other.mVertexColors[1]; mVertexColors[2] = Other.mVertexColors[2]; @@ -153,7 +153,7 @@ cSprite * cSprite::Copy() { Spr->mCb = mCb; if ( NULL != mVertexColors ) { - Spr->mVertexColors = eeNewArray( eeColorA, 4 ); + Spr->mVertexColors = eeNewArray( ColorA, 4 ); Spr->mVertexColors[0] = mVertexColors[0]; Spr->mVertexColors[1] = mVertexColors[1]; Spr->mVertexColors[2] = mVertexColors[2]; @@ -182,7 +182,7 @@ void cSprite::Reset() { mRepeations = -1; mAngle = 0; - mColor = eeColorA(255, 255, 255, 255); + mColor = ColorA(255, 255, 255, 255); mBlend = ALPHA_NORMAL; mEffect = RN_NORMAL; @@ -316,9 +316,9 @@ void cSprite::Position( const eeVector2f& NewPos ) { mPos = NewPos; } -void cSprite::UpdateVertexColors( const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3 ) { +void cSprite::UpdateVertexColors( const ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3 ) { if ( NULL == mVertexColors ) - mVertexColors = eeNewArray( eeColorA, 4 ); + mVertexColors = eeNewArray( ColorA, 4 ); mVertexColors[0] = Color0; mVertexColors[1] = Color1; @@ -758,11 +758,11 @@ void cSprite::AnimPaused( const bool& Pause ) { } } -void cSprite::Color( const eeColorA& Color) { +void cSprite::Color( const ColorA& Color) { mColor = Color; } -const eeColorA& cSprite::Color() const { +const ColorA& cSprite::Color() const { return mColor; } diff --git a/src/eepp/graphics/csubtexture.cpp b/src/eepp/graphics/csubtexture.cpp index 4166ed141..8b3adaaa6 100644 --- a/src/eepp/graphics/csubtexture.cpp +++ b/src/eepp/graphics/csubtexture.cpp @@ -138,17 +138,17 @@ void cSubTexture::Offset( const eeVector2i& offset ) { mOffset = offset; } -void cSubTexture::Draw( const Float& X, const Float& Y, const eeColorA& Color, const Float& Angle, const eeVector2f& Scale, const EE_BLEND_MODE& Blend, const EE_RENDER_MODE& Effect, eeOriginPoint Center ) { +void cSubTexture::Draw( const Float& X, const Float& Y, const ColorA& Color, const Float& Angle, const eeVector2f& Scale, const EE_BLEND_MODE& Blend, const EE_RENDER_MODE& Effect, eeOriginPoint Center ) { if ( NULL != mTexture ) mTexture->DrawEx( X + mOffset.x, Y + mOffset.y, mDestSize.x, mDestSize.y, Angle, Scale, Color, Color, Color, Color, Blend, Effect, Center, mSrcRect ); } -void cSubTexture::Draw( const Float& X, const Float& Y, const Float& Angle, const eeVector2f& Scale, const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3, const EE_BLEND_MODE& Blend, const EE_RENDER_MODE& Effect, eeOriginPoint Center ) { +void cSubTexture::Draw( const Float& X, const Float& Y, const Float& Angle, const eeVector2f& Scale, const ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3, const EE_BLEND_MODE& Blend, const EE_RENDER_MODE& Effect, eeOriginPoint Center ) { if ( NULL != mTexture ) mTexture->DrawEx( X + mOffset.x, Y + mOffset.y, mDestSize.x, mDestSize.y, Angle, Scale, Color0, Color1, Color2, Color3, Blend, Effect, Center, mSrcRect ); } -void cSubTexture::Draw( const eeQuad2f Q, const eeVector2f& Offset, const Float& Angle, const eeVector2f& Scale, const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3, const EE_BLEND_MODE& Blend ) { +void cSubTexture::Draw( const eeQuad2f Q, const eeVector2f& Offset, const Float& Angle, const eeVector2f& Scale, const ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3, const EE_BLEND_MODE& Blend ) { if ( NULL != mTexture ) mTexture->DrawQuadEx( Q, Offset, Angle, Scale, Color0, Color1, Color2, Color3, Blend, mSrcRect ); } @@ -157,7 +157,7 @@ cTexture * cSubTexture::GetTexture() { return mTexture; } -void cSubTexture::ReplaceColor( eeColorA ColorKey, eeColorA NewColor ) { +void cSubTexture::ReplaceColor( ColorA ColorKey, ColorA NewColor ) { mTexture->Lock(); for ( int y = mSrcRect.Top; y < mSrcRect.Bottom; y++ ) { @@ -170,12 +170,12 @@ void cSubTexture::ReplaceColor( eeColorA ColorKey, eeColorA NewColor ) { mTexture->Unlock( false, true ); } -void cSubTexture::CreateMaskFromColor(eeColorA ColorKey, Uint8 Alpha) { - ReplaceColor( ColorKey, eeColorA( ColorKey.R(), ColorKey.G(), ColorKey.B(), Alpha ) ); +void cSubTexture::CreateMaskFromColor(ColorA ColorKey, Uint8 Alpha) { + ReplaceColor( ColorKey, ColorA( ColorKey.R(), ColorKey.G(), ColorKey.B(), Alpha ) ); } -void cSubTexture::CreateMaskFromColor(eeColor ColorKey, Uint8 Alpha) { - CreateMaskFromColor( eeColorA( ColorKey.R(), ColorKey.G(), ColorKey.B(), 255 ), Alpha ); +void cSubTexture::CreateMaskFromColor(RGB ColorKey, Uint8 Alpha) { + CreateMaskFromColor( ColorA( ColorKey.R(), ColorKey.G(), ColorKey.B(), 255 ), Alpha ); } void cSubTexture::CacheAlphaMask() { @@ -215,7 +215,7 @@ void cSubTexture::CacheColors() { int rY = 0; int rX = 0; int rW = mSrcRect.Right - mSrcRect.Left; - eeColorA tColor; + ColorA tColor; Uint32 Channels = mTexture->Channels(); int Pos; @@ -254,7 +254,7 @@ Uint8 cSubTexture::GetAlphaAt( const Int32& X, const Int32& Y ) { return GetAlphaAt( X, Y ); } -eeColorA cSubTexture::GetColorAt( const Int32& X, const Int32& Y ) { +ColorA cSubTexture::GetColorAt( const Int32& X, const Int32& Y ) { if ( mTexture->LocalCopy() ) return mTexture->GetPixel( mSrcRect.Left + X, mSrcRect.Right + Y ); @@ -263,13 +263,13 @@ eeColorA cSubTexture::GetColorAt( const Int32& X, const Int32& Y ) { unsigned int Pos = ( X + Y * ( mSrcRect.Right - mSrcRect.Left ) ) * Channels; if ( 4 == Channels ) - return eeColorA( mPixels[ Pos ], mPixels[ Pos + 1 ], mPixels[ Pos + 2 ], mPixels[ Pos + 3 ] ); + return ColorA( mPixels[ Pos ], mPixels[ Pos + 1 ], mPixels[ Pos + 2 ], mPixels[ Pos + 3 ] ); else if ( 3 == Channels ) - return eeColorA( mPixels[ Pos ], mPixels[ Pos + 1 ], mPixels[ Pos + 2 ], 255 ); + return ColorA( mPixels[ Pos ], mPixels[ Pos + 1 ], mPixels[ Pos + 2 ], 255 ); else if ( 2 == Channels ) - return eeColorA( mPixels[ Pos ], mPixels[ Pos + 1 ], 255, 255 ); + return ColorA( mPixels[ Pos ], mPixels[ Pos + 1 ], 255, 255 ); else - return eeColorA( mPixels[ Pos ], 255, 255, 255 ); + return ColorA( mPixels[ Pos ], 255, 255, 255 ); } CacheColors(); @@ -277,7 +277,7 @@ eeColorA cSubTexture::GetColorAt( const Int32& X, const Int32& Y ) { return GetColorAt( X, Y ); } -void cSubTexture::SetColorAt( const Int32& X, const Int32& Y, const eeColorA& Color ) { +void cSubTexture::SetColorAt( const Int32& X, const Int32& Y, const ColorA& Color ) { if ( NULL != mPixels ) { Uint32 Channels = mTexture->Channels(); unsigned int Pos = ( X + Y * ( mSrcRect.Right - mSrcRect.Left ) ) * Channels; diff --git a/src/eepp/graphics/ctextcache.cpp b/src/eepp/graphics/ctextcache.cpp index f87068683..41193e9b1 100644 --- a/src/eepp/graphics/ctextcache.cpp +++ b/src/eepp/graphics/ctextcache.cpp @@ -18,7 +18,7 @@ cTextCache::cTextCache() : { } -cTextCache::cTextCache( cFont * font, const String& text, eeColorA FontColor, eeColorA FontShadowColor ) : +cTextCache::cTextCache( cFont * font, const String& text, ColorA FontColor, ColorA FontShadowColor ) : mText( text ), mFont( font ), mCachedWidth(0.f), @@ -37,7 +37,7 @@ cTextCache::cTextCache( cFont * font, const String& text, eeColorA FontColor, ee cTextCache::~cTextCache() { } -void cTextCache::Create( cFont * font, const String& text, eeColorA FontColor, eeColorA FontShadowColor ) { +void cTextCache::Create( cFont * font, const String& text, ColorA FontColor, ColorA FontShadowColor ) { mFont = font; mText = text; UpdateCoords(); @@ -80,7 +80,7 @@ void cTextCache::Text( const String& text ) { Cache(); } -const eeColorA& cTextCache::Color() const { +const ColorA& cTextCache::Color() const { return mFontColor; } @@ -91,7 +91,7 @@ void cTextCache::Alpha( const Uint8& alpha ) { } } -void cTextCache::Color( const eeColorA& color ) { +void cTextCache::Color( const ColorA& color ) { if ( mFontColor != color ) { mFontColor = color; @@ -99,8 +99,8 @@ void cTextCache::Color( const eeColorA& color ) { } } -void cTextCache::Color( const eeColorA& color, Uint32 from, Uint32 to ) { - std::vector colors( GLi->QuadVertexs(), color ); +void cTextCache::Color( const ColorA& color, Uint32 from, Uint32 to ) { + std::vector colors( GLi->QuadVertexs(), color ); std::size_t s = mText.size(); if ( to >= s ) { @@ -112,7 +112,7 @@ void cTextCache::Color( const eeColorA& color, Uint32 from, Uint32 to ) { Int32 rpos = from; Int32 lpos = 0; Uint32 i; - Uint32 qsize = sizeof(eeColorA) * GLi->QuadVertexs(); + Uint32 qsize = sizeof(ColorA) * GLi->QuadVertexs(); String::StringBaseType curChar; // New lines and tabs are not rendered, and not counted as a color @@ -144,11 +144,11 @@ void cTextCache::Color( const eeColorA& color, Uint32 from, Uint32 to ) { } } -const eeColorA& cTextCache::ShadowColor() const { +const ColorA& cTextCache::ShadowColor() const { return mFontShadowColor; } -void cTextCache::ShadowColor(const eeColorA& color) { +void cTextCache::ShadowColor(const ColorA& color) { mFontShadowColor = color; } @@ -156,7 +156,7 @@ std::vector& cTextCache::VertextCoords() { return mRenderCoords; } -std::vector& cTextCache::Colors() { +std::vector& cTextCache::Colors() { return mColors; } diff --git a/src/eepp/graphics/ctexture.cpp b/src/eepp/graphics/ctexture.cpp index 9a37cd0f8..e1f9e21c3 100755 --- a/src/eepp/graphics/ctexture.cpp +++ b/src/eepp/graphics/ctexture.cpp @@ -190,7 +190,7 @@ const Uint8 * cTexture::GetPixelsPtr() { return cImage::GetPixelsPtr(); } -void cTexture::SetPixel( const unsigned int& x, const unsigned int& y, const eeColorA& Color ) { +void cTexture::SetPixel( const unsigned int& x, const unsigned int& y, const ColorA& Color ) { cImage::SetPixel( x, y, Color ); mFlags |= TEX_FLAG_MODIFIED; @@ -239,7 +239,7 @@ const EE_TEX_FILTER& cTexture::Filter() const { return mFilter; } -void cTexture::ReplaceColor( const eeColorA& ColorKey, const eeColorA& NewColor ) { +void cTexture::ReplaceColor( const ColorA& ColorKey, const ColorA& NewColor ) { Lock(); cImage::ReplaceColor( ColorKey, NewColor ); @@ -247,15 +247,15 @@ void cTexture::ReplaceColor( const eeColorA& ColorKey, const eeColorA& NewColor Unlock( false, true ); } -void cTexture::CreateMaskFromColor( const eeColorA& ColorKey, Uint8 Alpha ) { +void cTexture::CreateMaskFromColor( const ColorA& ColorKey, Uint8 Alpha ) { Lock( true ); - cImage::ReplaceColor( ColorKey, eeColorA( ColorKey.R(), ColorKey.G(), ColorKey.B(), Alpha ) ); + cImage::ReplaceColor( ColorKey, ColorA( ColorKey.R(), ColorKey.G(), ColorKey.B(), Alpha ) ); Unlock( false, true ); } -void cTexture::FillWithColor( const eeColorA& Color ) { +void cTexture::FillWithColor( const ColorA& Color ) { Lock(); cImage::FillWithColor( Color ); @@ -428,11 +428,11 @@ bool cTexture::IsCompressed() const { return 0 != ( mFlags & TEX_FLAG_COMPRESSED ); } -void cTexture::Draw( const Float &x, const Float &y, const Float &Angle, const eeVector2f &Scale, const eeColorA& Color, const EE_BLEND_MODE &Blend, const EE_RENDER_MODE &Effect, eeOriginPoint Center, const eeRecti& texSector) { +void cTexture::Draw( const Float &x, const Float &y, const Float &Angle, const eeVector2f &Scale, const ColorA& Color, const EE_BLEND_MODE &Blend, const EE_RENDER_MODE &Effect, eeOriginPoint Center, const eeRecti& texSector) { DrawEx( x, y, 0, 0, Angle, Scale, Color, Color, Color, Color, Blend, Effect, Center, texSector ); } -void cTexture::DrawFast( const Float& x, const Float& y, const Float& Angle, const eeVector2f& Scale, const eeColorA& Color, const EE_BLEND_MODE &Blend, const Float &width, const Float &height ) { +void cTexture::DrawFast( const Float& x, const Float& y, const Float& Angle, const eeVector2f& Scale, const ColorA& Color, const EE_BLEND_MODE &Blend, const Float &width, const Float &height ) { Float w = 0.f != width ? width : (Float)ImgWidth(); Float h = 0.f != height ? height : (Float)ImgHeight(); @@ -451,7 +451,7 @@ void cTexture::DrawFast( const Float& x, const Float& y, const Float& Angle, con sBR->DrawOpt(); } -void cTexture::DrawEx( Float x, Float y, Float width, Float height, const Float &Angle, const eeVector2f &Scale, const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3, const EE_BLEND_MODE &Blend, const EE_RENDER_MODE &Effect, eeOriginPoint Center, const eeRecti& texSector ) { +void cTexture::DrawEx( Float x, Float y, Float width, Float height, const Float &Angle, const eeVector2f &Scale, const ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3, const EE_BLEND_MODE &Blend, const EE_RENDER_MODE &Effect, eeOriginPoint Center, const eeRecti& texSector ) { bool renderSector = true; eeRecti Sector = texSector; Float w = (Float)ImgWidth(); @@ -618,11 +618,11 @@ void cTexture::DrawEx( Float x, Float y, Float width, Float height, const Float sBR->DrawOpt(); } -void cTexture::DrawQuad( const eeQuad2f& Q, const eeVector2f& Offset, const Float &Angle, const eeVector2f &Scale, const eeColorA& Color, const EE_BLEND_MODE &Blend, const eeRecti& texSector) { +void cTexture::DrawQuad( const eeQuad2f& Q, const eeVector2f& Offset, const Float &Angle, const eeVector2f &Scale, const ColorA& Color, const EE_BLEND_MODE &Blend, const eeRecti& texSector) { DrawQuadEx( Q, Offset, Angle, Scale, Color, Color, Color, Color, Blend, texSector ); } -void cTexture::DrawQuadEx( eeQuad2f Q, const eeVector2f& Offset, const Float &Angle, const eeVector2f &Scale, const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3, const EE_BLEND_MODE &Blend, eeRecti texSector ) { +void cTexture::DrawQuadEx( eeQuad2f Q, const eeVector2f& Offset, const Float &Angle, const eeVector2f &Scale, const ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3, const EE_BLEND_MODE &Blend, eeRecti texSector ) { bool renderSector = true; Float w = (Float)ImgWidth(); Float h = (Float)ImgHeight(); diff --git a/src/eepp/graphics/ctexturefactory.cpp b/src/eepp/graphics/ctexturefactory.cpp index b3e2e76fc..b2a40e033 100755 --- a/src/eepp/graphics/ctexturefactory.cpp +++ b/src/eepp/graphics/ctexturefactory.cpp @@ -26,7 +26,7 @@ cTextureFactory::~cTextureFactory() { UnloadTextures(); } -Uint32 cTextureFactory::CreateEmptyTexture( const unsigned int& Width, const unsigned int& Height, const unsigned int& Channels, const eeColorA& DefaultColor, const bool& Mipmap, const EE_CLAMP_MODE& ClampMode, const bool& CompressTexture, const bool& KeepLocalCopy ) { +Uint32 cTextureFactory::CreateEmptyTexture( const unsigned int& Width, const unsigned int& Height, const unsigned int& Channels, const ColorA& DefaultColor, const bool& Mipmap, const EE_CLAMP_MODE& ClampMode, const bool& CompressTexture, const bool& KeepLocalCopy ) { cImage TmpImg( Width, Height, Channels, DefaultColor ); return LoadFromPixels( TmpImg.GetPixelsPtr(), Width, Height, Channels, Mipmap, ClampMode, CompressTexture, KeepLocalCopy ); } diff --git a/src/eepp/graphics/ctextureloader.cpp b/src/eepp/graphics/ctextureloader.cpp index da2b038d3..d9458c5b9 100644 --- a/src/eepp/graphics/ctextureloader.cpp +++ b/src/eepp/graphics/ctextureloader.cpp @@ -450,7 +450,7 @@ void cTextureLoader::LoadFromPixels() { cImage * tImg = eeNew ( cImage, ( mPixels, mImgWidth, mImgHeight, mChannels ) ); - tImg->CreateMaskFromColor( eeColorA( mColorKey->R(), mColorKey->G(), mColorKey->B(), 255 ), 0 ); + tImg->CreateMaskFromColor( ColorA( mColorKey->R(), mColorKey->G(), mColorKey->B(), 255 ), 0 ); tImg->AvoidFreeImage( true ); @@ -536,9 +536,9 @@ const Uint32& cTextureLoader::Id() const { return mTexId; } -void cTextureLoader::SetColorKey( eeColor Color ) { +void cTextureLoader::SetColorKey( RGB Color ) { eeSAFE_DELETE( mColorKey ); - mColorKey = eeNew( eeColor, ( Color.R(), Color.G(), Color.B() ) ); + mColorKey = eeNew( RGB, ( Color.R(), Color.G(), Color.B() ) ); } const std::string& cTextureLoader::Filepath() const { diff --git a/src/eepp/graphics/ctexturepacker.cpp b/src/eepp/graphics/ctexturepacker.cpp index f9edc3f6d..f1912995c 100644 --- a/src/eepp/graphics/ctexturepacker.cpp +++ b/src/eepp/graphics/ctexturepacker.cpp @@ -520,7 +520,7 @@ void cTexturePacker::Save( const std::string& Filepath, const EE_SAVE_TYPE& Form cImage Img( (Uint32)mWidth, (Uint32)mHeight, (Uint32)4 ); - Img.FillWithColor( eeColorA(0,0,0,0) ); + Img.FillWithColor( ColorA(0,0,0,0) ); cTexturePackerTex * t = NULL; int w, h, c; diff --git a/src/eepp/graphics/cttffont.cpp b/src/eepp/graphics/cttffont.cpp index 0222ba78a..148b629f6 100755 --- a/src/eepp/graphics/cttffont.cpp +++ b/src/eepp/graphics/cttffont.cpp @@ -26,7 +26,7 @@ cTTFFont::~cTTFFont() { hkFontManager::instance()->Destroy(); } -bool cTTFFont::LoadFromPack( Pack* Pack, const std::string& FilePackPath, const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) { +bool cTTFFont::LoadFromPack( Pack* Pack, const std::string& FilePackPath, const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const RGB& FontColor, const Uint8& OutlineSize, const RGB& OutlineColor, const bool& AddPixelSeparator ) { bool Ret = false; SafeDataPointer PData; @@ -39,7 +39,7 @@ bool cTTFFont::LoadFromPack( Pack* Pack, const std::string& FilePackPath, const return Ret; } -bool cTTFFont::LoadFromMemory( Uint8* TTFData, const unsigned int& TTFDataSize, const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) { +bool cTTFFont::LoadFromMemory( Uint8* TTFData, const unsigned int& TTFDataSize, const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const RGB& FontColor, const Uint8& OutlineSize, const RGB& OutlineColor, const bool& AddPixelSeparator ) { if ( !mFilepath.size() ) mFilepath = "from memory"; @@ -55,7 +55,7 @@ bool cTTFFont::LoadFromMemory( Uint8* TTFData, const unsigned int& TTFDataSize, return iLoad( Size, Style, NumCharsToGen, FontColor, OutlineSize, OutlineColor, AddPixelSeparator ); } -bool cTTFFont::Load( const std::string& Filepath, const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) { +bool cTTFFont::Load( const std::string& Filepath, const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const RGB& FontColor, const Uint8& OutlineSize, const RGB& OutlineColor, const bool& AddPixelSeparator ) { mFilepath = Filepath; if ( FileSystem::FileExists( Filepath ) ) { @@ -80,7 +80,7 @@ bool cTTFFont::Load( const std::string& Filepath, const unsigned int& Size, EE_T return false; } -bool cTTFFont::iLoad( const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const eeColor& FontColor, Uint8 OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) { +bool cTTFFont::iLoad( const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const RGB& FontColor, Uint8 OutlineSize, const RGB& OutlineColor, const bool& AddPixelSeparator ) { eeRect CurrentPos; eeSize GlyphRect; @@ -148,7 +148,7 @@ bool cTTFFont::iLoad( const unsigned int& Size, EE_TTF_FONT_STYLE Style, const U } } while ( TexSize < ReqSize ); - mPixels = eeNewArray( eeColorA, TexSize ); + mPixels = eeNewArray( ColorA, TexSize ); memset( mPixels, 0x00000000, TexSize * 4 ); CurrentPos.Left = OutSize; @@ -157,7 +157,7 @@ bool cTTFFont::iLoad( const unsigned int& Size, EE_TTF_FONT_STYLE Style, const U Uint32 * TexGlyph; Uint32 w = (Uint32)mTexWidth; //Uint32 h = (Uint32)mTexHeight; - eeColorA fFontColor( FontColor ); + ColorA fFontColor( FontColor ); //Loop through all chars for ( unsigned int i = 0; i < mNumChars; i++ ) { @@ -175,7 +175,7 @@ bool cTTFFont::iLoad( const unsigned int& Size, EE_TTF_FONT_STYLE Style, const U // Create the outline for the glyph and copy the outline to the texture if ( OutlineSize && OutlineFreetype == OutlineMethod ) { - TempOutGlyphSurface = mFontOutline->GlyphRender( i, eeColorA( OutlineColor ).GetValue() ); + TempOutGlyphSurface = mFontOutline->GlyphRender( i, ColorA( OutlineColor ).GetValue() ); mFontOutline->GlyphMetrics( i, &TempGlyph.MinX, &TempGlyph.MaxX, &TempGlyph.MinY, &TempGlyph.MaxY, &TempGlyph.Advance ); @@ -213,7 +213,7 @@ bool cTTFFont::iLoad( const unsigned int& Size, EE_TTF_FONT_STYLE Style, const U // Copy the glyph to the texture for (int y = 0; y < GlyphRect.y; ++y ) { // Copy per row - memcpy( &mPixels[ CurrentPos.Left + (CurrentPos.Top + y) * w ], &TexGlyph[ y * GlyphRect.x ], GlyphRect.x * sizeof(eeColorA) ); + memcpy( &mPixels[ CurrentPos.Left + (CurrentPos.Top + y) * w ], &TexGlyph[ y * GlyphRect.x ], GlyphRect.x * sizeof(ColorA) ); } // Fixes the width and height of the current pos @@ -280,7 +280,7 @@ bool cTTFFont::iLoad( const unsigned int& Size, EE_TTF_FONT_STYLE Style, const U Pos = x + y * nGlyphS.x; // Blending the normal glyph color to the outline color - mPixels[ RPos ] = Color::Blend( eeColorA( FontColor, alpha_init[ Pos ] ), eeColorA( OutlineColor, alpha_final[ Pos ] ) ); + mPixels[ RPos ] = Color::Blend( ColorA( FontColor, alpha_init[ Pos ] ), ColorA( OutlineColor, alpha_final[ Pos ] ) ); } } diff --git a/src/eepp/graphics/cttffontloader.cpp b/src/eepp/graphics/cttffontloader.cpp index 58c84deeb..26b4be4e1 100644 --- a/src/eepp/graphics/cttffontloader.cpp +++ b/src/eepp/graphics/cttffontloader.cpp @@ -4,7 +4,7 @@ namespace EE { namespace Graphics { -cTTFFontLoader::cTTFFontLoader( const std::string& FontName, const std::string& Filepath, const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) : +cTTFFontLoader::cTTFFontLoader( const std::string& FontName, const std::string& Filepath, const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const RGB& FontColor, const Uint8& OutlineSize, const RGB& OutlineColor, const bool& AddPixelSeparator ) : ObjectLoader( FontTTFLoader ), mLoadType( TTF_LT_PATH ), mFontName( FontName ), @@ -21,7 +21,7 @@ cTTFFontLoader::cTTFFontLoader( const std::string& FontName, const std::string& Create(); } -cTTFFontLoader::cTTFFontLoader( const std::string& FontName, Pack * Pack, const std::string& FilePackPath, const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) : +cTTFFontLoader::cTTFFontLoader( const std::string& FontName, Pack * Pack, const std::string& FilePackPath, const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const RGB& FontColor, const Uint8& OutlineSize, const RGB& OutlineColor, const bool& AddPixelSeparator ) : ObjectLoader( FontTTFLoader ), mLoadType( TTF_LT_PACK ), mFontName( FontName ), @@ -39,7 +39,7 @@ cTTFFontLoader::cTTFFontLoader( const std::string& FontName, Pack * Pack, const Create(); } -cTTFFontLoader::cTTFFontLoader( const std::string& FontName, Uint8* TTFData, const unsigned int& TTFDataSize, const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) : +cTTFFontLoader::cTTFFontLoader( const std::string& FontName, Uint8* TTFData, const unsigned int& TTFDataSize, const unsigned int& Size, EE_TTF_FONT_STYLE Style, const Uint16& NumCharsToGen, const RGB& FontColor, const Uint8& OutlineSize, const RGB& OutlineColor, const bool& AddPixelSeparator ) : ObjectLoader( FontTTFLoader ), mLoadType( TTF_LT_MEM ), mFontName( FontName ), diff --git a/src/eepp/graphics/cvertexbuffer.cpp b/src/eepp/graphics/cvertexbuffer.cpp index 0d85fbc83..f94df7445 100644 --- a/src/eepp/graphics/cvertexbuffer.cpp +++ b/src/eepp/graphics/cvertexbuffer.cpp @@ -53,7 +53,7 @@ void cVertexBuffer::AddVertexCoord( const eeVector2f& VertexCoord, const Uint32& AddVertex( VERTEX_FLAG_TEXTURE0 + TextureLevel, VertexCoord ); } -void cVertexBuffer::AddColor( const eeColorA& Color ) { +void cVertexBuffer::AddColor( const ColorA& Color ) { mColorArray.push_back( Color.R() ); mColorArray.push_back( Color.G() ); mColorArray.push_back( Color.B() ); @@ -114,12 +114,12 @@ eeVector2f cVertexBuffer::GetVector2( const Uint32& Type, const Uint32& Index ) return eeVector2f( mVertexArray[ Type ][ pos ], mVertexArray[ Type ][ pos + 1 ] ); } -eeColorA cVertexBuffer::GetColor( const Uint32& Index ) { +ColorA cVertexBuffer::GetColor( const Uint32& Index ) { eeASSERT( !VERTEX_FLAG_QUERY( mVertexFlags, VERTEX_FLAG_COLOR ) ); Int32 pos = Index * eeVertexElements[ VERTEX_FLAG_COLOR ]; - return eeColorA( mColorArray[ pos ], mColorArray[ pos + 1 ], mColorArray[ pos + 2 ], mColorArray[ pos + 3 ] ); + return ColorA( mColorArray[ pos ], mColorArray[ pos + 1 ], mColorArray[ pos + 2 ], mColorArray[ pos + 3 ] ); } Uint32 cVertexBuffer::GetIndex( const Uint32& Index ) { diff --git a/src/eepp/graphics/pixelperfect.cpp b/src/eepp/graphics/pixelperfect.cpp index 0aa3b9acf..fef727184 100644 --- a/src/eepp/graphics/pixelperfect.cpp +++ b/src/eepp/graphics/pixelperfect.cpp @@ -38,7 +38,7 @@ bool PixelPerfectCollide( cTexture * Tex1, const unsigned int& x1, const unsigne inter_x1 = eemin(ax2,bx2); inter_y0 = eemax(ay1,by1); inter_y1 = eemin(ay2,by2); - eeColorA C1, C2; + ColorA C1, C2; for(unsigned int y = inter_y0 ; y <= inter_y1 ; y++) { for(unsigned int x = inter_x0 ; x <= inter_x1 ; x++) { @@ -82,7 +82,7 @@ bool PixelPerfectCollide( cTexture * Tex, const unsigned int& x1, const unsigned } if ( !( ax1 >= x2 && ax2 <= x2 && ay1 >= y2 && ay2 <= y2 ) ) { - eeColorA C1; + ColorA C1; Tex->Lock(); diff --git a/src/eepp/physics/constraints/cdampedspring.cpp b/src/eepp/physics/constraints/cdampedspring.cpp index cdd4a84e2..998364cbd 100644 --- a/src/eepp/physics/constraints/cdampedspring.cpp +++ b/src/eepp/physics/constraints/cdampedspring.cpp @@ -104,7 +104,7 @@ void cDampedSpring::Draw() { GLi->Disable( GL_TEXTURE_2D ); GLi->DisableClientState( GL_TEXTURE_COORD_ARRAY ); - std::vector tcolors( springVAR_count * 4, eeColorA( 0, 255, 0, 255 ) ); + std::vector tcolors( springVAR_count * 4, ColorA( 0, 255, 0, 255 ) ); GLi->ColorPointer( 4, GL_UNSIGNED_BYTE, 0, reinterpret_cast( &tcolors[0] ), springVAR_count * 4 ); GLi->VertexPointer( 2, GL_FLOAT, 0, springVAR, springVAR_count * sizeof(float) * 2 ); diff --git a/src/eepp/physics/constraints/cgroovejoint.cpp b/src/eepp/physics/constraints/cgroovejoint.cpp index d14413306..91a112d7e 100644 --- a/src/eepp/physics/constraints/cgroovejoint.cpp +++ b/src/eepp/physics/constraints/cgroovejoint.cpp @@ -57,11 +57,11 @@ void cGrooveJoint::Draw() { BR->SetTexture( NULL ); BR->SetPointSize( mDrawPointSize ); BR->PointsBegin(); - BR->PointSetColor( eeColorA( 128, 255, 128, 255 ) ); + BR->PointSetColor( ColorA( 128, 255, 128, 255 ) ); BR->BatchPoint( c.x, c.y ); BR->Draw(); BR->LinesBegin(); - BR->LinesSetColor( eeColorA( 128, 255, 128, 255 ) ); + BR->LinesSetColor( ColorA( 128, 255, 128, 255 ) ); BR->BatchLine( a.x, a.y, b.x, b.y ); BR->Draw(); BR->SetPointSize( ps ); diff --git a/src/eepp/physics/constraints/cpinjoint.cpp b/src/eepp/physics/constraints/cpinjoint.cpp index 5ee406a85..ffd9906e1 100644 --- a/src/eepp/physics/constraints/cpinjoint.cpp +++ b/src/eepp/physics/constraints/cpinjoint.cpp @@ -56,13 +56,13 @@ void cPinJoint::Draw() { BR->SetTexture( NULL ); BR->SetPointSize( mDrawPointSize ); BR->PointsBegin(); - BR->PointSetColor( eeColorA( 128, 255, 128, 255 ) ); + BR->PointSetColor( ColorA( 128, 255, 128, 255 ) ); BR->BatchPoint( a.x, a.y ); BR->BatchPoint( b.x, b.y ); BR->Draw(); BR->LinesBegin(); - BR->LinesSetColor( eeColorA( 128, 255, 128, 255 ) ); + BR->LinesSetColor( ColorA( 128, 255, 128, 255 ) ); BR->BatchLine( a.x, a.y, b.x, b.y ); BR->Draw(); diff --git a/src/eepp/physics/constraints/cpivotjoint.cpp b/src/eepp/physics/constraints/cpivotjoint.cpp index 8875872da..cf712f0b1 100644 --- a/src/eepp/physics/constraints/cpivotjoint.cpp +++ b/src/eepp/physics/constraints/cpivotjoint.cpp @@ -57,7 +57,7 @@ void cPivotJoint::Draw() { BR->SetTexture( NULL ); BR->SetPointSize( mDrawPointSize ); BR->PointsBegin(); - BR->PointSetColor( eeColorA( 128, 255, 128, 255 ) ); + BR->PointSetColor( ColorA( 128, 255, 128, 255 ) ); BR->BatchPoint( a.x, a.y ); BR->BatchPoint( b.x, b.y ); BR->Draw(); diff --git a/src/eepp/physics/constraints/cslidejoint.cpp b/src/eepp/physics/constraints/cslidejoint.cpp index 390afad9c..04e362ad7 100644 --- a/src/eepp/physics/constraints/cslidejoint.cpp +++ b/src/eepp/physics/constraints/cslidejoint.cpp @@ -65,7 +65,7 @@ void cSlideJoint::Draw() { BR->SetTexture( NULL ); BR->SetPointSize( mDrawPointSize ); BR->PointsBegin(); - BR->PointSetColor( eeColorA( 128, 255, 128, 255 ) ); + BR->PointSetColor( ColorA( 128, 255, 128, 255 ) ); BR->BatchPoint( a.x, a.y ); BR->BatchPoint( b.x, b.y ); BR->Draw(); diff --git a/src/eepp/physics/cshape.cpp b/src/eepp/physics/cshape.cpp index 20308f34d..ceb44c750 100644 --- a/src/eepp/physics/cshape.cpp +++ b/src/eepp/physics/cshape.cpp @@ -169,7 +169,7 @@ cShapeSegment * cShape::GetAsSegment() { void cShape::DrawBB() { #ifdef PHYSICS_RENDERER_ENABLED cPrimitives P; - P.SetColor( eeColorA( 76, 128, 76, 255 ) ); + P.SetColor( ColorA( 76, 128, 76, 255 ) ); P.ForceDraw( false ); P.DrawLine( eeLine2f( eeVector2f( mShape->bb.l, mShape->bb.t ), eeVector2f( mShape->bb.r, mShape->bb.t ) ) ); P.DrawLine( eeLine2f( eeVector2f( mShape->bb.l, mShape->bb.t ), eeVector2f( mShape->bb.l, mShape->bb.b ) ) ); diff --git a/src/eepp/physics/cshapepoly.cpp b/src/eepp/physics/cshapepoly.cpp index d52c52a15..b3711f7fe 100644 --- a/src/eepp/physics/cshapepoly.cpp +++ b/src/eepp/physics/cshapepoly.cpp @@ -61,7 +61,7 @@ void cShapePoly::Draw( cSpace * space ) { BR->SetTexture( NULL ); - eeColorA Col = ColorForShape( (cpShape *)poly, space->Space() ); + ColorA Col = ColorForShape( (cpShape *)poly, space->Space() ); if( !poly->CP_PRIVATE(shape).sensor ){ if ( 4 != poly->CP_PRIVATE(numVerts) ) { @@ -91,7 +91,7 @@ void cShapePoly::DrawBorder( cSpace *space ) { cBatchRenderer * BR = cGlobalBatchRenderer::instance(); - eeColorA Col = ColorForShape( (cpShape *)poly, space->Space() ); + ColorA Col = ColorForShape( (cpShape *)poly, space->Space() ); BR->LineLoopBegin(); BR->LineLoopSetColor( Col ); diff --git a/src/eepp/physics/cshapesegment.cpp b/src/eepp/physics/cshapesegment.cpp index 9035680d6..ef529233f 100644 --- a/src/eepp/physics/cshapesegment.cpp +++ b/src/eepp/physics/cshapesegment.cpp @@ -97,7 +97,7 @@ void cShapeSegment::Draw( cSpace * space ) { GLi->Disable( GL_TEXTURE_2D ); GLi->DisableClientState( GL_TEXTURE_COORD_ARRAY ); - std::vector tcolors( pillVAR_count * 4 ); + std::vector tcolors( pillVAR_count * 4 ); GLi->PushMatrix(); @@ -116,7 +116,7 @@ void cShapeSegment::Draw( cSpace * space ) { GLi->VertexPointer( 3, GL_FLOAT, 0, pillVAR, pillVAR_count * sizeof(float) * 3 ); if( !seg->CP_PRIVATE(shape).sensor ) { - eeColorA C = ColorForShape( mShape, space->Space() ); + ColorA C = ColorForShape( mShape, space->Space() ); tcolors.assign( tcolors.size(), C ); @@ -125,7 +125,7 @@ void cShapeSegment::Draw( cSpace * space ) { GLi->DrawArrays( GL_TRIANGLE_FAN, 0, pillVAR_count ); } - tcolors.assign( tcolors.size(), eeColorA( 102, 102, 102, 255 ) ); + tcolors.assign( tcolors.size(), ColorA( 102, 102, 102, 255 ) ); GLi->ColorPointer( 4, GL_UNSIGNED_BYTE, 0, reinterpret_cast( &tcolors[0] ), pillVAR_count * 4 ); diff --git a/src/eepp/physics/cspace.cpp b/src/eepp/physics/cspace.cpp index 68bd14096..f430b2839 100644 --- a/src/eepp/physics/cspace.cpp +++ b/src/eepp/physics/cspace.cpp @@ -324,7 +324,7 @@ void cSpace::Draw() { if ( options->BodyPointSize ) { BR->SetPointSize( options->BodyPointSize ); BR->PointsBegin(); - BR->PointSetColor( eeColorA( 255, 255, 255, 255 ) ); + BR->PointSetColor( ColorA( 255, 255, 255, 255 ) ); cpArray * bodies = mSpace->CP_PRIVATE(bodies); @@ -340,7 +340,7 @@ void cSpace::Draw() { if ( options->CollisionPointSize ) { BR->SetPointSize( options->CollisionPointSize ); BR->PointsBegin(); - BR->PointSetColor( eeColorA( 255, 0, 0, 255 ) ); + BR->PointSetColor( ColorA( 255, 0, 0, 255 ) ); cpArray * arbiters = mSpace->CP_PRIVATE(arbiters); diff --git a/src/eepp/ui/cuibackground.cpp b/src/eepp/ui/cuibackground.cpp index 0e9a67a70..173fc917f 100644 --- a/src/eepp/ui/cuibackground.cpp +++ b/src/eepp/ui/cuibackground.cpp @@ -6,7 +6,7 @@ cUIBackground::cUIBackground() : mBlendMode( ALPHA_NORMAL ), mCorners(0) { - mColor.push_back( eeColorA(0xFF404040) ); + mColor.push_back( ColorA(0xFF404040) ); } cUIBackground::cUIBackground( const cUIBackground& Back ) : @@ -17,33 +17,33 @@ cUIBackground::cUIBackground( const cUIBackground& Back ) : mColor = b->Colors(); } -cUIBackground::cUIBackground( const eeColorA& Color, const unsigned int& Corners, const EE_BLEND_MODE& BlendMode ) : +cUIBackground::cUIBackground( const ColorA& Color, const unsigned int& Corners, const EE_BLEND_MODE& BlendMode ) : mBlendMode( BlendMode ), mCorners( Corners ) { mColor.push_back( Color ); } -cUIBackground::cUIBackground( const eeColorA& TopLeftColor, const eeColorA& BottomLeftColor, const eeColorA& BottomRightColor, const eeColorA& TopRightColor, const unsigned int& Corners, const EE_BLEND_MODE& BlendMode ) : +cUIBackground::cUIBackground( const ColorA& TopLeftColor, const ColorA& BottomLeftColor, const ColorA& BottomRightColor, const ColorA& TopRightColor, const unsigned int& Corners, const EE_BLEND_MODE& BlendMode ) : mBlendMode( BlendMode ), mCorners( Corners ) { Colors( TopLeftColor, BottomLeftColor, BottomRightColor, TopRightColor ); } -eeColorA& cUIBackground::Color( const unsigned int& index ) { +ColorA& cUIBackground::Color( const unsigned int& index ) { if ( index < mColor.size() ) return mColor[ index ]; return mColor[ 0 ]; } -void cUIBackground::ColorsTo( const eeColorA& Color ) { +void cUIBackground::ColorsTo( const ColorA& Color ) { for ( unsigned int i = 0; i < mColor.size(); i++ ) mColor[i] = Color; } -void cUIBackground::Colors( const eeColorA& TopLeftColor, const eeColorA& BottomLeftColor, const eeColorA& BottomRightColor, const eeColorA& TopRightColor ) { +void cUIBackground::Colors( const ColorA& TopLeftColor, const ColorA& BottomLeftColor, const ColorA& BottomRightColor, const ColorA& TopRightColor ) { mColor[0] = TopLeftColor; if ( mColor.size() < 2 ) @@ -62,11 +62,11 @@ void cUIBackground::Colors( const eeColorA& TopLeftColor, const eeColorA& Bottom mColor[3] = TopRightColor; } -const std::vector& cUIBackground::Colors() { +const std::vector& cUIBackground::Colors() { return mColor; } -void cUIBackground::Color( const eeColorA& Col ) { +void cUIBackground::Color( const ColorA& Col ) { mColor[0] = Col; } diff --git a/src/eepp/ui/cuiborder.cpp b/src/eepp/ui/cuiborder.cpp index 3f59ffe20..3427c4ec1 100644 --- a/src/eepp/ui/cuiborder.cpp +++ b/src/eepp/ui/cuiborder.cpp @@ -5,11 +5,11 @@ namespace EE { namespace UI { cUIBorder::cUIBorder() : mColor( 0xFF404040 ), mWidth( 1 ) {} cUIBorder::cUIBorder( const cUIBorder& border ) : mColor( border.Color() ), mWidth( border.Width() ) {} -const eeColorA& cUIBorder::Color() const { +const ColorA& cUIBorder::Color() const { return mColor; } -void cUIBorder::Color( const eeColorA& Col ) { +void cUIBorder::Color( const ColorA& Col ) { mColor = Col; } diff --git a/src/eepp/ui/cuicommondialog.cpp b/src/eepp/ui/cuicommondialog.cpp index 79dbd5c69..027b8350b 100644 --- a/src/eepp/ui/cuicommondialog.cpp +++ b/src/eepp/ui/cuicommondialog.cpp @@ -96,7 +96,7 @@ cUICommonDialog::cUICommonDialog( const cUICommonDialog::CreateParams& Params ) ); LBParams.Flags = UI_AUTO_PADDING | UI_ANCHOR_RIGHT | UI_ANCHOR_LEFT | UI_ANCHOR_TOP | UI_ANCHOR_BOTTOM | UI_CLIP_ENABLE; - LBParams.FontSelectedColor = eeColorA( 255, 255, 255, 255 ); + LBParams.FontSelectedColor = ColorA( 255, 255, 255, 255 ); if ( NULL != cUIThemeManager::instance()->DefaultTheme() ) { cUITheme * Theme = cUIThemeManager::instance()->DefaultTheme(); diff --git a/src/eepp/ui/cuicontrolanim.cpp b/src/eepp/ui/cuicontrolanim.cpp index 8d1c11229..c536de34a 100644 --- a/src/eepp/ui/cuicontrolanim.cpp +++ b/src/eepp/ui/cuicontrolanim.cpp @@ -325,8 +325,8 @@ void cUIControlAnim::BorderDraw() { } } -eeColorA cUIControlAnim::GetColor( const eeColorA& Col ) { - return eeColorA( Col.R(), Col.G(), Col.B(), static_cast( (Float)Col.A() * ( mAlpha / 255.f ) ) ); +ColorA cUIControlAnim::GetColor( const ColorA& Col ) { + return ColorA( Col.R(), Col.G(), Col.B(), static_cast( (Float)Col.A() * ( mAlpha / 255.f ) ) ); } void cUIControlAnim::UpdateQuad() { diff --git a/src/eepp/ui/cuidefaulttheme.cpp b/src/eepp/ui/cuidefaulttheme.cpp index 57449473c..fb53bdf7f 100644 --- a/src/eepp/ui/cuidefaulttheme.cpp +++ b/src/eepp/ui/cuidefaulttheme.cpp @@ -12,10 +12,10 @@ namespace EE { namespace UI { cUIDefaultTheme::cUIDefaultTheme( const std::string& Name, const std::string& Abbr, cFont * DefaultFont ) : cUITheme( Name, Abbr, DefaultFont ) { - FontColor( eeColorA( 230, 230, 230, 255 ) ); - FontOverColor( eeColorA( 255, 255, 255, 255 ) ); - FontSelectedColor( eeColorA( 255, 255, 255, 255 ) ); - FontShadowColor( eeColorA( 50, 50, 50, 150 ) ); + FontColor( ColorA( 230, 230, 230, 255 ) ); + FontOverColor( ColorA( 255, 255, 255, 255 ) ); + FontSelectedColor( ColorA( 255, 255, 255, 255 ) ); + FontShadowColor( ColorA( 50, 50, 50, 150 ) ); } cUIPopUpMenu * cUIDefaultTheme::CreatePopUpMenu( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Uint32 RowHeight, eeRecti PaddingContainer, Uint32 MinWidth, Uint32 MinSpaceForIcons, Uint32 MinRightMargin ) { @@ -34,7 +34,7 @@ cUIPopUpMenu * cUIDefaultTheme::CreatePopUpMenu( cUIControl * Parent, const eeSi MenuParams.MinWidth = 100; MenuParams.MinSpaceForIcons = 24; MenuParams.MinRightMargin = 8; - MenuParams.FontColor = eeColorA( 230, 230, 230, 255 ); + MenuParams.FontColor = ColorA( 230, 230, 230, 255 ); } return eeNew( cUIPopUpMenu, ( MenuParams ) ); @@ -100,7 +100,7 @@ cUIWindow * cUIDefaultTheme::CreateWindow( cUIControl * Parent, const eeSize& Si WinParams.Flags |= UI_DRAW_SHADOW; WinParams.WinFlags |= UI_WIN_DRAW_SHADOW; WinParams.ButtonsPositionFixer.x = -2; - WinParams.TitleFontColor = eeColorA( 230, 230, 230, 255 ); + WinParams.TitleFontColor = ColorA( 230, 230, 230, 255 ); } return eeNew( cUIWindow, ( WinParams ) ); @@ -123,7 +123,7 @@ cUICommonDialog * cUIDefaultTheme::CreateCommonDialog( cUIControl * Parent, cons DLGParams.Flags |= UI_DRAW_SHADOW; DLGParams.WinFlags |= UI_WIN_DRAW_SHADOW; DLGParams.ButtonsPositionFixer.x = -2; - DLGParams.TitleFontColor = eeColorA( 230, 230, 230, 255 ); + DLGParams.TitleFontColor = ColorA( 230, 230, 230, 255 ); } return eeNew( cUICommonDialog, ( DLGParams ) ); @@ -145,7 +145,7 @@ cUIMessageBox * cUIDefaultTheme::CreateMessageBox( UI_MSGBOX_TYPE Type, const St MsgBoxParams.Flags |= UI_DRAW_SHADOW; MsgBoxParams.WinFlags |= UI_WIN_DRAW_SHADOW; MsgBoxParams.ButtonsPositionFixer.x = -2; - MsgBoxParams.TitleFontColor = eeColorA( 230, 230, 230, 255 ); + MsgBoxParams.TitleFontColor = ColorA( 230, 230, 230, 255 ); } return eeNew( cUIMessageBox, ( MsgBoxParams ) ); @@ -208,9 +208,9 @@ cUITabWidget * cUIDefaultTheme::CreateTabWidget( cUIControl *Parent, const eeSiz if ( UseDefaultThemeValues() ) { TabWidgetParams.TabSeparation = -1; - TabWidgetParams.FontSelectedColor = eeColorA( 255, 255, 255, 255 ); + TabWidgetParams.FontSelectedColor = ColorA( 255, 255, 255, 255 ); TabWidgetParams.DrawLineBelowTabs = true; - TabWidgetParams.LineBelowTabsColor = eeColorA( 0, 0, 0, 255 ); + TabWidgetParams.LineBelowTabsColor = ColorA( 0, 0, 0, 255 ); TabWidgetParams.LineBewowTabsYOffset = -1; } @@ -229,7 +229,7 @@ cUITooltip * cUIDefaultTheme::CreateTooltip( cUIControl * TooltipOf, cUIControl if ( UseDefaultThemeValues() ) { TooltipParams.Flags &= ~UI_AUTO_PADDING; - TooltipParams.FontColor = eeColorA( 0, 0, 0, 255 ); + TooltipParams.FontColor = ColorA( 0, 0, 0, 255 ); TooltipParams.Padding = eeRecti( 4, 6, 4, 6 ); } diff --git a/src/eepp/ui/cuidropdownlist.cpp b/src/eepp/ui/cuidropdownlist.cpp index 115f1fab7..b3ac75ec7 100644 --- a/src/eepp/ui/cuidropdownlist.cpp +++ b/src/eepp/ui/cuidropdownlist.cpp @@ -30,7 +30,7 @@ cUIDropDownList::cUIDropDownList( cUIDropDownList::CreateParams& Params ) : cUIListBox::CreateParams LBParams; LBParams.Size = eeSize( mSize.Width(), mMinNumVisibleItems * mSize.Height() ); LBParams.Flags = flags; - LBParams.FontSelectedColor = eeColorA( 255, 255, 255, 255 ); + LBParams.FontSelectedColor = ColorA( 255, 255, 255, 255 ); mListBox = eeNew( cUIListBox, ( LBParams ) ); } } diff --git a/src/eepp/ui/cuigfx.cpp b/src/eepp/ui/cuigfx.cpp index c01c159f1..363d345a6 100644 --- a/src/eepp/ui/cuigfx.cpp +++ b/src/eepp/ui/cuigfx.cpp @@ -108,11 +108,11 @@ cSubTexture * cUIGfx::SubTexture() const { return mSubTexture; } -const eeColorA& cUIGfx::Color() const { +const ColorA& cUIGfx::Color() const { return mColor; } -void cUIGfx::Color( const eeColorA& color ) { +void cUIGfx::Color( const ColorA& color ) { mColor = color; Alpha( color.A() ); } diff --git a/src/eepp/ui/cuilistbox.cpp b/src/eepp/ui/cuilistbox.cpp index 53ea27b6e..da69907a2 100644 --- a/src/eepp/ui/cuilistbox.cpp +++ b/src/eepp/ui/cuilistbox.cpp @@ -669,30 +669,30 @@ Uint32 cUIListBox::GetItemIndex( const String& Text ) { return eeINDEX_NOT_FOUND; } -void cUIListBox::FontColor( const eeColorA& Color ) { +void cUIListBox::FontColor( const ColorA& Color ) { mFontColor = Color; for ( Uint32 i = 0; i < mItems.size(); i++ ) mItems[i]->Color( mFontColor ); } -const eeColorA& cUIListBox::FontColor() const { +const ColorA& cUIListBox::FontColor() const { return mFontColor; } -void cUIListBox::FontOverColor( const eeColorA& Color ) { +void cUIListBox::FontOverColor( const ColorA& Color ) { mFontOverColor = Color; } -const eeColorA& cUIListBox::FontOverColor() const { +const ColorA& cUIListBox::FontOverColor() const { return mFontOverColor; } -void cUIListBox::FontSelectedColor( const eeColorA& Color ) { +void cUIListBox::FontSelectedColor( const ColorA& Color ) { mFontSelectedColor = Color; } -const eeColorA& cUIListBox::FontSelectedColor() const { +const ColorA& cUIListBox::FontSelectedColor() const { return mFontSelectedColor; } diff --git a/src/eepp/ui/cuimanager.cpp b/src/eepp/ui/cuimanager.cpp index 68520b819..1526c12bf 100644 --- a/src/eepp/ui/cuimanager.cpp +++ b/src/eepp/ui/cuimanager.cpp @@ -301,11 +301,11 @@ bool cUIManager::HighlightFocus() const { return 0 != ( mFlags & UI_MANAGER_HIGHLIGHT_FOCUS ); } -void cUIManager::HighlightFocusColor( const eeColorA& Color ) { +void cUIManager::HighlightFocusColor( const ColorA& Color ) { mHighlightFocusColor = Color; } -const eeColorA& cUIManager::HighlightFocusColor() const { +const ColorA& cUIManager::HighlightFocusColor() const { return mHighlightFocusColor; } @@ -317,11 +317,11 @@ bool cUIManager::HighlightOver() const { return 0 != ( mFlags & UI_MANAGER_HIGHLIGHT_OVER ); } -void cUIManager::HighlightOverColor( const eeColorA& Color ) { +void cUIManager::HighlightOverColor( const ColorA& Color ) { mHighlightOverColor = Color; } -const eeColorA& cUIManager::HighlightOverColor() const { +const ColorA& cUIManager::HighlightOverColor() const { return mHighlightOverColor; } diff --git a/src/eepp/ui/cuiprogressbar.cpp b/src/eepp/ui/cuiprogressbar.cpp index 6a3967691..48dd6e39a 100644 --- a/src/eepp/ui/cuiprogressbar.cpp +++ b/src/eepp/ui/cuiprogressbar.cpp @@ -42,7 +42,7 @@ void cUIProgressBar::Draw() { cUIControlAnim::Draw(); if ( NULL != mParallax && 0.f != mAlpha ) { - eeColorA C( mParallax->Color() ); + ColorA C( mParallax->Color() ); C.Alpha = (Uint8)mAlpha; mParallax->Color( C ); diff --git a/src/eepp/ui/cuipushbutton.cpp b/src/eepp/ui/cuipushbutton.cpp index fef91f21d..a0e496233 100644 --- a/src/eepp/ui/cuipushbutton.cpp +++ b/src/eepp/ui/cuipushbutton.cpp @@ -226,20 +226,20 @@ Uint32 cUIPushButton::OnKeyUp( const cUIEventKey& Event ) { return cUIComplexControl::OnKeyUp( Event ); } -const eeColorA& cUIPushButton::FontColor() const { +const ColorA& cUIPushButton::FontColor() const { return mFontColor; } -void cUIPushButton::FontColor( const eeColorA& color ) { +void cUIPushButton::FontColor( const ColorA& color ) { mFontColor = color; OnStateChange(); } -const eeColorA& cUIPushButton::FontOverColor() const { +const ColorA& cUIPushButton::FontOverColor() const { return mFontOverColor; } -void cUIPushButton::FontOverColor( const eeColorA& color ) { +void cUIPushButton::FontOverColor( const ColorA& color ) { mFontOverColor = color; OnStateChange(); } diff --git a/src/eepp/ui/cuiskin.cpp b/src/eepp/ui/cuiskin.cpp index 474feae9d..143008d8f 100644 --- a/src/eepp/ui/cuiskin.cpp +++ b/src/eepp/ui/cuiskin.cpp @@ -22,7 +22,7 @@ cUISkin::cUISkin( const std::string& Name, const Uint32& Type ) : mNameHash( String::Hash( mName ) ), mTheme(NULL) { - eeColorA tColor( 255, 255, 255, 255 ); + ColorA tColor( 255, 255, 255, 255 ); mColorDefault = tColor.GetValue(); @@ -34,7 +34,7 @@ cUISkin::cUISkin( const std::string& Name, const Uint32& Type ) : cUISkin::~cUISkin() { } -void cUISkin::SetColor( const Uint32& State, const eeColorA& Color ) { +void cUISkin::SetColor( const Uint32& State, const ColorA& Color ) { eeASSERT ( State < cUISkinState::StateCount ); BitOp::WriteBitKey( &mColorDefault, State, 0 ); @@ -42,7 +42,7 @@ void cUISkin::SetColor( const Uint32& State, const eeColorA& Color ) { mColor[ State ] = Color; } -const eeColorA& cUISkin::GetColor( const Uint32& State ) const { +const ColorA& cUISkin::GetColor( const Uint32& State ) const { eeASSERT ( State < cUISkinState::StateCount ); return mColor[ State ]; diff --git a/src/eepp/ui/cuiskincomplex.cpp b/src/eepp/ui/cuiskincomplex.cpp index 3f91f4e55..7ced18679 100644 --- a/src/eepp/ui/cuiskincomplex.cpp +++ b/src/eepp/ui/cuiskincomplex.cpp @@ -180,7 +180,7 @@ cUISkinComplex * cUISkinComplex::Copy( const std::string& NewName, const bool& C if ( CopyColorsState ) { SkinC->mColorDefault = mColorDefault; - memcpy( &SkinC->mColor[0], &mColor[0], cUISkinState::StateCount * sizeof(eeColorA) ); + memcpy( &SkinC->mColor[0], &mColor[0], cUISkinState::StateCount * sizeof(ColorA) ); } memcpy( &SkinC->mSubTexture[0], &mSubTexture[0], cUISkinState::StateCount * SideCount * sizeof(cSubTexture*) ); diff --git a/src/eepp/ui/cuiskinsimple.cpp b/src/eepp/ui/cuiskinsimple.cpp index 6ea817580..ec38f1f8c 100644 --- a/src/eepp/ui/cuiskinsimple.cpp +++ b/src/eepp/ui/cuiskinsimple.cpp @@ -60,7 +60,7 @@ cUISkinSimple * cUISkinSimple::Copy( const std::string& NewName, const bool& Cop if ( CopyColorsState ) { SkinS->mColorDefault = mColorDefault; - memcpy( &SkinS->mColor[0], &mColor[0], cUISkinState::StateCount * sizeof(eeColorA) ); + memcpy( &SkinS->mColor[0], &mColor[0], cUISkinState::StateCount * sizeof(ColorA) ); } memcpy( &SkinS->mSubTexture[0], &mSubTexture[0], cUISkinState::StateCount * sizeof(cSubTexture*) ); diff --git a/src/eepp/ui/cuisprite.cpp b/src/eepp/ui/cuisprite.cpp index aec928c09..ffb3062cd 100644 --- a/src/eepp/ui/cuisprite.cpp +++ b/src/eepp/ui/cuisprite.cpp @@ -77,14 +77,14 @@ cSprite * cUISprite::Sprite() const { return mSprite; } -eeColorA cUISprite::Color() const { +ColorA cUISprite::Color() const { if ( NULL != mSprite ) return mSprite->Color(); - return eeColorA(); + return ColorA(); } -void cUISprite::Color( const eeColorA& color ) { +void cUISprite::Color( const ColorA& color ) { if ( NULL != mSprite ) mSprite->Color( color ); diff --git a/src/eepp/ui/cuitextbox.cpp b/src/eepp/ui/cuitextbox.cpp index a4690ec9f..501e8b00c 100644 --- a/src/eepp/ui/cuitextbox.cpp +++ b/src/eepp/ui/cuitextbox.cpp @@ -105,31 +105,31 @@ void cUITextBox::Text( const String& text ) { OnTextChanged(); } -const eeColorA& cUITextBox::Color() const { +const ColorA& cUITextBox::Color() const { return mFontColor; } -void cUITextBox::Color( const eeColorA& color ) { +void cUITextBox::Color( const ColorA& color ) { mFontColor = color; mTextCache->Color( color ); Alpha( color.A() ); } -const eeColorA& cUITextBox::ShadowColor() const { +const ColorA& cUITextBox::ShadowColor() const { return mFontShadowColor; } -void cUITextBox::ShadowColor( const eeColorA& color ) { +void cUITextBox::ShadowColor( const ColorA& color ) { mFontShadowColor = color; mTextCache->ShadowColor( mFontColor ); } -const eeColorA& cUITextBox::SelectionBackColor() const { +const ColorA& cUITextBox::SelectionBackColor() const { return mFontSelectionBackColor; } -void cUITextBox::SelectionBackColor( const eeColorA& color ) { +void cUITextBox::SelectionBackColor( const ColorA& color ) { mFontSelectionBackColor = color; } diff --git a/src/eepp/ui/cuitheme.cpp b/src/eepp/ui/cuitheme.cpp index 2ebc7b8ef..488f9ce12 100644 --- a/src/eepp/ui/cuitheme.cpp +++ b/src/eepp/ui/cuitheme.cpp @@ -369,35 +369,35 @@ cFont * cUITheme::Font() const { return mFont; } -const eeColorA& cUITheme::FontColor() const { +const ColorA& cUITheme::FontColor() const { return mFontColor; } -const eeColorA& cUITheme::FontShadowColor() const { +const ColorA& cUITheme::FontShadowColor() const { return mFontShadowColor; } -const eeColorA& cUITheme::FontOverColor() const { +const ColorA& cUITheme::FontOverColor() const { return mFontOverColor; } -const eeColorA& cUITheme::FontSelectedColor() const { +const ColorA& cUITheme::FontSelectedColor() const { return mFontSelectedColor; } -void cUITheme::FontColor( const eeColorA& Color ) { +void cUITheme::FontColor( const ColorA& Color ) { mFontColor = Color; } -void cUITheme::FontShadowColor( const eeColorA& Color ) { +void cUITheme::FontShadowColor( const ColorA& Color ) { mFontShadowColor = Color; } -void cUITheme::FontOverColor( const eeColorA& Color ) { +void cUITheme::FontOverColor( const ColorA& Color ) { mFontOverColor = Color; } -void cUITheme::FontSelectedColor( const eeColorA& Color ) { +void cUITheme::FontSelectedColor( const ColorA& Color ) { mFontSelectedColor = Color; } @@ -424,7 +424,7 @@ cSubTexture * cUITheme::GetIconByName( const std::string& name ) { return NULL; } -cUIGfx * cUITheme::CreateGfx( cSubTexture * SubTexture, cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, eeColorA SubTextureColor, EE_RENDER_MODE SubTextureRender ) { +cUIGfx * cUITheme::CreateGfx( cSubTexture * SubTexture, cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, ColorA SubTextureColor, EE_RENDER_MODE SubTextureRender ) { cUIGfx::CreateParams GfxParams; GfxParams.Parent( Parent ); GfxParams.PosSet( Pos ); diff --git a/src/eepp/ui/cuitooltip.cpp b/src/eepp/ui/cuitooltip.cpp index 6b03b39cc..0117c4f8e 100644 --- a/src/eepp/ui/cuitooltip.cpp +++ b/src/eepp/ui/cuitooltip.cpp @@ -128,20 +128,20 @@ void cUITooltip::Text( const String& text ) { OnTextChanged(); } -const eeColorA& cUITooltip::Color() const { +const ColorA& cUITooltip::Color() const { return mFontColor; } -void cUITooltip::Color( const eeColorA& color ) { +void cUITooltip::Color( const ColorA& color ) { mFontColor = color; Alpha( color.A() ); } -const eeColorA& cUITooltip::ShadowColor() const { +const ColorA& cUITooltip::ShadowColor() const { return mFontShadowColor; } -void cUITooltip::ShadowColor( const eeColorA& color ) { +void cUITooltip::ShadowColor( const ColorA& color ) { mFontShadowColor = color; Alpha( color.A() ); mTextCache->ShadowColor( mFontColor ); diff --git a/src/eepp/ui/cuiwindow.cpp b/src/eepp/ui/cuiwindow.cpp index f880812c2..c00dfd72c 100644 --- a/src/eepp/ui/cuiwindow.cpp +++ b/src/eepp/ui/cuiwindow.cpp @@ -656,8 +656,8 @@ void cUIWindow::Draw() { cPrimitives P; P.ForceDraw( false ); - eeColorA BeginC( 0, 0, 0, 25 * ( Alpha() / (Float)255 ) ); - eeColorA EndC( 0, 0, 0, 0 ); + ColorA BeginC( 0, 0, 0, 25 * ( Alpha() / (Float)255 ) ); + ColorA EndC( 0, 0, 0, 0 ); Float SSize = 16.f; eeVector2i ShadowPos = mScreenPos + eeVector2i( 0, 16 ); diff --git a/src/eepp/ui/cuiwinmenu.cpp b/src/eepp/ui/cuiwinmenu.cpp index 600ba8894..424cf1048 100644 --- a/src/eepp/ui/cuiwinmenu.cpp +++ b/src/eepp/ui/cuiwinmenu.cpp @@ -270,27 +270,27 @@ void cUIWinMenu::OnComplexControlFocusLoss() { } -void cUIWinMenu::FontColor( const eeColorA& Color ) { +void cUIWinMenu::FontColor( const ColorA& Color ) { mFontColor = Color; } -const eeColorA& cUIWinMenu::FontColor() const { +const ColorA& cUIWinMenu::FontColor() const { return mFontColor; } -void cUIWinMenu::FontOverColor( const eeColorA& Color ) { +void cUIWinMenu::FontOverColor( const ColorA& Color ) { mFontOverColor = Color; } -const eeColorA& cUIWinMenu::FontOverColor() const { +const ColorA& cUIWinMenu::FontOverColor() const { return mFontOverColor; } -void cUIWinMenu::FontSelectedColor( const eeColorA& Color ) { +void cUIWinMenu::FontSelectedColor( const ColorA& Color ) { mFontSelectedColor = Color; } -const eeColorA& cUIWinMenu::FontSelectedColor() const { +const ColorA& cUIWinMenu::FontSelectedColor() const { return mFontSelectedColor; } diff --git a/src/eepp/ui/tools/ctextureatlaseditor.cpp b/src/eepp/ui/tools/ctextureatlaseditor.cpp index 6d919361e..7f5c2bb0d 100644 --- a/src/eepp/ui/tools/ctextureatlaseditor.cpp +++ b/src/eepp/ui/tools/ctextureatlaseditor.cpp @@ -113,7 +113,7 @@ cTextureAtlasEditor::cTextureAtlasEditor( cUIWindow * AttatchTo, const TGEditorC Params.Parent( mUIContainer ); Params.PosSet( 0, mWinMenu->Size().Height() ); Params.SizeSet( 800, 600 ); - Params.Background.Color( eeColorA( 0, 0, 0, 50 ) ); + Params.Background.Color( ColorA( 0, 0, 0, 50 ) ); Params.Flags |= UI_ANCHOR_BOTTOM | UI_ANCHOR_RIGHT | UI_CLIP_ENABLE | UI_BORDER | UI_FILL_BACKGROUND; mSubTextureEditor = eeNew( cTextureAtlasSubTextureEditor, ( Params, this ) ); mSubTextureEditor->Visible( true ); diff --git a/src/eepp/ui/tools/ctextureatlassubtextureeditor.cpp b/src/eepp/ui/tools/ctextureatlassubtextureeditor.cpp index 21930a112..31320bd8e 100644 --- a/src/eepp/ui/tools/ctextureatlassubtextureeditor.cpp +++ b/src/eepp/ui/tools/ctextureatlassubtextureeditor.cpp @@ -34,7 +34,7 @@ cTextureAtlasSubTextureEditor::~cTextureAtlasSubTextureEditor() { void cTextureAtlasSubTextureEditor::Draw() { cPrimitives P; - P.SetColor( eeColorA( 255, 0, 0, mAlpha ) ); + P.SetColor( ColorA( 255, 0, 0, mAlpha ) ); P.DrawLine( eeLine2f( eeVector2f( mScreenPos.x, mScreenPos.y + mUICenter.y ), eeVector2f( mScreenPos.x + mSize.Width(), mScreenPos.y + mUICenter.y ) ) ); P.DrawLine( eeLine2f( eeVector2f( mScreenPos.x + mUICenter.x, mScreenPos.y ), eeVector2f( mScreenPos.x + mUICenter.x, mScreenPos.y + mSize.Height() ) ) ); diff --git a/src/eepp/window/backend/SDL2/base.hpp b/src/eepp/window/backend/SDL2/base.hpp index 486728bf2..36efe956a 100644 --- a/src/eepp/window/backend/SDL2/base.hpp +++ b/src/eepp/window/backend/SDL2/base.hpp @@ -1,7 +1,7 @@ #ifndef EE_WINDOWBACKEND_BASE_SDL2_HPP #define EE_WINDOWBACKEND_BASE_SDL2_HPP -#include +#include #ifdef EE_BACKEND_SDL_ACTIVE diff --git a/src/eepp/window/backend/SDL2/cwindowsdl2.cpp b/src/eepp/window/backend/SDL2/cwindowsdl2.cpp index ea92a7b8a..99c4f889e 100644 --- a/src/eepp/window/backend/SDL2/cwindowsdl2.cpp +++ b/src/eepp/window/backend/SDL2/cwindowsdl2.cpp @@ -2,23 +2,14 @@ #ifdef EE_BACKEND_SDL2 -#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_IOS - #if !defined( EE_COMPILER_MSVC ) && EE_PLATFORM != EE_PLATFORM_IOS && !defined( EE_SDL2_FROM_ROOTPATH ) - #include - #else - #include - #endif - #undef CreateWindow -#endif - #include - #include #include #include #include #include #include +#include #include #include @@ -74,11 +65,8 @@ cWindowSDL::cWindowSDL( WindowSettings Settings, ContextSettings Context ) : cWindow( Settings, Context, eeNew( cClipboardSDL, ( this ) ), eeNew( cInputSDL, ( this ) ), eeNew( cCursorManagerSDL, ( this ) ) ), mSDLWindow( NULL ), mGLContext( NULL ), - mGLContextThread( NULL ) -#ifdef EE_USE_WMINFO - , - mWMinfo( eeNew( SDL_SysWMinfo, () ) ) -#endif + mGLContextThread( NULL ), + mWMinfo( NULL ) #if EE_PLATFORM == EE_PLATFORM_ANDROID , mZip( eeNew( Zip, () ) ) @@ -312,13 +300,13 @@ std::string cWindowSDL::GetVersion() { void cWindowSDL::CreatePlatform() { eeSAFE_DELETE( mPlatform ); + #ifdef EE_USE_WMINFO - SDL_VERSION( &mWMinfo->version ); - SDL_GetWindowWMInfo ( mSDLWindow, mWMinfo ); + mWMinfo = eeNew( WMInfo, ( mSDLWindow ) ); #endif #if defined( EE_X11_PLATFORM ) - mPlatform = eeNew( Platform::cX11Impl, ( this, mWMinfo->info.x11.display, mWMinfo->info.x11.window, mWMinfo->info.x11.window, NULL, NULL ) ); + mPlatform = eeNew( Platform::cX11Impl, ( this, mWMinfo->GetWindowHandler(), mWMinfo->GetWindow(), mWMinfo->GetWindow(), NULL, NULL ) ); #elif EE_PLATFORM == EE_PLATFORM_WIN mPlatform = eeNew( Platform::cWinImpl, ( this, GetWindowHandler() ) ); #elif EE_PLATFORM == EE_PLATFORM_MACOSX @@ -504,15 +492,11 @@ void cWindowSDL::SetGamma( Float Red, Float Green, Float Blue ) { } eeWindowHandle cWindowSDL::GetWindowHandler() { -#if EE_PLATFORM == EE_PLATFORM_WIN - return mWMinfo->info.win.window; -#elif defined( EE_X11_PLATFORM ) - return mWMinfo->info.x11.display; -#elif EE_PLATFORM == EE_PLATFORM_MACOSX - return mWMinfo->info.cocoa.window; -#else + if ( NULL != mWMinfo ) { + return mWMinfo->GetWindowHandler(); + } + return 0; -#endif } bool cWindowSDL::Icon( const std::string& Path ) { diff --git a/src/eepp/window/backend/SDL2/cwindowsdl2.hpp b/src/eepp/window/backend/SDL2/cwindowsdl2.hpp index b33ab46b3..0387b7167 100644 --- a/src/eepp/window/backend/SDL2/cwindowsdl2.hpp +++ b/src/eepp/window/backend/SDL2/cwindowsdl2.hpp @@ -7,10 +7,9 @@ #ifdef EE_BACKEND_SDL2 #include +#include -struct SDL_SysWMinfo; - -#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM ) +#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_IOS #define EE_USE_WMINFO #endif @@ -101,7 +100,7 @@ class EE_API cWindowSDL : public cWindow { SDL_GLContext mGLContextThread; #ifdef EE_USE_WMINFO - SDL_SysWMinfo * mWMinfo; + WMInfo * mWMinfo; #endif #if EE_PLATFORM == EE_PLATFORM_ANDROID diff --git a/src/eepp/window/backend/SDL2/wminfo.cpp b/src/eepp/window/backend/SDL2/wminfo.cpp new file mode 100644 index 000000000..b971674c6 --- /dev/null +++ b/src/eepp/window/backend/SDL2/wminfo.cpp @@ -0,0 +1,51 @@ +#include + +#ifdef EE_BACKEND_SDL2 + +#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_IOS + #if !defined( EE_COMPILER_MSVC ) && EE_PLATFORM != EE_PLATFORM_IOS && !defined( EE_SDL2_FROM_ROOTPATH ) + #include + #else + #include + #endif +#endif + +namespace EE { namespace Window { namespace Backend { namespace SDL2 { + +WMInfo::WMInfo( SDL_Window * win ) : + mWMInfo( eeNew( SDL_SysWMinfo, () ) ) +{ + SDL_SysWMinfo * info = static_cast ( mWMInfo ); + SDL_VERSION( &info->version ); + SDL_GetWindowWMInfo ( win, info ); +} + +WMInfo::~WMInfo() { + SDL_SysWMinfo * info = static_cast ( mWMInfo ); + eeSAFE_DELETE( info ); +} + +#if defined( EE_X11_PLATFORM ) +X11Window WMInfo::GetWindow() { + SDL_SysWMinfo * info = static_cast ( mWMInfo ); + return info->info.x11.window; +} +#endif + +eeWindowHandle WMInfo::GetWindowHandler() { + SDL_SysWMinfo * info = static_cast ( mWMInfo ); +#if EE_PLATFORM == EE_PLATFORM_WIN + return info->info.win.window; +#elif defined( EE_X11_PLATFORM ) + return info->info.x11.display; +#elif EE_PLATFORM == EE_PLATFORM_MACOSX + return info->info.cocoa.window; +#else + return 0; +#endif +} + + +}}}} + +#endif diff --git a/src/eepp/window/backend/SDL2/wminfo.hpp b/src/eepp/window/backend/SDL2/wminfo.hpp new file mode 100644 index 000000000..c9fdad065 --- /dev/null +++ b/src/eepp/window/backend/SDL2/wminfo.hpp @@ -0,0 +1,27 @@ +#ifndef EE_BACKEND_SDL2_WMINFO_HPP +#define EE_BACKEND_SDL2_WMINFO_HPP + +#include +#include + +namespace EE { namespace Window { namespace Backend { namespace SDL2 { + +class WMInfo { + public: + WMInfo( SDL_Window * win ); + + ~WMInfo(); + + #if defined( EE_X11_PLATFORM ) + X11Window GetWindow(); + #endif + + eeWindowHandle GetWindowHandler(); + protected: + void * mWMInfo; +}; + +}}}} + +#endif + diff --git a/src/eepp/window/cwindow.cpp b/src/eepp/window/cwindow.cpp index 2361e263a..e621ccbed 100644 --- a/src/eepp/window/cwindow.cpp +++ b/src/eepp/window/cwindow.cpp @@ -14,7 +14,7 @@ #include #include - +/* #ifdef EE_GLEW_AVAILABLE #if EE_PLATFORM == EE_PLATFORM_WIN #include @@ -25,7 +25,7 @@ #include #endif #endif - +*/ #ifdef EE_GLES1_LATE_INCLUDE #if EE_PLATFORM == EE_PLATFORM_IOS #include @@ -182,12 +182,12 @@ const WindowInfo * cWindow::GetWindowInfo() const { return &mWindow; } -void cWindow::BackColor( const eeColor& Color ) { +void cWindow::BackColor( const RGB& Color ) { mWindow.BackgroundColor = Color; GLi->ClearColor( static_cast( mWindow.BackgroundColor.R() ) / 255.0f, static_cast( mWindow.BackgroundColor.G() ) / 255.0f, static_cast( mWindow.BackgroundColor.B() ) / 255.0f, 255.0f ); } -const eeColor& cWindow::BackColor() const { +const RGB& cWindow::BackColor() const { return mWindow.BackgroundColor; } @@ -431,7 +431,7 @@ eeWindowContex cWindow::GetContext() const { void cWindow::GetMainContext() { #ifdef EE_GLEW_AVAILABLE - +/* #if EE_PLATFORM == EE_PLATFORM_WIN mWindow.Context = wglGetCurrentContext(); #elif defined( EE_X11_PLATFORM ) @@ -439,7 +439,7 @@ void cWindow::GetMainContext() { #elif EE_PLATFORM == EE_PLATFORM_MACOSX mWindow.Context = aglGetCurrentContext(); #endif - +*/ #endif } diff --git a/src/eepp/window/platform/win/ccursorwin.cpp b/src/eepp/window/platform/win/ccursorwin.cpp index 583798a7b..c667a9aa6 100644 --- a/src/eepp/window/platform/win/ccursorwin.cpp +++ b/src/eepp/window/platform/win/ccursorwin.cpp @@ -8,6 +8,7 @@ #include #include +#include #define WINDOWS_RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16))) @@ -81,7 +82,7 @@ static BYTE *get_dib_from_bitmap_32(cImage *bitmap) { dst = pixels + y * pitch; for (x = 0; x < w; x++) { - eeColorA C = bitmap->GetPixel( x, y ); + ColorA C = bitmap->GetPixel( x, y ); /* BGR */ dst[0] = C.B(); @@ -175,7 +176,7 @@ void cCursorWin::Create() { /* Make cursor background transparent */ for (y = 0; y < (int)mImage->Height(); y++) { for (x = 0; x < (int)mImage->Width(); x++) { - eeColorA C = mImage->GetPixel( x, y ); + ColorA C = mImage->GetPixel( x, y ); if ( C.A() != 0 ) { /* Don't touch XOR value */ diff --git a/src/eepp/window/platform/x11/ccursorx11.cpp b/src/eepp/window/platform/x11/ccursorx11.cpp index cd4926b16..62a243d23 100644 --- a/src/eepp/window/platform/x11/ccursorx11.cpp +++ b/src/eepp/window/platform/x11/ccursorx11.cpp @@ -11,6 +11,7 @@ #include #include +#include namespace EE { namespace Window { namespace Platform { @@ -55,7 +56,7 @@ void cCursorX11::Create() { c = 0; for ( iy = 0; iy < mImage->Height(); iy++ ) { for ( ix = 0; ix < mImage->Width(); ix++ ) { - eeColorA C = mImage->GetPixel( ix, iy ); + ColorA C = mImage->GetPixel( ix, iy ); image->pixels[c++] = ( C.A() << 24 ) | ( C.R() << 16 ) | ( C.G() <<8 ) | ( C.B() ); } diff --git a/src/eepp/window/platform/x11/cx11impl.hpp b/src/eepp/window/platform/x11/cx11impl.hpp index bdebe4b7c..0ac2066de 100644 --- a/src/eepp/window/platform/x11/cx11impl.hpp +++ b/src/eepp/window/platform/x11/cx11impl.hpp @@ -1,7 +1,7 @@ #ifndef EE_WINDOWCX11IMPL_HPP #define EE_WINDOWCX11IMPL_HPP -#include +#include #if defined( EE_X11_PLATFORM ) diff --git a/src/examples/empty_window/empty_window.cpp b/src/examples/empty_window/empty_window.cpp index 0e92da6c6..772be0055 100644 --- a/src/examples/empty_window/empty_window.cpp +++ b/src/examples/empty_window/empty_window.cpp @@ -11,7 +11,7 @@ void MainLoop() cPrimitives p; // Change the color - p.SetColor( eeColorA( 0, 255, 0, 150 ) ); + p.SetColor( ColorA( 0, 255, 0, 150 ) ); // Update the input win->GetInput()->Update(); @@ -38,7 +38,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) // Check if created if ( win->Created() ) { // Set window background color - win->BackColor( eeColor( 50, 50, 50 ) ); + win->BackColor( RGB( 50, 50, 50 ) ); // Set the MainLoop function and run it // This is the application loop, it will loop until the window is closed. diff --git a/src/examples/external_shader/external_shader.cpp b/src/examples/external_shader/external_shader.cpp index e5ce5a0b1..f6938395f 100644 --- a/src/examples/external_shader/external_shader.cpp +++ b/src/examples/external_shader/external_shader.cpp @@ -19,7 +19,7 @@ Float th; Float aspectRatio; eeVector3ff * vertices = eeNewArray( eeVector3ff, ParticlesNum ); eeVector3ff * velocities = eeNewArray( eeVector3ff, ParticlesNum ); -eeColorAf * colors = eeNewArray( eeColorAf, ParticlesNum ); +ColorAf * colors = eeNewArray( ColorAf, ParticlesNum ); void videoResize( cWindow * w ) { /// Video Resize event will re-setup the 2D projection and states, so we must rebuild them. @@ -189,7 +189,7 @@ void MainLoop() GLi->VertexPointer( 3, GL_FLOAT, sizeof(eeVector3ff), reinterpret_cast ( &vertices[0] ), ParticlesNum * sizeof(float) * 3 ); /// ColorPointer to "dgl_FrontColor" - GLi->ColorPointer( 4, GL_FP, sizeof(eeColorAf), reinterpret_cast ( &colors[0] ), ParticlesNum * sizeof(Float) * 4 ); + GLi->ColorPointer( 4, GL_FP, sizeof(ColorAf), reinterpret_cast ( &colors[0] ), ParticlesNum * sizeof(Float) * 4 ); /// Draw the lines GLi->DrawArrays( DM_LINES, 0, ParticlesNum ); @@ -260,7 +260,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) { vertices[i] = eeVector3ff( 0, 0, 1.83 ); velocities[i] = eeVector3ff( (Math::Randf() * 2 - 1)*.05, (Math::Randf() * 2 - 1)*.05, .93 + Math::Randf()*.02 ); - colors[i] = eeColorAf( Math::Randf() * 0.5, 0.1, 0.8, 0.5 ); + colors[i] = ColorAf( Math::Randf() * 0.5, 0.1, 0.8, 0.5 ); } /** Optimized for ARM ( pre-cache sqrt ) */ diff --git a/src/examples/fonts/fonts.cpp b/src/examples/fonts/fonts.cpp index b92cd3eb8..4fc0aaa23 100644 --- a/src/examples/fonts/fonts.cpp +++ b/src/examples/fonts/fonts.cpp @@ -51,7 +51,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) win = cEngine::instance()->CreateWindow( WindowSettings( 960, 640, "eepp - Fonts" ), ContextSettings( true ) ); // Set window background color - win->BackColor( eeColor(255,255,255) ); + win->BackColor( RGB(255,255,255) ); // Check if created if ( win->Created() ) { @@ -66,15 +66,15 @@ EE_MAIN_FUNC int main (int argc, char * argv []) TexF2 = cTextureFont::New( "conchars" ); // Load the TTF font - TTF->Load( AppPath + "assets/fonts/DejaVuSansMono.ttf", 18, TTF_STYLE_NORMAL, 128, eeColor(255,255,255), 3, eeColor(0,0,0), true ); + TTF->Load( AppPath + "assets/fonts/DejaVuSansMono.ttf", 18, TTF_STYLE_NORMAL, 128, RGB(255,255,255), 3, RGB(0,0,0), true ); // Change the default method to use for outlining the font glyphs cTTFFont::OutlineMethod = cTTFFont::OutlineFreetype; // Create the exact same font than before but using the new outlining method - TTFO->Load( AppPath + "assets/fonts/DejaVuSansMono.ttf", 18, TTF_STYLE_NORMAL, 128, eeColor(255,255,255), 3, eeColor(0,0,0), true ); + TTFO->Load( AppPath + "assets/fonts/DejaVuSansMono.ttf", 18, TTF_STYLE_NORMAL, 128, RGB(255,255,255), 3, RGB(0,0,0), true ); - TTF2->Load( AppPath + "assets/fonts/DejaVuSansMono.ttf", 24, TTF_STYLE_NORMAL, 128, eeColor(255,255,255), 0, eeColor(0,0,0), true ); + TTF2->Load( AppPath + "assets/fonts/DejaVuSansMono.ttf", 24, TTF_STYLE_NORMAL, 128, RGB(255,255,255), 0, RGB(0,0,0), true ); // Save the TTF font so then it can be loaded as a cTextureFont TTF->Save( AppPath + "assets/temp/DejaVuSansMono.png", AppPath + "assets/temp/DejaVuSansMono.fnt" ); @@ -86,7 +86,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) // Load a monospaced texture font from image ( using the texture loader to set the color key ) cTextureLoader TexLoader( AppPath + "assets/fonts/conchars.png" ); - TexLoader.SetColorKey( eeColor(0,0,0) ); + TexLoader.SetColorKey( RGB(0,0,0) ); TexLoader.Load();; TexF2->Load( TexLoader.Id(), 32 ); @@ -98,8 +98,8 @@ EE_MAIN_FUNC int main (int argc, char * argv []) TexF2->SetText( TTF->GetText() ); // Set the font color - TTF2->Color( eeColor(0,0,0) ); - TexF->Color( eeColor(0,0,0) ); + TTF2->Color( RGB(0,0,0) ); + TexF->Color( RGB(0,0,0) ); // Create a new text string String Txt( "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." ); @@ -109,7 +109,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) // Create a new text cache to draw on screen // The cached text will - TxtCache = eeNew( cTextCache, ( TTF2, Txt, eeColorA(0,0,0,255) ) ); + TxtCache = eeNew( cTextCache, ( TTF2, Txt, ColorA(0,0,0,255) ) ); // Set the text cache to be centered TxtCache->Flags( FONT_DRAW_CENTER ); @@ -120,7 +120,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) size_t size = TxtCache->Text().size(); for ( size_t i = 0; i < size; i++ ) { - TxtCache->Color( eeColorA(255*i/size,0,0,255), i, i+1 ); + TxtCache->Color( ColorA(255*i/size,0,0,255), i, i+1 ); } // Application loop diff --git a/src/examples/physics/physics.cpp b/src/examples/physics/physics.cpp index 34c2210cd..caedb5866 100644 --- a/src/examples/physics/physics.cpp +++ b/src/examples/physics/physics.cpp @@ -633,7 +633,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) if ( mWindow->Created() ) { KM = mWindow->GetInput(); - mWindow->BackColor( eeColor( 255, 255, 255 ) ); + mWindow->BackColor( RGB( 255, 255, 255 ) ); PhysicsCreate(); diff --git a/src/examples/sprites/sprites.cpp b/src/examples/sprites/sprites.cpp index 3320dda3a..d126e0d14 100644 --- a/src/examples/sprites/sprites.cpp +++ b/src/examples/sprites/sprites.cpp @@ -77,11 +77,11 @@ void MainLoop() Blindy->Draw(); // Draw the Rock Axis-Aligned Bounding Box - P.SetColor( eeColorA( 255, 255, 255, 255 ) ); + P.SetColor( ColorA( 255, 255, 255, 255 ) ); P.DrawRectangle( Rock->GetAABB() ); // Draw the Rock Quad - P.SetColor( eeColorA( 255, 0, 0, 255 ) ); + P.SetColor( ColorA( 255, 0, 0, 255 ) ); P.DrawQuad( Rock->GetQuad() ); // Draw frame diff --git a/src/examples/vbo_fbo_batch/vbo_fbo_batch.cpp b/src/examples/vbo_fbo_batch/vbo_fbo_batch.cpp index 239b4d135..64a76032c 100644 --- a/src/examples/vbo_fbo_batch/vbo_fbo_batch.cpp +++ b/src/examples/vbo_fbo_batch/vbo_fbo_batch.cpp @@ -51,7 +51,7 @@ void MainLoop() // Draw the frame buffer many times for ( int y = 0; y < 5; y++ ) { for ( int x = 0; x < 5; x++ ) { - FBO->GetTexture()->Draw( x * 200, y * 200, -ang, eeVector2f::One, eeColorA(255,255,255,100) ); + FBO->GetTexture()->Draw( x * 200, y * 200, -ang, eeVector2f::One, ColorA(255,255,255,100) ); } } @@ -84,7 +84,7 @@ void MainLoop() Float tmpy = (Float)y * 32.f; // Add the quad to the batch - Batch->QuadsSetColor( eeColorA( z * 16, 255, 255, 150 ) ); + Batch->QuadsSetColor( ColorA( z * 16, 255, 255, 150 ) ); Batch->BatchQuadFree( TmpQuad[0].x + tmpx, TmpQuad[0].y + tmpy, TmpQuad[1].x + tmpx, TmpQuad[1].y + tmpy, TmpQuad[2].x + tmpx, TmpQuad[2].y + tmpy, TmpQuad[3].x + tmpx, TmpQuad[3].y + tmpy ); } } @@ -116,7 +116,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) win = cEngine::instance()->CreateWindow( WindowSettings( 1024, 768, "eepp - VBO - FBO and Batch Rendering" ), ContextSettings( true ) ); // Set window background color - win->BackColor( eeColor( 50, 50, 50 ) ); + win->BackColor( RGB( 50, 50, 50 ) ); // Check if created if ( win->Created() ) { @@ -131,14 +131,14 @@ EE_MAIN_FUNC int main (int argc, char * argv []) if ( NULL != VBO && NULL != VBO2 ) { for ( Uint32 i = 0; i < Poly.Size(); i++ ) { VBO->AddVertex( Poly[i] ); - VBO->AddColor( eeColorA( 100 + i, 255 - i, 150 + i, 100 ) ); + VBO->AddColor( ColorA( 100 + i, 255 - i, 150 + i, 100 ) ); } Poly.Rotate( 90, Poly.ToAABB().Center() ); for ( Uint32 i = 0; i < Poly.Size(); i++ ) { VBO2->AddVertex( Poly[i] ); - VBO2->AddColor( eeColorA( 100 + i, 255 - i, 150 + i, 100 ) ); + VBO2->AddColor( ColorA( 100 + i, 255 - i, 150 + i, 100 ) ); } // Compile the Vertex Buffer, this uploads the data to the GPU diff --git a/src/test/eetest.cpp b/src/test/eetest.cpp index 2ba0cc3ec..4a17943af 100644 --- a/src/test/eetest.cpp +++ b/src/test/eetest.cpp @@ -117,7 +117,7 @@ void cEETest::Init() { mFBO = cFrameBuffer::New( 256, 256, false ); if ( NULL != mFBO ) - mFBO->ClearColor( eeColorAf( 0, 0, 0, 0.5f ) ); + mFBO->ClearColor( ColorAf( 0, 0, 0, 0.5f ) ); eePolygon2f Poly = eePolygon2f::CreateRoundedRectangle( 0, 0, 256, 50 ); @@ -126,7 +126,7 @@ void cEETest::Init() { if ( NULL != mVBO ) { for ( Uint32 i = 0; i < Poly.Size(); i++ ) { mVBO->AddVertex( Poly[i] ); - mVBO->AddColor( eeColorA( 100 + i, 255 - i, 150 + i, 200 ) ); + mVBO->AddColor( ColorA( 100 + i, 255 - i, 150 + i, 200 ) ); } mVBO->Compile(); @@ -168,12 +168,12 @@ void cEETest::LoadFonts() { mFTE.Restart(); cTextureLoader * tl = eeNew( cTextureLoader, ( MyPath + "fonts/conchars.png" ) ); - tl->SetColorKey( eeColor(0,0,0) ); + tl->SetColorKey( RGB(0,0,0) ); mFontLoader.Add( eeNew( cTextureFontLoader, ( "conchars", tl, (unsigned int)32 ) ) ); mFontLoader.Add( eeNew( cTextureFontLoader, ( "ProggySquareSZ", eeNew( cTextureLoader, ( MyPath + "fonts/ProggySquareSZ.png" ) ), MyPath + "fonts/ProggySquareSZ.dat" ) ) ); - mFontLoader.Add( eeNew( cTTFFontLoader, ( "arial", MyPath + "fonts/arial.ttf", 12, TTF_STYLE_NORMAL, 256, eeColor(255,255,255) ) ) ); - mFontLoader.Add( eeNew( cTTFFontLoader, ( "arialb", MyPath + "fonts/arial.ttf", 12, TTF_STYLE_NORMAL, 256, eeColor(255,255,255), 1, eeColor(0,0,0), true ) ) ); + mFontLoader.Add( eeNew( cTTFFontLoader, ( "arial", MyPath + "fonts/arial.ttf", 12, TTF_STYLE_NORMAL, 256, RGB(255,255,255) ) ) ); + mFontLoader.Add( eeNew( cTTFFontLoader, ( "arialb", MyPath + "fonts/arial.ttf", 12, TTF_STYLE_NORMAL, 256, RGB(255,255,255), 1, RGB(0,0,0), true ) ) ); mFontLoader.Load( cb::Make1( this, &cEETest::OnFontLoaded ) ); } @@ -198,10 +198,10 @@ void cEETest::OnFontLoaded( ResourceLoader * ObjLoaded ) { mEEText.Create( TTFB, "Entropia Engine++\nCTRL + Number to change Demo Screen\nRight click to see the PopUp Menu" ); mFBOText.Create( TTFB, "This is a VBO\nInside of a FBO" ); - mFBOText.Color( eeColorA(255,255,0,255), mFBOText.Text().find( "VBO" ), mFBOText.Text().find( "VBO" ) + 2 ); - mFBOText.Color( eeColorA(255,255,0,255), mFBOText.Text().find( "FBO" ), mFBOText.Text().find( "FBO" ) + 2 ); + mFBOText.Color( ColorA(255,255,0,255), mFBOText.Text().find( "VBO" ), mFBOText.Text().find( "VBO" ) + 2 ); + mFBOText.Color( ColorA(255,255,0,255), mFBOText.Text().find( "FBO" ), mFBOText.Text().find( "FBO" ) + 2 ); - mInfoText.Create( FF, "", eeColorA(255,255,255,150) ); + mInfoText.Create( FF, "", ColorA(255,255,255,150) ); } void cEETest::CreateShaders() { @@ -271,7 +271,7 @@ void cEETest::CreateUI() { Params.Border.Width( 2 ); Params.Border.Color( 0x979797CC ); - Params.Background.Colors( eeColorA( 0xEDEDED66 ), eeColorA( 0xEDEDEDCC ), eeColorA( 0xEDEDEDCC ), eeColorA( 0xEDEDED66 ) ); + Params.Background.Colors( ColorA( 0xEDEDED66 ), ColorA( 0xEDEDEDCC ), ColorA( 0xEDEDEDCC ), ColorA( 0xEDEDED66 ) ); cUIWindow * tWin = mTheme->CreateWindow( NULL, eeSize( 530, 405 ), eeVector2i( 320, 240 ), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DRAGABLE_CONTAINER , eeSize( 530, 405 ), 200 ); C = tWin->Container(); @@ -283,7 +283,7 @@ void cEETest::CreateUI() { Params.Flags &= ~UI_CLIP_ENABLE; Params.Background.Corners(0); - Params.Background.Colors( eeColorA( 0x00FF0077 ), eeColorA( 0x00CC0077 ), eeColorA( 0x00CC0077 ), eeColorA( 0x00FF0077 ) ); + Params.Background.Colors( ColorA( 0x00FF0077 ), ColorA( 0x00CC0077 ), ColorA( 0x00CC0077 ), ColorA( 0x00FF0077 ) ); Params.Parent( C ); Params.Size = eeSize( 50, 50 ); cUITest * Child = eeNew( cUITest, ( Params ) ); @@ -293,7 +293,7 @@ void cEETest::CreateUI() { Child->StartRotation( 0.f, 360.f, Milliseconds( 5000.f ) ); Child->RotationInterpolation()->Loop( true ); - Params.Background.Colors( eeColorA( 0xFFFF0077 ), eeColorA( 0xCCCC0077 ), eeColorA( 0xCCCC0077 ), eeColorA( 0xFFFF0077 ) ); + Params.Background.Colors( ColorA( 0xFFFF0077 ), ColorA( 0xCCCC0077 ), ColorA( 0xCCCC0077 ), ColorA( 0xFFFF0077 ) ); Params.Parent( Child ); Params.Size = eeSize( 25, 25 ); cUITest * Child2 = eeNew( cUITest, ( Params ) ); @@ -766,9 +766,9 @@ void cEETest::SetScreen( Uint32 num ) { if ( NULL != mTerrainBut ) mTerrainBut->Visible( 1 == num ); if ( 0 == num || 5 == num ) - mWindow->BackColor( eeColor( 240, 240, 240 ) ); + mWindow->BackColor( RGB( 240, 240, 240 ) ); else - mWindow->BackColor( eeColor( 0, 0, 0 ) ); + mWindow->BackColor( RGB( 0, 0, 0 ) ); if ( num < 6 ) Screen = num; @@ -844,11 +844,11 @@ void cEETest::LoadTextures() { #ifdef EE_GLES cImage tImg( MyPath + "sprites/objects/2.png", 4 ); - tImg.CreateMaskFromColor( eeColorA(0,0,0,255), 0 ); + tImg.CreateMaskFromColor( ColorA(0,0,0,255), 0 ); Tiles[7] = SG->Add( TF->LoadFromPixels( tImg.GetPixelsPtr(), tImg.Width(), tImg.Height(), tImg.Channels() ), "8" ); #else Tiles[7] = SG->Add( TF->Load( MyPath + "sprites/objects/2.png" ), "8" ); - Tiles[7]->GetTexture()->CreateMaskFromColor( eeColorA(0,0,0,255), 0 ); + Tiles[7]->GetTexture()->CreateMaskFromColor( ColorA(0,0,0,255), 0 ); #endif } @@ -875,12 +875,12 @@ void cEETest::LoadTextures() { for ( y = 0; y < h; y++) { for ( x = 0; x < w; x++) { - eeColorA C = Tex->GetPixel(x, y); + ColorA C = Tex->GetPixel(x, y); if ( C.R() > 200 && C.G() > 200 && C.B() > 200 ) - Tex->SetPixel(x, y, eeColorA( Math::Randi(0, 255), Math::Randi(0, 255), Math::Randi(0, 255), C.A() ) ); + Tex->SetPixel(x, y, ColorA( Math::Randi(0, 255), Math::Randi(0, 255), Math::Randi(0, 255), C.A() ) ); else - Tex->SetPixel(x, y, eeColorA( Math::Randi(200, 255), Math::Randi(200, 255), Math::Randi(200, 255), C.A() ) ); + Tex->SetPixel(x, y, ColorA( Math::Randi(200, 255), Math::Randi(200, 255), Math::Randi(200, 255), C.A() ) ); } } @@ -902,7 +902,7 @@ void cEETest::LoadTextures() { CL1.Scale( 0.5f ); CL2.AddFrame(TN[0], eeSizef(96, 96) ); - CL2.Color( eeColorA( 255, 255, 255, 255 ) ); + CL2.Color( ColorA( 255, 255, 255, 255 ) ); mTGL = eeNew( cTextureAtlasLoader, ( MyPath + "atlases/bnb" + EE_TEXTURE_ATLAS_EXTENSION ) ); @@ -961,7 +961,7 @@ void cEETest::Screen2() { Batch.SetTexture( TNP[2] ); Batch.QuadsBegin(); - Batch.QuadsSetColor( eeColorA(150,150,150,100) ); + Batch.QuadsSetColor( ColorA(150,150,150,100) ); Batch.QuadsSetSubset( 0.0f, 0.0f, 0.5f, 0.5f ); Batch.BatchRotation( ang ); @@ -1019,10 +1019,10 @@ void cEETest::Screen2() { if ( mUseShaders ) mShaderProgram->Unbind(); - TNP[3]->Draw( HWidth - 128, HHeight, 0, eeVector2f::One, eeColorA(255,255,255,150), ALPHA_NORMAL, RN_ISOMETRIC); - TNP[3]->Draw( HWidth - 128, HHeight - 128, 0, eeVector2f::One, eeColorA(255,255,255,50), ALPHA_NORMAL, RN_ISOMETRIC); - TNP[3]->Draw( HWidth - 128, HHeight, 0, eeVector2f::One, eeColorA(255,255,255,50), ALPHA_NORMAL, RN_ISOMETRICVERTICAL); - TNP[3]->Draw( HWidth, HHeight, 0, eeVector2f::One, eeColorA(255,255,255,50), ALPHA_NORMAL, RN_ISOMETRICVERTICALNEGATIVE); + TNP[3]->Draw( HWidth - 128, HHeight, 0, eeVector2f::One, ColorA(255,255,255,150), ALPHA_NORMAL, RN_ISOMETRIC); + TNP[3]->Draw( HWidth - 128, HHeight - 128, 0, eeVector2f::One, ColorA(255,255,255,50), ALPHA_NORMAL, RN_ISOMETRIC); + TNP[3]->Draw( HWidth - 128, HHeight, 0, eeVector2f::One, ColorA(255,255,255,50), ALPHA_NORMAL, RN_ISOMETRICVERTICAL); + TNP[3]->Draw( HWidth, HHeight, 0, eeVector2f::One, ColorA(255,255,255,50), ALPHA_NORMAL, RN_ISOMETRICVERTICALNEGATIVE); alpha = (!aside) ? alpha+et.AsMilliseconds() * 0.1f : alpha-et.AsMilliseconds() * 0.1f; if (alpha>=255) { @@ -1033,7 +1033,7 @@ void cEETest::Screen2() { aside = false; } - eeColorA Col(255,255,255,(int)alpha); + ColorA Col(255,255,255,(int)alpha); TNP[1]->DrawEx( (Float)mWindow->GetWidth() - 128.f, (Float)mWindow->GetHeight() - 128.f, 128.f, 128.f, ang, eeVector2f::One, Col, Col, Col, Col, ALPHA_BLENDONE, RN_FLIPMIRROR); SP.Position( alpha, alpha ); @@ -1043,15 +1043,15 @@ void cEETest::Screen2() { CL1.RenderMode( RN_ISOMETRIC ); if ( CL1.GetAABB().IntersectCircle( Mousef, 80.f ) ) - CL1.Color( eeColorA(255, 0, 0, 200) ); + CL1.Color( ColorA(255, 0, 0, 200) ); else - CL1.Color( eeColorA(255, 255, 255, 200) ); + CL1.Color( ColorA(255, 255, 255, 200) ); if ( eePolygon2f::IntersectQuad2( CL1.GetQuad() , CL2.GetQuad() ) ) { - CL1.Color( eeColorA(0, 255, 0, 255) ); - CL2.Color( eeColorA(0, 255, 0, 255) ); + CL1.Color( ColorA(0, 255, 0, 255) ); + CL2.Color( ColorA(0, 255, 0, 255) ); } else - CL2.Color( eeColorA(255, 255, 255, 255) ); + CL2.Color( ColorA(255, 255, 255, 255) ); CL1.Angle(ang); CL1.Scale(scale * 0.5f); @@ -1074,7 +1074,7 @@ void cEETest::Screen2() { if ( ShowParticles ) Particles(); - PR.SetColor( eeColorA(0, 255, 0, 50) ); + PR.SetColor( ColorA(0, 255, 0, 50) ); eeLine2f Line( eeVector2f(0.f, 0.f), eeVector2f( (Float)mWindow->GetWidth(), (Float)mWindow->GetHeight() ) ); eeLine2f Line2( eeVector2f(Mousef.x - 80.f, Mousef.y - 80.f), eeVector2f(Mousef.x + 80.f, Mousef.y + 80.f) ); @@ -1092,11 +1092,11 @@ void cEETest::Screen2() { iL2 = false; if (iL1 && iL2) - PR.SetColor( eeColorA(255, 0, 0, 255) ); + PR.SetColor( ColorA(255, 0, 0, 255) ); else if (iL1) - PR.SetColor( eeColorA(0, 0, 255, 255) ); + PR.SetColor( ColorA(0, 0, 255, 255) ); else if (iL2) - PR.SetColor( eeColorA(255, 255, 0, 255) ); + PR.SetColor( ColorA(255, 255, 0, 255) ); PR.FillMode( DRAW_LINE ); PR.DrawCircle( eeVector2f( Mousef.x, Mousef.y ), 80.f, (Uint32)(Ang/3) ); @@ -1105,15 +1105,15 @@ void cEETest::Screen2() { PR.DrawLine( eeLine2f( eeVector2f(Mousef.x - 80.f, Mousef.y + 80.f), eeVector2f(Mousef.x + 80.f, Mousef.y - 80.f) ) ); PR.DrawLine( eeLine2f( eeVector2f((Float)mWindow->GetWidth(), 0.f), eeVector2f( 0.f, (Float)mWindow->GetHeight() ) ) ); PR.FillMode( DRAW_FILL ); - PR.DrawQuad( eeQuad2f( eeVector2f(0.f, 0.f), eeVector2f(0.f, 100.f), eeVector2f(150.f, 150.f), eeVector2f(200.f, 150.f) ), eeColorA(220, 240, 0, 125), eeColorA(100, 0, 240, 125), eeColorA(250, 50, 25, 125), eeColorA(50, 150, 150, 125) ); + PR.DrawQuad( eeQuad2f( eeVector2f(0.f, 0.f), eeVector2f(0.f, 100.f), eeVector2f(150.f, 150.f), eeVector2f(200.f, 150.f) ), ColorA(220, 240, 0, 125), ColorA(100, 0, 240, 125), ColorA(250, 50, 25, 125), ColorA(50, 150, 150, 125) ); PR.FillMode( DRAW_LINE ); PR.DrawRectangle( eeRectf( eeVector2f( Mousef.x - 80.f, Mousef.y - 80.f ), eeSizef( 160.f, 160.f ) ), 45.f ); PR.DrawLine( eeLine2f( eeVector2f(0.f, 0.f), eeVector2f( (Float)mWindow->GetWidth(), (Float)mWindow->GetHeight() ) ) ); - TNP[3]->DrawQuadEx( eeQuad2f( eeVector2f(0.f, 0.f), eeVector2f(0.f, 100.f), eeVector2f(150.f, 150.f), eeVector2f(200.f, 150.f) ), eeVector2f(), ang, eeVector2f(scale,scale), eeColorA(220, 240, 0, 125), eeColorA(100, 0, 240, 125), eeColorA(250, 50, 25, 125), eeColorA(50, 150, 150, 125) ); + TNP[3]->DrawQuadEx( eeQuad2f( eeVector2f(0.f, 0.f), eeVector2f(0.f, 100.f), eeVector2f(150.f, 150.f), eeVector2f(200.f, 150.f) ), eeVector2f(), ang, eeVector2f(scale,scale), ColorA(220, 240, 0, 125), ColorA(100, 0, 240, 125), ColorA(250, 50, 25, 125), ColorA(50, 150, 150, 125) ); WP.Update( et ); - PR.SetColor( eeColorA(0, 255, 0, 255) ); + PR.SetColor( ColorA(0, 255, 0, 255) ); PR.DrawPoint( WP.GetPos(), 10.f ); } @@ -1218,14 +1218,14 @@ void cEETest::Render() { mWindow->ClipDisable(); } - eeColorA ColRR1( 150, 150, 150, 220 ); - eeColorA ColRR4( 150, 150, 150, 220 ); - eeColorA ColRR2( 100, 100, 100, 220 ); - eeColorA ColRR3( 100, 100, 100, 220 ); + ColorA ColRR1( 150, 150, 150, 220 ); + ColorA ColRR4( 150, 150, 150, 220 ); + ColorA ColRR2( 100, 100, 100, 220 ); + ColorA ColRR3( 100, 100, 100, 220 ); mEEText.Flags( FONT_DRAW_CENTER ); - PR.SetColor( eeColorA(150, 150, 150, 220) ); + PR.SetColor( ColorA(150, 150, 150, 220) ); PR.FillMode( DRAW_FILL ); PR.DrawRectangle( eeRectf( @@ -1526,7 +1526,7 @@ void cEETest::ParticlesCallback( cParticle * P, cParticleSystem * Me ) { x = MePos.x + radio * cos( (Float)P->Id() ); y = MePos.y + radio * sin( (Float)P->Id() ); P->Reset(x, y, Math::Randf(-10.f, 10.f), Math::Randf(-10.f, 10.f), Math::Randf(-10.f, 10.f), Math::Randf(-10.f, 10.f)); - P->Color( eeColorAf(1.f, 0.6f, 0.3f, 1.f), 0.02f + Math::Randf() * 0.3f ); + P->Color( ColorAf(1.f, 0.6f, 0.3f, 1.f), 0.02f + Math::Randf() * 0.3f ); } void cEETest::Particles() { diff --git a/src/test/eetest.hpp b/src/test/eetest.hpp index 813cb22a7..0cc7c16e0 100644 --- a/src/test/eetest.hpp +++ b/src/test/eetest.hpp @@ -11,13 +11,13 @@ class cUITest : public cUIControlAnim { virtual Uint32 OnMouseEnter( const eeVector2i& Pos, const Uint32 Flags ) { if ( 4 == mOldColor.size() ) { - mBackground->Colors( eeColorA( mOldColor[0].R(), mOldColor[0].G(), mOldColor[0].B(), 200 ), - eeColorA( mOldColor[1].R(), mOldColor[1].G(), mOldColor[1].B(), 200 ), - eeColorA( mOldColor[2].R(), mOldColor[2].G(), mOldColor[2].B(), 200 ), - eeColorA( mOldColor[3].R(), mOldColor[3].G(), mOldColor[3].B(), 200 ) + mBackground->Colors( ColorA( mOldColor[0].R(), mOldColor[0].G(), mOldColor[0].B(), 200 ), + ColorA( mOldColor[1].R(), mOldColor[1].G(), mOldColor[1].B(), 200 ), + ColorA( mOldColor[2].R(), mOldColor[2].G(), mOldColor[2].B(), 200 ), + ColorA( mOldColor[3].R(), mOldColor[3].G(), mOldColor[3].B(), 200 ) ); } else { - mBackground->Color( eeColorA( mOldColor[0].R(), mOldColor[0].G(), mOldColor[0].B(), 200 ) ); + mBackground->Color( ColorA( mOldColor[0].R(), mOldColor[0].G(), mOldColor[0].B(), 200 ) ); } return 1; @@ -50,9 +50,9 @@ class cUITest : public cUIControlAnim { return 1; } - const std::vector& OldColor() { return mOldColor; } + const std::vector& OldColor() { return mOldColor; } protected: - std::vector mOldColor; + std::vector mOldColor; }; enum CollisionTypes {