From 41d8c861c100c2bfcf7ed4e620db21ca77e22d81 Mon Sep 17 00:00:00 2001 From: "spartanj@gmail.com" Date: Tue, 4 Dec 2012 16:01:55 -0300 Subject: [PATCH] Changed some enum names. --- include/eepp/gaming/cgameobject.hpp | 2 +- include/eepp/gaming/cgameobjectsubtextureex.hpp | 4 ++-- include/eepp/graphics/blendmode.hpp | 3 ++- include/eepp/graphics/cfont.hpp | 3 --- include/eepp/graphics/csprite.hpp | 10 +++++----- include/eepp/graphics/csubtexture.hpp | 4 ++-- include/eepp/graphics/ctexture.hpp | 6 +++--- include/eepp/graphics/cttffont.hpp | 10 +++++----- include/eepp/graphics/cttffontloader.hpp | 8 ++++---- include/eepp/graphics/fonthelper.hpp | 17 +++++++++++------ include/eepp/graphics/renders.hpp | 8 ++++---- include/eepp/ui/cuigfx.hpp | 8 ++++---- include/eepp/ui/cuisprite.hpp | 8 ++++---- include/eepp/ui/cuitheme.hpp | 4 ++-- projects/linux/ee.creator.user | 2 +- src/eepp/gaming/cgameobject.cpp | 4 ++-- src/eepp/gaming/cgameobjectsubtextureex.cpp | 2 +- src/eepp/graphics/csprite.cpp | 8 ++++---- src/eepp/graphics/csubtexture.cpp | 4 ++-- src/eepp/graphics/ctexture.cpp | 6 +++--- src/eepp/graphics/cttffont.cpp | 8 ++++---- src/eepp/graphics/cttffontloader.cpp | 6 +++--- src/eepp/ui/cuigfx.cpp | 4 ++-- src/eepp/ui/cuisprite.cpp | 4 ++-- src/eepp/ui/cuitheme.cpp | 4 ++-- 25 files changed, 75 insertions(+), 72 deletions(-) diff --git a/include/eepp/gaming/cgameobject.hpp b/include/eepp/gaming/cgameobject.hpp index 27f107e5b..1fd7da65e 100644 --- a/include/eepp/gaming/cgameobject.hpp +++ b/include/eepp/gaming/cgameobject.hpp @@ -67,7 +67,7 @@ class EE_API cGameObject { Uint32 mFlags; cLayer * mLayer; - virtual EE_RENDERTYPE RenderTypeFromFlags(); + virtual EE_RENDER_MODE RenderTypeFromFlags(); void AutoFixTilePos(); diff --git a/include/eepp/gaming/cgameobjectsubtextureex.hpp b/include/eepp/gaming/cgameobjectsubtextureex.hpp index d339acfa4..20eb9b6e9 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_RENDERTYPE Render = RN_NORMAL, eeFloat Angle = 0.f, eeFloat Scale = 1.f, 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, eeFloat Angle = 0.f, eeFloat Scale = 1.f, eeColorA Color = eeColorA() ); virtual ~cGameObjectSubTextureEx(); @@ -21,7 +21,7 @@ class EE_API cGameObjectSubTextureEx : public cGameObjectSubTexture { virtual void FlagSet( const Uint32& Flag ); protected: EE_BLEND_MODE mBlend; - EE_RENDERTYPE mRender; + EE_RENDER_MODE mRender; eeFloat mAngle; eeFloat mScale; eeColorA mColor; diff --git a/include/eepp/graphics/blendmode.hpp b/include/eepp/graphics/blendmode.hpp index 0a4730eb8..b3afc63d6 100644 --- a/include/eepp/graphics/blendmode.hpp +++ b/include/eepp/graphics/blendmode.hpp @@ -1,11 +1,12 @@ #ifndef EE_GRAPHICS_BLENDMODE_HPP #define EE_GRAPHICS_BLENDMODE_HPP +#include #include namespace EE { namespace Graphics { -class BlendMode { +class EE_API BlendMode { public: /** Set a blend function. * @param SrcFactor Source Factor diff --git a/include/eepp/graphics/cfont.hpp b/include/eepp/graphics/cfont.hpp index bfd166e31..eb9932ceb 100755 --- a/include/eepp/graphics/cfont.hpp +++ b/include/eepp/graphics/cfont.hpp @@ -8,9 +8,6 @@ namespace EE { namespace Graphics { -#define FONT_TYPE_TTF (1) -#define FONT_TYPE_TEX (2) - /** @brief Font interface class. */ class EE_API cFont { public: diff --git a/include/eepp/graphics/csprite.hpp b/include/eepp/graphics/csprite.hpp index 29cabbe6f..f061b864d 100755 --- a/include/eepp/graphics/csprite.hpp +++ b/include/eepp/graphics/csprite.hpp @@ -136,10 +136,10 @@ class EE_API cSprite { const eeUint& CurrentSubFrame() const; /** Set the Render Type */ - void RenderType( const EE_RENDERTYPE& Effect ); + void RenderType( const EE_RENDER_MODE& Effect ); /** Get the Render Type */ - const EE_RENDERTYPE& RenderType() const; + const EE_RENDER_MODE& RenderType() const; /** Set the Blend Mode */ void BlendMode( const EE_BLEND_MODE& Blend ); @@ -250,7 +250,7 @@ class EE_API cSprite { * @param Blend The Blend Mode * @param Effect The Render Type */ - void Draw( const EE_BLEND_MODE& Blend, const EE_RENDERTYPE& Effect ); + void Draw( const EE_BLEND_MODE& Blend, const EE_RENDER_MODE& Effect ); /** Draw the sprite to the screen forcing the Blend Mode * @param Blend The Blend Mode @@ -260,7 +260,7 @@ class EE_API cSprite { /** Draw the sprite to the screen forcing the Render Type * @param Effect The Render Type */ - void Draw( const EE_RENDERTYPE& Effect ); + void Draw( const EE_RENDER_MODE& Effect ); /** Set the number of repeations of the animation. Any number below 0 the animation will loop. */ void SetRepeations( const int& Repeations ); @@ -362,7 +362,7 @@ class EE_API cSprite { eeInt mRepeations; //!< Number of repetions of the animation, default -1 that equals to loop. EE_BLEND_MODE mBlend; - EE_RENDERTYPE mEffect; + EE_RENDER_MODE mEffect; eeUint mCurrentFrame; eeFloat mfCurrentFrame; diff --git a/include/eepp/graphics/csubtexture.hpp b/include/eepp/graphics/csubtexture.hpp index 0582503cd..b2077dd9b 100644 --- a/include/eepp/graphics/csubtexture.hpp +++ b/include/eepp/graphics/csubtexture.hpp @@ -51,9 +51,9 @@ class EE_API cSubTexture { void OffsetY( const Int32& offsety ); - void Draw( const eeFloat& X, const eeFloat& Y, const eeColorA& Color = eeColorA(), const eeFloat& Angle = 0.f, const eeFloat& Scale = 1.f, const EE_BLEND_MODE& Blend = ALPHA_NORMAL, const EE_RENDERTYPE& Effect = RN_NORMAL, const bool& ScaleRendered = true ); + void Draw( const eeFloat& X, const eeFloat& Y, const eeColorA& Color = eeColorA(), const eeFloat& Angle = 0.f, const eeFloat& Scale = 1.f, const EE_BLEND_MODE& Blend = ALPHA_NORMAL, const EE_RENDER_MODE& Effect = RN_NORMAL, const bool& ScaleRendered = true ); - void Draw( const eeFloat& X, const eeFloat& Y, const eeFloat& Angle, const eeFloat& 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_RENDERTYPE& Effect = RN_NORMAL, const bool& ScaleRendered = true ); + void Draw( const eeFloat& X, const eeFloat& Y, const eeFloat& Angle, const eeFloat& 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, const bool& ScaleRendered = true ); void Draw( const eeQuad2f Q, const eeFloat& X, const eeFloat& Y, const eeFloat& Angle = 0.f, const eeFloat& Scale = 1.f, const eeColorA& Color0 = eeColorA(), const eeColorA& Color1 = eeColorA(), const eeColorA& Color2 = eeColorA(), const eeColorA& Color3 = eeColorA(), const EE_BLEND_MODE& Blend = ALPHA_NORMAL ); diff --git a/include/eepp/graphics/ctexture.hpp b/include/eepp/graphics/ctexture.hpp index 56c3ba407..b4e474d34 100755 --- a/include/eepp/graphics/ctexture.hpp +++ b/include/eepp/graphics/ctexture.hpp @@ -126,7 +126,7 @@ class EE_API cTexture : public cImage { * @param ScaleCentered If true the texture will be scaled centered, otherwise will be scale from the Top - Left Corner * @param texSector The texture sector to render. You can render only a part of the texture. ( default render all the texture ) */ - void Draw( const eeFloat &x, const eeFloat &y, const eeFloat &Angle = 0, const eeFloat &Scale = 1.0f, const eeColorA& Color = eeColorA(255,255,255,255), const EE_BLEND_MODE &blend = ALPHA_NORMAL, const EE_RENDERTYPE &Effect = RN_NORMAL, const bool &ScaleCentered = true, const eeRecti& texSector = eeRecti(0,0,0,0) ); + void Draw( const eeFloat &x, const eeFloat &y, const eeFloat &Angle = 0, const eeFloat &Scale = 1.0f, const eeColorA& Color = eeColorA(255,255,255,255), const EE_BLEND_MODE &blend = ALPHA_NORMAL, const EE_RENDER_MODE &Effect = RN_NORMAL, const bool &ScaleCentered = true, 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 @@ -144,7 +144,7 @@ class EE_API cTexture : public cImage { * @param ScaleCentered If true the texture will be scaled centered, otherwise will be scale from the Top - Left Corner * @param texSector The texture sector to render. You can render only a part of the texture. ( default render all the texture ) */ - void DrawEx( const eeFloat &x, const eeFloat &y, const eeFloat &width = 0.0f, const eeFloat &height = 0.0f, const eeFloat &Angle = 0, const eeFloat &Scale = 1.0f, 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_RENDERTYPE &Effect = RN_NORMAL, const bool &ScaleCentered = true, const eeRecti& texSector = eeRecti(0,0,0,0) ); + void DrawEx( const eeFloat &x, const eeFloat &y, const eeFloat &width = 0.0f, const eeFloat &height = 0.0f, const eeFloat &Angle = 0, const eeFloat &Scale = 1.0f, 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, const bool &ScaleCentered = true, const eeRecti& texSector = eeRecti(0,0,0,0) ); /** Render the texture on screen * @param x The x position on screen @@ -159,7 +159,7 @@ class EE_API cTexture : public cImage { * @param ScaleCentered If true the texture will be scaled centered, otherwise will be scale from the Top - Left Corner * @param texSector The texture sector to render. You can render only a part of the texture. ( default render all the texture ) */ - void DrawEx2( const eeFloat &x, const eeFloat &y, const eeFloat &width = 0.0f, const eeFloat &height = 0.0f, const eeFloat &Angle = 0, const eeFloat &Scale = 1.0f, const eeColorA& Color = eeColorA(255,255,255,255), const EE_BLEND_MODE &blend = ALPHA_NORMAL, const EE_RENDERTYPE &Effect = RN_NORMAL, const bool &ScaleCentered = true, const eeRecti& texSector = eeRecti(0,0,0,0) ); + void DrawEx2( const eeFloat &x, const eeFloat &y, const eeFloat &width = 0.0f, const eeFloat &height = 0.0f, const eeFloat &Angle = 0, const eeFloat &Scale = 1.0f, const eeColorA& Color = eeColorA(255,255,255,255), const EE_BLEND_MODE &blend = ALPHA_NORMAL, const EE_RENDER_MODE &Effect = RN_NORMAL, const bool &ScaleCentered = true, const eeRecti& texSector = eeRecti(0,0,0,0) ); /** Render a GL_QUAD on Screen * @param Q The eeQuad2f diff --git a/include/eepp/graphics/cttffont.hpp b/include/eepp/graphics/cttffont.hpp index 5736618ef..5646ff9c0 100755 --- a/include/eepp/graphics/cttffont.hpp +++ b/include/eepp/graphics/cttffont.hpp @@ -30,7 +30,7 @@ class EE_API cTTFFont : public cFont { * @param OutlineColor The Outline Color * @return If success */ - bool Load( const std::string& Filepath, const eeUint& Size, EE_TTF_FONTSTYLE Style = EE_TTF_STYLE_NORMAL, const bool& VerticalDraw = false, 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 eeUint& Size, EE_TTF_FONT_STYLE Style = EE_TTF_STYLE_NORMAL, const bool& VerticalDraw = false, const Uint16& NumCharsToGen = 512, const eeColor& FontColor = eeColor(), const Uint8& OutlineSize = 0, const eeColor& OutlineColor = eeColor(0,0,0), const bool& AddPixelSeparator = true ); /** Load Font from pack * @param Pack Pointer to the pack instance @@ -44,7 +44,7 @@ class EE_API cTTFFont : public cFont { * @param OutlineColor The Outline Color * @return If success */ - bool LoadFromPack( cPack* Pack, const std::string& FilePackPath, const eeUint& Size, EE_TTF_FONTSTYLE Style = EE_TTF_STYLE_NORMAL, const bool& VerticalDraw = false, 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( cPack* Pack, const std::string& FilePackPath, const eeUint& Size, EE_TTF_FONT_STYLE Style = EE_TTF_STYLE_NORMAL, const bool& VerticalDraw = false, const Uint16& NumCharsToGen = 512, const eeColor& FontColor = eeColor(), const Uint8& OutlineSize = 0, const eeColor& OutlineColor = eeColor(0,0,0), const bool& AddPixelSeparator = true ); /** Load a True Type Font from memory * @param TTFData The pointer to the data @@ -58,7 +58,7 @@ class EE_API cTTFFont : public cFont { * @param OutlineColor The Outline Color * @return If success */ - bool LoadFromMemory( Uint8* TTFData, const eeUint& TTFDataSize, const eeUint& Size, EE_TTF_FONTSTYLE Style = EE_TTF_STYLE_NORMAL, const bool& VerticalDraw = false, 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 eeUint& TTFDataSize, const eeUint& Size, EE_TTF_FONT_STYLE Style = EE_TTF_STYLE_NORMAL, const bool& VerticalDraw = false, const Uint16& NumCharsToGen = 512, const eeColor& FontColor = eeColor(), const Uint8& OutlineSize = 0, const eeColor& OutlineColor = eeColor(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 = EE_SAVE_TYPE_PNG ); @@ -82,7 +82,7 @@ class EE_API cTTFFont : public cFont { eeColor mFontColor; eeColor mOutlineColor; - EE_TTF_FONTSTYLE mStyle; + EE_TTF_FONT_STYLE mStyle; eeFloat mTexWidth; eeFloat mTexHeight; @@ -97,7 +97,7 @@ class EE_API cTTFFont : public cFont { void UpdateLoading(); - bool iLoad( const eeUint& Size, EE_TTF_FONTSTYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, Uint8 OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ); + bool iLoad( const eeUint& Size, EE_TTF_FONT_STYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, Uint8 OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ); void MakeOutline( Uint8 *in, Uint8 *out, Int16 w, Int16 h); diff --git a/include/eepp/graphics/cttffontloader.hpp b/include/eepp/graphics/cttffontloader.hpp index 9afd70dd7..9c4c19051 100644 --- a/include/eepp/graphics/cttffontloader.hpp +++ b/include/eepp/graphics/cttffontloader.hpp @@ -14,11 +14,11 @@ namespace EE { namespace Graphics { class EE_API cTTFFontLoader : public cObjectLoader { public: - cTTFFontLoader( const std::string& FontName, const std::string& Filepath, const eeUint& Size, EE_TTF_FONTSTYLE Style = EE_TTF_STYLE_NORMAL, const bool& VerticalDraw = false, 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 eeUint& Size, EE_TTF_FONT_STYLE Style = EE_TTF_STYLE_NORMAL, const bool& VerticalDraw = false, 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, cPack * Pack, const std::string& FilePackPath, const eeUint& Size, EE_TTF_FONTSTYLE Style = EE_TTF_STYLE_NORMAL, const bool& VerticalDraw = false, 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, cPack * Pack, const std::string& FilePackPath, const eeUint& Size, EE_TTF_FONT_STYLE Style = EE_TTF_STYLE_NORMAL, const bool& VerticalDraw = false, 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 eeUint& TTFDataSize, const eeUint& Size, EE_TTF_FONTSTYLE Style = EE_TTF_STYLE_NORMAL, const bool& VerticalDraw = false, 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 eeUint& TTFDataSize, const eeUint& Size, EE_TTF_FONT_STYLE Style = EE_TTF_STYLE_NORMAL, const bool& VerticalDraw = false, const Uint16& NumCharsToGen = 512, const eeColor& FontColor = eeColor(), const Uint8& OutlineSize = 0, const eeColor& OutlineColor = eeColor(0,0,0), const bool& AddPixelSeparator = true ); ~cTTFFontLoader(); @@ -37,7 +37,7 @@ class EE_API cTTFFontLoader : public cObjectLoader { std::string mFontName; std::string mFilepath; eeUint mSize; - EE_TTF_FONTSTYLE mStyle; + EE_TTF_FONT_STYLE mStyle; bool mVerticalDraw; Uint16 mNumCharsToGen; eeColor mFontColor; diff --git a/include/eepp/graphics/fonthelper.hpp b/include/eepp/graphics/fonthelper.hpp index a185793eb..51646c3f8 100644 --- a/include/eepp/graphics/fonthelper.hpp +++ b/include/eepp/graphics/fonthelper.hpp @@ -3,24 +3,29 @@ namespace EE { namespace Graphics { -enum FONT_HALIGN { +enum EE_FONT_TYPE { + FONT_TYPE_TTF = 1, + FONT_TYPE_TEX = 2 +}; + +enum EE_FONT_HALIGN { FONT_DRAW_LEFT = (0 << 0), FONT_DRAW_RIGHT = (1 << 0), FONT_DRAW_CENTER = (2 << 0), FONT_DRAW_HALIGN_MASK = (3 << 0) }; -inline Uint32 FontHAlignGet( Uint32 Flags ) { - return Flags & FONT_DRAW_HALIGN_MASK; -} - -enum FONT_VALIGN { +enum EE_FONT_VALIGN { FONT_DRAW_TOP = (0 << 2), FONT_DRAW_BOTTOM = (1 << 2), FONT_DRAW_MIDDLE = (2 << 2), FONT_DRAW_VALIGN_MASK = (3 << 2) }; +inline Uint32 FontHAlignGet( Uint32 Flags ) { + return Flags & FONT_DRAW_HALIGN_MASK; +} + inline Uint32 FontVAlignGet( Uint32 Flags ) { return Flags & FONT_DRAW_VALIGN_MASK; } diff --git a/include/eepp/graphics/renders.hpp b/include/eepp/graphics/renders.hpp index 5a23c83b4..882c0dea4 100755 --- a/include/eepp/graphics/renders.hpp +++ b/include/eepp/graphics/renders.hpp @@ -30,8 +30,8 @@ enum EE_BLEND_MODE { ALPHA_CUSTOM //!< Disable the Predefined blend mode for the use of custom blend funcs. }; -/** @enum EE_RENDERTYPE Defines the method to use to render a texture. */ -enum EE_RENDERTYPE { +/** @enum EE_RENDER_MODE Defines the method to use to render a texture. */ +enum EE_RENDER_MODE { RN_NORMAL = 0, //!< Render the texture without any change RN_MIRROR = 1, //!< Render the texture mirrored RN_FLIP = 2, //!< Render the texture fliped @@ -50,8 +50,8 @@ enum EE_SAVE_TYPE { EE_SAVE_TYPE_DDS = 3 }; -/** @enum EE_TTF_FONTSTYLE Set the TTF Font style. */ -enum EE_TTF_FONTSTYLE { +/** @enum EE_TTF_FONT_STYLE Set the TTF Font style. */ +enum EE_TTF_FONT_STYLE { EE_TTF_STYLE_NORMAL = 0, EE_TTF_STYLE_BOLD = 1, EE_TTF_STYLE_ITALIC = 2, diff --git a/include/eepp/ui/cuigfx.hpp b/include/eepp/ui/cuigfx.hpp index 6b21cb556..7992b8274 100644 --- a/include/eepp/ui/cuigfx.hpp +++ b/include/eepp/ui/cuigfx.hpp @@ -21,7 +21,7 @@ class EE_API cUIGfx : public cUIComplexControl { cSubTexture * SubTexture; eeColorA SubTextureColor; - EE_RENDERTYPE SubTextureRender; + EE_RENDER_MODE SubTextureRender; }; cUIGfx( const cUIGfx::CreateParams& Params ); @@ -44,15 +44,15 @@ class EE_API cUIGfx : public cUIComplexControl { void Color( const eeColorA& color ); - const EE_RENDERTYPE& RenderType() const; + const EE_RENDER_MODE& RenderType() const; - void RenderType( const EE_RENDERTYPE& render ); + void RenderType( const EE_RENDER_MODE& render ); const eeVector2i& AlignOffset() const; protected: cSubTexture * mSubTexture; eeColorA mColor; - EE_RENDERTYPE mRender; + EE_RENDER_MODE mRender; eeVector2i mAlignOffset; virtual void OnSizeChange(); diff --git a/include/eepp/ui/cuisprite.hpp b/include/eepp/ui/cuisprite.hpp index 934c0b196..d260a3abf 100644 --- a/include/eepp/ui/cuisprite.hpp +++ b/include/eepp/ui/cuisprite.hpp @@ -20,7 +20,7 @@ class EE_API cUISprite : public cUIComplexControl { inline ~CreateParams() {} cSprite * Sprite; - EE_RENDERTYPE SpriteRender; + EE_RENDER_MODE SpriteRender; bool DeallocSprite; }; @@ -44,14 +44,14 @@ class EE_API cUISprite : public cUIComplexControl { void Color( const eeColorA& color ); - const EE_RENDERTYPE& RenderType() const; + const EE_RENDER_MODE& RenderType() const; - void RenderType( const EE_RENDERTYPE& render ); + void RenderType( const EE_RENDER_MODE& render ); const eeVector2i& AlignOffset() const; protected: cSprite * mSprite; - EE_RENDERTYPE mRender; + EE_RENDER_MODE mRender; eeVector2i mAlignOffset; cSubTexture * mSubTextureLast; bool mDealloc; diff --git a/include/eepp/ui/cuitheme.hpp b/include/eepp/ui/cuitheme.hpp index a209fb1c0..f24fec38b 100644 --- a/include/eepp/ui/cuitheme.hpp +++ b/include/eepp/ui/cuitheme.hpp @@ -90,9 +90,9 @@ class EE_API cUITheme : public tResourceManager { 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_RENDERTYPE 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, eeColorA SubTextureColor = eeColorA(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_RENDERTYPE SpriteRender = 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 ); virtual cUICheckBox * CreateCheckBox( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS ); diff --git a/projects/linux/ee.creator.user b/projects/linux/ee.creator.user index c752f95fa..c341c4584 100644 --- a/projects/linux/ee.creator.user +++ b/projects/linux/ee.creator.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/src/eepp/gaming/cgameobject.cpp b/src/eepp/gaming/cgameobject.cpp index 8017f3536..6bdf3eab8 100644 --- a/src/eepp/gaming/cgameobject.cpp +++ b/src/eepp/gaming/cgameobject.cpp @@ -105,8 +105,8 @@ Uint32 cGameObject::DataId() { void cGameObject::DataId( Uint32 Id ){ } -EE_RENDERTYPE cGameObject::RenderTypeFromFlags() { - EE_RENDERTYPE Render = RN_NORMAL; +EE_RENDER_MODE cGameObject::RenderTypeFromFlags() { + EE_RENDER_MODE Render = RN_NORMAL; if ( ( mFlags & GObjFlags::GAMEOBJECT_MIRRORED ) && ( mFlags & GObjFlags::GAMEOBJECT_FLIPED ) ) { Render = RN_FLIPMIRROR; diff --git a/src/eepp/gaming/cgameobjectsubtextureex.cpp b/src/eepp/gaming/cgameobjectsubtextureex.cpp index 3772dacd2..c9420b5e3 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_RENDERTYPE Render, eeFloat Angle, eeFloat Scale, eeColorA Color ) : +cGameObjectSubTextureEx::cGameObjectSubTextureEx( const Uint32& Flags, cLayer * Layer, cSubTexture * SubTexture, const eeVector2f& Pos, EE_BLEND_MODE Blend, EE_RENDER_MODE Render, eeFloat Angle, eeFloat Scale, eeColorA Color ) : cGameObjectSubTexture( Flags, Layer, SubTexture, Pos ), mBlend( Blend ), mRender( Render ), diff --git a/src/eepp/graphics/csprite.cpp b/src/eepp/graphics/csprite.cpp index e51915fd6..db2671f86 100755 --- a/src/eepp/graphics/csprite.cpp +++ b/src/eepp/graphics/csprite.cpp @@ -526,7 +526,7 @@ void cSprite::SetReverseFromStart() { mCurrentFrame = Size; } -void cSprite::Draw( const EE_BLEND_MODE& Blend, const EE_RENDERTYPE& Effect ) { +void cSprite::Draw( const EE_BLEND_MODE& Blend, const EE_RENDER_MODE& Effect ) { if ( SPR_FGET( SPRITE_FLAG_AUTO_ANIM ) ) Update(); @@ -549,7 +549,7 @@ void cSprite::Draw( const EE_BLEND_MODE& Blend ) { Draw( Blend, mEffect ); } -void cSprite::Draw( const EE_RENDERTYPE& Effect ) { +void cSprite::Draw( const EE_RENDER_MODE& Effect ) { Draw( mBlend, Effect ); } @@ -852,11 +852,11 @@ const eeUint& cSprite::CurrentSubFrame() const { return mCurrentSubFrame; } -void cSprite::RenderType( const EE_RENDERTYPE& Effect ) { +void cSprite::RenderType( const EE_RENDER_MODE& Effect ) { mEffect = Effect; } -const EE_RENDERTYPE& cSprite::RenderType() const { +const EE_RENDER_MODE& cSprite::RenderType() const { return mEffect; } diff --git a/src/eepp/graphics/csubtexture.cpp b/src/eepp/graphics/csubtexture.cpp index aa24af2fc..a245ae970 100644 --- a/src/eepp/graphics/csubtexture.cpp +++ b/src/eepp/graphics/csubtexture.cpp @@ -165,12 +165,12 @@ void cSubTexture::OffsetY( const Int32& offsety ) { mOffsetY = offsety; } -void cSubTexture::Draw( const eeFloat& X, const eeFloat& Y, const eeColorA& Color, const eeFloat& Angle, const eeFloat& Scale, const EE_BLEND_MODE& Blend, const EE_RENDERTYPE& Effect, const bool& ScaleRendered ) { +void cSubTexture::Draw( const eeFloat& X, const eeFloat& Y, const eeColorA& Color, const eeFloat& Angle, const eeFloat& Scale, const EE_BLEND_MODE& Blend, const EE_RENDER_MODE& Effect, const bool& ScaleRendered ) { if ( NULL != mTexture ) mTexture->DrawEx( X + mOffsetX, Y + mOffsetY, mDestWidth, mDestHeight, Angle, Scale, Color, Color, Color, Color, Blend, Effect, ScaleRendered, mSrcRect ); } -void cSubTexture::Draw( const eeFloat& X, const eeFloat& Y, const eeFloat& Angle, const eeFloat& Scale, const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3, const EE_BLEND_MODE& Blend, const EE_RENDERTYPE& Effect, const bool& ScaleRendered ) { +void cSubTexture::Draw( const eeFloat& X, const eeFloat& Y, const eeFloat& Angle, const eeFloat& Scale, const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3, const EE_BLEND_MODE& Blend, const EE_RENDER_MODE& Effect, const bool& ScaleRendered ) { if ( NULL != mTexture ) mTexture->DrawEx( X + mOffsetX, Y + mOffsetY, mDestWidth, mDestHeight, Angle, Scale, Color0, Color1, Color2, Color3, Blend, Effect, ScaleRendered, mSrcRect ); } diff --git a/src/eepp/graphics/ctexture.cpp b/src/eepp/graphics/ctexture.cpp index 666a43251..3a1763506 100755 --- a/src/eepp/graphics/ctexture.cpp +++ b/src/eepp/graphics/ctexture.cpp @@ -411,7 +411,7 @@ bool cTexture::Compressed() const { return 0 != ( mFlags & TEX_FLAG_COMPRESSED ); } -void cTexture::Draw( const eeFloat &x, const eeFloat &y, const eeFloat &Angle, const eeFloat &Scale, const eeColorA& Color, const EE_BLEND_MODE &blend, const EE_RENDERTYPE &Effect, const bool &ScaleCentered, const eeRecti& texSector) { +void cTexture::Draw( const eeFloat &x, const eeFloat &y, const eeFloat &Angle, const eeFloat &Scale, const eeColorA& Color, const EE_BLEND_MODE &blend, const EE_RENDER_MODE &Effect, const bool &ScaleCentered, const eeRecti& texSector) { DrawEx( x, y, 0, 0, Angle, Scale, Color, Color, Color, Color, blend, Effect, ScaleCentered, texSector); } @@ -436,7 +436,7 @@ void cTexture::DrawFast( const eeFloat& x, const eeFloat& y, const eeFloat& Angl BR->DrawOpt(); } -void cTexture::DrawEx( const eeFloat &x, const eeFloat &y, const eeFloat &width, const eeFloat &height, const eeFloat &Angle, const eeFloat &Scale, const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3, const EE_BLEND_MODE &blend, const EE_RENDERTYPE &Effect, const bool &ScaleCentered, const eeRecti& texSector) { +void cTexture::DrawEx( const eeFloat &x, const eeFloat &y, const eeFloat &width, const eeFloat &height, const eeFloat &Angle, const eeFloat &Scale, const eeColorA& Color0, const eeColorA& Color1, const eeColorA& Color2, const eeColorA& Color3, const EE_BLEND_MODE &blend, const EE_RENDER_MODE &Effect, const bool &ScaleCentered, const eeRecti& texSector) { cBatchRenderer * BR = cGlobalBatchRenderer::instance(); bool renderdiv = true; @@ -591,7 +591,7 @@ void cTexture::DrawEx( const eeFloat &x, const eeFloat &y, const eeFloat &width, BR->DrawOpt(); } -void cTexture::DrawEx2( const eeFloat &x, const eeFloat &y, const eeFloat &width, const eeFloat &height, const eeFloat &Angle, const eeFloat &Scale, const eeColorA& Color, const EE_BLEND_MODE &blend, const EE_RENDERTYPE &Effect, const bool &ScaleCentered, const eeRecti& texSector ) { +void cTexture::DrawEx2( const eeFloat &x, const eeFloat &y, const eeFloat &width, const eeFloat &height, const eeFloat &Angle, const eeFloat &Scale, const eeColorA& Color, const EE_BLEND_MODE &blend, const EE_RENDER_MODE &Effect, const bool &ScaleCentered, const eeRecti& texSector ) { DrawEx( x, y, width, height, Angle, Scale, Color, Color, Color, Color, blend, Effect, ScaleCentered, texSector ); } diff --git a/src/eepp/graphics/cttffont.cpp b/src/eepp/graphics/cttffont.cpp index 830a25215..df608a329 100755 --- a/src/eepp/graphics/cttffont.cpp +++ b/src/eepp/graphics/cttffont.cpp @@ -19,7 +19,7 @@ cTTFFont::~cTTFFont() { hkFontManager::instance()->Destroy(); } -bool cTTFFont::LoadFromPack( cPack* Pack, const std::string& FilePackPath, const eeUint& Size, EE_TTF_FONTSTYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) { +bool cTTFFont::LoadFromPack( cPack* Pack, const std::string& FilePackPath, const eeUint& Size, EE_TTF_FONT_STYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) { bool Ret = false; SafeDataPointer PData; @@ -32,7 +32,7 @@ bool cTTFFont::LoadFromPack( cPack* Pack, const std::string& FilePackPath, const return Ret; } -bool cTTFFont::LoadFromMemory( Uint8* TTFData, const eeUint& TTFDataSize, const eeUint& Size, EE_TTF_FONTSTYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) { +bool cTTFFont::LoadFromMemory( Uint8* TTFData, const eeUint& TTFDataSize, const eeUint& Size, EE_TTF_FONT_STYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) { if ( !mFilepath.size() ) mFilepath = "from memory"; @@ -43,7 +43,7 @@ bool cTTFFont::LoadFromMemory( Uint8* TTFData, const eeUint& TTFDataSize, const return iLoad( Size, Style, VerticalDraw, NumCharsToGen, FontColor, OutlineSize, OutlineColor, AddPixelSeparator ); } -bool cTTFFont::Load( const std::string& Filepath, const eeUint& Size, EE_TTF_FONTSTYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) { +bool cTTFFont::Load( const std::string& Filepath, const eeUint& Size, EE_TTF_FONT_STYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) { mFilepath = Filepath; if ( FileSystem::FileExists( Filepath ) ) { @@ -63,7 +63,7 @@ bool cTTFFont::Load( const std::string& Filepath, const eeUint& Size, EE_TTF_FON return false; } -bool cTTFFont::iLoad( const eeUint& Size, EE_TTF_FONTSTYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, Uint8 OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) { +bool cTTFFont::iLoad( const eeUint& Size, EE_TTF_FONT_STYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, Uint8 OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) { eeRect CurrentPos; eeSize GlyphRect; diff --git a/src/eepp/graphics/cttffontloader.cpp b/src/eepp/graphics/cttffontloader.cpp index 5ad30cd4d..53a9b4862 100644 --- a/src/eepp/graphics/cttffontloader.cpp +++ b/src/eepp/graphics/cttffontloader.cpp @@ -3,7 +3,7 @@ namespace EE { namespace Graphics { -cTTFFontLoader::cTTFFontLoader( const std::string& FontName, const std::string& Filepath, const eeUint& Size, EE_TTF_FONTSTYLE Style, const bool& VerticalDraw, 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 eeUint& Size, EE_TTF_FONT_STYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) : cObjectLoader( 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, cPack * Pack, const std::string& FilePackPath, const eeUint& Size, EE_TTF_FONTSTYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) : +cTTFFontLoader::cTTFFontLoader( const std::string& FontName, cPack * Pack, const std::string& FilePackPath, const eeUint& Size, EE_TTF_FONT_STYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) : cObjectLoader( FontTTFLoader ), mLoadType( TTF_LT_PACK ), mFontName( FontName ), @@ -40,7 +40,7 @@ cTTFFontLoader::cTTFFontLoader( const std::string& FontName, cPack * Pack, const Create(); } -cTTFFontLoader::cTTFFontLoader( const std::string& FontName, Uint8* TTFData, const eeUint& TTFDataSize, const eeUint& Size, EE_TTF_FONTSTYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) : +cTTFFontLoader::cTTFFontLoader( const std::string& FontName, Uint8* TTFData, const eeUint& TTFDataSize, const eeUint& Size, EE_TTF_FONT_STYLE Style, const bool& VerticalDraw, const Uint16& NumCharsToGen, const eeColor& FontColor, const Uint8& OutlineSize, const eeColor& OutlineColor, const bool& AddPixelSeparator ) : cObjectLoader( FontTTFLoader ), mLoadType( TTF_LT_MEM ), mFontName( FontName ), diff --git a/src/eepp/ui/cuigfx.cpp b/src/eepp/ui/cuigfx.cpp index 605d55a5a..19c060ce5 100644 --- a/src/eepp/ui/cuigfx.cpp +++ b/src/eepp/ui/cuigfx.cpp @@ -126,11 +126,11 @@ void cUIGfx::Color( const eeColorA& color ) { Alpha( color.A() ); } -const EE_RENDERTYPE& cUIGfx::RenderType() const { +const EE_RENDER_MODE& cUIGfx::RenderType() const { return mRender; } -void cUIGfx::RenderType( const EE_RENDERTYPE& render ) { +void cUIGfx::RenderType( const EE_RENDER_MODE& render ) { mRender = render; } diff --git a/src/eepp/ui/cuisprite.cpp b/src/eepp/ui/cuisprite.cpp index 04758c89e..d8a740e44 100644 --- a/src/eepp/ui/cuisprite.cpp +++ b/src/eepp/ui/cuisprite.cpp @@ -90,11 +90,11 @@ void cUISprite::Color( const eeColorA& color ) { Alpha( color.A() ); } -const EE_RENDERTYPE& cUISprite::RenderType() const { +const EE_RENDER_MODE& cUISprite::RenderType() const { return mRender; } -void cUISprite::RenderType( const EE_RENDERTYPE& render ) { +void cUISprite::RenderType( const EE_RENDER_MODE& render ) { mRender = render; } diff --git a/src/eepp/ui/cuitheme.cpp b/src/eepp/ui/cuitheme.cpp index c8851e74b..e1d345224 100644 --- a/src/eepp/ui/cuitheme.cpp +++ b/src/eepp/ui/cuitheme.cpp @@ -417,7 +417,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_RENDERTYPE SubTextureRender ) { +cUIGfx * cUITheme::CreateGfx( cSubTexture * SubTexture, cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, eeColorA SubTextureColor, EE_RENDER_MODE SubTextureRender ) { cUIGfx::CreateParams GfxParams; GfxParams.Parent( Parent ); GfxParams.PosSet( Pos ); @@ -432,7 +432,7 @@ cUIGfx * cUITheme::CreateGfx( cSubTexture * SubTexture, cUIControl * Parent, con return Gfx; } -cUISprite * cUITheme::CreateSprite( cSprite * Sprite, cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, bool DeallocSprite, EE_RENDERTYPE SpriteRender ) { +cUISprite * cUITheme::CreateSprite( cSprite * Sprite, cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, bool DeallocSprite, EE_RENDER_MODE SpriteRender ) { cUISprite::CreateParams SpriteParams; SpriteParams.Parent( Parent ); SpriteParams.PosSet( Pos );