RenderType is now RenderMode.

cTextCache can now assign colors per char.
Fordward declared some classes.
cFrameBuffer constructor is now protected.
This commit is contained in:
Martín Lucas Golini
2013-01-09 16:50:00 -03:00
parent b08de8b32d
commit 47437749cd
28 changed files with 99 additions and 54 deletions

View File

@@ -67,7 +67,7 @@ class EE_API cGameObject {
Uint32 mFlags;
cLayer * mLayer;
virtual EE_RENDER_MODE RenderTypeFromFlags();
virtual EE_RENDER_MODE RenderModeFromFlags();
void AutoFixTilePos();

View File

@@ -4,8 +4,9 @@
#include <eepp/gaming/base.hpp>
#include <eepp/gaming/cgameobject.hpp>
#include <eepp/graphics/csprite.hpp>
using namespace EE::Graphics;
namespace EE { namespace Graphics {
class cSprite;
}}
namespace EE { namespace Gaming {

View File

@@ -15,8 +15,6 @@ class EE_API cFrameBuffer {
public:
static cFrameBuffer * CreateNew( const Uint32& Width, const Uint32& Height, bool DepthBuffer = false, Window::cWindow * window = NULL );
cFrameBuffer( Window::cWindow * window );
virtual ~cFrameBuffer();
virtual bool Create( const Uint32& Width, const Uint32& Height ) = 0;
@@ -40,7 +38,9 @@ class EE_API cFrameBuffer {
const Int32& GetHeight() const;
const bool& HasDepthBuffer() const;
protected:
protected:
cFrameBuffer( Window::cWindow * window );
Window::cWindow * mWindow;
Int32 mWidth;
Int32 mHeight;

View File

@@ -136,10 +136,10 @@ class EE_API cSprite {
const eeUint& CurrentSubFrame() const;
/** Set the Render Type */
void RenderType( const EE_RENDER_MODE& Effect );
void RenderMode( const EE_RENDER_MODE& Effect );
/** Get the Render Type */
const EE_RENDER_MODE& RenderType() const;
const EE_RENDER_MODE& RenderMode() const;
/** Set the Blend Mode */
void BlendMode( const EE_BLEND_MODE& Blend );
@@ -361,7 +361,7 @@ class EE_API cSprite {
eeInt mRepeations; //!< Number of repetions of the animation, default -1 that equals to loop.
EE_BLEND_MODE mBlend;
EE_BLEND_MODE mBlend;
EE_RENDER_MODE mEffect;
eeUint mCurrentFrame;

View File

@@ -45,13 +45,20 @@ class EE_API cTextCache {
const eeColorA& Color() const;
/** Set the color of the string rendered */
void Color(const eeColorA& Color);
void Color(const eeColorA& color);
/** Set the color of the substring
* @Color The color
* @from The first char to change the color
* @to The last char to change the color
*/
void Color(const eeColorA& color, Uint32 from, Uint32 to );
/** @return The Shadow Font Color */
const eeColorA& ShadowColor() const;
/** Set the shadow color of the string rendered */
void ShadowColor(const eeColorA& Color);
void ShadowColor(const eeColorA& color);
const eeInt& GetNumLines() const;
protected:

View File

@@ -5,7 +5,9 @@
#ifdef PHYSICS_RENDERER_ENABLED
#include <eepp/graphics/csprite.hpp>
namespace EE { namespace Graphics {
class cSprite;
}}
using namespace EE::Graphics;
CP_NAMESPACE_BEGIN

View File

@@ -5,7 +5,9 @@
#ifdef PHYSICS_RENDERER_ENABLED
#include <eepp/graphics/csprite.hpp>
namespace EE { namespace Graphics {
class cSprite;
}}
using namespace EE::Graphics;
CP_NAMESPACE_BEGIN

View File

@@ -22,7 +22,6 @@ using namespace EE::Window;
#include <eepp/graphics/renders.hpp>
#include <eepp/graphics/csubtexture.hpp>
#include <eepp/graphics/csprite.hpp>
#include <eepp/graphics/cfont.hpp>
#include <eepp/graphics/cprimitives.hpp>
using namespace EE::Graphics;

View File

@@ -13,11 +13,11 @@
#include <eepp/ui/cuiskinstate.hpp>
#include <eepp/ui/cuiskinsimple.hpp>
#include <eepp/ui/cuiskincomplex.hpp>
#include <eepp/ui/cuitheme.hpp>
#include <eepp/ui/cuithememanager.hpp>
namespace EE { namespace UI {
class cUITheme;
class cUIManager;
class EE_API cUIControl {

View File

@@ -44,9 +44,9 @@ class EE_API cUIGfx : public cUIComplexControl {
void Color( const eeColorA& color );
const EE_RENDER_MODE& RenderType() const;
const EE_RENDER_MODE& RenderMode() const;
void RenderType( const EE_RENDER_MODE& render );
void RenderMode( const EE_RENDER_MODE& render );
const eeVector2i& AlignOffset() const;
protected:

View File

@@ -3,6 +3,10 @@
#include <eepp/ui/cuicomplexcontrol.hpp>
namespace EE { namespace Graphics {
class cSprite;
}}
namespace EE { namespace UI {
class EE_API cUISprite : public cUIComplexControl {
@@ -44,9 +48,9 @@ class EE_API cUISprite : public cUIComplexControl {
void Color( const eeColorA& color );
const EE_RENDER_MODE& RenderType() const;
const EE_RENDER_MODE& RenderMode() const;
void RenderType( const EE_RENDER_MODE& render );
void RenderMode( const EE_RENDER_MODE& render );
const eeVector2i& AlignOffset() const;
protected:

View File

@@ -3,10 +3,14 @@
#include <eepp/ui/base.hpp>
#include <eepp/ui/uihelper.hpp>
#include <eepp/graphics/ctextureatlas.hpp>
#include <eepp/graphics/cfont.hpp>
#include <eepp/ui/cuiskin.hpp>
namespace EE { namespace Graphics {
class cSprite;
class cTextureAtlas;
class cFont;
}}
namespace EE { namespace UI {
class cUIControl;