From 98df342f8b11bceb251916daad3fb1e31449a9a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sat, 14 Jun 2014 17:39:35 -0300 Subject: [PATCH] Math Module refactored. --- include/eepp/audio/audiolistener.hpp | 8 +- include/eepp/audio/sound.hpp | 6 +- include/eepp/gaming/cgameobject.hpp | 10 +- include/eepp/gaming/cgameobjectobject.hpp | 22 +-- include/eepp/gaming/cgameobjectpolygon.hpp | 8 +- include/eepp/gaming/cgameobjectpolyline.hpp | 2 +- include/eepp/gaming/cgameobjectsprite.hpp | 12 +- include/eepp/gaming/cgameobjectsubtexture.hpp | 16 +- .../eepp/gaming/cgameobjectsubtextureex.hpp | 4 +- include/eepp/gaming/cgameobjectvirtual.hpp | 12 +- include/eepp/gaming/clayer.hpp | 10 +- include/eepp/gaming/clight.hpp | 12 +- include/eepp/gaming/clightmanager.hpp | 10 +- include/eepp/gaming/cmap.hpp | 84 ++++----- include/eepp/gaming/cobjectlayer.hpp | 8 +- include/eepp/gaming/ctilelayer.hpp | 22 +-- include/eepp/gaming/mapeditor/cmapeditor.hpp | 2 +- include/eepp/graphics/cbatchrenderer.hpp | 34 ++-- include/eepp/graphics/cfont.hpp | 10 +- include/eepp/graphics/cimage.hpp | 4 +- include/eepp/graphics/cparticlesystem.hpp | 32 ++-- include/eepp/graphics/cprimitives.hpp | 36 ++-- include/eepp/graphics/cscrollparallax.hpp | 32 ++-- include/eepp/graphics/cshaderprogram.hpp | 8 +- include/eepp/graphics/csprite.hpp | 40 ++--- include/eepp/graphics/csubtexture.hpp | 34 ++-- include/eepp/graphics/ctextcache.hpp | 2 +- include/eepp/graphics/ctexture.hpp | 28 +-- include/eepp/graphics/ctextureatlas.hpp | 6 +- include/eepp/graphics/cvertexbuffer.hpp | 10 +- include/eepp/graphics/pixelperfect.hpp | 4 +- include/eepp/graphics/renderer/cgl.hpp | 6 +- include/eepp/math.hpp | 8 +- .../{cinterpolation.hpp => interpolation.hpp} | 26 +-- include/eepp/math/line2.hpp | 2 +- include/eepp/math/{cmtrand.hpp => mtrand.hpp} | 10 +- include/eepp/math/originpoint.hpp | 16 +- .../{cperlinnoise.hpp => perlinnoise.hpp} | 6 +- include/eepp/math/polygon2.hpp | 2 +- include/eepp/math/quad2.hpp | 2 +- include/eepp/math/rect.hpp | 10 +- include/eepp/math/size.hpp | 4 +- include/eepp/math/triangle2.hpp | 2 +- include/eepp/math/vector2.hpp | 12 +- include/eepp/math/vector3.hpp | 8 +- .../math/{cwaypoints.hpp => waypoints.hpp} | 34 ++-- include/eepp/physics/cshapepolysprite.hpp | 2 +- include/eepp/ui/base.hpp | 4 +- include/eepp/ui/cuicheckbox.hpp | 2 +- include/eepp/ui/cuicombobox.hpp | 2 +- include/eepp/ui/cuicomplexcontrol.hpp | 18 +- include/eepp/ui/cuicontrol.hpp | 84 ++++----- include/eepp/ui/cuicontrolanim.hpp | 32 ++-- include/eepp/ui/cuidefaulttheme.hpp | 20 +-- include/eepp/ui/cuidragable.hpp | 16 +- include/eepp/ui/cuidropdownlist.hpp | 2 +- include/eepp/ui/cuieventmouse.hpp | 6 +- include/eepp/ui/cuigenericgrid.hpp | 6 +- include/eepp/ui/cuigfx.hpp | 4 +- include/eepp/ui/cuigridcell.hpp | 2 +- include/eepp/ui/cuilistbox.hpp | 18 +- include/eepp/ui/cuilistboxitem.hpp | 4 +- include/eepp/ui/cuimanager.hpp | 12 +- include/eepp/ui/cuimenu.hpp | 8 +- include/eepp/ui/cuimenucheckbox.hpp | 2 +- include/eepp/ui/cuimenuitem.hpp | 2 +- include/eepp/ui/cuimenusubmenu.hpp | 4 +- include/eepp/ui/cuiprogressbar.hpp | 16 +- include/eepp/ui/cuipushbutton.hpp | 6 +- include/eepp/ui/cuiradiobutton.hpp | 2 +- include/eepp/ui/cuispinbox.hpp | 4 +- include/eepp/ui/cuisprite.hpp | 4 +- include/eepp/ui/cuitab.hpp | 2 +- include/eepp/ui/cuitextbox.hpp | 16 +- include/eepp/ui/cuitextedit.hpp | 4 +- include/eepp/ui/cuitextinput.hpp | 8 +- include/eepp/ui/cuitheme.hpp | 50 +++--- include/eepp/ui/cuithememanager.hpp | 6 +- include/eepp/ui/cuitooltip.hpp | 12 +- include/eepp/ui/cuiwindow.hpp | 30 ++-- include/eepp/ui/tools/ctextureatlaseditor.hpp | 2 +- include/eepp/ui/tuiitemcontainer.hpp | 4 +- include/eepp/window/ccursor.hpp | 10 +- include/eepp/window/ccursormanager.hpp | 6 +- include/eepp/window/cinput.hpp | 12 +- include/eepp/window/cinputfinger.hpp | 2 +- include/eepp/window/cjoystick.hpp | 2 +- include/eepp/window/cplatformimpl.hpp | 8 +- include/eepp/window/cview.hpp | 16 +- include/eepp/window/cwindow.hpp | 12 +- projects/linux/ee.files | 16 +- src/eepp/audio/audiolistener.cpp | 12 +- src/eepp/audio/sound.cpp | 8 +- src/eepp/gaming/cgameobject.cpp | 20 +-- src/eepp/gaming/cgameobjectobject.cpp | 38 ++-- src/eepp/gaming/cgameobjectpolygon.cpp | 14 +- src/eepp/gaming/cgameobjectpolyline.cpp | 2 +- src/eepp/gaming/cgameobjectsprite.cpp | 18 +- src/eepp/gaming/cgameobjectsubtexture.cpp | 34 ++-- src/eepp/gaming/cgameobjectsubtextureex.cpp | 14 +- src/eepp/gaming/cgameobjectvirtual.cpp | 38 ++-- src/eepp/gaming/clayer.cpp | 6 +- src/eepp/gaming/clight.cpp | 14 +- src/eepp/gaming/clightmanager.cpp | 32 ++-- src/eepp/gaming/cmap.cpp | 110 ++++++------ src/eepp/gaming/cobjectlayer.cpp | 22 +-- src/eepp/gaming/ctilelayer.cpp | 34 ++-- .../gaming/mapeditor/clayerproperties.cpp | 20 +-- src/eepp/gaming/mapeditor/cmapeditor.cpp | 114 ++++++------ src/eepp/gaming/mapeditor/cmapproperties.cpp | 36 ++-- .../gaming/mapeditor/cobjectproperties.cpp | 24 +-- src/eepp/gaming/mapeditor/cuigotypenew.cpp | 10 +- src/eepp/gaming/mapeditor/cuilayernew.cpp | 10 +- src/eepp/gaming/mapeditor/cuimap.cpp | 42 ++--- src/eepp/gaming/mapeditor/cuimap.hpp | 20 +-- src/eepp/gaming/mapeditor/cuimapnew.cpp | 64 +++---- src/eepp/gaming/mapeditor/cuimapnew.hpp | 2 +- src/eepp/graphics/cbatchrenderer.cpp | 22 +-- src/eepp/graphics/cconsole.cpp | 6 +- src/eepp/graphics/cfont.cpp | 14 +- src/eepp/graphics/cimage.cpp | 6 +- src/eepp/graphics/cparticlesystem.cpp | 24 +-- src/eepp/graphics/cprimitives.cpp | 40 ++--- src/eepp/graphics/cscrollparallax.cpp | 30 ++-- src/eepp/graphics/cshaderprogram.cpp | 8 +- src/eepp/graphics/csprite.cpp | 70 ++++---- src/eepp/graphics/csubtexture.cpp | 36 ++-- src/eepp/graphics/ctextcache.cpp | 2 +- src/eepp/graphics/ctexture.cpp | 30 ++-- src/eepp/graphics/ctextureatlas.cpp | 6 +- src/eepp/graphics/ctextureatlasloader.cpp | 4 +- src/eepp/graphics/ctexturefont.cpp | 2 +- src/eepp/graphics/ctexturepackernode.cpp | 12 +- src/eepp/graphics/ctexturepackernode.hpp | 2 +- src/eepp/graphics/cttffont.cpp | 10 +- src/eepp/graphics/cvertexbuffer.cpp | 10 +- src/eepp/graphics/pixelperfect.cpp | 4 +- src/eepp/graphics/renderer/cgl.cpp | 12 +- src/eepp/graphics/renderer/crenderergl.cpp | 4 +- src/eepp/graphics/renderer/crenderergl3.cpp | 4 +- src/eepp/graphics/renderer/crenderergl3cp.cpp | 4 +- src/eepp/graphics/renderer/crenderergles2.cpp | 4 +- .../{cinterpolation.cpp => interpolation.cpp} | 64 +++---- src/eepp/math/{cmtrand.cpp => mtrand.cpp} | 50 +++--- .../{cperlinnoise.cpp => perlinnoise.cpp} | 18 +- .../math/{cwaypoints.cpp => waypoints.cpp} | 60 +++---- src/eepp/physics/cshape.cpp | 8 +- src/eepp/physics/cshapecircle.cpp | 2 +- src/eepp/physics/cshapecirclesprite.cpp | 4 +- src/eepp/physics/cshapepolysprite.cpp | 4 +- src/eepp/physics/cshapesegment.cpp | 2 +- src/eepp/ui/cuicheckbox.cpp | 10 +- src/eepp/ui/cuicombobox.cpp | 4 +- src/eepp/ui/cuicommondialog.cpp | 4 +- src/eepp/ui/cuicomplexcontrol.cpp | 14 +- src/eepp/ui/cuicontrol.cpp | 118 ++++++------- src/eepp/ui/cuicontrolanim.cpp | 62 +++---- src/eepp/ui/cuidefaulttheme.cpp | 26 +-- src/eepp/ui/cuidragable.cpp | 16 +- src/eepp/ui/cuidropdownlist.cpp | 16 +- src/eepp/ui/cuieventmouse.cpp | 4 +- src/eepp/ui/cuigenericgrid.cpp | 10 +- src/eepp/ui/cuigfx.cpp | 18 +- src/eepp/ui/cuigridcell.cpp | 6 +- src/eepp/ui/cuilistbox.cpp | 14 +- src/eepp/ui/cuilistboxitem.cpp | 4 +- src/eepp/ui/cuimanager.cpp | 14 +- src/eepp/ui/cuimenu.cpp | 26 +-- src/eepp/ui/cuimenucheckbox.cpp | 4 +- src/eepp/ui/cuimenuitem.cpp | 2 +- src/eepp/ui/cuimenusubmenu.cpp | 6 +- src/eepp/ui/cuimessagebox.cpp | 12 +- src/eepp/ui/cuiprogressbar.cpp | 14 +- src/eepp/ui/cuipushbutton.cpp | 10 +- src/eepp/ui/cuiradiobutton.cpp | 10 +- src/eepp/ui/cuiscrollbar.cpp | 2 +- src/eepp/ui/cuiskincomplex.cpp | 18 +- src/eepp/ui/cuiskinsimple.cpp | 2 +- src/eepp/ui/cuislider.cpp | 18 +- src/eepp/ui/cuispinbox.cpp | 6 +- src/eepp/ui/cuisprite.cpp | 2 +- src/eepp/ui/cuitab.cpp | 2 +- src/eepp/ui/cuitabwidget.cpp | 16 +- src/eepp/ui/cuitextbox.cpp | 22 +-- src/eepp/ui/cuitextedit.cpp | 8 +- src/eepp/ui/cuitextinput.cpp | 12 +- src/eepp/ui/cuitextinputpassword.cpp | 2 +- src/eepp/ui/cuitheme.cpp | 50 +++--- src/eepp/ui/cuithememanager.cpp | 4 +- src/eepp/ui/cuitooltip.cpp | 8 +- src/eepp/ui/cuiwindow.cpp | 58 +++--- src/eepp/ui/cuiwinmenu.cpp | 2 +- src/eepp/ui/tools/ctextureatlaseditor.cpp | 50 +++--- src/eepp/ui/tools/ctextureatlasnew.cpp | 36 ++-- src/eepp/ui/tools/ctextureatlasnew.hpp | 2 +- .../tools/ctextureatlassubtextureeditor.cpp | 12 +- .../tools/ctextureatlassubtextureeditor.hpp | 2 +- .../window/backend/SDL/ccursormanagersdl.cpp | 6 +- .../window/backend/SDL/ccursormanagersdl.hpp | 6 +- src/eepp/window/backend/SDL/ccursorsdl.cpp | 6 +- src/eepp/window/backend/SDL/ccursorsdl.hpp | 8 +- src/eepp/window/backend/SDL/cinputsdl.cpp | 2 +- src/eepp/window/backend/SDL/cjoysticksdl.cpp | 4 +- src/eepp/window/backend/SDL/cjoysticksdl.hpp | 2 +- src/eepp/window/backend/SDL/cwindowsdl.cpp | 8 +- src/eepp/window/backend/SDL/cwindowsdl.hpp | 2 +- .../backend/SDL2/ccursormanagersdl2.cpp | 6 +- .../backend/SDL2/ccursormanagersdl2.hpp | 6 +- src/eepp/window/backend/SDL2/ccursorsdl2.cpp | 6 +- src/eepp/window/backend/SDL2/ccursorsdl2.hpp | 6 +- src/eepp/window/backend/SDL2/cinputsdl2.cpp | 2 +- .../window/backend/SDL2/cjoysticksdl2.cpp | 4 +- .../window/backend/SDL2/cjoysticksdl2.hpp | 2 +- src/eepp/window/backend/SDL2/cwindowsdl2.cpp | 18 +- src/eepp/window/backend/SDL2/cwindowsdl2.hpp | 8 +- .../backend/SFML/ccursormanagersfml.cpp | 6 +- .../backend/SFML/ccursormanagersfml.hpp | 6 +- src/eepp/window/backend/SFML/ccursorsfml.cpp | 6 +- src/eepp/window/backend/SFML/ccursorsfml.hpp | 6 +- src/eepp/window/backend/SFML/cinputsfml.cpp | 2 +- .../window/backend/SFML/cjoysticksfml.cpp | 4 +- .../window/backend/SFML/cjoysticksfml.hpp | 2 +- src/eepp/window/backend/SFML/cwindowsfml.cpp | 6 +- src/eepp/window/backend/SFML/cwindowsfml.hpp | 2 +- .../backend/null/ccursormanagernull.cpp | 14 +- .../backend/null/ccursormanagernull.hpp | 6 +- src/eepp/window/backend/null/ccursornull.cpp | 6 +- src/eepp/window/backend/null/ccursornull.hpp | 6 +- .../window/backend/null/cjoysticknull.cpp | 4 +- .../window/backend/null/cjoysticknull.hpp | 2 +- src/eepp/window/backend/null/cwindownull.cpp | 4 +- src/eepp/window/backend/null/cwindownull.hpp | 2 +- src/eepp/window/ccursor.cpp | 8 +- src/eepp/window/cinput.cpp | 18 +- src/eepp/window/cinputfinger.cpp | 4 +- src/eepp/window/cview.cpp | 16 +- src/eepp/window/cwindow.cpp | 14 +- src/eepp/window/platform/null/cnullimpl.cpp | 10 +- src/eepp/window/platform/null/cnullimpl.hpp | 8 +- src/eepp/window/platform/osx/cosximpl.cpp | 10 +- src/eepp/window/platform/osx/cosximpl.hpp | 8 +- src/eepp/window/platform/win/ccursorwin.cpp | 6 +- src/eepp/window/platform/win/ccursorwin.hpp | 6 +- src/eepp/window/platform/win/cwinimpl.cpp | 10 +- src/eepp/window/platform/win/cwinimpl.hpp | 8 +- src/eepp/window/platform/x11/ccursorx11.cpp | 6 +- src/eepp/window/platform/x11/ccursorx11.hpp | 6 +- src/eepp/window/platform/x11/cx11impl.cpp | 10 +- src/eepp/window/platform/x11/cx11impl.hpp | 8 +- src/examples/empty_window/empty_window.cpp | 2 +- .../external_shader/external_shader.cpp | 12 +- src/examples/fonts/fonts.cpp | 2 +- src/examples/sprites/sprites.cpp | 10 +- src/examples/vbo_fbo_batch/vbo_fbo_batch.cpp | 18 +- src/test/eetest.cpp | 166 +++++++++--------- src/test/eetest.hpp | 14 +- 256 files changed, 1918 insertions(+), 1918 deletions(-) rename include/eepp/math/{cinterpolation.hpp => interpolation.hpp} (87%) rename include/eepp/math/{cmtrand.hpp => mtrand.hpp} (94%) rename include/eepp/math/{cperlinnoise.hpp => perlinnoise.hpp} (96%) rename include/eepp/math/{cwaypoints.hpp => waypoints.hpp} (81%) rename src/eepp/math/{cinterpolation.cpp => interpolation.cpp} (71%) rename src/eepp/math/{cmtrand.cpp => mtrand.cpp} (65%) rename src/eepp/math/{cperlinnoise.cpp => perlinnoise.cpp} (83%) rename src/eepp/math/{cwaypoints.cpp => waypoints.cpp} (73%) diff --git a/include/eepp/audio/audiolistener.hpp b/include/eepp/audio/audiolistener.hpp index 5463b0102..8efe5a7d4 100755 --- a/include/eepp/audio/audiolistener.hpp +++ b/include/eepp/audio/audiolistener.hpp @@ -20,19 +20,19 @@ class EE_API AudioListener { static void Position( const float& X, const float& Y, const float& Z ); /** Change the position of the listener from a 3D vector. */ - static void Position(const eeVector3ff& Position); + static void Position(const Vector3ff& Position); /** Get the current position of the listener */ - static eeVector3ff Position(); + static Vector3ff Position(); /** Change the orientation of the listener (the point he must look at). \n The default target is (0, 0, -1). */ static void Target( const float& X, const float& Y, const float& Z ); /** Change the orientation of the listener from a 3D vector. */ - static void Target(const eeVector3ff& Target); + static void Target(const Vector3ff& Target); /** Get the current orientation of the listener (the point he's looking at) */ - static eeVector3ff Target(); + static Vector3ff Target(); }; }} diff --git a/include/eepp/audio/sound.hpp b/include/eepp/audio/sound.hpp index 865d3fda1..a66518520 100755 --- a/include/eepp/audio/sound.hpp +++ b/include/eepp/audio/sound.hpp @@ -22,7 +22,7 @@ class EE_API Sound { ~Sound(); /** Construct the sound with a buffer. */ - Sound( const SoundBuffer& Buffer, const bool& Loop = false, const float& Pitch = 1.f, const float& Volume = 100.f, const eeVector3ff& Position = eeVector3ff(0, 0, 0) ); + Sound( const SoundBuffer& Buffer, const bool& Loop = false, const float& Pitch = 1.f, const float& Volume = 100.f, const Vector3ff& Position = Vector3ff(0, 0, 0) ); /** Copy constructor */ Sound(const Sound& Copy); @@ -52,7 +52,7 @@ class EE_API Sound { void Position( const float& X, const float& Y, const float& Z ); /** Set the Sound Position from a 3D Vector. The default position is (0, 0, 0) */ - void Position( const eeVector3ff& Position ); + void Position( const Vector3ff& Position ); /** Set the minimum distance - closer than this distance, \n the listener will hear the sound at its maximum volume. \n The default minimum distance is 1.0. */ void MinDistance( const float& MinDistance ); @@ -73,7 +73,7 @@ class EE_API Sound { float Volume() const; /** Get the Sound Position */ - eeVector3ff Position() const; + Vector3ff Position() const; /** Get the Minimun Distance */ float MinDistance() const; diff --git a/include/eepp/gaming/cgameobject.hpp b/include/eepp/gaming/cgameobject.hpp index c36ec1bc9..5ac9d69f0 100644 --- a/include/eepp/gaming/cgameobject.hpp +++ b/include/eepp/gaming/cgameobject.hpp @@ -20,15 +20,15 @@ class EE_API cGameObject { virtual void Update(); - virtual eeVector2f Pos() const; + virtual Vector2f Pos() const; - virtual void Pos( eeVector2f pos ); + virtual void Pos( Vector2f pos ); - virtual eeVector2i TilePos() const; + virtual Vector2i TilePos() const; - virtual void TilePos( eeVector2i pos ); + virtual void TilePos( Vector2i pos ); - virtual eeSize Size(); + virtual Sizei Size(); virtual Uint32 Type() const; diff --git a/include/eepp/gaming/cgameobjectobject.hpp b/include/eepp/gaming/cgameobjectobject.hpp index 4386febbe..28be80eca 100644 --- a/include/eepp/gaming/cgameobjectobject.hpp +++ b/include/eepp/gaming/cgameobjectobject.hpp @@ -14,17 +14,17 @@ class EE_API cGameObjectObject : public cGameObject { public: typedef std::map PropertiesMap; - cGameObjectObject( Uint32 DataId, const eeRectf& rect, cLayer * Layer, const Uint32& Flags = GObjFlags::GAMEOBJECT_STATIC ); + cGameObjectObject( Uint32 DataId, const Rectf& rect, cLayer * Layer, const Uint32& Flags = GObjFlags::GAMEOBJECT_STATIC ); virtual ~cGameObjectObject(); virtual void Draw(); - virtual eeVector2f Pos() const; + virtual Vector2f Pos() const; - virtual eeSize Size(); + virtual Sizei Size(); - virtual void Pos( eeVector2f pos ); + virtual void Pos( Vector2f pos ); virtual Uint32 Type() const; @@ -56,21 +56,21 @@ class EE_API cGameObjectObject : public cGameObject { void TypeName( const std::string& type ); - virtual bool PointInside( const eeVector2f& p ); + virtual bool PointInside( const Vector2f& p ); - eePolygon2f& GetPolygon(); + Polygon2f& GetPolygon(); const bool& Selected() const; void Selected( const bool& sel ); - virtual void SetPolygonPoint( Uint32 index, eeVector2f p ); + virtual void SetPolygonPoint( Uint32 index, Vector2f p ); virtual cGameObjectObject * Copy(); protected: - eeRectf mRect; - eePolygon2f mPoly; - eeVector2f mPos; + Rectf mRect; + Polygon2f mPoly; + Vector2f mPos; Uint32 mDataId; bool mSelected; std::string mName; @@ -83,7 +83,7 @@ class cGameObjectPolyData { std::string Name; std::string Type; cGameObjectObject::PropertiesMap Properties; - eePolygon2f Poly; + Polygon2f Poly; }; }} diff --git a/include/eepp/gaming/cgameobjectpolygon.hpp b/include/eepp/gaming/cgameobjectpolygon.hpp index ad59bebbc..dbfc99b46 100644 --- a/include/eepp/gaming/cgameobjectpolygon.hpp +++ b/include/eepp/gaming/cgameobjectpolygon.hpp @@ -7,21 +7,21 @@ namespace EE { namespace Gaming { class EE_API cGameObjectPolygon : public cGameObjectObject { public: - cGameObjectPolygon( Uint32 DataId, eePolygon2f poly, cLayer * Layer, const Uint32& Flags = GObjFlags::GAMEOBJECT_STATIC ); + cGameObjectPolygon( Uint32 DataId, Polygon2f poly, cLayer * Layer, const Uint32& Flags = GObjFlags::GAMEOBJECT_STATIC ); virtual ~cGameObjectPolygon(); virtual void Draw(); - virtual eeSize Size(); + virtual Sizei Size(); virtual Uint32 Type() const; virtual bool IsType( const Uint32& type ); - virtual bool PointInside( const eeVector2f& p ); + virtual bool PointInside( const Vector2f& p ); - virtual void SetPolygonPoint( Uint32 index, eeVector2f p ); + virtual void SetPolygonPoint( Uint32 index, Vector2f p ); virtual cGameObjectObject * Copy(); }; diff --git a/include/eepp/gaming/cgameobjectpolyline.hpp b/include/eepp/gaming/cgameobjectpolyline.hpp index 283110f98..254208783 100644 --- a/include/eepp/gaming/cgameobjectpolyline.hpp +++ b/include/eepp/gaming/cgameobjectpolyline.hpp @@ -7,7 +7,7 @@ namespace EE { namespace Gaming { class EE_API cGameObjectPolyline : public cGameObjectPolygon { public: - cGameObjectPolyline( Uint32 DataId, eePolygon2f poly, cLayer * Layer, const Uint32& Flags = GObjFlags::GAMEOBJECT_STATIC ); + cGameObjectPolyline( Uint32 DataId, Polygon2f poly, cLayer * Layer, const Uint32& Flags = GObjFlags::GAMEOBJECT_STATIC ); virtual ~cGameObjectPolyline(); diff --git a/include/eepp/gaming/cgameobjectsprite.hpp b/include/eepp/gaming/cgameobjectsprite.hpp index 33f881c53..0828cf818 100644 --- a/include/eepp/gaming/cgameobjectsprite.hpp +++ b/include/eepp/gaming/cgameobjectsprite.hpp @@ -18,15 +18,15 @@ class EE_API cGameObjectSprite : public cGameObject { virtual void Draw(); - eeVector2f Pos() const; + Vector2f Pos() const; - virtual void Pos( eeVector2f pos ); + virtual void Pos( Vector2f pos ); - virtual eeVector2i TilePos() const; + virtual Vector2i TilePos() const; - virtual void TilePos( eeVector2i pos ); + virtual void TilePos( Vector2i pos ); - virtual eeSize Size(); + virtual Sizei Size(); cSprite * Sprite() const; @@ -43,7 +43,7 @@ class EE_API cGameObjectSprite : public cGameObject { virtual void DataId( Uint32 Id ); protected: cSprite * mSprite; - eeVector2i mTilePos; + Vector2i mTilePos; }; }} diff --git a/include/eepp/gaming/cgameobjectsubtexture.hpp b/include/eepp/gaming/cgameobjectsubtexture.hpp index 9b0b71c73..348b26976 100644 --- a/include/eepp/gaming/cgameobjectsubtexture.hpp +++ b/include/eepp/gaming/cgameobjectsubtexture.hpp @@ -11,21 +11,21 @@ namespace EE { namespace Gaming { class EE_API cGameObjectSubTexture : public cGameObject { public: - cGameObjectSubTexture( const Uint32& Flags, cLayer * Layer, cSubTexture * SubTexture = NULL, const eeVector2f& Pos = eeVector2f() ); + cGameObjectSubTexture( const Uint32& Flags, cLayer * Layer, cSubTexture * SubTexture = NULL, const Vector2f& Pos = Vector2f() ); virtual ~cGameObjectSubTexture(); virtual void Draw(); - virtual eeVector2f Pos() const; + virtual Vector2f Pos() const; - virtual void Pos( eeVector2f pos ); + virtual void Pos( Vector2f pos ); - virtual eeVector2i TilePos() const; + virtual Vector2i TilePos() const; - virtual void TilePos( eeVector2i pos ); + virtual void TilePos( Vector2i pos ); - virtual eeSize Size(); + virtual Sizei Size(); cSubTexture * SubTexture() const; @@ -40,8 +40,8 @@ class EE_API cGameObjectSubTexture : public cGameObject { virtual void DataId( Uint32 Id ); protected: cSubTexture * mSubTexture; - eeVector2f mPos; - eeVector2i mTilePos; + Vector2f mPos; + Vector2i mTilePos; }; }} diff --git a/include/eepp/gaming/cgameobjectsubtextureex.hpp b/include/eepp/gaming/cgameobjectsubtextureex.hpp index de5c4df6d..61361562b 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, ColorA Color = ColorA() ); + cGameObjectSubTextureEx( const Uint32& Flags, cLayer * Layer, cSubTexture * SubTexture = NULL, const Vector2f& Pos = Vector2f(), EE_BLEND_MODE Blend = ALPHA_NORMAL, EE_RENDER_MODE Render = RN_NORMAL, Float Angle = 0.f, Vector2f Scale = Vector2f::One, ColorA Color = ColorA() ); virtual ~cGameObjectSubTextureEx(); @@ -23,7 +23,7 @@ class EE_API cGameObjectSubTextureEx : public cGameObjectSubTexture { EE_BLEND_MODE mBlend; EE_RENDER_MODE mRender; Float mAngle; - eeVector2f mScale; + Vector2f mScale; ColorA mColor; ColorA * mVertexColors; }; diff --git a/include/eepp/gaming/cgameobjectvirtual.hpp b/include/eepp/gaming/cgameobjectvirtual.hpp index 59a8417d3..a7f6c7b71 100644 --- a/include/eepp/gaming/cgameobjectvirtual.hpp +++ b/include/eepp/gaming/cgameobjectvirtual.hpp @@ -12,19 +12,19 @@ class cLayer; class EE_API cGameObjectVirtual : public cGameObject { public: - cGameObjectVirtual( Uint32 DataId, cLayer * Layer, const Uint32& Flags = GObjFlags::GAMEOBJECT_STATIC, Uint32 RealType = GAMEOBJECT_TYPE_VIRTUAL, const eeVector2f& Pos = eeVector2f() ); + cGameObjectVirtual( Uint32 DataId, cLayer * Layer, const Uint32& Flags = GObjFlags::GAMEOBJECT_STATIC, Uint32 RealType = GAMEOBJECT_TYPE_VIRTUAL, const Vector2f& Pos = Vector2f() ); - cGameObjectVirtual( cSubTexture * SubTexture, cLayer * Layer, const Uint32& Flags = GObjFlags::GAMEOBJECT_STATIC, Uint32 RealType = GAMEOBJECT_TYPE_VIRTUAL, const eeVector2f& Pos = eeVector2f() ); + cGameObjectVirtual( cSubTexture * SubTexture, cLayer * Layer, const Uint32& Flags = GObjFlags::GAMEOBJECT_STATIC, Uint32 RealType = GAMEOBJECT_TYPE_VIRTUAL, const Vector2f& Pos = Vector2f() ); virtual ~cGameObjectVirtual(); virtual void Draw(); - virtual eeVector2f Pos() const; + virtual Vector2f Pos() const; - virtual eeSize Size(); + virtual Sizei Size(); - virtual void Pos( eeVector2f pos ); + virtual void Pos( Vector2f pos ); virtual Uint32 Type() const; @@ -40,7 +40,7 @@ class EE_API cGameObjectVirtual : public cGameObject { protected: Uint32 mType; Uint32 mDataId; - eeVector2f mPos; + Vector2f mPos; cLayer * mLayer; cSubTexture * mSubTexture; }; diff --git a/include/eepp/gaming/clayer.hpp b/include/eepp/gaming/clayer.hpp index b831b482f..de6d07743 100644 --- a/include/eepp/gaming/clayer.hpp +++ b/include/eepp/gaming/clayer.hpp @@ -13,7 +13,7 @@ class EE_API cLayer { virtual ~cLayer(); - virtual void Draw( const eeVector2f& Offset = eeVector2f(0,0) ) = 0; + virtual void Draw( const Vector2f& Offset = Vector2f(0,0) ) = 0; virtual void Update() = 0; @@ -29,9 +29,9 @@ class EE_API cLayer { cMap * Map() const; - const eeVector2f& Offset() const; + const Vector2f& Offset() const; - void Offset( const eeVector2f& offset ); + void Offset( const Vector2f& offset ); void Name( const std::string& name ); @@ -62,12 +62,12 @@ class EE_API cLayer { cMap * mMap; Uint32 mType; Uint32 mFlags; - eeVector2f mOffset; + Vector2f mOffset; Uint32 mNameHash; std::string mName; PropertiesMap mProperties; - cLayer( cMap * map, Uint32 type, Uint32 flags, std::string name = "", eeVector2f offset = eeVector2f(0,0) ); + cLayer( cMap * map, Uint32 type, Uint32 flags, std::string name = "", Vector2f offset = Vector2f(0,0) ); }; }} diff --git a/include/eepp/gaming/clight.hpp b/include/eepp/gaming/clight.hpp index b72c0d4bd..7eca36d5f 100644 --- a/include/eepp/gaming/clight.hpp +++ b/include/eepp/gaming/clight.hpp @@ -25,15 +25,15 @@ class EE_API cLight { virtual ColorA ProcessVertex( const Float& PointX, const Float& PointY, const ColorA& VertexColor, const ColorA& BaseColor ); - RGB ProcessVertex( const eeVector2f& Pos, const RGB& VertexColor, const RGB& BaseColor ); + RGB ProcessVertex( const Vector2f& Pos, const RGB& VertexColor, const RGB& BaseColor ); - ColorA ProcessVertex( const eeVector2f& Pos, const ColorA& VertexColor, const ColorA& BaseColor ); + ColorA ProcessVertex( const Vector2f& Pos, const ColorA& VertexColor, const ColorA& BaseColor ); void Move( const Float& addtox, const Float& addtoy ); void UpdatePos( const Float& x, const Float& y ); - void UpdatePos( const eeVector2f& newPos ); + void UpdatePos( const Vector2f& newPos ); eeAABB GetAABB() const; @@ -53,12 +53,12 @@ class EE_API cLight { const LIGHT_TYPE& Type() const; - const eeVector2f& Position() const; + const Vector2f& Position() const; - void Position( const eeVector2f& newPos ); + void Position( const Vector2f& newPos ); protected: Float mRadius; - eeVector2f mPos; + Vector2f mPos; RGB mColor; LIGHT_TYPE mType; eeAABB mAABB; diff --git a/include/eepp/gaming/clightmanager.hpp b/include/eepp/gaming/clightmanager.hpp index 3e4bc40a9..4b25bc491 100644 --- a/include/eepp/gaming/clightmanager.hpp +++ b/include/eepp/gaming/clightmanager.hpp @@ -21,23 +21,23 @@ class EE_API cLightManager { void AddLight( cLight * Light ); - void RemoveLight( const eeVector2f& OverPos ); + void RemoveLight( const Vector2f& OverPos ); void RemoveLight( cLight * Light ); Uint32 Count(); - const ColorA * GetTileColor( const eeVector2i& TilePos ); + const ColorA * GetTileColor( const Vector2i& TilePos ); - const ColorA * GetTileColor( const eeVector2i& TilePos, const Uint32& Vertex ); + const ColorA * GetTileColor( const Vector2i& TilePos, const Uint32& Vertex ); - ColorA GetColorFromPos( const eeVector2f& Pos ); + ColorA GetColorFromPos( const Vector2f& Pos ); const bool& IsByVertex() const; LightsList& GetLights(); - cLight * GetLightOver( const eeVector2f& OverPos, cLight * LightCurrent = NULL ); + cLight * GetLightOver( const Vector2f& OverPos, cLight * LightCurrent = NULL ); protected: cMap * mMap; Int32 mNumVertex; diff --git a/include/eepp/gaming/cmap.hpp b/include/eepp/gaming/cmap.hpp index 6510f2de3..d67c0a20d 100644 --- a/include/eepp/gaming/cmap.hpp +++ b/include/eepp/gaming/cmap.hpp @@ -36,7 +36,7 @@ class EE_API cMap { virtual ~cMap(); - virtual void Create( eeSize Size, Uint32 MaxLayers, eeSize TileSize, Uint32 Flags = 0, eeSize viewSize = eeSize( 800, 600 ), Window::cWindow * Window = NULL ); + virtual void Create( Sizei Size, Uint32 MaxLayers, Sizei TileSize, Uint32 Flags = 0, Sizei viewSize = Sizei( 800, 600 ), Window::cWindow * Window = NULL ); virtual cLayer * AddLayer( Uint32 Type, Uint32 flags, std::string name ); @@ -64,35 +64,35 @@ class EE_API cMap { virtual void Update(); - const eeSize& TileSize() const; + const Sizei& TileSize() const; - const eeSize& Size() const; + const Sizei& Size() const; const Uint32& LayerCount() const; const Uint32& MaxLayers() const; - const eeSize& ViewSize() const; + const Sizei& ViewSize() const; - void ViewSize( const eeSize& viewSize ); + void ViewSize( const Sizei& viewSize ); - const eeVector2f& Offset() const; + const Vector2f& Offset() const; - const eeVector2f& OffsetFixed() const; + const Vector2f& OffsetFixed() const; - void Offset( const eeVector2f& offset ); + void Offset( const Vector2f& offset ); - const eeVector2i& Position() const; + const Vector2i& Position() const; - void Position( const eeVector2i& position ); + void Position( const Vector2i& position ); - void Move( const eeVector2f& offset ); + void Move( const Vector2f& offset ); void Move( const Float& offsetx, const Float& offsety ); - const eeVector2i& StartTile() const; + const Vector2i& StartTile() const; - const eeVector2i& EndTile() const; + const Vector2i& EndTile() const; const Uint32& Flags() const; @@ -134,19 +134,19 @@ class EE_API cMap { bool RemoveLayer( cLayer * Layer ); - const eeVector2i& GetMouseTilePos() const; + const Vector2i& GetMouseTilePos() const; - eeVector2i GetMouseTilePosCoords(); + Vector2i GetMouseTilePosCoords(); - eeVector2i GetTileCoords( const eeVector2i& TilePos ); + Vector2i GetTileCoords( const Vector2i& TilePos ); - const eeVector2i& GetRealMouseTilePos() const; + const Vector2i& GetRealMouseTilePos() const; - const eeVector2i& GetMouseMapPos() const; + const Vector2i& GetMouseMapPos() const; - eeVector2f GetMouseMapPosf() const; + Vector2f GetMouseMapPosf() const; - const eeSize& TotalSize() const; + const Sizei& TotalSize() const; void AddProperty( std::string Text, std::string Value ); @@ -179,9 +179,9 @@ class EE_API cMap { cLightManager * GetLightManager() const; /** Tiles to add or subtract from the real values of StartTile and EndTile ( so it will loop over more/less tiles than the required to render every tile on screen ). */ - void ExtraTiles( const eeVector2i& extra ); + void ExtraTiles( const Vector2i& extra ); - const eeVector2i& ExtraTiles() const; + const Vector2i& ExtraTiles() const; void SetDrawCallback( MapDrawCb Cb ); @@ -189,7 +189,7 @@ class EE_API cMap { cTexture * GetBlankTileTexture(); - bool IsTileBlocked( const eeVector2i& TilePos ); + bool IsTileBlocked( const Vector2i& TilePos ); void Data( void * value ); @@ -197,7 +197,7 @@ class EE_API cMap { const bool& IsMouseOver() const; - cGameObject * IsTypeInTilePos( const Uint32& Type, const eeVector2i& TilePos ); + cGameObject * IsTypeInTilePos( const Uint32& Type, const Vector2i& TilePos ); const Uint8& BackAlpha() const; @@ -211,13 +211,13 @@ class EE_API cMap { void Scale( const Float& scale ); - eeVector2i GetMaxOffset(); + Vector2i GetMaxOffset(); Uint32 GetNewObjectId(); cGameObjectPolyData& GetPolyObjData( Uint32 Id ); - void ForceHeadersOnLoad( eeSize mapSize, eeSize tileSize, Uint32 numLayers, Uint32 flags ); + void ForceHeadersOnLoad( Sizei mapSize, Sizei tileSize, Uint32 numLayers, Uint32 flags ); void DisableForcedHeaders(); @@ -230,15 +230,15 @@ class EE_API cMap { class cForcedHeaders { public: - cForcedHeaders( eeSize mapSize, eeSize tileSize, Uint32 numLayers, Uint32 flags ) : + cForcedHeaders( Sizei mapSize, Sizei tileSize, Uint32 numLayers, Uint32 flags ) : MapSize( mapSize ), TileSize( tileSize ), NumLayers( numLayers ), Flags( flags ) {} - eeSize MapSize; - eeSize TileSize; + Sizei MapSize; + Sizei TileSize; Uint32 NumLayers; Uint32 Flags; }; @@ -250,18 +250,18 @@ class EE_API cMap { Uint32 mFlags; Uint32 mMaxLayers; Uint32 mLayerCount; - eeSize mSize; - eeSize mPixelSize; - eeSize mTileSize; - eeSize mViewSize; - eeVector2f mOffset; - eeVector2i mScreenPos; - eeVector2i mStartTile; - eeVector2i mEndTile; - eeVector2i mExtraTiles; - eeVector2i mMouseOverTile; - eeVector2i mMouseOverTileFinal; - eeVector2i mMouseMapPos; + Sizei mSize; + Sizei mPixelSize; + Sizei mTileSize; + Sizei mViewSize; + Vector2f mOffset; + Vector2i mScreenPos; + Vector2i mStartTile; + Vector2i mEndTile; + Vector2i mExtraTiles; + Vector2i mMouseOverTile; + Vector2i mMouseOverTileFinal; + Vector2i mMouseMapPos; ColorA mBaseColor; PropertiesMap mProperties; GOTypesList mObjTypes; @@ -279,7 +279,7 @@ class EE_API cMap { bool mMouseOver; std::string mPath; Float mScale; - eeVector2f mOffscale; + Vector2f mOffscale; Uint32 mLastObjId; PolyObjMap mPolyObjs; cForcedHeaders* mForcedHeaders; diff --git a/include/eepp/gaming/cobjectlayer.hpp b/include/eepp/gaming/cobjectlayer.hpp index ba9e2a5e4..5e0df7528 100644 --- a/include/eepp/gaming/cobjectlayer.hpp +++ b/include/eepp/gaming/cobjectlayer.hpp @@ -21,7 +21,7 @@ class EE_API cObjectLayer : public cLayer { virtual ~cObjectLayer(); - virtual void Draw( const eeVector2f &Offset = eeVector2f(0,0) ); + virtual void Draw( const Vector2f &Offset = Vector2f(0,0) ); virtual void Update(); @@ -29,9 +29,9 @@ class EE_API cObjectLayer : public cLayer { virtual void RemoveGameObject( cGameObject * obj ); - virtual void RemoveGameObject( const eeVector2i& pos ); + virtual void RemoveGameObject( const Vector2i& pos ); - virtual cGameObject * GetObjectOver( const eeVector2i& pos, SEARCH_TYPE type = SEARCH_ALL ); + virtual cGameObject * GetObjectOver( const Vector2i& pos, SEARCH_TYPE type = SEARCH_ALL ); virtual Uint32 GetObjectCount() const; protected: @@ -39,7 +39,7 @@ class EE_API cObjectLayer : public cLayer { ObjList mObjects; - cObjectLayer( cMap * map, Uint32 flags, std::string name = "", eeVector2f offset = eeVector2f(0,0) ); + cObjectLayer( cMap * map, Uint32 flags, std::string name = "", Vector2f offset = Vector2f(0,0) ); void AllocateLayer(); diff --git a/include/eepp/gaming/ctilelayer.hpp b/include/eepp/gaming/ctilelayer.hpp index ccac46889..c1864c58d 100644 --- a/include/eepp/gaming/ctilelayer.hpp +++ b/include/eepp/gaming/ctilelayer.hpp @@ -10,31 +10,31 @@ class EE_API cTileLayer : public cLayer { public: virtual ~cTileLayer(); - virtual void Draw( const eeVector2f &Offset = eeVector2f(0,0) ); + virtual void Draw( const Vector2f &Offset = Vector2f(0,0) ); virtual void Update(); - virtual void AddGameObject( cGameObject * obj, const eeVector2i& TilePos ); + virtual void AddGameObject( cGameObject * obj, const Vector2i& TilePos ); - virtual void RemoveGameObject( const eeVector2i& TilePos ); + virtual void RemoveGameObject( const Vector2i& TilePos ); - virtual void MoveTileObject( const eeVector2i& FromPos, const eeVector2i& ToPos ); + virtual void MoveTileObject( const Vector2i& FromPos, const Vector2i& ToPos ); - virtual cGameObject * GetGameObject( const eeVector2i& TilePos ); + virtual cGameObject * GetGameObject( const Vector2i& TilePos ); - const eeVector2i& GetCurrentTile() const; + const Vector2i& GetCurrentTile() const; - eeVector2i GetTilePosFromPos( const eeVector2f& Pos ); + Vector2i GetTilePosFromPos( const Vector2f& Pos ); - eeVector2f GetPosFromTilePos( const eeVector2i& TilePos ); + Vector2f GetPosFromTilePos( const Vector2i& TilePos ); protected: friend class cMap; cGameObject*** mTiles; - eeSize mSize; - eeVector2i mCurTile; + Sizei mSize; + Vector2i mCurTile; - cTileLayer( cMap * map, eeSize size, Uint32 flags, std::string name = "", eeVector2f offset = eeVector2f(0,0) ); + cTileLayer( cMap * map, Sizei size, Uint32 flags, std::string name = "", Vector2f offset = Vector2f(0,0) ); void AllocateLayer(); diff --git a/include/eepp/gaming/mapeditor/cmapeditor.hpp b/include/eepp/gaming/mapeditor/cmapeditor.hpp index d5b0de934..3f51ce5af 100644 --- a/include/eepp/gaming/mapeditor/cmapeditor.hpp +++ b/include/eepp/gaming/mapeditor/cmapeditor.hpp @@ -184,7 +184,7 @@ class EE_API cMapEditor { void OnNewGOTypeAdded( std::string name, Uint32 hash ); - void OnAddObject( Uint32 Type, eePolygon2f poly ); + void OnAddObject( Uint32 Type, Polygon2f poly ); void UpdateGfx(); diff --git a/include/eepp/graphics/cbatchrenderer.hpp b/include/eepp/graphics/cbatchrenderer.hpp index eacdd54ca..f38dfd048 100755 --- a/include/eepp/graphics/cbatchrenderer.hpp +++ b/include/eepp/graphics/cbatchrenderer.hpp @@ -13,7 +13,7 @@ struct eeTexCoord { }; struct eeVertex { - eeVector2f pos; + Vector2f pos; eeTexCoord tex; ColorA color; }; @@ -59,28 +59,28 @@ class EE_API cBatchRenderer { Float BatchRotation() const { return mRotation; } /** Set the scale of the rendered vertex. */ - void BatchScale( const eeVector2f& Scale ) { mScale = Scale; } + void BatchScale( const Vector2f& Scale ) { mScale = Scale; } /** Set the scale of the rendered vertex. */ - void BatchScale( const Float& Scale ) { mScale = eeVector2f( Scale, Scale ); } + void BatchScale( const Float& Scale ) { mScale = Vector2f( Scale, Scale ); } /** Get the scale of the rendered vertex. */ - eeVector2f BatchScale() const { return mScale; } + Vector2f BatchScale() const { return mScale; } /** The batch position */ - void BatchPosition( const eeVector2f Pos ) { mPosition = Pos; } + void BatchPosition( const Vector2f Pos ) { mPosition = Pos; } /** @return The batch position */ - eeVector2f BatchPosition() const { return mPosition; } + Vector2f BatchPosition() const { return mPosition; } /** This will set a center position for rotating and scaling the batched vertex. */ - void BatchCenter( const eeVector2f Pos ) { mCenter = Pos; } + void BatchCenter( const Vector2f Pos ) { mCenter = Pos; } /** @return The batch center position */ - eeVector2f BatchCenter() const { return mCenter; } + Vector2f BatchCenter() const { return mCenter; } /** Add to the batch a quad ( 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 BatchQuadEx( Float x, Float y, Float width, Float height, Float angle = 0.0f, eeVector2f scale = eeVector2f::One, eeOriginPoint originPoint = eeOriginPoint(eeOriginPoint::OriginCenter) ); + void BatchQuadEx( Float x, Float y, Float width, Float height, Float angle = 0.0f, Vector2f scale = Vector2f::One, OriginPoint originPoint = OriginPoint(OriginPoint::OriginCenter) ); /** Add to the batch a quad ( 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 BatchQuad( const Float& x, const Float& y, const Float& width, const Float& height, const Float& angle = 0.0f ); @@ -143,10 +143,10 @@ class EE_API cBatchRenderer { void BatchLineLoop( const Float& x0, const Float& y0 ); /** 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 eeVector2f& vector1, const eeVector2f& vector2 ); + void BatchLineLoop( const Vector2f& vector1, const Vector2f& vector2 ); /** 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 ); + void BatchLineLoop( const Vector2f& vector1 ); /** 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(); @@ -185,7 +185,7 @@ class EE_API cBatchRenderer { 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 ); + void BatchPolygon( const Polygon2f& Polygon ); /** Set the line width */ void SetLineWidth( const Float& lineWidth ); @@ -203,7 +203,7 @@ class EE_API cBatchRenderer { void BatchPolygonByPoint( const Float& x, const Float& y ); /** Batch a poligon adding one by one vector */ - void BatchPolygonByPoint( const eeVector2f& Vector ); + void BatchPolygonByPoint( const Vector2f& Vector ); /** Foce the blending mode change, ignoring if it's the same that before ( so you can change the blend mode and restore it without problems ) */ void ForceBlendModeChange( const bool& Force ); @@ -226,9 +226,9 @@ class EE_API cBatchRenderer { EE_DRAW_MODE mCurrentMode; Float mRotation; - eeVector2f mScale; - eeVector2f mPosition; - eeVector2f mCenter; + Vector2f mScale; + Vector2f mPosition; + Vector2f mCenter; bool mForceRendering; bool mForceBlendMode; @@ -239,7 +239,7 @@ class EE_API cBatchRenderer { void AddVertexs( const unsigned int& num ); - void Rotate( const eeVector2f& center, eeVector2f* point, const Float& angle ); + void Rotate( const Vector2f& center, Vector2f* point, const Float& angle ); void SetBlendMode( EE_DRAW_MODE Mode, const bool& Force ); }; diff --git a/include/eepp/graphics/cfont.hpp b/include/eepp/graphics/cfont.hpp index 5c16b2525..c9d10617b 100755 --- a/include/eepp/graphics/cfont.hpp +++ b/include/eepp/graphics/cfont.hpp @@ -72,7 +72,7 @@ class EE_API cFont { * @param Angle The angle of the string rendered * @param Effect Set the Blend Mode ( default ALPHA_NORMAL ) */ - void Draw( const String& Text, const Float& X, const Float& Y, const Uint32& Flags = FONT_DRAW_LEFT, const eeVector2f& Scale = eeVector2f::One, const Float& Angle = 0, const EE_BLEND_MODE& Effect = ALPHA_NORMAL ); + void Draw( const String& Text, const Float& X, const Float& Y, const Uint32& Flags = FONT_DRAW_LEFT, const Vector2f& Scale = Vector2f::One, const Float& Angle = 0, const EE_BLEND_MODE& Effect = ALPHA_NORMAL ); /** Draw the string seted on the screen * @param X The start x position @@ -82,7 +82,7 @@ class EE_API cFont { * @param Angle The angle of the string rendered * @param Effect Set the Blend Mode ( default ALPHA_NORMAL ) */ - void Draw( const Float& X, const Float& Y, const Uint32& Flags = FONT_DRAW_LEFT, const eeVector2f& Scale = eeVector2f::One, const Float& Angle = 0, const EE_BLEND_MODE& Effect = ALPHA_NORMAL ); + void Draw( const Float& X, const Float& Y, const Uint32& Flags = FONT_DRAW_LEFT, const Vector2f& Scale = Vector2f::One, const Float& Angle = 0, const EE_BLEND_MODE& Effect = ALPHA_NORMAL ); /** Draw a string on the screen from a cached text * @param TextCache The cached text @@ -93,7 +93,7 @@ class EE_API cFont { * @param Angle The angle of the string rendered * @param Effect Set the Blend Mode ( default ALPHA_NORMAL ) */ - void Draw( cTextCache& TextCache, const Float& X, const Float& Y, const Uint32& Flags = FONT_DRAW_LEFT, const eeVector2f& Scale = eeVector2f::One, const Float& Angle = 0, const EE_BLEND_MODE& Effect = ALPHA_NORMAL ); + void Draw( cTextCache& TextCache, const Float& X, const Float& Y, const Uint32& Flags = FONT_DRAW_LEFT, const Vector2f& Scale = Vector2f::One, const Float& Angle = 0, const EE_BLEND_MODE& Effect = ALPHA_NORMAL ); /** Shrink the String to a max width * @param Str The string to shrink @@ -126,13 +126,13 @@ class EE_API cFont { const Uint32& Id(); /** Finds the closest cursor position to the point position */ - Int32 FindClosestCursorPosFromPoint( const String & Text, const eeVector2i& pos ); + Int32 FindClosestCursorPosFromPoint( const String & Text, const Vector2i& pos ); /** Simulates a selection request and return the initial and end cursor position when the selection worked. Otherwise both parameters will be -1. */ void SelectSubStringFromCursor( const String& Text, const Int32& CurPos, Int32& InitCur, Int32& EndCur ); /** @return The cursor position inside the string */ - eeVector2i GetCursorPos( const String& Text, const Uint32& Pos ); + Vector2i GetCursorPos( const String& Text, const Uint32& Pos ); protected: Uint32 mType; std::string mFontName; diff --git a/include/eepp/graphics/cimage.hpp b/include/eepp/graphics/cimage.hpp index 7ba904cdf..02d7a178a 100644 --- a/include/eepp/graphics/cimage.hpp +++ b/include/eepp/graphics/cimage.hpp @@ -124,7 +124,7 @@ class EE_API cImage { unsigned int MemSize() const; /** @return The image dimensions */ - eeSize Size(); + Sizei Size(); /** Save the Image to a new File in a specific format */ virtual bool SaveToFile( const std::string& filepath, const EE_SAVE_TYPE& Format ); @@ -157,7 +157,7 @@ class EE_API cImage { cImage * Thumbnail( const Uint32& maxWidth, const Uint32& maxHeight, EE_RESAMPLER_FILTER filter = RESAMPLER_LANCZOS4 ); /** Creates a cropped image from the current image */ - cImage * Crop( eeRecti rect ); + cImage * Crop( Recti rect ); /** Set as true if you dont want to free the image data in the cImage destruction ( false as default ). */ void AvoidFreeImage( const bool& AvoidFree ); diff --git a/include/eepp/graphics/cparticlesystem.hpp b/include/eepp/graphics/cparticlesystem.hpp index 4314d2f13..dfa53a9c0 100755 --- a/include/eepp/graphics/cparticlesystem.hpp +++ b/include/eepp/graphics/cparticlesystem.hpp @@ -57,15 +57,15 @@ class EE_API cParticleSystem { const EE_PARTICLE_EFFECT& Effect, const Uint32& NumParticles, const Uint32& TexId, - const eeVector2f& Pos, + const Vector2f& Pos, const Float& PartSize = 16.0f, const bool& AnimLoop = false, const Uint32& NumLoops = 1, const ColorAf& Color = ColorAf( 1.0f, 1.0f, 1.0f, 1.0f ), - const eeVector2f& Pos2 = eeVector2f( 0, 0 ), + const Vector2f& Pos2 = Vector2f( 0, 0 ), const Float& AlphaDecay = 0.01f, - const eeVector2f& Speed = eeVector2f( 0.1f, 0.1f ), - const eeVector2f& Acc = eeVector2f( 0.1f, 0.1f ) + const Vector2f& Speed = Vector2f( 0.1f, 0.1f ), + const Vector2f& Acc = Vector2f( 0.1f, 0.1f ) ); /** Draw the particles effect */ @@ -104,19 +104,19 @@ class EE_API cParticleSystem { void Position( const Float& x, const Float& y ); /** Update the effect position */ - void Position( const eeVector2f& Pos ); + void Position( const Vector2f& Pos ); /** @return The effect position */ - const eeVector2f& Position() const; + const Vector2f& Position() const; /** Update the effect position 2 */ void Position2( const Float& x, const Float& y ); /** Update the effect position 2 */ - void Position2( const eeVector2f& Pos ); + void Position2( const Vector2f& Pos ); /** @return The effect position 2 */ - const eeVector2f& Position2() const; + const Vector2f& Position2() const; /** Set a callback function for the reset effect of the particles. \n The reset it's where do you create the effect for every single particle. */ void SetCallbackReset( const ParticleCallback& pc ); @@ -140,16 +140,16 @@ class EE_API cParticleSystem { void AlphaDecay( const Float& Decay ); /** @return The Speed of the effect */ - const eeVector2f& Speed() const; + const Vector2f& Speed() const; /** Set the Speed of the effect */ - void Speed( const eeVector2f& speed ); + void Speed( const Vector2f& speed ); /** @return The Acceleration of the effect */ - const eeVector2f& Acceleration() const; + const Vector2f& Acceleration() const; /** Set The Acceleration of the effect */ - void Acceleration( const eeVector2f& acc ); + void Acceleration( const Vector2f& acc ); private: cParticle * mParticle; Uint32 mPCount; @@ -165,10 +165,10 @@ class EE_API cParticleSystem { int mProgression; int mDirection; - eeVector2f mPos; - eeVector2f mPos2; - eeVector2f mAcc; - eeVector2f mSpeed; + Vector2f mPos; + Vector2f mPos2; + Vector2f mAcc; + Vector2f mSpeed; Float mAlphaDecay; Float mSize; Float mHSize; diff --git a/include/eepp/graphics/cprimitives.hpp b/include/eepp/graphics/cprimitives.hpp index ff49e61d0..e92ddef44 100755 --- a/include/eepp/graphics/cprimitives.hpp +++ b/include/eepp/graphics/cprimitives.hpp @@ -17,50 +17,50 @@ class EE_API cPrimitives { * @param p The coordinates * @param pointSize Point Size (default 1.0f ) */ - void DrawPoint( const eeVector2f& p, const Float& pointSize = 1.0f ); + void DrawPoint( const Vector2f& p, const Float& pointSize = 1.0f ); /** Draw a Line on screen * @param line The line */ - void DrawLine( const eeLine2f& line ); + void DrawLine( const Line2f& line ); /** Draw a circle on the screen * @param p The coordinates ( x and y represents the center of the circle ) * @param radius The Circle Radius * @param points Number of points to represent the circle. If points is equal to 0 by default will use an optimized circle rendering ( precached coordinates ). */ - void DrawCircle( const eeVector2f& p, const Float& radius, Uint32 points = 0 ); + void DrawCircle( const Vector2f& p, const Float& radius, Uint32 points = 0 ); /** Draw a triangle on the screen - * @param t The Triangle (eeTriangle2f) + * @param t The Triangle (Triangle2f) */ - void DrawTriangle( const eeTriangle2f& t ); + void DrawTriangle( const Triangle2f& t ); /** Draw a triangle on the screen setting per vertex color - * @param t The Triangle (eeTriangle2f) + * @param t The Triangle (Triangle2f) * @param Color1 First Point Color * @param Color2 Second Point Color * @param Color3 Third Point Color */ - void DrawTriangle( const eeTriangle2f& t, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3 ); + void DrawTriangle( const Triangle2f& t, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3 ); /** Draw a rectangle on the screen - * @param R The Rectangle eeRectf + * @param R The Rectangle Rectf * @param Angle Rectangle Angle * @param Scale Rectangle Scale ( default 1.0f ) */ - void DrawRectangle( const eeRectf& R, const Float& Angle = 0, const eeVector2f& Scale = eeVector2f::One ); + void DrawRectangle( const Rectf& R, const Float& Angle = 0, const Vector2f& Scale = Vector2f::One ); /** Draw a rounded rectangle on the screen - * @param R The Rectangle eeRectf + * @param R The Rectangle Rectf * @param Angle Rectangle Angle * @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 Float& Angle = 0, const eeVector2f& Scale = eeVector2f::One, const unsigned int& Corners = 8 ); + void DrawRoundedRectangle( const Rectf& R, const Float& Angle = 0, const Vector2f& Scale = Vector2f::One, const unsigned int& Corners = 8 ); /** Draw a rectangle on the screen setting per vertex color - * @param R The Rectangle eeRectf + * @param R The Rectangle Rectf * @param TopLeft The Top Left Rectangle Color * @param BottomLeft The Bottom Left Rectangle Color * @param BottomRight The Bottom Right Rectangle Color @@ -68,10 +68,10 @@ class EE_API cPrimitives { * @param Angle Rectangle Angle * @param Scale Rectangle Scale ( default 1.0f ) */ - 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 ); + void DrawRectangle( const Rectf& R, const ColorA& TopLeft, const ColorA& BottomLeft, const ColorA& BottomRight, const ColorA& TopRight, const Float& Angle = 0, const Vector2f& Scale = Vector2f::One ); /** Draw a rounded rectangle on the screen setting per vertex color - * @param R The Rectangle eeRectf + * @param R The Rectangle Rectf * @param TopLeft The Top Left Rectangle Color * @param BottomLeft The Bottom Left Rectangle Color * @param BottomRight The Bottom Right Rectangle Color @@ -80,14 +80,14 @@ 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 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 ); + void DrawRoundedRectangle( const Rectf& R, const ColorA& TopLeft, const ColorA& BottomLeft, const ColorA& BottomRight, const ColorA& TopRight, const Float& Angle = 0, const Vector2f& Scale = Vector2f::One, const unsigned int& Corners = 8 ); /** Draw a four edges polygon on screen * @param q The Quad * @param OffsetX X offset for the quad * @param OffsetY Y offset for the quad */ - void DrawQuad( const eeQuad2f& q, const Float& OffsetX = 0, const Float& OffsetY = 0 ); + void DrawQuad( const Quad2f& q, const Float& OffsetX = 0, const Float& OffsetY = 0 ); /** Draw a four edges polygon on screen * @param q The Quad @@ -98,12 +98,12 @@ class EE_API cPrimitives { * @param OffsetX X offset for the quad * @param OffsetY Y offset for the quad */ - 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 ); + void DrawQuad( const Quad2f& 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 */ - void DrawPolygon( const eePolygon2f& p ); + void DrawPolygon( const Polygon2f& p ); /** Set the current color for drawing primitives */ void SetColor( const ColorA& Color ); diff --git a/include/eepp/graphics/cscrollparallax.hpp b/include/eepp/graphics/cscrollparallax.hpp index 7d58dbfc9..f8637c30c 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 ColorA& Color = ColorA(), const EE_BLEND_MODE& Blend = ALPHA_NORMAL ); + cScrollParallax( cSubTexture * SubTexture, const Vector2f& Position = Vector2f(), const Sizef& Size = Sizef(), const Vector2f& Speed = Vector2f(), const ColorA& Color = ColorA(), const EE_BLEND_MODE& Blend = ALPHA_NORMAL ); /** Create's the Scroll Parallax * @param SubTexture The SubTexture to Draw @@ -34,7 +34,7 @@ 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 ColorA& Color = ColorA(), const EE_BLEND_MODE& Blend = ALPHA_NORMAL ); + bool Create( cSubTexture * SubTexture, const Vector2f& Position = Vector2f(), const Sizef& Size = Sizef(), const Vector2f& Speed = Vector2f(), const ColorA& Color = ColorA(), const EE_BLEND_MODE& Blend = ALPHA_NORMAL ); /** Set the parallax texture color. */ void Color( const ColorA& Color ) { mColor = Color; } @@ -53,17 +53,17 @@ class EE_API cScrollParallax { /** Change the size of the current parallax * @param size The new size */ - void Size( const eeSizef& size ); + void Size( const Sizef& size ); /** @return Size */ - const eeSizef& Size() const; + const Sizef& Size() const; /** Change the Parallax position * @param Pos The new parallax position */ - void Position( const eeVector2f& Pos ); + void Position( const Vector2f& Pos ); /** @return The parallax position */ - const eeVector2f& Position() const; + const Vector2f& Position() const; /** @return The SubTexture used for the parallax.*/ cSubTexture * SubTexture() const; @@ -72,23 +72,23 @@ class EE_API cScrollParallax { void SubTexture( cSubTexture * subTexture ); /** Set the parallax speed movement. */ - void Speed( const eeVector2f& speed ); + void Speed( const Vector2f& speed ); /** @return The parallax movement speed. */ - const eeVector2f& Speed() const; + const Vector2f& Speed() const; private: cSubTexture * mSubTexture; EE_BLEND_MODE mBlend; ColorA mColor; - eeVector2f mInitPos; - eeVector2f mPos; - eeVector2f mSpeed; - eeSizef mSize; - eeRecti mRect; + Vector2f mInitPos; + Vector2f mPos; + Vector2f mSpeed; + Sizef mSize; + Recti mRect; Clock mElapsed; - eeVector2i mTiles; - eeRectf mAABB; - eeSizef mRealSize; + Vector2i mTiles; + Rectf mAABB; + Sizef mRealSize; void SetSubTexture(); diff --git a/include/eepp/graphics/cshaderprogram.hpp b/include/eepp/graphics/cshaderprogram.hpp index ffefce2f1..d16ad333c 100644 --- a/include/eepp/graphics/cshaderprogram.hpp +++ b/include/eepp/graphics/cshaderprogram.hpp @@ -70,10 +70,10 @@ class EE_API cShaderProgram { bool SetUniform( const std::string& Name, float Value ); /** @overload */ - bool SetUniform( const std::string& Name, eeVector2ff Value ); + bool SetUniform( const std::string& Name, Vector2ff Value ); /** @overload */ - bool SetUniform( const std::string& Name, eeVector3ff Value ); + bool SetUniform( const std::string& Name, Vector3ff Value ); /** @overload */ bool SetUniform( const std::string& Name, float x, float y, float z, float w ); @@ -88,10 +88,10 @@ class EE_API cShaderProgram { bool SetUniform( const Int32& Location, float Value ); /** @overload */ - bool SetUniform( const Int32& Location, eeVector2ff Value ); + bool SetUniform( const Int32& Location, Vector2ff Value ); /** @overload */ - bool SetUniform( const Int32& Location, eeVector3ff Value ); + bool SetUniform( const Int32& Location, Vector3ff Value ); /** @overload */ bool SetUniform( const Int32& Location, float x, float y, float z, float w ); diff --git a/include/eepp/graphics/csprite.hpp b/include/eepp/graphics/csprite.hpp index 444de75d1..dbb4f0763 100755 --- a/include/eepp/graphics/csprite.hpp +++ b/include/eepp/graphics/csprite.hpp @@ -45,7 +45,7 @@ class EE_API cSprite { * @param Offset The offset added to the position of the frame ( the SubTexture ) * @param TexSector The sector of the texture used by the SubTexture to be rendered */ - cSprite( const Uint32& TexId, const eeSizef &DestSize = eeSizef(0,0), const eeVector2i &Offset = eeVector2i(0,0), const eeRecti& TexSector = eeRecti(0,0,0,0) ); + cSprite( const Uint32& TexId, const Sizef &DestSize = Sizef(0,0), const Vector2i &Offset = Vector2i(0,0), const Recti& TexSector = Recti(0,0,0,0) ); virtual ~cSprite(); @@ -77,10 +77,10 @@ class EE_API cSprite { void Scale( const Float& Scale ); /** Set the Scale for the rendered sprite */ - void Scale( const eeVector2f& Scale ); + void Scale( const Vector2f& Scale ); /** @return The Scale for the rendered sprite */ - const eeVector2f& Scale() const; + const Vector2f& Scale() const; /** @brief Set the local origin of the sprite ** The origin of an object defines the center point for @@ -88,29 +88,29 @@ class EE_API cSprite { ** The coordinates of this point must be relative to the ** top-left corner of the sprite. ** The default origin point is the center of the sprite. */ - void Origin( const eeOriginPoint& origin ); + void Origin( const OriginPoint& origin ); /** @return The local origin of the sprite */ - const eeOriginPoint& Origin() const; + const OriginPoint& Origin() const; /** Set the Frame Number Sprite Size * @param Size The new size * @param FrameNum If the Frame Number is 0 it will use the Current Frame Number * @param SubFrame If the Sub Frame Number is 0 it will use the Current Sub Frame Number */ - void Size( const eeSizef& Size, const unsigned int& FrameNum, const unsigned int& SubFrame ); + void Size( const Sizef& Size, const unsigned int& FrameNum, const unsigned int& SubFrame ); /** Set the current SubTexture Size ( destination size ) */ - void Size( const eeSizef& Size ); + void Size( const Sizef& Size ); /** @return the Frame Number Sprite Size * @param FrameNum If the Frame Number is 0 it will use the Current Frame Number * @param SubFrame If the Sub Frame Number is 0 it will use the Current Sub Frame Number */ - eeSizef Size( const unsigned int& FrameNum, const unsigned int& SubFrame ); + Sizef Size( const unsigned int& FrameNum, const unsigned int& SubFrame ); /** @return The current Frame Size */ - eeSizef Size(); + Sizef Size(); /** Set the sprite animation speed ( AnimSpeed equals to Animation Frames per Second ) */ void AnimSpeed( const Float& AnimSpeed ); @@ -178,10 +178,10 @@ class EE_API cSprite { void Position( const Float& x, const Float& y ); /** Set the sprite position from a Vector */ - void Position( const eeVector2f& NewPos ); + void Position( const Vector2f& NewPos ); /** @return The Position of the sprite */ - const eeVector2f Position() const; + const Vector2f Position() const; /** Update the colors of every vertex rendered of the sprite ( this will override the default color ) * @param Color0 The Left - Top vertex color @@ -207,7 +207,7 @@ class EE_API cSprite { * @param TexSector The texture sector to be rendered ( default all the texture ) * @return True if success */ - bool CreateStatic(const Uint32& TexId, const eeSizef &DestSize = eeSizef(0,0), const eeVector2i &Offset = eeVector2i(0,0), const eeRecti& TexSector = eeRecti(0,0,0,0) ); + bool CreateStatic(const Uint32& TexId, const Sizef &DestSize = Sizef(0,0), const Vector2i &Offset = Vector2i(0,0), const Recti& TexSector = Recti(0,0,0,0) ); /** Creates an animated sprite * @param SubFramesNum The number of subframes of the sprite @@ -221,7 +221,7 @@ class EE_API cSprite { * @param TexSector The texture sector to be rendered ( default all the texture ) * @return The frame position or 0 if fails */ - unsigned int AddFrame( const Uint32& TexId, const eeSizef& DestSize = eeSizef(0,0), const eeVector2i& Offset = eeVector2i(0,0), const eeRecti& TexSector = eeRecti(0,0,0,0) ); + unsigned int AddFrame( const Uint32& TexId, const Sizef& DestSize = Sizef(0,0), const Vector2i& Offset = Vector2i(0,0), const Recti& TexSector = Recti(0,0,0,0) ); /** Add a frame to the sprite (on the current sub frame) * @param SubTexture The SubTexture used in the frame @@ -248,7 +248,7 @@ class EE_API cSprite { * @param TexSector The texture sector to be rendered ( default all the texture ) * @return True if success */ - bool AddSubFrame( const Uint32& TexId, const unsigned int& NumFrame, const unsigned int& NumSubFrame, const eeSizef& DestSize = eeSizef(0,0), const eeVector2i& Offset = eeVector2i(0,0), const eeRecti& TexSector = eeRecti(0,0,0,0) ); + bool AddSubFrame( const Uint32& TexId, const unsigned int& NumFrame, const unsigned int& NumSubFrame, const Sizef& DestSize = Sizef(0,0), const Vector2i& Offset = Vector2i(0,0), const Recti& TexSector = Recti(0,0,0,0) ); /** Add a frame on an specific subframe to the sprite * @param SubTexture The SubTexture used in the frame @@ -287,13 +287,13 @@ class EE_API cSprite { bool AutoAnimate() const; /** @return The four vertex position of the Sprite */ - eeQuad2f GetQuad(); + Quad2f GetQuad(); /** @return The Offset of the current frame */ - eeVector2i Offset(); + Vector2i Offset(); /** Set the Offset of the current frame */ - void Offset( const eeVector2i& offset ); + void Offset( const Vector2i& offset ); /** Reverse the animation from last frame to first mFrames. */ void ReverseAnim( const bool& Reverse ); @@ -359,10 +359,10 @@ class EE_API cSprite { }; Uint32 mFlags; - eeVector2f mPos; - eeOriginPoint mOrigin; + Vector2f mPos; + OriginPoint mOrigin; Float mAngle; - eeVector2f mScale; + Vector2f mScale; Float mAnimSpeed; ColorA mColor; diff --git a/include/eepp/graphics/csubtexture.hpp b/include/eepp/graphics/csubtexture.hpp index a2c8b3e12..23853ec39 100644 --- a/include/eepp/graphics/csubtexture.hpp +++ b/include/eepp/graphics/csubtexture.hpp @@ -24,7 +24,7 @@ class EE_API cSubTexture { * @param SrcRect The texture part that will be used as the SubTexture. * @param Name The texture name ( if any ) */ - cSubTexture( const Uint32& TexId, const eeRecti& SrcRect, const std::string& Name = "" ); + cSubTexture( const Uint32& TexId, const Recti& SrcRect, const std::string& Name = "" ); /** Creates a SubTexture of the indicated part of the texture. * @param TexId The texture id @@ -32,7 +32,7 @@ class EE_API cSubTexture { * @param DestSize The destination size that the SubTexture will have when rendered. * @param Name The texture name ( if any ) */ - cSubTexture( const Uint32& TexId, const eeRecti& SrcRect, const eeSizef& DestSize, const std::string& Name = "" ); + cSubTexture( const Uint32& TexId, const Recti& SrcRect, const Sizef& DestSize, const std::string& Name = "" ); /** Creates a SubTexture of the indicated part of the texture. * @param TexId The texture id @@ -41,7 +41,7 @@ class EE_API cSubTexture { * @param Offset The offset that will be added to the position passed when any Draw call is used. * @param Name The texture name ( if any ) */ - cSubTexture( const Uint32& TexId, const eeRecti& SrcRect, const eeSizef& DestSize, const eeVector2i& Offset, const std::string& Name = "" ); + cSubTexture( const Uint32& TexId, const Recti& SrcRect, const Sizef& DestSize, const Vector2i& Offset, const std::string& Name = "" ); virtual ~cSubTexture(); @@ -61,30 +61,30 @@ class EE_API cSubTexture { void Texture( const Uint32& TexId ); /** @return The Texture sector that represents the SubTexture */ - const eeRecti& SrcRect() const; + const Recti& SrcRect() const; /** Sets the Texture sector that represents the SubTexture */ - void SrcRect( const eeRecti& Rect ); + void SrcRect( const Recti& Rect ); /** @return The Destination Size of the SubTexture. */ - const eeSizef& DestSize() const; + const Sizef& DestSize() const; /** Sets the Destination Size of the SubTexture. * The size can be different from the original size of the SubTexture. * For example if the SubTexture width is 32 pixels, by default the destination width is 32 pixels, but it can be changed to anything wanted. */ - void DestSize( const eeSizef& destSize ); + void DestSize( const Sizef& destSize ); /** @return The SubTexture default offset. The offset is added to the position passed when is drawed. */ - const eeVector2i& Offset() const; + const Vector2i& Offset() const; /** Set the SubTexture offset. */ - void Offset( const eeVector2i& offset ); + void Offset( const Vector2i& offset ); - 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 ColorA& Color = ColorA(), const Float& Angle = 0.f, const Vector2f& Scale = Vector2f::One, const EE_BLEND_MODE& Blend = ALPHA_NORMAL, const EE_RENDER_MODE& Effect = RN_NORMAL, OriginPoint Center = OriginPoint(OriginPoint::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 Float& X, const Float& Y, const Float& Angle, const Vector2f& 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, OriginPoint Center = OriginPoint(OriginPoint::OriginCenter) ); - 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 ); + void Draw( const Quad2f Q, const Vector2f& Offset = Vector2f(), const Float& Angle = 0.f, const Vector2f& Scale = Vector2f::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(); @@ -129,10 +129,10 @@ class EE_API cSubTexture { bool Unlock( const bool& KeepData = false, const bool& Modified = false ); /** @return The SubTexture size in the texture. This is the source rect size. */ - eeSize RealSize(); + Sizei RealSize(); /** @return This is the same as Destination Size but with the values rounded as integers. */ - eeSize Size(); + Sizei Size(); /** @return A pixel pointer to the texture loaded in memory ( downloaded from VRAM doing Lock()/Unlock() ). */ const Uint8* GetPixelsPtr(); @@ -150,9 +150,9 @@ class EE_API cSubTexture { Uint32 mId; Uint32 mTexId; cTexture * mTexture; - eeRecti mSrcRect; - eeSizef mDestSize; - eeVector2i mOffset; + Recti mSrcRect; + Sizef mDestSize; + Vector2i mOffset; void CreateUnnamed(); }; diff --git a/include/eepp/graphics/ctextcache.hpp b/include/eepp/graphics/ctextcache.hpp index fe2833361..3179757dc 100644 --- a/include/eepp/graphics/ctextcache.hpp +++ b/include/eepp/graphics/ctextcache.hpp @@ -49,7 +49,7 @@ class EE_API cTextCache { 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 ); + void Draw( const Float& X, const Float& Y, const Vector2f& Scale = Vector2f::One, const Float& Angle = 0, EE_BLEND_MODE Effect = ALPHA_NORMAL ); /** @return The Font Color */ const ColorA& Color() const; diff --git a/include/eepp/graphics/ctexture.hpp b/include/eepp/graphics/ctexture.hpp index 6a093521a..f952ff638 100755 --- a/include/eepp/graphics/ctexture.hpp +++ b/include/eepp/graphics/ctexture.hpp @@ -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 ColorA& Color = ColorA(), 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 Vector2f& Scale = Vector2f::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 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) ); + void Draw( const Float &x, const Float &y, const Float &Angle = 0, const Vector2f &Scale = Vector2f::One, const ColorA& Color = ColorA(255,255,255,255), const EE_BLEND_MODE &Blend = ALPHA_NORMAL, const EE_RENDER_MODE &Effect = RN_NORMAL, OriginPoint Center = OriginPoint(OriginPoint::OriginCenter), const Recti& texSector = Recti(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,24 +183,24 @@ 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 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) ); + void DrawEx( Float x, Float y, Float width = 0.0f, Float height = 0.0f, const Float &Angle = 0, const Vector2f &Scale = Vector2f::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, OriginPoint Center = OriginPoint(OriginPoint::OriginCenter), const Recti& texSector = Recti(0,0,0,0) ); /** Render a quad on Screen - * @param Q The eeQuad2f - * @param Offset The Offset applied to all the coordinates on eeQuad2f - * @param Angle The Angle of the eeQuad2f rendered - * @param Scale The Scale of the eeQuad2f rendered - * @param Color The eeQuad2f color + * @param Q The Quad2f + * @param Offset The Offset applied to all the coordinates on Quad2f + * @param Angle The Angle of the Quad2f rendered + * @param Scale The Scale of the Quad2f rendered + * @param Color The Quad2f color * @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 ColorA& Color = ColorA(255,255,255,255), const EE_BLEND_MODE &Blend = ALPHA_NORMAL, const eeRecti& texSector = eeRecti(0,0,0,0) ); + void DrawQuad( const Quad2f& Q, const Vector2f& Offset = Vector2f(), const Float &Angle = 0.0f, const Vector2f &Scale = Vector2f::One, const ColorA& Color = ColorA(255,255,255,255), const EE_BLEND_MODE &Blend = ALPHA_NORMAL, const Recti& texSector = Recti(0,0,0,0) ); /** Render a quad on Screen - * @param Q The eeQuad2f - * @param Offset The Offset applied to all the coordinates on eeQuad2f - * @param Angle The Angle of the eeQuad2f rendered - * @param Scale The Scale of the eeQuad2f rendered + * @param Q The Quad2f + * @param Offset The Offset applied to all the coordinates on Quad2f + * @param Angle The Angle of the Quad2f rendered + * @param Scale The Scale of the Quad2f rendered * @param Color0 The Left - Top vertex color * @param Color1 The Left - Bottom vertex color * @param Color2 The Right - Bottom vertex color @@ -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 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) ); + void DrawQuadEx( Quad2f Q, const Vector2f& Offset = Vector2f(), const Float &Angle = 0.0f, const Vector2f &Scale = Vector2f::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, Recti texSector = Recti(0,0,0,0) ); /** Set the texture factory internal id of the texture */ void Id( const Uint32& id ); diff --git a/include/eepp/graphics/ctextureatlas.hpp b/include/eepp/graphics/ctextureatlas.hpp index b7d91b243..a12ee8b0d 100644 --- a/include/eepp/graphics/ctextureatlas.hpp +++ b/include/eepp/graphics/ctextureatlas.hpp @@ -30,7 +30,7 @@ class EE_API cTextureAtlas : public ResourceManager { * @param SrcRect The texture part that will be used as the SubTexture. * @param Name The texture name ( if any ) */ - cSubTexture * Add( const Uint32& TexId, const eeRecti& SrcRect, const std::string& Name = "" ); + cSubTexture * Add( const Uint32& TexId, const Recti& SrcRect, const std::string& Name = "" ); /** Creates and add to the texture atlas a SubTexture of the indicated part of the texture. * @param TexId The texture id @@ -38,7 +38,7 @@ class EE_API cTextureAtlas : public ResourceManager { * @param DestSize The destination size that the SubTexture will have when rendered. * @param Name The texture name ( if any ) */ - cSubTexture * Add( const Uint32& TexId, const eeRecti& SrcRect, const eeSizef& DestSize, const std::string& Name = "" ); + cSubTexture * Add( const Uint32& TexId, const Recti& SrcRect, const Sizef& DestSize, const std::string& Name = "" ); /** Creates and add to the texture atlas a SubTexture of the indicated part of the texture. * @param TexId The texture id @@ -47,7 +47,7 @@ class EE_API cTextureAtlas : public ResourceManager { * @param Offset The offset that will be added to the position passed when any Draw call is used. * @param Name The texture name ( if any ) */ - cSubTexture * Add( const Uint32& TexId, const eeRecti& SrcRect, const eeSizef& DestSize, const eeVector2i& Offset, const std::string& Name = "" ); + cSubTexture * Add( const Uint32& TexId, const Recti& SrcRect, const Sizef& DestSize, const Vector2i& Offset, const std::string& Name = "" ); /** @return The texture atlas name. */ const std::string& Name() const; diff --git a/include/eepp/graphics/cvertexbuffer.hpp b/include/eepp/graphics/cvertexbuffer.hpp index 54aa9cca9..6053452d4 100644 --- a/include/eepp/graphics/cvertexbuffer.hpp +++ b/include/eepp/graphics/cvertexbuffer.hpp @@ -25,17 +25,17 @@ class EE_API cVertexBuffer { /** @brief Adds a vertex of the type indicated to the buffer * @param Type Can be the position or texture coordinates. * @param Vertex The vexter data */ - void AddVertex( const Uint32& Type, const eeVector2f& Vertex ); + void AddVertex( const Uint32& Type, const Vector2f& Vertex ); /** @brief Adds a vertex position to the buffer * @param Vertex The vexter data */ - void AddVertex( const eeVector2f& Vertex ); + void AddVertex( const Vector2f& Vertex ); /** @brief Adds a vertex texture coordinate. * @param VertexCoord The vertex texture coordinate. * @param TextureLevel Indicates the texture level if it's using multitextures. */ - void AddVertexCoord( const eeVector2f& VertexCoord, const Uint32& TextureLevel = 0 ); + void AddVertexCoord( const Vector2f& VertexCoord, const Uint32& TextureLevel = 0 ); /** @brief Adds a color to the buffer. * @param Color The color value. @@ -78,7 +78,7 @@ class EE_API cVertexBuffer { * @param Type Can be the position or texture coordinates. * @param Index The position in the buffer. */ - eeVector2f GetVector2( const Uint32& Type, const Uint32& Index ); + Vector2f GetVector2( const Uint32& Type, const Uint32& Index ); /** @return The color at the buffer position. * @param Index The position in the buffer. @@ -142,7 +142,7 @@ class EE_API cVertexBuffer { * Some example usage of this class: * @code // Creates a rounded rectangle. - eePolygon2f Poly = eePolygon2f::CreateRoundedRectangle( 0, 0, 256, 50 ); + Polygon2f Poly = Polygon2f::CreateRoundedRectangle( 0, 0, 256, 50 ); cVertexBuffer * VBO = cVertexBuffer::New( VERTEX_FLAGS_PRIMITIVE, DM_TRIANGLE_FAN ); diff --git a/include/eepp/graphics/pixelperfect.hpp b/include/eepp/graphics/pixelperfect.hpp index 0f7772254..8d47dfe2f 100644 --- a/include/eepp/graphics/pixelperfect.hpp +++ b/include/eepp/graphics/pixelperfect.hpp @@ -17,7 +17,7 @@ namespace EE { namespace Graphics { * @warning Stress the CPU easily. \n Creates a copy of the texture on the app contex. \n It will not work with scaled or rotated textures. * @return True if collided */ -bool EE_API PixelPerfectCollide( cTexture * Tex1, const unsigned int& x1, const unsigned int& y1, cTexture * Tex2, const unsigned int& x2, const unsigned int& y2, const eeRectu& Tex1_SrcRECT = eeRectu(0,0,0,0), const eeRectu& Tex2_SrcRECT = eeRectu(0,0,0,0) ); +bool EE_API PixelPerfectCollide( cTexture * Tex1, const unsigned int& x1, const unsigned int& y1, cTexture * Tex2, const unsigned int& x2, const unsigned int& y2, const Rectu& Tex1_SrcRECT = Rectu(0,0,0,0), const Rectu& Tex2_SrcRECT = Rectu(0,0,0,0) ); /** Pixel Perfect Collition implementation between texture and a point * @param Tex First Texture Id @@ -28,7 +28,7 @@ bool EE_API PixelPerfectCollide( cTexture * Tex1, const unsigned int& x1, const * @param Tex1_SrcRECT The sector of the texture from TexId_1 that you are rendering, the sector you want to collide ( on cSprite the SprSrcRECT ) * @return True if collided */ -bool EE_API PixelPerfectCollide( cTexture * Tex, const unsigned int& x1, const unsigned int& y1, const unsigned int& x2, const unsigned int& y2, const eeRectu& Tex1_SrcRECT = eeRectu(0,0,0,0) ); +bool EE_API PixelPerfectCollide( cTexture * Tex, const unsigned int& x1, const unsigned int& y1, const unsigned int& x2, const unsigned int& y2, const Rectu& Tex1_SrcRECT = Rectu(0,0,0,0) ); }} diff --git a/include/eepp/graphics/renderer/cgl.hpp b/include/eepp/graphics/renderer/cgl.hpp index 7bf5871b9..dbc33b539 100644 --- a/include/eepp/graphics/renderer/cgl.hpp +++ b/include/eepp/graphics/renderer/cgl.hpp @@ -190,9 +190,9 @@ class EE_API cGL { virtual int UnProject( float winx, float winy, float winz, const float modelMatrix[16], const float projMatrix[16], const int viewport[4], float *objx, float *objy, float *objz ) = 0; - eeVector3f ProjectCurrent( const eeVector3f& point ); + Vector3f ProjectCurrent( const Vector3f& point ); - eeVector3f UnProjectCurrent( const eeVector3f& point ); + Vector3f UnProjectCurrent( const Vector3f& point ); void StencilFunc( unsigned int func, int ref, unsigned int mask ); @@ -226,7 +226,7 @@ class EE_API cGL { float mLineWidth; unsigned int mCurVAO; - std::list mPlanesClipped; + std::list mPlanesClipped; private: void WriteExtension( Uint8 Pos, Uint32 BitWrite ); }; diff --git a/include/eepp/math.hpp b/include/eepp/math.hpp index 9ee712fb1..a3c43c118 100644 --- a/include/eepp/math.hpp +++ b/include/eepp/math.hpp @@ -9,12 +9,12 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include -#include +#include #include #endif diff --git a/include/eepp/math/cinterpolation.hpp b/include/eepp/math/interpolation.hpp similarity index 87% rename from include/eepp/math/cinterpolation.hpp rename to include/eepp/math/interpolation.hpp index ac869d93d..6ef649a0d 100644 --- a/include/eepp/math/cinterpolation.hpp +++ b/include/eepp/math/interpolation.hpp @@ -11,21 +11,21 @@ namespace EE { namespace Math { /** @brief The basic 1d point template. */ template -class Point1d { +class tPoint1d { public: - Point1d() { p = 0; t = 0.f; } - Point1d( const T& Pos, const Float& Time ) { p = Pos; t = Time; } + tPoint1d() { p = 0; t = 0.f; } + tPoint1d( const T& Pos, const Float& Time ) { p = Pos; t = Time; } T p; Float t; }; -typedef Point1d cPoint1df; +typedef tPoint1d Point1d; /** @brief A interpolation movement manager, used for movement interpolations. */ -class EE_API cInterpolation { +class EE_API Interpolation { public: - cInterpolation(); + Interpolation(); - ~cInterpolation(); + ~Interpolation(); typedef cb::Callback0 OnPathEndCallback; @@ -91,13 +91,13 @@ class EE_API cInterpolation { void SetTotalTime( const Time& TotTime ); /** @return the vector of points */ - const std::vector& GetPoints() const; + const std::vector& GetPoints() const; /** @return The Current Node */ - cPoint1df* GetCurrentActual() const; + Point1d* GetCurrentActual() const; /** @return The Next Node */ - cPoint1df* GetCurrentNext() const; + Point1d* GetCurrentNext() const; /** @return The Current Position in the vector */ const unsigned int& GetCurrentPos() const; @@ -124,10 +124,10 @@ class EE_API cInterpolation { Float mSpeed; - std::vector mPoints; + std::vector mPoints; - cPoint1df* mActP; - cPoint1df* mNexP; + Point1d* mActP; + Point1d* mNexP; OnPathEndCallback mOnPathEndCallback; diff --git a/include/eepp/math/line2.hpp b/include/eepp/math/line2.hpp index 6aba796cc..079107650 100644 --- a/include/eepp/math/line2.hpp +++ b/include/eepp/math/line2.hpp @@ -93,7 +93,7 @@ bool Line2::Intersect( Line2& line, T* X, T* Y ) { return true; } -typedef Line2 eeLine2f; +typedef Line2 Line2f; }} diff --git a/include/eepp/math/cmtrand.hpp b/include/eepp/math/mtrand.hpp similarity index 94% rename from include/eepp/math/cmtrand.hpp rename to include/eepp/math/mtrand.hpp index 8ad5a5eef..ed907cbb9 100755 --- a/include/eepp/math/cmtrand.hpp +++ b/include/eepp/math/mtrand.hpp @@ -65,23 +65,23 @@ namespace EE { namespace Math { -class EE_API cMTRand { +class EE_API MTRand { public: static const Uint32 M = 397; static const Int32 N = 624; static const Uint32 SAVE = N + 1; /** Initialize with a defined user seed */ - cMTRand( const Uint32 oneSeed ); + MTRand( const Uint32 oneSeed ); /** Initialize with a predefined seed */ - cMTRand(); + MTRand(); /** Initialize with a copy of another MTRand object */ - cMTRand( const cMTRand& o ); + MTRand( const MTRand& o ); /** Copy MTRand object */ - cMTRand& operator=( const cMTRand& o ); + MTRand& operator=( const MTRand& o ); /** @return integer in [0,2^32-1] */ Uint32 Randi(); diff --git a/include/eepp/math/originpoint.hpp b/include/eepp/math/originpoint.hpp index 250a67b88..d0953d782 100644 --- a/include/eepp/math/originpoint.hpp +++ b/include/eepp/math/originpoint.hpp @@ -8,7 +8,7 @@ namespace EE { namespace Math { /** @brief Helper class to define the origin point of a translation/rotation/scaling */ template -class OriginPoint : public Vector2 { +class tOriginPoint : public Vector2 { public: enum OriginTypes { @@ -20,38 +20,38 @@ class OriginPoint : public Vector2 { OriginTypes OriginType; /** By default creates a origin point centered */ - OriginPoint() : + tOriginPoint() : Vector2(), OriginType( OriginCenter ) { } /** Creates a custom origin point */ - OriginPoint(T X, T Y) : + tOriginPoint(T X, T Y) : Vector2( X, Y ), OriginType( OriginCustom ) { } /** Creates a origin point type */ - OriginPoint( OriginTypes type ) : + tOriginPoint( OriginTypes type ) : Vector2( (T)0, (T)0 ), OriginType( type ) { } - OriginPoint& operator=(const Vector2& v); + tOriginPoint& operator=(const Vector2& v); }; template -OriginPoint& OriginPoint::operator=(const Vector2& v) { +tOriginPoint& tOriginPoint::operator=(const Vector2& v) { this->x = v.x; this->y = v.y; return *this; } -typedef OriginPoint eeOriginPoint; -typedef OriginPoint eeOriginPointi; +typedef tOriginPoint OriginPoint; +typedef tOriginPoint OriginPointi; }} diff --git a/include/eepp/math/cperlinnoise.hpp b/include/eepp/math/perlinnoise.hpp similarity index 96% rename from include/eepp/math/cperlinnoise.hpp rename to include/eepp/math/perlinnoise.hpp index e09959824..03e231e8a 100755 --- a/include/eepp/math/cperlinnoise.hpp +++ b/include/eepp/math/perlinnoise.hpp @@ -13,11 +13,11 @@ namespace EE { namespace Math { /** @brief Perlin noise can be used to generate gradients, textures and effects. For more information go to http://en.wikipedia.org/wiki/Perlin_noise ** To get a better understanding of the variables to generate the noise, visit http://freespace.virgin.net/hugo.elias/models/m_perlin.htm */ -class EE_API cPerlinNoise { +class EE_API PerlinNoise { public: - cPerlinNoise(); + PerlinNoise(); - ~cPerlinNoise(); + ~PerlinNoise(); /** Reset the initial values */ void Init(); diff --git a/include/eepp/math/polygon2.hpp b/include/eepp/math/polygon2.hpp index fe2d1fafa..262dbbf7a 100755 --- a/include/eepp/math/polygon2.hpp +++ b/include/eepp/math/polygon2.hpp @@ -453,7 +453,7 @@ Uint32 Polygon2::ClosestPoint( const Vector2& to, T * distance ) { return Index; } -typedef Polygon2 eePolygon2f; +typedef Polygon2 Polygon2f; }} diff --git a/include/eepp/math/quad2.hpp b/include/eepp/math/quad2.hpp index fc037a25c..1e5b22de6 100644 --- a/include/eepp/math/quad2.hpp +++ b/include/eepp/math/quad2.hpp @@ -196,7 +196,7 @@ void Quad2::Move( Vector2 dist ) { } } -typedef Quad2 eeQuad2f; +typedef Quad2 Quad2f; }} diff --git a/include/eepp/math/rect.hpp b/include/eepp/math/rect.hpp index ceb3a7d59..176f9b962 100755 --- a/include/eepp/math/rect.hpp +++ b/include/eepp/math/rect.hpp @@ -228,7 +228,7 @@ void tRECT::Scale( Vector2 scale, const Vector2& center ) { template void tRECT::Scale( T scale, const Vector2& center ) { - Scale( eeVector2f( scale, scale ), center ); + Scale( Vector2f( scale, scale ), center ); } template @@ -241,11 +241,11 @@ void tRECT::Scale( Vector2 scale ) { Scale( scale, Center() ); } -typedef tRECT eeRectu; -typedef tRECT eeRectf; +typedef tRECT Rectu; +typedef tRECT Rectf; typedef tRECT eeAABB; // Axis-Aligned Bounding Box -typedef tRECT eeRecti; -typedef tRECT eeRect; +typedef tRECT Recti; +typedef tRECT Rect; }} diff --git a/include/eepp/math/size.hpp b/include/eepp/math/size.hpp index ee690e1bb..5f61ea830 100644 --- a/include/eepp/math/size.hpp +++ b/include/eepp/math/size.hpp @@ -79,8 +79,8 @@ void tSize::Height( const T& height ) { this->y = height; } -typedef tSize eeSize; -typedef tSize eeSizef; +typedef tSize Sizei; +typedef tSize Sizef; }} diff --git a/include/eepp/math/triangle2.hpp b/include/eepp/math/triangle2.hpp index 16a4f129e..430100c6b 100644 --- a/include/eepp/math/triangle2.hpp +++ b/include/eepp/math/triangle2.hpp @@ -35,7 +35,7 @@ Triangle2::Triangle2( const Vector2& v1, const Vector2& v2, const Vecto V[2] = v3; } -typedef Triangle2 eeTriangle2f; +typedef Triangle2 Triangle2f; }} diff --git a/include/eepp/math/vector2.hpp b/include/eepp/math/vector2.hpp index 97854d03e..d65cdaa86 100755 --- a/include/eepp/math/vector2.hpp +++ b/include/eepp/math/vector2.hpp @@ -405,12 +405,12 @@ Vector2 Vector2::Copy() { return Vector2( x, y ); } -typedef Vector2 eeVector2if; -typedef Vector2 eeVector2i; -typedef Vector2 eeVector2f; -typedef Vector2 eeVector2d; -typedef Vector2 eeVector2ff; -typedef Vector2 eeVector2u; +typedef Vector2 Vector2if; +typedef Vector2 Vector2i; +typedef Vector2 Vector2f; +typedef Vector2 Vector2d; +typedef Vector2 Vector2ff; +typedef Vector2 Vector2u; }} diff --git a/include/eepp/math/vector3.hpp b/include/eepp/math/vector3.hpp index 222c36c9b..4c98b6078 100755 --- a/include/eepp/math/vector3.hpp +++ b/include/eepp/math/vector3.hpp @@ -93,10 +93,10 @@ bool operator !=(const Vector3& V1, const Vector3& V2) { } // Define the most common types -typedef Vector3 eeVector3i; -typedef Vector3 eeVector3f; -typedef Vector3 eeVector3d; -typedef Vector3 eeVector3ff; +typedef Vector3 Vector3i; +typedef Vector3 Vector3f; +typedef Vector3 Vector3d; +typedef Vector3 Vector3ff; }} diff --git a/include/eepp/math/cwaypoints.hpp b/include/eepp/math/waypoints.hpp similarity index 81% rename from include/eepp/math/cwaypoints.hpp rename to include/eepp/math/waypoints.hpp index a994929a8..6e1af358e 100755 --- a/include/eepp/math/cwaypoints.hpp +++ b/include/eepp/math/waypoints.hpp @@ -12,31 +12,31 @@ namespace EE { namespace Math { /** @brief The basic waypoint class. */ template -class Waypoint { +class tWaypoint { public: - Waypoint() { p = Vector2(0,0); t = 0; } - Waypoint( const Vector2& Pos, const Float& Time ) { p = Pos; t = Time; } + tWaypoint() { p = Vector2(0,0); t = 0; } + tWaypoint( const Vector2& Pos, const Float& Time ) { p = Pos; t = Time; } Vector2 p; Float t; }; -typedef Waypoint cWaypoint; +typedef tWaypoint Waypoint; /** @brief A waypoint manager, used for movement interpolations. */ -class EE_API cWaypoints { +class EE_API Waypoints { public: - cWaypoints(); + Waypoints(); - ~cWaypoints(); + ~Waypoints(); typedef cb::Callback0 OnPathEndCallback; typedef cb::Callback0 OnStepCallback; /** Add a new waypoint */ - void AddWaypoint( const eeVector2f& Pos, const Float& Time = 0.f ); + void AddWaypoint( const Vector2f& Pos, const Float& Time = 0.f ); /** Edit a waypoint */ - bool EditWaypoint( const unsigned int& PointNum, const eeVector2f& NewPos, const Float& NewTime ); + bool EditWaypoint( const unsigned int& PointNum, const Vector2f& NewPos, const Float& NewTime ); /** Erase a waypoint */ bool EraseWaypoint( const unsigned int& PointNum ); @@ -63,7 +63,7 @@ class EE_API cWaypoints { void Reset(); /** @return The Current Position */ - const eeVector2f& GetPos(); + const Vector2f& GetPos(); /** @return If movement interpolation is a loop */ bool Loop() const; @@ -81,16 +81,16 @@ class EE_API cWaypoints { void SetTotalTime( const Time & TotTime ); /** @return The Current Node */ - cWaypoint * GetCurrentActual() const; + Waypoint * GetCurrentActual() const; /** @return The Next Node */ - cWaypoint * GetCurrentNext() const; + Waypoint * GetCurrentNext() const; /** @return The Current Position in the vector */ const Uint32& GetCurrentPos() const; /** @return the vector of waypoints */ - const std::vector& GetWaypoints() const; + const std::vector& GetWaypoints() const; /** Set the current interpolation speed ( This will destroy the time of the interpolation and create one depending on the speed ) ( pixels per second ) */ void Speed( const Float& Speed ); @@ -117,15 +117,15 @@ class EE_API cWaypoints { bool mEnded; Float mTotDist; - eeVector2f mCurPos; + Vector2f mCurPos; Uint32 mCurPoint; double mCurTime; Float mSpeed; - cWaypoint* mActP; - cWaypoint* mNexP; + Waypoint* mActP; + Waypoint* mNexP; - std::vector mPoints; + std::vector mPoints; OnPathEndCallback mOnPathEndCallback; diff --git a/include/eepp/physics/cshapepolysprite.hpp b/include/eepp/physics/cshapepolysprite.hpp index 88dd00986..e39a5e85e 100644 --- a/include/eepp/physics/cshapepolysprite.hpp +++ b/include/eepp/physics/cshapepolysprite.hpp @@ -30,7 +30,7 @@ class CP_API cShapePolySprite : public cShapePoly { protected: cSprite * mSprite; bool mSpriteAutoDelete; - eeVector2i mOffset; + Vector2i mOffset; void OffsetSet( cVect center ); }; diff --git a/include/eepp/ui/base.hpp b/include/eepp/ui/base.hpp index ffdece26b..7d24d0505 100644 --- a/include/eepp/ui/base.hpp +++ b/include/eepp/ui/base.hpp @@ -7,8 +7,8 @@ #include #include #include -#include -#include +#include +#include #include using namespace EE::Math; diff --git a/include/eepp/ui/cuicheckbox.hpp b/include/eepp/ui/cuicheckbox.hpp index 9df7bae64..f02522dd6 100644 --- a/include/eepp/ui/cuicheckbox.hpp +++ b/include/eepp/ui/cuicheckbox.hpp @@ -24,7 +24,7 @@ class EE_API cUICheckBox : public cUITextBox { const bool& Active() const; - virtual void Padding( const eeRecti& padding ); + virtual void Padding( const Recti& padding ); cUIControlAnim * ActiveButton() const; diff --git a/include/eepp/ui/cuicombobox.hpp b/include/eepp/ui/cuicombobox.hpp index fe811f4bf..53f53c1e6 100644 --- a/include/eepp/ui/cuicombobox.hpp +++ b/include/eepp/ui/cuicombobox.hpp @@ -25,7 +25,7 @@ class EE_API cUIComboBox : public cUIDropDownList { void OnButtonExit( const cUIEvent * Event ); - Uint32 OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ); + Uint32 OnMouseClick( const Vector2i& Pos, const Uint32 Flags ); void CreateButton(); diff --git a/include/eepp/ui/cuicomplexcontrol.hpp b/include/eepp/ui/cuicomplexcontrol.hpp index 038bd0758..54d8a3b72 100644 --- a/include/eepp/ui/cuicomplexcontrol.hpp +++ b/include/eepp/ui/cuicomplexcontrol.hpp @@ -18,13 +18,13 @@ class EE_API cUIComplexControl : public cUIControlAnim { inline CreateParams( cUIControl * parentCtrl, - const eeVector2i& pos = eeVector2i( 0, 0 ), - const eeSize& size = eeSize( -1, -1 ), + const Vector2i& pos = Vector2i( 0, 0 ), + const Sizei& size = Sizei( -1, -1 ), const Uint32& flags = UI_CONTROL_DEFAULT_FLAGS, const EE_BLEND_MODE& blend = ALPHA_NORMAL, const cUIBackground& Back = cUIBackground(), const cUIBorder& Bord = cUIBorder(), - const eeSize& MinCtrlSize = eeSize(0,0) + const Sizei& MinCtrlSize = Sizei(0,0) ) : cUIControlAnim::CreateParams( parentCtrl, pos, size, flags, blend, Back, Bord ), MinControlSize( MinCtrlSize ) @@ -34,7 +34,7 @@ class EE_API cUIComplexControl : public cUIControlAnim { inline ~CreateParams() {} String TooltipText; - eeSize MinControlSize; + Sizei MinControlSize; }; cUIComplexControl( const cUIComplexControl::CreateParams& Params ); @@ -47,11 +47,11 @@ class EE_API cUIComplexControl : public cUIControlAnim { virtual void Update(); - virtual void Size( const eeSize &Size ); + virtual void Size( const Sizei &Size ); void Size( const Int32& Width, const Int32& Height ); - const eeSize& Size(); + const Sizei& Size(); cUITooltip * Tooltip(); @@ -64,12 +64,12 @@ class EE_API cUIComplexControl : public cUIControlAnim { void UpdateAnchorsDistances(); protected: cUITooltip * mTooltip; - eeSize mMinControlSize; - eeRecti mDistToBorder; + Sizei mMinControlSize; + Recti mDistToBorder; void CreateTooltip(); - virtual void OnParentSizeChange( const eeVector2i& SizeChange ); + virtual void OnParentSizeChange( const Vector2i& SizeChange ); }; }} diff --git a/include/eepp/ui/cuicontrol.hpp b/include/eepp/ui/cuicontrol.hpp index 40bcb2d35..b98a29da9 100644 --- a/include/eepp/ui/cuicontrol.hpp +++ b/include/eepp/ui/cuicontrol.hpp @@ -28,8 +28,8 @@ class EE_API cUIControl { public: CreateParams( cUIControl * parentCtrl, - const eeVector2i& pos = eeVector2i( 0, 0 ), - const eeSize& size = eeSize( -1, -1 ), + const Vector2i& pos = Vector2i( 0, 0 ), + const Sizei& size = Sizei( -1, -1 ), const Uint32& flags = UI_CONTROL_DEFAULT_FLAGS, const EE_BLEND_MODE& blend = ALPHA_NORMAL, const cUIBackground& Back = cUIBackground(), @@ -47,23 +47,23 @@ class EE_API cUIControl { CreateParams() { ParentCtrl = NULL; - Pos = eeVector2i( 0, 0 ); - Size = eeSize( -1, -1 ); + Pos = Vector2i( 0, 0 ); + Size = Sizei( -1, -1 ); Flags = UI_CONTROL_DEFAULT_FLAGS; Blend = ALPHA_NORMAL; } ~CreateParams() {} - void PosSet( const eeVector2i& pos ) { Pos.x = pos.x; Pos.y = pos.y; } + void PosSet( const Vector2i& pos ) { Pos.x = pos.x; Pos.y = pos.y; } void PosSet( const Int32& X, const Int32& Y ) { Pos.x = X; Pos.y = Y; } void Parent( cUIControl * Ctrl ) { ParentCtrl = Ctrl; } - void SizeSet( const eeSize& size ) { Size.x = size.x; Size.y = size.y; } + void SizeSet( const Sizei& size ) { Size.x = size.x; Size.y = size.y; } void SizeSet( const Int32& Width, const Int32& Height ) { Size.x = Width; Size.y = Height; } cUIControl * ParentCtrl; - eeVector2i Pos; - eeSize Size; + Vector2i Pos; + Sizei Size; Uint32 Flags; cUIBackground Background; cUIBorder Border; @@ -74,13 +74,13 @@ class EE_API cUIControl { virtual ~cUIControl(); - void ScreenToControl( eeVector2i& Pos ) const; + void ScreenToControl( Vector2i& Pos ) const; - void ControlToScreen( eeVector2i& Pos ) const; + void ControlToScreen( Vector2i& Pos ) const; - void WorldToControl( eeVector2i& pos ) const; + void WorldToControl( Vector2i& pos ) const; - void ControlToWorld( eeVector2i& pos ) const; + void ControlToWorld( Vector2i& pos ) const; virtual Uint32 Type() const; @@ -88,21 +88,21 @@ class EE_API cUIControl { virtual void MessagePost( const cUIMessage * Msg ); - bool IsInside( const eeVector2i& Pos ) const; + bool IsInside( const Vector2i& Pos ) const; - void Pos( const eeVector2i& Pos ); + void Pos( const Vector2i& Pos ); void Pos( const Int32& x, const Int32& y ); - const eeVector2i& Pos() const; + const Vector2i& Pos() const; - virtual void Size( const eeSize& Size ); + virtual void Size( const Sizei& Size ); void Size( const Int32& Width, const Int32& Height ); - const eeSize& Size(); + const Sizei& Size(); - eeRecti Rect() const; + Recti Rect() const; void Visible( const bool& visible ); @@ -154,7 +154,7 @@ class EE_API cUIControl { const UintPtr& Data() const; - cUIControl * ChildGetAt( eeVector2i CtrlPos, unsigned int RecursiveLevel = 0 ); + cUIControl * ChildGetAt( Vector2i CtrlPos, unsigned int RecursiveLevel = 0 ); const Uint32& Flags() const; @@ -213,9 +213,9 @@ class EE_API cUIControl { bool IsMouseOverMeOrChilds(); - eePolygon2f &GetPolygon(); + Polygon2f &GetPolygon(); - const eeVector2f& GetPolygonCenter() const; + const Vector2f& GetPolygonCenter() const; void SetSkinState( const Uint32& State ); @@ -227,17 +227,17 @@ class EE_API cUIControl { void SendEvent( const cUIEvent * Event ); - void SendMouseEvent( const Uint32& Event, const eeVector2i& Pos, const Uint32& Flags ); + void SendMouseEvent( const Uint32& Event, const Vector2i& Pos, const Uint32& Flags ); void SendCommonEvent( const Uint32& Event ); - eeSize GetSkinSize(); + Sizei GetSkinSize(); cUIControl * NextComplexControl(); void ApplyDefaultTheme(); - eeRecti GetScreenRect(); + Recti GetScreenRect(); void ChildsCloseAll(); protected: @@ -245,9 +245,9 @@ class EE_API cUIControl { friend class cUIManager; friend class cUIWindow; - eeVector2i mPos; - eeVector2i mScreenPos; - eeSize mSize; + Vector2i mPos; + Vector2i mScreenPos; + Sizei mSize; Uint32 mFlags; UintPtr mData; @@ -266,8 +266,8 @@ class EE_API cUIControl { Uint16 mBlend; Uint16 mNumCallBacks; - eePolygon2f mPoly; - eeVector2f mCenter; + Polygon2f mPoly; + Vector2f mCenter; UIEventsMap mEvents; @@ -280,19 +280,19 @@ class EE_API cUIControl { virtual Uint32 OnKeyUp( const cUIEventKey& Event ); - virtual Uint32 OnMouseMove( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseMove( const Vector2i& Pos, const Uint32 Flags ); - virtual Uint32 OnMouseDown( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseDown( const Vector2i& Pos, const Uint32 Flags ); - virtual Uint32 OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseClick( const Vector2i& Pos, const Uint32 Flags ); - virtual Uint32 OnMouseDoubleClick( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseDoubleClick( const Vector2i& Pos, const Uint32 Flags ); - virtual Uint32 OnMouseUp( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseUp( const Vector2i& Pos, const Uint32 Flags ); - virtual Uint32 OnMouseEnter( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseEnter( const Vector2i& Pos, const Uint32 Flags ); - virtual Uint32 OnMouseExit( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseExit( const Vector2i& Pos, const Uint32 Flags ); virtual Uint32 OnFocus(); @@ -310,7 +310,7 @@ class EE_API cUIControl { virtual void OnSizeChange(); - virtual void OnParentSizeChange( const eeVector2i& SizeChange ); + virtual void OnParentSizeChange( const Vector2i& SizeChange ); virtual void OnStateChange(); @@ -330,7 +330,7 @@ class EE_API cUIControl { virtual void DoAfterSetTheme(); - virtual cUIControl * OverFind( const eeVector2f& Point ); + virtual cUIControl * OverFind( const Vector2f& Point ); void ClipMe(); @@ -372,17 +372,17 @@ class EE_API cUIControl { void WriteFlag( const Uint32& Flag, const Uint32& Val ); - void SendParentSizeChange( const eeVector2i& SizeChange ); + void SendParentSizeChange( const Vector2i& SizeChange ); Time Elapsed(); - eeRecti MakePadding( bool PadLeft = true, bool PadRight = true, bool PadTop = true, bool PadBottom = true, bool SkipFlags = false ); + Recti MakePadding( bool PadLeft = true, bool PadRight = true, bool PadTop = true, bool PadBottom = true, bool SkipFlags = false ); void SafeDeleteSkinState(); - eeSize GetSkinSize( cUISkin * Skin, const Uint32& State = cUISkinState::StateNormal ); + Sizei GetSkinSize( cUISkin * Skin, const Uint32& State = cUISkinState::StateNormal ); - eeRectf GetRectf(); + Rectf GetRectf(); }; }} diff --git a/include/eepp/ui/cuicontrolanim.hpp b/include/eepp/ui/cuicontrolanim.hpp index f01b6267e..1ce201721 100644 --- a/include/eepp/ui/cuicontrolanim.hpp +++ b/include/eepp/ui/cuicontrolanim.hpp @@ -23,9 +23,9 @@ class EE_API cUIControlAnim : public cUIDragable { void Angle( const Float& angle ); - const eeVector2f& Scale() const; + const Vector2f& Scale() const; - void Scale( const eeVector2f& scale ); + void Scale( const Vector2f& scale ); void Scale( const Float& scale ); @@ -37,15 +37,15 @@ class EE_API cUIControlAnim : public cUIDragable { bool Animating(); - void StartAlphaAnim( const Float& From, const Float& To, const Time& TotalTime, const bool& AlphaChilds = true, const Ease::Interpolation& Type = Ease::Linear, cInterpolation::OnPathEndCallback PathEndCallback = cInterpolation::OnPathEndCallback() ); + void StartAlphaAnim( const Float& From, const Float& To, const Time& TotalTime, const bool& AlphaChilds = true, const Ease::Interpolation& Type = Ease::Linear, Interpolation::OnPathEndCallback PathEndCallback = Interpolation::OnPathEndCallback() ); - void StartScaleAnim( const eeVector2f& From, const eeVector2f& To, const Time& TotalTime, const Ease::Interpolation& Type = Ease::Linear, cInterpolation::OnPathEndCallback PathEndCallback = cInterpolation::OnPathEndCallback() ); + void StartScaleAnim( const Vector2f& From, const Vector2f& To, const Time& TotalTime, const Ease::Interpolation& Type = Ease::Linear, Interpolation::OnPathEndCallback PathEndCallback = Interpolation::OnPathEndCallback() ); - void StartScaleAnim( const Float& From, const Float& To, const Time& TotalTime, const Ease::Interpolation& Type = Ease::Linear, cInterpolation::OnPathEndCallback PathEndCallback = cInterpolation::OnPathEndCallback() ); + void StartScaleAnim( const Float& From, const Float& To, const Time& TotalTime, const Ease::Interpolation& Type = Ease::Linear, Interpolation::OnPathEndCallback PathEndCallback = Interpolation::OnPathEndCallback() ); - void StartMovement( const eeVector2i& From, const eeVector2i& To, const Time& TotalTime, const Ease::Interpolation& Type = Ease::Linear, cWaypoints::OnPathEndCallback PathEndCallback = cInterpolation::OnPathEndCallback() ); + void StartMovement( const Vector2i& From, const Vector2i& To, const Time& TotalTime, const Ease::Interpolation& Type = Ease::Linear, Waypoints::OnPathEndCallback PathEndCallback = Interpolation::OnPathEndCallback() ); - void StartRotation( const Float& From, const Float& To, const Time& TotalTime, const Ease::Interpolation& Type = Ease::Linear, cInterpolation::OnPathEndCallback PathEndCallback = cInterpolation::OnPathEndCallback() ); + void StartRotation( const Float& From, const Float& To, const Time& TotalTime, const Ease::Interpolation& Type = Ease::Linear, Interpolation::OnPathEndCallback PathEndCallback = Interpolation::OnPathEndCallback() ); void CreateFadeIn( const Time& Time, const bool& AlphaChilds = true, const Ease::Interpolation& Type = Ease::Linear ); @@ -55,13 +55,13 @@ class EE_API cUIControlAnim : public cUIDragable { void DisableFadeOut( const Time & Time, const bool& AlphaChilds = true, const Ease::Interpolation& Type = Ease::Linear ); - cInterpolation * RotationInterpolation(); + Interpolation * RotationInterpolation(); - cWaypoints * ScaleInterpolation(); + Waypoints * ScaleInterpolation(); - cInterpolation * AlphaInterpolation(); + Interpolation * AlphaInterpolation(); - cWaypoints * MovementInterpolation(); + Waypoints * MovementInterpolation(); virtual void Draw(); @@ -70,13 +70,13 @@ class EE_API cUIControlAnim : public cUIDragable { friend class cUIManager; Float mAngle; - eeVector2f mScale; + Vector2f mScale; Float mAlpha; - cInterpolation * mAngleAnim; - cWaypoints * mScaleAnim; - cInterpolation * mAlphaAnim; - cWaypoints * mMoveAnim; + Interpolation * mAngleAnim; + Waypoints * mScaleAnim; + Interpolation * mAlphaAnim; + Waypoints * mMoveAnim; virtual void BackgroundDraw(); diff --git a/include/eepp/ui/cuidefaulttheme.hpp b/include/eepp/ui/cuidefaulttheme.hpp index 763525fad..3cc475b87 100644 --- a/include/eepp/ui/cuidefaulttheme.hpp +++ b/include/eepp/ui/cuidefaulttheme.hpp @@ -9,25 +9,25 @@ class EE_API cUIDefaultTheme : public cUITheme { public: cUIDefaultTheme( const std::string& Name, const std::string& Abbr, cFont * DefaultFont = NULL ); - virtual cUIPopUpMenu * CreatePopUpMenu( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE | UI_AUTO_PADDING, Uint32 RowHeight = 0, eeRecti PaddingContainer = eeRecti(), Uint32 MinWidth = 100, Uint32 MinSpaceForIcons = 16, Uint32 MinRightMargin = 8 ); + virtual cUIPopUpMenu * CreatePopUpMenu( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE | UI_AUTO_PADDING, Uint32 RowHeight = 0, Recti PaddingContainer = Recti(), Uint32 MinWidth = 100, Uint32 MinSpaceForIcons = 16, Uint32 MinRightMargin = 8 ); - virtual cUIProgressBar * CreateProgressBar( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS, bool DisplayPercent = true, bool VerticalExpand = false, eeVector2f MovementSpeed = eeVector2f( -64, 0 ), eeRectf FillerMargin = eeRectf() ); + virtual cUIProgressBar * CreateProgressBar( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS, bool DisplayPercent = true, bool VerticalExpand = false, Vector2f MovementSpeed = Vector2f( -64, 0 ), Rectf FillerMargin = Rectf() ); - virtual cUIWinMenu * CreateWinMenu( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS, Uint32 MarginBetweenButtons = 0, Uint32 ButtonMargin = 12, Uint32 MenuHeight = 0, Uint32 FirstButtonMargin = 1 ); + virtual cUIWinMenu * CreateWinMenu( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS, Uint32 MarginBetweenButtons = 0, Uint32 ButtonMargin = 12, Uint32 MenuHeight = 0, Uint32 FirstButtonMargin = 1 ); - virtual cUIWindow * CreateWindow( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED, Uint32 WinFlags = UI_WIN_DEFAULT_FLAGS, eeSize MinWindowSize = eeSize(0,0), Uint8 BaseAlpha = 255 ); + virtual cUIWindow * CreateWindow( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED, Uint32 WinFlags = UI_WIN_DEFAULT_FLAGS, Sizei MinWindowSize = Sizei(0,0), Uint8 BaseAlpha = 255 ); - virtual cUICommonDialog * CreateCommonDialog( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED, Uint32 WinFlags = UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON, eeSize MinWindowSize = eeSize(0,0), Uint8 BaseAlpha = 255, Uint32 CDLFlags = UI_CDL_DEFAULT_FLAGS, std::string DefaultFilePattern = "*", std::string DefaultDirectory = Sys::GetProcessPath() ); + virtual cUICommonDialog * CreateCommonDialog( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED, Uint32 WinFlags = UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON, Sizei MinWindowSize = Sizei(0,0), Uint8 BaseAlpha = 255, Uint32 CDLFlags = UI_CDL_DEFAULT_FLAGS, std::string DefaultFilePattern = "*", std::string DefaultDirectory = Sys::GetProcessPath() ); - virtual cUIComboBox * CreateComboBox( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, Uint32 MinNumVisibleItems = 6, bool PopUpToMainControl = false, cUIListBox * ListBox = NULL ); + virtual cUIComboBox * CreateComboBox( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, Uint32 MinNumVisibleItems = 6, bool PopUpToMainControl = false, cUIListBox * ListBox = NULL ); - virtual cUIDropDownList * CreateDropDownList( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, Uint32 MinNumVisibleItems = 6, bool PopUpToMainControl = false, cUIListBox * ListBox = NULL ); + virtual cUIDropDownList * CreateDropDownList( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, Uint32 MinNumVisibleItems = 6, bool PopUpToMainControl = false, cUIListBox * ListBox = NULL ); - virtual cUIMessageBox * CreateMessageBox( UI_MSGBOX_TYPE Type = MSGBOX_OKCANCEL, const String& Message = String(), Uint32 WinFlags = UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED, eeSize MinWindowSize = eeSize(0,0), Uint8 BaseAlpha = 255 ); + virtual cUIMessageBox * CreateMessageBox( UI_MSGBOX_TYPE Type = MSGBOX_OKCANCEL, const String& Message = String(), Uint32 WinFlags = UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED, Sizei MinWindowSize = Sizei(0,0), Uint8 BaseAlpha = 255 ); - virtual cUITabWidget * CreateTabWidget( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_HALIGN_CENTER | UI_VALIGN_BOTTOM | UI_CONTROL_DEFAULT_ANCHOR, const bool& TabsClosable = false, const bool& SpecialBorderTabs = false , const Int32& TabSeparation = 0, const Uint32& MaxTextLength = 30, const Uint32& TabWidgetHeight = 0, const Uint32& TabTextAlign = UI_HALIGN_CENTER | UI_VALIGN_CENTER, const Uint32& MinTabWidth = 32, const Uint32& MaxTabWidth = 210 ); + virtual cUITabWidget * CreateTabWidget( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_HALIGN_CENTER | UI_VALIGN_BOTTOM | UI_CONTROL_DEFAULT_ANCHOR, const bool& TabsClosable = false, const bool& SpecialBorderTabs = false , const Int32& TabSeparation = 0, const Uint32& MaxTextLength = 30, const Uint32& TabWidgetHeight = 0, const Uint32& TabTextAlign = UI_HALIGN_CENTER | UI_VALIGN_CENTER, const Uint32& MinTabWidth = 32, const Uint32& MaxTabWidth = 210 ); - virtual cUITooltip * CreateTooltip( cUIControl * TooltipOf, cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_PADDING | UI_AUTO_SIZE ); + virtual cUITooltip * CreateTooltip( cUIControl * TooltipOf, cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_PADDING | UI_AUTO_SIZE ); }; }} diff --git a/include/eepp/ui/cuidragable.hpp b/include/eepp/ui/cuidragable.hpp index 54958806b..e3508f137 100644 --- a/include/eepp/ui/cuidragable.hpp +++ b/include/eepp/ui/cuidragable.hpp @@ -16,8 +16,8 @@ class EE_API cUIDragable : public cUIControl { bool Dragging() const; void Dragging( const bool& dragging ); - const eeVector2i& DragPoint() const; - void DragPoint( const eeVector2i& Point ); + const Vector2i& DragPoint() const; + void DragPoint( const Vector2i& Point ); virtual void Update(); @@ -29,18 +29,18 @@ class EE_API cUIDragable : public cUIControl { protected: virtual ~cUIDragable(); - eeVector2i mDragPoint; + Vector2i mDragPoint; Uint32 mDragButton; - virtual Uint32 OnMouseDown( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseDown( const Vector2i& Pos, const Uint32 Flags ); - virtual Uint32 OnMouseUp( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseUp( const Vector2i& Pos, const Uint32 Flags ); - virtual Uint32 OnDrag( const eeVector2i& Pos ); + virtual Uint32 OnDrag( const Vector2i& Pos ); - virtual Uint32 OnDragStart( const eeVector2i& Pos ); + virtual Uint32 OnDragStart( const Vector2i& Pos ); - virtual Uint32 OnDragEnd( const eeVector2i& Pos ); + virtual Uint32 OnDragEnd( const Vector2i& Pos ); }; }} diff --git a/include/eepp/ui/cuidropdownlist.hpp b/include/eepp/ui/cuidropdownlist.hpp index fa979ad04..50a55cad8 100644 --- a/include/eepp/ui/cuidropdownlist.hpp +++ b/include/eepp/ui/cuidropdownlist.hpp @@ -53,7 +53,7 @@ class EE_API cUIDropDownList : public cUITextInput { virtual void Hide(); - Uint32 OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ); + Uint32 OnMouseClick( const Vector2i& Pos, const Uint32 Flags ); virtual void OnItemClicked( const cUIEvent * Event ); diff --git a/include/eepp/ui/cuieventmouse.hpp b/include/eepp/ui/cuieventmouse.hpp index 5666f5b73..d6a63c7c2 100644 --- a/include/eepp/ui/cuieventmouse.hpp +++ b/include/eepp/ui/cuieventmouse.hpp @@ -10,15 +10,15 @@ class cUIControl; class EE_API cUIEventMouse : public cUIEvent { public: - cUIEventMouse( cUIControl * Ctrl, const Uint32& EventNum, const eeVector2i& Pos, const Uint32& Flags ); + cUIEventMouse( cUIControl * Ctrl, const Uint32& EventNum, const Vector2i& Pos, const Uint32& Flags ); ~cUIEventMouse(); - const eeVector2i& Pos() const; + const Vector2i& Pos() const; const Uint32& Flags() const; protected: - eeVector2i mPos; + Vector2i mPos; Uint32 mFlags; }; diff --git a/include/eepp/ui/cuigenericgrid.hpp b/include/eepp/ui/cuigenericgrid.hpp index 228478576..d428471db 100644 --- a/include/eepp/ui/cuigenericgrid.hpp +++ b/include/eepp/ui/cuigenericgrid.hpp @@ -32,7 +32,7 @@ class EE_API cUIGenericGrid : public cUIComplexControl { Uint32 CollumnsCount; Uint32 RowHeight; Uint32 GridWidth; - eeRecti PaddingContainer; + Recti PaddingContainer; Float TouchDragDeceleration; }; @@ -105,7 +105,7 @@ class EE_API cUIGenericGrid : public cUIComplexControl { friend class tUIItemContainer; friend class cUIGridCell; - eeRecti mPadding; + Recti mPadding; bool mSmoothScroll; tUIItemContainer * mContainer; cUIScrollBar * mVScrollBar; @@ -126,7 +126,7 @@ class EE_API cUIGenericGrid : public cUIComplexControl { Int32 mItemsNotVisible; Int32 mSelected; - eeVector2i mTouchDragPoint; + Vector2i mTouchDragPoint; Float mTouchDragAcceleration; Float mTouchDragDeceleration; diff --git a/include/eepp/ui/cuigfx.hpp b/include/eepp/ui/cuigfx.hpp index 2049fca11..d07e6bbf9 100644 --- a/include/eepp/ui/cuigfx.hpp +++ b/include/eepp/ui/cuigfx.hpp @@ -48,12 +48,12 @@ class EE_API cUIGfx : public cUIComplexControl { void RenderMode( const EE_RENDER_MODE& render ); - const eeVector2i& AlignOffset() const; + const Vector2i& AlignOffset() const; protected: cSubTexture * mSubTexture; ColorA mColor; EE_RENDER_MODE mRender; - eeVector2i mAlignOffset; + Vector2i mAlignOffset; virtual void OnSizeChange(); diff --git a/include/eepp/ui/cuigridcell.hpp b/include/eepp/ui/cuigridcell.hpp index 268cd7c08..5add9c336 100644 --- a/include/eepp/ui/cuigridcell.hpp +++ b/include/eepp/ui/cuigridcell.hpp @@ -41,7 +41,7 @@ class EE_API cUIGridCell : public cUIComplexControl { void FixCell(); - virtual Uint32 OnMouseExit( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseExit( const Vector2i& Pos, const Uint32 Flags ); virtual void OnStateChange(); }; diff --git a/include/eepp/ui/cuilistbox.hpp b/include/eepp/ui/cuilistbox.hpp index 41e52ce5f..e8d02a3f1 100644 --- a/include/eepp/ui/cuilistbox.hpp +++ b/include/eepp/ui/cuilistbox.hpp @@ -44,9 +44,9 @@ class EE_API cUIListBox : public cUIComplexControl { bool SmoothScroll; UI_SCROLLBAR_MODE VScrollMode; UI_SCROLLBAR_MODE HScrollMode; - eeRecti PaddingContainer; - eeRecti HScrollPadding; - eeRecti VScrollPadding; + Recti PaddingContainer; + Recti HScrollPadding; + Recti VScrollPadding; cFont * Font; ColorA FontColor; ColorA FontOverColor; @@ -118,9 +118,9 @@ class EE_API cUIListBox : public cUIComplexControl { cFont * Font() const; - void PaddingContainer( const eeRecti& Padding ); + void PaddingContainer( const Recti& Padding ); - const eeRecti& PaddingContainer() const; + const Recti& PaddingContainer() const; void SmoothScroll( const bool& soft ); @@ -170,9 +170,9 @@ class EE_API cUIListBox : public cUIComplexControl { UI_SCROLLBAR_MODE mVScrollMode; UI_SCROLLBAR_MODE mHScrollMode; bool mSmoothScroll; - eeRecti mPaddingContainer; - eeRecti mHScrollPadding; - eeRecti mVScrollPadding; + Recti mPaddingContainer; + Recti mHScrollPadding; + Recti mVScrollPadding; tUIItemContainer * mContainer; cUIScrollBar * mVScrollBar; cUIScrollBar * mHScrollBar; @@ -189,7 +189,7 @@ class EE_API cUIListBox : public cUIComplexControl { Uint32 mVisibleFirst; Uint32 mVisibleLast; - eeVector2i mTouchDragPoint; + Vector2i mTouchDragPoint; Float mTouchDragAcceleration; Float mTouchDragDeceleration; diff --git a/include/eepp/ui/cuilistboxitem.hpp b/include/eepp/ui/cuilistboxitem.hpp index 2e98f263e..633b909fe 100644 --- a/include/eepp/ui/cuilistboxitem.hpp +++ b/include/eepp/ui/cuilistboxitem.hpp @@ -32,9 +32,9 @@ class EE_API cUIListBoxItem : public cUITextBox { virtual void OnStateChange(); - virtual Uint32 OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseClick( const Vector2i& Pos, const Uint32 Flags ); - virtual Uint32 OnMouseExit( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseExit( const Vector2i& Pos, const Uint32 Flags ); }; }} diff --git a/include/eepp/ui/cuimanager.hpp b/include/eepp/ui/cuimanager.hpp index 21e9b0289..c97063606 100644 --- a/include/eepp/ui/cuimanager.hpp +++ b/include/eepp/ui/cuimanager.hpp @@ -41,7 +41,7 @@ class EE_API cUIManager { void SendMsg( cUIControl * Ctrl, const Uint32& Msg, const Uint32& Flags = 0 ); - eeVector2i GetMousePos(); + Vector2i GetMousePos(); cInput * GetInput() const; @@ -73,11 +73,11 @@ class EE_API cUIManager { const ColorA& HighlightOverColor() const; - void SendMouseClick( cUIControl * ToCtrl, const eeVector2i& Pos, const Uint32 Flags ); + void SendMouseClick( cUIControl * ToCtrl, const Vector2i& Pos, const Uint32 Flags ); - void SendMouseUp( cUIControl * ToCtrl, const eeVector2i& Pos, const Uint32 Flags ); + void SendMouseUp( cUIControl * ToCtrl, const Vector2i& Pos, const Uint32 Flags ); - void SendMouseDown( cUIControl * ToCtrl, const eeVector2i& Pos, const Uint32 Flags ); + void SendMouseDown( cUIControl * ToCtrl, const Vector2i& Pos, const Uint32 Flags ); Window::cWindow * GetWindow() const; @@ -90,7 +90,7 @@ class EE_API cUIManager { /** @return The position of the mouse when the event MouseDown was fired last time. ** Useful to compare the mouse position of the MouseClick event */ - const eeVector2i& GetMouseDownPos() const; + const Vector2i& GetMouseDownPos() const; void SetControlDragging( bool dragging ); @@ -122,7 +122,7 @@ class EE_API cUIManager { Uint32 mFlags; ColorA mHighlightFocusColor; ColorA mHighlightOverColor; - eeVector2i mMouseDownPos; + Vector2i mMouseDownPos; bool mInit; bool mFirstPress; diff --git a/include/eepp/ui/cuimenu.hpp b/include/eepp/ui/cuimenu.hpp index c2f9fb511..dbef372ba 100644 --- a/include/eepp/ui/cuimenu.hpp +++ b/include/eepp/ui/cuimenu.hpp @@ -43,7 +43,7 @@ class EE_API cUIMenu : public cUIComplexControl { inline ~CreateParams() {} Uint32 RowHeight; - eeRecti PaddingContainer; + Recti PaddingContainer; Uint32 MinWidth; Uint32 MinSpaceForIcons; Uint32 MinRightMargin; @@ -55,7 +55,7 @@ class EE_API cUIMenu : public cUIComplexControl { }; - static void FixMenuPos( eeVector2i& Pos, cUIMenu * Menu, cUIMenu * Parent = NULL, cUIMenuSubMenu * SubMenu = NULL ); + static void FixMenuPos( Vector2i& Pos, cUIMenu * Menu, cUIMenu * Parent = NULL, cUIMenuSubMenu * SubMenu = NULL ); cUIMenu( cUIMenu::CreateParams& Params ); @@ -99,14 +99,14 @@ class EE_API cUIMenu : public cUIComplexControl { virtual bool Hide(); - const eeRecti& Padding() const; + const Recti& Padding() const; protected: friend class cUIMenuItem; friend class cUIMenuCheckBox; friend class cUIMenuSubMenu; std::deque mItems; - eeRecti mPadding; + Recti mPadding; cFont * mFont; ColorA mFontColor; ColorA mFontShadowColor; diff --git a/include/eepp/ui/cuimenucheckbox.hpp b/include/eepp/ui/cuimenucheckbox.hpp index 04fd1f8ef..d2f4b276a 100644 --- a/include/eepp/ui/cuimenucheckbox.hpp +++ b/include/eepp/ui/cuimenucheckbox.hpp @@ -31,7 +31,7 @@ class EE_API cUIMenuCheckBox : public cUIMenuItem { cUISkin * mSkinActive; cUISkin * mSkinInactive; - virtual Uint32 OnMouseUp( const eeVector2i &Pos, const Uint32 Flags ); + virtual Uint32 OnMouseUp( const Vector2i &Pos, const Uint32 Flags ); virtual void OnStateChange(); }; diff --git a/include/eepp/ui/cuimenuitem.hpp b/include/eepp/ui/cuimenuitem.hpp index 039d76fe2..878b1a53d 100644 --- a/include/eepp/ui/cuimenuitem.hpp +++ b/include/eepp/ui/cuimenuitem.hpp @@ -17,7 +17,7 @@ class EE_API cUIMenuItem : public cUIPushButton { virtual void SetTheme( cUITheme * Theme ); protected: - virtual Uint32 OnMouseEnter( const eeVector2i &Pos, const Uint32 Flags ); + virtual Uint32 OnMouseEnter( const Vector2i &Pos, const Uint32 Flags ); virtual void OnStateChange(); }; diff --git a/include/eepp/ui/cuimenusubmenu.hpp b/include/eepp/ui/cuimenusubmenu.hpp index 03cb89686..90d8cdc30 100644 --- a/include/eepp/ui/cuimenusubmenu.hpp +++ b/include/eepp/ui/cuimenusubmenu.hpp @@ -52,9 +52,9 @@ class EE_API cUIMenuSubMenu : public cUIMenuItem { Uint32 mCbId; Uint32 mCbId2; - virtual Uint32 OnMouseExit( const eeVector2i &Pos, const Uint32 Flags ); + virtual Uint32 OnMouseExit( const Vector2i &Pos, const Uint32 Flags ); - virtual Uint32 OnMouseMove( const eeVector2i &Pos, const Uint32 Flags ); + virtual Uint32 OnMouseMove( const Vector2i &Pos, const Uint32 Flags ); virtual void OnStateChange(); diff --git a/include/eepp/ui/cuiprogressbar.hpp b/include/eepp/ui/cuiprogressbar.hpp index 94fbf14e0..79b9e0a19 100644 --- a/include/eepp/ui/cuiprogressbar.hpp +++ b/include/eepp/ui/cuiprogressbar.hpp @@ -23,8 +23,8 @@ class EE_API cUIProgressBar : public cUIComplexControl { bool DisplayPercent; bool VerticalExpand; - eeVector2f MovementSpeed; - eeRectf FillerMargin; + Vector2f MovementSpeed; + Rectf FillerMargin; }; cUIProgressBar( const cUIProgressBar::CreateParams& Params ); @@ -47,17 +47,17 @@ class EE_API cUIProgressBar : public cUIComplexControl { virtual void Draw(); - void MovementSpeed( const eeVector2f& Speed ); + void MovementSpeed( const Vector2f& Speed ); - const eeVector2f& MovementSpeed() const; + const Vector2f& MovementSpeed() const; void VerticalExpand( const bool& VerticalExpand ); const bool& VerticalExpand() const; - void FillerMargin( const eeRectf& margin ); + void FillerMargin( const Rectf& margin ); - const eeRectf& FillerMargin() const; + const Rectf& FillerMargin() const; void DisplayPercent( const bool& DisplayPercent ); @@ -67,8 +67,8 @@ class EE_API cUIProgressBar : public cUIComplexControl { protected: bool mVerticalExpand; - eeVector2f mSpeed; - eeRectf mFillerMargin; + Vector2f mSpeed; + Rectf mFillerMargin; bool mDisplayPercent; Float mProgress; diff --git a/include/eepp/ui/cuipushbutton.hpp b/include/eepp/ui/cuipushbutton.hpp index 1ca0edd24..c88bed8a1 100644 --- a/include/eepp/ui/cuipushbutton.hpp +++ b/include/eepp/ui/cuipushbutton.hpp @@ -51,7 +51,7 @@ class EE_API cUIPushButton : public cUIComplexControl { cSubTexture * Icon; Int32 IconHorizontalMargin; bool IconAutoMargin; - eeSize IconMinSize; + Sizei IconMinSize; }; cUIPushButton( const cUIPushButton::CreateParams& Params ); @@ -72,9 +72,9 @@ class EE_API cUIPushButton : public cUIComplexControl { virtual const String& Text(); - void Padding( const eeRecti& padding ); + void Padding( const Recti& padding ); - const eeRecti& Padding() const; + const Recti& Padding() const; void IconHorizontalMargin( Int32 margin ); diff --git a/include/eepp/ui/cuiradiobutton.hpp b/include/eepp/ui/cuiradiobutton.hpp index c01df5417..7f22e0a86 100644 --- a/include/eepp/ui/cuiradiobutton.hpp +++ b/include/eepp/ui/cuiradiobutton.hpp @@ -24,7 +24,7 @@ class EE_API cUIRadioButton : public cUITextBox { const bool& Active() const; - virtual void Padding( const eeRecti& padding ); + virtual void Padding( const Recti& padding ); cUIControlAnim * ActiveButton() const; diff --git a/include/eepp/ui/cuispinbox.hpp b/include/eepp/ui/cuispinbox.hpp index dd853771a..8d7e10b96 100644 --- a/include/eepp/ui/cuispinbox.hpp +++ b/include/eepp/ui/cuispinbox.hpp @@ -34,9 +34,9 @@ class EE_API cUISpinBox : public cUIComplexControl { virtual void SetTheme( cUITheme * Theme ); - virtual void Padding( const eeRecti& padding ); + virtual void Padding( const Recti& padding ); - const eeRecti& Padding() const; + const Recti& Padding() const; virtual void ClickStep( const Float& step ); diff --git a/include/eepp/ui/cuisprite.hpp b/include/eepp/ui/cuisprite.hpp index b149a8bcf..53e1d231d 100644 --- a/include/eepp/ui/cuisprite.hpp +++ b/include/eepp/ui/cuisprite.hpp @@ -52,11 +52,11 @@ class EE_API cUISprite : public cUIComplexControl { void RenderMode( const EE_RENDER_MODE& render ); - const eeVector2i& AlignOffset() const; + const Vector2i& AlignOffset() const; protected: cSprite * mSprite; EE_RENDER_MODE mRender; - eeVector2i mAlignOffset; + Vector2i mAlignOffset; cSubTexture * mSubTextureLast; bool mDealloc; diff --git a/include/eepp/ui/cuitab.hpp b/include/eepp/ui/cuitab.hpp index 993de3da4..f72a518a6 100644 --- a/include/eepp/ui/cuitab.hpp +++ b/include/eepp/ui/cuitab.hpp @@ -29,7 +29,7 @@ class EE_API cUITab : public cUISelectButton { protected: cUIControl * mCtrlOwned; - virtual Uint32 OnMouseClick( const eeVector2i &Pos, const Uint32 Flags ); + virtual Uint32 OnMouseClick( const Vector2i &Pos, const Uint32 Flags ); virtual void OnStateChange(); diff --git a/include/eepp/ui/cuitextbox.hpp b/include/eepp/ui/cuitextbox.hpp index a4039a409..45f6745c7 100644 --- a/include/eepp/ui/cuitextbox.hpp +++ b/include/eepp/ui/cuitextbox.hpp @@ -72,9 +72,9 @@ class EE_API cUITextBox : public cUIComplexControl { virtual void OnFontChanged(); - virtual void Padding( const eeRecti& padding ); + virtual void Padding( const Recti& padding ); - const eeRecti& Padding() const; + const Recti& Padding() const; virtual void SetTheme( cUITheme * Theme ); @@ -86,7 +86,7 @@ class EE_API cUITextBox : public cUIComplexControl { const int& GetNumLines() const; - const eeVector2f& AlignOffset() const; + const Vector2f& AlignOffset() const; virtual void ShrinkText( const Uint32& MaxWidth ); @@ -97,8 +97,8 @@ class EE_API cUITextBox : public cUIComplexControl { ColorA mFontColor; ColorA mFontShadowColor; ColorA mFontSelectionBackColor; - eeVector2f mAlignOffset; - eeRecti mPadding; + Vector2f mAlignOffset; + Recti mPadding; Int32 mSelCurInit; Int32 mSelCurEnd; @@ -114,11 +114,11 @@ class EE_API cUITextBox : public cUIComplexControl { virtual Uint32 OnFocusLoss(); - virtual Uint32 OnMouseDoubleClick( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseDoubleClick( const Vector2i& Pos, const Uint32 Flags ); - virtual Uint32 OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseClick( const Vector2i& Pos, const Uint32 Flags ); - virtual Uint32 OnMouseDown( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseDown( const Vector2i& Pos, const Uint32 Flags ); virtual void SelCurInit( const Int32& init ); diff --git a/include/eepp/ui/cuitextedit.hpp b/include/eepp/ui/cuitextedit.hpp index 858efb3eb..fd0d220eb 100644 --- a/include/eepp/ui/cuitextedit.hpp +++ b/include/eepp/ui/cuitextedit.hpp @@ -56,7 +56,7 @@ class EE_API cUITextEdit : public cUIComplexControl { cUIScrollBar * mVScrollBar; UI_SCROLLBAR_MODE mHScrollBarMode; UI_SCROLLBAR_MODE mVScrollBarMode; - eeRecti mPadding; + Recti mPadding; String mText; bool mSkipValueChange; @@ -64,7 +64,7 @@ class EE_API cUITextEdit : public cUIComplexControl { virtual void OnAlphaChange(); - virtual void OnParentSizeChange( const eeVector2i& SizeChange ); + virtual void OnParentSizeChange( const Vector2i& SizeChange ); void OnVScrollValueChange( const cUIEvent * Event ); diff --git a/include/eepp/ui/cuitextinput.hpp b/include/eepp/ui/cuitextinput.hpp index 6d5f183a5..64e2e034d 100644 --- a/include/eepp/ui/cuitextinput.hpp +++ b/include/eepp/ui/cuitextinput.hpp @@ -56,7 +56,7 @@ class EE_API cUITextInput : public cUITextBox { protected: cInputTextBuffer mTextBuffer; Float mWaitCursorTime; - eeVector2f mCurPos; + Vector2f mCurPos; int mCursorPos; bool mAllowEditing; bool mShowingWait; @@ -71,11 +71,11 @@ class EE_API cUITextInput : public cUITextBox { void AutoPadding(); - virtual Uint32 OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseClick( const Vector2i& Pos, const Uint32 Flags ); - virtual Uint32 OnMouseDoubleClick( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseDoubleClick( const Vector2i& Pos, const Uint32 Flags ); - virtual Uint32 OnMouseExit( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseExit( const Vector2i& Pos, const Uint32 Flags ); virtual Uint32 OnFocus(); diff --git a/include/eepp/ui/cuitheme.hpp b/include/eepp/ui/cuitheme.hpp index 029aeb459..eec791139 100644 --- a/include/eepp/ui/cuitheme.hpp +++ b/include/eepp/ui/cuitheme.hpp @@ -102,55 +102,55 @@ 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, ColorA SubTextureColor = ColorA(255,255,255,255), EE_RENDER_MODE SubTextureRender = RN_NORMAL ); + virtual cUIGfx * CreateGfx( cSubTexture * SubTexture, cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), 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 ); + virtual cUISprite * CreateSprite( cSprite * Sprite, cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), 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 ); + virtual cUICheckBox * CreateCheckBox( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS ); - virtual cUIRadioButton * CreateRadioButton( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS ); + virtual cUIRadioButton * CreateRadioButton( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS ); - virtual cUITextBox * CreateTextBox( const String& Text = "", cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + virtual cUITextBox * CreateTextBox( const String& Text = "", cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); - virtual cUITextEdit * CreateTextEdit( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_PADDING | UI_CLIP_ENABLE | UI_AUTO_SIZE | UI_TEXT_SELECTION_ENABLED, UI_SCROLLBAR_MODE HScrollBar = UI_SCROLLBAR_AUTO, UI_SCROLLBAR_MODE VScrollBar = UI_SCROLLBAR_AUTO, bool WordWrap = true ); + virtual cUITextEdit * CreateTextEdit( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_PADDING | UI_CLIP_ENABLE | UI_AUTO_SIZE | UI_TEXT_SELECTION_ENABLED, UI_SCROLLBAR_MODE HScrollBar = UI_SCROLLBAR_AUTO, UI_SCROLLBAR_MODE VScrollBar = UI_SCROLLBAR_AUTO, bool WordWrap = true ); - virtual cUITextInput * CreateTextInput( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_TEXT_SELECTION_ENABLED, bool SupportFreeEditing = true, Uint32 MaxLength = 256 ); + virtual cUITextInput * CreateTextInput( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_TEXT_SELECTION_ENABLED, bool SupportFreeEditing = true, Uint32 MaxLength = 256 ); - virtual cUITextInputPassword * CreateTextInputPassword( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_TEXT_SELECTION_ENABLED, bool SupportFreeEditing = true, Uint32 MaxLength = 256 ); + virtual cUITextInputPassword * CreateTextInputPassword( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_TEXT_SELECTION_ENABLED, bool SupportFreeEditing = true, Uint32 MaxLength = 256 ); - virtual cUITooltip * CreateTooltip( cUIControl * TooltipOf, cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_PADDING | UI_AUTO_SIZE ); + virtual cUITooltip * CreateTooltip( cUIControl * TooltipOf, cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_PADDING | UI_AUTO_SIZE ); - virtual cUIScrollBar * CreateScrollBar( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE, bool VerticalScrollBar = false ); + virtual cUIScrollBar * CreateScrollBar( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE, bool VerticalScrollBar = false ); - virtual cUISlider * CreateSlider( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS, bool VerticalSlider = false, bool AllowHalfSliderOut = true, bool ExpandBackground = false ); + virtual cUISlider * CreateSlider( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS, bool VerticalSlider = false, bool AllowHalfSliderOut = true, bool ExpandBackground = false ); - virtual cUISpinBox * CreateSpinBox( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_SIZE | UI_TEXT_SELECTION_ENABLED, Float DefaultValue = 0.f, bool AllowDotsInNumbers = true ); + virtual cUISpinBox * CreateSpinBox( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_SIZE | UI_TEXT_SELECTION_ENABLED, Float DefaultValue = 0.f, bool AllowDotsInNumbers = true ); - virtual cUIComboBox * CreateComboBox( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_TEXT_SELECTION_ENABLED, Uint32 MinNumVisibleItems = 6, bool PopUpToMainControl = false, cUIListBox * ListBox = NULL ); + virtual cUIComboBox * CreateComboBox( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_TEXT_SELECTION_ENABLED, Uint32 MinNumVisibleItems = 6, bool PopUpToMainControl = false, cUIListBox * ListBox = NULL ); - virtual cUIDropDownList * CreateDropDownList( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING, Uint32 MinNumVisibleItems = 6, bool PopUpToMainControl = false, cUIListBox * ListBox = NULL ); + virtual cUIDropDownList * CreateDropDownList( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING, Uint32 MinNumVisibleItems = 6, bool PopUpToMainControl = false, cUIListBox * ListBox = NULL ); - virtual cUIListBox * CreateListBox( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING, bool SmoothScroll = true, Uint32 RowHeight = 0, UI_SCROLLBAR_MODE VScrollMode = UI_SCROLLBAR_AUTO, UI_SCROLLBAR_MODE HScrollMode = UI_SCROLLBAR_AUTO, eeRecti PaddingContainer = eeRecti() ); + virtual cUIListBox * CreateListBox( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING, bool SmoothScroll = true, Uint32 RowHeight = 0, UI_SCROLLBAR_MODE VScrollMode = UI_SCROLLBAR_AUTO, UI_SCROLLBAR_MODE HScrollMode = UI_SCROLLBAR_AUTO, Recti PaddingContainer = Recti() ); - virtual cUIMenu * CreateMenu( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE | UI_AUTO_PADDING, Uint32 RowHeight = 0, eeRecti PaddingContainer = eeRecti(), Uint32 MinWidth = 0, Uint32 MinSpaceForIcons = 0, Uint32 MinRightMargin = 0 ); + virtual cUIMenu * CreateMenu( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE | UI_AUTO_PADDING, Uint32 RowHeight = 0, Recti PaddingContainer = Recti(), Uint32 MinWidth = 0, Uint32 MinSpaceForIcons = 0, Uint32 MinRightMargin = 0 ); - virtual cUIPopUpMenu * CreatePopUpMenu( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE | UI_AUTO_PADDING, Uint32 RowHeight = 0, eeRecti PaddingContainer = eeRecti(), Uint32 MinWidth = 0, Uint32 MinSpaceForIcons = 0, Uint32 MinRightMargin = 0 ); + virtual cUIPopUpMenu * CreatePopUpMenu( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE | UI_AUTO_PADDING, Uint32 RowHeight = 0, Recti PaddingContainer = Recti(), Uint32 MinWidth = 0, Uint32 MinSpaceForIcons = 0, Uint32 MinRightMargin = 0 ); - virtual cUIProgressBar * CreateProgressBar( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS, bool DisplayPercent = false, bool VerticalExpand = false, eeVector2f MovementSpeed = eeVector2f( 64, 0 ), eeRectf FillerMargin = eeRectf() ); + virtual cUIProgressBar * CreateProgressBar( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS, bool DisplayPercent = false, bool VerticalExpand = false, Vector2f MovementSpeed = Vector2f( 64, 0 ), Rectf FillerMargin = Rectf() ); - virtual cUIPushButton * CreatePushButton( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, cSubTexture * Icon = NULL, Int32 IconHorizontalMargin = 0, bool IconAutoMargin = true ); + virtual cUIPushButton * CreatePushButton( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, cSubTexture * Icon = NULL, Int32 IconHorizontalMargin = 0, bool IconAutoMargin = true ); - virtual cUISelectButton * CreateSelectButton( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, cSubTexture * Icon = NULL, Int32 IconHorizontalMargin = 0, bool IconAutoMargin = true ); + virtual cUISelectButton * CreateSelectButton( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, cSubTexture * Icon = NULL, Int32 IconHorizontalMargin = 0, bool IconAutoMargin = true ); - virtual cUIWinMenu * CreateWinMenu( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS, Uint32 MarginBetweenButtons = 0, Uint32 ButtonMargin = 4, Uint32 MenuHeight = 0, Uint32 FirstButtonMargin = 1 ); + virtual cUIWinMenu * CreateWinMenu( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS, Uint32 MarginBetweenButtons = 0, Uint32 ButtonMargin = 4, Uint32 MenuHeight = 0, Uint32 FirstButtonMargin = 1 ); - virtual cUIWindow * CreateWindow( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED, Uint32 WinFlags = UI_WIN_DEFAULT_FLAGS, eeSize MinWindowSize = eeSize(0,0), Uint8 BaseAlpha = 255 ); + virtual cUIWindow * CreateWindow( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED, Uint32 WinFlags = UI_WIN_DEFAULT_FLAGS, Sizei MinWindowSize = Sizei(0,0), Uint8 BaseAlpha = 255 ); - virtual cUICommonDialog * CreateCommonDialog( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED, Uint32 WinFlags = UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON, eeSize MinWindowSize = eeSize(0,0), Uint8 BaseAlpha = 255, Uint32 CDLFlags = UI_CDL_DEFAULT_FLAGS, std::string DefaultFilePattern = "*", std::string DefaultDirectory = Sys::GetProcessPath() ); + virtual cUICommonDialog * CreateCommonDialog( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED, Uint32 WinFlags = UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON, Sizei MinWindowSize = Sizei(0,0), Uint8 BaseAlpha = 255, Uint32 CDLFlags = UI_CDL_DEFAULT_FLAGS, std::string DefaultFilePattern = "*", std::string DefaultDirectory = Sys::GetProcessPath() ); - virtual cUIMessageBox * CreateMessageBox( UI_MSGBOX_TYPE Type = MSGBOX_OKCANCEL, const String& Message = String(), Uint32 WinFlags = UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED, eeSize MinWindowSize = eeSize(0,0), Uint8 BaseAlpha = 255 ); + virtual cUIMessageBox * CreateMessageBox( UI_MSGBOX_TYPE Type = MSGBOX_OKCANCEL, const String& Message = String(), Uint32 WinFlags = UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS_CENTERED, Sizei MinWindowSize = Sizei(0,0), Uint8 BaseAlpha = 255 ); - virtual cUITabWidget * CreateTabWidget( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_HALIGN_CENTER | UI_VALIGN_BOTTOM | UI_CONTROL_DEFAULT_ANCHOR, const bool& TabsClosable = false, const bool& SpecialBorderTabs = false , const Int32& TabSeparation = 0, const Uint32& MaxTextLength = 30, const Uint32& TabWidgetHeight = 0, const Uint32& TabTextAlign = UI_HALIGN_CENTER | UI_VALIGN_CENTER, const Uint32& MinTabWidth = 32, const Uint32& MaxTabWidth = 210 ); + virtual cUITabWidget * CreateTabWidget( cUIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_HALIGN_CENTER | UI_VALIGN_BOTTOM | UI_CONTROL_DEFAULT_ANCHOR, const bool& TabsClosable = false, const bool& SpecialBorderTabs = false , const Int32& TabSeparation = 0, const Uint32& MaxTextLength = 30, const Uint32& TabWidgetHeight = 0, const Uint32& TabTextAlign = UI_HALIGN_CENTER | UI_VALIGN_CENTER, const Uint32& MinTabWidth = 32, const Uint32& MaxTabWidth = 210 ); protected: std::string mName; Uint32 mNameHash; diff --git a/include/eepp/ui/cuithememanager.hpp b/include/eepp/ui/cuithememanager.hpp index 5b46d3599..b4541d16a 100644 --- a/include/eepp/ui/cuithememanager.hpp +++ b/include/eepp/ui/cuithememanager.hpp @@ -54,9 +54,9 @@ class EE_API cUIThemeManager : public ResourceManager { const bool& TooltipFollowMouse() const; - void CursorSize( const eeSize& Size ); + void CursorSize( const Sizei& Size ); - const eeSize& CursorSize() const; + const Sizei& CursorSize() const; protected: cFont * mFont; cUITheme * mThemeDefault; @@ -69,7 +69,7 @@ class EE_API cUIThemeManager : public ResourceManager { Time mTooltipTimeToShow; bool mTooltipFollowMouse; - eeSize mCursorSize; + Sizei mCursorSize; cUIThemeManager(); }; diff --git a/include/eepp/ui/cuitooltip.hpp b/include/eepp/ui/cuitooltip.hpp index 28edfb7cf..ad1a49b1d 100644 --- a/include/eepp/ui/cuitooltip.hpp +++ b/include/eepp/ui/cuitooltip.hpp @@ -36,7 +36,7 @@ class EE_API cUITooltip : public cUIControlAnim { cFont * Font; ColorA FontColor; ColorA FontShadowColor; - eeRecti Padding; + Recti Padding; }; cUITooltip( cUITooltip::CreateParams& Params, cUIControl * TooltipOf ); @@ -77,9 +77,9 @@ class EE_API cUITooltip : public cUIControlAnim { virtual void OnFontChanged(); - virtual void Padding( const eeRecti& padding ); + virtual void Padding( const Recti& padding ); - const eeRecti& Padding() const; + const Recti& Padding() const; cTextCache * GetTextCache(); @@ -89,7 +89,7 @@ class EE_API cUITooltip : public cUIControlAnim { const int& GetNumLines() const; - const eeVector2f& AlignOffset() const; + const Vector2f& AlignOffset() const; void TooltipTime( const Time& Time ); @@ -100,8 +100,8 @@ class EE_API cUITooltip : public cUIControlAnim { cTextCache * mTextCache; ColorA mFontColor; ColorA mFontShadowColor; - eeVector2f mAlignOffset; - eeRecti mPadding; + Vector2f mAlignOffset; + Recti mPadding; Time mTooltipTime; cUIControl * mTooltipOf; diff --git a/include/eepp/ui/cuiwindow.hpp b/include/eepp/ui/cuiwindow.hpp index 884d23780..5361171bd 100644 --- a/include/eepp/ui/cuiwindow.hpp +++ b/include/eepp/ui/cuiwindow.hpp @@ -26,10 +26,10 @@ class EE_API cUIWindow : public cUIComplexControl { inline ~CreateParams() {} Uint32 WinFlags; - eeSize DecorationSize; - eeSize BorderSize; - eeSize MinWindowSize; - eeVector2i ButtonsPositionFixer; + Sizei DecorationSize; + Sizei BorderSize; + Sizei MinWindowSize; + Vector2i ButtonsPositionFixer; Uint32 ButtonsSeparation; Int32 MinCornerDistance; ColorA TitleFontColor; @@ -46,11 +46,11 @@ class EE_API cUIWindow : public cUIComplexControl { virtual bool IsType( const Uint32& type ) const; - virtual void Size( const eeSize& Size ); + virtual void Size( const Sizei& Size ); void Size( const Int32& Width, const Int32& Height ); - const eeSize& Size(); + const Sizei& Size(); virtual void SetTheme( cUITheme * Theme ); @@ -146,17 +146,17 @@ class EE_API cUIWindow : public cUIComplexControl { cUIControlAnim * mModalCtrl; - eeSize mDecoSize; - eeSize mBorderSize; - eeSize mMinWindowSize; - eeVector2i mNonMaxPos; - eeSize mNonMaxSize; - eeVector2i mButtonsPositionFixer; + Sizei mDecoSize; + Sizei mBorderSize; + Sizei mMinWindowSize; + Vector2i mNonMaxPos; + Sizei mNonMaxSize; + Vector2i mButtonsPositionFixer; Uint32 mButtonsSeparation; Int32 mMinCornerDistance; UI_RESIZE_TYPE mResizeType; - eeVector2i mResizePos; + Vector2i mResizePos; ColorA mTitleFontColor; @@ -193,7 +193,7 @@ class EE_API cUIWindow : public cUIComplexControl { void UpdateResize(); - void InternalSize( eeSize Size ); + void InternalSize( Sizei Size ); void InternalSize( const Int32& w, const Int32& h ); @@ -201,7 +201,7 @@ class EE_API cUIWindow : public cUIComplexControl { void FixTitleSize(); - Uint32 OnMouseDoubleClick( const eeVector2i &Pos, const Uint32 Flags ); + Uint32 OnMouseDoubleClick( const Vector2i &Pos, const Uint32 Flags ); void CheckShortcuts( const Uint32& KeyCode, const Uint32& Mod ); diff --git a/include/eepp/ui/tools/ctextureatlaseditor.hpp b/include/eepp/ui/tools/ctextureatlaseditor.hpp index cb1e00da7..32d3a0c72 100644 --- a/include/eepp/ui/tools/ctextureatlaseditor.hpp +++ b/include/eepp/ui/tools/ctextureatlaseditor.hpp @@ -70,7 +70,7 @@ class EE_API cTextureAtlasEditor { void OnSubTextureChange( const cUIEvent * Event ); - cUITextBox * CreateTxtBox( eeVector2i Pos, const String& Text ); + cUITextBox * CreateTxtBox( Vector2i Pos, const String& Text ); void UpdateControls(); diff --git a/include/eepp/ui/tuiitemcontainer.hpp b/include/eepp/ui/tuiitemcontainer.hpp index 08f74f289..044217dc3 100644 --- a/include/eepp/ui/tuiitemcontainer.hpp +++ b/include/eepp/ui/tuiitemcontainer.hpp @@ -16,7 +16,7 @@ class tUIItemContainer : public cUIControl { void DrawChilds(); protected: - cUIControl * OverFind( const eeVector2f& Point ); + cUIControl * OverFind( const Vector2f& Point ); }; template @@ -54,7 +54,7 @@ void tUIItemContainer::DrawChilds() { } template -cUIControl * tUIItemContainer::OverFind( const eeVector2f& Point ) { +cUIControl * tUIItemContainer::OverFind( const Vector2f& Point ) { TContainer * tParent = reinterpret_cast ( Parent() ); cUIControl * pOver = NULL; diff --git a/include/eepp/window/ccursor.hpp b/include/eepp/window/ccursor.hpp index d1e4691ea..b79ec90c8 100644 --- a/include/eepp/window/ccursor.hpp +++ b/include/eepp/window/ccursor.hpp @@ -22,7 +22,7 @@ class EE_API cCursor { const std::string& Name() const; /** @return The cursor hotspot, this means, the position inside the cursor image, where the click is taken */ - const eeVector2i& HotSpot() const; + const Vector2i& HotSpot() const; /** @return The pointer to the image that represents the cursor */ cImage * Image() const; @@ -34,14 +34,14 @@ class EE_API cCursor { Uint32 mId; std::string mName; cImage * mImage; - eeVector2i mHotSpot; + Vector2i mHotSpot; cWindow * mWindow; - cCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursor( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursor( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursor( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); virtual void Create() = 0; }; diff --git a/include/eepp/window/ccursormanager.hpp b/include/eepp/window/ccursormanager.hpp index b3d196b3d..43c977111 100644 --- a/include/eepp/window/ccursormanager.hpp +++ b/include/eepp/window/ccursormanager.hpp @@ -27,21 +27,21 @@ class EE_API cCursorManager { * @param hotspot The hotspot where the mouse click is taken * @param name The name of the cursor */ - virtual cCursor * Create( cTexture * tex, const eeVector2i& hotspot, const std::string& name ) = 0; + virtual cCursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ) = 0; /** Creates a cursor from a image * @param img The image path * @param hotspot The hotspot where the mouse click is taken * @param name The name of the cursor */ - virtual cCursor * Create( cImage * img, const eeVector2i& hotspot, const std::string& name ) = 0; + virtual cCursor * Create( cImage * img, const Vector2i& hotspot, const std::string& name ) = 0; /** Creates a cursor from a image path * @param path The image pointer to use as cursor * @param hotspot The hotspot where the mouse click is taken * @param name The name of the cursor */ - virtual cCursor * Create( const std::string& path, const eeVector2i& hotspot, const std::string& name ) = 0; + virtual cCursor * Create( const std::string& path, const Vector2i& hotspot, const std::string& name ) = 0; /** Adds the cursor to the cursor manager */ virtual cCursor * Add( cCursor * cursor ); diff --git a/include/eepp/window/cinput.hpp b/include/eepp/window/cinput.hpp index d7cb9c3d1..944222a59 100644 --- a/include/eepp/window/cinput.hpp +++ b/include/eepp/window/cinput.hpp @@ -45,7 +45,7 @@ class EE_API cInput { void InjectKeyDown( const EE_KEY& Key ); /** Inject the mouse position given */ - void InjectMousePos( const eeVector2i& Pos ); + void InjectMousePos( const Vector2i& Pos ); /** Inject the mouse button as pressed */ void InjectButtonPress( const Uint32& Button ); @@ -107,16 +107,16 @@ class EE_API cInput { void PopCallback( const Uint32& CallbackId ); /** @return The Mouse position vector */ - eeVector2i GetMousePos() const; + Vector2i GetMousePos() const; /** @return The position vector converted to float */ - eeVector2f GetMousePosf(); + Vector2f GetMousePosf(); /** This will change the value of the mouse pos, will not REALLY move the mouse ( for that is InjectMousePos ). */ - void SetMousePos( const eeVector2i& Pos ); + void SetMousePos( const Vector2i& Pos ); /** @return The mouse position over the current view */ - eeVector2i GetMousePosFromView( const cView& View ); + Vector2i GetMousePosFromView( const cView& View ); /** @return The Mouse X axis position */ Uint16 MouseX() const; @@ -204,7 +204,7 @@ class EE_API cInput { Uint32 mLastButtonRightClick; Uint32 mLastButtonMiddleClick; Uint32 mTClick; - eeVector2i mMousePos; + Vector2i mMousePos; Uint32 mNumCallBacks; Float mMouseSpeed; bool mInputGrabed; diff --git a/include/eepp/window/cinputfinger.hpp b/include/eepp/window/cinputfinger.hpp index 724c6c539..5f7351281 100644 --- a/include/eepp/window/cinputfinger.hpp +++ b/include/eepp/window/cinputfinger.hpp @@ -31,7 +31,7 @@ class cInputFinger { bool WasDown(); /** @return The current position of the finger */ - eeVector2i Pos(); + Vector2i Pos(); protected: friend class cInput; diff --git a/include/eepp/window/cjoystick.hpp b/include/eepp/window/cjoystick.hpp index 1afc09815..db46b1d36 100644 --- a/include/eepp/window/cjoystick.hpp +++ b/include/eepp/window/cjoystick.hpp @@ -35,7 +35,7 @@ class EE_API cJoystick { virtual Float GetAxis( const Int32& axis ) = 0; /** @return The ball motion position */ - virtual eeVector2i GetBallMotion( const Int32& ball ) = 0; + virtual Vector2i GetBallMotion( const Int32& ball ) = 0; /** @return True if the joystick is plugged in */ virtual bool Plugged() const = 0; diff --git a/include/eepp/window/cplatformimpl.hpp b/include/eepp/window/cplatformimpl.hpp index 187a079f7..7f5d29adb 100644 --- a/include/eepp/window/cplatformimpl.hpp +++ b/include/eepp/window/cplatformimpl.hpp @@ -67,7 +67,7 @@ class cPlatformImpl { virtual void SetContext( eeWindowContex Context ) = 0; /** @return The current window position */ - virtual eeVector2i Position() = 0; + virtual Vector2i Position() = 0; /** Force to show the mouse cursor */ virtual void ShowMouseCursor() = 0; @@ -80,21 +80,21 @@ class cPlatformImpl { * @param hotspot The hotspot where the mouse click is taken * @param name The name of the cursor */ - virtual cCursor * CreateMouseCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name ) = 0; + virtual cCursor * CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ) = 0; /** Creates a cursor from a image * @param img The image path * @param hotspot The hotspot where the mouse click is taken * @param name The name of the cursor */ - virtual cCursor * CreateMouseCursor( cImage * img, const eeVector2i& hotspot, const std::string& name ) = 0; + virtual cCursor * CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ) = 0; /** Creates a cursor from a image path * @param path The image pointer to use as cursor * @param hotspot The hotspot where the mouse click is taken * @param name The name of the cursor */ - virtual cCursor * CreateMouseCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name ) = 0; + virtual cCursor * CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ) = 0; /** Set the the current cursor by its cursor pointer */ virtual void SetMouseCursor( cCursor * cursor ) = 0; diff --git a/include/eepp/window/cview.hpp b/include/eepp/window/cview.hpp index dec754c5e..c53e80f31 100755 --- a/include/eepp/window/cview.hpp +++ b/include/eepp/window/cview.hpp @@ -12,7 +12,7 @@ class EE_API cView { cView( const int& X, const int& Y, const int& Width, const int& Height ); - cView( const eeRecti& View ); + cView( const Recti& View ); ~cView(); @@ -20,22 +20,22 @@ class EE_API cView { void Move( const int& OffsetX, const int& OffsetY ); /** Offset the position */ - void Move( const eeVector2i& Offset ); + void Move( const Vector2i& Offset ); /** Scale the current view (from center) */ void Scale( const Float& Factor ); /** Scale the current view (from center) */ - void Scale( const eeVector2f& Factor ); + void Scale( const Vector2f& Factor ); /** @return The center position of the view */ - eeVector2i Center() const; + Vector2i Center() const; /** Set the center position of the view ( will move it if is needed ) */ - void Center( const eeVector2i& Center ); + void Center( const Vector2i& Center ); /** @return The current view ( Left = X, Right = Width, Top = Y, Bottom = Height ) */ - eeRecti GetView() const { return mView; } + Recti GetView() const { return mView; } /** Set a new position to the view */ void SetPosition( const int& X, const int& Y ); @@ -49,8 +49,8 @@ class EE_API cView { friend class cWindow; bool mNeedUpdate; - eeRecti mView; - eeVector2f mCenter; + Recti mView; + Vector2f mCenter; void CalcCenter(); diff --git a/include/eepp/window/cwindow.hpp b/include/eepp/window/cwindow.hpp index 233c2e588..13c9e3d33 100644 --- a/include/eepp/window/cwindow.hpp +++ b/include/eepp/window/cwindow.hpp @@ -112,8 +112,8 @@ class WindowInfo { WindowSettings WindowConfig; ContextSettings ContextConfig; Uint32 Backend; - eeSize DesktopResolution; - eeSize WindowSize; + Sizei DesktopResolution; + Sizei WindowSize; Uint32 Flags; RGB BackgroundColor; bool Created; @@ -188,7 +188,7 @@ class EE_API cWindow { virtual void Position( Int16 Left, Int16 Top ); /** @return The Current Window Position */ - virtual eeVector2i Position(); + virtual Vector2i Position(); /** Set as current context the default context ( the context used for the window creation ) */ virtual void SetDefaultContext(); @@ -250,7 +250,7 @@ class EE_API cWindow { virtual bool Resizeable() const; /** @return The window size */ - virtual eeSize Size(); + virtual Sizei Size(); /** @return The Window Width */ virtual const Uint32& GetWidth() const; @@ -259,7 +259,7 @@ class EE_API cWindow { virtual const Uint32& GetHeight() const; /** @return The current desktop resolution */ - virtual const eeSize& GetDesktopResolution(); + virtual const Sizei& GetDesktopResolution(); /** Center the window to the desktop ( if windowed ) */ virtual void Center(); @@ -381,7 +381,7 @@ class EE_API cWindow { * * @sa StartTextInput() */ - virtual void SetTextInputRect( eeRecti& rect ); + virtual void SetTextInputRect( Recti& rect ); /** * @brief Returns whether the platform has some screen keyboard support. diff --git a/projects/linux/ee.files b/projects/linux/ee.files index 120c48048..ab06144ba 100644 --- a/projects/linux/ee.files +++ b/projects/linux/ee.files @@ -160,9 +160,9 @@ ../../include/eepp/graphics/renderer/cgl.hpp ../../include/eepp/graphics/renderer/base.hpp ../../include/eepp/math/math.hpp -../../include/eepp/math/cmtrand.hpp +../../include/eepp/math/mtrand.hpp ../../include/eepp/math/base.hpp -../../src/eepp/math/cmtrand.cpp +../../src/eepp/math/mtrand.cpp ../../include/eepp/physics/settings.hpp ../../include/eepp/physics/physicshelper.hpp ../../include/eepp/physics/moment.hpp @@ -333,15 +333,15 @@ ../../include/eepp/math/line2.hpp ../../include/eepp/math/ease.hpp ../../include/eepp/math/easing.hpp -../../include/eepp/math/cwaypoints.hpp -../../include/eepp/math/cperlinnoise.hpp +../../include/eepp/math/waypoints.hpp +../../include/eepp/math/perlinnoise.hpp ../../include/eepp/system/colors.hpp -../../include/eepp/math/cinterpolation.hpp +../../include/eepp/math/interpolation.hpp ../../src/eepp/system/safedatapointer.cpp ../../src/eepp/math/easing.cpp -../../src/eepp/math/cwaypoints.cpp -../../src/eepp/math/cperlinnoise.cpp -../../src/eepp/math/cinterpolation.cpp +../../src/eepp/math/waypoints.cpp +../../src/eepp/math/perlinnoise.cpp +../../src/eepp/math/interpolation.cpp ../../include/eepp/window/keycodes.hpp ../../include/eepp/window/joycodes.hpp ../../include/eepp/window/inputhelper.hpp diff --git a/src/eepp/audio/audiolistener.cpp b/src/eepp/audio/audiolistener.cpp index 81b37d94f..69f1f9140 100755 --- a/src/eepp/audio/audiolistener.cpp +++ b/src/eepp/audio/audiolistener.cpp @@ -27,14 +27,14 @@ void AudioListener::Position( const float& X, const float& Y, const float& Z ) { ALCheck( alListener3f( AL_POSITION, X, Y, Z ) ); } -void AudioListener::Position(const eeVector3ff& Position) { +void AudioListener::Position(const Vector3ff& Position) { AudioListener::Position( Position.x, Position.y, Position.z ); } -eeVector3ff AudioListener::Position() { +Vector3ff AudioListener::Position() { EnsureALInit(); - eeVector3ff Position; + Vector3ff Position; ALCheck( alGetListener3f( AL_POSITION, &Position.x, &Position.y, &Position.z ) ); return Position; @@ -47,17 +47,17 @@ void AudioListener::Target( const float& X, const float& Y, const float& Z ) { ALCheck( alListenerfv( AL_ORIENTATION, Orientation ) ); } -void AudioListener::Target(const eeVector3ff& Target) { +void AudioListener::Target(const Vector3ff& Target) { AudioListener::Target( Target.x, Target.y, Target.z ); } -eeVector3ff AudioListener::Target() { +Vector3ff AudioListener::Target() { EnsureALInit(); float Orientation[6]; ALCheck( alGetListenerfv( AL_ORIENTATION, Orientation ) ); - return eeVector3ff( Orientation[0], Orientation[1], Orientation[2] ); + return Vector3ff( Orientation[0], Orientation[1], Orientation[2] ); } }} diff --git a/src/eepp/audio/sound.cpp b/src/eepp/audio/sound.cpp index 27971c86f..a8706303d 100755 --- a/src/eepp/audio/sound.cpp +++ b/src/eepp/audio/sound.cpp @@ -13,7 +13,7 @@ Sound::Sound() : ALCheck( alSourcei( mSource, AL_BUFFER, 0 ) ); } -Sound::Sound( const SoundBuffer& Buffer, const bool& Loop, const float& Pitch, const float& Volume, const eeVector3ff& Position ) : +Sound::Sound( const SoundBuffer& Buffer, const bool& Loop, const float& Pitch, const float& Volume, const Vector3ff& Position ) : mBuffer(&Buffer) { EnsureALInit(); @@ -92,7 +92,7 @@ void Sound::Position( const float& X, const float& Y, const float& Z ) { ALCheck( alSource3f( mSource, AL_POSITION, X, Y, Z ) ); } -void Sound::Position( const eeVector3ff& Position ) { +void Sound::Position( const Vector3ff& Position ) { this->Position( Position.x, Position.y, Position.z ); } @@ -129,8 +129,8 @@ float Sound::Volume() const { return Gain * 100.f; } -eeVector3ff Sound::Position() const { - eeVector3ff Position; +Vector3ff Sound::Position() const { + Vector3ff Position; #if EE_PLATFORM != EE_PLATFORM_EMSCRIPTEN ALCheck( alGetSource3f( mSource, AL_POSITION, &Position.x, &Position.y, &Position.z ) ); diff --git a/src/eepp/gaming/cgameobject.cpp b/src/eepp/gaming/cgameobject.cpp index f68a7807c..f597d3763 100644 --- a/src/eepp/gaming/cgameobject.cpp +++ b/src/eepp/gaming/cgameobject.cpp @@ -79,23 +79,23 @@ void cGameObject::Draw() { void cGameObject::Update() { } -eeVector2f cGameObject::Pos() const { - return eeVector2f(); +Vector2f cGameObject::Pos() const { + return Vector2f(); } -void cGameObject::Pos( eeVector2f pos ) { +void cGameObject::Pos( Vector2f pos ) { AutoFixTilePos(); } -eeVector2i cGameObject::TilePos() const { - return eeVector2i(); +Vector2i cGameObject::TilePos() const { + return Vector2i(); } -void cGameObject::TilePos( eeVector2i pos ) { +void cGameObject::TilePos( Vector2i pos ) { } -eeSize cGameObject::Size() { - return eeSize(); +Sizei cGameObject::Size() { + return Sizei(); } Uint32 cGameObject::DataId() { @@ -125,11 +125,11 @@ cLayer * cGameObject::Layer() const { void cGameObject::AutoFixTilePos() { if ( ( mFlags & GObjFlags::GAMEOBJECT_AUTO_FIX_TILE_POS ) && NULL != mLayer && mLayer->Type() == MAP_LAYER_TILED ) { - eeVector2i CurPos = TilePos(); + Vector2i CurPos = TilePos(); AssignTilePos(); - eeVector2i NewPos = TilePos(); + Vector2i NewPos = TilePos(); if ( CurPos != NewPos ) { cTileLayer * TLayer = static_cast ( mLayer ); diff --git a/src/eepp/gaming/cgameobjectobject.cpp b/src/eepp/gaming/cgameobjectobject.cpp index c1ab4e48e..6194bc14c 100644 --- a/src/eepp/gaming/cgameobjectobject.cpp +++ b/src/eepp/gaming/cgameobjectobject.cpp @@ -8,7 +8,7 @@ using namespace EE::Graphics; namespace EE { namespace Gaming { -cGameObjectObject::cGameObjectObject( Uint32 DataId, const eeRectf& rect, cLayer * Layer, const Uint32& Flags ) : +cGameObjectObject::cGameObjectObject( Uint32 DataId, const Rectf& rect, cLayer * Layer, const Uint32& Flags ) : cGameObject( Flags, Layer ), mRect( rect ), mPoly( rect ), @@ -29,9 +29,9 @@ bool cGameObjectObject::IsType( const Uint32& type ) { return ( cGameObjectObject::Type() == type ) ? true : cGameObject::IsType( type ); } -eeSize cGameObjectObject::Size() { - eeSizef size( mRect.Size() ); - return eeSize( size.x, size.y ); +Sizei cGameObjectObject::Size() { + Sizef size( mRect.Size() ); + return Sizei( size.x, size.y ); } void cGameObjectObject::Draw() { @@ -48,48 +48,48 @@ void cGameObjectObject::Draw() { P.DrawRectangle( mRect ); } -eeVector2f cGameObjectObject::Pos() const { +Vector2f cGameObjectObject::Pos() const { return mPos; } -void cGameObjectObject::Pos( eeVector2f pos ) { +void cGameObjectObject::Pos( Vector2f pos ) { mPoly.Move( pos - mPos ); mPos = pos; - mRect = eeRectf( pos, eeSizef( Size().x, Size().y ) ); + mRect = Rectf( pos, Sizef( Size().x, Size().y ) ); } -void cGameObjectObject::SetPolygonPoint( Uint32 index, eeVector2f p ) { +void cGameObjectObject::SetPolygonPoint( Uint32 index, Vector2f p ) { switch ( index ) { case 0: { - mPoly.SetAt( 1, eeVector2f( p.x, mPoly[1].y ) ); - mPoly.SetAt( 3, eeVector2f( mPoly[3].x, p.y ) ); + mPoly.SetAt( 1, Vector2f( p.x, mPoly[1].y ) ); + mPoly.SetAt( 3, Vector2f( mPoly[3].x, p.y ) ); break; } case 1: { - mPoly.SetAt( 0, eeVector2f( p.x, mPoly[0].y ) ); - mPoly.SetAt( 2, eeVector2f( mPoly[2].x, p.y ) ); + mPoly.SetAt( 0, Vector2f( p.x, mPoly[0].y ) ); + mPoly.SetAt( 2, Vector2f( mPoly[2].x, p.y ) ); break; } case 2: { - mPoly.SetAt( 3, eeVector2f( p.x, mPoly[3].y ) ); - mPoly.SetAt( 1, eeVector2f( mPoly[1].x, p.y ) ); + mPoly.SetAt( 3, Vector2f( p.x, mPoly[3].y ) ); + mPoly.SetAt( 1, Vector2f( mPoly[1].x, p.y ) ); break; } case 3: default: { - mPoly.SetAt( 2, eeVector2f( p.x, mPoly[2].y ) ); - mPoly.SetAt( 0, eeVector2f( mPoly[0].x, p.y ) ); + mPoly.SetAt( 2, Vector2f( p.x, mPoly[2].y ) ); + mPoly.SetAt( 0, Vector2f( mPoly[0].x, p.y ) ); break; } } mPoly.SetAt( index, p ); mRect = mPoly.ToAABB(); - mPos = eeVector2f( mRect.Left, mRect.Top ); + mPos = Vector2f( mRect.Left, mRect.Top ); mPoly = mRect; } @@ -141,11 +141,11 @@ void cGameObjectObject::TypeName( const std::string& type ) { mType = type; } -eePolygon2f& cGameObjectObject::GetPolygon() { +Polygon2f& cGameObjectObject::GetPolygon() { return mPoly; } -bool cGameObjectObject::PointInside( const eeVector2f& p ) { +bool cGameObjectObject::PointInside( const Vector2f& p ) { return mRect.Contains( p ); } diff --git a/src/eepp/gaming/cgameobjectpolygon.cpp b/src/eepp/gaming/cgameobjectpolygon.cpp index 8161bb2c9..eb1d4e1fc 100644 --- a/src/eepp/gaming/cgameobjectpolygon.cpp +++ b/src/eepp/gaming/cgameobjectpolygon.cpp @@ -6,10 +6,10 @@ using namespace EE::Graphics; namespace EE { namespace Gaming { -cGameObjectPolygon::cGameObjectPolygon( Uint32 DataId, eePolygon2f poly, cLayer * Layer, const Uint32& Flags ) : +cGameObjectPolygon::cGameObjectPolygon( Uint32 DataId, Polygon2f poly, cLayer * Layer, const Uint32& Flags ) : cGameObjectObject( DataId, poly.ToAABB(), Layer, Flags ) { - mPoly = eePolygon2f( poly ); + mPoly = Polygon2f( poly ); } cGameObjectPolygon::~cGameObjectPolygon() { @@ -23,8 +23,8 @@ bool cGameObjectPolygon::IsType( const Uint32& type ) { return ( cGameObjectPolygon::Type() == type ) ? true : cGameObjectObject::IsType( type ); } -eeSize cGameObjectPolygon::Size() { - return eeSize( mRect.Size().x, mRect.Size().y ); +Sizei cGameObjectPolygon::Size() { + return Sizei( mRect.Size().x, mRect.Size().y ); } void cGameObjectPolygon::Draw() { @@ -41,13 +41,13 @@ void cGameObjectPolygon::Draw() { P.DrawPolygon( mPoly ); } -void cGameObjectPolygon::SetPolygonPoint( Uint32 index, eeVector2f p ) { +void cGameObjectPolygon::SetPolygonPoint( Uint32 index, Vector2f p ) { mPoly.SetAt( index, p ); mRect = mPoly.ToAABB(); - mPos = eeVector2f( mRect.Left, mRect.Top ); + mPos = Vector2f( mRect.Left, mRect.Top ); } -bool cGameObjectPolygon::PointInside( const eeVector2f& p ) { +bool cGameObjectPolygon::PointInside( const Vector2f& p ) { if ( cGameObjectObject::PointInside( p ) ) { return mPoly.PointInside( p ); } diff --git a/src/eepp/gaming/cgameobjectpolyline.cpp b/src/eepp/gaming/cgameobjectpolyline.cpp index 9b3a5fb30..1d1808baa 100644 --- a/src/eepp/gaming/cgameobjectpolyline.cpp +++ b/src/eepp/gaming/cgameobjectpolyline.cpp @@ -6,7 +6,7 @@ using namespace EE::Graphics; namespace EE { namespace Gaming { -cGameObjectPolyline::cGameObjectPolyline( Uint32 DataId, eePolygon2f poly, cLayer * Layer, const Uint32& Flags ) : +cGameObjectPolyline::cGameObjectPolyline( Uint32 DataId, Polygon2f poly, cLayer * Layer, const Uint32& Flags ) : cGameObjectPolygon( DataId, poly, Layer, Flags ) { } diff --git a/src/eepp/gaming/cgameobjectsprite.cpp b/src/eepp/gaming/cgameobjectsprite.cpp index d2991f0c5..5304a41f1 100644 --- a/src/eepp/gaming/cgameobjectsprite.cpp +++ b/src/eepp/gaming/cgameobjectsprite.cpp @@ -36,7 +36,7 @@ void cGameObjectSprite::Draw() { cLightManager * LM = mLayer->Map()->GetLightManager(); if ( MAP_LAYER_TILED == mLayer->Type() ) { - eeVector2i Tile = reinterpret_cast ( mLayer )->GetCurrentTile(); + Vector2i Tile = reinterpret_cast ( mLayer )->GetCurrentTile(); if ( LM->IsByVertex() ) { mSprite->UpdateVertexColors( @@ -50,7 +50,7 @@ void cGameObjectSprite::Draw() { } } else { if ( LM->IsByVertex() ) { - eeQuad2f Q = mSprite->GetQuad(); + Quad2f Q = mSprite->GetQuad(); mSprite->UpdateVertexColors( LM->GetColorFromPos( Q.V[0] ), @@ -68,33 +68,33 @@ void cGameObjectSprite::Draw() { } } -eeVector2f cGameObjectSprite::Pos() const { +Vector2f cGameObjectSprite::Pos() const { if ( NULL != mSprite ) return mSprite->Position(); - return eeVector2f(); + return Vector2f(); } -void cGameObjectSprite::Pos( eeVector2f pos ) { +void cGameObjectSprite::Pos( Vector2f pos ) { if ( NULL != mSprite ) { mSprite->Position( pos ); cGameObject::Pos( pos ); } } -eeVector2i cGameObjectSprite::TilePos() const { +Vector2i cGameObjectSprite::TilePos() const { return mTilePos; } -void cGameObjectSprite::TilePos( eeVector2i pos ) { +void cGameObjectSprite::TilePos( Vector2i pos ) { mTilePos = pos; } -eeSize cGameObjectSprite::Size() { +Sizei cGameObjectSprite::Size() { if ( NULL != mSprite ) return mSprite->GetSubTexture(0)->RealSize(); - return eeSize(); + return Sizei(); } cSprite * cGameObjectSprite::Sprite() const { diff --git a/src/eepp/gaming/cgameobjectsubtexture.cpp b/src/eepp/gaming/cgameobjectsubtexture.cpp index a02fe2e80..f061f8a9f 100644 --- a/src/eepp/gaming/cgameobjectsubtexture.cpp +++ b/src/eepp/gaming/cgameobjectsubtexture.cpp @@ -6,7 +6,7 @@ namespace EE { namespace Gaming { -cGameObjectSubTexture::cGameObjectSubTexture( const Uint32& Flags, cLayer * Layer, cSubTexture * SubTexture, const eeVector2f& Pos ) : +cGameObjectSubTexture::cGameObjectSubTexture( const Uint32& Flags, cLayer * Layer, cSubTexture * SubTexture, const Vector2f& Pos ) : cGameObject( Flags, Layer ), mSubTexture( SubTexture ), mPos( Pos ) @@ -31,14 +31,14 @@ void cGameObjectSubTexture::Draw() { cLightManager * LM = mLayer->Map()->GetLightManager(); if ( MAP_LAYER_TILED == mLayer->Type() ) { - eeVector2i Tile = reinterpret_cast ( mLayer )->GetCurrentTile(); + Vector2i Tile = reinterpret_cast ( mLayer )->GetCurrentTile(); if ( LM->IsByVertex() ) { mSubTexture->Draw( mPos.x, mPos.y, GetAngle(), - eeVector2f::One, + Vector2f::One, *LM->GetTileColor( Tile, 0 ), *LM->GetTileColor( Tile, 1 ), *LM->GetTileColor( Tile, 2 ), @@ -47,7 +47,7 @@ void cGameObjectSubTexture::Draw() { RenderModeFromFlags() ); } else { - mSubTexture->Draw( mPos.x, mPos.y, *LM->GetTileColor( Tile ), GetAngle(), eeVector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); + mSubTexture->Draw( mPos.x, mPos.y, *LM->GetTileColor( Tile ), GetAngle(), Vector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); } } else { if ( LM->IsByVertex() ) { @@ -55,46 +55,46 @@ void cGameObjectSubTexture::Draw() { mPos.x, mPos.y, GetAngle(), - eeVector2f::One, - LM->GetColorFromPos( eeVector2f( mPos.x, mPos.y ) ), - LM->GetColorFromPos( eeVector2f( mPos.x, mPos.y + mSubTexture->DestSize().y ) ), - LM->GetColorFromPos( eeVector2f( mPos.x + mSubTexture->DestSize().x, mPos.y + mSubTexture->DestSize().y ) ), - LM->GetColorFromPos( eeVector2f( mPos.x + mSubTexture->DestSize().y, mPos.y ) ), + Vector2f::One, + LM->GetColorFromPos( Vector2f( mPos.x, mPos.y ) ), + LM->GetColorFromPos( Vector2f( mPos.x, mPos.y + mSubTexture->DestSize().y ) ), + LM->GetColorFromPos( Vector2f( mPos.x + mSubTexture->DestSize().x, mPos.y + mSubTexture->DestSize().y ) ), + LM->GetColorFromPos( Vector2f( mPos.x + mSubTexture->DestSize().y, mPos.y ) ), ALPHA_NORMAL, RenderModeFromFlags() ); } else { - mSubTexture->Draw( mPos.x, mPos.y, LM->GetColorFromPos( eeVector2f( mPos.x, mPos.y ) ), GetAngle(), eeVector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); + mSubTexture->Draw( mPos.x, mPos.y, LM->GetColorFromPos( Vector2f( mPos.x, mPos.y ) ), GetAngle(), Vector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); } } } else { - mSubTexture->Draw( mPos.x, mPos.y, ColorA(), GetAngle(), eeVector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); + mSubTexture->Draw( mPos.x, mPos.y, ColorA(), GetAngle(), Vector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); } } } -eeVector2f cGameObjectSubTexture::Pos() const { +Vector2f cGameObjectSubTexture::Pos() const { return mPos; } -void cGameObjectSubTexture::Pos( eeVector2f pos ) { +void cGameObjectSubTexture::Pos( Vector2f pos ) { mPos = pos; cGameObject::Pos( pos ); } -eeVector2i cGameObjectSubTexture::TilePos() const { +Vector2i cGameObjectSubTexture::TilePos() const { return mTilePos; } -void cGameObjectSubTexture::TilePos( eeVector2i pos ) { +void cGameObjectSubTexture::TilePos( Vector2i pos ) { mTilePos = pos; } -eeSize cGameObjectSubTexture::Size() { +Sizei cGameObjectSubTexture::Size() { if ( NULL != mSubTexture ) return mSubTexture->RealSize(); - return eeSize(); + return Sizei(); } cSubTexture * cGameObjectSubTexture::SubTexture() const { diff --git a/src/eepp/gaming/cgameobjectsubtextureex.cpp b/src/eepp/gaming/cgameobjectsubtextureex.cpp index 81124ffa1..5fe847b3e 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, ColorA Color ) : +cGameObjectSubTextureEx::cGameObjectSubTextureEx( const Uint32& Flags, cLayer * Layer, cSubTexture * SubTexture, const Vector2f& Pos, EE_BLEND_MODE Blend, EE_RENDER_MODE Render, Float Angle, Vector2f Scale, ColorA Color ) : cGameObjectSubTexture( Flags, Layer, SubTexture, Pos ), mBlend( Blend ), mRender( Render ), @@ -37,7 +37,7 @@ void cGameObjectSubTextureEx::Draw() { cLightManager * LM = mLayer->Map()->GetLightManager(); if ( MAP_LAYER_TILED == mLayer->Type() ) { - eeVector2i Tile = reinterpret_cast ( mLayer )->GetCurrentTile(); + Vector2i Tile = reinterpret_cast ( mLayer )->GetCurrentTile(); if ( LM->IsByVertex() ) { mSubTexture->Draw( @@ -62,15 +62,15 @@ void cGameObjectSubTextureEx::Draw() { mPos.y, mAngle, mScale, - LM->GetColorFromPos( eeVector2f( mPos.x, mPos.y ) ), - LM->GetColorFromPos( eeVector2f( mPos.x, mPos.y + mSubTexture->DestSize().y ) ), - LM->GetColorFromPos( eeVector2f( mPos.x + mSubTexture->DestSize().x, mPos.y + mSubTexture->DestSize().y ) ), - LM->GetColorFromPos( eeVector2f( mPos.x + mSubTexture->DestSize().x, mPos.y ) ), + LM->GetColorFromPos( Vector2f( mPos.x, mPos.y ) ), + LM->GetColorFromPos( Vector2f( mPos.x, mPos.y + mSubTexture->DestSize().y ) ), + LM->GetColorFromPos( Vector2f( mPos.x + mSubTexture->DestSize().x, mPos.y + mSubTexture->DestSize().y ) ), + LM->GetColorFromPos( Vector2f( mPos.x + mSubTexture->DestSize().x, mPos.y ) ), mBlend, mRender ); } else { - mSubTexture->Draw( mPos.x, mPos.y, LM->GetColorFromPos( eeVector2f( mPos.x, mPos.y ) ), mAngle, mScale, mBlend, mRender ); + mSubTexture->Draw( mPos.x, mPos.y, LM->GetColorFromPos( Vector2f( mPos.x, mPos.y ) ), mAngle, mScale, mBlend, mRender ); } } } else { diff --git a/src/eepp/gaming/cgameobjectvirtual.cpp b/src/eepp/gaming/cgameobjectvirtual.cpp index faf123172..59a39e88a 100644 --- a/src/eepp/gaming/cgameobjectvirtual.cpp +++ b/src/eepp/gaming/cgameobjectvirtual.cpp @@ -8,7 +8,7 @@ using namespace EE::Graphics; namespace EE { namespace Gaming { -cGameObjectVirtual::cGameObjectVirtual( Uint32 DataId, cLayer * Layer, const Uint32& Flags, Uint32 Type, const eeVector2f& Pos ) : +cGameObjectVirtual::cGameObjectVirtual( Uint32 DataId, cLayer * Layer, const Uint32& Flags, Uint32 Type, const Vector2f& Pos ) : cGameObject( Flags, Layer ), mType( Type ), mDataId( DataId ), @@ -18,7 +18,7 @@ cGameObjectVirtual::cGameObjectVirtual( Uint32 DataId, cLayer * Layer, const Uin { } -cGameObjectVirtual::cGameObjectVirtual( cSubTexture * SubTexture, cLayer * Layer, const Uint32& Flags, Uint32 Type, const eeVector2f& Pos ) : +cGameObjectVirtual::cGameObjectVirtual( cSubTexture * SubTexture, cLayer * Layer, const Uint32& Flags, Uint32 Type, const Vector2f& Pos ) : cGameObject( Flags, Layer ), mType( Type ), mDataId( 0 ), @@ -45,14 +45,14 @@ Uint32 cGameObjectVirtual::RealType() const { return mType; } -eeSize cGameObjectVirtual::Size() { +Sizei cGameObjectVirtual::Size() { if ( NULL != mSubTexture ) return mSubTexture->RealSize(); if ( NULL != mLayer ) return mLayer->Map()->TileSize(); - return eeSize( 32, 32 ); + return Sizei( 32, 32 ); } void cGameObjectVirtual::Draw() { @@ -61,14 +61,14 @@ void cGameObjectVirtual::Draw() { cLightManager * LM = mLayer->Map()->GetLightManager(); if ( MAP_LAYER_TILED == mLayer->Type() ) { - eeVector2i Tile = reinterpret_cast ( mLayer )->GetCurrentTile(); + Vector2i Tile = reinterpret_cast ( mLayer )->GetCurrentTile(); if ( LM->IsByVertex() ) { mSubTexture->Draw( mPos.x, mPos.y, GetAngle(), - eeVector2f::One, + Vector2f::One, *LM->GetTileColor( Tile, 0 ), *LM->GetTileColor( Tile, 1 ), *LM->GetTileColor( Tile, 2 ), @@ -77,7 +77,7 @@ void cGameObjectVirtual::Draw() { RenderModeFromFlags() ); } else { - mSubTexture->Draw( mPos.x, mPos.y, *LM->GetTileColor( Tile ), GetAngle(), eeVector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); + mSubTexture->Draw( mPos.x, mPos.y, *LM->GetTileColor( Tile ), GetAngle(), Vector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); } } else { if ( LM->IsByVertex() ) { @@ -85,20 +85,20 @@ void cGameObjectVirtual::Draw() { mPos.x, mPos.y, GetAngle(), - eeVector2f::One, - LM->GetColorFromPos( eeVector2f( mPos.x, mPos.y ) ), - LM->GetColorFromPos( eeVector2f( mPos.x, mPos.y + mSubTexture->DestSize().y ) ), - LM->GetColorFromPos( eeVector2f( mPos.x + mSubTexture->DestSize().x, mPos.y + mSubTexture->DestSize().y ) ), - LM->GetColorFromPos( eeVector2f( mPos.x + mSubTexture->DestSize().x, mPos.y ) ), + Vector2f::One, + LM->GetColorFromPos( Vector2f( mPos.x, mPos.y ) ), + LM->GetColorFromPos( Vector2f( mPos.x, mPos.y + mSubTexture->DestSize().y ) ), + LM->GetColorFromPos( Vector2f( mPos.x + mSubTexture->DestSize().x, mPos.y + mSubTexture->DestSize().y ) ), + LM->GetColorFromPos( Vector2f( mPos.x + mSubTexture->DestSize().x, mPos.y ) ), ALPHA_NORMAL, RenderModeFromFlags() ); } else { - mSubTexture->Draw( mPos.x, mPos.y, LM->GetColorFromPos( eeVector2f( mPos.x, mPos.y ) ), GetAngle(), eeVector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); + mSubTexture->Draw( mPos.x, mPos.y, LM->GetColorFromPos( Vector2f( mPos.x, mPos.y ) ), GetAngle(), Vector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); } } } else { - mSubTexture->Draw( mPos.x, mPos.y, ColorA(), GetAngle(), eeVector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); + mSubTexture->Draw( mPos.x, mPos.y, ColorA(), GetAngle(), Vector2f::One, ALPHA_NORMAL, RenderModeFromFlags() ); } } else { cPrimitives P; @@ -109,19 +109,19 @@ void cGameObjectVirtual::Draw() { P.SetColor( C ); if ( NULL != mLayer ) { - eeSize ts = mLayer->Map()->TileSize(); - P.DrawRectangle( eeRectf( eeVector2f( mPos.x, mPos.y ), eeSizef( ts.x ,ts.y ) ), 0, eeVector2f::One ); + Sizei ts = mLayer->Map()->TileSize(); + P.DrawRectangle( Rectf( Vector2f( mPos.x, mPos.y ), Sizef( ts.x ,ts.y ) ), 0, Vector2f::One ); } else { - P.DrawRectangle( eeRectf( eeVector2f( mPos.x, mPos.y ), eeSizef( 32 ,32 ) ), 0, eeVector2f::One ); + P.DrawRectangle( Rectf( Vector2f( mPos.x, mPos.y ), Sizef( 32 ,32 ) ), 0, Vector2f::One ); } } } -eeVector2f cGameObjectVirtual::Pos() const { +Vector2f cGameObjectVirtual::Pos() const { return mPos; } -void cGameObjectVirtual::Pos( eeVector2f pos ) { +void cGameObjectVirtual::Pos( Vector2f pos ) { mPos = pos; } diff --git a/src/eepp/gaming/clayer.cpp b/src/eepp/gaming/clayer.cpp index a36dcbca3..279bad4b6 100644 --- a/src/eepp/gaming/clayer.cpp +++ b/src/eepp/gaming/clayer.cpp @@ -3,7 +3,7 @@ namespace EE { namespace Gaming { -cLayer::cLayer( cMap * map, Uint32 type, Uint32 flags, std::string name, eeVector2f offset ) : +cLayer::cLayer( cMap * map, Uint32 type, Uint32 flags, std::string name, Vector2f offset ) : mMap( map ), mType( type ), mFlags( flags ), @@ -45,11 +45,11 @@ cMap * cLayer::Map() const { return mMap; } -const eeVector2f& cLayer::Offset() const { +const Vector2f& cLayer::Offset() const { return mOffset; } -void cLayer::Offset( const eeVector2f& offset ) { +void cLayer::Offset( const Vector2f& offset ) { mOffset = offset; } diff --git a/src/eepp/gaming/clight.cpp b/src/eepp/gaming/clight.cpp index 6c2757729..6ee8a7ab9 100755 --- a/src/eepp/gaming/clight.cpp +++ b/src/eepp/gaming/clight.cpp @@ -32,7 +32,7 @@ RGB cLight::ProcessVertex( const Float& PointX, const Float& PointY, const RGB& if ( mActive ) { if ( mType == LIGHT_NORMAL ) - VertexDist = eeabs( mPos.Distance( eeVector2f( PointX, PointY ) ) ); + VertexDist = eeabs( mPos.Distance( Vector2f( PointX, PointY ) ) ); else { Float XDist = eeabs(mPos.x - PointX) * 0.5f; Float YDist = eeabs(mPos.y - PointY); @@ -72,7 +72,7 @@ ColorA cLight::ProcessVertex( const Float& PointX, const Float& PointY, const Co if ( mActive ) { if ( mType == LIGHT_NORMAL ) - VertexDist = eeabs( mPos.Distance( eeVector2f( PointX, PointY ) ) ); + VertexDist = eeabs( mPos.Distance( Vector2f( PointX, PointY ) ) ); else { Float XDist = eeabs(mPos.x - PointX) * 0.5f; Float YDist = eeabs(mPos.y - PointY); @@ -107,11 +107,11 @@ ColorA cLight::ProcessVertex( const Float& PointX, const Float& PointY, const Co return BaseColor; } -RGB cLight::ProcessVertex( const eeVector2f& Pos, const RGB& VertexColor, const RGB& BaseColor ) { +RGB cLight::ProcessVertex( const Vector2f& Pos, const RGB& VertexColor, const RGB& BaseColor ) { return ProcessVertex( Pos.x, Pos.y, VertexColor, BaseColor ); } -ColorA cLight::ProcessVertex( const eeVector2f& Pos, const ColorA& VertexColor, const ColorA& BaseColor ) { +ColorA cLight::ProcessVertex( const Vector2f& Pos, const ColorA& VertexColor, const ColorA& BaseColor ) { return ProcessVertex( Pos.x, Pos.y, VertexColor, BaseColor ); } @@ -121,11 +121,11 @@ void cLight::UpdatePos( const Float& x, const Float& y ) { UpdateAABB(); } -void cLight::Position( const eeVector2f& newPos ) { +void cLight::Position( const Vector2f& newPos ) { UpdatePos( newPos.x, newPos.y ); } -void cLight::UpdatePos( const eeVector2f& newPos ) { +void cLight::UpdatePos( const Vector2f& newPos ) { UpdatePos( newPos.x, newPos.y ); } @@ -180,7 +180,7 @@ const LIGHT_TYPE& cLight::Type() const { return mType; } -const eeVector2f& cLight::Position() const { +const Vector2f& cLight::Position() const { return mPos; } diff --git a/src/eepp/gaming/clightmanager.cpp b/src/eepp/gaming/clightmanager.cpp index ba925b3a8..8d4df85d2 100644 --- a/src/eepp/gaming/clightmanager.cpp +++ b/src/eepp/gaming/clightmanager.cpp @@ -35,13 +35,13 @@ const bool& cLightManager::IsByVertex() const { } void cLightManager::UpdateByVertex() { - eeVector2i start = mMap->StartTile(); - eeVector2i end = mMap->EndTile(); + Vector2i start = mMap->StartTile(); + Vector2i end = mMap->EndTile(); eeAABB VisibleArea = mMap->GetViewAreaAABB(); - eeSize TileSize = mMap->TileSize(); + Sizei TileSize = mMap->TileSize(); ColorA BaseColor = mMap->BaseColor(); bool firstLight = true; - eeVector2i Pos; + Vector2i Pos; if ( !mLights.size() ) return; @@ -87,14 +87,14 @@ void cLightManager::UpdateByVertex() { } void cLightManager::UpdateByTile() { - eeVector2i start = mMap->StartTile(); - eeVector2i end = mMap->EndTile(); + Vector2i start = mMap->StartTile(); + Vector2i end = mMap->EndTile(); eeAABB VisibleArea = mMap->GetViewAreaAABB(); - eeSize TileSize = mMap->TileSize(); - eeSize HalfTileSize = mMap->TileSize() / 2; + Sizei TileSize = mMap->TileSize(); + Sizei HalfTileSize = mMap->TileSize() / 2; ColorA BaseColor = mMap->BaseColor(); bool firstLight = true; - eeVector2i Pos; + Vector2i Pos; if ( !mLights.size() ) return; @@ -127,7 +127,7 @@ void cLightManager::UpdateByTile() { } } -ColorA cLightManager::GetColorFromPos( const eeVector2f& Pos ) { +ColorA cLightManager::GetColorFromPos( const Vector2f& Pos ) { ColorA Col( mMap->BaseColor() ); if ( !mLights.size() ) @@ -155,7 +155,7 @@ void cLightManager::RemoveLight( cLight * Light ) { mLights.remove( Light ); } -void cLightManager::RemoveLight( const eeVector2f& OverPos ) { +void cLightManager::RemoveLight( const Vector2f& OverPos ) { for ( LightsList::reverse_iterator it = mLights.rbegin(); it != mLights.rend(); it++ ) { cLight * Light = (*it); @@ -167,7 +167,7 @@ void cLightManager::RemoveLight( const eeVector2f& OverPos ) { } } -const ColorA * cLightManager::GetTileColor( const eeVector2i& TilePos ) { +const ColorA * cLightManager::GetTileColor( const Vector2i& TilePos ) { eeASSERT( 1 == mNumVertex ); if ( !mLights.size() ) @@ -176,7 +176,7 @@ const ColorA * cLightManager::GetTileColor( const eeVector2i& TilePos ) { return mTileColors[ TilePos.x ][ TilePos.y ][0]; } -const ColorA * cLightManager::GetTileColor( const eeVector2i& TilePos, const Uint32& Vertex ) { +const ColorA * cLightManager::GetTileColor( const Vector2i& TilePos, const Uint32& Vertex ) { eeASSERT( 4 == mNumVertex ); if ( !mLights.size() ) @@ -186,7 +186,7 @@ const ColorA * cLightManager::GetTileColor( const eeVector2i& TilePos, const Uin } void cLightManager::AllocateColors() { - eeSize Size = mMap->Size(); + Sizei Size = mMap->Size(); mTileColors = eeNewArray( ColorA***, Size.Width() ); for ( Int32 x = 0; x < Size.x; x++ ) { @@ -203,7 +203,7 @@ void cLightManager::AllocateColors() { } void cLightManager::DeallocateColors() { - eeSize Size = mMap->Size(); + Sizei Size = mMap->Size(); for ( Int32 x = 0; x < Size.x; x++ ) { for ( Int32 y = 0; y < Size.y; y++ ) { @@ -235,7 +235,7 @@ cLightManager::LightsList& cLightManager::GetLights() { return mLights; } -cLight * cLightManager::GetLightOver( const eeVector2f& OverPos, cLight * LightCurrent ) { +cLight * cLightManager::GetLightOver( const Vector2f& OverPos, cLight * LightCurrent ) { cLight * PivotLight = NULL; cLight * LastLight = NULL; cLight * FirstLight = NULL; diff --git a/src/eepp/gaming/cmap.cpp b/src/eepp/gaming/cmap.cpp index 3c4faaabb..5c171f3de 100644 --- a/src/eepp/gaming/cmap.cpp +++ b/src/eepp/gaming/cmap.cpp @@ -60,11 +60,11 @@ void cMap::Reset() { mFlags = 0; mMaxLayers = 0; mMouseOver = false; - mViewSize = eeSize( 800, 600 ); + mViewSize = Sizei( 800, 600 ); mBaseColor = ColorA( 255, 255, 255, 255 ); } -void cMap::ForceHeadersOnLoad( eeSize mapSize, eeSize tileSize, Uint32 numLayers, Uint32 flags ) { +void cMap::ForceHeadersOnLoad( Sizei mapSize, Sizei tileSize, Uint32 numLayers, Uint32 flags ) { DisableForcedHeaders(); mForcedHeaders = eeNew( cForcedHeaders, ( mapSize, tileSize, numLayers, flags ) ); } @@ -84,7 +84,7 @@ void cMap::DeleteLayers() { mLayerCount = 0; } -void cMap::Create( eeSize Size, Uint32 MaxLayers, eeSize TileSize, Uint32 Flags, eeSize viewSize, Window::cWindow * Window ) { +void cMap::Create( Sizei Size, Uint32 MaxLayers, Sizei TileSize, Uint32 Flags, Sizei viewSize, Window::cWindow * Window ) { Reset(); mWindow = Window; @@ -223,7 +223,7 @@ void cMap::Draw() { Uint8 Alpha = static_cast( (Float)mBackColor.A() * ( (Float)mBackAlpha / 255.f ) ); 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.DrawRectangle( Rectf( Vector2f( mScreenPos.x, mScreenPos.y ), Sizef( mViewSize.x, mViewSize.y ) ), 0.f, Vector2f::One ); P.SetColor( ColorA( 255, 255, 255, 255 ) ); } @@ -260,7 +260,7 @@ void cMap::MouseOverDraw() { if ( !DrawTileOver() || NULL == mTileTex ) return; - mTileTex->Draw( mMouseOverTileFinal.x * mTileSize.x, mMouseOverTileFinal.y * mTileSize.y, 0, eeVector2f::One, mTileOverColor ); + mTileTex->Draw( mMouseOverTileFinal.x * mTileSize.x, mMouseOverTileFinal.y * mTileSize.y, 0, Vector2f::One, mTileOverColor ); } void cMap::GridDraw() { @@ -272,8 +272,8 @@ void cMap::GridDraw() { cGlobalBatchRenderer::instance()->Draw(); - eeVector2i start = StartTile(); - eeVector2i end = EndTile(); + Vector2i start = StartTile(); + Vector2i end = EndTile(); Float tx, ty; ColorA TileTexCol( 255, 255, 255, mBackAlpha ); @@ -285,7 +285,7 @@ void cMap::GridDraw() { ty = y * mTileSize.y; if ( LightsEnabled() ) { - eeVector2i TPos( x, y ); + Vector2i TPos( x, y ); if ( mLightManager->IsByVertex() ) { ColorA TileTexCol0( *mLightManager->GetTileColor( TPos, 0 ) ); @@ -295,15 +295,15 @@ void cMap::GridDraw() { TileTexCol0.Alpha = TileTexCol1.Alpha = TileTexCol2.Alpha = TileTexCol3.Alpha = mBackAlpha; - mTileTex->DrawEx( tx, ty, 0, 0, 0, eeVector2f::One, TileTexCol0, TileTexCol1, TileTexCol2, TileTexCol3 ); + mTileTex->DrawEx( tx, ty, 0, 0, 0, Vector2f::One, TileTexCol0, TileTexCol1, TileTexCol2, TileTexCol3 ); } else { TileTexCol = *mLightManager->GetTileColor( TPos ); TileTexCol.Alpha = mBackAlpha; - mTileTex->Draw( tx, ty, 0, eeVector2f::One, TileTexCol ); + mTileTex->Draw( tx, ty, 0, Vector2f::One, TileTexCol ); } } else { - mTileTex->Draw( tx, ty, 0, eeVector2f::One, TileTexCol ); + mTileTex->Draw( tx, ty, 0, Vector2f::One, TileTexCol ); } } } @@ -316,9 +316,9 @@ const bool& cMap::IsMouseOver() const { } void cMap::GetMouseOverTile() { - eeVector2i mouse = mWindow->GetInput()->GetMousePos(); + Vector2i mouse = mWindow->GetInput()->GetMousePos(); - eeVector2i MapPos( static_cast( mouse.x - mScreenPos.x - mOffset.x ) / mScale, static_cast( mouse.y - mScreenPos.y - mOffset.y ) / mScale ); + Vector2i MapPos( static_cast( mouse.x - mScreenPos.x - mOffset.x ) / mScale, static_cast( mouse.y - mScreenPos.y - mOffset.y ) / mScale ); mMouseOver = !( MapPos.x < 0 || MapPos.y < 0 || MapPos.x > mPixelSize.x || MapPos.y > mPixelSize.y ); @@ -341,8 +341,8 @@ void cMap::GetMouseOverTile() { void cMap::CalcTilesClip() { if ( mTileSize.x > 0 && mTileSize.y > 0 ) { - eeVector2f ffoff( mOffset ); - eeVector2i foff( (Int32)ffoff.x, (Int32)ffoff.y ); + Vector2f ffoff( mOffset ); + Vector2i foff( (Int32)ffoff.x, (Int32)ffoff.y ); mStartTile.x = -foff.x / ( mTileSize.x * mScale ) - mExtraTiles.x; mStartTile.y = -foff.y / ( mTileSize.y * mScale ) - mExtraTiles.y; @@ -374,7 +374,7 @@ void cMap::Clamp() { if ( mOffset.y > 0 ) mOffset.y = 0; - eeVector2f totSize( mTileSize.x * mSize.x * mScale, mTileSize.y * mSize.y * mScale ); + Vector2f totSize( mTileSize.x * mSize.x * mScale, mTileSize.y * mSize.y * mScale ); if ( -mOffset.x + mViewSize.x > totSize.x ) mOffset.x = -( totSize.x - mViewSize.x ); @@ -404,7 +404,7 @@ void cMap::Clamp() { mOffset.y = 0; } -void cMap::Offset( const eeVector2f& offset ) { +void cMap::Offset( const Vector2f& offset ) { mOffset = offset; Clamp(); @@ -412,8 +412,8 @@ void cMap::Offset( const eeVector2f& offset ) { CalcTilesClip(); } -eeVector2i cMap::GetMaxOffset() { - eeVector2i v( ( mTileSize.x * mSize.x * mScale ) - mViewSize.x, +Vector2i cMap::GetMaxOffset() { + Vector2i v( ( mTileSize.x * mSize.x * mScale ) - mViewSize.x, ( mTileSize.y * mSize.y * mScale ) - mViewSize.y ); eemax( 0, v.x ); @@ -455,35 +455,35 @@ void cMap::Update() { mUpdateCb(); } -const eeSize& cMap::ViewSize() const { +const Sizei& cMap::ViewSize() const { return mViewSize; } -const eeVector2i& cMap::GetMouseTilePos() const { +const Vector2i& cMap::GetMouseTilePos() const { return mMouseOverTileFinal; } -const eeVector2i& cMap::GetRealMouseTilePos() const { +const Vector2i& cMap::GetRealMouseTilePos() const { return mMouseOverTile; } -const eeVector2i& cMap::GetMouseMapPos() const { +const Vector2i& cMap::GetMouseMapPos() const { return mMouseMapPos; } -eeVector2f cMap::GetMouseMapPosf() const { - return eeVector2f( (Float)mMouseMapPos.x, (Float)mMouseMapPos.y ); +Vector2f cMap::GetMouseMapPosf() const { + return Vector2f( (Float)mMouseMapPos.x, (Float)mMouseMapPos.y ); } -eeVector2i cMap::GetMouseTilePosCoords() { +Vector2i cMap::GetMouseTilePosCoords() { return GetTileCoords( GetMouseTilePos() ); } -eeVector2i cMap::GetTileCoords( const eeVector2i& TilePos ) { +Vector2i cMap::GetTileCoords( const Vector2i& TilePos ) { return ( TilePos * mTileSize ); } -void cMap::ViewSize( const eeSize& viewSize ) { +void cMap::ViewSize( const Sizei& viewSize ) { mViewSize = viewSize; Clamp(); @@ -491,31 +491,31 @@ void cMap::ViewSize( const eeSize& viewSize ) { CalcTilesClip(); } -const eeVector2i& cMap::Position() const { +const Vector2i& cMap::Position() const { return mScreenPos; } -void cMap::Position( const eeVector2i& position ) { +void cMap::Position( const Vector2i& position ) { mScreenPos = position; } -const eeVector2f& cMap::Offset() const { +const Vector2f& cMap::Offset() const { return mOffset; } -const eeVector2i& cMap::StartTile() const { +const Vector2i& cMap::StartTile() const { return mStartTile; } -const eeVector2i& cMap::EndTile() const { +const Vector2i& cMap::EndTile() const { return mEndTile; } -void cMap::ExtraTiles( const eeVector2i& extra ) { +void cMap::ExtraTiles( const Vector2i& extra ) { mExtraTiles = extra; } -const eeVector2i& cMap::ExtraTiles() const { +const Vector2i& cMap::ExtraTiles() const { return mExtraTiles; } @@ -587,12 +587,12 @@ bool cMap::LightsByVertex() { return 0 != ( mFlags & MAP_FLAG_LIGHTS_BYVERTEX ); } -void cMap::Move( const eeVector2f& offset ) { +void cMap::Move( const Vector2f& offset ) { Move( offset.x, offset.y ); } void cMap::Move( const Float& offsetx, const Float& offsety ) { - Offset( eeVector2f( mOffset.x + offsetx, mOffset.y + offsety ) ); + Offset( Vector2f( mOffset.x + offsetx, mOffset.y + offsety ) ); } cGameObjectPolyData& cMap::GetPolyObjData( Uint32 Id ) { @@ -675,15 +675,15 @@ cLightManager * cMap::GetLightManager() const { return mLightManager; } -const eeSize& cMap::TotalSize() const { +const Sizei& cMap::TotalSize() const { return mPixelSize; } -const eeSize& cMap::TileSize() const { +const Sizei& cMap::TileSize() const { return mTileSize; } -const eeSize& cMap::Size() const { +const Sizei& cMap::Size() const { return mSize; } @@ -801,7 +801,7 @@ bool cMap::LoadFromStream( IOStream& IOS ) { if ( MapHdr.Magic == EE_MAP_MAGIC ) { if ( NULL == mForcedHeaders ) { - Create( eeSize( MapHdr.SizeX, MapHdr.SizeY ), MapHdr.MaxLayers, eeSize( MapHdr.TileSizeX, MapHdr.TileSizeY ), MapHdr.Flags ); + Create( Sizei( MapHdr.SizeX, MapHdr.SizeY ), MapHdr.MaxLayers, Sizei( MapHdr.TileSizeX, MapHdr.TileSizeY ), MapHdr.Flags ); } else { Create( mForcedHeaders->MapSize, mForcedHeaders->NumLayers, mForcedHeaders->TileSize, mForcedHeaders->Flags ); } @@ -875,7 +875,7 @@ bool cMap::LoadFromStream( IOStream& IOS ) { cLayer * tLayer = AddLayer( tLayerHdr->Type, tLayerHdr->Flags, std::string( tLayerHdr->Name ) ); if ( NULL != tLayer ) { - tLayer->Offset( eeVector2f( (Float)tLayerHdr->OffsetX, (Float)tLayerHdr->OffsetY ) ); + tLayer->Offset( Vector2f( (Float)tLayerHdr->OffsetX, (Float)tLayerHdr->OffsetY ) ); sPropertyHdr * tProps = eeNewArray( sPropertyHdr, tLayerHdr->PropertyCount ); @@ -903,7 +903,7 @@ bool cMap::LoadFromStream( IOStream& IOS ) { cGameObject * tGO; if ( NULL != mForcedHeaders ) { - mSize = eeSize( MapHdr.SizeX, MapHdr.SizeY ); + mSize = Sizei( MapHdr.SizeX, MapHdr.SizeY ); } if ( ThereIsTiled ) { @@ -925,7 +925,7 @@ bool cMap::LoadFromStream( IOStream& IOS ) { tGO = CreateGameObject( tTGOHdr.Type, tTGOHdr.Flags, mLayers[i], tTGOHdr.Id ); - tTLayer->AddGameObject( tGO, eeVector2i( x, y ) ); + tTLayer->AddGameObject( tGO, Vector2i( x, y ) ); } } } @@ -975,11 +975,11 @@ bool cMap::LoadFromStream( IOStream& IOS ) { //! Reads the polygon points for ( Uint32 iPoint = 0; iPoint < tObjObjHdr.PointCount; iPoint++ ) { - eeVector2if p; + Vector2if p; - IOS.Read( (char*)&p, sizeof(eeVector2if) ); + IOS.Read( (char*)&p, sizeof(Vector2if) ); - tObjData.Poly.PushBack( eeVector2f( p.x, p.y ) ); + tObjData.Poly.PushBack( Vector2f( p.x, p.y ) ); } mPolyObjs[ tOGOHdr.Id ] = tObjData; @@ -990,7 +990,7 @@ bool cMap::LoadFromStream( IOStream& IOS ) { tGO = CreateGameObject( tOGOHdr.Type, tOGOHdr.Flags, mLayers[i], tOGOHdr.Id ); - tGO->Pos( eeVector2f( tOGOHdr.PosX, tOGOHdr.PosY ) ); + tGO->Pos( Vector2f( tOGOHdr.PosX, tOGOHdr.PosY ) ); tOLayer->AddGameObject( tGO ); } @@ -1215,7 +1215,7 @@ void cMap::SaveToStream( IOStream& IOS ) { if ( NULL != tLayer && tLayer->Type() == MAP_LAYER_TILED ) { tTLayer = reinterpret_cast ( tLayer ); - tObj = tTLayer->GetGameObject( eeVector2i( x, y ) ); + tObj = tTLayer->GetGameObject( Vector2i( x, y ) ); if ( NULL != tObj ) { tReadFlag |= 1 << i; @@ -1299,7 +1299,7 @@ void cMap::SaveToStream( IOStream& IOS ) { tObj->Type() == GAMEOBJECT_TYPE_POLYLINE ) { cGameObjectObject * tObjObj = reinterpret_cast( tObj ); - eePolygon2f tPoly = tObjObj->GetPolygon(); + Polygon2f tPoly = tObjObj->GetPolygon(); cGameObjectObject::PropertiesMap tObjObjProp = tObjObj->GetProperties(); sMapObjObjHdr tObjObjHdr; @@ -1330,10 +1330,10 @@ void cMap::SaveToStream( IOStream& IOS ) { //! Writes the polygon points for ( Uint32 tPoint = 0; tPoint < tPoly.Size(); tPoint++ ) { - eeVector2f pf( tPoly.GetAt( tPoint ) ); - eeVector2if p( pf.x, pf.y ); //! Convert it to Int32 + Vector2f pf( tPoly.GetAt( tPoint ) ); + Vector2if p( pf.x, pf.y ); //! Convert it to Int32 - IOS.Write( (const char*)&p, sizeof(eeVector2if) ); + IOS.Write( (const char*)&p, sizeof(Vector2if) ); } } } @@ -1401,7 +1401,7 @@ cTexture * cMap::GetBlankTileTexture() { return mTileTex; } -bool cMap::IsTileBlocked( const eeVector2i& TilePos ) { +bool cMap::IsTileBlocked( const Vector2i& TilePos ) { cTileLayer * TLayer; cGameObject * TObj; @@ -1430,7 +1430,7 @@ void * cMap::Data() const { void cMap::OnMapLoaded() { } -cGameObject * cMap::IsTypeInTilePos( const Uint32& Type, const eeVector2i& TilePos ) { +cGameObject * cMap::IsTypeInTilePos( const Uint32& Type, const Vector2i& TilePos ) { for ( Uint32 i = 0; i < mLayerCount; i++ ) { if ( mLayers[i]->Type() == MAP_LAYER_TILED ) { cTileLayer * tLayer = reinterpret_cast ( mLayers[i] ); diff --git a/src/eepp/gaming/cobjectlayer.cpp b/src/eepp/gaming/cobjectlayer.cpp index 2a87ca711..5d4859396 100644 --- a/src/eepp/gaming/cobjectlayer.cpp +++ b/src/eepp/gaming/cobjectlayer.cpp @@ -10,7 +10,7 @@ using namespace EE::Graphics; namespace EE { namespace Gaming { -cObjectLayer::cObjectLayer( cMap * map, Uint32 flags, std::string name, eeVector2f offset ) : +cObjectLayer::cObjectLayer( cMap * map, Uint32 flags, std::string name, Vector2f offset ) : cLayer( map, MAP_LAYER_OBJECT, flags, name, offset ) { } @@ -29,7 +29,7 @@ void cObjectLayer::DeallocateLayer() { } } -void cObjectLayer::Draw( const eeVector2f &Offset ) { +void cObjectLayer::Draw( const Vector2f &Offset ) { cGlobalBatchRenderer::instance()->Draw(); ObjList::iterator it; @@ -50,7 +50,7 @@ void cObjectLayer::Draw( const eeVector2f &Offset ) { cGameObject * Obj = (*it); if ( Obj->Blocked() ) { - Tex->DrawEx( Obj->Pos().x, Obj->Pos().y, Obj->Size().Width(), Obj->Size().Height(), 0, eeVector2f::One, Col, Col, Col, Col ); + Tex->DrawEx( Obj->Pos().x, Obj->Pos().y, Obj->Size().Width(), Obj->Size().Height(), 0, Vector2f::One, Col, Col, Col, Col ); } } } @@ -80,7 +80,7 @@ void cObjectLayer::RemoveGameObject( cGameObject * obj ) { eeSAFE_DELETE( obj ); } -void cObjectLayer::RemoveGameObject( const eeVector2i& pos ) { +void cObjectLayer::RemoveGameObject( const Vector2i& pos ) { cGameObject * tObj = GetObjectOver( pos, SEARCH_OBJECT ); if ( NULL != tObj ) { @@ -88,10 +88,10 @@ void cObjectLayer::RemoveGameObject( const eeVector2i& pos ) { } } -cGameObject * cObjectLayer::GetObjectOver( const eeVector2i& pos, SEARCH_TYPE type ) { +cGameObject * cObjectLayer::GetObjectOver( const Vector2i& pos, SEARCH_TYPE type ) { cGameObject * tObj; - eeVector2f tPos; - eeSize tSize; + Vector2f tPos; + Sizei tSize; for ( ObjList::reverse_iterator it = mObjects.rbegin(); it != mObjects.rend(); it++ ) { tObj = (*it); @@ -100,7 +100,7 @@ cGameObject * cObjectLayer::GetObjectOver( const eeVector2i& pos, SEARCH_TYPE ty if ( tObj->IsType( GAMEOBJECT_TYPE_OBJECT ) ) { cGameObjectObject * tObjObj = reinterpret_cast ( tObj ); - if ( tObjObj->PointInside( eeVector2f( pos.x, pos.y ) ) ) + if ( tObjObj->PointInside( Vector2f( pos.x, pos.y ) ) ) return tObj; } } else if ( type & SEARCH_OBJECT ) { @@ -108,7 +108,7 @@ cGameObject * cObjectLayer::GetObjectOver( const eeVector2i& pos, SEARCH_TYPE ty tPos = tObj->Pos(); tSize = tObj->Size(); - eeRecti objR( tPos.x, tPos.y, tPos.x + tSize.x, tPos.y + tSize.y ); + Recti objR( tPos.x, tPos.y, tPos.x + tSize.x, tPos.y + tSize.y ); if ( objR.Contains( pos ) ) return tObj; @@ -117,13 +117,13 @@ cGameObject * cObjectLayer::GetObjectOver( const eeVector2i& pos, SEARCH_TYPE ty if ( tObj->IsType( GAMEOBJECT_TYPE_OBJECT ) ) { cGameObjectObject * tObjObj = reinterpret_cast ( tObj ); - if ( tObjObj->PointInside( eeVector2f( pos.x, pos.y ) ) ) + if ( tObjObj->PointInside( Vector2f( pos.x, pos.y ) ) ) return tObj; } else { tPos = tObj->Pos(); tSize = tObj->Size(); - eeRecti objR( tPos.x, tPos.y, tPos.x + tSize.x, tPos.y + tSize.y ); + Recti objR( tPos.x, tPos.y, tPos.x + tSize.x, tPos.y + tSize.y ); if ( objR.Contains( pos ) ) return tObj; diff --git a/src/eepp/gaming/ctilelayer.cpp b/src/eepp/gaming/ctilelayer.cpp index 2839b06ea..dc70f0604 100644 --- a/src/eepp/gaming/ctilelayer.cpp +++ b/src/eepp/gaming/ctilelayer.cpp @@ -8,7 +8,7 @@ using namespace EE::Graphics; namespace EE { namespace Gaming { -cTileLayer::cTileLayer( cMap * map, eeSize size, Uint32 flags, std::string name, eeVector2f offset ) : +cTileLayer::cTileLayer( cMap * map, Sizei size, Uint32 flags, std::string name, Vector2f offset ) : cLayer( map, MAP_LAYER_TILED, flags, name, offset ), mSize( size ) { @@ -19,14 +19,14 @@ cTileLayer::~cTileLayer() { DeallocateLayer(); } -void cTileLayer::Draw( const eeVector2f& Offset ) { +void cTileLayer::Draw( const Vector2f& Offset ) { cGlobalBatchRenderer::instance()->Draw(); GLi->PushMatrix(); GLi->Translatef( mOffset.x, mOffset.y, 0.0f ); - eeVector2i start = mMap->StartTile(); - eeVector2i end = mMap->EndTile(); + Vector2i start = mMap->StartTile(); + Vector2i end = mMap->EndTile(); for ( Int32 x = start.x; x < end.x; x++ ) { for ( Int32 y = start.y; y < end.y; y++ ) { @@ -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, ColorA( 255, 0, 0, 200 ) ); + Tex->Draw( x * mMap->TileSize().x, y * mMap->TileSize().y, 0 , Vector2f::One, ColorA( 255, 0, 0, 200 ) ); } } } @@ -59,8 +59,8 @@ void cTileLayer::Draw( const eeVector2f& Offset ) { } void cTileLayer::Update() { - eeVector2i start = mMap->StartTile(); - eeVector2i end = mMap->EndTile(); + Vector2i start = mMap->StartTile(); + Vector2i end = mMap->EndTile(); for ( Int32 x = start.x; x < end.x; x++ ) { for ( Int32 y = start.y; y < end.y; y++ ) { @@ -98,7 +98,7 @@ void cTileLayer::DeallocateLayer() { eeSAFE_DELETE_ARRAY( mTiles ); } -void cTileLayer::AddGameObject( cGameObject * obj, const eeVector2i& TilePos ) { +void cTileLayer::AddGameObject( cGameObject * obj, const Vector2i& TilePos ) { eeASSERT( TilePos.x >= 0 && TilePos.y >= 0 ); if ( TilePos.x < mSize.x && TilePos.y < mSize.y ) { @@ -106,11 +106,11 @@ void cTileLayer::AddGameObject( cGameObject * obj, const eeVector2i& TilePos ) { mTiles[ TilePos.x ][ TilePos.y ] = obj; - obj->Pos( eeVector2f( TilePos.x * mMap->TileSize().x, TilePos.y * mMap->TileSize().y ) ); + obj->Pos( Vector2f( TilePos.x * mMap->TileSize().x, TilePos.y * mMap->TileSize().y ) ); } } -void cTileLayer::RemoveGameObject( const eeVector2i& TilePos ) { +void cTileLayer::RemoveGameObject( const Vector2i& TilePos ) { eeASSERT( TilePos.x >= 0 && TilePos.y >= 0 ); if ( TilePos.x < mSize.x && TilePos.y < mSize.y ) { @@ -120,7 +120,7 @@ void cTileLayer::RemoveGameObject( const eeVector2i& TilePos ) { } } -void cTileLayer::MoveTileObject( const eeVector2i& FromPos, const eeVector2i& ToPos ) { +void cTileLayer::MoveTileObject( const Vector2i& FromPos, const Vector2i& ToPos ) { RemoveGameObject( ToPos ); cGameObject * tObj = mTiles[ FromPos.x ][ FromPos.y ]; @@ -130,20 +130,20 @@ void cTileLayer::MoveTileObject( const eeVector2i& FromPos, const eeVector2i& To mTiles[ ToPos.x ][ ToPos.y ] = tObj; } -cGameObject * cTileLayer::GetGameObject( const eeVector2i& TilePos ) { +cGameObject * cTileLayer::GetGameObject( const Vector2i& TilePos ) { return mTiles[ TilePos.x ][ TilePos.y ]; } -const eeVector2i& cTileLayer::GetCurrentTile() const { +const Vector2i& cTileLayer::GetCurrentTile() const { return mCurTile; } -eeVector2i cTileLayer::GetTilePosFromPos( const eeVector2f& Pos ) { - return eeVector2i( ( (Int32)Pos.x + mOffset.x ) / mMap->TileSize().Width(), ( (Int32)Pos.y + mOffset.y ) / mMap->TileSize().Height() ); +Vector2i cTileLayer::GetTilePosFromPos( const Vector2f& Pos ) { + return Vector2i( ( (Int32)Pos.x + mOffset.x ) / mMap->TileSize().Width(), ( (Int32)Pos.y + mOffset.y ) / mMap->TileSize().Height() ); } -eeVector2f cTileLayer::GetPosFromTilePos( const eeVector2i& TilePos ) { - return eeVector2f( TilePos.x * mMap->TileSize().Width() + mOffset.x, TilePos.y * mMap->TileSize().Height() + mOffset.y ); +Vector2f cTileLayer::GetPosFromTilePos( const Vector2i& TilePos ) { + return Vector2f( TilePos.x * mMap->TileSize().Width() + mOffset.x, TilePos.y * mMap->TileSize().Height() + mOffset.y ); } }} diff --git a/src/eepp/gaming/mapeditor/clayerproperties.cpp b/src/eepp/gaming/mapeditor/clayerproperties.cpp index 5b8257d01..02bb05b34 100644 --- a/src/eepp/gaming/mapeditor/clayerproperties.cpp +++ b/src/eepp/gaming/mapeditor/clayerproperties.cpp @@ -20,29 +20,29 @@ cLayerProperties::cLayerProperties( cLayer * Map, RefreshLayerListCb Cb ) : if ( NULL == mUITheme ) return; - mUIWindow = mUITheme->CreateWindow( NULL, eeSize( 500, 500 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, eeSize( 500, 500 ) ); + mUIWindow = mUITheme->CreateWindow( NULL, Sizei( 500, 500 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, Sizei( 500, 500 ) ); mUIWindow->AddEventListener( cUIEvent::EventOnWindowClose, cb::Make1( this, &cLayerProperties::WindowClose ) ); mUIWindow->Title( "Layer Properties" ); Int32 InitialY = 16; Int32 DistFromTitle = 18; - cUITextBox * Txt = mUITheme->CreateTextBox( "Layer name:", mUIWindow->Container(), eeSize(), eeVector2i( 50, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIInput = mUITheme->CreateTextInput( mUIWindow->Container(), eeSize( 120, 22 ), eeVector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, true, 64 ); + cUITextBox * Txt = mUITheme->CreateTextBox( "Layer name:", mUIWindow->Container(), Sizei(), Vector2i( 50, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIInput = mUITheme->CreateTextInput( mUIWindow->Container(), Sizei( 120, 22 ), Vector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, true, 64 ); mUIInput->Text( mLayer->Name() ); mUIInput->AddEventListener( cUIEvent::EventOnPressEnter, cb::Make1( this, &cLayerProperties::OKClick ) ); Uint32 TxtBoxFlags = UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_HALIGN_CENTER | UI_VALIGN_CENTER; - mUITheme->CreateTextBox( "Property Name", mUIWindow->Container(), eeSize(192, 24), eeVector2i( 50, mUIInput->Pos().y + mUIInput->Size().Height() + 12 ), TxtBoxFlags ); - cUITextBox * TxtBox = mUITheme->CreateTextBox( "Property Value", mUIWindow->Container(), eeSize(192, 24), eeVector2i( 50+192, mUIInput->Pos().y + mUIInput->Size().Height() + 12 ), TxtBoxFlags ); + mUITheme->CreateTextBox( "Property Name", mUIWindow->Container(), Sizei(192, 24), Vector2i( 50, mUIInput->Pos().y + mUIInput->Size().Height() + 12 ), TxtBoxFlags ); + cUITextBox * TxtBox = mUITheme->CreateTextBox( "Property Value", mUIWindow->Container(), Sizei(192, 24), Vector2i( 50+192, mUIInput->Pos().y + mUIInput->Size().Height() + 12 ), TxtBoxFlags ); - cUIPushButton * OKButton = mUITheme->CreatePushButton( mUIWindow->Container(), eeSize( 80, 22 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "ok" ) ); + cUIPushButton * OKButton = mUITheme->CreatePushButton( mUIWindow->Container(), Sizei( 80, 22 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "ok" ) ); OKButton->Pos( mUIWindow->Container()->Size().Width() - OKButton->Size().Width() - 4, mUIWindow->Container()->Size().Height() - OKButton->Size().Height() - 4 ); OKButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cLayerProperties::OKClick ) ); OKButton->Text( "OK" ); - cUIPushButton * CancelButton = mUITheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), eeVector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "cancel" ) ); + cUIPushButton * CancelButton = mUITheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), Vector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "cancel" ) ); CancelButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cLayerProperties::CancelClick ) ); CancelButton->Text( "Cancel" ); @@ -62,9 +62,9 @@ cLayerProperties::cLayerProperties( cLayer * Map, RefreshLayerListCb Cb ) : mGenGrid->CollumnWidth( 3, 175 ); mGenGrid->CollumnWidth( 4, 10 ); - eeVector2i Pos( mGenGrid->Pos().x + mGenGrid->Size().Width() + 10, mGenGrid->Pos().y ); + Vector2i Pos( mGenGrid->Pos().x + mGenGrid->Size().Width() + 10, mGenGrid->Pos().y ); - cUIPushButton * AddButton = mUITheme->CreatePushButton( mUIWindow->Container(), eeSize(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->GetIconByName( "add" ) ); + cUIPushButton * AddButton = mUITheme->CreatePushButton( mUIWindow->Container(), Sizei(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->GetIconByName( "add" ) ); AddButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cLayerProperties::AddCellClick ) ); if ( NULL == AddButton->Icon()->SubTexture() ) @@ -72,7 +72,7 @@ cLayerProperties::cLayerProperties( cLayer * Map, RefreshLayerListCb Cb ) : Pos.y += AddButton->Size().Height() + 5; - cUIPushButton * RemoveButton = mUITheme->CreatePushButton( mUIWindow->Container(), eeSize(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->GetIconByName( "remove" ) ); + cUIPushButton * RemoveButton = mUITheme->CreatePushButton( mUIWindow->Container(), Sizei(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->GetIconByName( "remove" ) ); RemoveButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cLayerProperties::RemoveCellClick ) ); if ( NULL == RemoveButton->Icon()->SubTexture() ) diff --git a/src/eepp/gaming/mapeditor/cmapeditor.cpp b/src/eepp/gaming/mapeditor/cmapeditor.cpp index dda2ccf55..20ff67f30 100644 --- a/src/eepp/gaming/mapeditor/cmapeditor.cpp +++ b/src/eepp/gaming/mapeditor/cmapeditor.cpp @@ -85,9 +85,9 @@ void cMapEditor::CreateME() { void cMapEditor::CreateWinMenu() { cUIWinMenu * WinMenu = mTheme->CreateWinMenu( mUIContainer ); - mTileBox = mTheme->CreateTextBox( "", mUIContainer, eeSize(), eeVector2i(), UI_HALIGN_RIGHT | UI_VALIGN_CENTER | UI_ANCHOR_TOP | UI_ANCHOR_RIGHT ); + mTileBox = mTheme->CreateTextBox( "", mUIContainer, Sizei(), Vector2i(), UI_HALIGN_RIGHT | UI_VALIGN_CENTER | UI_ANCHOR_TOP | UI_ANCHOR_RIGHT ); mTileBox->Size( 100, WinMenu->Size().Height() ); - mTileBox->Pos( eeVector2i( mUIContainer->Size().Width() - mTileBox->Size().Width(), 0 ) ); + mTileBox->Pos( Vector2i( mUIContainer->Size().Width() - mTileBox->Size().Width(), 0 ) ); mTileBox->UpdateAnchorsDistances(); cUIPopUpMenu * PU1 = mTheme->CreatePopUpMenu( mUIContainer ); @@ -176,7 +176,7 @@ void cMapEditor::CreateETGMenu() { cUIComplexControl::CreateParams CParams; CParams.Parent( mWinContainer ); - CParams.SizeSet( eeSize( Width + DistToBorder, mWinContainer->Size().Height() ) ); + CParams.SizeSet( Sizei( Width + DistToBorder, mWinContainer->Size().Height() ) ); CParams.Flags = UI_CONTROL_DEFAULT_ALIGN | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP; mSubTextureCont = eeNew( cUIComplexControl, ( CParams ) ); mSubTextureCont->Enabled( true ); @@ -186,7 +186,7 @@ void cMapEditor::CreateETGMenu() { mObjectCont = eeNew( cUIComplexControl, ( CParams ) ); - mTabWidget = mTheme->CreateTabWidget( mWinContainer, eeSize( Width + DistToBorder, mWinContainer->Size().Height() - DistFromTopMenu ), eeVector2i( ContPosX, DistFromTopMenu ), UI_HALIGN_CENTER | UI_VALIGN_BOTTOM | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP | UI_ANCHOR_BOTTOM ); + mTabWidget = mTheme->CreateTabWidget( mWinContainer, Sizei( Width + DistToBorder, mWinContainer->Size().Height() - DistFromTopMenu ), Vector2i( ContPosX, DistFromTopMenu ), UI_HALIGN_CENTER | UI_VALIGN_BOTTOM | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP | UI_ANCHOR_BOTTOM ); mTabWidget->AddEventListener( cUIEvent::EventOnTabSelected, cb::Make1( this, &cMapEditor::OnTabSelected ) ); CreateTabs(); @@ -240,106 +240,106 @@ void cMapEditor::CreateSubTextureContainer( Int32 Width ) { cUITextBox * Txt; Uint32 TxtFlags = UI_CONTROL_DEFAULT_ALIGN | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP | UI_DRAW_SHADOW; - Txt = mTheme->CreateTextBox( "Add Game Object as...", mSubTextureCont, eeSize( Width, 16 ), eeVector2i( TAB_CONT_X_DIST, 4 ), TxtFlags ); + Txt = mTheme->CreateTextBox( "Add Game Object as...", mSubTextureCont, Sizei( Width, 16 ), Vector2i( TAB_CONT_X_DIST, 4 ), TxtFlags ); - mGOTypeList = mTheme->CreateDropDownList( mSubTextureCont, eeSize( Width - 26, 21 ), eeVector2i( TAB_CONT_X_DIST, Txt->Pos().y + Txt->Size().Height() + 4 ), UI_CONTROL_DEFAULT_ALIGN | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP ); + mGOTypeList = mTheme->CreateDropDownList( mSubTextureCont, Sizei( Width - 26, 21 ), Vector2i( TAB_CONT_X_DIST, Txt->Pos().y + Txt->Size().Height() + 4 ), UI_CONTROL_DEFAULT_ALIGN | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP ); mGOTypeList->AddEventListener( cUIEvent::EventOnItemSelected, cb::Make1( this, &cMapEditor::OnTypeChange ) ); FillGotyList(); - mBtnGOTypeAdd = mTheme->CreatePushButton( mSubTextureCont, eeSize( 24, 21 ), eeVector2i( mGOTypeList->Pos().x + mGOTypeList->Size().Width() + 2, mGOTypeList->Pos().y ), UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mTheme->GetIconByName( "add" ) ); + mBtnGOTypeAdd = mTheme->CreatePushButton( mSubTextureCont, Sizei( 24, 21 ), Vector2i( mGOTypeList->Pos().x + mGOTypeList->Size().Width() + 2, mGOTypeList->Pos().y ), UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mTheme->GetIconByName( "add" ) ); mBtnGOTypeAdd->TooltipText( "Adds a new game object type\nunknown by the map editor." ); mBtnGOTypeAdd->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapEditor::AddNewGOType ) ); if ( NULL == mBtnGOTypeAdd->Icon()->SubTexture() ) mBtnGOTypeAdd->Text( "..." ); - Txt = mTheme->CreateTextBox( "Layers:", mSubTextureCont, eeSize( Width, 16 ), eeVector2i( TAB_CONT_X_DIST, mGOTypeList->Pos().y + mGOTypeList->Size().Height() + 4 ), TxtFlags ); + Txt = mTheme->CreateTextBox( "Layers:", mSubTextureCont, Sizei( Width, 16 ), Vector2i( TAB_CONT_X_DIST, mGOTypeList->Pos().y + mGOTypeList->Size().Height() + 4 ), TxtFlags ); - mLayerList = mTheme->CreateDropDownList( mSubTextureCont, eeSize( Width, 21 ), eeVector2i( TAB_CONT_X_DIST, Txt->Pos().y + Txt->Size().Height() + 4 ), UI_CONTROL_DEFAULT_ALIGN | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP ); + mLayerList = mTheme->CreateDropDownList( mSubTextureCont, Sizei( Width, 21 ), Vector2i( TAB_CONT_X_DIST, Txt->Pos().y + Txt->Size().Height() + 4 ), UI_CONTROL_DEFAULT_ALIGN | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP ); mLayerList->AddEventListener( cUIEvent::EventOnItemSelected, cb::Make1( this, &cMapEditor::OnLayerSelect ) ); - Txt = mTheme->CreateTextBox( "Game Object Flags:", mSubTextureCont, eeSize( Width, 16 ), eeVector2i( TAB_CONT_X_DIST, mLayerList->Pos().y + mLayerList->Size().Height() + 4 ), TxtFlags ); + Txt = mTheme->CreateTextBox( "Game Object Flags:", mSubTextureCont, Sizei( Width, 16 ), Vector2i( TAB_CONT_X_DIST, mLayerList->Pos().y + mLayerList->Size().Height() + 4 ), TxtFlags ); Uint32 ChkFlags = UI_CONTROL_DEFAULT_ALIGN | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP; - mChkMirrored = mTheme->CreateCheckBox( mSubTextureCont, eeSize(), eeVector2i( TAB_CONT_X_DIST, Txt->Pos().y + Txt->Size().Height() + 4 ), ChkFlags ); + mChkMirrored = mTheme->CreateCheckBox( mSubTextureCont, Sizei(), Vector2i( TAB_CONT_X_DIST, Txt->Pos().y + Txt->Size().Height() + 4 ), ChkFlags ); mChkMirrored->Text( "Mirrored" ); mChkMirrored->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapEditor::ChkClickMirrored ) ); - mChkFliped = mTheme->CreateCheckBox( mSubTextureCont, eeSize(), eeVector2i( mChkMirrored->Pos().x + mChkMirrored->Size().Width() + 32, mChkMirrored->Pos().y ), ChkFlags ); + mChkFliped = mTheme->CreateCheckBox( mSubTextureCont, Sizei(), Vector2i( mChkMirrored->Pos().x + mChkMirrored->Size().Width() + 32, mChkMirrored->Pos().y ), ChkFlags ); mChkFliped->Text( "Fliped" ); mChkFliped->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapEditor::ChkClickFliped ) ); - mChkBlocked = mTheme->CreateCheckBox( mSubTextureCont, eeSize(), eeVector2i( mChkMirrored->Pos().x, mChkMirrored->Pos().y + mChkMirrored->Size().Height() + 4 ), ChkFlags ); + mChkBlocked = mTheme->CreateCheckBox( mSubTextureCont, Sizei(), Vector2i( mChkMirrored->Pos().x, mChkMirrored->Pos().y + mChkMirrored->Size().Height() + 4 ), ChkFlags ); mChkBlocked->Text( "Blocked" ); mChkBlocked->TooltipText( "Blocks the tile occupied by the sprite." ); mChkBlocked->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapEditor::ChkClickBlocked ) ); - mChkAnim = mTheme->CreateCheckBox( mSubTextureCont, eeSize(), eeVector2i( mChkFliped->Pos().x, mChkFliped->Pos().y + mChkFliped->Size().Height() + 4 ), ChkFlags ); + mChkAnim = mTheme->CreateCheckBox( mSubTextureCont, Sizei(), Vector2i( mChkFliped->Pos().x, mChkFliped->Pos().y + mChkFliped->Size().Height() + 4 ), ChkFlags ); mChkAnim->Text( "Animated" ); mChkAnim->TooltipText( "Indicates if the Sprite is animated." ); mChkAnim->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapEditor::ChkClickAnimated ) ); - mChkRot90 = mTheme->CreateCheckBox( mSubTextureCont, eeSize(), eeVector2i( mChkBlocked->Pos().x, mChkBlocked->Pos().y + mChkBlocked->Size().Height() + 4 ), ChkFlags ); + mChkRot90 = mTheme->CreateCheckBox( mSubTextureCont, Sizei(), Vector2i( mChkBlocked->Pos().x, mChkBlocked->Pos().y + mChkBlocked->Size().Height() + 4 ), ChkFlags ); mChkRot90->Text( String::FromUtf8( "Rotate 90º" ) ); mChkRot90->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapEditor::ChkClickRot90 ) ); - mChkAutoFix = mTheme->CreateCheckBox( mSubTextureCont, eeSize(), eeVector2i( mChkAnim->Pos().x, mChkAnim->Pos().y + mChkAnim->Size().Height() + 4 ), ChkFlags ); + mChkAutoFix = mTheme->CreateCheckBox( mSubTextureCont, Sizei(), Vector2i( mChkAnim->Pos().x, mChkAnim->Pos().y + mChkAnim->Size().Height() + 4 ), ChkFlags ); mChkAutoFix->Text( "AutoFix TilePos" ); mChkAutoFix->TooltipText( "In a tiled layer if the sprite is moved,\nit will update the current tile position automatically." ); mChkAutoFix->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapEditor::ChkClickAutoFix ) ); - Txt = mTheme->CreateTextBox( "Game Object Data:", mSubTextureCont, eeSize( Width, 16 ), eeVector2i( TAB_CONT_X_DIST, mChkRot90->Pos().y + mChkRot90->Size().Height() + 8 ), TxtFlags ); + Txt = mTheme->CreateTextBox( "Game Object Data:", mSubTextureCont, Sizei( Width, 16 ), Vector2i( TAB_CONT_X_DIST, mChkRot90->Pos().y + mChkRot90->Size().Height() + 8 ), TxtFlags ); - mChkDI = mTheme->CreateCheckBox( mSubTextureCont, eeSize(), eeVector2i( TAB_CONT_X_DIST, Txt->Pos().y + Txt->Size().Height() + 4 ), ChkFlags ); + mChkDI = mTheme->CreateCheckBox( mSubTextureCont, Sizei(), Vector2i( TAB_CONT_X_DIST, Txt->Pos().y + Txt->Size().Height() + 4 ), ChkFlags ); mChkDI->Text( "Add as DataId" ); mChkDI->TooltipText( "If the resource it's not a sprite,\nyou can reference it with a data id" ); mChkDI->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapEditor::ChkClickDI ) ); cUIComplexControl::CreateParams SGParams; SGParams.Parent( mSubTextureCont ); - SGParams.PosSet( eeVector2i( TAB_CONT_X_DIST, mChkDI->Pos().y + mChkDI->Size().Height() + 8 ) ); - SGParams.SizeSet( eeSize( Width, 400 ) ); + SGParams.PosSet( Vector2i( TAB_CONT_X_DIST, mChkDI->Pos().y + mChkDI->Size().Height() + 8 ) ); + SGParams.SizeSet( Sizei( Width, 400 ) ); SGParams.Flags = UI_CONTROL_DEFAULT_ALIGN | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP; mSGCont = eeNew( cUIComplexControl, ( SGParams ) ); mSGCont->Enabled( true ); mSGCont->Visible( true ); - Txt = mTheme->CreateTextBox( "Texture Atlases:", mSGCont, eeSize( Width, 16 ), eeVector2i( TAB_CONT_X_DIST, 0 ), TxtFlags ); + Txt = mTheme->CreateTextBox( "Texture Atlases:", mSGCont, Sizei( Width, 16 ), Vector2i( TAB_CONT_X_DIST, 0 ), TxtFlags ); - mTextureAtlasesList = mTheme->CreateDropDownList( mSGCont, eeSize( Width, 21 ), eeVector2i( 0, Txt->Pos().y +Txt->Size().Height() + 4 ), UI_CONTROL_DEFAULT_ALIGN | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP ); + mTextureAtlasesList = mTheme->CreateDropDownList( mSGCont, Sizei( Width, 21 ), Vector2i( 0, Txt->Pos().y +Txt->Size().Height() + 4 ), UI_CONTROL_DEFAULT_ALIGN | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP ); mTextureAtlasesList->AddEventListener( cUIEvent::EventOnItemSelected, cb::Make1( this, &cMapEditor::OnTextureAtlasChange ) ); - mSubTextureList = mTheme->CreateListBox( mSGCont, eeSize( Width, 156 ), eeVector2i( 0, mTextureAtlasesList->Pos().y + mTextureAtlasesList->Size().Height() + 4 ), UI_CONTROL_DEFAULT_ALIGN | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP ); + mSubTextureList = mTheme->CreateListBox( mSGCont, Sizei( Width, 156 ), Vector2i( 0, mTextureAtlasesList->Pos().y + mTextureAtlasesList->Size().Height() + 4 ), UI_CONTROL_DEFAULT_ALIGN | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP ); mSubTextureList->Size( mSubTextureList->Size().Width(), mSubTextureList->RowHeight() * 9 + mSubTextureList->PaddingContainer().Top + mSubTextureList->PaddingContainer().Bottom ); mSubTextureList->AddEventListener( cUIEvent::EventOnItemSelected, cb::Make1( this, &cMapEditor::OnSubTextureChange ) ); - 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 = mTheme->CreateGfx( NULL, mSGCont, Sizei( Width, Width ), Vector2i( 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( ColorA( 0, 0, 0, 200 ) ); cUIComplexControl::CreateParams DIParams; DIParams.Parent( mSubTextureCont ); DIParams.PosSet( SGParams.Pos ); - DIParams.SizeSet( eeSize( Width, 400 ) ); + DIParams.SizeSet( Sizei( Width, 400 ) ); DIParams.Flags = UI_CONTROL_DEFAULT_ALIGN | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP; mDICont = eeNew( cUIComplexControl, ( DIParams ) ); mDICont->Enabled( false ); mDICont->Visible( false ); - Txt = mTheme->CreateTextBox( "DataId String:", mDICont, eeSize( Width, 16 ), eeVector2i( TAB_CONT_X_DIST, 0 ), TxtFlags ); + Txt = mTheme->CreateTextBox( "DataId String:", mDICont, Sizei( Width, 16 ), Vector2i( TAB_CONT_X_DIST, 0 ), TxtFlags ); - mDataIdInput = mTheme->CreateTextInput( mDICont, eeSize( Width / 4 * 3, 21 ), eeVector2i( TAB_CONT_X_DIST + 8, Txt->Pos().y + Txt->Size().Height() + 8 ), UI_CONTROL_DEFAULT_ALIGN | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE ); + mDataIdInput = mTheme->CreateTextInput( mDICont, Sizei( Width / 4 * 3, 21 ), Vector2i( TAB_CONT_X_DIST + 8, Txt->Pos().y + Txt->Size().Height() + 8 ), UI_CONTROL_DEFAULT_ALIGN | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE ); FillSGCombo(); } void cMapEditor::CreateLighContainer() { - cUIPushButton * NewLightBut = mTheme->CreatePushButton( mLightCont, eeSize( mLightCont->Size().Width() - TAB_CONT_X_DIST * 2, 22 ), eeVector2i( TAB_CONT_X_DIST, 0 ) ); + cUIPushButton * NewLightBut = mTheme->CreatePushButton( mLightCont, Sizei( mLightCont->Size().Width() - TAB_CONT_X_DIST * 2, 22 ), Vector2i( TAB_CONT_X_DIST, 0 ) ); NewLightBut->Text( "New Light" ); NewLightBut->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapEditor::OnNewLight ) ); - cUITextBox * Txt = mTheme->CreateTextBox( "Light Color:", mLightCont, eeSize(), eeVector2i( TAB_CONT_X_DIST, 32 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + cUITextBox * Txt = mTheme->CreateTextBox( "Light Color:", mLightCont, Sizei(), Vector2i( TAB_CONT_X_DIST, 32 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); cUIComplexControl::CreateParams ComParams; ComParams.Parent( mLightCont ); @@ -352,44 +352,44 @@ void cMapEditor::CreateLighContainer() { mUIBaseColor->Visible( true ); mUIBaseColor->Enabled( true ); - Txt = mTheme->CreateTextBox( "R:", mLightCont, eeSize(), eeVector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIBaseColor->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIRedSlider = mTheme->CreateSlider( mLightCont, eeSize( 100, 20 ), eeVector2i( Txt->Pos().x + Txt->Size().Width(), Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + Txt = mTheme->CreateTextBox( "R:", mLightCont, Sizei(), Vector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIBaseColor->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIRedSlider = mTheme->CreateSlider( mLightCont, Sizei( 100, 20 ), Vector2i( Txt->Pos().x + Txt->Size().Width(), Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mUIRedSlider->MaxValue( 255 ); mUIRedSlider->Value( 255 ); mUIRedSlider->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cMapEditor::OnRedChange ) ); - mUIRedTxt = mTheme->CreateTextBox( String::ToStr( (Uint32)255 ), mLightCont, eeSize(), eeVector2i( mUIRedSlider->Pos().x + mUIRedSlider->Size().Width() + 4, mUIRedSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIRedTxt = mTheme->CreateTextBox( String::ToStr( (Uint32)255 ), mLightCont, Sizei(), Vector2i( mUIRedSlider->Pos().x + mUIRedSlider->Size().Width() + 4, mUIRedSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - Txt = mTheme->CreateTextBox( "G:", mLightCont, eeSize(), eeVector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIRedSlider->Pos().y + mUIRedSlider->Size().Height() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIGreenSlider = mTheme->CreateSlider( mLightCont, eeSize( 100, 20 ), eeVector2i( mUIRedSlider->Pos().x, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + Txt = mTheme->CreateTextBox( "G:", mLightCont, Sizei(), Vector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIRedSlider->Pos().y + mUIRedSlider->Size().Height() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIGreenSlider = mTheme->CreateSlider( mLightCont, Sizei( 100, 20 ), Vector2i( mUIRedSlider->Pos().x, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mUIGreenSlider->MaxValue( 255 ); mUIGreenSlider->Value( 255 ); mUIGreenSlider->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cMapEditor::OnGreenChange ) ); - mUIGreenTxt = mTheme->CreateTextBox( String::ToStr( (Uint32)255 ), mLightCont, eeSize(), eeVector2i( mUIGreenSlider->Pos().x + mUIGreenSlider->Size().Width() + 4, mUIGreenSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIGreenTxt = mTheme->CreateTextBox( String::ToStr( (Uint32)255 ), mLightCont, Sizei(), Vector2i( mUIGreenSlider->Pos().x + mUIGreenSlider->Size().Width() + 4, mUIGreenSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - Txt = mTheme->CreateTextBox( "B:", mLightCont, eeSize(), eeVector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIGreenSlider->Pos().y + mUIGreenSlider->Size().Height() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIBlueSlider = mTheme->CreateSlider( mLightCont, eeSize( 100, 20 ), eeVector2i( mUIRedSlider->Pos().x, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + Txt = mTheme->CreateTextBox( "B:", mLightCont, Sizei(), Vector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIGreenSlider->Pos().y + mUIGreenSlider->Size().Height() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIBlueSlider = mTheme->CreateSlider( mLightCont, Sizei( 100, 20 ), Vector2i( mUIRedSlider->Pos().x, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mUIBlueSlider->MaxValue( 255 ); mUIBlueSlider->Value( 255 ); mUIBlueSlider->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cMapEditor::OnBlueChange ) ); - mUIBlueTxt = mTheme->CreateTextBox( String::ToStr( (Uint32)255 ), mLightCont, eeSize(), eeVector2i( mUIBlueSlider->Pos().x + mUIBlueSlider->Size().Width() + 4, mUIBlueSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIBlueTxt = mTheme->CreateTextBox( String::ToStr( (Uint32)255 ), mLightCont, Sizei(), Vector2i( mUIBlueSlider->Pos().x + mUIBlueSlider->Size().Width() + 4, mUIBlueSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - Txt = mTheme->CreateTextBox( "Light Radius:", mLightCont, eeSize(), eeVector2i( TAB_CONT_X_DIST, mUIBlueTxt->Pos().y + mUIBlueTxt->Size().Height() + 16 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + Txt = mTheme->CreateTextBox( "Light Radius:", mLightCont, Sizei(), Vector2i( TAB_CONT_X_DIST, mUIBlueTxt->Pos().y + mUIBlueTxt->Size().Height() + 16 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mLightRadius = mTheme->CreateSpinBox( mLightCont, eeSize( 100, 22 ), eeVector2i( Txt->Pos().x, Txt->Pos().y + Txt->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_SIZE | UI_TEXT_SELECTION_ENABLED, 100, false ); + mLightRadius = mTheme->CreateSpinBox( mLightCont, Sizei( 100, 22 ), Vector2i( Txt->Pos().x, Txt->Pos().y + Txt->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_SIZE | UI_TEXT_SELECTION_ENABLED, 100, false ); mLightRadius->MaxValue( 2000 ); mLightRadius->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cMapEditor::OnLightRadiusChangeVal ) ); - mLightTypeChk = mTheme->CreateCheckBox( mLightCont, eeSize(), eeVector2i( mLightRadius->Pos().x, mLightRadius->Pos().y + mLightRadius->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + mLightTypeChk = mTheme->CreateCheckBox( mLightCont, Sizei(), Vector2i( mLightRadius->Pos().x, mLightRadius->Pos().y + mLightRadius->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mLightTypeChk->Text( "Isometric Light" ); mLightTypeChk->Active( false ); mLightTypeChk->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cMapEditor::OnLightTypeChange ) ); } cUISelectButton * cMapEditor::AddObjContButton( String text, Uint32 mode ) { - cUISelectButton * Button = mTheme->CreateSelectButton( mObjectCont, eeSize( mObjectCont->Size().Width() - TAB_CONT_X_DIST * 2, 22 ), eeVector2i( TAB_CONT_X_DIST, mLastSelButtonY ) ); + cUISelectButton * Button = mTheme->CreateSelectButton( mObjectCont, Sizei( mObjectCont->Size().Width() - TAB_CONT_X_DIST * 2, 22 ), Vector2i( TAB_CONT_X_DIST, mLastSelButtonY ) ); Button->Text( text ); Button->Data( mode ); @@ -414,7 +414,7 @@ void cMapEditor::CreateObjectsContainer() { Uint32 ChkFlags = UI_CONTROL_DEFAULT_ALIGN | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP; - mChkClampToTile = mTheme->CreateCheckBox( mObjectCont, eeSize(), eeVector2i( 12, nextY ), ChkFlags ); + mChkClampToTile = mTheme->CreateCheckBox( mObjectCont, Sizei(), Vector2i( 12, nextY ), ChkFlags ); mChkClampToTile->Text( "Clamp Position to Tile" ); mChkClampToTile->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapEditor::ChkClickClampToTile ) ); mChkClampToTile->Active( true ); @@ -478,16 +478,16 @@ void cMapEditor::CreateUIMap() { mUIMap->SetUpdateScrollCb( cb::Make0( this, &cMapEditor::UpdateScroll ) ); mUIMap->SetTileBox( mTileBox ); - mMapHScroll = mTheme->CreateScrollBar( mWinContainer, eeSize( Params.Size.Width(), ScrollH ), eeVector2i( 0, mWinContainer->Size().Height() - ScrollH ), UI_ANCHOR_LEFT | UI_ANCHOR_RIGHT | UI_ANCHOR_BOTTOM | UI_AUTO_SIZE ); + mMapHScroll = mTheme->CreateScrollBar( mWinContainer, Sizei( Params.Size.Width(), ScrollH ), Vector2i( 0, mWinContainer->Size().Height() - ScrollH ), UI_ANCHOR_LEFT | UI_ANCHOR_RIGHT | UI_ANCHOR_BOTTOM | UI_AUTO_SIZE ); mMapHScroll->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cMapEditor::OnScrollMapH ) ); - mMapVScroll = mTheme->CreateScrollBar( mWinContainer, eeSize( ScrollV, Params.Size.Height() ), eeVector2i( Params.Size.Width() + ScrollV, 0 ), UI_ANCHOR_TOP | UI_ANCHOR_BOTTOM | UI_AUTO_SIZE , true ); + mMapVScroll = mTheme->CreateScrollBar( mWinContainer, Sizei( ScrollV, Params.Size.Height() ), Vector2i( Params.Size.Width() + ScrollV, 0 ), UI_ANCHOR_TOP | UI_ANCHOR_BOTTOM | UI_AUTO_SIZE , true ); mMapVScroll->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cMapEditor::OnScrollMapV ) ); MapCreated(); } -void cMapEditor::OnAddObject( Uint32 Type, eePolygon2f poly ) { +void cMapEditor::OnAddObject( Uint32 Type, Polygon2f poly ) { if ( NULL == mCurLayer ) { CreateNoLayerAlert( "No layers found" )->SetFocus(); return; @@ -543,7 +543,7 @@ void cMapEditor::OnNewLight( const cUIEvent * Event ) { const cUIEventMouse * MEvent = reinterpret_cast ( Event ); if ( MEvent->Flags() & EE_BUTTON_LMASK ) { - eeVector2i Pos = mUIMap->Map()->GetMouseMapPos(); + Vector2i Pos = mUIMap->Map()->GetMouseMapPos(); mUIMap->AddLight( eeNew( cLight, ( mLightRadius->Value(), Pos.x, Pos.y, mUIBaseColor->Background()->Color().ToColor(), mLightTypeChk->Active() ? LIGHT_ISOMETRIC : LIGHT_NORMAL ) ) ); } } @@ -778,7 +778,7 @@ void cMapEditor::CreateNewMap() { } void cMapEditor::CreateNewEmptyMap() { - mUIMap->Map()->Create( eeSize( 100, 100 ), 16, eeSize( 32, 32 ), MAP_EDITOR_DEFAULT_FLAGS | MAP_FLAG_LIGHTS_ENABLED, mUIMap->Size() ); + mUIMap->Map()->Create( Sizei( 100, 100 ), 16, Sizei( 32, 32 ), MAP_EDITOR_DEFAULT_FLAGS | MAP_FLAG_LIGHTS_ENABLED, mUIMap->Size() ); } void cMapEditor::MapCreated() { @@ -802,7 +802,7 @@ void cMapEditor::OnMapSizeChange( const cUIEvent *Event ) { if ( mMouseScrolling ) return; - eeVector2i v( mUIMap->Map()->GetMaxOffset() ); + Vector2i v( mUIMap->Map()->GetMaxOffset() ); mMapHScroll->MinValue( 0 ); mMapHScroll->MaxValue( v.x ); @@ -818,7 +818,7 @@ void cMapEditor::OnScrollMapH( const cUIEvent * Event ) { cUIScrollBar * Scr = reinterpret_cast ( Event->Ctrl() ); - eeVector2f Off = mUIMap->Map()->Offset(); + Vector2f Off = mUIMap->Map()->Offset(); Off.x = -Scr->Value(); @@ -828,7 +828,7 @@ void cMapEditor::OnScrollMapH( const cUIEvent * Event ) { void cMapEditor::OnScrollMapV( const cUIEvent * Event ) { cUIScrollBar * Scr = reinterpret_cast ( Event->Ctrl() ); - eeVector2f Off = mUIMap->Map()->Offset(); + Vector2f Off = mUIMap->Map()->Offset(); Off.y = -Scr->Value(); @@ -883,14 +883,14 @@ void cMapEditor::FileMenuClick( const cUIEvent * Event ) { if ( "New..." == txt ) { CreateNewMap(); } else if ( "Open..." == txt ) { - cUICommonDialog * TGDialog = mTheme->CreateCommonDialog( NULL, eeSize(), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL, eeSize(), 255, UI_CDL_DEFAULT_FLAGS, "*.eem" ); + cUICommonDialog * TGDialog = mTheme->CreateCommonDialog( NULL, Sizei(), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL, Sizei(), 255, UI_CDL_DEFAULT_FLAGS, "*.eem" ); TGDialog->Title( "Open Map" ); TGDialog->AddEventListener( cUIEvent::EventOpenFile, cb::Make1( this, &cMapEditor::MapOpen ) ); TGDialog->Center(); TGDialog->Show(); } else if ( "Save As..." == txt ) { - cUICommonDialog * TGDialog = mTheme->CreateCommonDialog( NULL, eeSize(), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL, eeSize(), 255, UI_CDL_DEFAULT_FLAGS | CDL_FLAG_SAVE_DIALOG, "*.eem" ); + cUICommonDialog * TGDialog = mTheme->CreateCommonDialog( NULL, Sizei(), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL, Sizei(), 255, UI_CDL_DEFAULT_FLAGS | CDL_FLAG_SAVE_DIALOG, "*.eem" ); TGDialog->Title( "Save Map" ); TGDialog->AddEventListener( cUIEvent::EventSaveFile, cb::Make1( this, &cMapEditor::MapSave ) ); @@ -1011,12 +1011,12 @@ void cMapEditor::MapMenuClick( const cUIEvent * Event ) { const String& txt = reinterpret_cast ( Event->Ctrl() )->Text(); if ( "New Texture Atlas..." == txt ) { - cUIWindow * tWin = mTheme->CreateWindow( NULL, eeSize( 1024, 768 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_DRAGABLE_CONTAINER, eeSize( 1024, 768 ) ); + cUIWindow * tWin = mTheme->CreateWindow( NULL, Sizei( 1024, 768 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_DRAGABLE_CONTAINER, Sizei( 1024, 768 ) ); eeNew ( Tools::cTextureAtlasEditor, ( tWin ) ); tWin->Center(); tWin->Show(); } else if ( "Add External Texture Atlas..." == txt ) { - cUICommonDialog * TGDialog = mTheme->CreateCommonDialog( NULL, eeSize(), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL, eeSize(), 255, UI_CDL_DEFAULT_FLAGS, std::string( "*" ) + EE_TEXTURE_ATLAS_EXTENSION ); + cUICommonDialog * TGDialog = mTheme->CreateCommonDialog( NULL, Sizei(), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL, Sizei(), 255, UI_CDL_DEFAULT_FLAGS, std::string( "*" ) + EE_TEXTURE_ATLAS_EXTENSION ); TGDialog->Title( "Load Texture Atlas..." ); TGDialog->AddEventListener( cUIEvent::EventOpenFile, cb::Make1( this, &cMapEditor::TextureAtlasOpen ) ); @@ -1244,13 +1244,13 @@ void cMapEditor::AddGameObject() { if ( tObj->Type() == GAMEOBJECT_TYPE_VIRTUAL ) reinterpret_cast ( tObj )->SetLayer( tLayer ); - eeVector2i p( tMap->GetMouseMapPos() ); + Vector2i p( tMap->GetMouseMapPos() ); if ( cUIManager::instance()->GetInput()->IsKeyDown( KEY_LCTRL ) ) { p = tMap->GetMouseTilePosCoords(); } - tObj->Pos( eeVector2f( p.x, p.y ) ); + tObj->Pos( Vector2f( p.x, p.y ) ); tLayer->AddGameObject( tObj ); } } diff --git a/src/eepp/gaming/mapeditor/cmapproperties.cpp b/src/eepp/gaming/mapeditor/cmapproperties.cpp index ca7492c88..2fa722b1d 100644 --- a/src/eepp/gaming/mapeditor/cmapproperties.cpp +++ b/src/eepp/gaming/mapeditor/cmapproperties.cpp @@ -18,7 +18,7 @@ cMapProperties::cMapProperties( cMap * Map ) : if ( NULL == mUITheme ) return; - mUIWindow = mUITheme->CreateWindow( NULL, eeSize( 500, 500 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, eeSize( 500, 500 ) ); + mUIWindow = mUITheme->CreateWindow( NULL, Sizei( 500, 500 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, Sizei( 500, 500 ) ); mUIWindow->AddEventListener( cUIEvent::EventOnWindowClose, cb::Make1( this, &cMapProperties::WindowClose ) ); mUIWindow->Title( "Map Properties" ); @@ -28,7 +28,7 @@ cMapProperties::cMapProperties( cMap * Map ) : if ( mMap->LightsEnabled() ) { DiffIfLights = 100; - cUITextBox * Txt = mUITheme->CreateTextBox( "Map Base Color:", mUIWindow->Container(), eeSize(), eeVector2i( 50, 16 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + cUITextBox * Txt = mUITheme->CreateTextBox( "Map Base Color:", mUIWindow->Container(), Sizei(), Vector2i( 50, 16 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); cUIComplexControl::CreateParams ComParams; ComParams.Parent( mUIWindow->Container() ); @@ -41,42 +41,42 @@ cMapProperties::cMapProperties( cMap * Map ) : mUIBaseColor->Visible( true ); mUIBaseColor->Enabled( true ); - Txt = mUITheme->CreateTextBox( "Red Color:", mUIWindow->Container(), eeSize(), eeVector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIBaseColor->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIRedSlider = mUITheme->CreateSlider( mUIWindow->Container(), eeSize( 255, 20 ), eeVector2i( Txt->Pos().x + Txt->Size().Width() + 16, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + Txt = mUITheme->CreateTextBox( "Red Color:", mUIWindow->Container(), Sizei(), Vector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIBaseColor->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIRedSlider = mUITheme->CreateSlider( mUIWindow->Container(), Sizei( 255, 20 ), Vector2i( Txt->Pos().x + Txt->Size().Width() + 16, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mUIRedSlider->MaxValue( 255 ); mUIRedSlider->Value( mMap->BaseColor().R() ); mUIRedSlider->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cMapProperties::OnRedChange ) ); - mUIRedTxt = mUITheme->CreateTextBox( String::ToStr( (Uint32)mMap->BaseColor().R() ), mUIWindow->Container(), eeSize(), eeVector2i( mUIRedSlider->Pos().x + mUIRedSlider->Size().Width() + 4, mUIRedSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIRedTxt = mUITheme->CreateTextBox( String::ToStr( (Uint32)mMap->BaseColor().R() ), mUIWindow->Container(), Sizei(), Vector2i( mUIRedSlider->Pos().x + mUIRedSlider->Size().Width() + 4, mUIRedSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - Txt = mUITheme->CreateTextBox( "Green Color:", mUIWindow->Container(), eeSize(), eeVector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIRedSlider->Pos().y + mUIRedSlider->Size().Height() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIGreenSlider = mUITheme->CreateSlider( mUIWindow->Container(), eeSize( 255, 20 ), eeVector2i( mUIRedSlider->Pos().x, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + Txt = mUITheme->CreateTextBox( "Green Color:", mUIWindow->Container(), Sizei(), Vector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIRedSlider->Pos().y + mUIRedSlider->Size().Height() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIGreenSlider = mUITheme->CreateSlider( mUIWindow->Container(), Sizei( 255, 20 ), Vector2i( mUIRedSlider->Pos().x, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mUIGreenSlider->MaxValue( 255 ); mUIGreenSlider->Value( mMap->BaseColor().G() ); mUIGreenSlider->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cMapProperties::OnGreenChange ) ); - mUIGreenTxt = mUITheme->CreateTextBox( String::ToStr( (Uint32)mMap->BaseColor().G() ), mUIWindow->Container(), eeSize(), eeVector2i( mUIGreenSlider->Pos().x + mUIGreenSlider->Size().Width() + 4, mUIGreenSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIGreenTxt = mUITheme->CreateTextBox( String::ToStr( (Uint32)mMap->BaseColor().G() ), mUIWindow->Container(), Sizei(), Vector2i( mUIGreenSlider->Pos().x + mUIGreenSlider->Size().Width() + 4, mUIGreenSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - Txt = mUITheme->CreateTextBox( "Blue Color:", mUIWindow->Container(), eeSize(), eeVector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIGreenSlider->Pos().y + mUIGreenSlider->Size().Height() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIBlueSlider = mUITheme->CreateSlider( mUIWindow->Container(), eeSize( 255, 20 ), eeVector2i( mUIRedSlider->Pos().x, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + Txt = mUITheme->CreateTextBox( "Blue Color:", mUIWindow->Container(), Sizei(), Vector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIGreenSlider->Pos().y + mUIGreenSlider->Size().Height() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIBlueSlider = mUITheme->CreateSlider( mUIWindow->Container(), Sizei( 255, 20 ), Vector2i( mUIRedSlider->Pos().x, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mUIBlueSlider->MaxValue( 255 ); mUIBlueSlider->Value( mMap->BaseColor().B() ); mUIBlueSlider->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cMapProperties::OnBlueChange ) ); - mUIBlueTxt = mUITheme->CreateTextBox( String::ToStr( (Uint32)mMap->BaseColor().B() ), mUIWindow->Container(), eeSize(), eeVector2i( mUIBlueSlider->Pos().x + mUIBlueSlider->Size().Width() + 4, mUIBlueSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIBlueTxt = mUITheme->CreateTextBox( String::ToStr( (Uint32)mMap->BaseColor().B() ), mUIWindow->Container(), Sizei(), Vector2i( mUIBlueSlider->Pos().x + mUIBlueSlider->Size().Width() + 4, mUIBlueSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); } Uint32 TxtBoxFlags = UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_HALIGN_CENTER | UI_VALIGN_CENTER; - cUITextBox * TxtBox = mUITheme->CreateTextBox( "Property Name", mUIWindow->Container(), eeSize(192, 24), eeVector2i( 50, 10 + DiffIfLights ), TxtBoxFlags ); - mUITheme->CreateTextBox( "Property Value", mUIWindow->Container(), eeSize(192, 24), eeVector2i(50+192, TxtBox->Pos().y ), TxtBoxFlags ); + cUITextBox * TxtBox = mUITheme->CreateTextBox( "Property Name", mUIWindow->Container(), Sizei(192, 24), Vector2i( 50, 10 + DiffIfLights ), TxtBoxFlags ); + mUITheme->CreateTextBox( "Property Value", mUIWindow->Container(), Sizei(192, 24), Vector2i(50+192, TxtBox->Pos().y ), TxtBoxFlags ); - cUIPushButton * OKButton = mUITheme->CreatePushButton( mUIWindow->Container(), eeSize( 80, 22 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "ok" ) ); + cUIPushButton * OKButton = mUITheme->CreatePushButton( mUIWindow->Container(), Sizei( 80, 22 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "ok" ) ); OKButton->Pos( mUIWindow->Container()->Size().Width() - OKButton->Size().Width() - 4, mUIWindow->Container()->Size().Height() - OKButton->Size().Height() - 4 ); OKButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapProperties::OKClick ) ); OKButton->Text( "OK" ); - cUIPushButton * CancelButton = mUITheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), eeVector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "cancel" ) ); + cUIPushButton * CancelButton = mUITheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), Vector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "cancel" ) ); CancelButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapProperties::CancelClick ) ); CancelButton->Text( "Cancel" ); @@ -96,9 +96,9 @@ cMapProperties::cMapProperties( cMap * Map ) : mGenGrid->CollumnWidth( 3, 175 ); mGenGrid->CollumnWidth( 4, 10 ); - eeVector2i Pos( mGenGrid->Pos().x + mGenGrid->Size().Width() + 10, mGenGrid->Pos().y ); + Vector2i Pos( mGenGrid->Pos().x + mGenGrid->Size().Width() + 10, mGenGrid->Pos().y ); - cUIPushButton * AddButton = mUITheme->CreatePushButton( mUIWindow->Container(), eeSize(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->GetIconByName( "add" ) ); + cUIPushButton * AddButton = mUITheme->CreatePushButton( mUIWindow->Container(), Sizei(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->GetIconByName( "add" ) ); AddButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapProperties::AddCellClick ) ); if ( NULL == AddButton->Icon()->SubTexture() ) @@ -106,7 +106,7 @@ cMapProperties::cMapProperties( cMap * Map ) : Pos.y += AddButton->Size().Height() + 5; - cUIPushButton * RemoveButton = mUITheme->CreatePushButton( mUIWindow->Container(), eeSize(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->GetIconByName( "remove" ) ); + cUIPushButton * RemoveButton = mUITheme->CreatePushButton( mUIWindow->Container(), Sizei(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->GetIconByName( "remove" ) ); RemoveButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cMapProperties::RemoveCellClick ) ); if ( NULL == RemoveButton->Icon()->SubTexture() ) diff --git a/src/eepp/gaming/mapeditor/cobjectproperties.cpp b/src/eepp/gaming/mapeditor/cobjectproperties.cpp index 4aa350287..bef503424 100644 --- a/src/eepp/gaming/mapeditor/cobjectproperties.cpp +++ b/src/eepp/gaming/mapeditor/cobjectproperties.cpp @@ -19,34 +19,34 @@ cObjectProperties::cObjectProperties( cGameObjectObject * Obj ) : if ( NULL == mUITheme ) return; - mUIWindow = mUITheme->CreateWindow( NULL, eeSize( 500, 500 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, eeSize( 500, 500 ) ); + mUIWindow = mUITheme->CreateWindow( NULL, Sizei( 500, 500 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, Sizei( 500, 500 ) ); mUIWindow->AddEventListener( cUIEvent::EventOnWindowClose, cb::Make1( this, &cObjectProperties::WindowClose ) ); mUIWindow->Title( "Object Properties" ); Int32 InitialY = 16; Int32 DistFromTitle = 18; - cUITextBox * Txt = mUITheme->CreateTextBox( "Object name:", mUIWindow->Container(), eeSize(), eeVector2i( 50, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIInput = mUITheme->CreateTextInput( mUIWindow->Container(), eeSize( 120, 22 ), eeVector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, true, 64 ); + cUITextBox * Txt = mUITheme->CreateTextBox( "Object name:", mUIWindow->Container(), Sizei(), Vector2i( 50, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIInput = mUITheme->CreateTextInput( mUIWindow->Container(), Sizei( 120, 22 ), Vector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, true, 64 ); mUIInput->Text( mObj->Name() ); mUIInput->AddEventListener( cUIEvent::EventOnPressEnter, cb::Make1( this, &cObjectProperties::OKClick ) ); - cUITextBox * Txt2 = mUITheme->CreateTextBox( "Object type:", mUIWindow->Container(), eeSize(), eeVector2i( 50+192, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIInput2 = mUITheme->CreateTextInput( mUIWindow->Container(), eeSize( 120, 22 ), eeVector2i( Txt2->Pos().x + DistFromTitle, Txt2->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, true, 64 ); + cUITextBox * Txt2 = mUITheme->CreateTextBox( "Object type:", mUIWindow->Container(), Sizei(), Vector2i( 50+192, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIInput2 = mUITheme->CreateTextInput( mUIWindow->Container(), Sizei( 120, 22 ), Vector2i( Txt2->Pos().x + DistFromTitle, Txt2->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, true, 64 ); mUIInput2->Text( mObj->TypeName() ); mUIInput2->AddEventListener( cUIEvent::EventOnPressEnter, cb::Make1( this, &cObjectProperties::OKClick ) ); Uint32 TxtBoxFlags = UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_HALIGN_CENTER | UI_VALIGN_CENTER; - mUITheme->CreateTextBox( "Property Name", mUIWindow->Container(), eeSize(192, 24), eeVector2i( 50, mUIInput->Pos().y + mUIInput->Size().Height() + 12 ), TxtBoxFlags ); - cUITextBox * TxtBox = mUITheme->CreateTextBox( "Property Value", mUIWindow->Container(), eeSize(192, 24), eeVector2i( 50+192, mUIInput->Pos().y + mUIInput->Size().Height() + 12 ), TxtBoxFlags ); + mUITheme->CreateTextBox( "Property Name", mUIWindow->Container(), Sizei(192, 24), Vector2i( 50, mUIInput->Pos().y + mUIInput->Size().Height() + 12 ), TxtBoxFlags ); + cUITextBox * TxtBox = mUITheme->CreateTextBox( "Property Value", mUIWindow->Container(), Sizei(192, 24), Vector2i( 50+192, mUIInput->Pos().y + mUIInput->Size().Height() + 12 ), TxtBoxFlags ); - cUIPushButton * OKButton = mUITheme->CreatePushButton( mUIWindow->Container(), eeSize( 80, 22 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "ok" ) ); + cUIPushButton * OKButton = mUITheme->CreatePushButton( mUIWindow->Container(), Sizei( 80, 22 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "ok" ) ); OKButton->Pos( mUIWindow->Container()->Size().Width() - OKButton->Size().Width() - 4, mUIWindow->Container()->Size().Height() - OKButton->Size().Height() - 4 ); OKButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cObjectProperties::OKClick ) ); OKButton->Text( "OK" ); - cUIPushButton * CancelButton = mUITheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), eeVector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "cancel" ) ); + cUIPushButton * CancelButton = mUITheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), Vector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "cancel" ) ); CancelButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cObjectProperties::CancelClick ) ); CancelButton->Text( "Cancel" ); @@ -66,9 +66,9 @@ cObjectProperties::cObjectProperties( cGameObjectObject * Obj ) : mGenGrid->CollumnWidth( 3, 175 ); mGenGrid->CollumnWidth( 4, 10 ); - eeVector2i Pos( mGenGrid->Pos().x + mGenGrid->Size().Width() + 10, mGenGrid->Pos().y ); + Vector2i Pos( mGenGrid->Pos().x + mGenGrid->Size().Width() + 10, mGenGrid->Pos().y ); - cUIPushButton * AddButton = mUITheme->CreatePushButton( mUIWindow->Container(), eeSize(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->GetIconByName( "add" ) ); + cUIPushButton * AddButton = mUITheme->CreatePushButton( mUIWindow->Container(), Sizei(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->GetIconByName( "add" ) ); AddButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cObjectProperties::AddCellClick ) ); if ( NULL == AddButton->Icon()->SubTexture() ) @@ -76,7 +76,7 @@ cObjectProperties::cObjectProperties( cGameObjectObject * Obj ) : Pos.y += AddButton->Size().Height() + 5; - cUIPushButton * RemoveButton = mUITheme->CreatePushButton( mUIWindow->Container(), eeSize(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->GetIconByName( "remove" ) ); + cUIPushButton * RemoveButton = mUITheme->CreatePushButton( mUIWindow->Container(), Sizei(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->GetIconByName( "remove" ) ); RemoveButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cObjectProperties::RemoveCellClick ) ); if ( NULL == RemoveButton->Icon()->SubTexture() ) diff --git a/src/eepp/gaming/mapeditor/cuigotypenew.cpp b/src/eepp/gaming/mapeditor/cuigotypenew.cpp index 0b671ddee..fd39c8ee3 100644 --- a/src/eepp/gaming/mapeditor/cuigotypenew.cpp +++ b/src/eepp/gaming/mapeditor/cuigotypenew.cpp @@ -14,25 +14,25 @@ cUIGOTypeNew::cUIGOTypeNew( cb::Callback2 Cb ) : if ( NULL == mUITheme ) return; - mUIWindow = mUITheme->CreateWindow( NULL, eeSize( 278, 114 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, eeSize( 278, 114 ) ); + mUIWindow = mUITheme->CreateWindow( NULL, Sizei( 278, 114 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, Sizei( 278, 114 ) ); mUIWindow->AddEventListener( cUIEvent::EventOnWindowClose, cb::Make1( this, &cUIGOTypeNew::WindowClose ) ); mUIWindow->Title( "Add GameObject Type" ); Int32 InitialY = 16; Int32 DistFromTitle = 18; - cUITextBox * Txt = mUITheme->CreateTextBox( "GameObject Type Name", mUIWindow->Container(), eeSize(), eeVector2i( 16, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + cUITextBox * Txt = mUITheme->CreateTextBox( "GameObject Type Name", mUIWindow->Container(), Sizei(), Vector2i( 16, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIInput = mUITheme->CreateTextInput( mUIWindow->Container(), eeSize( 120, 22 ), eeVector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, true, 64 ); + mUIInput = mUITheme->CreateTextInput( mUIWindow->Container(), Sizei( 120, 22 ), Vector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, true, 64 ); - cUIPushButton * OKButton = mUITheme->CreatePushButton( mUIWindow->Container(), eeSize( 80, 22 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "add" ) ); + cUIPushButton * OKButton = mUITheme->CreatePushButton( mUIWindow->Container(), Sizei( 80, 22 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "add" ) ); OKButton->Pos( mUIWindow->Container()->Size().Width() - OKButton->Size().Width() - 4, mUIWindow->Container()->Size().Height() - OKButton->Size().Height() - 4 ); OKButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cUIGOTypeNew::OKClick ) ); mUIInput->AddEventListener( cUIEvent::EventOnPressEnter, cb::Make1( this, &cUIGOTypeNew::OKClick ) ); OKButton->Text( "Add" ); - cUIPushButton * CancelButton = mUITheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), eeVector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "cancel" ) ); + cUIPushButton * CancelButton = mUITheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), Vector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->GetIconByName( "cancel" ) ); CancelButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cUIGOTypeNew::CancelClick ) ); CancelButton->Text( "Cancel" ); diff --git a/src/eepp/gaming/mapeditor/cuilayernew.cpp b/src/eepp/gaming/mapeditor/cuilayernew.cpp index 50a1ab5ce..2edcfe4a7 100644 --- a/src/eepp/gaming/mapeditor/cuilayernew.cpp +++ b/src/eepp/gaming/mapeditor/cuilayernew.cpp @@ -16,7 +16,7 @@ cUILayerNew::cUILayerNew( cUIMap * Map, EE_LAYER_TYPE Type, NewLayerCb newLayerC if ( NULL == mTheme ) return; - mUIWindow = mTheme->CreateWindow( NULL, eeSize( 278, 114 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, eeSize( 278, 114 ) ); + mUIWindow = mTheme->CreateWindow( NULL, Sizei( 278, 114 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL, Sizei( 278, 114 ) ); mUIWindow->AddEventListener( cUIEvent::EventOnWindowClose, cb::Make1( this, &cUILayerNew::WindowClose ) ); if ( MAP_LAYER_TILED == mType ) @@ -27,19 +27,19 @@ cUILayerNew::cUILayerNew( cUIMap * Map, EE_LAYER_TYPE Type, NewLayerCb newLayerC Int32 InitialY = 16; Int32 DistFromTitle = 18; - cUITextBox * Txt = mTheme->CreateTextBox( "Layer Name", mUIWindow->Container(), eeSize(), eeVector2i( 16, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + cUITextBox * Txt = mTheme->CreateTextBox( "Layer Name", mUIWindow->Container(), Sizei(), Vector2i( 16, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUILayerName = mTheme->CreateTextInput( mUIWindow->Container(), eeSize( 120, 22 ), eeVector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, true, 64 ); + mUILayerName = mTheme->CreateTextInput( mUIWindow->Container(), Sizei( 120, 22 ), Vector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE, true, 64 ); mUILayerName->Text( "Layer " + String::ToStr( mUIMap->Map()->LayerCount() + 1 ) ); - cUIPushButton * OKButton = mTheme->CreatePushButton( mUIWindow->Container(), eeSize( 80, 22 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->GetIconByName( "add" ) ); + cUIPushButton * OKButton = mTheme->CreatePushButton( mUIWindow->Container(), Sizei( 80, 22 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->GetIconByName( "add" ) ); OKButton->Pos( mUIWindow->Container()->Size().Width() - OKButton->Size().Width() - 4, mUIWindow->Container()->Size().Height() - OKButton->Size().Height() - 4 ); OKButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cUILayerNew::OKClick ) ); mUILayerName->AddEventListener( cUIEvent::EventOnPressEnter, cb::Make1( this, &cUILayerNew::OKClick ) ); OKButton->Text( "Add" ); - cUIPushButton * CancelButton = mTheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), eeVector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->GetIconByName( "cancel" ) ); + cUIPushButton * CancelButton = mTheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), Vector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->GetIconByName( "cancel" ) ); CancelButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cUILayerNew::CancelClick ) ); CancelButton->Text( "Cancel" ); diff --git a/src/eepp/gaming/mapeditor/cuimap.cpp b/src/eepp/gaming/mapeditor/cuimap.cpp index 5c8c0bd0f..ea3e97caa 100644 --- a/src/eepp/gaming/mapeditor/cuimap.cpp +++ b/src/eepp/gaming/mapeditor/cuimap.cpp @@ -44,7 +44,7 @@ cUIMap::~cUIMap() { eeSAFE_DELETE( mMap ); } -Uint32 cUIMap::OnDrag( const eeVector2i& Pos ) { +Uint32 cUIMap::OnDrag( const Vector2i& Pos ) { if ( ( EDITING_OBJECT == mEditingMode && NULL != mSelObj ) || ( EDITING_LIGHT == mEditingMode && NULL != mSelLight ) ) { @@ -52,8 +52,8 @@ Uint32 cUIMap::OnDrag( const eeVector2i& Pos ) { return 0; } - eeVector2i nPos( -( mDragPoint - Pos ) ); - eeVector2f nPosf( nPos.x, nPos.y ); + Vector2i nPos( -( mDragPoint - Pos ) ); + Vector2f nPosf( nPos.x, nPos.y ); mMap->Move( nPosf ); @@ -151,12 +151,12 @@ void cUIMap::Update() { } } -eeVector2f cUIMap::GetMouseMapPos() { - eeVector2f mp( mMap->GetMouseMapPosf() ); +Vector2f cUIMap::GetMouseMapPos() { + Vector2f mp( mMap->GetMouseMapPosf() ); if ( mClampToTile ) { - eeVector2i mpc( mMap->GetTileCoords( mMap->GetMouseTilePos() + 1 ) ); - mp = eeVector2f( mpc.x, mpc.y ); + Vector2i mpc( mMap->GetTileCoords( mMap->GetMouseTilePos() + 1 ) ); + mp = Vector2f( mpc.x, mpc.y ); } return mp; @@ -214,7 +214,7 @@ void cUIMap::DragPoly( Uint32 Flags, Uint32 PFlags ) { } else if ( Flags & EE_BUTTON_MMASK ) { if ( mObjDragging ) { mObjDragging = false; - mObjDragDist = eeVector2f(0,0); + mObjDragDist = Vector2f(0,0); } } } @@ -228,21 +228,21 @@ void cUIMap::ManageObject( Uint32 Flags ) { case INSERT_OBJECT: { if ( PFlags & EE_BUTTON_LMASK ) { - eeVector2f mp( GetMouseMapPos() ); + Vector2f mp( GetMouseMapPos() ); if ( !mObjRECTEditing ) { mObjRECTEditing = true; - mObjRECT = eeRectf( mp, eeSizef(0,0) ); + mObjRECT = Rectf( mp, Sizef(0,0) ); } else { if ( mObjRECT.Pos().x < mp.x && mObjRECT.Pos().y < mp.y ) { - mObjRECT = eeRectf( mObjRECT.Pos(), eeSizef( mp - mObjRECT.Pos() ) ); + mObjRECT = Rectf( mObjRECT.Pos(), Sizef( mp - mObjRECT.Pos() ) ); } } } if ( Flags & EE_BUTTON_LMASK ){ if ( mObjRECTEditing ) { - mAddObjectCallback( GAMEOBJECT_TYPE_OBJECT, eePolygon2f( mObjRECT ) ); + mAddObjectCallback( GAMEOBJECT_TYPE_OBJECT, Polygon2f( mObjRECT ) ); mObjRECTEditing = false; } } @@ -302,8 +302,8 @@ void cUIMap::ManageObject( Uint32 Flags ) { } } -void cUIMap::SetPointRect( eeVector2f p ) { - mSelPointRect = eeRectf( eeVector2f( p.x - 10, p.y - 10 ), eeSizef( 20, 20 ) ); +void cUIMap::SetPointRect( Vector2f p ) { + mSelPointRect = Rectf( Vector2f( p.x - 10, p.y - 10 ), Sizef( 20, 20 ) ); } void cUIMap::TryToSelectLight() { @@ -325,7 +325,7 @@ void cUIMap::OnSizeChange() { cUIComplexControl::OnSizeChange(); } -Uint32 cUIMap::OnMouseMove( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIMap::OnMouseMove( const Vector2i& Pos, const Uint32 Flags ) { if ( NULL != mMap ) { if ( EDITING_LIGHT == mEditingMode && NULL != mAddLight ) { mAddLight->Position( mMap->GetMouseMapPosf() ); @@ -333,7 +333,7 @@ Uint32 cUIMap::OnMouseMove( const eeVector2i& Pos, const Uint32 Flags ) { } if ( NULL != mTileBox ) { - eeVector2i mp( mMap->GetMouseTilePos() ); + Vector2i mp( mMap->GetMouseTilePos() ); if ( mLastMouseTilePos != mp ) { mLastMouseTilePos = mp; @@ -368,11 +368,11 @@ void cUIMap::MapDraw() { if ( NULL != mSelLight ) { mP.SetColor( ColorA( 255, 0, 0, (Uint8)mAlpha ) ); - eeVector2f Pos( mSelLight->GetAABB().Left, mSelLight->GetAABB().Top ); + Vector2f Pos( mSelLight->GetAABB().Left, mSelLight->GetAABB().Top ); eeAABB AB( mSelLight->GetAABB() ); mP.FillMode( DRAW_LINE ); - mP.DrawRectangle( eeRectf( Pos, AB.Size() ) ); + mP.DrawRectangle( Rectf( Pos, AB.Size() ) ); } } else if ( EDITING_OBJECT == mEditingMode ) { switch ( mEditingObjMode ) { @@ -400,7 +400,7 @@ void cUIMap::MapDraw() { mP.SetColor( ColorA( 255, 0, 0, 200 ) ); mP.DrawPolygon( mObjPoly ); - eePolygon2f polyN( mObjPoly ); + Polygon2f polyN( mObjPoly ); polyN.PushBack( GetMouseMapPos() ); mP.FillMode( DRAW_FILL ); @@ -419,7 +419,7 @@ void cUIMap::MapDraw() { mP.SetColor( ColorA( 255, 0, 0, 200 ) ); mP.DrawPolygon( mObjPoly ); - eePolygon2f polyN( mObjPoly ); + Polygon2f polyN( mObjPoly ); polyN.PushBack( GetMouseMapPos() ); mP.FillMode( DRAW_LINE ); @@ -574,7 +574,7 @@ void cUIMap::CreateObjPopUpMenu() { Menu->AddEventListener( cUIEvent::EventOnItemClicked, cb::Make1( this, &cUIMap::ObjItemClick ) ); if ( Menu->Show() ) { - eeVector2i Pos = cUIManager::instance()->GetInput()->GetMousePos(); + Vector2i Pos = cUIManager::instance()->GetInput()->GetMousePos(); cUIMenu::FixMenuPos( Pos , Menu ); Menu->Pos( Pos ); } diff --git a/src/eepp/gaming/mapeditor/cuimap.hpp b/src/eepp/gaming/mapeditor/cuimap.hpp index 28191250a..1c28a61ef 100644 --- a/src/eepp/gaming/mapeditor/cuimap.hpp +++ b/src/eepp/gaming/mapeditor/cuimap.hpp @@ -30,7 +30,7 @@ class EE_API cUIMap : public cUIComplexControl { typedef cb::Callback1 LightSelectCb; typedef cb::Callback1 LightRadiusChangeCb; - typedef cb::Callback2 ObjAddCb; + typedef cb::Callback2 ObjAddCb; typedef cb::Callback2 AlertCb; typedef cb::Callback0 OnMapLoadCb; typedef cb::Callback0 UpdateScrollCb; @@ -109,31 +109,31 @@ class EE_API cUIMap : public cUIComplexControl { bool mClampToTile; bool mObjRECTEditing; - eeRectf mObjRECT; + Rectf mObjRECT; bool mObjPolyEditing; - eePolygon2f mObjPoly; + Polygon2f mObjPoly; bool mObjDragging; cGameObjectObject * mSelObj; - eeVector2f mObjDragDist; + Vector2f mObjDragDist; AlertCb mAlertCb; cUITheme * mTheme; Uint32 mSelPointIndex; - eeRectf mSelPointRect; + Rectf mSelPointRect; bool mSelPoint; cUITextBox * mTileBox; - eeVector2i mLastMouseTilePos; + Vector2i mLastMouseTilePos; UpdateScrollCb mUpdateScrollCb; virtual Uint32 OnMessage( const cUIMessage * Msg ); - virtual Uint32 OnMouseMove( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseMove( const Vector2i& Pos, const Uint32 Flags ); virtual void OnSizeChange(); @@ -141,7 +141,7 @@ class EE_API cUIMap : public cUIComplexControl { virtual void OnAlphaChange(); - virtual Uint32 OnDrag( const eeVector2i& Pos ); + virtual Uint32 OnDrag( const Vector2i& Pos ); void ObjItemClick( const cUIEvent * Event ); @@ -151,13 +151,13 @@ class EE_API cUIMap : public cUIComplexControl { void ManageObject( Uint32 Flags ); - eeVector2f GetMouseMapPos(); + Vector2f GetMouseMapPos(); void SelectPolyObj(); void SelectPolyPoint(); - void SetPointRect( eeVector2f p ); + void SetPointRect( Vector2f p ); void DragPoly( Uint32 Flags, Uint32 PFlags ); }; diff --git a/src/eepp/gaming/mapeditor/cuimapnew.cpp b/src/eepp/gaming/mapeditor/cuimapnew.cpp index b61ed87dc..327330a34 100644 --- a/src/eepp/gaming/mapeditor/cuimapnew.cpp +++ b/src/eepp/gaming/mapeditor/cuimapnew.cpp @@ -17,7 +17,7 @@ cUIMapNew::cUIMapNew( cUIMap * Map, cb::Callback0 NewMapCb, bool ResizeMap if ( NULL == mTheme ) return; - mUIWindow = mTheme->CreateWindow( NULL, eeSize( 320, 380 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_CLOSE_BUTTON | UI_WIN_USE_DEFAULT_BUTTONS_ACTIONS | UI_WIN_SHARE_ALPHA_WITH_CHILDS | UI_WIN_MODAL, eeSize( 320, 380 ) ); + mUIWindow = mTheme->CreateWindow( NULL, Sizei( 320, 380 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_CLOSE_BUTTON | UI_WIN_USE_DEFAULT_BUTTONS_ACTIONS | UI_WIN_SHARE_ALPHA_WITH_CHILDS | UI_WIN_MODAL, Sizei( 320, 380 ) ); mUIWindow->AddEventListener( cUIEvent::EventOnWindowClose, cb::Make1( this, &cUIMapNew::WindowClose ) ); if ( !mResizeMap ) { @@ -29,54 +29,54 @@ cUIMapNew::cUIMapNew( cUIMap * Map, cb::Callback0 NewMapCb, bool ResizeMap Int32 InitialY = 16; Int32 DistFromTitle = 18; - cUITextBox * Txt = mTheme->CreateTextBox( "Map Size", mUIWindow->Container(), eeSize(), eeVector2i( 16, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + cUITextBox * Txt = mTheme->CreateTextBox( "Map Size", mUIWindow->Container(), Sizei(), Vector2i( 16, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - Txt = mTheme->CreateTextBox( "Width:", mUIWindow->Container(), eeSize( 46, 24 ), eeVector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW ); + Txt = mTheme->CreateTextBox( "Width:", mUIWindow->Container(), Sizei( 46, 24 ), Vector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW ); - mUIMapWidth = mTheme->CreateSpinBox( mUIWindow->Container(), eeSize( 53, 24 ), eeVector2i( Txt->Pos().x + Txt->Size().Width(), Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 100, false ); + mUIMapWidth = mTheme->CreateSpinBox( mUIWindow->Container(), Sizei( 53, 24 ), Vector2i( Txt->Pos().x + Txt->Size().Width(), Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 100, false ); mUIMapWidth->MinValue(1); if ( ResizeMap ) { mUIMapWidth->Value( mUIMap->Map()->Size().Width() ); } - Txt = mTheme->CreateTextBox( "Height:", mUIWindow->Container(), eeSize( 46, 24 ), eeVector2i( Txt->Pos().x, Txt->Pos().y + Txt->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW ); + Txt = mTheme->CreateTextBox( "Height:", mUIWindow->Container(), Sizei( 46, 24 ), Vector2i( Txt->Pos().x, Txt->Pos().y + Txt->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW ); - mUIMapHeight = mTheme->CreateSpinBox( mUIWindow->Container(), eeSize( 53, 24 ), eeVector2i( Txt->Pos().x + Txt->Size().Width(), Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 100, false ); + mUIMapHeight = mTheme->CreateSpinBox( mUIWindow->Container(), Sizei( 53, 24 ), Vector2i( Txt->Pos().x + Txt->Size().Width(), Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 100, false ); mUIMapHeight->MinValue(1); if ( ResizeMap ) { mUIMapHeight->Value( mUIMap->Map()->Size().Height() ); } - Txt = mTheme->CreateTextBox( "Tile Size", mUIWindow->Container(), eeSize(), eeVector2i( mUIWindow->Container()->Size().Width() / 2, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + Txt = mTheme->CreateTextBox( "Tile Size", mUIWindow->Container(), Sizei(), Vector2i( mUIWindow->Container()->Size().Width() / 2, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - Txt = mTheme->CreateTextBox( "Width:", mUIWindow->Container(), eeSize( 46, 24 ), eeVector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW ); + Txt = mTheme->CreateTextBox( "Width:", mUIWindow->Container(), Sizei( 46, 24 ), Vector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW ); - mUIMapTWidth = mTheme->CreateSpinBox( mUIWindow->Container(), eeSize( 53, 24 ), eeVector2i( Txt->Pos().x + Txt->Size().Width(), Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 32, false ); + mUIMapTWidth = mTheme->CreateSpinBox( mUIWindow->Container(), Sizei( 53, 24 ), Vector2i( Txt->Pos().x + Txt->Size().Width(), Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 32, false ); mUIMapTWidth->MinValue(1); if ( ResizeMap ) { mUIMapTWidth->Value( mUIMap->Map()->TileSize().Width() ); } - Txt = mTheme->CreateTextBox( "Height:", mUIWindow->Container(), eeSize( 46, 24 ), eeVector2i( Txt->Pos().x, Txt->Pos().y + Txt->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW ); + Txt = mTheme->CreateTextBox( "Height:", mUIWindow->Container(), Sizei( 46, 24 ), Vector2i( Txt->Pos().x, Txt->Pos().y + Txt->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW ); - mUIMapTHeight = mTheme->CreateSpinBox( mUIWindow->Container(), eeSize( 53, 24 ), eeVector2i( Txt->Pos().x + Txt->Size().Width(), Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 32, false ); + mUIMapTHeight = mTheme->CreateSpinBox( mUIWindow->Container(), Sizei( 53, 24 ), Vector2i( Txt->Pos().x + Txt->Size().Width(), Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 32, false ); mUIMapTHeight->MinValue(1); if ( ResizeMap ) { mUIMapTHeight->Value( mUIMap->Map()->TileSize().Height() ); } - Txt = mTheme->CreateTextBox( "Max Layers", mUIWindow->Container(), eeSize(), eeVector2i( 16, mUIMapTHeight->Pos().y + mUIMapTHeight->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + Txt = mTheme->CreateTextBox( "Max Layers", mUIWindow->Container(), Sizei(), Vector2i( 16, mUIMapTHeight->Pos().y + mUIMapTHeight->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIMapMaxLayers = mTheme->CreateSpinBox( mUIWindow->Container(), eeSize( 53, 24 ), eeVector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 8, false ); + mUIMapMaxLayers = mTheme->CreateSpinBox( mUIWindow->Container(), Sizei( 53, 24 ), Vector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 8, false ); mUIMapMaxLayers->MaxValue( 32 ); - Txt = mTheme->CreateTextBox( "Map Flags:", mUIWindow->Container(), eeSize(), eeVector2i( Txt->Pos().x, mUIMapMaxLayers->Pos().y + mUIMapMaxLayers->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + Txt = mTheme->CreateTextBox( "Map Flags:", mUIWindow->Container(), Sizei(), Vector2i( Txt->Pos().x, mUIMapMaxLayers->Pos().y + mUIMapMaxLayers->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUILightsEnabled = mTheme->CreateCheckBox( mUIWindow->Container(), eeSize(), eeVector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + Txt->Size().Height() + 16 ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + mUILightsEnabled = mTheme->CreateCheckBox( mUIWindow->Container(), Sizei(), Vector2i( Txt->Pos().x + DistFromTitle, Txt->Pos().y + Txt->Size().Height() + 16 ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mUILightsEnabled->Text( "Lights Enabled" ); mUILightsEnabled->Active( true ); @@ -84,7 +84,7 @@ cUIMapNew::cUIMapNew( cUIMap * Map, cb::Callback0 NewMapCb, bool ResizeMap mUILightsEnabled->Active( 0 != mUIMap->Map()->LightsEnabled() ); } - mUILightsByVertex = mTheme->CreateCheckBox( mUIWindow->Container(), eeSize(), eeVector2i( mUIWindow->Container()->Size().Width() / 2, mUILightsEnabled->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + mUILightsByVertex = mTheme->CreateCheckBox( mUIWindow->Container(), Sizei(), Vector2i( mUIWindow->Container()->Size().Width() / 2, mUILightsEnabled->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mUILightsByVertex->Text( "Lights By Vertex" ); mUILightsByVertex->Active( true ); @@ -92,7 +92,7 @@ cUIMapNew::cUIMapNew( cUIMap * Map, cb::Callback0 NewMapCb, bool ResizeMap mUILightsByVertex->Active( 0 != mUIMap->Map()->LightsByVertex() ); } - mUIClampBorders = mTheme->CreateCheckBox( mUIWindow->Container(), eeSize(), eeVector2i( Txt->Pos().x + DistFromTitle, mUILightsEnabled->Pos().y + mUILightsEnabled->Size().Height() + 16 ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + mUIClampBorders = mTheme->CreateCheckBox( mUIWindow->Container(), Sizei(), Vector2i( Txt->Pos().x + DistFromTitle, mUILightsEnabled->Pos().y + mUILightsEnabled->Size().Height() + 16 ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mUIClampBorders->Text( "Clamp Boders" ); mUIClampBorders->Active( true ); @@ -100,7 +100,7 @@ cUIMapNew::cUIMapNew( cUIMap * Map, cb::Callback0 NewMapCb, bool ResizeMap mUIClampBorders->Active( 0 != mUIMap->Map()->ClampBorders() ); } - mUIClipArea = mTheme->CreateCheckBox( mUIWindow->Container(), eeSize(), eeVector2i( mUIWindow->Container()->Size().Width() / 2, mUIClampBorders->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + mUIClipArea = mTheme->CreateCheckBox( mUIWindow->Container(), Sizei(), Vector2i( mUIWindow->Container()->Size().Width() / 2, mUIClampBorders->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mUIClipArea->Text( "Clip View Area" ); mUIClipArea->Active( true ); @@ -108,7 +108,7 @@ cUIMapNew::cUIMapNew( cUIMap * Map, cb::Callback0 NewMapCb, bool ResizeMap mUIClipArea->Active( 0 != mUIMap->Map()->ClipedArea() ); } - Txt = mTheme->CreateTextBox( "Map Base Color:", mUIWindow->Container(), eeSize(), eeVector2i( Txt->Pos().x, mUIClipArea->Pos().y + mUIClipArea->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + Txt = mTheme->CreateTextBox( "Map Base Color:", mUIWindow->Container(), Sizei(), Vector2i( Txt->Pos().x, mUIClipArea->Pos().y + mUIClipArea->Size().Height() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); cUIComplexControl::CreateParams ComParams; ComParams.Parent( mUIWindow->Container() ); @@ -126,52 +126,52 @@ cUIMapNew::cUIMapNew( cUIMap * Map, cb::Callback0 NewMapCb, bool ResizeMap mUIBaseColor->Visible( true ); mUIBaseColor->Enabled( true ); - Txt = mTheme->CreateTextBox( "Red Color:", mUIWindow->Container(), eeSize(), eeVector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIBaseColor->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + Txt = mTheme->CreateTextBox( "Red Color:", mUIWindow->Container(), Sizei(), Vector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIBaseColor->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIRedSlider = mTheme->CreateSlider( mUIWindow->Container(), eeSize( 128, 20 ), eeVector2i( Txt->Pos().x + Txt->Size().Width() + 16, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + mUIRedSlider = mTheme->CreateSlider( mUIWindow->Container(), Sizei( 128, 20 ), Vector2i( Txt->Pos().x + Txt->Size().Width() + 16, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mUIRedSlider->MaxValue( 255 ); mUIRedSlider->Value( 255 ); mUIRedSlider->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cUIMapNew::OnRedChange ) ); - mUIRedTxt = mTheme->CreateTextBox( String::ToStr( 255 ), mUIWindow->Container(), eeSize(), eeVector2i( mUIRedSlider->Pos().x + mUIRedSlider->Size().Width() + 4, mUIRedSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIRedTxt = mTheme->CreateTextBox( String::ToStr( 255 ), mUIWindow->Container(), Sizei(), Vector2i( mUIRedSlider->Pos().x + mUIRedSlider->Size().Width() + 4, mUIRedSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); if ( ResizeMap ) { mUIRedSlider->Value( mUIMap->Map()->BaseColor().R() ); } - Txt = mTheme->CreateTextBox( "Green Color:", mUIWindow->Container(), eeSize(), eeVector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIRedSlider->Pos().y + mUIRedSlider->Size().Height() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + Txt = mTheme->CreateTextBox( "Green Color:", mUIWindow->Container(), Sizei(), Vector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIRedSlider->Pos().y + mUIRedSlider->Size().Height() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIGreenSlider = mTheme->CreateSlider( mUIWindow->Container(), eeSize( 128, 20 ), eeVector2i( mUIRedSlider->Pos().x, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + mUIGreenSlider = mTheme->CreateSlider( mUIWindow->Container(), Sizei( 128, 20 ), Vector2i( mUIRedSlider->Pos().x, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mUIGreenSlider->MaxValue( 255 ); mUIGreenSlider->Value( 255 ); mUIGreenSlider->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cUIMapNew::OnGreenChange ) ); - mUIGreenTxt = mTheme->CreateTextBox( String::ToStr( 255 ), mUIWindow->Container(), eeSize(), eeVector2i( mUIGreenSlider->Pos().x + mUIGreenSlider->Size().Width() + 4, mUIGreenSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIGreenTxt = mTheme->CreateTextBox( String::ToStr( 255 ), mUIWindow->Container(), Sizei(), Vector2i( mUIGreenSlider->Pos().x + mUIGreenSlider->Size().Width() + 4, mUIGreenSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); if ( ResizeMap ) { mUIGreenSlider->Value( mUIMap->Map()->BaseColor().G() ); } - Txt = mTheme->CreateTextBox( "Blue Color:", mUIWindow->Container(), eeSize(), eeVector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIGreenSlider->Pos().y + mUIGreenSlider->Size().Height() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + Txt = mTheme->CreateTextBox( "Blue Color:", mUIWindow->Container(), Sizei(), Vector2i( mUIBaseColor->Pos().x + mUIBaseColor->Size().Width() + 4, mUIGreenSlider->Pos().y + mUIGreenSlider->Size().Height() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); - mUIBlueSlider = mTheme->CreateSlider( mUIWindow->Container(), eeSize( 128, 20 ), eeVector2i( mUIRedSlider->Pos().x, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); + mUIBlueSlider = mTheme->CreateSlider( mUIWindow->Container(), Sizei( 128, 20 ), Vector2i( mUIRedSlider->Pos().x, Txt->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); mUIBlueSlider->MaxValue( 255 ); mUIBlueSlider->Value( 255 ); mUIBlueSlider->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cUIMapNew::OnBlueChange ) ); - mUIBlueTxt = mTheme->CreateTextBox( String::ToStr( 255 ), mUIWindow->Container(), eeSize(), eeVector2i( mUIBlueSlider->Pos().x + mUIBlueSlider->Size().Width() + 4, mUIBlueSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); + mUIBlueTxt = mTheme->CreateTextBox( String::ToStr( 255 ), mUIWindow->Container(), Sizei(), Vector2i( mUIBlueSlider->Pos().x + mUIBlueSlider->Size().Width() + 4, mUIBlueSlider->Pos().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); if ( ResizeMap ) { mUIBlueSlider->Value( mUIMap->Map()->BaseColor().B() ); } - cUIPushButton * OKButton = mTheme->CreatePushButton( mUIWindow->Container(), eeSize( 80, 22 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->GetIconByName( "ok" ) ); + cUIPushButton * OKButton = mTheme->CreatePushButton( mUIWindow->Container(), Sizei( 80, 22 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->GetIconByName( "ok" ) ); OKButton->Pos( mUIWindow->Container()->Size().Width() - OKButton->Size().Width() - 4, mUIWindow->Container()->Size().Height() - OKButton->Size().Height() - 4 ); OKButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cUIMapNew::OKClick ) ); OKButton->Text( "OK" ); - cUIPushButton * CancelButton = mTheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), eeVector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->GetIconByName( "cancel" ) ); + cUIPushButton * CancelButton = mTheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), Vector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->GetIconByName( "cancel" ) ); CancelButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cUIMapNew::CancelClick ) ); CancelButton->Text( "Cancel" ); @@ -226,7 +226,7 @@ void cUIMapNew::OKClick( const cUIEvent * Event ) { if ( w > 0 && h > 0 && tw > 0 && th > 0 && ml > 0 ) { if ( !mResizeMap ) { - mUIMap->Map()->Create( eeSize( w, h ), ml, eeSize( tw, th ), Flags, mUIMap->Map()->ViewSize() ); + mUIMap->Map()->Create( Sizei( w, h ), ml, Sizei( tw, th ), Flags, mUIMap->Map()->ViewSize() ); mUIMap->Map()->BaseColor( mUIBaseColor->Background()->Color() ); } else { std::string oldPath( mUIMap->Map()->Path() ); @@ -236,7 +236,7 @@ void cUIMapNew::OKClick( const cUIEvent * Event ) { cMap * Map = eeNew( cMap, () ); 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->ForceHeadersOnLoad( Sizei( w, h ), Sizei( tw, th ), ml, Flags ); Map->Load( mapPath ); Map->DisableForcedHeaders(); Map->mPath = oldPath; diff --git a/src/eepp/gaming/mapeditor/cuimapnew.hpp b/src/eepp/gaming/mapeditor/cuimapnew.hpp index d7a78cd2b..f506cbe7d 100644 --- a/src/eepp/gaming/mapeditor/cuimapnew.hpp +++ b/src/eepp/gaming/mapeditor/cuimapnew.hpp @@ -37,7 +37,7 @@ class EE_API cUIMapNew { cb::Callback0 mNewMapCb; - eeSize mNewSize; + Sizei mNewSize; bool mResizeMap; void WindowClose( const cUIEvent * Event ); diff --git a/src/eepp/graphics/cbatchrenderer.cpp b/src/eepp/graphics/cbatchrenderer.cpp index 9b1f91dca..d9404c864 100755 --- a/src/eepp/graphics/cbatchrenderer.cpp +++ b/src/eepp/graphics/cbatchrenderer.cpp @@ -132,14 +132,14 @@ void cBatchRenderer::Flush() { if ( NULL != mTexture ) { mTF->Bind( mTexture ); - GLi->TexCoordPointer( 2, GL_FP , sizeof(eeVertex), reinterpret_cast ( &mVertex[0] ) + sizeof(eeVector2f) , alloc ); + GLi->TexCoordPointer( 2, GL_FP , sizeof(eeVertex), reinterpret_cast ( &mVertex[0] ) + sizeof(Vector2f) , alloc ); } else { GLi->Disable( GL_TEXTURE_2D ); GLi->DisableClientState( GL_TEXTURE_COORD_ARRAY ); } GLi->VertexPointer ( 2, GL_FP , sizeof(eeVertex), reinterpret_cast ( &mVertex[0] ) , alloc ); - GLi->ColorPointer ( 4, GL_UNSIGNED_BYTE , sizeof(eeVertex), reinterpret_cast ( &mVertex[0] ) + sizeof(eeVector2f) + sizeof(eeTexCoord) , alloc ); + GLi->ColorPointer ( 4, GL_UNSIGNED_BYTE , sizeof(eeVertex), reinterpret_cast ( &mVertex[0] ) + sizeof(Vector2f) + sizeof(eeTexCoord) , alloc ); if ( !GLi->QuadsSupported() ) { if ( DM_QUADS == mCurrentMode ) { @@ -171,11 +171,11 @@ void cBatchRenderer::BatchQuad( const Float& x, const Float& y, const Float& wid BatchQuadEx( x, y, width, height, angle ); } -void cBatchRenderer::BatchQuadEx( Float x, Float y, Float width, Float height, Float angle, eeVector2f scale, eeOriginPoint originPoint ) { +void cBatchRenderer::BatchQuadEx( Float x, Float y, Float width, Float height, Float angle, Vector2f scale, OriginPoint originPoint ) { if ( mNumVertex + ( GLi->QuadsSupported() ? 3 : 5 ) >= mVertexSize ) return; - if ( originPoint.OriginType == eeOriginPoint::OriginCenter ) { + if ( originPoint.OriginType == OriginPoint::OriginCenter ) { originPoint.x = width * 0.5f; originPoint.y = height * 0.5f; } @@ -343,8 +343,8 @@ void cBatchRenderer::BatchQuadFreeEx( const Float& x0, const Float& y0, const Fl if ( mNumVertex + ( GLi->QuadsSupported() ? 3 : 5 ) >= mVertexSize ) return; - eeQuad2f mQ; - eeVector2f QCenter; + Quad2f mQ; + Vector2f QCenter; mQ.V[0].x = x0; mQ.V[1].x = x1; mQ.V[2].x = x2; mQ.V[3].x = x3; mQ.V[0].y = y0; mQ.V[1].y = y1; mQ.V[2].y = y2; mQ.V[3].y = y3; @@ -455,7 +455,7 @@ void cBatchRenderer::QuadsSetSubsetFree( const Float& x0, const Float& y0, const mTexCoord[3].u = x3; mTexCoord[3].v = y3; } -void cBatchRenderer::Rotate( const eeVector2f& center, eeVector2f* point, const Float& angle ) { +void cBatchRenderer::Rotate( const Vector2f& center, Vector2f* point, const Float& angle ) { if ( angle ) { Float x = point->x - center.x; Float y = point->y - center.y; @@ -559,7 +559,7 @@ void cBatchRenderer::BatchLineLoop( const Float& x0, const Float& y0, const Floa AddVertexs(2); } -void cBatchRenderer::BatchLineLoop( const eeVector2f& vector1, const eeVector2f& vector2 ) { +void cBatchRenderer::BatchLineLoop( const Vector2f& vector1, const Vector2f& vector2 ) { BatchLineLoop( vector1.x, vector1.y, vector2.x, vector2.y ); } @@ -578,7 +578,7 @@ void cBatchRenderer::BatchLineLoop( const Float& x0, const Float& y0 ) { AddVertexs(1); } -void cBatchRenderer::BatchLineLoop( const eeVector2f& vector1 ) { +void cBatchRenderer::BatchLineLoop( const Vector2f& vector1 ) { BatchLineLoop( vector1.x, vector1.y ); } @@ -697,7 +697,7 @@ void cBatchRenderer::PolygonSetColor( const ColorA& Color ) { PointSetColor( Color ); } -void cBatchRenderer::BatchPolygon( const eePolygon2f& Polygon ) { +void cBatchRenderer::BatchPolygon( const Polygon2f& Polygon ) { if ( Polygon.Size() > mVertexSize ) return; @@ -730,7 +730,7 @@ void cBatchRenderer::BatchPolygonByPoint( const Float& x, const Float& y ) { AddVertexs(1); } -void cBatchRenderer::BatchPolygonByPoint( const eeVector2f& Vector ) { +void cBatchRenderer::BatchPolygonByPoint( const Vector2f& Vector ) { BatchPolygonByPoint( Vector.x, Vector.y ); } diff --git a/src/eepp/graphics/cconsole.cpp b/src/eepp/graphics/cconsole.cpp index 2af42a964..6145cd1c2 100755 --- a/src/eepp/graphics/cconsole.cpp +++ b/src/eepp/graphics/cconsole.cpp @@ -162,17 +162,17 @@ void cConsole::Draw() { if ( mY > 0.0f ) { if ( mTexId == 0 ) { mPri.SetColor( ColorA( mConColor.R(), mConColor.G(), mConColor.B(), static_cast(mA) ) ); - mPri.DrawRectangle( eeRectf( eeVector2f( 0.0f, 0.0f ), eeSizef( mWidth, mY ) ) ); + mPri.DrawRectangle( Rectf( Vector2f( 0.0f, 0.0f ), Sizef( mWidth, mY ) ) ); } else { 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 ); + Tex->DrawEx( 0.0f, 0.0f, mWidth, mY, 0.0f, Vector2f::One, C, C, C, C ); } mPri.SetColor( ColorA( mConLineColor.R(), mConLineColor.G(), mConLineColor.B(), static_cast(mA) ) ); - mPri.DrawRectangle( eeRectf( eeVector2f( 0.0f, mY ), eeSizef( mWidth, 4.0f ) ) ); + mPri.DrawRectangle( Rectf( Vector2f( 0.0f, mY ), Sizef( mWidth, 4.0f ) ) ); Int32 linesInScreen = LinesInScreen(); diff --git a/src/eepp/graphics/cfont.cpp b/src/eepp/graphics/cfont.cpp index 007b259e4..d187c7bf5 100644 --- a/src/eepp/graphics/cfont.cpp +++ b/src/eepp/graphics/cfont.cpp @@ -93,17 +93,17 @@ const std::vector& cFont::GetLinesWidth() { return mTextCache.LinesWidth(); } -void cFont::Draw( const Float& X, const Float& Y, const Uint32& Flags, const eeVector2f& Scale, const Float& Angle, const EE_BLEND_MODE& Effect) { +void cFont::Draw( const Float& X, const Float& Y, const Uint32& Flags, const Vector2f& Scale, const Float& Angle, const EE_BLEND_MODE& Effect) { Draw( mTextCache, X, Y, Flags, Scale, Angle, Effect ); } -void cFont::Draw( const String& Text, const Float& X, const Float& Y, const Uint32& Flags, const eeVector2f& Scale, const Float& Angle, const EE_BLEND_MODE& Effect ) { +void cFont::Draw( const String& Text, const Float& X, const Float& Y, const Uint32& Flags, const Vector2f& Scale, const Float& Angle, const EE_BLEND_MODE& Effect ) { mTextCache.Text( Text ); mTextCache.Flags( Flags ); mTextCache.Draw( X, Y, Scale, Angle, Effect ); } -void cFont::Draw( cTextCache& TextCache, const Float& X, const Float& Y, const Uint32& Flags, const eeVector2f& Scale, const Float& Angle, const EE_BLEND_MODE& Effect ) { +void cFont::Draw( cTextCache& TextCache, const Float& X, const Float& Y, const Uint32& Flags, const Vector2f& Scale, const Float& Angle, const EE_BLEND_MODE& Effect ) { if ( !TextCache.Text().size() ) return; @@ -148,7 +148,7 @@ void cFont::Draw( cTextCache& TextCache, const Float& X, const Float& Y, const U if ( Angle != 0.0f || Scale != 1.0f ) { GLi->PushMatrix(); - eeVector2f Center( cX + TextCache.GetTextWidth() * 0.5f, cY + TextCache.GetTextHeight() * 0.5f ); + Vector2f Center( cX + TextCache.GetTextWidth() * 0.5f, cY + TextCache.GetTextHeight() * 0.5f ); GLi->Translatef( Center.x , Center.y, 0.f ); GLi->Rotatef( Angle, 0.0f, 0.0f, 1.0f ); GLi->Scalef( Scale.x, Scale.y, 1.0f ); @@ -357,7 +357,7 @@ void cFont::CacheWidth( const String& Text, std::vector& LinesWidth, Floa NumLines = Lines; } -Int32 cFont::FindClosestCursorPosFromPoint( const String& Text, const eeVector2i& pos ) { +Int32 cFont::FindClosestCursorPosFromPoint( const String& Text, const Vector2i& pos ) { Float Width = 0, lWidth = 0, Height = GetFontHeight(), lHeight = 0; Int32 CharID; Int32 tGlyphSize = (Int32)mGlyphs.size(); @@ -411,7 +411,7 @@ Int32 cFont::FindClosestCursorPosFromPoint( const String& Text, const eeVector2i return -1; } -eeVector2i cFont::GetCursorPos( const String& Text, const Uint32& Pos ) { +Vector2i cFont::GetCursorPos( const String& Text, const Uint32& Pos ) { Float Width = 0, Height = GetFontHeight(); Int32 CharID; Int32 tGlyphSize = mGlyphs.size(); @@ -434,7 +434,7 @@ eeVector2i cFont::GetCursorPos( const String& Text, const Uint32& Pos ) { } } - return eeVector2i( Width, Height ); + return Vector2i( Width, Height ); } static bool IsStopSelChar( Uint32 c ) { diff --git a/src/eepp/graphics/cimage.cpp b/src/eepp/graphics/cimage.cpp index 4e5d05e4f..24ee00fe2 100644 --- a/src/eepp/graphics/cimage.cpp +++ b/src/eepp/graphics/cimage.cpp @@ -422,8 +422,8 @@ unsigned int cImage::MemSize() const { return mSize; } -eeSize cImage::Size() { - return eeSize( mWidth, mHeight ); +Sizei cImage::Size() { + return Sizei( mWidth, mHeight ); } void cImage::ClearCache() { @@ -612,7 +612,7 @@ cImage * cImage::Thumbnail( const Uint32& maxWidth, const Uint32& maxHeight, EE_ return NULL; } -cImage * cImage::Crop( eeRecti rect ) { +cImage * cImage::Crop( Recti rect ) { if ( rect.Left >= 0 && rect.Right <= (Int32)mWidth && rect.Top >= 0 && rect.Bottom <= (Int32)mHeight ) { cImage * img = eeNew( cImage, ( rect.Size().Width(), rect.Size().Height(), mChannels ) ); diff --git a/src/eepp/graphics/cparticlesystem.cpp b/src/eepp/graphics/cparticlesystem.cpp index 4f75d64f7..be128296a 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 ColorAf& 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 Vector2f& Pos, const Float& PartSize, const bool& AnimLoop, const Uint32& NumLoops, const ColorAf& Color, const Vector2f& Pos2, const Float& AlphaDecay, const Vector2f& Speed, const Vector2f& Acc ) { mPointsSup = GLi->PointSpriteSupported(); mEffect = Effect; mPos = Pos; @@ -56,7 +56,7 @@ void cParticleSystem::Create( const EE_PARTICLE_EFFECT& Effect, const Uint32& Nu mDirection = 1; mProgression = 1; - if ( mPos2 == eeVector2f( 0, 0 ) ) { + if ( mPos2 == Vector2f( 0, 0 ) ) { mPos2.x = mPos.x + 10; mPos2.y = mPos.y + 10; } else { @@ -418,32 +418,32 @@ void cParticleSystem::Kill() { mUsed = false; } -void cParticleSystem::Position( const eeVector2f& Pos ) { +void cParticleSystem::Position( const Vector2f& Pos ) { mPos2.x = Pos.x + ( mPos2.x - mPos.x ); mPos2.y = Pos.y + ( mPos2.y - mPos.y ); mPos.x = Pos.x; mPos.y = Pos.y; } -const eeVector2f& cParticleSystem::Position() const { +const Vector2f& cParticleSystem::Position() const { return mPos; } void cParticleSystem::Position(const Float& x, const Float& y) { - Position( eeVector2f( x, y ) ); + Position( Vector2f( x, y ) ); } -void cParticleSystem::Position2( const eeVector2f& Pos ) { +void cParticleSystem::Position2( const Vector2f& Pos ) { mPos2.x = Pos.x + ( Pos.x - mPos.x ); mPos2.y = Pos.y + ( Pos.y - mPos.y ); } -const eeVector2f& cParticleSystem::Position2() const { +const Vector2f& cParticleSystem::Position2() const { return mPos2; } void cParticleSystem::Position2( const Float& x, const Float& y ) { - Position( eeVector2f( x, y ) ); + Position( Vector2f( x, y ) ); } void cParticleSystem::Time( const Float& time ) { @@ -486,19 +486,19 @@ void cParticleSystem::AlphaDecay( const Float& Decay ) { mAlphaDecay = Decay; } -const eeVector2f& cParticleSystem::Speed() const { +const Vector2f& cParticleSystem::Speed() const { return mSpeed; } -void cParticleSystem::Speed( const eeVector2f& speed ) { +void cParticleSystem::Speed( const Vector2f& speed ) { mSpeed = speed; } -const eeVector2f& cParticleSystem::Acceleration() const { +const Vector2f& cParticleSystem::Acceleration() const { return mAcc; } -void cParticleSystem::Acceleration( const eeVector2f& acc ) { +void cParticleSystem::Acceleration( const Vector2f& acc ) { mAcc = acc; } diff --git a/src/eepp/graphics/cprimitives.cpp b/src/eepp/graphics/cprimitives.cpp index 2bc024484..c18012ebe 100755 --- a/src/eepp/graphics/cprimitives.cpp +++ b/src/eepp/graphics/cprimitives.cpp @@ -23,7 +23,7 @@ cPrimitives::cPrimitives() : cPrimitives::~cPrimitives() { } -void cPrimitives::DrawPoint( const eeVector2f& p, const Float& pointSize ) { +void cPrimitives::DrawPoint( const Vector2f& p, const Float& pointSize ) { sBR->SetPointSize( pointSize ); sBR->SetTexture( NULL ); @@ -35,7 +35,7 @@ void cPrimitives::DrawPoint( const eeVector2f& p, const Float& pointSize ) { DrawBatch(); } -void cPrimitives::DrawLine( const eeLine2f& line ) { +void cPrimitives::DrawLine( const Line2f& line ) { sBR->SetLineWidth( mLineWidth ); sBR->SetTexture( NULL ); @@ -47,7 +47,7 @@ void cPrimitives::DrawLine( const eeLine2f& line ) { DrawBatch(); } -void cPrimitives::DrawTriangle( const eeTriangle2f& t, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3 ) { +void cPrimitives::DrawTriangle( const Triangle2f& t, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3 ) { sBR->SetTexture( NULL ); sBR->SetBlendMode( mBlendMode ); @@ -79,11 +79,11 @@ void cPrimitives::DrawTriangle( const eeTriangle2f& t, const ColorA& Color1, con DrawBatch(); } -void cPrimitives::DrawTriangle( const eeTriangle2f& t ) { +void cPrimitives::DrawTriangle( const Triangle2f& t ) { DrawTriangle( t, mColor, mColor, mColor ); } -void cPrimitives::DrawCircle( const eeVector2f& p, const Float& radius, Uint32 points ) { +void cPrimitives::DrawCircle( const Vector2f& p, const Float& radius, Uint32 points ) { if ( 0 == points ) { // Optimized circle rendering static const float circleVAR[] = { @@ -186,7 +186,7 @@ void cPrimitives::DrawCircle( const eeVector2f& p, const Float& radius, Uint32 p DrawBatch(); } -void cPrimitives::DrawRectangle( const eeRectf& R, const ColorA& TopLeft, const ColorA& BottomLeft, const ColorA& BottomRight, const ColorA& TopRight, const Float& Angle, const eeVector2f& Scale ) { +void cPrimitives::DrawRectangle( const Rectf& R, const ColorA& TopLeft, const ColorA& BottomLeft, const ColorA& BottomRight, const ColorA& TopRight, const Float& Angle, const Vector2f& Scale ) { sBR->SetTexture( NULL ); sBR->SetBlendMode( mBlendMode ); @@ -196,7 +196,7 @@ void cPrimitives::DrawRectangle( const eeRectf& R, const ColorA& TopLeft, const sBR->QuadsBegin(); sBR->QuadsSetColorFree( TopLeft, BottomLeft, BottomRight, TopRight ); - eeSizef size = const_cast(&R)->Size(); + Sizef size = const_cast(&R)->Size(); sBR->BatchQuadEx( R.Left, R.Top, size.Width(), size.Height(), Angle, Scale ); break; @@ -209,11 +209,11 @@ void cPrimitives::DrawRectangle( const eeRectf& R, const ColorA& TopLeft, const sBR->LineLoopSetColorFree( TopLeft, BottomLeft ); if ( Scale != 1.0f || Angle != 0.0f ) { - eeQuad2f Q( R ); - eeSizef size = const_cast(&R)->Size(); + Quad2f Q( R ); + Sizef size = const_cast(&R)->Size(); Q.Scale( Scale ); - Q.Rotate( Angle, eeVector2f( R.Left + size.Width() * 0.5f, R.Top + size.Height() * 0.5f ) ); + Q.Rotate( Angle, Vector2f( R.Left + size.Width() * 0.5f, R.Top + size.Height() * 0.5f ) ); sBR->BatchLineLoop( Q[0].x, Q[0].y, Q[1].x, Q[1].y ); sBR->LineLoopSetColorFree( BottomRight, TopRight ); @@ -231,21 +231,21 @@ void cPrimitives::DrawRectangle( const eeRectf& R, const ColorA& TopLeft, const DrawBatch(); } -void cPrimitives::DrawRectangle( const eeRectf& R, const Float& Angle, const eeVector2f& Scale ) { +void cPrimitives::DrawRectangle( const Rectf& R, const Float& Angle, const Vector2f& Scale ) { DrawRectangle( R, mColor, mColor, mColor, mColor, Angle, Scale ); } -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 ) { +void cPrimitives::DrawRoundedRectangle( const Rectf& R, const ColorA& TopLeft, const ColorA& BottomLeft, const ColorA& BottomRight, const ColorA& TopRight, const Float& Angle, const Vector2f& Scale, const unsigned int& Corners ) { sBR->SetTexture( NULL ); sBR->SetBlendMode( mBlendMode ); unsigned int i; - eeSizef size = const_cast( &R )->Size(); + Sizef size = const_cast( &R )->Size(); Float xscalediff = size.Width() * Scale.x - size.Width(); Float yscalediff = size.Height() * Scale.y - size.Height(); - eeVector2f Center( R.Left + size.Width() * 0.5f + xscalediff, R.Top + size.Height() * 0.5f + yscalediff ); - eePolygon2f Poly = eePolygon2f::CreateRoundedRectangle( R.Left - xscalediff, R.Top - yscalediff, size.Width() + xscalediff, size.Height() + yscalediff, Corners ); - eeVector2f poly; + Vector2f Center( R.Left + size.Width() * 0.5f + xscalediff, R.Top + size.Height() * 0.5f + yscalediff ); + Polygon2f Poly = Polygon2f::CreateRoundedRectangle( R.Left - xscalediff, R.Top - yscalediff, size.Width() + xscalediff, size.Height() + yscalediff, Corners ); + Vector2f poly; Poly.Rotate( Angle, Center ); @@ -314,11 +314,11 @@ void cPrimitives::DrawRoundedRectangle( const eeRectf& R, const ColorA& TopLeft, DrawBatch(); } -void cPrimitives::DrawRoundedRectangle( const eeRectf& R, const Float& Angle, const eeVector2f& Scale, const unsigned int& Corners ) { +void cPrimitives::DrawRoundedRectangle( const Rectf& R, const Float& Angle, const Vector2f& Scale, const unsigned int& Corners ) { DrawRoundedRectangle( R, mColor, mColor, mColor, mColor, Angle, Scale, Corners ); } -void cPrimitives::DrawQuad( const eeQuad2f& q, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3, const ColorA& Color4, const Float& OffsetX, const Float& OffsetY ) { +void cPrimitives::DrawQuad( const Quad2f& 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 ); @@ -346,11 +346,11 @@ void cPrimitives::DrawQuad( const eeQuad2f& q, const ColorA& Color1, const Color DrawBatch(); } -void cPrimitives::DrawQuad( const eeQuad2f& q, const Float& OffsetX, const Float& OffsetY ) { +void cPrimitives::DrawQuad( const Quad2f& q, const Float& OffsetX, const Float& OffsetY ) { DrawQuad( q, mColor, mColor, mColor, mColor, OffsetX, OffsetY ); } -void cPrimitives::DrawPolygon( const eePolygon2f& p ) { +void cPrimitives::DrawPolygon( const Polygon2f& p ) { sBR->SetTexture( NULL ); sBR->SetBlendMode( mBlendMode ); diff --git a/src/eepp/graphics/cscrollparallax.cpp b/src/eepp/graphics/cscrollparallax.cpp index f4c4d94cf..bca55add9 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 ColorA& Color, const EE_BLEND_MODE& Blend ) { +cScrollParallax::cScrollParallax( cSubTexture * SubTexture, const Vector2f& Position, const Sizef& Size, const Vector2f& Speed, const ColorA& Color, const EE_BLEND_MODE& Blend ) { Create( SubTexture, Position, Size, Speed, Color, Blend ); } @@ -29,7 +29,7 @@ void cScrollParallax::SubTexture( cSubTexture * subTexture ) { void cScrollParallax::SetSubTexture() { if ( NULL != mSubTexture ) { mRect = mSubTexture->SrcRect(); - mRealSize = eeVector2f( (Float)mSubTexture->RealSize().Width(), (Float)mSubTexture->RealSize().Height() ); + mRealSize = Vector2f( (Float)mSubTexture->RealSize().Width(), (Float)mSubTexture->RealSize().Height() ); mTiles.x = ( (Int32)mSize.Width() / mSubTexture->RealSize().Width() ) + 1; mTiles.y = ( (Int32)mSize.Height() / mSubTexture->RealSize().Height() ) + 1; @@ -37,10 +37,10 @@ void cScrollParallax::SetSubTexture() { } void cScrollParallax::SetAABB() { - mAABB = eeRectf( mInitPos.x, mInitPos.y, mInitPos.x + mSize.Width(), mInitPos.y + mSize.Height() ); + mAABB = Rectf( 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 ColorA& Color, const EE_BLEND_MODE& Blend ) { +bool cScrollParallax::Create( cSubTexture * SubTexture, const Vector2f& Position, const Sizef& Size, const Vector2f& Speed, const ColorA& Color, const EE_BLEND_MODE& Blend ) { mSubTexture = SubTexture; mPos = Position; mSize = Size; @@ -55,15 +55,15 @@ bool cScrollParallax::Create( cSubTexture * SubTexture, const eeVector2f& Positi return true; } -void cScrollParallax::Size( const eeSizef& size ) { +void cScrollParallax::Size( const Sizef& size ) { mSize = size; SetSubTexture(); SetAABB(); } -void cScrollParallax::Position( const eeVector2f& Pos ) { - eeVector2f Diff = mPos - mInitPos; +void cScrollParallax::Position( const Vector2f& Pos ) { + Vector2f Diff = mPos - mInitPos; mInitPos = Pos; @@ -72,11 +72,11 @@ void cScrollParallax::Position( const eeVector2f& Pos ) { SetAABB(); } -const eeSizef& cScrollParallax::Size() const { +const Sizef& cScrollParallax::Size() const { return mSize; } -const eeVector2f& cScrollParallax::Position() const { +const Vector2f& cScrollParallax::Position() const { return mInitPos; } @@ -90,7 +90,7 @@ void cScrollParallax::Draw() { if ( mPos.y > mAABB.Top + mRealSize.Height() || mPos.y < mAABB.Top - mRealSize.Height() ) mPos.y = mAABB.Top; - eeVector2f Pos = mPos; + Vector2f Pos = mPos; Pos.x = (Float)(Int32)Pos.x; Pos.y = (Float)(Int32)Pos.y; @@ -103,8 +103,8 @@ void cScrollParallax::Draw() { for ( Int32 y = -1; y < mTiles.y; y++ ) { for ( Int32 x = -1; x < mTiles.x; x++ ) { - eeRecti Rect = mRect; - eeRectf AABB( Pos.x, Pos.y, Pos.x + mRealSize.Width(), Pos.y + mRealSize.Height() ); + Recti Rect = mRect; + Rectf AABB( Pos.x, Pos.y, Pos.x + mRealSize.Width(), Pos.y + mRealSize.Height() ); if ( AABB.Intersect( mAABB ) ) { if ( Pos.x < mAABB.Left ) { @@ -129,7 +129,7 @@ void cScrollParallax::Draw() { mSubTexture->ResetDestSize(); if ( !( Rect.Right == 0 || Rect.Bottom == 0 ) ) - mSubTexture->Draw( AABB.Left, AABB.Top, mColor, 0.f, eeVector2f::One, mBlend ); + mSubTexture->Draw( AABB.Left, AABB.Top, mColor, 0.f, Vector2f::One, mBlend ); } Pos.x += mRealSize.Width(); @@ -148,11 +148,11 @@ void cScrollParallax::Draw() { } } -void cScrollParallax::Speed( const eeVector2f& speed ) { +void cScrollParallax::Speed( const Vector2f& speed ) { mSpeed = speed; } -const eeVector2f& cScrollParallax::Speed() const { +const Vector2f& cScrollParallax::Speed() const { return mSpeed; } diff --git a/src/eepp/graphics/cshaderprogram.cpp b/src/eepp/graphics/cshaderprogram.cpp index 75cceef1f..a05b3e627 100644 --- a/src/eepp/graphics/cshaderprogram.cpp +++ b/src/eepp/graphics/cshaderprogram.cpp @@ -313,7 +313,7 @@ bool cShaderProgram::SetUniform( const std::string& Name, float Value ) { return ( Location >= 0 ); } -bool cShaderProgram::SetUniform( const std::string& Name, eeVector2ff Value ) { +bool cShaderProgram::SetUniform( const std::string& Name, Vector2ff Value ) { Int32 Location = UniformLocation( Name ); if ( Location >= 0 ) { @@ -325,7 +325,7 @@ bool cShaderProgram::SetUniform( const std::string& Name, eeVector2ff Value ) { return ( Location >= 0 ); } -bool cShaderProgram::SetUniform( const std::string& Name, eeVector3ff Value ) { +bool cShaderProgram::SetUniform( const std::string& Name, Vector3ff Value ) { Int32 Location = UniformLocation( Name ); if ( Location >= 0 ) { @@ -385,7 +385,7 @@ bool cShaderProgram::SetUniform( const Int32& Location, float Value ) { return false; } -bool cShaderProgram::SetUniform( const Int32& Location, eeVector2ff Value ) { +bool cShaderProgram::SetUniform( const Int32& Location, Vector2ff Value ) { if ( -1 != Location ) { #ifdef EE_SHADERS_SUPPORTED glUniform2fv( Location, 1, reinterpret_cast( &Value ) ); @@ -397,7 +397,7 @@ bool cShaderProgram::SetUniform( const Int32& Location, eeVector2ff Value ) { return false; } -bool cShaderProgram::SetUniform( const Int32& Location, eeVector3ff Value ) { +bool cShaderProgram::SetUniform( const Int32& Location, Vector3ff Value ) { if ( -1 != Location ) { #ifdef EE_SHADERS_SUPPORTED glUniform3fv( Location, 1, reinterpret_cast( &Value ) ); diff --git a/src/eepp/graphics/csprite.cpp b/src/eepp/graphics/csprite.cpp index e00482f94..6847567fb 100755 --- a/src/eepp/graphics/csprite.cpp +++ b/src/eepp/graphics/csprite.cpp @@ -75,7 +75,7 @@ cSprite::cSprite( cSubTexture * SubTexture ) : CreateStatic( SubTexture ); } -cSprite::cSprite( const Uint32& TexId, const eeSizef &DestSize, const eeVector2i &Offset, const eeRecti& TexSector ) : +cSprite::cSprite( const Uint32& TexId, const Sizef &DestSize, const Vector2i &Offset, const Recti& TexSector ) : mFlags( SPRITE_FLAG_AUTO_ANIM | SPRITE_FLAG_EVENTS_ENABLED ), mPos(), mAngle( 0.f ), @@ -178,7 +178,7 @@ void cSprite::Reset() { mFlags = SPRITE_FLAG_AUTO_ANIM | SPRITE_FLAG_EVENTS_ENABLED; mAnimSpeed = 16.f; - mScale = eeVector2f::One; + mScale = Vector2f::One; mRepeations = -1; mAngle = 0; @@ -219,27 +219,27 @@ void cSprite::CurrentSubFrame( const unsigned int& CurSubFrame ) { mCurrentSubFrame = CurSubFrame; } -eeQuad2f cSprite::GetQuad() { +Quad2f cSprite::GetQuad() { cSubTexture * S; if ( mFrames.size() && ( S = GetCurrentSubTexture() ) ) { - eeRectf TmpR( mPos.x, + Rectf TmpR( mPos.x, mPos.y, mPos.x + S->DestSize().x, mPos.y + S->DestSize().y ); - eeQuad2f Q = eeQuad2f( eeVector2f( TmpR.Left, TmpR.Top ), - eeVector2f( TmpR.Left, TmpR.Bottom ), - eeVector2f( TmpR.Right, TmpR.Bottom ), - eeVector2f( TmpR.Right, TmpR.Top ) + Quad2f Q = Quad2f( Vector2f( TmpR.Left, TmpR.Top ), + Vector2f( TmpR.Left, TmpR.Bottom ), + Vector2f( TmpR.Right, TmpR.Bottom ), + Vector2f( TmpR.Right, TmpR.Top ) ); - eeVector2f Center; + Vector2f Center; - if ( mOrigin.OriginType == eeOriginPoint::OriginCenter ) { + if ( mOrigin.OriginType == OriginPoint::OriginCenter ) { Center = TmpR.Center(); - } else if ( mOrigin.OriginType == eeOriginPoint::OriginTopLeft ) { + } else if ( mOrigin.OriginType == OriginPoint::OriginTopLeft ) { Center = mPos; } else { Center += mPos; @@ -273,7 +273,7 @@ eeQuad2f cSprite::GetQuad() { return Q; } - return eeQuad2f(); + return Quad2f(); } eeAABB cSprite::GetAABB() { @@ -284,13 +284,13 @@ eeAABB cSprite::GetAABB() { if ( mAngle != 0 || mEffect >= 4 ) { return GetQuad().ToAABB(); } else { // The method used if mAngle != 0 works for mAngle = 0, but i prefer to use the faster way - TmpR = eeRectf( mPos.x, mPos.y, mPos.x + S->DestSize().x, mPos.y + S->DestSize().y ); + TmpR = Rectf( mPos.x, mPos.y, mPos.x + S->DestSize().x, mPos.y + S->DestSize().y ); - eeVector2f Center; + Vector2f Center; - if ( mOrigin.OriginType == eeOriginPoint::OriginCenter ) { + if ( mOrigin.OriginType == OriginPoint::OriginCenter ) { Center = TmpR.Center(); - } else if ( mOrigin.OriginType == eeOriginPoint::OriginTopLeft ) { + } else if ( mOrigin.OriginType == OriginPoint::OriginTopLeft ) { Center = mPos; } else { Center = mPos + mOrigin; @@ -303,7 +303,7 @@ eeAABB cSprite::GetAABB() { return TmpR; } -const eeVector2f cSprite::Position() const { +const Vector2f cSprite::Position() const { return mPos; } @@ -312,7 +312,7 @@ void cSprite::Position(const Float& x, const Float& y) { mPos.y = y; } -void cSprite::Position( const eeVector2f& NewPos ) { +void cSprite::Position( const Vector2f& NewPos ) { mPos = NewPos; } @@ -343,7 +343,7 @@ bool cSprite::CreateStatic( cSubTexture * SubTexture ) { return true; } -bool cSprite::CreateStatic( const Uint32& TexId, const eeSizef& DestSize, const eeVector2i& Offset, const eeRecti& TexSector ) { +bool cSprite::CreateStatic( const Uint32& TexId, const Sizef& DestSize, const Vector2i& Offset, const Recti& TexSector ) { if ( cTextureFactory::instance()->TextureIdExists( TexId ) ) { Reset(); @@ -439,7 +439,7 @@ unsigned int cSprite::AddFrame( cSubTexture * SubTexture ) { return id; } -unsigned int cSprite::AddFrame( const Uint32& TexId, const eeSizef& DestSize, const eeVector2i& Offset, const eeRecti& TexSector ) { +unsigned int cSprite::AddFrame( const Uint32& TexId, const Sizef& DestSize, const Vector2i& Offset, const Recti& TexSector ) { unsigned int id = FramePos(); if ( AddSubFrame( TexId, id, mCurrentSubFrame, DestSize, Offset, TexSector ) ) @@ -448,7 +448,7 @@ unsigned int cSprite::AddFrame( const Uint32& TexId, const eeSizef& DestSize, co return 0; } -bool cSprite::AddSubFrame(const Uint32& TexId, const unsigned int& NumFrame, const unsigned int& NumSubFrame, const eeSizef& DestSize, const eeVector2i& Offset, const eeRecti& TexSector) { +bool cSprite::AddSubFrame(const Uint32& TexId, const unsigned int& NumFrame, const unsigned int& NumSubFrame, const Sizef& DestSize, const Vector2i& Offset, const Recti& TexSector) { if ( !cTextureFactory::instance()->TextureIdExists( TexId ) ) return false; @@ -460,9 +460,9 @@ bool cSprite::AddSubFrame(const Uint32& TexId, const unsigned int& NumFrame, con if ( TexSector.Right > 0 && TexSector.Bottom > 0 ) S->SrcRect( TexSector ); else - S->SrcRect( eeRecti( 0, 0, (Int32)Tex->ImgWidth(), (Int32)Tex->ImgHeight() ) ); + S->SrcRect( Recti( 0, 0, (Int32)Tex->ImgWidth(), (Int32)Tex->ImgHeight() ) ); - eeSizef destSize( DestSize ); + Sizef destSize( DestSize ); if ( destSize.x <= 0 ) { destSize.x = static_cast ( S->SrcRect().Right - S->SrcRect().Left ); @@ -627,16 +627,16 @@ unsigned int cSprite::GetSubFrame( const unsigned int& SubFrame ) { return SFN; } -eeVector2i cSprite::Offset() { +Vector2i cSprite::Offset() { cSubTexture* S = GetCurrentSubTexture(); if ( S != NULL ) return S->Offset(); - return eeVector2i(); + return Vector2i(); } -void cSprite::Offset( const eeVector2i& offset ) { +void cSprite::Offset( const Vector2i& offset ) { cSubTexture* S = GetCurrentSubTexture(); if ( S != NULL ) { @@ -644,19 +644,19 @@ void cSprite::Offset( const eeVector2i& offset ) { } } -void cSprite::Size( const eeSizef& Size, const unsigned int& FrameNum, const unsigned int& SubFrame ) { +void cSprite::Size( const Sizef& Size, const unsigned int& FrameNum, const unsigned int& SubFrame ) { mFrames[ GetFrame(FrameNum) ].Spr[ GetSubFrame(SubFrame) ]->DestSize( Size ); } -void cSprite::Size( const eeSizef& Size ) { +void cSprite::Size( const Sizef& Size ) { mFrames[ mCurrentFrame ].Spr[ mCurrentSubFrame ]->DestSize( Size ); } -eeSizef cSprite::Size( const unsigned int& FrameNum, const unsigned int& SubFrame ) { +Sizef cSprite::Size( const unsigned int& FrameNum, const unsigned int& SubFrame ) { return mFrames[ GetFrame(FrameNum) ].Spr[ GetSubFrame(SubFrame) ]->DestSize(); } -eeSizef cSprite::Size() { +Sizef cSprite::Size() { return mFrames[ mCurrentFrame ].Spr[ mCurrentSubFrame ]->DestSize(); } @@ -725,14 +725,14 @@ Float cSprite::Angle() const { } void cSprite::Scale( const Float& Scale ) { - this->Scale( eeVector2f( Scale, Scale ) ); + this->Scale( Vector2f( Scale, Scale ) ); } -void cSprite::Scale( const eeVector2f& Scale ) { +void cSprite::Scale( const Vector2f& Scale ) { mScale = Scale; } -const eeVector2f& cSprite::Scale() const { +const Vector2f& cSprite::Scale() const { return mScale; } @@ -869,11 +869,11 @@ void cSprite::FireEvent( const Uint32& Event ) { } } -void cSprite::Origin( const eeOriginPoint& origin ) { +void cSprite::Origin( const OriginPoint& origin ) { mOrigin = origin; } -const eeOriginPoint& cSprite:: Origin() const { +const OriginPoint& cSprite:: Origin() const { return mOrigin; } diff --git a/src/eepp/graphics/csubtexture.cpp b/src/eepp/graphics/csubtexture.cpp index 8b3adaaa6..dadbec1b1 100644 --- a/src/eepp/graphics/csubtexture.cpp +++ b/src/eepp/graphics/csubtexture.cpp @@ -14,7 +14,7 @@ cSubTexture::cSubTexture() : mId(0), mTexId(0), mTexture(NULL), - mSrcRect( eeRecti(0,0,0,0) ), + mSrcRect( Recti(0,0,0,0) ), mDestSize(0,0), mOffset(0,0) { @@ -28,14 +28,14 @@ cSubTexture::cSubTexture( const Uint32& TexId, const std::string& Name ) : mId( String::Hash( mName ) ), mTexId( TexId ), mTexture( cTextureFactory::instance()->GetTexture( TexId ) ), - mSrcRect( eeRecti( 0, 0, NULL != mTexture ? mTexture->ImgWidth() : 0, NULL != mTexture ? mTexture->ImgHeight() : 0 ) ), + mSrcRect( Recti( 0, 0, NULL != mTexture ? mTexture->ImgWidth() : 0, NULL != mTexture ? mTexture->ImgHeight() : 0 ) ), mDestSize( (Float)mSrcRect.Size().Width(), (Float)mSrcRect.Size().Height() ), mOffset(0,0) { CreateUnnamed(); } -cSubTexture::cSubTexture( const Uint32& TexId, const eeRecti& SrcRect, const std::string& Name ) : +cSubTexture::cSubTexture( const Uint32& TexId, const Recti& SrcRect, const std::string& Name ) : mPixels(NULL), mAlpha(NULL), mName( Name ), @@ -49,7 +49,7 @@ cSubTexture::cSubTexture( const Uint32& TexId, const eeRecti& SrcRect, const std CreateUnnamed(); } -cSubTexture::cSubTexture( const Uint32& TexId, const eeRecti& SrcRect, const eeSizef& DestSize, const std::string& Name ) : +cSubTexture::cSubTexture( const Uint32& TexId, const Recti& SrcRect, const Sizef& DestSize, const std::string& Name ) : mPixels(NULL), mAlpha(NULL), mName( Name ), @@ -63,7 +63,7 @@ cSubTexture::cSubTexture( const Uint32& TexId, const eeRecti& SrcRect, const eeS CreateUnnamed(); } -cSubTexture::cSubTexture( const Uint32& TexId, const eeRecti& SrcRect, const eeSizef& DestSize, const eeVector2i &Offset, const std::string& Name ) : +cSubTexture::cSubTexture( const Uint32& TexId, const Recti& SrcRect, const Sizef& DestSize, const Vector2i &Offset, const std::string& Name ) : mPixels(NULL), mAlpha(NULL), mName( Name ), @@ -108,11 +108,11 @@ void cSubTexture::Texture( const Uint32& TexId ) { mTexture = cTextureFactory::instance()->GetTexture( TexId ); } -const eeRecti& cSubTexture::SrcRect() const { +const Recti& cSubTexture::SrcRect() const { return mSrcRect; } -void cSubTexture::SrcRect( const eeRecti& Rect ) { +void cSubTexture::SrcRect( const Recti& Rect ) { mSrcRect = Rect; if ( NULL != mPixels ) @@ -122,33 +122,33 @@ void cSubTexture::SrcRect( const eeRecti& Rect ) { CacheAlphaMask(); } -const eeSizef& cSubTexture::DestSize() const { +const Sizef& cSubTexture::DestSize() const { return mDestSize; } -void cSubTexture::DestSize( const eeSizef& destSize ) { +void cSubTexture::DestSize( const Sizef& destSize ) { mDestSize = destSize; } -const eeVector2i& cSubTexture::Offset() const { +const Vector2i& cSubTexture::Offset() const { return mOffset; } -void cSubTexture::Offset( const eeVector2i& offset ) { +void cSubTexture::Offset( const Vector2i& offset ) { mOffset = offset; } -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 ) { +void cSubTexture::Draw( const Float& X, const Float& Y, const ColorA& Color, const Float& Angle, const Vector2f& Scale, const EE_BLEND_MODE& Blend, const EE_RENDER_MODE& Effect, OriginPoint 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 ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& 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 Vector2f& Scale, const ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3, const EE_BLEND_MODE& Blend, const EE_RENDER_MODE& Effect, OriginPoint 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 ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3, const EE_BLEND_MODE& Blend ) { +void cSubTexture::Draw( const Quad2f Q, const Vector2f& Offset, const Float& Angle, const Vector2f& 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 ); } @@ -331,12 +331,12 @@ bool cSubTexture::Unlock( const bool& KeepData, const bool& Modified ) { return false; } -eeSize cSubTexture::RealSize() { +Sizei cSubTexture::RealSize() { return mSrcRect.Size(); } -eeSize cSubTexture::Size() { - return eeSize( (Int32)mDestSize.x, (Int32)mDestSize.y ); +Sizei cSubTexture::Size() { + return Sizei( (Int32)mDestSize.x, (Int32)mDestSize.y ); } const Uint8* cSubTexture::GetPixelsPtr() { @@ -369,7 +369,7 @@ bool cSubTexture::SaveToFile(const std::string& filepath, const EE_SAVE_TYPE& Fo } void cSubTexture::ResetDestSize() { - eeSize Size = mSrcRect.Size(); + Sizei Size = mSrcRect.Size(); mDestSize.x = (Float)Size.Width(); mDestSize.y = (Float)Size.Height(); } diff --git a/src/eepp/graphics/ctextcache.cpp b/src/eepp/graphics/ctextcache.cpp index 41193e9b1..c8b29fccf 100644 --- a/src/eepp/graphics/ctextcache.cpp +++ b/src/eepp/graphics/ctextcache.cpp @@ -186,7 +186,7 @@ const std::vector& cTextCache::LinesWidth() { return mLinesWidth; } -void cTextCache::Draw( const Float& X, const Float& Y, const eeVector2f& Scale, const Float& Angle, EE_BLEND_MODE Effect ) { +void cTextCache::Draw( const Float& X, const Float& Y, const Vector2f& Scale, const Float& Angle, EE_BLEND_MODE Effect ) { if ( NULL != mFont ) { cGlobalBatchRenderer::instance()->Draw(); diff --git a/src/eepp/graphics/ctexture.cpp b/src/eepp/graphics/ctexture.cpp index e1f9e21c3..662b6ecd9 100755 --- a/src/eepp/graphics/ctexture.cpp +++ b/src/eepp/graphics/ctexture.cpp @@ -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 ColorA& 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 Vector2f &Scale, const ColorA& Color, const EE_BLEND_MODE &Blend, const EE_RENDER_MODE &Effect, OriginPoint Center, const Recti& 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 ColorA& 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 Vector2f& 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,9 +451,9 @@ 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 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 ) { +void cTexture::DrawEx( Float x, Float y, Float width, Float height, const Float &Angle, const Vector2f &Scale, const ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3, const EE_BLEND_MODE &Blend, const EE_RENDER_MODE &Effect, OriginPoint Center, const Recti& texSector ) { bool renderSector = true; - eeRecti Sector = texSector; + Recti Sector = texSector; Float w = (Float)ImgWidth(); Float h = (Float)ImgHeight(); @@ -493,14 +493,14 @@ void cTexture::DrawEx( Float x, Float y, Float width, Float height, const Float Int32 tmpX; sBR->Draw(); - eeVector2f oCenter( sBR->BatchCenter() ); + Vector2f oCenter( sBR->BatchCenter() ); Float oAngle = sBR->BatchRotation(); - eeVector2f oScale = sBR->BatchScale(); + Vector2f oScale = sBR->BatchScale(); - if ( Center.OriginType == eeOriginPoint::OriginCenter ) { + if ( Center.OriginType == OriginPoint::OriginCenter ) { Center.x = x + width * 0.5f; Center.y = y + height * 0.5f; - } else if ( Center.OriginType == eeOriginPoint::OriginTopLeft ) { + } else if ( Center.OriginType == OriginPoint::OriginTopLeft ) { Center.x = x; Center.y = y; } else { @@ -583,8 +583,8 @@ void cTexture::DrawEx( Float x, Float y, Float width, Float height, const Float if ( renderSector ) sBR->QuadsSetSubsetFree( Sector.Left / w, Sector.Top / h, Sector.Left / w, Sector.Bottom / h, Sector.Right / w, Sector.Bottom / h, Sector.Right / w, Sector.Top / h ); - eeRectf TmpR( x, y, x + width, y + height ); - eeQuad2f Q = eeQuad2f( eeVector2f( TmpR.Left, TmpR.Top ), eeVector2f( TmpR.Left, TmpR.Bottom ), eeVector2f( TmpR.Right, TmpR.Bottom ), eeVector2f( TmpR.Right, TmpR.Top ) ); + Rectf TmpR( x, y, x + width, y + height ); + Quad2f Q = Quad2f( Vector2f( TmpR.Left, TmpR.Top ), Vector2f( TmpR.Left, TmpR.Bottom ), Vector2f( TmpR.Right, TmpR.Bottom ), Vector2f( TmpR.Right, TmpR.Top ) ); if ( Effect == RN_ISOMETRIC ) { Q.V[0].x += ( TmpR.Right - TmpR.Left ); @@ -600,9 +600,9 @@ void cTexture::DrawEx( Float x, Float y, Float width, Float height, const Float } if ( Angle != 0.f || Scale != 1.f ) { - if ( Center.OriginType == eeOriginPoint::OriginCenter ) { + if ( Center.OriginType == OriginPoint::OriginCenter ) { Center = TmpR.Center(); - } else if ( Center.OriginType == eeOriginPoint::OriginTopLeft ) { + } else if ( Center.OriginType == OriginPoint::OriginTopLeft ) { Center = TmpR.Pos(); } else { Center += TmpR.Pos(); @@ -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 ColorA& Color, const EE_BLEND_MODE &Blend, const eeRecti& texSector) { +void cTexture::DrawQuad( const Quad2f& Q, const Vector2f& Offset, const Float &Angle, const Vector2f &Scale, const ColorA& Color, const EE_BLEND_MODE &Blend, const Recti& 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 ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3, const EE_BLEND_MODE &Blend, eeRecti texSector ) { +void cTexture::DrawQuadEx( Quad2f Q, const Vector2f& Offset, const Float &Angle, const Vector2f &Scale, const ColorA& Color0, const ColorA& Color1, const ColorA& Color2, const ColorA& Color3, const EE_BLEND_MODE &Blend, Recti texSector ) { bool renderSector = true; Float w = (Float)ImgWidth(); Float h = (Float)ImgHeight(); @@ -643,7 +643,7 @@ void cTexture::DrawQuadEx( eeQuad2f Q, const eeVector2f& Offset, const Float &An sBR->QuadsSetColorFree( Color0, Color1, Color2, Color3 ); if ( Angle != 0 || Scale != 1.0f ) { - eeVector2f QCenter( Q.GetCenter() ); + Vector2f QCenter( Q.GetCenter() ); Q.Rotate( Angle, QCenter ); Q.Scale( Scale, QCenter ); } diff --git a/src/eepp/graphics/ctextureatlas.cpp b/src/eepp/graphics/ctextureatlas.cpp index d34b70afe..4fe279fac 100644 --- a/src/eepp/graphics/ctextureatlas.cpp +++ b/src/eepp/graphics/ctextureatlas.cpp @@ -40,15 +40,15 @@ cSubTexture * cTextureAtlas::Add( const Uint32& TexId, const std::string& Name ) return Add( eeNew( cSubTexture, ( TexId, Name ) ) ); } -cSubTexture * cTextureAtlas::Add( const Uint32& TexId, const eeRecti& SrcRect, const std::string& Name ) { +cSubTexture * cTextureAtlas::Add( const Uint32& TexId, const Recti& SrcRect, const std::string& Name ) { return Add( eeNew( cSubTexture, ( TexId, SrcRect, Name ) ) ); } -cSubTexture * cTextureAtlas::Add( const Uint32& TexId, const eeRecti& SrcRect, const eeSizef& DestSize, const std::string& Name ) { +cSubTexture * cTextureAtlas::Add( const Uint32& TexId, const Recti& SrcRect, const Sizef& DestSize, const std::string& Name ) { return Add( eeNew ( cSubTexture, ( TexId, SrcRect, DestSize, Name ) ) ); } -cSubTexture * cTextureAtlas::Add( const Uint32& TexId, const eeRecti& SrcRect, const eeSizef& DestSize, const eeVector2i& Offset, const std::string& Name ) { +cSubTexture * cTextureAtlas::Add( const Uint32& TexId, const Recti& SrcRect, const Sizef& DestSize, const Vector2i& Offset, const std::string& Name ) { return Add( eeNew ( cSubTexture, ( TexId, SrcRect, DestSize, Offset, Name ) ) ); } diff --git a/src/eepp/graphics/ctextureatlasloader.cpp b/src/eepp/graphics/ctextureatlasloader.cpp index 7533c5b98..233cee7a5 100644 --- a/src/eepp/graphics/ctextureatlasloader.cpp +++ b/src/eepp/graphics/ctextureatlasloader.cpp @@ -228,9 +228,9 @@ void cTextureAtlasLoader::CreateSubTextures() { if ( mTexGrHdr.Flags & HDR_TEXTURE_ATLAS_REMOVE_EXTENSION ) SubTextureName = FileSystem::FileRemoveExtension( SubTextureName ); - eeRecti tRect( tSh->X, tSh->Y, tSh->X + tSh->Width, tSh->Y + tSh->Height ); + Recti tRect( tSh->X, tSh->Y, tSh->X + tSh->Width, tSh->Y + tSh->Height ); - cSubTexture * tSubTexture = eeNew( cSubTexture, ( tTex->Id(), tRect, eeSizef( (Float)tSh->DestWidth, (Float)tSh->DestHeight ), eeVector2i( tSh->OffsetX, tSh->OffsetY ), SubTextureName ) ); + cSubTexture * tSubTexture = eeNew( cSubTexture, ( tTex->Id(), tRect, Sizef( (Float)tSh->DestWidth, (Float)tSh->DestHeight ), Vector2i( tSh->OffsetX, tSh->OffsetY ), SubTextureName ) ); //if ( tSh->Flags & HDR_SUBTEXTURE_FLAG_FLIPED ) // Should rotate the sub texture, but.. sub texture rotation is not stored. diff --git a/src/eepp/graphics/ctexturefont.cpp b/src/eepp/graphics/ctexturefont.cpp index b45fb53b2..7bffdb5cd 100755 --- a/src/eepp/graphics/ctexturefont.cpp +++ b/src/eepp/graphics/ctexturefont.cpp @@ -101,7 +101,7 @@ void cTextureFont::BuildFont() { void cTextureFont::BuildFromGlyphs() { Float Top, Bottom; - eeRectf tR; + Rectf tR; mTexCoords.resize( mNumChars ); diff --git a/src/eepp/graphics/ctexturepackernode.cpp b/src/eepp/graphics/ctexturepackernode.cpp index c1b04f986..ce065a847 100644 --- a/src/eepp/graphics/ctexturepackernode.cpp +++ b/src/eepp/graphics/ctexturepackernode.cpp @@ -45,13 +45,13 @@ bool cTexturePackerNode::Fits( Int32 width, Int32 height, Int32 &edgeCount, cons return ret; } -void cTexturePackerNode::GetRect( eeRecti &r ) const { - r = eeRecti( mX, mY, mX + mWidth - 1, mY + mHeight - 1 ); +void cTexturePackerNode::GetRect( Recti &r ) const { + r = Recti( mX, mY, mX + mWidth - 1, mY + mHeight - 1 ); } void cTexturePackerNode::Validate( cTexturePackerNode * n ) { - eeRecti r1; - eeRecti r2; + Recti r1; + Recti r2; GetRect( r1 ); n->GetRect( r2 ); eeASSERT( !r1.Intersect(r2) ); @@ -60,8 +60,8 @@ void cTexturePackerNode::Validate( cTexturePackerNode * n ) { bool cTexturePackerNode::Merge( const cTexturePackerNode& n ) { bool ret = false; - eeRecti r1; - eeRecti r2; + Recti r1; + Recti r2; GetRect( r1 ); n.GetRect( r2 ); diff --git a/src/eepp/graphics/ctexturepackernode.hpp b/src/eepp/graphics/ctexturepackernode.hpp index 092be8031..f6266482c 100644 --- a/src/eepp/graphics/ctexturepackernode.hpp +++ b/src/eepp/graphics/ctexturepackernode.hpp @@ -11,7 +11,7 @@ class cTexturePackerNode { bool Fits( Int32 wid, Int32 hit, Int32 &edgeCount, const bool& AllowFlipping = false ) const; - void GetRect( eeRecti &r ) const; + void GetRect( Recti &r ) const; void Validate( cTexturePackerNode * n ); diff --git a/src/eepp/graphics/cttffont.cpp b/src/eepp/graphics/cttffont.cpp index 148b629f6..efc243a35 100755 --- a/src/eepp/graphics/cttffont.cpp +++ b/src/eepp/graphics/cttffont.cpp @@ -81,8 +81,8 @@ bool cTTFFont::Load( const std::string& Filepath, const unsigned int& Size, EE_T } 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; + Rect CurrentPos; + Sizei GlyphRect; unsigned char * TempGlyphSurface = NULL; unsigned char * TempOutGlyphSurface = NULL; @@ -245,13 +245,13 @@ 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 && OutlineEntropia == OutlineMethod ) { - eeRecti nGlyphR( + Recti nGlyphR( TempGlyph.CurX, TempGlyph.CurY, TempGlyph.CurX + TempGlyph.CurW, TempGlyph.CurY + TempGlyph.CurH ); - eeSize nGlyphS( nGlyphR.Size() ); + Sizei nGlyphS( nGlyphR.Size() ); if ( nGlyphS.x > 0 && nGlyphS.y > 0 ) { Uint32 Pos = 0; @@ -327,7 +327,7 @@ void cTTFFont::UpdateLoading() { void cTTFFont::RebuildFromGlyphs() { Float Top, Bottom; - eeRectf tR; + Rectf tR; mTexCoords.resize( mNumChars ); diff --git a/src/eepp/graphics/cvertexbuffer.cpp b/src/eepp/graphics/cvertexbuffer.cpp index f94df7445..36bce0e2c 100644 --- a/src/eepp/graphics/cvertexbuffer.cpp +++ b/src/eepp/graphics/cvertexbuffer.cpp @@ -38,18 +38,18 @@ cVertexBuffer::~cVertexBuffer() { cVertexBufferManager::instance()->Remove( this ); } -void cVertexBuffer::AddVertex( const Uint32& Type, const eeVector2f& Vertex ) { +void cVertexBuffer::AddVertex( const Uint32& Type, const Vector2f& Vertex ) { if ( Type < VERTEX_FLAGS_COUNT_ARR ) { mVertexArray[ Type ].push_back( Vertex.x ); mVertexArray[ Type ].push_back( Vertex.y ); } } -void cVertexBuffer::AddVertex( const eeVector2f& Vertex ) { +void cVertexBuffer::AddVertex( const Vector2f& Vertex ) { AddVertex( VERTEX_FLAG_POSITION, Vertex ); } -void cVertexBuffer::AddVertexCoord( const eeVector2f& VertexCoord, const Uint32& TextureLevel ) { +void cVertexBuffer::AddVertexCoord( const Vector2f& VertexCoord, const Uint32& TextureLevel ) { AddVertex( VERTEX_FLAG_TEXTURE0 + TextureLevel, VertexCoord ); } @@ -106,12 +106,12 @@ Uint32 cVertexBuffer::GetIndexCount() { return (Uint32)mIndexArray.size(); } -eeVector2f cVertexBuffer::GetVector2( const Uint32& Type, const Uint32& Index ) { +Vector2f cVertexBuffer::GetVector2( const Uint32& Type, const Uint32& Index ) { eeASSERT( Type < VERTEX_FLAGS_COUNT_ARR && !VERTEX_FLAG_QUERY( mVertexFlags, Type ) ) Int32 pos = Index * eeVertexElements[ Type ]; - return eeVector2f( mVertexArray[ Type ][ pos ], mVertexArray[ Type ][ pos + 1 ] ); + return Vector2f( mVertexArray[ Type ][ pos ], mVertexArray[ Type ][ pos + 1 ] ); } ColorA cVertexBuffer::GetColor( const Uint32& Index ) { diff --git a/src/eepp/graphics/pixelperfect.cpp b/src/eepp/graphics/pixelperfect.cpp index fef727184..f66621fb8 100644 --- a/src/eepp/graphics/pixelperfect.cpp +++ b/src/eepp/graphics/pixelperfect.cpp @@ -2,7 +2,7 @@ namespace EE { namespace Graphics { -bool PixelPerfectCollide( cTexture * Tex1, const unsigned int& x1, const unsigned int& y1, cTexture * Tex2, const unsigned int& x2, const unsigned int& y2, const eeRectu& Tex1_SrcRECT, const eeRectu& Tex2_SrcRECT ) { +bool PixelPerfectCollide( cTexture * Tex1, const unsigned int& x1, const unsigned int& y1, cTexture * Tex2, const unsigned int& x2, const unsigned int& y2, const Rectu& Tex1_SrcRECT, const Rectu& Tex2_SrcRECT ) { eeASSERT( NULL != Tex1 && NULL != Tex2 ); unsigned int ax1, ay1, ax2, ay2, bx1, by1, bx2, by2; @@ -65,7 +65,7 @@ bool PixelPerfectCollide( cTexture * Tex1, const unsigned int& x1, const unsigne return Collide; } -bool PixelPerfectCollide( cTexture * Tex, const unsigned int& x1, const unsigned int& y1, const unsigned int& x2, const unsigned int& y2, const eeRectu& Tex1_SrcRECT) { +bool PixelPerfectCollide( cTexture * Tex, const unsigned int& x1, const unsigned int& y1, const unsigned int& x2, const unsigned int& y2, const Rectu& Tex1_SrcRECT) { eeASSERT( NULL != Tex ); unsigned int ax1, ay1, ax2, ay2; diff --git a/src/eepp/graphics/renderer/cgl.cpp b/src/eepp/graphics/renderer/cgl.cpp index 302859797..e7d48b8b2 100644 --- a/src/eepp/graphics/renderer/cgl.cpp +++ b/src/eepp/graphics/renderer/cgl.cpp @@ -563,7 +563,7 @@ void cGL::GetViewport( int * viewport ) { glGetIntegerv( GL_VIEWPORT, viewport ); } -eeVector3f cGL::ProjectCurrent( const eeVector3f& point ) { +Vector3f cGL::ProjectCurrent( const Vector3f& point ) { float projMat[16]; GetCurrentMatrix( GL_PROJECTION_MATRIX, projMat ); @@ -573,17 +573,17 @@ eeVector3f cGL::ProjectCurrent( const eeVector3f& point ) { int viewPort[4]; GetViewport( viewPort ); - eeVector3f fPoint( point ); + Vector3f fPoint( point ); fPoint.y = viewPort[3] - point.y; Vector3 tv3; Project( (float)fPoint.x, (float)fPoint.y, (float)fPoint.z, projMat, modelMat, viewPort, &tv3.x, &tv3.y, &tv3.z ); - return eeVector3f( tv3.x, tv3.y, tv3.z ); + return Vector3f( tv3.x, tv3.y, tv3.z ); } -eeVector3f cGL::UnProjectCurrent( const eeVector3f& point ) { +Vector3f cGL::UnProjectCurrent( const Vector3f& point ) { float projMat[16]; GetCurrentMatrix( GL_PROJECTION_MATRIX, projMat ); @@ -593,14 +593,14 @@ eeVector3f cGL::UnProjectCurrent( const eeVector3f& point ) { int viewPort[4]; GetViewport( viewPort ); - eeVector3f fPoint( point ); + Vector3f fPoint( point ); fPoint.y = viewPort[3] - point.y; Vector3 tv3; UnProject( (float)fPoint.x, (float)fPoint.y, (float)fPoint.z, projMat, modelMat, viewPort, &tv3.x, &tv3.y, &tv3.z ); - return eeVector3f( tv3.x, tv3.y, tv3.z ); + return Vector3f( tv3.x, tv3.y, tv3.z ); } void cGL::StencilFunc( unsigned int func, int ref, unsigned int mask ) { diff --git a/src/eepp/graphics/renderer/crenderergl.cpp b/src/eepp/graphics/renderer/crenderergl.cpp index 7c170586f..bf3f577a2 100644 --- a/src/eepp/graphics/renderer/crenderergl.cpp +++ b/src/eepp/graphics/renderer/crenderergl.cpp @@ -250,7 +250,7 @@ void cRendererGL::Clip2DPlaneEnable( const Int32& x, const Int32& y, const Int32 ClipPlane(GL_CLIP_PLANE3, clip_bottom); if ( mPushClip ) { - mPlanesClipped.push_back( eeRectf( x, y, Width, Height ) ); + mPlanesClipped.push_back( Rectf( x, y, Width, Height ) ); } } @@ -265,7 +265,7 @@ void cRendererGL::Clip2DPlaneDisable() { GLi->Disable(GL_CLIP_PLANE2); GLi->Disable(GL_CLIP_PLANE3); } else { - eeRectf R( mPlanesClipped.back() ); + Rectf R( mPlanesClipped.back() ); mPushClip = false; Clip2DPlaneEnable( R.Left, R.Top, R.Right, R.Bottom ); mPushClip = true; diff --git a/src/eepp/graphics/renderer/crenderergl3.cpp b/src/eepp/graphics/renderer/crenderergl3.cpp index 07156f584..e7215f607 100644 --- a/src/eepp/graphics/renderer/crenderergl3.cpp +++ b/src/eepp/graphics/renderer/crenderergl3.cpp @@ -569,7 +569,7 @@ void cRendererGL3::Clip2DPlaneEnable( const Int32& x, const Int32& y, const Int3 glUniform4fv( mPlanes[3], 1, static_cast( &vclip_bottom[0] ) ); if ( mPushClip ) { - mPlanesClipped.push_back( eeRectf( x, y, Width, Height ) ); + mPlanesClipped.push_back( Rectf( x, y, Width, Height ) ); } } @@ -584,7 +584,7 @@ void cRendererGL3::Clip2DPlaneDisable() { GLi->Disable(GL_CLIP_PLANE2); GLi->Disable(GL_CLIP_PLANE3); } else { - eeRectf R( mPlanesClipped.back() ); + Rectf R( mPlanesClipped.back() ); mPushClip = false; Clip2DPlaneEnable( R.Left, R.Top, R.Right, R.Bottom ); mPushClip = true; diff --git a/src/eepp/graphics/renderer/crenderergl3cp.cpp b/src/eepp/graphics/renderer/crenderergl3cp.cpp index c114ebda3..d9e74ffa0 100644 --- a/src/eepp/graphics/renderer/crenderergl3cp.cpp +++ b/src/eepp/graphics/renderer/crenderergl3cp.cpp @@ -642,7 +642,7 @@ void cRendererGL3CP::Clip2DPlaneEnable( const Int32& x, const Int32& y, const In glUniform4fv( mPlanes[3], 1, static_cast( &vclip_bottom[0] ) ); if ( mPushClip ) { - mPlanesClipped.push_back( eeRectf( x, y, Width, Height ) ); + mPlanesClipped.push_back( Rectf( x, y, Width, Height ) ); } } @@ -657,7 +657,7 @@ void cRendererGL3CP::Clip2DPlaneDisable() { GLi->Disable(GL_CLIP_PLANE2); GLi->Disable(GL_CLIP_PLANE3); } else { - eeRectf R( mPlanesClipped.back() ); + Rectf R( mPlanesClipped.back() ); mPushClip = false; Clip2DPlaneEnable( R.Left, R.Top, R.Right, R.Bottom ); mPushClip = true; diff --git a/src/eepp/graphics/renderer/crenderergles2.cpp b/src/eepp/graphics/renderer/crenderergles2.cpp index 0fd99ed71..1376b0226 100644 --- a/src/eepp/graphics/renderer/crenderergles2.cpp +++ b/src/eepp/graphics/renderer/crenderergles2.cpp @@ -645,7 +645,7 @@ void cRendererGLES2::Clip2DPlaneEnable( const Int32& x, const Int32& y, const In glUniform4fv( mPlanes[3], 1, static_cast( &vclip_bottom[0] ) ); if ( mPushClip ) { - mPlanesClipped.push_back( eeRectf( x, y, Width, Height ) ); + mPlanesClipped.push_back( Rectf( x, y, Width, Height ) ); } } @@ -660,7 +660,7 @@ void cRendererGLES2::Clip2DPlaneDisable() { GLi->Disable(GL_CLIP_PLANE2); GLi->Disable(GL_CLIP_PLANE3); } else { - eeRectf R( mPlanesClipped.back() ); + Rectf R( mPlanesClipped.back() ); mPushClip = false; Clip2DPlaneEnable( R.Left, R.Top, R.Right, R.Bottom ); mPushClip = true; diff --git a/src/eepp/math/cinterpolation.cpp b/src/eepp/math/interpolation.cpp similarity index 71% rename from src/eepp/math/cinterpolation.cpp rename to src/eepp/math/interpolation.cpp index fbefbb558..47b85f913 100644 --- a/src/eepp/math/cinterpolation.cpp +++ b/src/eepp/math/interpolation.cpp @@ -1,10 +1,10 @@ -#include +#include #include using namespace EE::Math::easing; namespace EE { namespace Math { -cInterpolation::cInterpolation() : +Interpolation::Interpolation() : mType(Ease::Linear), mEnable(false), mUpdate(true), @@ -22,10 +22,10 @@ cInterpolation::cInterpolation() : { } -cInterpolation::~cInterpolation() { +Interpolation::~Interpolation() { } -void cInterpolation::Start( OnPathEndCallback PathEndCallback, OnStepCallback StepCallback) { +void Interpolation::Start( OnPathEndCallback PathEndCallback, OnStepCallback StepCallback) { mEnable = true; mOnPathEndCallback = PathEndCallback; mOnStepCallback = StepCallback; @@ -42,19 +42,19 @@ void cInterpolation::Start( OnPathEndCallback PathEndCallback, OnStepCallback St } } -void cInterpolation::Stop() { +void Interpolation::Stop() { mEnable = false; } -void cInterpolation::SetPathEndCallback( OnPathEndCallback PathEndCallback ) { +void Interpolation::SetPathEndCallback( OnPathEndCallback PathEndCallback ) { mOnPathEndCallback = PathEndCallback; } -void cInterpolation::SetStepCallback( OnStepCallback StepCallback ) { +void Interpolation::SetStepCallback( OnStepCallback StepCallback ) { mOnStepCallback = StepCallback; } -void cInterpolation::Reset() { +void Interpolation::Reset() { mTotDist = 0.f; mActP = mNexP = NULL; mEnable = false; @@ -68,26 +68,26 @@ void cInterpolation::Reset() { mCurPos = mPoints[0].p; } -void cInterpolation::ClearWaypoints() { +void Interpolation::ClearWaypoints() { Reset(); mPoints.clear(); } -void cInterpolation::AddWaypoint( const Float Pos, const Float Time ) { - mPoints.push_back( cPoint1df( Pos, Time ) ); +void Interpolation::AddWaypoint( const Float Pos, const Float Time ) { + mPoints.push_back( Point1d( Pos, Time ) ); if ( mPoints.size() >= 2 ) mTotDist += eeabs( mPoints[ mPoints.size() - 1 ].p - mPoints[ mPoints.size() - 2 ].p ); } -bool cInterpolation::EditWaypoint( const unsigned int& PointNum, const Float& NewPos, const Float NewTime ) { +bool Interpolation::EditWaypoint( const unsigned int& PointNum, const Float& NewPos, const Float NewTime ) { if ( PointNum < mPoints.size() ) { if ( 0 == PointNum ) mTotDist -= eeabs( mPoints[ PointNum ].p - mPoints[ PointNum + 1 ].p ); else mTotDist -= eeabs( mPoints[ PointNum ].p - mPoints[ PointNum - 1 ].p ); - mPoints[ PointNum ] = cPoint1df( NewPos, NewTime ); + mPoints[ PointNum ] = Point1d( NewPos, NewTime ); if ( 0 == PointNum ) { if ( PointNum + 1 < mPoints.size() ) @@ -101,7 +101,7 @@ bool cInterpolation::EditWaypoint( const unsigned int& PointNum, const Float& Ne return false; } -bool cInterpolation::EraseWaypoint( const unsigned int& PointNum ) { +bool Interpolation::EraseWaypoint( const unsigned int& PointNum ) { if ( PointNum < mPoints.size() && !mEnable ) { if ( 0 == PointNum ) mTotDist -= eeabs( mPoints[ PointNum ].p - mPoints[ PointNum + 1 ].p ); @@ -115,19 +115,19 @@ bool cInterpolation::EraseWaypoint( const unsigned int& PointNum ) { return false; } -const Float& cInterpolation::GetEndPos() { +const Float& Interpolation::GetEndPos() { return mPoints[ mPoints.size() - 1 ].p; } -const Float& cInterpolation::GetPos() { +const Float& Interpolation::GetPos() { return mCurPos; } -const Float& cInterpolation::GetRealPos() const { +const Float& Interpolation::GetRealPos() const { return mCurPos; } -void cInterpolation::Update( const Time& Elapsed ) { +void Interpolation::Update( const Time& Elapsed ) { if ( mEnable && mPoints.size() > 1 && mCurPoint != mPoints.size() ) { if ( mUpdate ) { mCurTime = 0; @@ -178,7 +178,7 @@ void cInterpolation::Update( const Time& Elapsed ) { } } -void cInterpolation::SetTotalTime( const Time & TotTime ) { +void Interpolation::SetTotalTime( const Time & TotTime ) { Float tdist = mTotDist; if ( tdist == 0.0f ) { @@ -197,7 +197,7 @@ void cInterpolation::SetTotalTime( const Time & TotTime ) { } } -void cInterpolation::Speed( const Float Speed ) { +void Interpolation::Speed( const Float Speed ) { Float tdist = mTotDist; mSpeed = Speed; Float CurDist; @@ -225,51 +225,51 @@ void cInterpolation::Speed( const Float Speed ) { } } -void cInterpolation::Type( Ease::Interpolation InterpolationType ) { +void Interpolation::Type( Ease::Interpolation InterpolationType ) { mType = InterpolationType; } -const int& cInterpolation::Type() const { +const int& Interpolation::Type() const { return mType; } -const bool& cInterpolation::Loop() const { +const bool& Interpolation::Loop() const { return mLoop; } -void cInterpolation::Loop( const bool& loop ) { +void Interpolation::Loop( const bool& loop ) { mLoop = loop; } -const bool& cInterpolation::Ended() const { +const bool& Interpolation::Ended() const { return mEnded; } -cPoint1df * cInterpolation::GetCurrentActual() const { +Point1d * Interpolation::GetCurrentActual() const { return mActP; } -cPoint1df * cInterpolation::GetCurrentNext() const { +Point1d * Interpolation::GetCurrentNext() const { return mNexP; } -const Uint32& cInterpolation::GetCurrentPos() const { +const Uint32& Interpolation::GetCurrentPos() const { return mCurPoint; } -const std::vector& cInterpolation::GetPoints() const { +const std::vector& Interpolation::GetPoints() const { return mPoints; } -const Float& cInterpolation::Speed() const { +const Float& Interpolation::Speed() const { return mSpeed; } -const bool& cInterpolation::Enabled() const { +const bool& Interpolation::Enabled() const { return mEnable; } -void cInterpolation::Enabled( const bool& Enabled ) { +void Interpolation::Enabled( const bool& Enabled ) { mEnable = Enabled; } diff --git a/src/eepp/math/cmtrand.cpp b/src/eepp/math/mtrand.cpp similarity index 65% rename from src/eepp/math/cmtrand.cpp rename to src/eepp/math/mtrand.cpp index 60132d154..8b4bab1c5 100755 --- a/src/eepp/math/cmtrand.cpp +++ b/src/eepp/math/mtrand.cpp @@ -1,16 +1,16 @@ -#include +#include namespace EE { namespace Math { -cMTRand::cMTRand( const Uint32 oneSeed ) { +MTRand::MTRand( const Uint32 oneSeed ) { Seed( oneSeed ); } -cMTRand::cMTRand() { +MTRand::MTRand() { Seed(); } -cMTRand::cMTRand( const cMTRand& o ) { +MTRand::MTRand( const MTRand& o ) { register const Uint32 *t = o.mState; register Uint32 * s = mState; register int i = N; @@ -24,7 +24,7 @@ cMTRand::cMTRand( const cMTRand& o ) { mNext = &mState[ N - mLeft ]; } -void cMTRand::Initialize( const Uint32 seed ) { +void MTRand::Initialize( const Uint32 seed ) { register Uint32 *s = mState; register Uint32 *r = mState; @@ -39,7 +39,7 @@ void cMTRand::Initialize( const Uint32 seed ) { } } -void cMTRand::Reload() { +void MTRand::Reload() { static const int MmN = int(M) - int(N); register Uint32 *p = mState; @@ -57,40 +57,40 @@ void cMTRand::Reload() { mLeft = N, mNext = mState; } -void cMTRand::Seed( const Uint32 oneSeed ) { +void MTRand::Seed( const Uint32 oneSeed ) { Initialize( oneSeed ); Reload(); } -void cMTRand::Seed() { +void MTRand::Seed() { Seed( 0xFEDCBA09 ); } -Uint32 cMTRand::hiBit( const Uint32 u ) const { +Uint32 MTRand::hiBit( const Uint32 u ) const { return u & 0x80000000UL; } -Uint32 cMTRand::loBit( const Uint32 u ) const { +Uint32 MTRand::loBit( const Uint32 u ) const { return u & 0x00000001UL; } -Uint32 cMTRand::loBits( const Uint32 u ) const { +Uint32 MTRand::loBits( const Uint32 u ) const { return u & 0x7fffffffUL; } -Uint32 cMTRand::MixBits( const Uint32 u, const Uint32 v ) const { +Uint32 MTRand::MixBits( const Uint32 u, const Uint32 v ) const { return hiBit(u) | loBits(v); } -Uint32 cMTRand::Magic( const Uint32 u ) const { +Uint32 MTRand::Magic( const Uint32 u ) const { return loBit(u) ? 0x9908b0dfUL : 0x0UL; } -Uint32 cMTRand::Twist( const Uint32 m, const Uint32 s0, const Uint32 s1 ) const { +Uint32 MTRand::Twist( const Uint32 m, const Uint32 s0, const Uint32 s1 ) const { return m ^ ( MixBits( s0, s1 )>>1 ) ^ Magic(s1); } -Uint32 cMTRand::Randi() { +Uint32 MTRand::Randi() { if ( mLeft == 0 ) Reload(); @@ -105,7 +105,7 @@ Uint32 cMTRand::Randi() { return ( s1 ^ (s1 >> 18) ); } -Uint32 cMTRand::Randi( const Uint32 n ) { +Uint32 MTRand::Randi( const Uint32 n ) { Uint32 used = n; used |= used >> 1; used |= used >> 2; @@ -122,31 +122,31 @@ Uint32 cMTRand::Randi( const Uint32 n ) { return i; } -double cMTRand::Rand() { +double MTRand::Rand() { return double( Randi() ) * ( 1.0 / 4294967295.0 ); } -double cMTRand::Rand( const double n ) { +double MTRand::Rand( const double n ) { return Rand() * n; } -Float cMTRand::Randf() { +Float MTRand::Randf() { return (Float)Rand(); } -Float cMTRand::Randf( const Float n ) { +Float MTRand::Randf( const Float n ) { return (Float)Rand(n); } -int cMTRand::RandRange( int Min, int Max ) { +int MTRand::RandRange( int Min, int Max ) { return Min + Randi( Max - Min ); } -Float cMTRand::RandRange( Float Min, Float Max ) { +Float MTRand::RandRange( Float Min, Float Max ) { return Min + Randf( Max - Min ); } -cMTRand& cMTRand::operator=( const cMTRand& o ) { +MTRand& MTRand::operator=( const MTRand& o ) { if ( this == &o ) return (*this); @@ -164,7 +164,7 @@ cMTRand& cMTRand::operator=( const cMTRand& o ) { return (*this); } -void cMTRand::Save( Uint32* saveArray ) const { +void MTRand::Save( Uint32* saveArray ) const { register const Uint32 *s = mState; register Uint32 *sa = saveArray; register int i = N; @@ -172,7 +172,7 @@ void cMTRand::Save( Uint32* saveArray ) const { *sa = mLeft; } -void cMTRand::Load( Uint32 *const loadArray ) { +void MTRand::Load( Uint32 *const loadArray ) { register Uint32 *s = mState; register Uint32 *la = loadArray; register int i = N; diff --git a/src/eepp/math/cperlinnoise.cpp b/src/eepp/math/perlinnoise.cpp similarity index 83% rename from src/eepp/math/cperlinnoise.cpp rename to src/eepp/math/perlinnoise.cpp index 4faf228a7..637bb4cfe 100755 --- a/src/eepp/math/cperlinnoise.cpp +++ b/src/eepp/math/perlinnoise.cpp @@ -1,15 +1,15 @@ -#include +#include #include namespace EE { namespace Math { -cPerlinNoise::cPerlinNoise() { +PerlinNoise::PerlinNoise() { Init(); } -cPerlinNoise::~cPerlinNoise() {} +PerlinNoise::~PerlinNoise() {} -void cPerlinNoise::Init() { +void PerlinNoise::Init() { mPersistence = 0.25f; mOctaves = 4; mFrequency = 0.015f; @@ -18,7 +18,7 @@ void cPerlinNoise::Init() { mAmpOctaveDep = false; } -Float cPerlinNoise::PerlinNoise2D(Float x, Float y) { +Float PerlinNoise::PerlinNoise2D(Float x, Float y) { Float total = 0; Float p = mPersistence; Float n = static_cast( mOctaves - 1 ); @@ -41,7 +41,7 @@ Float cPerlinNoise::PerlinNoise2D(Float x, Float y) { return total; } -Float cPerlinNoise::Noise2D( Int32 x, Int32 y ) { +Float PerlinNoise::Noise2D( Int32 x, Int32 y ) { Int32 n = x + y * 57; n = ( n << 13 ) ^ n; @@ -51,7 +51,7 @@ Float cPerlinNoise::Noise2D( Int32 x, Int32 y ) { return static_cast( 1.0 - static_cast( n ) / 1073741824.0); } -Float cPerlinNoise::SmoothedNoise2D(Float x, Float y) { +Float PerlinNoise::SmoothedNoise2D(Float x, Float y) { register Int32 tx = static_cast( x ); register Int32 ty = static_cast( y ); @@ -62,14 +62,14 @@ Float cPerlinNoise::SmoothedNoise2D(Float x, Float y) { return corners + sides + center; } -Float cPerlinNoise::Interpolate( Float a, Float b, Float x ) { +Float PerlinNoise::Interpolate( Float a, Float b, Float x ) { Float fac1 = 3 * eepow( 1 - x, 2 ) - 2 * eepow( 1 - x, 3 ); Float fac2 = 3 * eepow( x, 2 ) - 2 * eepow( x, 3 ); return a * fac1 + b * fac2; //add the weighted factors } -Float cPerlinNoise::InterpolatedNoise2D(Float x, Float y) { +Float PerlinNoise::InterpolatedNoise2D(Float x, Float y) { Int32 eger_X = static_cast( x ); Int32 eger_Y = static_cast( y ); diff --git a/src/eepp/math/cwaypoints.cpp b/src/eepp/math/waypoints.cpp similarity index 73% rename from src/eepp/math/cwaypoints.cpp rename to src/eepp/math/waypoints.cpp index bb7de70fe..91bc42983 100755 --- a/src/eepp/math/cwaypoints.cpp +++ b/src/eepp/math/waypoints.cpp @@ -1,10 +1,10 @@ -#include +#include #include using namespace EE::Math::easing; namespace EE { namespace Math { -cWaypoints::cWaypoints() : +Waypoints::Waypoints() : mType(Ease::Linear), mEnable(false), mUpdate(true), @@ -19,10 +19,10 @@ cWaypoints::cWaypoints() : { } -cWaypoints::~cWaypoints() { +Waypoints::~Waypoints() { } -void cWaypoints::Start( OnPathEndCallback PathEndCallback, OnStepCallback StepCallback ) { +void Waypoints::Start( OnPathEndCallback PathEndCallback, OnStepCallback StepCallback ) { mEnable = true; mOnPathEndCallback = PathEndCallback; mOnStepCallback = StepCallback; @@ -39,19 +39,19 @@ void cWaypoints::Start( OnPathEndCallback PathEndCallback, OnStepCallback StepCa } } -void cWaypoints::Stop() { +void Waypoints::Stop() { mEnable = false; } -void cWaypoints::SetPathEndCallback( OnPathEndCallback PathEndCallback ) { +void Waypoints::SetPathEndCallback( OnPathEndCallback PathEndCallback ) { mOnPathEndCallback = PathEndCallback; } -void cWaypoints::SetStepCallback( OnStepCallback StepCallback ) { +void Waypoints::SetStepCallback( OnStepCallback StepCallback ) { mOnStepCallback = StepCallback; } -void cWaypoints::Reset() { +void Waypoints::Reset() { mTotDist = 0.f; mEnable = false; mCurPoint = 0; @@ -63,13 +63,13 @@ void cWaypoints::Reset() { mCurPos = mPoints[0].p; } -void cWaypoints::ClearWaypoints() { +void Waypoints::ClearWaypoints() { Reset(); mPoints.clear(); } -void cWaypoints::AddWaypoint( const eeVector2f& Pos, const Float& Time ) { - mPoints.push_back( cWaypoint(Pos, Time) ); +void Waypoints::AddWaypoint( const Vector2f& Pos, const Float& Time ) { + mPoints.push_back( Waypoint(Pos, Time) ); if ( mPoints.size() >= 2 ) { @@ -77,14 +77,14 @@ void cWaypoints::AddWaypoint( const eeVector2f& Pos, const Float& Time ) { } } -bool cWaypoints::EditWaypoint( const unsigned int& PointNum, const eeVector2f& NewPos, const Float& NewTime ) { +bool Waypoints::EditWaypoint( const unsigned int& PointNum, const Vector2f& NewPos, const Float& NewTime ) { if ( PointNum < mPoints.size() ) { if ( 0 == PointNum ) mTotDist -= mPoints[ PointNum ].p.Distance( mPoints[ PointNum + 1 ].p ); else mTotDist -= mPoints[ PointNum ].p.Distance( mPoints[ PointNum - 1 ].p ); - mPoints[ PointNum ] = cWaypoint( NewPos, NewTime ); + mPoints[ PointNum ] = Waypoint( NewPos, NewTime ); if ( 0 == PointNum ) { if ( PointNum + (unsigned int)1 < mPoints.size() ) @@ -97,7 +97,7 @@ bool cWaypoints::EditWaypoint( const unsigned int& PointNum, const eeVector2f& N return false; } -bool cWaypoints::EraseWaypoint( const unsigned int& PointNum ) { +bool Waypoints::EraseWaypoint( const unsigned int& PointNum ) { if ( PointNum < mPoints.size() && !mEnable ) { if ( 0 == PointNum ) mTotDist -= mPoints[ PointNum ].p.Distance( mPoints[ PointNum + 1 ].p ); @@ -111,7 +111,7 @@ bool cWaypoints::EraseWaypoint( const unsigned int& PointNum ) { return false; } -void cWaypoints::Speed( const Float& Speed ) { +void Waypoints::Speed( const Float& Speed ) { Float tdist = mTotDist; mSpeed = Speed; Float CurDist; @@ -139,11 +139,11 @@ void cWaypoints::Speed( const Float& Speed ) { } } -const eeVector2f& cWaypoints::GetPos() { +const Vector2f& Waypoints::GetPos() { return mCurPos; } -void cWaypoints::Update( const Time& Elapsed ) { +void Waypoints::Update( const Time& Elapsed ) { if ( mEnable && mPoints.size() > 1 && mCurPoint != mPoints.size() ) { if ( mUpdate ) { mCurTime = 0; @@ -195,7 +195,7 @@ void cWaypoints::Update( const Time& Elapsed ) { } } -void cWaypoints::SetTotalTime( const Time& TotTime ) { +void Waypoints::SetTotalTime( const Time& TotTime ) { unsigned int i; Float tdist = mTotDist; @@ -216,51 +216,51 @@ void cWaypoints::SetTotalTime( const Time& TotTime ) { mPoints[i].t = mPoints[i].p.Distance( mPoints[i + 1].p ) * TotTime.AsMilliseconds() / tdist; } -void cWaypoints::Type( Ease::Interpolation InterpolationType ) { +void Waypoints::Type( Ease::Interpolation InterpolationType ) { mType = InterpolationType; } -const int& cWaypoints::Type() const { +const int& Waypoints::Type() const { return mType; } -bool cWaypoints::Loop() const { +bool Waypoints::Loop() const { return mLoop; } -void cWaypoints::Loop( const bool& loop ) { +void Waypoints::Loop( const bool& loop ) { mLoop = loop; } -bool cWaypoints::Ended() const { +bool Waypoints::Ended() const { return mEnded; } -cWaypoint * cWaypoints::GetCurrentActual() const { +Waypoint * Waypoints::GetCurrentActual() const { return mActP; } -cWaypoint * cWaypoints::GetCurrentNext() const { +Waypoint * Waypoints::GetCurrentNext() const { return mNexP; } -const Uint32& cWaypoints::GetCurrentPos() const { +const Uint32& Waypoints::GetCurrentPos() const { return mCurPoint; } -const std::vector& cWaypoints::GetWaypoints() const { +const std::vector& Waypoints::GetWaypoints() const { return mPoints; } -const Float& cWaypoints::Speed() const { +const Float& Waypoints::Speed() const { return mSpeed; } -const bool& cWaypoints::Enabled() const { +const bool& Waypoints::Enabled() const { return mEnable; } -void cWaypoints::Enabled( const bool& Enabled ) { +void Waypoints::Enabled( const bool& Enabled ) { mEnable = Enabled; } diff --git a/src/eepp/physics/cshape.cpp b/src/eepp/physics/cshape.cpp index ceb44c750..f4c9fe73a 100644 --- a/src/eepp/physics/cshape.cpp +++ b/src/eepp/physics/cshape.cpp @@ -171,10 +171,10 @@ void cShape::DrawBB() { cPrimitives P; 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 ) ) ); - P.DrawLine( eeLine2f( eeVector2f( mShape->bb.l, mShape->bb.b ), eeVector2f( mShape->bb.r, mShape->bb.b ) ) ); - P.DrawLine( eeLine2f( eeVector2f( mShape->bb.r, mShape->bb.t ), eeVector2f( mShape->bb.r, mShape->bb.b ) ) ); + P.DrawLine( Line2f( Vector2f( mShape->bb.l, mShape->bb.t ), Vector2f( mShape->bb.r, mShape->bb.t ) ) ); + P.DrawLine( Line2f( Vector2f( mShape->bb.l, mShape->bb.t ), Vector2f( mShape->bb.l, mShape->bb.b ) ) ); + P.DrawLine( Line2f( Vector2f( mShape->bb.l, mShape->bb.b ), Vector2f( mShape->bb.r, mShape->bb.b ) ) ); + P.DrawLine( Line2f( Vector2f( mShape->bb.r, mShape->bb.t ), Vector2f( mShape->bb.r, mShape->bb.b ) ) ); #endif } diff --git a/src/eepp/physics/cshapecircle.cpp b/src/eepp/physics/cshapecircle.cpp index 0a0483468..59c0708fc 100644 --- a/src/eepp/physics/cshapecircle.cpp +++ b/src/eepp/physics/cshapecircle.cpp @@ -43,7 +43,7 @@ void cShapeCircle::Draw( cSpace * space ) { cpCircleShape * cs = (cpCircleShape*)mShape; p.SetColor( ColorForShape( mShape, space->Space() ) ); - p.DrawCircle( eeVector2f( cs->CP_PRIVATE(tc).x, cs->CP_PRIVATE(tc).y ), cs->CP_PRIVATE(r) ); + p.DrawCircle( Vector2f( cs->CP_PRIVATE(tc).x, cs->CP_PRIVATE(tc).y ), cs->CP_PRIVATE(r) ); #endif } diff --git a/src/eepp/physics/cshapecirclesprite.cpp b/src/eepp/physics/cshapecirclesprite.cpp index 4154ea472..9e5f4bb51 100644 --- a/src/eepp/physics/cshapecirclesprite.cpp +++ b/src/eepp/physics/cshapecirclesprite.cpp @@ -32,8 +32,8 @@ void cShapeCircleSprite::Draw( cSpace * space ) { } void cShapeCircleSprite::OffsetSet() { - mSprite->Size( eeSizef( cShapeCircle::Radius() * 2, cShapeCircle::Radius() * 2 ) ); - mSprite->Offset( eeVector2i( -cShapeCircle::Radius() + cShapeCircle::Offset().x, -cShapeCircle::Radius() + cShapeCircle::Offset().y ) ); + mSprite->Size( Sizef( cShapeCircle::Radius() * 2, cShapeCircle::Radius() * 2 ) ); + mSprite->Offset( Vector2i( -cShapeCircle::Radius() + cShapeCircle::Offset().x, -cShapeCircle::Radius() + cShapeCircle::Offset().y ) ); } cSprite * cShapeCircleSprite::GetSprite() const { diff --git a/src/eepp/physics/cshapepolysprite.cpp b/src/eepp/physics/cshapepolysprite.cpp index 4346b4707..e14b0ab43 100644 --- a/src/eepp/physics/cshapepolysprite.cpp +++ b/src/eepp/physics/cshapepolysprite.cpp @@ -27,7 +27,7 @@ cShapePolySprite::cShapePolySprite( cBody * body, cpFloat width, cpFloat height, mSprite( Sprite ), mSpriteAutoDelete( AutoDeleteSprite ) { - mSprite->Size( eeSizef( width, height ) ); + mSprite->Size( Sizef( width, height ) ); OffsetSet( cVectNew( width / 2, height / 2 ) ); } @@ -48,7 +48,7 @@ void cShapePolySprite::Draw( cSpace * space ) { void cShapePolySprite::OffsetSet( cVect center ) { cVect myCenter = cVectNew( ( mSprite->Size().x / 2 ), ( mSprite->Size().y / 2 ) ); - mOffset = eeVector2i( (Int32)( -myCenter.x + ( center.x - myCenter.x ) ) , (Int32)( -myCenter.y + ( center.y - myCenter.y ) ) ); + mOffset = Vector2i( (Int32)( -myCenter.x + ( center.x - myCenter.x ) ) , (Int32)( -myCenter.y + ( center.y - myCenter.y ) ) ); } cSprite * cShapePolySprite::GetSprite() const { diff --git a/src/eepp/physics/cshapesegment.cpp b/src/eepp/physics/cshapesegment.cpp index ef529233f..3a09cd696 100644 --- a/src/eepp/physics/cshapesegment.cpp +++ b/src/eepp/physics/cshapesegment.cpp @@ -137,7 +137,7 @@ void cShapeSegment::Draw( cSpace * space ) { GLi->EnableClientState( GL_TEXTURE_COORD_ARRAY ); } else { cPrimitives p; - p.DrawLine( eeLine2f( eeVector2f( a.x, a.y ), eeVector2f( b.x, b.y ) ) ); + p.DrawLine( Line2f( Vector2f( a.x, a.y ), Vector2f( b.x, b.y ) ) ); } #endif } diff --git a/src/eepp/ui/cuicheckbox.cpp b/src/eepp/ui/cuicheckbox.cpp index 828fd9ecd..d23b9315c 100644 --- a/src/eepp/ui/cuicheckbox.cpp +++ b/src/eepp/ui/cuicheckbox.cpp @@ -12,8 +12,8 @@ cUICheckBox::cUICheckBox( const cUITextBox::CreateParams& Params ) : cUIControlAnim::CreateParams ButtonParams( Params ); ButtonParams.Parent( this ); - ButtonParams.PosSet( eeVector2i( 0, 0 ) ); - ButtonParams.Size = eeSize( 16, 16 ); + ButtonParams.PosSet( Vector2i( 0, 0 ) ); + ButtonParams.Size = Sizei( 16, 16 ); mActiveButton = eeNew( cUIControlAnim, ( ButtonParams ) ); mActiveButton->Visible( false ); @@ -23,7 +23,7 @@ cUICheckBox::cUICheckBox( const cUITextBox::CreateParams& Params ) : mInactiveButton->Visible( true ); mInactiveButton->Enabled( true ); - Padding( eeRecti(0,0,0,0) ); + Padding( Recti(0,0,0,0) ); ApplyDefaultTheme(); } @@ -72,7 +72,7 @@ void cUICheckBox::DoAfterSetTheme() { } } - Padding( eeRecti(0,0,0,0) ); + Padding( Recti(0,0,0,0) ); } void cUICheckBox::AutoSize() { @@ -139,7 +139,7 @@ const bool& cUICheckBox::IsActive() const { return Active(); } -void cUICheckBox::Padding( const eeRecti& padding ) { +void cUICheckBox::Padding( const Recti& padding ) { mPadding = padding; mPadding.Left = mPadding.Left + mActiveButton->Size().Width(); } diff --git a/src/eepp/ui/cuicombobox.cpp b/src/eepp/ui/cuicombobox.cpp index 4a02b8941..7fd110800 100644 --- a/src/eepp/ui/cuicombobox.cpp +++ b/src/eepp/ui/cuicombobox.cpp @@ -53,7 +53,7 @@ void cUIComboBox::CreateButton() { cUIControl::CreateParams Params; Params.Parent( this ), - Params.Size = eeSize( btnWidth, mSize.Height() ); + Params.Size = Sizei( btnWidth, mSize.Height() ); Params.PosSet( mSize.Width() - btnWidth, 0 ); mButton = eeNew( cUIControl, ( Params ) ); mButton->Visible( true ); @@ -79,7 +79,7 @@ void cUIComboBox::OnButtonExit( const cUIEvent * Event ) { SetSkinState( cUISkinState::StateMouseExit ); } -Uint32 cUIComboBox::OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIComboBox::OnMouseClick( const Vector2i& Pos, const Uint32 Flags ) { if ( Flags & EE_BUTTON_LMASK ) { cUITextInput::OnMouseClick( Pos, Flags ); diff --git a/src/eepp/ui/cuicommondialog.cpp b/src/eepp/ui/cuicommondialog.cpp index 027b8350b..5b70222d2 100644 --- a/src/eepp/ui/cuicommondialog.cpp +++ b/src/eepp/ui/cuicommondialog.cpp @@ -51,7 +51,7 @@ cUICommonDialog::cUICommonDialog( const cUICommonDialog::CreateParams& Params ) mButtonCancel->Visible( true ); mButtonCancel->Enabled( true ); mButtonCancel->Text( "Cancel" ); - mButtonCancel->Pos( eeVector2i( mButtonCancel->Pos().x, Container()->Size().Height() - mButtonCancel->Size().Height() - 2 ) ); + mButtonCancel->Pos( Vector2i( mButtonCancel->Pos().x, Container()->Size().Height() - mButtonCancel->Size().Height() - 2 ) ); mButtonCancel->UpdateAnchorsDistances(); ButtonParams.PosSet( mButtonCancel->Pos().x, mButtonCancel->Pos().y - mButtonCancel->Size().Height() ); @@ -86,7 +86,7 @@ cUICommonDialog::cUICommonDialog( const cUICommonDialog::CreateParams& Params ) cUIListBox::CreateParams LBParams; LBParams.Parent( Container() ); LBParams.PosSet( 6, mButtonUp->Pos().y + mButtonUp->Size().Height() + 4 ); - LBParams.Size = eeSize( Container()->Size().Width() - 12, + LBParams.Size = Sizei( Container()->Size().Width() - 12, Container()->Size().Height() - mButtonUp->Size().Height() - mButtonUp->Pos().y - diff --git a/src/eepp/ui/cuicomplexcontrol.cpp b/src/eepp/ui/cuicomplexcontrol.cpp index 3f02cf130..89fa869d9 100644 --- a/src/eepp/ui/cuicomplexcontrol.cpp +++ b/src/eepp/ui/cuicomplexcontrol.cpp @@ -29,14 +29,14 @@ bool cUIComplexControl::IsType( const Uint32& type ) const { void cUIComplexControl::UpdateAnchorsDistances() { if ( NULL != mParentCtrl ) { - mDistToBorder = eeRecti( mPos.x, mPos.y, mParentCtrl->Size().x - ( mPos.x + mSize.x ), mParentCtrl->Size().y - ( mPos.y + mSize.y ) ); + mDistToBorder = Recti( mPos.x, mPos.y, mParentCtrl->Size().x - ( mPos.x + mSize.x ), mParentCtrl->Size().y - ( mPos.y + mSize.y ) ); } } void cUIComplexControl::Update() { if ( mVisible && NULL != mTooltip && mTooltip->Text().size() ) { if ( IsMouseOverMeOrChilds() ) { - eeVector2i Pos = cUIManager::instance()->GetMousePos(); + Vector2i Pos = cUIManager::instance()->GetMousePos(); Pos.x += cUIThemeManager::instance()->CursorSize().x; Pos.y += cUIThemeManager::instance()->CursorSize().y; @@ -124,8 +124,8 @@ void cUIComplexControl::TooltipRemove() { mTooltip = NULL; } -void cUIComplexControl::Size( const eeSize &Size ) { - eeSize s( Size ); +void cUIComplexControl::Size( const Sizei &Size ) { + Sizei s( Size ); if ( s.x < mMinControlSize.x ) s.x = mMinControlSize.x; @@ -140,12 +140,12 @@ void cUIComplexControl::Size( const Int32& Width, const Int32& Height ) { cUIControlAnim::Size( Width, Height ); } -const eeSize& cUIComplexControl::Size() { +const Sizei& cUIComplexControl::Size() { return cUIControlAnim::Size(); } -void cUIComplexControl::OnParentSizeChange( const eeVector2i& SizeChange ) { - eeSize newSize( mSize ); +void cUIComplexControl::OnParentSizeChange( const Vector2i& SizeChange ) { + Sizei newSize( mSize ); if ( mFlags & UI_ANCHOR_LEFT ) { // Nothing ? diff --git a/src/eepp/ui/cuicontrol.cpp b/src/eepp/ui/cuicontrol.cpp index 58405f4f7..5d47e759a 100644 --- a/src/eepp/ui/cuicontrol.cpp +++ b/src/eepp/ui/cuicontrol.cpp @@ -62,14 +62,14 @@ cUIControl::~cUIControl() { } } -void cUIControl::ScreenToControl( eeVector2i& Pos ) const { +void cUIControl::ScreenToControl( Vector2i& Pos ) const { cUIControl * ParentLoop = mParentCtrl; Pos.x -= mPos.x; Pos.y -= mPos.y; while ( NULL != ParentLoop ) { - const eeVector2i& ParentPos = ParentLoop->Pos(); + const Vector2i& ParentPos = ParentLoop->Pos(); Pos.x -= ParentPos.x; Pos.y -= ParentPos.y; @@ -78,11 +78,11 @@ void cUIControl::ScreenToControl( eeVector2i& Pos ) const { } } -void cUIControl::ControlToScreen( eeVector2i& Pos ) const { +void cUIControl::ControlToScreen( Vector2i& Pos ) const { cUIControl * ParentLoop = mParentCtrl; while ( NULL != ParentLoop ) { - const eeVector2i& ParentPos = ParentLoop->Pos(); + const Vector2i& ParentPos = ParentLoop->Pos(); Pos.x += ParentPos.x; Pos.y += ParentPos.y; @@ -114,27 +114,27 @@ Uint32 cUIControl::OnMessage( const cUIMessage * Msg ) { return 0; } -bool cUIControl::IsInside( const eeVector2i& Pos ) const { +bool cUIControl::IsInside( const Vector2i& Pos ) const { return ( Pos.x >= 0 && Pos.y >= 0 && Pos.x < mSize.Width() && Pos.y < mSize.Height() ); } -void cUIControl::Pos( const eeVector2i& Pos ) { +void cUIControl::Pos( const Vector2i& Pos ) { mPos = Pos; OnPosChange(); } void cUIControl::Pos( const Int32& x, const Int32& y ) { - mPos = eeVector2i( x, y ); + mPos = Vector2i( x, y ); OnPosChange(); } -const eeVector2i& cUIControl::Pos() const { +const Vector2i& cUIControl::Pos() const { return mPos; } -void cUIControl::Size( const eeSize& Size ) { +void cUIControl::Size( const Sizei& Size ) { if ( Size != mSize ) { - eeVector2i sizeChange( Size.x - mSize.x, Size.y - mSize.y ); + Vector2i sizeChange( Size.x - mSize.x, Size.y - mSize.y ); mSize = Size; @@ -147,14 +147,14 @@ void cUIControl::Size( const eeSize& Size ) { } void cUIControl::Size( const Int32& Width, const Int32& Height ) { - Size( eeSize( Width, Height ) ); + Size( Sizei( Width, Height ) ); } -eeRecti cUIControl::Rect() const { - return eeRecti( mPos, mSize ); +Recti cUIControl::Rect() const { + return Recti( mPos, mSize ); } -const eeSize& cUIControl::Size() { +const Sizei& cUIControl::Size() { return mSize; } @@ -220,14 +220,14 @@ void cUIControl::CenterHorizontal() { cUIControl * Ctrl = Parent(); if ( NULL != Ctrl ) - Pos( eeVector2i( ( Ctrl->Size().Width() / 2 ) - ( mSize.Width() / 2 ), mPos.y ) ); + Pos( Vector2i( ( Ctrl->Size().Width() / 2 ) - ( mSize.Width() / 2 ), mPos.y ) ); } void cUIControl::CenterVertical(){ cUIControl * Ctrl = Parent(); if ( NULL != Ctrl ) - Pos( eeVector2i( mPos.x, ( Ctrl->Size().Height() / 2 ) - ( mSize.Height() / 2 ) ) ); + Pos( Vector2i( mPos.x, ( Ctrl->Size().Height() / 2 ) - ( mSize.Height() / 2 ) ) ); } void cUIControl::Center() { @@ -282,7 +282,7 @@ void cUIControl::Update() { WriteCtrlFlag( UI_CTRL_FLAG_MOUSEOVER_ME_OR_CHILD, 0 ); } -void cUIControl::SendMouseEvent( const Uint32& Event, const eeVector2i& Pos, const Uint32& Flags ) { +void cUIControl::SendMouseEvent( const Uint32& Event, const Vector2i& Pos, const Uint32& Flags ) { cUIEventMouse MouseEvent( this, Event, Pos, Flags ); SendEvent( &MouseEvent ); } @@ -302,12 +302,12 @@ Uint32 cUIControl::OnKeyUp( const cUIEventKey& Event ) { return 0; } -Uint32 cUIControl::OnMouseMove( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIControl::OnMouseMove( const Vector2i& Pos, const Uint32 Flags ) { SendMouseEvent( cUIEvent::EventMouseMove, Pos, Flags ); return 1; } -Uint32 cUIControl::OnMouseDown( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIControl::OnMouseDown( const Vector2i& Pos, const Uint32 Flags ) { SendMouseEvent( cUIEvent::EventMouseDown, Pos, Flags ); SetSkinState( cUISkinState::StateMouseDown ); @@ -315,7 +315,7 @@ Uint32 cUIControl::OnMouseDown( const eeVector2i& Pos, const Uint32 Flags ) { return 1; } -Uint32 cUIControl::OnMouseUp( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIControl::OnMouseUp( const Vector2i& Pos, const Uint32 Flags ) { SendMouseEvent( cUIEvent::EventMouseUp, Pos, Flags ); SetPrevSkinState(); @@ -323,7 +323,7 @@ Uint32 cUIControl::OnMouseUp( const eeVector2i& Pos, const Uint32 Flags ) { return 1; } -Uint32 cUIControl::OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIControl::OnMouseClick( const Vector2i& Pos, const Uint32 Flags ) { SendMouseEvent( cUIEvent::EventMouseClick, Pos, Flags ); return 1; } @@ -336,12 +336,12 @@ bool cUIControl::IsMouseOverMeOrChilds() { return 0 != ( mControlFlags & UI_CTRL_FLAG_MOUSEOVER_ME_OR_CHILD ); } -Uint32 cUIControl::OnMouseDoubleClick( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIControl::OnMouseDoubleClick( const Vector2i& Pos, const Uint32 Flags ) { SendMouseEvent( cUIEvent::EventMouseDoubleClick, Pos, Flags ); return 1; } -Uint32 cUIControl::OnMouseEnter( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIControl::OnMouseEnter( const Vector2i& Pos, const Uint32 Flags ) { WriteCtrlFlag( UI_CTRL_FLAG_MOUSEOVER, 1 ); SendMouseEvent( cUIEvent::EventMouseEnter, Pos, Flags ); @@ -351,7 +351,7 @@ Uint32 cUIControl::OnMouseEnter( const eeVector2i& Pos, const Uint32 Flags ) { return 1; } -Uint32 cUIControl::OnMouseExit( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIControl::OnMouseExit( const Vector2i& Pos, const Uint32 Flags ) { WriteCtrlFlag( UI_CTRL_FLAG_MOUSEOVER, 0 ); SendMouseEvent( cUIEvent::EventMouseExit, Pos, Flags ); @@ -517,13 +517,13 @@ void cUIControl::OnSizeChange() { SendCommonEvent( cUIEvent::EventOnSizeChange ); } -eeRectf cUIControl::GetRectf() { - return eeRectf( eeVector2f( (Float)mScreenPos.x, (Float)mScreenPos.y ), eeSizef( (Float)mSize.Width(), (Float)mSize.Height() ) ); +Rectf cUIControl::GetRectf() { + return Rectf( Vector2f( (Float)mScreenPos.x, (Float)mScreenPos.y ), Sizef( (Float)mSize.Width(), (Float)mSize.Height() ) ); } void cUIControl::BackgroundDraw() { cPrimitives P; - eeRectf R = GetRectf(); + Rectf R = GetRectf(); P.BlendMode( mBackground->Blend() ); P.SetColor( mBackground->Color() ); @@ -535,7 +535,7 @@ void cUIControl::BackgroundDraw() { } } else { if ( mBackground->Corners() ) { - P.DrawRoundedRectangle( R, 0.f, eeVector2f::One, mBackground->Corners() ); + P.DrawRoundedRectangle( R, 0.f, Vector2f::One, mBackground->Corners() ); } else { P.DrawRectangle( R ); } @@ -551,16 +551,16 @@ void cUIControl::BorderDraw() { //! @TODO: Check why was this +0.1f -0.1f? if ( mFlags & UI_CLIP_ENABLE ) { - eeRectf R( eeVector2f( (Float)mScreenPos.x + 0.1f, (Float)mScreenPos.y + 0.1f ), eeSizef( (Float)mSize.Width() - 0.1f, (Float)mSize.Height() - 0.1f ) ); + Rectf R( Vector2f( (Float)mScreenPos.x + 0.1f, (Float)mScreenPos.y + 0.1f ), Sizef( (Float)mSize.Width() - 0.1f, (Float)mSize.Height() - 0.1f ) ); if ( mBackground->Corners() ) { - P.DrawRoundedRectangle( GetRectf(), 0.f, eeVector2f::One, mBackground->Corners() ); + P.DrawRoundedRectangle( GetRectf(), 0.f, Vector2f::One, mBackground->Corners() ); } else { P.DrawRectangle( R ); } } else { if ( mBackground->Corners() ) { - P.DrawRoundedRectangle( GetRectf(), 0.f, eeVector2f::One, mBackground->Corners() ); + P.DrawRoundedRectangle( GetRectf(), 0.f, Vector2f::One, mBackground->Corners() ); } else { P.DrawRectangle( GetRectf() ); } @@ -794,7 +794,7 @@ cUIControl * cUIControl::ChildGetLast() const { return mChildLast; } -cUIControl * cUIControl::OverFind( const eeVector2f& Point ) { +cUIControl * cUIControl::OverFind( const Vector2f& Point ) { cUIControl * pOver = NULL; if ( mEnabled && mVisible ) { @@ -826,7 +826,7 @@ cUIControl * cUIControl::OverFind( const eeVector2f& Point ) { return pOver; } -cUIControl * cUIControl::ChildGetAt( eeVector2i CtrlPos, unsigned int RecursiveLevel ) { +cUIControl * cUIControl::ChildGetAt( Vector2i CtrlPos, unsigned int RecursiveLevel ) { cUIControl * Ctrl = NULL; for( cUIControl * pLoop = mChild; NULL != pLoop && NULL == Ctrl; pLoop = pLoop->mNext ) @@ -862,17 +862,17 @@ Uint32 cUIControl::IsClipped() { return mFlags & UI_CLIP_ENABLE; } -eePolygon2f& cUIControl::GetPolygon() { +Polygon2f& cUIControl::GetPolygon() { return mPoly; } -const eeVector2f& cUIControl::GetPolygonCenter() const { +const Vector2f& cUIControl::GetPolygonCenter() const { return mCenter; } void cUIControl::UpdateQuad() { - mPoly = eePolygon2f( eeAABB( (Float)mScreenPos.x, (Float)mScreenPos.y, (Float)mScreenPos.x + mSize.Width(), (Float)mScreenPos.y + mSize.Height() ) ); - mCenter = eeVector2f( (Float)mScreenPos.x + (Float)mSize.Width() * 0.5f, (Float)mScreenPos.y + (Float)mSize.Height() * 0.5f ); + mPoly = Polygon2f( eeAABB( (Float)mScreenPos.x, (Float)mScreenPos.y, (Float)mScreenPos.x + mSize.Width(), (Float)mScreenPos.y + mSize.Height() ) ); + mCenter = Vector2f( (Float)mScreenPos.x + (Float)mSize.Width() * 0.5f, (Float)mScreenPos.y + (Float)mSize.Height() * 0.5f ); cUIControl * tParent = Parent(); @@ -1026,7 +1026,7 @@ void cUIControl::UpdateChildsScreenPos() { } void cUIControl::UpdateScreenPos() { - eeVector2i Pos( mPos ); + Vector2i Pos( mPos ); ControlToScreen( Pos ); @@ -1057,12 +1057,12 @@ void cUIControl::ApplyDefaultTheme() { cUIThemeManager::instance()->ApplyDefaultTheme( this ); } -eeRecti cUIControl::GetScreenRect() { - return eeRecti( mScreenPos, mSize ); +Recti cUIControl::GetScreenRect() { + return Recti( mScreenPos, mSize ); } -eeRecti cUIControl::MakePadding( bool PadLeft, bool PadRight, bool PadTop, bool PadBottom, bool SkipFlags ) { - eeRecti tPadding( 0, 0, 0, 0 ); +Recti cUIControl::MakePadding( bool PadLeft, bool PadRight, bool PadTop, bool PadBottom, bool SkipFlags ) { + Recti tPadding( 0, 0, 0, 0 ); if ( mFlags & UI_AUTO_PADDING || SkipFlags ) { if ( NULL != mSkinState && NULL != mSkinState->GetSkin() ) { @@ -1109,7 +1109,7 @@ void cUIControl::SetFocus() { cUIManager::instance()->FocusControl( this ); } -void cUIControl::SendParentSizeChange( const eeVector2i& SizeChange ) { +void cUIControl::SendParentSizeChange( const Vector2i& SizeChange ) { if ( mFlags & UI_REPORT_SIZE_CHANGE_TO_CHILDS ) { cUIControl * ChildLoop = mChild; @@ -1120,12 +1120,12 @@ void cUIControl::SendParentSizeChange( const eeVector2i& SizeChange ) { } } -void cUIControl::OnParentSizeChange( const eeVector2i& SizeChange ) { +void cUIControl::OnParentSizeChange( const Vector2i& SizeChange ) { SendCommonEvent( cUIEvent::EventOnParentSizeChange ); } -eeSize cUIControl::GetSkinSize( cUISkin * Skin, const Uint32& State ) { - eeSize tSize; +Sizei cUIControl::GetSkinSize( cUISkin * Skin, const Uint32& State ) { + Sizei tSize; if ( NULL != Skin ) { cSubTexture * tSubTexture = Skin->GetSubTexture( State ); @@ -1166,7 +1166,7 @@ eeSize cUIControl::GetSkinSize( cUISkin * Skin, const Uint32& State ) { return tSize; } -eeSize cUIControl::GetSkinSize() { +Sizei cUIControl::GetSkinSize() { return GetSkinSize( GetSkin(), cUISkinState::StateNormal ); } @@ -1218,8 +1218,8 @@ cUIControl * cUIControl::NextComplexControl() { void cUIControl::DoAfterSetTheme() { } -void cUIControl::WorldToControl( eeVector2i& pos ) const { - eeVector2f Pos( pos.x, pos.y ); +void cUIControl::WorldToControl( Vector2i& pos ) const { + Vector2f Pos( pos.x, pos.y ); std::list parents; @@ -1232,13 +1232,13 @@ void cUIControl::WorldToControl( eeVector2i& pos ) const { parents.push_back( const_cast( reinterpret_cast( this ) ) ); - eeVector2f scale(1,1); + Vector2f scale(1,1); for ( std::list::iterator it = parents.begin(); it != parents.end(); it++ ) { cUIControl * tParent = (*it); cUIControlAnim * tP = tParent->IsAnimated() ? reinterpret_cast ( tParent ) : NULL; - eeVector2f pPos ( tParent->mPos.x * scale.x , tParent->mPos.y * scale.y ); - eeVector2f Center ( tParent->mSize.x * 0.5f * scale.x , tParent->mSize.y * 0.5f * scale.y ); + Vector2f pPos ( tParent->mPos.x * scale.x , tParent->mPos.y * scale.y ); + Vector2f Center ( tParent->mSize.x * 0.5f * scale.x , tParent->mSize.y * 0.5f * scale.y ); if ( NULL != tP && 1.f != tP->Scale() ) { scale *= tP->Scale(); @@ -1249,16 +1249,16 @@ void cUIControl::WorldToControl( eeVector2i& pos ) const { Pos -= pPos; if ( NULL != tP && 0.f != tP->Angle() ) { - Center = eeVector2f( tParent->mSize.x * 0.5f * scale.x , tParent->mSize.y * 0.5f * scale.y ); + Center = Vector2f( tParent->mSize.x * 0.5f * scale.x , tParent->mSize.y * 0.5f * scale.y ); Pos.Rotate( -tP->Angle(), Center ); } } - pos = eeVector2i( Pos.x / scale.x, Pos.y / scale.y ); + pos = Vector2i( Pos.x / scale.x, Pos.y / scale.y ); } -void cUIControl::ControlToWorld( eeVector2i& pos ) const { - eeVector2f Pos( pos.x, pos.y ); +void cUIControl::ControlToWorld( Vector2i& pos ) const { + Vector2f Pos( pos.x, pos.y ); std::list parents; @@ -1274,8 +1274,8 @@ void cUIControl::ControlToWorld( eeVector2i& pos ) const { for ( std::list::iterator it = parents.begin(); it != parents.end(); it++ ) { cUIControl * tParent = (*it); cUIControlAnim * tP = tParent->IsAnimated() ? reinterpret_cast ( tParent ) : NULL; - eeVector2f pPos ( tParent->mPos.x , tParent->mPos.y ); - eeVector2f Center ( pPos.x + tParent->mSize.x * 0.5f , pPos.y + tParent->mSize.y * 0.5f ); + Vector2f pPos ( tParent->mPos.x , tParent->mPos.y ); + Vector2f Center ( pPos.x + tParent->mSize.x * 0.5f , pPos.y + tParent->mSize.y * 0.5f ); Pos += pPos; @@ -1285,7 +1285,7 @@ void cUIControl::ControlToWorld( eeVector2i& pos ) const { } } - pos = eeVector2i( eeceil( Pos.x ), eeceil( Pos.y ) ); + pos = Vector2i( eeceil( Pos.x ), eeceil( Pos.y ) ); } }} diff --git a/src/eepp/ui/cuicontrolanim.cpp b/src/eepp/ui/cuicontrolanim.cpp index c536de34a..db5435bba 100644 --- a/src/eepp/ui/cuicontrolanim.cpp +++ b/src/eepp/ui/cuicontrolanim.cpp @@ -72,17 +72,17 @@ void cUIControlAnim::Angle( const Float& angle ) { OnAngleChange(); } -const eeVector2f& cUIControlAnim::Scale() const { +const Vector2f& cUIControlAnim::Scale() const { return mScale; } -void cUIControlAnim::Scale( const eeVector2f& scale ) { +void cUIControlAnim::Scale( const Vector2f& scale ) { mScale = scale; OnScaleChange(); } void cUIControlAnim::Scale( const Float& scale ) { - Scale( eeVector2f( scale, scale ) ); + Scale( Vector2f( scale, scale ) ); } const Float& cUIControlAnim::Alpha() const { @@ -114,7 +114,7 @@ void cUIControlAnim::MatrixSet() { if ( mScale != 1.f || mAngle != 0.f ) { cGlobalBatchRenderer::instance()->Draw(); GLi->PushMatrix(); - eeVector2f Center( mScreenPos.x + mSize.Width() * 0.5f, mScreenPos.y + mSize.Height() * 0.5f ); + Vector2f Center( mScreenPos.x + mSize.Width() * 0.5f, mScreenPos.y + mSize.Height() * 0.5f ); GLi->Translatef( Center.x , Center.y, 0.f ); GLi->Rotatef( mAngle, 0.0f, 0.0f, 1.0f ); GLi->Scalef( mScale.x, mScale.y, 1.0f ); @@ -183,9 +183,9 @@ bool cUIControlAnim::Animating() { return ( NULL != mAlphaAnim && mAlphaAnim->Enabled() ) || ( NULL != mAngleAnim && mAngleAnim->Enabled() ) || ( NULL != mScaleAnim && mScaleAnim->Enabled() ) || ( NULL != mMoveAnim && mMoveAnim->Enabled() ); } -void cUIControlAnim::StartAlphaAnim( const Float& From, const Float& To, const Time& TotalTime, const bool& AlphaChilds, const Ease::Interpolation& Type, cInterpolation::OnPathEndCallback PathEndCallback ) { +void cUIControlAnim::StartAlphaAnim( const Float& From, const Float& To, const Time& TotalTime, const bool& AlphaChilds, const Ease::Interpolation& Type, Interpolation::OnPathEndCallback PathEndCallback ) { if ( NULL == mAlphaAnim ) - mAlphaAnim = eeNew( cInterpolation, () ); + mAlphaAnim = eeNew( Interpolation, () ); mAlphaAnim->ClearWaypoints(); mAlphaAnim->AddWaypoint( From ); @@ -212,9 +212,9 @@ void cUIControlAnim::StartAlphaAnim( const Float& From, const Float& To, const T } } -void cUIControlAnim::StartScaleAnim( const eeVector2f& From, const eeVector2f& To, const Time& TotalTime, const Ease::Interpolation& Type, cInterpolation::OnPathEndCallback PathEndCallback ) { +void cUIControlAnim::StartScaleAnim( const Vector2f& From, const Vector2f& To, const Time& TotalTime, const Ease::Interpolation& Type, Interpolation::OnPathEndCallback PathEndCallback ) { if ( NULL == mScaleAnim ) - mScaleAnim = eeNew( cWaypoints, () ); + mScaleAnim = eeNew( Waypoints, () ); mScaleAnim->ClearWaypoints(); mScaleAnim->AddWaypoint( From ); @@ -226,17 +226,17 @@ void cUIControlAnim::StartScaleAnim( const eeVector2f& From, const eeVector2f& T Scale( From ); } -void cUIControlAnim::StartScaleAnim( const Float& From, const Float& To, const Time& TotalTime, const Ease::Interpolation& Type, cInterpolation::OnPathEndCallback PathEndCallback ) { - StartScaleAnim( eeVector2f( From, From ), eeVector2f( To, To ), TotalTime, Type, PathEndCallback ); +void cUIControlAnim::StartScaleAnim( const Float& From, const Float& To, const Time& TotalTime, const Ease::Interpolation& Type, Interpolation::OnPathEndCallback PathEndCallback ) { + StartScaleAnim( Vector2f( From, From ), Vector2f( To, To ), TotalTime, Type, PathEndCallback ); } -void cUIControlAnim::StartMovement( const eeVector2i& From, const eeVector2i& To, const Time& TotalTime, const Ease::Interpolation& Type, cWaypoints::OnPathEndCallback PathEndCallback ) { +void cUIControlAnim::StartMovement( const Vector2i& From, const Vector2i& To, const Time& TotalTime, const Ease::Interpolation& Type, Waypoints::OnPathEndCallback PathEndCallback ) { if ( NULL == mMoveAnim ) - mMoveAnim = eeNew( cWaypoints, () ); + mMoveAnim = eeNew( Waypoints, () ); mMoveAnim->ClearWaypoints(); - mMoveAnim->AddWaypoint( eeVector2f( (Float)From.x, (Float)From.y ) ); - mMoveAnim->AddWaypoint( eeVector2f( (Float)To.x, (Float)To.y ) ); + mMoveAnim->AddWaypoint( Vector2f( (Float)From.x, (Float)From.y ) ); + mMoveAnim->AddWaypoint( Vector2f( (Float)To.x, (Float)To.y ) ); mMoveAnim->SetTotalTime( TotalTime ); mMoveAnim->Start( PathEndCallback ); mMoveAnim->Type( Type ); @@ -244,9 +244,9 @@ void cUIControlAnim::StartMovement( const eeVector2i& From, const eeVector2i& To Pos( From ); } -void cUIControlAnim::StartRotation( const Float& From, const Float& To, const Time& TotalTime, const Ease::Interpolation& Type, cInterpolation::OnPathEndCallback PathEndCallback ) { +void cUIControlAnim::StartRotation( const Float& From, const Float& To, const Time& TotalTime, const Ease::Interpolation& Type, Interpolation::OnPathEndCallback PathEndCallback ) { if ( NULL == mAngleAnim ) - mAngleAnim = eeNew( cInterpolation, () ); + mAngleAnim = eeNew( Interpolation, () ); mAngleAnim->ClearWaypoints(); mAngleAnim->AddWaypoint( From ); @@ -281,7 +281,7 @@ void cUIControlAnim::DisableFadeOut( const Time& Time, const bool& AlphaChilds, void cUIControlAnim::BackgroundDraw() { cPrimitives P; - eeRectf R = GetRectf(); + Rectf R = GetRectf(); P.BlendMode( mBackground->Blend() ); P.SetColor( GetColor( mBackground->Color() ) ); @@ -293,7 +293,7 @@ void cUIControlAnim::BackgroundDraw() { } } else { if ( mBackground->Corners() ) { - P.DrawRoundedRectangle( R, 0.f, eeVector2f::One, mBackground->Corners() ); + P.DrawRoundedRectangle( R, 0.f, Vector2f::One, mBackground->Corners() ); } else { P.DrawRectangle( R ); } @@ -309,16 +309,16 @@ void cUIControlAnim::BorderDraw() { //! @TODO: Check why was this +0.1f -0.1f? if ( mFlags & UI_CLIP_ENABLE ) { - eeRectf R( eeVector2f( (Float)mScreenPos.x + 0.1f, (Float)mScreenPos.y + 0.1f ), eeSizef( (Float)mSize.Width() - 0.1f, (Float)mSize.Height() - 0.1f ) ); + Rectf R( Vector2f( (Float)mScreenPos.x + 0.1f, (Float)mScreenPos.y + 0.1f ), Sizef( (Float)mSize.Width() - 0.1f, (Float)mSize.Height() - 0.1f ) ); if ( mBackground->Corners() ) { - P.DrawRoundedRectangle( GetRectf(), 0.f, eeVector2f::One, mBackground->Corners() ); + P.DrawRoundedRectangle( GetRectf(), 0.f, Vector2f::One, mBackground->Corners() ); } else { P.DrawRectangle( R ); } } else { if ( mBackground->Corners() ) { - P.DrawRoundedRectangle( GetRectf(), 0.f, eeVector2f::One, mBackground->Corners() ); + P.DrawRoundedRectangle( GetRectf(), 0.f, Vector2f::One, mBackground->Corners() ); } else { P.DrawRectangle( GetRectf() ); } @@ -330,8 +330,8 @@ ColorA cUIControlAnim::GetColor( const ColorA& Col ) { } void cUIControlAnim::UpdateQuad() { - mPoly = eePolygon2f( eeAABB( (Float)mScreenPos.x, (Float)mScreenPos.y, (Float)mScreenPos.x + mSize.Width(), (Float)mScreenPos.y + mSize.Height() ) ); - mCenter = eeVector2f( (Float)mScreenPos.x + (Float)mSize.Width() * 0.5f, (Float)mScreenPos.y + (Float)mSize.Height() * 0.5f ); + mPoly = Polygon2f( eeAABB( (Float)mScreenPos.x, (Float)mScreenPos.y, (Float)mScreenPos.x + mSize.Width(), (Float)mScreenPos.y + mSize.Height() ) ); + mCenter = Vector2f( (Float)mScreenPos.x + (Float)mSize.Width() * 0.5f, (Float)mScreenPos.y + (Float)mSize.Height() * 0.5f ); mPoly.Rotate( mAngle, mCenter ); mPoly.Scale( mScale, mCenter ); @@ -350,30 +350,30 @@ void cUIControlAnim::UpdateQuad() { }; } -cInterpolation * cUIControlAnim::RotationInterpolation() { +Interpolation * cUIControlAnim::RotationInterpolation() { if ( NULL == mAngleAnim ) - mAngleAnim = eeNew( cInterpolation, () ); + mAngleAnim = eeNew( Interpolation, () ); return mAngleAnim; } -cWaypoints * cUIControlAnim::ScaleInterpolation() { +Waypoints * cUIControlAnim::ScaleInterpolation() { if ( NULL == mScaleAnim ) - mScaleAnim = eeNew( cWaypoints, () ); + mScaleAnim = eeNew( Waypoints, () ); return mScaleAnim; } -cInterpolation * cUIControlAnim::AlphaInterpolation() { +Interpolation * cUIControlAnim::AlphaInterpolation() { if ( NULL == mAlphaAnim ) - mAlphaAnim = eeNew( cInterpolation, () ); + mAlphaAnim = eeNew( Interpolation, () ); return mAlphaAnim; } -cWaypoints * cUIControlAnim::MovementInterpolation() { +Waypoints * cUIControlAnim::MovementInterpolation() { if ( NULL == mMoveAnim ) - mMoveAnim = eeNew( cWaypoints, () ); + mMoveAnim = eeNew( Waypoints, () ); return mMoveAnim; } diff --git a/src/eepp/ui/cuidefaulttheme.cpp b/src/eepp/ui/cuidefaulttheme.cpp index fb53bdf7f..a8335b2f2 100644 --- a/src/eepp/ui/cuidefaulttheme.cpp +++ b/src/eepp/ui/cuidefaulttheme.cpp @@ -18,7 +18,7 @@ cUIDefaultTheme::cUIDefaultTheme( const std::string& Name, const std::string& Ab 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 ) { +cUIPopUpMenu * cUIDefaultTheme::CreatePopUpMenu( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 RowHeight, Recti PaddingContainer, Uint32 MinWidth, Uint32 MinSpaceForIcons, Uint32 MinRightMargin ) { cUIPopUpMenu::CreateParams MenuParams; MenuParams.Parent( Parent ); MenuParams.PosSet( Pos ); @@ -40,7 +40,7 @@ cUIPopUpMenu * cUIDefaultTheme::CreatePopUpMenu( cUIControl * Parent, const eeSi return eeNew( cUIPopUpMenu, ( MenuParams ) ); } -cUIProgressBar * cUIDefaultTheme::CreateProgressBar( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, bool DisplayPercent, bool VerticalExpand, eeVector2f MovementSpeed, eeRectf FillerMargin ) { +cUIProgressBar * cUIDefaultTheme::CreateProgressBar( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, bool DisplayPercent, bool VerticalExpand, Vector2f MovementSpeed, Rectf FillerMargin ) { cUIProgressBar::CreateParams PBParams; PBParams.Parent( Parent ); PBParams.PosSet( Pos ); @@ -55,8 +55,8 @@ cUIProgressBar * cUIDefaultTheme::CreateProgressBar( cUIControl * Parent, const PBParams.Flags |= UI_AUTO_SIZE; PBParams.DisplayPercent = true; PBParams.VerticalExpand = true; - PBParams.FillerMargin = eeRectf( 2, 2, 2, 2 ); - PBParams.MovementSpeed = eeVector2f( 32, 0 ); + PBParams.FillerMargin = Rectf( 2, 2, 2, 2 ); + PBParams.MovementSpeed = Vector2f( 32, 0 ); } cUIProgressBar * Ctrl = eeNew( cUIProgressBar, ( PBParams ) ); @@ -65,7 +65,7 @@ cUIProgressBar * cUIDefaultTheme::CreateProgressBar( cUIControl * Parent, const return Ctrl; } -cUIWinMenu * cUIDefaultTheme::CreateWinMenu( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Uint32 MarginBetweenButtons, Uint32 ButtonMargin, Uint32 MenuHeight, Uint32 FirstButtonMargin ) { +cUIWinMenu * cUIDefaultTheme::CreateWinMenu( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 MarginBetweenButtons, Uint32 ButtonMargin, Uint32 MenuHeight, Uint32 FirstButtonMargin ) { cUIWinMenu::CreateParams WinMenuParams; WinMenuParams.Parent( Parent ); WinMenuParams.PosSet( Pos ); @@ -86,7 +86,7 @@ cUIWinMenu * cUIDefaultTheme::CreateWinMenu( cUIControl * Parent, const eeSize& return Ctrl; } -cUIWindow * cUIDefaultTheme::CreateWindow( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Uint32 WinFlags, eeSize MinWindowSize, Uint8 BaseAlpha ) { +cUIWindow * cUIDefaultTheme::CreateWindow( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 WinFlags, Sizei MinWindowSize, Uint8 BaseAlpha ) { cUIWindow::CreateParams WinParams; WinParams.Parent( Parent ); WinParams.PosSet( Pos ); @@ -106,7 +106,7 @@ cUIWindow * cUIDefaultTheme::CreateWindow( cUIControl * Parent, const eeSize& Si return eeNew( cUIWindow, ( WinParams ) ); } -cUICommonDialog * cUIDefaultTheme::CreateCommonDialog( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Uint32 WinFlags, eeSize MinWindowSize, Uint8 BaseAlpha, Uint32 CDLFlags, std::string DefaultFilePattern, std::string DefaultDirectory ) { +cUICommonDialog * cUIDefaultTheme::CreateCommonDialog( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 WinFlags, Sizei MinWindowSize, Uint8 BaseAlpha, Uint32 CDLFlags, std::string DefaultFilePattern, std::string DefaultDirectory ) { cUICommonDialog::CreateParams DLGParams; DLGParams.Parent( Parent ); DLGParams.PosSet( Pos ); @@ -129,7 +129,7 @@ cUICommonDialog * cUIDefaultTheme::CreateCommonDialog( cUIControl * Parent, cons return eeNew( cUICommonDialog, ( DLGParams ) ); } -cUIMessageBox * cUIDefaultTheme::CreateMessageBox( UI_MSGBOX_TYPE Type, const String& Message, Uint32 WinFlags, cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, eeSize MinWindowSize, Uint8 BaseAlpha ) { +cUIMessageBox * cUIDefaultTheme::CreateMessageBox( UI_MSGBOX_TYPE Type, const String& Message, Uint32 WinFlags, cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Sizei MinWindowSize, Uint8 BaseAlpha ) { cUIMessageBox::CreateParams MsgBoxParams; MsgBoxParams.Parent( Parent ); MsgBoxParams.PosSet( Pos ); @@ -151,7 +151,7 @@ cUIMessageBox * cUIDefaultTheme::CreateMessageBox( UI_MSGBOX_TYPE Type, const St return eeNew( cUIMessageBox, ( MsgBoxParams ) ); } -cUIComboBox * cUIDefaultTheme::CreateComboBox( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Uint32 MinNumVisibleItems, bool PopUpToMainControl, cUIListBox * ListBox ) { +cUIComboBox * cUIDefaultTheme::CreateComboBox( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 MinNumVisibleItems, bool PopUpToMainControl, cUIListBox * ListBox ) { cUIComboBox::CreateParams ComboParams; ComboParams.Parent( Parent ); ComboParams.PosSet( Pos ); @@ -171,7 +171,7 @@ cUIComboBox * cUIDefaultTheme::CreateComboBox( cUIControl * Parent, const eeSize return Ctrl; } -cUIDropDownList * cUIDefaultTheme::CreateDropDownList( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Uint32 MinNumVisibleItems, bool PopUpToMainControl, cUIListBox * ListBox ) { +cUIDropDownList * cUIDefaultTheme::CreateDropDownList( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 MinNumVisibleItems, bool PopUpToMainControl, cUIListBox * ListBox ) { cUIDropDownList::CreateParams DDLParams; DDLParams.Parent( Parent ); DDLParams.PosSet( Pos ); @@ -191,7 +191,7 @@ cUIDropDownList * cUIDefaultTheme::CreateDropDownList( cUIControl * Parent, cons return Ctrl; } -cUITabWidget * cUIDefaultTheme::CreateTabWidget( cUIControl *Parent, const eeSize &Size, const eeVector2i &Pos, const Uint32 &Flags, const bool &TabsClosable, const bool &SpecialBorderTabs, const Int32 &TabSeparation, const Uint32 &MaxTextLength, const Uint32 &TabWidgetHeight, const Uint32 &TabTextAlign, const Uint32 &MinTabWidth, const Uint32 &MaxTabWidth ) { +cUITabWidget * cUIDefaultTheme::CreateTabWidget( cUIControl *Parent, const Sizei &Size, const Vector2i &Pos, const Uint32 &Flags, const bool &TabsClosable, const bool &SpecialBorderTabs, const Int32 &TabSeparation, const Uint32 &MaxTextLength, const Uint32 &TabWidgetHeight, const Uint32 &TabTextAlign, const Uint32 &MinTabWidth, const Uint32 &MaxTabWidth ) { cUITabWidget::CreateParams TabWidgetParams; TabWidgetParams.Parent( Parent ); TabWidgetParams.PosSet( Pos ); @@ -220,7 +220,7 @@ cUITabWidget * cUIDefaultTheme::CreateTabWidget( cUIControl *Parent, const eeSiz return Ctrl; } -cUITooltip * cUIDefaultTheme::CreateTooltip( cUIControl * TooltipOf, cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags ) { +cUITooltip * cUIDefaultTheme::CreateTooltip( cUIControl * TooltipOf, cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags ) { cUITooltip::CreateParams TooltipParams; TooltipParams.Parent( Parent ); TooltipParams.PosSet( Pos ); @@ -230,7 +230,7 @@ cUITooltip * cUIDefaultTheme::CreateTooltip( cUIControl * TooltipOf, cUIControl if ( UseDefaultThemeValues() ) { TooltipParams.Flags &= ~UI_AUTO_PADDING; TooltipParams.FontColor = ColorA( 0, 0, 0, 255 ); - TooltipParams.Padding = eeRecti( 4, 6, 4, 6 ); + TooltipParams.Padding = Recti( 4, 6, 4, 6 ); } cUITooltip * Ctrl = eeNew( cUITooltip, ( TooltipParams, TooltipOf ) ); diff --git a/src/eepp/ui/cuidragable.cpp b/src/eepp/ui/cuidragable.cpp index 124d0c2c0..a6a787303 100644 --- a/src/eepp/ui/cuidragable.cpp +++ b/src/eepp/ui/cuidragable.cpp @@ -22,7 +22,7 @@ bool cUIDragable::IsType( const Uint32& type ) const { return cUIDragable::Type() == type ? true : cUIControl::IsType( type ); } -Uint32 cUIDragable::OnMouseDown( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIDragable::OnMouseDown( const Vector2i& Pos, const Uint32 Flags ) { if ( !( cUIManager::instance()->LastPressTrigger() & mDragButton ) && ( Flags & mDragButton ) && DragEnable() && !Dragging() ) { Dragging( true ); mDragPoint = Pos; @@ -32,7 +32,7 @@ Uint32 cUIDragable::OnMouseDown( const eeVector2i& Pos, const Uint32 Flags ) { return 1; } -Uint32 cUIDragable::OnMouseUp( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIDragable::OnMouseUp( const Vector2i& Pos, const Uint32 Flags ) { if ( DragEnable() && Dragging() && ( Flags & mDragButton ) ) { Dragging( false ); } @@ -41,11 +41,11 @@ Uint32 cUIDragable::OnMouseUp( const eeVector2i& Pos, const Uint32 Flags ) { return 1; } -const eeVector2i& cUIDragable::DragPoint() const { +const Vector2i& cUIDragable::DragPoint() const { return mDragPoint; } -void cUIDragable::DragPoint( const eeVector2i& Point ) { +void cUIDragable::DragPoint( const Vector2i& Point ) { mDragPoint = Point; } @@ -62,7 +62,7 @@ void cUIDragable::Update() { return; } - eeVector2i Pos( cUIManager::instance()->GetMousePos() ); + Vector2i Pos( cUIManager::instance()->GetMousePos() ); if ( mDragPoint != Pos ) { if ( OnDrag( Pos ) ) { @@ -78,15 +78,15 @@ void cUIDragable::Update() { } } -Uint32 cUIDragable::OnDrag( const eeVector2i& Pos ) { +Uint32 cUIDragable::OnDrag( const Vector2i& Pos ) { return 1; } -Uint32 cUIDragable::OnDragStart( const eeVector2i& Pos ) { +Uint32 cUIDragable::OnDragStart( const Vector2i& Pos ) { return 1; } -Uint32 cUIDragable::OnDragEnd( const eeVector2i& Pos ) { +Uint32 cUIDragable::OnDragEnd( const Vector2i& Pos ) { return 1; } diff --git a/src/eepp/ui/cuidropdownlist.cpp b/src/eepp/ui/cuidropdownlist.cpp index b3ac75ec7..71366db5e 100644 --- a/src/eepp/ui/cuidropdownlist.cpp +++ b/src/eepp/ui/cuidropdownlist.cpp @@ -25,10 +25,10 @@ cUIDropDownList::cUIDropDownList( cUIDropDownList::CreateParams& Params ) : cUITheme * Theme = cUIThemeManager::instance()->DefaultTheme(); if ( NULL != Theme ) { - mListBox = Theme->CreateListBox( NULL, eeSize( mSize.Width(), mMinNumVisibleItems * mSize.Height() ),eeVector2i(), flags ); + mListBox = Theme->CreateListBox( NULL, Sizei( mSize.Width(), mMinNumVisibleItems * mSize.Height() ),Vector2i(), flags ); } else { cUIListBox::CreateParams LBParams; - LBParams.Size = eeSize( mSize.Width(), mMinNumVisibleItems * mSize.Height() ); + LBParams.Size = Sizei( mSize.Width(), mMinNumVisibleItems * mSize.Height() ); LBParams.Flags = flags; LBParams.FontSelectedColor = ColorA( 255, 255, 255, 255 ); mListBox = eeNew( cUIListBox, ( LBParams ) ); @@ -85,7 +85,7 @@ cUIListBox * cUIDropDownList::ListBox() const { return mListBox; } -Uint32 cUIDropDownList::OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIDropDownList::OnMouseClick( const Vector2i& Pos, const Uint32 Flags ) { if ( Flags & EE_BUTTON_LMASK ) ShowListBox(); @@ -101,7 +101,7 @@ void cUIDropDownList::ShowListBox() { mListBox->ToFront(); - eeVector2i Pos( mPos.x, mPos.y + mSize.Height() ); + Vector2i Pos( mPos.x, mPos.y + mSize.Height() ); if ( mPopUpToMainControl ) { Parent()->ControlToWorld( Pos ); @@ -110,7 +110,7 @@ void cUIDropDownList::ShowListBox() { mListBox->Pos( Pos ); if ( mListBox->Count() ) { - eeRecti tPadding = mListBox->PaddingContainer(); + Recti tPadding = mListBox->PaddingContainer(); Float sliderValue = mListBox->VerticalScrollBar()->Value(); @@ -122,11 +122,11 @@ void cUIDropDownList::ShowListBox() { mListBox->UpdateQuad(); - eeRectf aabb( mListBox->GetPolygon().ToAABB() ); - eeRecti aabbi( aabb.Left, aabb.Top, aabb.Right, aabb.Bottom ); + Rectf aabb( mListBox->GetPolygon().ToAABB() ); + Recti aabbi( aabb.Left, aabb.Top, aabb.Right, aabb.Bottom ); if ( !cUIManager::instance()->MainControl()->GetScreenRect().Contains( aabbi ) ) { - Pos = eeVector2i( mPos.x, mPos.y ); + Pos = Vector2i( mPos.x, mPos.y ); if ( mPopUpToMainControl ) { Parent()->ControlToWorld( Pos ); diff --git a/src/eepp/ui/cuieventmouse.cpp b/src/eepp/ui/cuieventmouse.cpp index 7a3bc9448..f28d18fb0 100644 --- a/src/eepp/ui/cuieventmouse.cpp +++ b/src/eepp/ui/cuieventmouse.cpp @@ -3,7 +3,7 @@ namespace EE { namespace UI { -cUIEventMouse::cUIEventMouse( cUIControl * Ctrl, const Uint32& EventNum, const eeVector2i& Pos, const Uint32& Flags ) : +cUIEventMouse::cUIEventMouse( cUIControl * Ctrl, const Uint32& EventNum, const Vector2i& Pos, const Uint32& Flags ) : cUIEvent( Ctrl, EventNum ), mPos( Pos ), mFlags( Flags ) @@ -14,7 +14,7 @@ cUIEventMouse::~cUIEventMouse() { } -const eeVector2i& cUIEventMouse::Pos() const { +const Vector2i& cUIEventMouse::Pos() const { return mPos; } diff --git a/src/eepp/ui/cuigenericgrid.cpp b/src/eepp/ui/cuigenericgrid.cpp index 7fe907ce7..b8cde46aa 100644 --- a/src/eepp/ui/cuigenericgrid.cpp +++ b/src/eepp/ui/cuigenericgrid.cpp @@ -31,7 +31,7 @@ cUIGenericGrid::cUIGenericGrid( const cUIGenericGrid::CreateParams& Params ) : cUIComplexControl::CreateParams CParams; CParams.Parent( this ); CParams.PosSet( mPadding.Left, mPadding.Top ); - CParams.Size = eeSize( mSize.Width() - mPadding.Right - mPadding.Left, mSize.Height() - mPadding.Top - mPadding.Bottom ); + CParams.Size = Sizei( mSize.Width() - mPadding.Right - mPadding.Left, mSize.Height() - mPadding.Top - mPadding.Bottom ); CParams.Flags = Params.Flags; mContainer = eeNew( tUIItemContainer , ( CParams ) ); mContainer->Visible( true ); @@ -45,11 +45,11 @@ cUIGenericGrid::cUIGenericGrid( const cUIGenericGrid::CreateParams& Params ) : ScrollBarP.PosSet ( mSize.Width() - 15, 0 ); ScrollBarP.Flags = UI_AUTO_SIZE; ScrollBarP.VerticalScrollBar = true; - ScrollBarP.Size = eeSize( 15, mSize.Height() ); + ScrollBarP.Size = Sizei( 15, mSize.Height() ); mVScrollBar = eeNew( cUIScrollBar, ( ScrollBarP ) ); ScrollBarP.PosSet ( 0, mSize.Height() - 15 ); - ScrollBarP.Size = eeSize( mSize.Width() - mVScrollBar->Size().Width(), 15 ); + ScrollBarP.Size = Sizei( mSize.Width() - mVScrollBar->Size().Width(), 15 ); ScrollBarP.VerticalScrollBar = false; mHScrollBar = eeNew( cUIScrollBar, ( ScrollBarP ) ); @@ -572,10 +572,10 @@ void cUIGenericGrid::Update() { return; } - eeVector2i Pos( cUIManager::instance()->GetMousePos() ); + Vector2i Pos( cUIManager::instance()->GetMousePos() ); if ( mTouchDragPoint != Pos ) { - eeVector2i diff = -( mTouchDragPoint - Pos ); + Vector2i diff = -( mTouchDragPoint - Pos ); mVScrollBar->Value( mVScrollBar->Value() + ( -diff.y / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); diff --git a/src/eepp/ui/cuigfx.cpp b/src/eepp/ui/cuigfx.cpp index 363d345a6..9c5659f01 100644 --- a/src/eepp/ui/cuigfx.cpp +++ b/src/eepp/ui/cuigfx.cpp @@ -41,7 +41,7 @@ void cUIGfx::AutoSize() { if ( NULL != mSubTexture ) { Size( mSubTexture->Size() ); } else { - Size( eeSize( 0, 0 ) ); + Size( Sizei( 0, 0 ) ); } } } @@ -51,19 +51,19 @@ void cUIGfx::Draw() { if ( mVisible ) { if ( NULL != mSubTexture && 0.f != mAlpha ) { - eeSizef oDestSize = mSubTexture->DestSize(); - eeVector2i oOff = mSubTexture->Offset(); + Sizef oDestSize = mSubTexture->DestSize(); + Vector2i oOff = mSubTexture->Offset(); if ( mFlags & UI_FIT_TO_CONTROL ) { - mSubTexture->Offset( eeVector2i( 0, 0 ) ); - mSubTexture->DestSize( eeVector2f( mSize.x, mSize.y ) ); + mSubTexture->Offset( Vector2i( 0, 0 ) ); + mSubTexture->DestSize( Vector2f( mSize.x, mSize.y ) ); DrawSubTexture(); mSubTexture->DestSize( oDestSize ); mSubTexture->Offset( oOff ); } else if ( mFlags & UI_AUTO_FIT ) { - mSubTexture->Offset( eeVector2i( 0, 0 ) ); + mSubTexture->Offset( Vector2i( 0, 0 ) ); Float Scale1 = mSize.x / oDestSize.x; Float Scale2 = mSize.y / oDestSize.y; @@ -72,7 +72,7 @@ void cUIGfx::Draw() { if ( Scale2 < Scale1 ) Scale1 = Scale2; - mSubTexture->DestSize( eeSizef( oDestSize.x * Scale1, oDestSize.y * Scale1 ) ); + mSubTexture->DestSize( Sizef( oDestSize.x * Scale1, oDestSize.y * Scale1 ) ); AutoAlign(); @@ -96,7 +96,7 @@ void cUIGfx::Draw() { } void cUIGfx::DrawSubTexture() { - mSubTexture->Draw( (Float)mScreenPos.x + mAlignOffset.x, (Float)mScreenPos.y + mAlignOffset.y, mColor, 0.f, eeVector2f::One, Blend(), mRender ); + mSubTexture->Draw( (Float)mScreenPos.x + mAlignOffset.x, (Float)mScreenPos.y + mAlignOffset.y, mColor, 0.f, Vector2f::One, Blend(), mRender ); } void cUIGfx::Alpha( const Float& alpha ) { @@ -152,7 +152,7 @@ void cUIGfx::OnSizeChange() { cUIControlAnim::OnSizeChange(); } -const eeVector2i& cUIGfx::AlignOffset() const { +const Vector2i& cUIGfx::AlignOffset() const { return mAlignOffset; } diff --git a/src/eepp/ui/cuigridcell.cpp b/src/eepp/ui/cuigridcell.cpp index 0bd824ecb..0a0fca7bd 100644 --- a/src/eepp/ui/cuigridcell.cpp +++ b/src/eepp/ui/cuigridcell.cpp @@ -119,7 +119,7 @@ bool cUIGridCell::Selected() const { return 0 != ( mControlFlags & UI_CTRL_FLAG_SELECTED ); } -Uint32 cUIGridCell::OnMouseExit( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIGridCell::OnMouseExit( const Vector2i& Pos, const Uint32 Flags ) { cUIControl::OnMouseExit( Pos, Flags ); if ( mControlFlags & UI_CTRL_FLAG_SELECTED ) @@ -132,12 +132,12 @@ Uint32 cUIGridCell::OnMessage( const cUIMessage * Msg ) { switch( Msg->Msg() ) { case cUIMessage::MsgMouseEnter: { - OnMouseEnter( eeVector2i(), Msg->Flags() ); + OnMouseEnter( Vector2i(), Msg->Flags() ); break; } case cUIMessage::MsgMouseExit: { - OnMouseExit( eeVector2i(), Msg->Flags() ); + OnMouseExit( Vector2i(), Msg->Flags() ); break; } case cUIMessage::MsgClick: diff --git a/src/eepp/ui/cuilistbox.cpp b/src/eepp/ui/cuilistbox.cpp index da69907a2..467a28b05 100644 --- a/src/eepp/ui/cuilistbox.cpp +++ b/src/eepp/ui/cuilistbox.cpp @@ -38,7 +38,7 @@ cUIListBox::cUIListBox( cUIListBox::CreateParams& Params ) : cUIControl::CreateParams CParams; CParams.Parent( this ); CParams.PosSet( mPaddingContainer.Left, mPaddingContainer.Top ); - CParams.Size = eeSize( mSize.Width() - mPaddingContainer.Right - mPaddingContainer.Left, mSize.Height() - mPaddingContainer.Top - mPaddingContainer.Bottom ); + CParams.Size = Sizei( mSize.Width() - mPaddingContainer.Right - mPaddingContainer.Left, mSize.Height() - mPaddingContainer.Top - mPaddingContainer.Bottom ); CParams.Flags = Params.Flags; mContainer = eeNew( tUIItemContainer, ( CParams ) ); mContainer->Visible( true ); @@ -49,13 +49,13 @@ cUIListBox::cUIListBox( cUIListBox::CreateParams& Params ) : cUIScrollBar::CreateParams ScrollBarP; ScrollBarP.Parent( this ); - ScrollBarP.Size = eeSize( 15, mSize.Height() ); + ScrollBarP.Size = Sizei( 15, mSize.Height() ); ScrollBarP.PosSet( mSize.Width() - 15, 0 ); ScrollBarP.Flags = UI_AUTO_SIZE; ScrollBarP.VerticalScrollBar = true; mVScrollBar = eeNew( cUIScrollBar, ( ScrollBarP ) ); - ScrollBarP.Size = eeSize( mSize.Width() - mVScrollBar->Size().Width(), 15 ); + ScrollBarP.Size = Sizei( mSize.Width() - mVScrollBar->Size().Width(), 15 ); ScrollBarP.PosSet( 0, mSize.Height() - 15 ); ScrollBarP.VerticalScrollBar = false; mHScrollBar = eeNew( cUIScrollBar, ( ScrollBarP ) ); @@ -711,7 +711,7 @@ cFont * cUIListBox::Font() const { return mFont; } -void cUIListBox::PaddingContainer( const eeRecti& Padding ) { +void cUIListBox::PaddingContainer( const Recti& Padding ) { if ( Padding != mPaddingContainer ) { mPaddingContainer = Padding; @@ -720,7 +720,7 @@ void cUIListBox::PaddingContainer( const eeRecti& Padding ) { } } -const eeRecti& cUIListBox::PaddingContainer() const { +const Recti& cUIListBox::PaddingContainer() const { return mPaddingContainer; } @@ -966,10 +966,10 @@ void cUIListBox::Update() { return; } - eeVector2i Pos( cUIManager::instance()->GetMousePos() ); + Vector2i Pos( cUIManager::instance()->GetMousePos() ); if ( mTouchDragPoint != Pos ) { - eeVector2i diff = -( mTouchDragPoint - Pos ); + Vector2i diff = -( mTouchDragPoint - Pos ); mVScrollBar->Value( mVScrollBar->Value() + ( -diff.y / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); diff --git a/src/eepp/ui/cuilistboxitem.cpp b/src/eepp/ui/cuilistboxitem.cpp index b2aaa19ff..0b9103181 100644 --- a/src/eepp/ui/cuilistboxitem.cpp +++ b/src/eepp/ui/cuilistboxitem.cpp @@ -30,7 +30,7 @@ void cUIListBoxItem::SetTheme( cUITheme * Theme ) { cUIControl::SetThemeControl( Theme, "listboxitem" ); } -Uint32 cUIListBoxItem::OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIListBoxItem::OnMouseClick( const Vector2i& Pos, const Uint32 Flags ) { if ( Flags & EE_BUTTONS_LRM ) { reinterpret_cast ( Parent()->Parent() )->ItemClicked( this ); @@ -88,7 +88,7 @@ void cUIListBoxItem::Update() { } } -Uint32 cUIListBoxItem::OnMouseExit( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUIListBoxItem::OnMouseExit( const Vector2i& Pos, const Uint32 Flags ) { cUIControl::OnMouseExit( Pos, Flags ); if ( mControlFlags & UI_CTRL_FLAG_SELECTED ) diff --git a/src/eepp/ui/cuimanager.cpp b/src/eepp/ui/cuimanager.cpp index 1526c12bf..6ab071647 100644 --- a/src/eepp/ui/cuimanager.cpp +++ b/src/eepp/ui/cuimanager.cpp @@ -54,8 +54,8 @@ void cUIManager::Init( Uint32 Flags, Window::cWindow * window ) { Params.SizeSet( cEngine::instance()->GetWidth(), cEngine::instance()->GetHeight() ); Params.Flags = UI_CONTROL_DEFAULT_FLAGS | UI_REPORT_SIZE_CHANGE_TO_CHILDS; Params.WinFlags = UI_WIN_NO_BORDER | UI_WIN_RESIZEABLE; - Params.MinWindowSize = eeSize( 0, 0 ); - Params.DecorationSize = eeSize( 0, 0 ); + Params.MinWindowSize = Sizei( 0, 0 ); + Params.DecorationSize = Sizei( 0, 0 ); Params.DecorationAutoSize = false; mControl = eeNew( cUIWindow, ( Params ) ); @@ -269,7 +269,7 @@ const Time& cUIManager::Elapsed() const { return mElapsed; } -eeVector2i cUIManager::GetMousePos() { +Vector2i cUIManager::GetMousePos() { return mKM->GetMousePos(); } @@ -336,17 +336,17 @@ void cUIManager::CheckTabPress( const Uint32& KeyCode ) { } } -void cUIManager::SendMouseClick( cUIControl * ToCtrl, const eeVector2i& Pos, const Uint32 Flags ) { +void cUIManager::SendMouseClick( cUIControl * ToCtrl, const Vector2i& Pos, const Uint32 Flags ) { SendMsg( ToCtrl, cUIMessage::MsgClick, Flags ); ToCtrl->OnMouseClick( Pos, Flags ); } -void cUIManager::SendMouseUp( cUIControl * ToCtrl, const eeVector2i& Pos, const Uint32 Flags ) { +void cUIManager::SendMouseUp( cUIControl * ToCtrl, const Vector2i& Pos, const Uint32 Flags ) { SendMsg( ToCtrl, cUIMessage::MsgMouseUp, Flags ); ToCtrl->OnMouseUp( Pos, Flags ); } -void cUIManager::SendMouseDown( cUIControl * ToCtrl, const eeVector2i& Pos, const Uint32 Flags ) { +void cUIManager::SendMouseDown( cUIControl * ToCtrl, const Vector2i& Pos, const Uint32 Flags ) { SendMsg( ToCtrl, cUIMessage::MsgMouseDown, Flags ); ToCtrl->OnMouseDown( Pos, Flags ); } @@ -385,7 +385,7 @@ const bool& cUIManager::IsShootingDown() const { return mShootingDown; } -const eeVector2i &cUIManager::GetMouseDownPos() const { +const Vector2i &cUIManager::GetMouseDownPos() const { return mMouseDownPos; } diff --git a/src/eepp/ui/cuimenu.cpp b/src/eepp/ui/cuimenu.cpp index 45da6ffb4..355170a57 100644 --- a/src/eepp/ui/cuimenu.cpp +++ b/src/eepp/ui/cuimenu.cpp @@ -61,9 +61,9 @@ cUIMenuItem * cUIMenu::CreateMenuItem( const String& Text, cSubTexture * Icon ) Params.Icon = Icon; if ( mRowHeight < mMinSpaceForIcons ) - Params.IconMinSize = eeSize( mMinSpaceForIcons, mRowHeight ); + Params.IconMinSize = Sizei( mMinSpaceForIcons, mRowHeight ); else - Params.IconMinSize = eeSize( mMinSpaceForIcons, mMinSpaceForIcons ); + Params.IconMinSize = Sizei( mMinSpaceForIcons, mMinSpaceForIcons ); if ( mFlags & UI_AUTO_SIZE ) { Params.Flags = UI_VALIGN_CENTER | UI_HALIGN_LEFT; @@ -91,12 +91,12 @@ cUIMenuCheckBox * cUIMenu::CreateMenuCheckBox( const String& Text, const bool &A Params.FontColor = mFontColor; Params.FontShadowColor = mFontShadowColor; Params.FontOverColor = mFontOverColor; - Params.Size = eeSize( 0, mRowHeight ); + Params.Size = Sizei( 0, mRowHeight ); if ( mRowHeight < mMinSpaceForIcons ) - Params.IconMinSize = eeSize( mMinSpaceForIcons, mRowHeight ); + Params.IconMinSize = Sizei( mMinSpaceForIcons, mRowHeight ); else - Params.IconMinSize = eeSize( mMinSpaceForIcons, mMinSpaceForIcons ); + Params.IconMinSize = Sizei( mMinSpaceForIcons, mMinSpaceForIcons ); if ( mFlags & UI_AUTO_SIZE ) { Params.Flags = UI_VALIGN_CENTER | UI_HALIGN_LEFT; @@ -131,9 +131,9 @@ cUIMenuSubMenu * cUIMenu::CreateSubMenu( const String& Text, cSubTexture * Icon, Params.Icon = Icon; if ( mRowHeight < mMinSpaceForIcons ) - Params.IconMinSize = eeSize( mMinSpaceForIcons, mRowHeight ); + Params.IconMinSize = Sizei( mMinSpaceForIcons, mRowHeight ); else - Params.IconMinSize = eeSize( mMinSpaceForIcons, mMinSpaceForIcons ); + Params.IconMinSize = Sizei( mMinSpaceForIcons, mMinSpaceForIcons ); if ( mFlags & UI_AUTO_SIZE ) { Params.Flags = UI_VALIGN_CENTER | UI_HALIGN_LEFT; @@ -224,7 +224,7 @@ Uint32 cUIMenu::AddSeparator() { cUISeparator::CreateParams Params; Params.Parent( this ); Params.PosSet( mPadding.Left, mPadding.Top + mNextPosY ); - Params.Size = eeSize( mSize.Width() - mPadding.Left - mPadding.Right, 3 ); + Params.Size = Sizei( mSize.Width() - mPadding.Left - mPadding.Right, 3 ); cUISeparator * Control = eeNew( cUISeparator, ( Params ) ); @@ -555,25 +555,25 @@ Uint32 cUIMenu::OnKeyDown( const cUIEventKey& Event ) { return cUIComplexControl::OnKeyDown( Event ); } -const eeRecti& cUIMenu::Padding() const { +const Recti& cUIMenu::Padding() const { return mPadding; } -void cUIMenu::FixMenuPos( eeVector2i& Pos, cUIMenu * Menu, cUIMenu * Parent, cUIMenuSubMenu * SubMenu ) { +void cUIMenu::FixMenuPos( Vector2i& Pos, cUIMenu * Menu, cUIMenu * Parent, cUIMenuSubMenu * SubMenu ) { eeAABB qScreen( 0.f, 0.f, cUIManager::instance()->MainControl()->Size().Width(), cUIManager::instance()->MainControl()->Size().Height() ); eeAABB qPos( Pos.x, Pos.y, Pos.x + Menu->Size().Width(), Pos.y + Menu->Size().Height() ); if ( NULL != Parent && NULL != SubMenu ) { - eeVector2i addToPos( 0, 0 ); + Vector2i addToPos( 0, 0 ); if ( NULL != SubMenu ) { addToPos.y = SubMenu->Size().Height(); } - eeVector2i sPos = SubMenu->Pos(); + Vector2i sPos = SubMenu->Pos(); SubMenu->ControlToScreen( sPos ); - eeVector2i pPos = Parent->Pos(); + Vector2i pPos = Parent->Pos(); Parent->ControlToScreen( pPos ); eeAABB qParent( pPos.x, pPos.y, pPos.x + Parent->Size().Width(), pPos.y + Parent->Size().Height() ); diff --git a/src/eepp/ui/cuimenucheckbox.cpp b/src/eepp/ui/cuimenucheckbox.cpp index 926b5588e..ec9273430 100644 --- a/src/eepp/ui/cuimenucheckbox.cpp +++ b/src/eepp/ui/cuimenucheckbox.cpp @@ -69,7 +69,7 @@ void cUIMenuCheckBox::Active( const bool& active ) { if ( !Menu->CheckControlSize( this ) ) { if ( NULL != Icon()->SubTexture() ) { - Padding( eeRecti( 0, 0, 0, 0 ) ); + Padding( Recti( 0, 0, 0, 0 ) ); } } @@ -81,7 +81,7 @@ void cUIMenuCheckBox::SwitchActive() { Active( !mActive ); } -Uint32 cUIMenuCheckBox::OnMouseUp( const eeVector2i &Pos, const Uint32 Flags ) { +Uint32 cUIMenuCheckBox::OnMouseUp( const Vector2i &Pos, const Uint32 Flags ) { cUIMenuItem::OnMouseUp( Pos, Flags ); if ( Parent()->Visible() && ( Flags & EE_BUTTONS_LRM ) ) diff --git a/src/eepp/ui/cuimenuitem.cpp b/src/eepp/ui/cuimenuitem.cpp index 4eb54dbcc..010cbc5ae 100644 --- a/src/eepp/ui/cuimenuitem.cpp +++ b/src/eepp/ui/cuimenuitem.cpp @@ -25,7 +25,7 @@ void cUIMenuItem::SetTheme( cUITheme * Theme ) { DoAfterSetTheme(); } -Uint32 cUIMenuItem::OnMouseEnter( const eeVector2i &Pos, const Uint32 Flags ) { +Uint32 cUIMenuItem::OnMouseEnter( const Vector2i &Pos, const Uint32 Flags ) { cUIPushButton::OnMouseEnter( Pos, Flags ); reinterpret_cast ( Parent() )->SetItemSelected( this ); diff --git a/src/eepp/ui/cuimenusubmenu.cpp b/src/eepp/ui/cuimenusubmenu.cpp index 9842911bb..0a120e7c6 100644 --- a/src/eepp/ui/cuimenusubmenu.cpp +++ b/src/eepp/ui/cuimenusubmenu.cpp @@ -84,7 +84,7 @@ cUIMenu * cUIMenuSubMenu::SubMenu() const { return mSubMenu; } -Uint32 cUIMenuSubMenu::OnMouseMove( const eeVector2i &Pos, const Uint32 Flags ) { +Uint32 cUIMenuSubMenu::OnMouseMove( const Vector2i &Pos, const Uint32 Flags ) { cUIMenuItem::OnMouseMove( Pos, Flags ); if ( NULL != mSubMenu && !mSubMenu->Visible() ) { @@ -101,7 +101,7 @@ Uint32 cUIMenuSubMenu::OnMouseMove( const eeVector2i &Pos, const Uint32 Flags ) void cUIMenuSubMenu::ShowSubMenu() { mSubMenu->Parent( Parent()->Parent() ); - eeVector2i Pos = this->Pos(); + Vector2i Pos = this->Pos(); ControlToScreen( Pos ); Pos.x += mSize.Width() + reinterpret_cast ( Parent() )->Padding().Right; @@ -115,7 +115,7 @@ void cUIMenuSubMenu::ShowSubMenu() { } } -Uint32 cUIMenuSubMenu::OnMouseExit( const eeVector2i &Pos, const Uint32 Flags ) { +Uint32 cUIMenuSubMenu::OnMouseExit( const Vector2i &Pos, const Uint32 Flags ) { cUIMenuItem::OnMouseExit( Pos, Flags ); mTimeOver = 0; diff --git a/src/eepp/ui/cuimessagebox.cpp b/src/eepp/ui/cuimessagebox.cpp index b1bc5e32b..1c8f292fd 100644 --- a/src/eepp/ui/cuimessagebox.cpp +++ b/src/eepp/ui/cuimessagebox.cpp @@ -29,13 +29,13 @@ cUIMessageBox::cUIMessageBox( const cUIMessageBox::CreateParams& Params ) : else { mButtonOK = Theme->CreatePushButton( Container(), - eeSize( 90, 22 ), - eeVector2i( Container()->Size().Width() - 96, Container()->Size().Height() - 22 - 8 ), + Sizei( 90, 22 ), + Vector2i( Container()->Size().Width() - 96, Container()->Size().Height() - 22 - 8 ), UI_HALIGN_CENTER | UI_ANCHOR_RIGHT | UI_VALIGN_CENTER | UI_AUTO_SIZE ); mButtonCancel = Theme->CreatePushButton( Container(), mButtonOK->Size(), - eeVector2i( mButtonOK->Pos().x - mButtonOK->Size().Width() - 8, mButtonOK->Pos().y ), + Vector2i( mButtonOK->Pos().x - mButtonOK->Size().Width() - 8, mButtonOK->Pos().y ), mButtonOK->Flags() ); } @@ -113,8 +113,8 @@ Uint32 cUIMessageBox::OnMessage( const cUIMessage * Msg ) { case cUIMessage::MsgClick: { if ( Msg->Flags() & EE_BUTTON_LMASK ) { - eeVector2i mousei( cUIManager::instance()->GetMousePos() ); - eeVector2f mouse( mousei.x, mousei.y ); + Vector2i mousei( cUIManager::instance()->GetMousePos() ); + Vector2f mouse( mousei.x, mousei.y ); if ( Msg->Sender() == mButtonOK && mButtonOK->GetPolygon().PointInside( mouse ) ) { SendCommonEvent( cUIEvent::EventMsgBoxConfirmClick ); @@ -145,7 +145,7 @@ cUIPushButton * cUIMessageBox::ButtonCancel() const { } void cUIMessageBox::AutoSize() { - eeSize nSize( mTextBox->GetTextWidth() + 48, mTextBox->GetTextHeight() + mButtonOK->Size().Height() + mDecoSize.Height() + 8 ); + Sizei nSize( mTextBox->GetTextWidth() + 48, mTextBox->GetTextHeight() + mButtonOK->Size().Height() + mDecoSize.Height() + 8 ); if ( !( nSize.Width() > Container()->Size().Width() ) ) { nSize.x = Container()->Size().Width(); diff --git a/src/eepp/ui/cuiprogressbar.cpp b/src/eepp/ui/cuiprogressbar.cpp index 48dd6e39a..bd6ad8e23 100644 --- a/src/eepp/ui/cuiprogressbar.cpp +++ b/src/eepp/ui/cuiprogressbar.cpp @@ -46,7 +46,7 @@ void cUIProgressBar::Draw() { C.Alpha = (Uint8)mAlpha; mParallax->Color( C ); - mParallax->Position( eeVector2f( mScreenPos.x + mFillerMargin.Left, mScreenPos.y + mFillerMargin.Top ) ); + mParallax->Position( Vector2f( mScreenPos.x + mFillerMargin.Left, mScreenPos.y + mFillerMargin.Top ) ); mParallax->Draw(); } } @@ -74,7 +74,7 @@ void cUIProgressBar::SetTheme( cUITheme * Theme ) { if ( Height > mSize.Height() ) Height = mSize.Height(); - mParallax = eeNew( cScrollParallax, ( tSubTexture, eeVector2f( mScreenPos.x + mFillerMargin.Left, mScreenPos.y + mFillerMargin.Top ), eeSizef( ( ( mSize.Width() - mFillerMargin.Left - mFillerMargin.Right ) * mProgress ) / mTotalSteps, Height - mFillerMargin.Top - mFillerMargin.Bottom ), mSpeed ) ); + mParallax = eeNew( cScrollParallax, ( tSubTexture, Vector2f( mScreenPos.x + mFillerMargin.Left, mScreenPos.y + mFillerMargin.Top ), Sizef( ( ( mSize.Width() - mFillerMargin.Left - mFillerMargin.Right ) * mProgress ) / mTotalSteps, Height - mFillerMargin.Top - mFillerMargin.Bottom ), mSpeed ) ); } } } @@ -97,7 +97,7 @@ void cUIProgressBar::OnSizeChange() { if ( Height > mSize.Height() ) Height = mSize.Height(); - mParallax->Size( eeSizef( ( ( mSize.Width() - mFillerMargin.Left - mFillerMargin.Right ) * mProgress ) / mTotalSteps, Height - mFillerMargin.Top - mFillerMargin.Bottom ) ); + mParallax->Size( Sizef( ( ( mSize.Width() - mFillerMargin.Left - mFillerMargin.Right ) * mProgress ) / mTotalSteps, Height - mFillerMargin.Top - mFillerMargin.Bottom ) ); } UpdateTextBox(); @@ -125,14 +125,14 @@ const Float& cUIProgressBar::TotalSteps() const { return mTotalSteps; } -void cUIProgressBar::MovementSpeed( const eeVector2f& Speed ) { +void cUIProgressBar::MovementSpeed( const Vector2f& Speed ) { mSpeed = Speed; if ( NULL != mParallax ) mParallax->Speed( mSpeed ); } -const eeVector2f& cUIProgressBar::MovementSpeed() const { +const Vector2f& cUIProgressBar::MovementSpeed() const { return mSpeed; } @@ -148,14 +148,14 @@ const bool& cUIProgressBar::VerticalExpand() const { return mVerticalExpand; } -void cUIProgressBar::FillerMargin( const eeRectf& margin ) { +void cUIProgressBar::FillerMargin( const Rectf& margin ) { mFillerMargin = margin; OnPosChange(); OnSizeChange(); } -const eeRectf& cUIProgressBar::FillerMargin() const { +const Rectf& cUIProgressBar::FillerMargin() const { return mFillerMargin; } diff --git a/src/eepp/ui/cuipushbutton.cpp b/src/eepp/ui/cuipushbutton.cpp index a0e496233..3bc26b522 100644 --- a/src/eepp/ui/cuipushbutton.cpp +++ b/src/eepp/ui/cuipushbutton.cpp @@ -98,7 +98,7 @@ void cUIPushButton::OnSizeChange() { /** if ( mFlags & UI_AUTO_SIZE ) { if ( NULL != mTextBox ) { - eeRecti P = MakePadding(); + Recti P = MakePadding(); mSize.Height( mIcon->Size().Height() + P.Top + P.Bottom ); @@ -132,7 +132,7 @@ void cUIPushButton::DoAfterSetTheme() { mTextBox->Font( mSkinState->GetSkin()->Theme()->Font() ); if ( mControlFlags & UI_CTRL_FLAG_FREE_USE ) { - eeRecti RMargin = MakePadding( true, false, false, false, true ); + Recti RMargin = MakePadding( true, false, false, false, true ); mIconSpace = RMargin.Left; } @@ -169,11 +169,11 @@ const String& cUIPushButton::Text() { return mTextBox->Text(); } -void cUIPushButton::Padding( const eeRecti& padding ) { +void cUIPushButton::Padding( const Recti& padding ) { mTextBox->Padding( padding ); } -const eeRecti& cUIPushButton::Padding() const { +const Recti& cUIPushButton::Padding() const { return mTextBox->Padding(); } @@ -211,7 +211,7 @@ Uint32 cUIPushButton::OnKeyDown( const cUIEventKey& Event ) { if ( Event.KeyCode() == KEY_RETURN ) { cUIMessage Msg( this, cUIMessage::MsgClick, EE_BUTTON_LMASK ); MessagePost( &Msg ); - OnMouseClick( eeVector2i(0,0), EE_BUTTON_LMASK ); + OnMouseClick( Vector2i(0,0), EE_BUTTON_LMASK ); SetSkinState( cUISkinState::StateMouseDown ); } diff --git a/src/eepp/ui/cuiradiobutton.cpp b/src/eepp/ui/cuiradiobutton.cpp index d88c8a96f..7328dc6cb 100644 --- a/src/eepp/ui/cuiradiobutton.cpp +++ b/src/eepp/ui/cuiradiobutton.cpp @@ -14,8 +14,8 @@ cUIRadioButton::cUIRadioButton( const cUITextBox::CreateParams& Params ) : cUIControlAnim::CreateParams ButtonParams( Params ); ButtonParams.Parent( this ); - ButtonParams.PosSet( eeVector2i( 0, 0 ) ); - ButtonParams.Size = eeSize( 16, 16 ); + ButtonParams.PosSet( Vector2i( 0, 0 ) ); + ButtonParams.Size = Sizei( 16, 16 ); mActiveButton = eeNew( cUIControlAnim, ( ButtonParams ) ); mActiveButton->Visible( false ); @@ -25,7 +25,7 @@ cUIRadioButton::cUIRadioButton( const cUITextBox::CreateParams& Params ) : mInactiveButton->Visible( true ); mInactiveButton->Enabled( true ); - Padding( eeRecti(0,0,0,0) ); + Padding( Recti(0,0,0,0) ); AutoActivate(); @@ -72,7 +72,7 @@ void cUIRadioButton::SetTheme( cUITheme * Theme ) { } } - Padding( eeRecti(0,0,0,0) ); + Padding( Recti(0,0,0,0) ); } void cUIRadioButton::AutoSize() { @@ -205,7 +205,7 @@ const bool& cUIRadioButton::IsActive() const { return Active(); } -void cUIRadioButton::Padding( const eeRecti& padding ) { +void cUIRadioButton::Padding( const Recti& padding ) { mPadding = padding; mPadding.Left = mPadding.Left + mActiveButton->Size().Width(); } diff --git a/src/eepp/ui/cuiscrollbar.cpp b/src/eepp/ui/cuiscrollbar.cpp index 238688220..9d9885b33 100644 --- a/src/eepp/ui/cuiscrollbar.cpp +++ b/src/eepp/ui/cuiscrollbar.cpp @@ -8,7 +8,7 @@ cUIScrollBar::cUIScrollBar( const cUIScrollBar::CreateParams& Params ) : cUIComplexControl( Params ) { cUIControlAnim::CreateParams CParams = Params; - CParams.Size = eeSize( 16, 16 ); + CParams.Size = Sizei( 16, 16 ); CParams.Parent( this ); mBtnDown = eeNew( cUIControlAnim, ( CParams ) ); diff --git a/src/eepp/ui/cuiskincomplex.cpp b/src/eepp/ui/cuiskincomplex.cpp index 7ced18679..7e165ae76 100644 --- a/src/eepp/ui/cuiskincomplex.cpp +++ b/src/eepp/ui/cuiskincomplex.cpp @@ -38,7 +38,7 @@ void cUISkinComplex::Draw( const Float& X, const Float& Y, const Float& Width, c mTempColor.Alpha = (Uint8)( (Float)mTempColor.Alpha * ( (Float)Alpha / 255.f ) ); } - eeSize uls; + Sizei uls; if ( NULL != tSubTexture ) { uls = tSubTexture->RealSize(); @@ -48,7 +48,7 @@ void cUISkinComplex::Draw( const Float& X, const Float& Y, const Float& Width, c tSubTexture = mSubTexture[ State ][ DownLeft ]; - eeSize dls; + Sizei dls; if ( NULL != tSubTexture ) { dls = tSubTexture->RealSize(); @@ -58,7 +58,7 @@ void cUISkinComplex::Draw( const Float& X, const Float& Y, const Float& Width, c tSubTexture = mSubTexture[ State ][ UpRight ]; - eeSize urs; + Sizei urs; if ( NULL != tSubTexture ) { urs = tSubTexture->RealSize(); @@ -68,7 +68,7 @@ void cUISkinComplex::Draw( const Float& X, const Float& Y, const Float& Width, c tSubTexture = mSubTexture[ State ][ DownRight ]; - eeSize drs; + Sizei drs; if ( NULL != tSubTexture ) { drs = tSubTexture->RealSize(); @@ -79,7 +79,7 @@ void cUISkinComplex::Draw( const Float& X, const Float& Y, const Float& Width, c tSubTexture = mSubTexture[ State ][ Left ]; if ( NULL != tSubTexture ) { - tSubTexture->DestSize( eeSizef( tSubTexture->DestSize().x, Height - uls.Height() - dls.Height() ) ); + tSubTexture->DestSize( Sizef( tSubTexture->DestSize().x, Height - uls.Height() - dls.Height() ) ); tSubTexture->Draw( X, Y + uls.Height(), mTempColor ); @@ -92,7 +92,7 @@ void cUISkinComplex::Draw( const Float& X, const Float& Y, const Float& Width, c tSubTexture = mSubTexture[ State ][ Up ]; if ( NULL != tSubTexture ) { - tSubTexture->DestSize( eeSizef( Width - uls.Width() - urs.Width(), tSubTexture->DestSize().y ) ); + tSubTexture->DestSize( Sizef( Width - uls.Width() - urs.Width(), tSubTexture->DestSize().y ) ); tSubTexture->Draw( X + uls.Width(), Y, mTempColor ); @@ -111,7 +111,7 @@ void cUISkinComplex::Draw( const Float& X, const Float& Y, const Float& Width, c if ( urs.Width() == 0 ) urs.x = tSubTexture->RealSize().Width(); - tSubTexture->DestSize( eeSizef( tSubTexture->DestSize().x, Height - urs.Height() - drs.Height() ) ); + tSubTexture->DestSize( Sizef( tSubTexture->DestSize().x, Height - urs.Height() - drs.Height() ) ); tSubTexture->Draw( X + Width - tSubTexture->RealSize().Width(), Y + urs.Height(), mTempColor ); @@ -121,7 +121,7 @@ void cUISkinComplex::Draw( const Float& X, const Float& Y, const Float& Width, c tSubTexture = mSubTexture[ State ][ Down ]; if ( NULL != tSubTexture ) { - tSubTexture->DestSize( eeSizef( Width - dls.Width() - drs.Width(), tSubTexture->DestSize().y ) ); + tSubTexture->DestSize( Sizef( Width - dls.Width() - drs.Width(), tSubTexture->DestSize().y ) ); tSubTexture->Draw( X + dls.Width(), Y + Height - tSubTexture->RealSize().Height(), mTempColor ); @@ -134,7 +134,7 @@ void cUISkinComplex::Draw( const Float& X, const Float& Y, const Float& Width, c tSubTexture = mSubTexture[ State ][ Center ]; if ( NULL != tSubTexture ) { - tSubTexture->DestSize( eeSizef( Width - uls.Width() - urs.Width(), Height - uls.Height() - dls.Height() ) ); + tSubTexture->DestSize( Sizef( Width - uls.Width() - urs.Width(), Height - uls.Height() - dls.Height() ) ); tSubTexture->Draw( X + uls.Width(), Y + uls.Height(), mTempColor ); diff --git a/src/eepp/ui/cuiskinsimple.cpp b/src/eepp/ui/cuiskinsimple.cpp index ec38f1f8c..c8a992041 100644 --- a/src/eepp/ui/cuiskinsimple.cpp +++ b/src/eepp/ui/cuiskinsimple.cpp @@ -23,7 +23,7 @@ void cUISkinSimple::Draw( const Float& X, const Float& Y, const Float& Width, co mTempColor = mColor[ State ]; if ( NULL != tSubTexture ) { - tSubTexture->DestSize( eeSizef( Width, Height ) ); + tSubTexture->DestSize( Sizef( Width, Height ) ); if ( mTempColor.Alpha != Alpha ) { mTempColor.Alpha = (Uint8)( (Float)mTempColor.Alpha * ( (Float)Alpha / 255.f ) ); diff --git a/src/eepp/ui/cuislider.cpp b/src/eepp/ui/cuislider.cpp index 551d2cf4f..66253ff9a 100644 --- a/src/eepp/ui/cuislider.cpp +++ b/src/eepp/ui/cuislider.cpp @@ -21,9 +21,9 @@ cUISlider::cUISlider( const cUISlider::CreateParams& Params ) : BgParams.Parent( this ); if ( !mVertical ) - BgParams.Size = eeSize( mSize.Width() - 16, 8 ); + BgParams.Size = Sizei( mSize.Width() - 16, 8 ); else - BgParams.Size = eeSize( 8, mSize.Width() - 16 ); + BgParams.Size = Sizei( 8, mSize.Width() - 16 ); mBackSlider = eeNew( cUIControlAnim, ( BgParams ) ); mBackSlider->Visible( true ); @@ -32,8 +32,8 @@ cUISlider::cUISlider( const cUISlider::CreateParams& Params ) : cUIDragable::CreateParams SlideParams; SlideParams.Parent( this ); - SlideParams.Size = eeSize( 16, 16 ); - SlideParams.PosSet( eeVector2i( 0, 0 ) ); + SlideParams.Size = Sizei( 16, 16 ); + SlideParams.PosSet( Vector2i( 0, 0 ) ); mSlider = eeNew( Private::cUISliderButton, ( SlideParams ) ); mSlider->Enabled( true ); @@ -116,9 +116,9 @@ void cUISlider::AdjustChilds() { Height = tSubTexture->RealSize().Height(); if ( mAllowHalfSliderOut ) - mBackSlider->Size( eeSize( mSize.Width() - mSlider->Size().Width(), Height ) ); + mBackSlider->Size( Sizei( mSize.Width() - mSlider->Size().Width(), Height ) ); else - mBackSlider->Size( eeSize( mSize.Width(), Height ) ); + mBackSlider->Size( Sizei( mSize.Width(), Height ) ); } else { Int32 Width; @@ -128,9 +128,9 @@ void cUISlider::AdjustChilds() { Width = tSubTexture->RealSize().Width(); if ( mAllowHalfSliderOut ) - mBackSlider->Size( eeSize( Width, mSize.Height() - mSlider->Size().Height() ) ); + mBackSlider->Size( Sizei( Width, mSize.Height() - mSlider->Size().Height() ) ); else - mBackSlider->Size( eeSize( Width, mSize.Height() ) ); + mBackSlider->Size( Sizei( Width, mSize.Height() ) ); } mBackSlider->Center(); @@ -295,7 +295,7 @@ Uint32 cUISlider::OnKeyDown( const cUIEventKey &Event ) { void cUISlider::ManageClick( const Uint32& Flags ) { if ( Flags ) { - eeVector2i ControlPos = cUIManager::instance()->GetMousePos(); + Vector2i ControlPos = cUIManager::instance()->GetMousePos(); mSlider->WorldToControl( ControlPos ); if ( Flags & EE_BUTTON_LMASK && !mSlider->IsMouseOver() ) { diff --git a/src/eepp/ui/cuispinbox.cpp b/src/eepp/ui/cuispinbox.cpp index 0ca6fbbdd..b35319f45 100644 --- a/src/eepp/ui/cuispinbox.cpp +++ b/src/eepp/ui/cuispinbox.cpp @@ -26,7 +26,7 @@ cUISpinBox::cUISpinBox( const cUISpinBox::CreateParams& Params ) : cUIControlAnim::CreateParams BtnParams( Params ); BtnParams.Parent( this ); - BtnParams.Size = eeSize( 16, 16 ); + BtnParams.Size = Sizei( 16, 16 ); if ( BtnParams.Flags & UI_CLIP_ENABLE ) BtnParams.Flags &= ~UI_CLIP_ENABLE; @@ -104,11 +104,11 @@ void cUISpinBox::AdjustChilds() { mInput->Size( mSize.Width() - mPushUp->Size().Width(), mSize.Height() ); } -void cUISpinBox::Padding( const eeRecti& padding ) { +void cUISpinBox::Padding( const Recti& padding ) { mInput->Padding( padding ); } -const eeRecti& cUISpinBox::Padding() const { +const Recti& cUISpinBox::Padding() const { return mInput->Padding(); } diff --git a/src/eepp/ui/cuisprite.cpp b/src/eepp/ui/cuisprite.cpp index ffb3062cd..a033b4c6c 100644 --- a/src/eepp/ui/cuisprite.cpp +++ b/src/eepp/ui/cuisprite.cpp @@ -131,7 +131,7 @@ void cUISprite::AutoAlign() { } } -const eeVector2i& cUISprite::AlignOffset() const { +const Vector2i& cUISprite::AlignOffset() const { return mAlignOffset; } diff --git a/src/eepp/ui/cuitab.cpp b/src/eepp/ui/cuitab.cpp index a6fe6bfa6..16f80be6f 100644 --- a/src/eepp/ui/cuitab.cpp +++ b/src/eepp/ui/cuitab.cpp @@ -50,7 +50,7 @@ void cUITab::SetTheme( cUITheme * Theme ) { DoAfterSetTheme(); } -Uint32 cUITab::OnMouseClick( const eeVector2i &Pos, const Uint32 Flags ) { +Uint32 cUITab::OnMouseClick( const Vector2i &Pos, const Uint32 Flags ) { cUISelectButton::OnMouseClick( Pos, Flags ); cUITabWidget * tTabW = GetTabWidget(); diff --git a/src/eepp/ui/cuitabwidget.cpp b/src/eepp/ui/cuitabwidget.cpp index f95b07229..d42fcff7b 100644 --- a/src/eepp/ui/cuitabwidget.cpp +++ b/src/eepp/ui/cuitabwidget.cpp @@ -69,8 +69,8 @@ void cUITabWidget::SetTheme( cUITheme * Theme ) { if ( 0 == mTabWidgetHeight ) { cUISkin * tSkin = Theme->GetByName( Theme->Abbr() + "_" + "tab" ); - eeSize tSize1 = GetSkinSize( tSkin ); - eeSize tSize2 = GetSkinSize( tSkin, cUISkinState::StateSelected ); + Sizei tSize1 = GetSkinSize( tSkin ); + Sizei tSize2 = GetSkinSize( tSkin, cUISkinState::StateSelected ); mTabWidgetHeight = eemax( tSize1.Height(), tSize2.Height() ); @@ -97,23 +97,23 @@ void cUITabWidget::Draw() { if ( smooth ) GLi->LineSmooth( false ); cPrimitives P; - eeVector2i p1( mPos.x, mPos.y + mTabContainer->Size().Height() + mLineBewowTabsYOffset ); - eeVector2i p2( mPos.x + mTabContainer->Pos().x, p1.y ); + Vector2i p1( mPos.x, mPos.y + mTabContainer->Size().Height() + mLineBewowTabsYOffset ); + Vector2i p2( mPos.x + mTabContainer->Pos().x, p1.y ); ControlToScreen( p1 ); ControlToScreen( p2 ); P.LineWidth( 1 ); P.SetColor( mLineBelowTabsColor ); - P.DrawLine( eeLine2f( eeVector2f( p1.x, p1.y ), eeVector2f( p2.x, p2.y ) ) ); + P.DrawLine( Line2f( Vector2f( p1.x, p1.y ), Vector2f( p2.x, p2.y ) ) ); - eeVector2i p3( mPos.x + mTabContainer->Pos().x + mTabContainer->Size().Width(), mPos.y + mTabContainer->Size().Height() + mLineBewowTabsYOffset ); - eeVector2i p4( mPos.x + mSize.Width(), p3.y ); + Vector2i p3( mPos.x + mTabContainer->Pos().x + mTabContainer->Size().Width(), mPos.y + mTabContainer->Size().Height() + mLineBewowTabsYOffset ); + Vector2i p4( mPos.x + mSize.Width(), p3.y ); ControlToScreen( p3 ); ControlToScreen( p4 ); - P.DrawLine( eeLine2f( eeVector2f( p3.x, p3.y ), eeVector2f( p4.x, p4.y ) ) ); + P.DrawLine( Line2f( Vector2f( p3.x, p3.y ), Vector2f( p4.x, p4.y ) ) ); if ( smooth ) GLi->LineSmooth( true ); } diff --git a/src/eepp/ui/cuitextbox.cpp b/src/eepp/ui/cuitextbox.cpp index 501e8b00c..392066db1 100644 --- a/src/eepp/ui/cuitextbox.cpp +++ b/src/eepp/ui/cuitextbox.cpp @@ -61,7 +61,7 @@ void cUITextBox::Draw() { } mTextCache->Flags( Flags() ); - mTextCache->Draw( (Float)mScreenPos.x + mAlignOffset.x + (Float)mPadding.Left, (Float)mScreenPos.y + mAlignOffset.y + (Float)mPadding.Top, eeVector2f::One, 0.f, Blend() ); + mTextCache->Draw( (Float)mScreenPos.x + mAlignOffset.x + (Float)mPadding.Left, (Float)mScreenPos.y + mAlignOffset.y + (Float)mPadding.Top, Vector2f::One, 0.f, Blend() ); if ( mFlags & UI_CLIP_ENABLE ) { cUIManager::instance()->ClipDisable(); @@ -213,11 +213,11 @@ void cUITextBox::OnFontChanged() { SendCommonEvent( cUIEvent::EventOnFontChanged ); } -void cUITextBox::Padding( const eeRecti& padding ) { +void cUITextBox::Padding( const Recti& padding ) { mPadding = padding; } -const eeRecti& cUITextBox::Padding() const { +const Recti& cUITextBox::Padding() const { return mPadding; } @@ -245,13 +245,13 @@ const int& cUITextBox::GetNumLines() const { return mTextCache->GetNumLines(); } -const eeVector2f& cUITextBox::AlignOffset() const { +const Vector2f& cUITextBox::AlignOffset() const { return mAlignOffset; } -Uint32 cUITextBox::OnMouseDoubleClick( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUITextBox::OnMouseDoubleClick( const Vector2i& Pos, const Uint32 Flags ) { if ( IsTextSelectionEnabled() && ( Flags & EE_BUTTON_LMASK ) ) { - eeVector2i controlPos( Pos ); + Vector2i controlPos( Pos ); WorldToControl( controlPos ); Int32 curPos = mTextCache->Font()->FindClosestCursorPosFromPoint( mTextCache->Text(), controlPos ); @@ -271,7 +271,7 @@ Uint32 cUITextBox::OnMouseDoubleClick( const eeVector2i& Pos, const Uint32 Flags return cUIComplexControl::OnMouseDoubleClick( Pos, Flags ); } -Uint32 cUITextBox::OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUITextBox::OnMouseClick( const Vector2i& Pos, const Uint32 Flags ) { if ( IsTextSelectionEnabled() && ( Flags & EE_BUTTON_LMASK ) ) { if ( SelCurInit() == SelCurEnd() ) { SelCurInit( -1 ); @@ -284,9 +284,9 @@ Uint32 cUITextBox::OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ) { return 1; } -Uint32 cUITextBox::OnMouseDown( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUITextBox::OnMouseDown( const Vector2i& Pos, const Uint32 Flags ) { if ( IsTextSelectionEnabled() && ( Flags & EE_BUTTON_LMASK ) ) { - eeVector2i controlPos( Pos ); + Vector2i controlPos( Pos ); WorldToControl( controlPos ); Int32 curPos = mTextCache->Font()->FindClosestCursorPosFromPoint( mTextCache->Text(), controlPos ); @@ -316,7 +316,7 @@ void cUITextBox::DrawSelection() { } Int32 lastEnd; - eeVector2i initPos, endPos; + Vector2i initPos, endPos; cPrimitives P; P.SetColor( mFontSelectionBackColor ); @@ -333,7 +333,7 @@ void cUITextBox::DrawSelection() { lastEnd = end; } - P.DrawRectangle( eeRectf( mScreenPos.x + initPos.x + mAlignOffset.x + mPadding.Left, + P.DrawRectangle( Rectf( mScreenPos.x + initPos.x + mAlignOffset.x + mPadding.Left, mScreenPos.y + initPos.y - mTextCache->Font()->GetFontHeight() + mAlignOffset.y + mPadding.Top, mScreenPos.x + endPos.x + mAlignOffset.x + mPadding.Left, mScreenPos.y + endPos.y + mAlignOffset.y + mPadding.Top ) diff --git a/src/eepp/ui/cuitextedit.cpp b/src/eepp/ui/cuitextedit.cpp index 25f259a83..02c4144a4 100644 --- a/src/eepp/ui/cuitextedit.cpp +++ b/src/eepp/ui/cuitextedit.cpp @@ -52,14 +52,14 @@ cUITextEdit::cUITextEdit( cUITextEdit::CreateParams& Params ) : cUIScrollBar::CreateParams ScrollBarP; ScrollBarP.Parent( this ); ScrollBarP.PosSet( mSize.Width() - 15, 0 ); - ScrollBarP.Size = eeSize( 15, mSize.Height() ); + ScrollBarP.Size = Sizei( 15, mSize.Height() ); ScrollBarP.Flags = UI_AUTO_SIZE; ScrollBarP.VerticalScrollBar = true; mVScrollBar = eeNew( cUIScrollBar, ( ScrollBarP ) ); mVScrollBar->Value( 1 ); ScrollBarP.PosSet( 0, mSize.Height() - 15 ); - ScrollBarP.Size = eeSize( mSize.Width() - mVScrollBar->Size().Width(), 15 ); + ScrollBarP.Size = Sizei( mSize.Width() - mVScrollBar->Size().Width(), 15 ); ScrollBarP.VerticalScrollBar = false; mHScrollBar = eeNew( cUIScrollBar, ( ScrollBarP ) ); @@ -72,7 +72,7 @@ cUITextEdit::cUITextEdit( cUITextEdit::CreateParams& Params ) : ApplyDefaultTheme(); - mTextInput->Size( mSize - eeSize( mPadding.Left + mPadding.Right, mPadding.Top + mPadding.Bottom ) ); + mTextInput->Size( mSize - Sizei( mPadding.Left + mPadding.Right, mPadding.Top + mPadding.Bottom ) ); } cUITextEdit::~cUITextEdit() { @@ -110,7 +110,7 @@ void cUITextEdit::OnSizeChange() { FixScroll(); } -void cUITextEdit::OnParentSizeChange( const eeVector2i& SizeChange ) { +void cUITextEdit::OnParentSizeChange( const Vector2i& SizeChange ) { cUIComplexControl::OnParentSizeChange( SizeChange ); OnInputSizeChange( NULL ); diff --git a/src/eepp/ui/cuitextinput.cpp b/src/eepp/ui/cuitextinput.cpp index 4cbddb2ed..f315f08c4 100644 --- a/src/eepp/ui/cuitextinput.cpp +++ b/src/eepp/ui/cuitextinput.cpp @@ -43,7 +43,7 @@ void cUITextInput::Update() { cUITextBox::Update(); if ( mTextBuffer.ChangedSinceLastUpdate() ) { - eeVector2f offSet = mAlignOffset; + Vector2f offSet = mAlignOffset; cUITextBox::Text( mTextBuffer.Buffer() ); @@ -92,7 +92,7 @@ void cUITextInput::DrawWaitingCursor() { if ( CurPosX > (Float)mScreenPos.x + (Float)mSize.x ) CurPosX = (Float)mScreenPos.x + (Float)mSize.x; - P.DrawLine( eeLine2f( eeVector2f( CurPosX, CurPosY ), eeVector2f( CurPosX, CurPosY + mTextCache->Font()->GetFontHeight() ) ) ); + P.DrawLine( Line2f( Vector2f( CurPosX, CurPosY ), Vector2f( CurPosX, CurPosY + mTextCache->Font()->GetFontHeight() ) ) ); if ( disableSmooth ) GLi->LineSmooth( true ); @@ -227,9 +227,9 @@ void cUITextInput::ShrinkText( const Uint32& MaxWidth ) { void cUITextInput::UpdateText() { } -Uint32 cUITextInput::OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUITextInput::OnMouseClick( const Vector2i& Pos, const Uint32 Flags ) { if ( Flags & EE_BUTTON_LMASK ) { - eeVector2i controlPos( Pos ); + Vector2i controlPos( Pos ); WorldToControl( controlPos ); Int32 curPos = mTextCache->Font()->FindClosestCursorPosFromPoint( mTextCache->Text(), controlPos ); @@ -243,7 +243,7 @@ Uint32 cUITextInput::OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ) { return cUITextBox::OnMouseClick( Pos, Flags ); } -Uint32 cUITextInput::OnMouseDoubleClick( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUITextInput::OnMouseDoubleClick( const Vector2i& Pos, const Uint32 Flags ) { cUITextBox::OnMouseDoubleClick( Pos, Flags ); if ( IsTextSelectionEnabled() && ( Flags & EE_BUTTON_LMASK ) && SelCurEnd() != -1 ) { @@ -254,7 +254,7 @@ Uint32 cUITextInput::OnMouseDoubleClick( const eeVector2i& Pos, const Uint32 Fla return 1; } -Uint32 cUITextInput::OnMouseExit( const eeVector2i& Pos, const Uint32 Flags ) { +Uint32 cUITextInput::OnMouseExit( const Vector2i& Pos, const Uint32 Flags ) { cUIControl::OnMouseExit( Pos, Flags ); cUIManager::instance()->SetCursor( EE_CURSOR_ARROW ); diff --git a/src/eepp/ui/cuitextinputpassword.cpp b/src/eepp/ui/cuitextinputpassword.cpp index aeff8f92c..227c66d48 100644 --- a/src/eepp/ui/cuitextinputpassword.cpp +++ b/src/eepp/ui/cuitextinputpassword.cpp @@ -39,7 +39,7 @@ void cUITextInputPassword::Draw() { } mPassCache->Flags( Flags() ); - mPassCache->Draw( (Float)mScreenPos.x + mAlignOffset.x + (Float)mPadding.Left, (Float)mScreenPos.y + mAlignOffset.y + (Float)mPadding.Top, eeVector2f::One, 0.f, Blend() ); + mPassCache->Draw( (Float)mScreenPos.x + mAlignOffset.x + (Float)mPadding.Left, (Float)mScreenPos.y + mAlignOffset.y + (Float)mPadding.Top, Vector2f::One, 0.f, Blend() ); if ( mFlags & UI_CLIP_ENABLE ) { cUIManager::instance()->ClipDisable(); diff --git a/src/eepp/ui/cuitheme.cpp b/src/eepp/ui/cuitheme.cpp index 488f9ce12..e873b94b5 100644 --- a/src/eepp/ui/cuitheme.cpp +++ b/src/eepp/ui/cuitheme.cpp @@ -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, ColorA SubTextureColor, EE_RENDER_MODE SubTextureRender ) { +cUIGfx * cUITheme::CreateGfx( cSubTexture * SubTexture, cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, ColorA SubTextureColor, EE_RENDER_MODE SubTextureRender ) { cUIGfx::CreateParams GfxParams; GfxParams.Parent( Parent ); GfxParams.PosSet( Pos ); @@ -439,7 +439,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_RENDER_MODE SpriteRender ) { +cUISprite * cUITheme::CreateSprite( cSprite * Sprite, cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, bool DeallocSprite, EE_RENDER_MODE SpriteRender ) { cUISprite::CreateParams SpriteParams; SpriteParams.Parent( Parent ); SpriteParams.PosSet( Pos ); @@ -454,7 +454,7 @@ cUISprite * cUITheme::CreateSprite( cSprite * Sprite, cUIControl * Parent, const return Spr; } -cUICheckBox * cUITheme::CreateCheckBox( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags ) { +cUICheckBox * cUITheme::CreateCheckBox( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags ) { cUICheckBox::CreateParams CheckBoxParams; CheckBoxParams.Parent( Parent ); CheckBoxParams.PosSet( Pos ); @@ -466,7 +466,7 @@ cUICheckBox * cUITheme::CreateCheckBox( cUIControl * Parent, const eeSize& Size, return Ctrl; } -cUIRadioButton * cUITheme::CreateRadioButton( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags ) { +cUIRadioButton * cUITheme::CreateRadioButton( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags ) { cUIRadioButton::CreateParams RadioButtonParams; RadioButtonParams.Parent( Parent ); RadioButtonParams.PosSet( Pos ); @@ -478,7 +478,7 @@ cUIRadioButton * cUITheme::CreateRadioButton( cUIControl * Parent, const eeSize& return Ctrl; } -cUITextBox * cUITheme::CreateTextBox( const String& Text, cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags ) { +cUITextBox * cUITheme::CreateTextBox( const String& Text, cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags ) { cUITextBox::CreateParams TextBoxParams; TextBoxParams.Parent( Parent ); TextBoxParams.PosSet( Pos ); @@ -491,7 +491,7 @@ cUITextBox * cUITheme::CreateTextBox( const String& Text, cUIControl * Parent, c return Ctrl; } -cUITooltip * cUITheme::CreateTooltip( cUIControl * TooltipOf, cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags ) { +cUITooltip * cUITheme::CreateTooltip( cUIControl * TooltipOf, cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags ) { cUITooltip::CreateParams TooltipParams; TooltipParams.Parent( Parent ); TooltipParams.PosSet( Pos ); @@ -503,7 +503,7 @@ cUITooltip * cUITheme::CreateTooltip( cUIControl * TooltipOf, cUIControl * Paren return Ctrl; } -cUITextEdit * cUITheme::CreateTextEdit( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, UI_SCROLLBAR_MODE HScrollBar, UI_SCROLLBAR_MODE VScrollBar, bool WordWrap ) { +cUITextEdit * cUITheme::CreateTextEdit( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, UI_SCROLLBAR_MODE HScrollBar, UI_SCROLLBAR_MODE VScrollBar, bool WordWrap ) { cUITextEdit::CreateParams TextEditParams; TextEditParams.Parent( Parent ); TextEditParams.PosSet( Pos ); @@ -518,7 +518,7 @@ cUITextEdit * cUITheme::CreateTextEdit( cUIControl * Parent, const eeSize& Size, return Ctrl; } -cUITextInput * cUITheme::CreateTextInput( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, bool SupportFreeEditing, Uint32 MaxLength ) { +cUITextInput * cUITheme::CreateTextInput( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, bool SupportFreeEditing, Uint32 MaxLength ) { cUITextInput::CreateParams TextInputParams; TextInputParams.Parent( Parent ); TextInputParams.PosSet( Pos ); @@ -532,7 +532,7 @@ cUITextInput * cUITheme::CreateTextInput( cUIControl * Parent, const eeSize& Siz return Ctrl; } -cUITextInputPassword * cUITheme::CreateTextInputPassword( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, bool SupportFreeEditing, Uint32 MaxLength ) { +cUITextInputPassword * cUITheme::CreateTextInputPassword( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, bool SupportFreeEditing, Uint32 MaxLength ) { cUITextInput::CreateParams TextInputParams; TextInputParams.Parent( Parent ); TextInputParams.PosSet( Pos ); @@ -546,7 +546,7 @@ cUITextInputPassword * cUITheme::CreateTextInputPassword( cUIControl * Parent, c return Ctrl; } -cUISpinBox * cUITheme::CreateSpinBox( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Float DefaultValue, bool AllowDotsInNumbers ) { +cUISpinBox * cUITheme::CreateSpinBox( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Float DefaultValue, bool AllowDotsInNumbers ) { cUISpinBox::CreateParams SpinBoxParams; SpinBoxParams.Parent( Parent ); SpinBoxParams.PosSet( Pos ); @@ -560,7 +560,7 @@ cUISpinBox * cUITheme::CreateSpinBox( cUIControl * Parent, const eeSize& Size, c return Ctrl; } -cUIScrollBar * cUITheme::CreateScrollBar( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, bool VerticalScrollBar ) { +cUIScrollBar * cUITheme::CreateScrollBar( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, bool VerticalScrollBar ) { cUIScrollBar::CreateParams ScrollBarParams; ScrollBarParams.Parent( Parent ); ScrollBarParams.PosSet( Pos ); @@ -573,7 +573,7 @@ cUIScrollBar * cUITheme::CreateScrollBar( cUIControl * Parent, const eeSize& Siz return Ctrl; } -cUISlider * cUITheme::CreateSlider( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, bool VerticalSlider, bool AllowHalfSliderOut, bool ExpandBackground ) { +cUISlider * cUITheme::CreateSlider( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, bool VerticalSlider, bool AllowHalfSliderOut, bool ExpandBackground ) { cUISlider::CreateParams SliderParams; SliderParams.Parent( Parent ); SliderParams.PosSet( Pos ); @@ -588,7 +588,7 @@ cUISlider * cUITheme::CreateSlider( cUIControl * Parent, const eeSize& Size, con return Ctrl; } -cUIComboBox * cUITheme::CreateComboBox( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Uint32 MinNumVisibleItems, bool PopUpToMainControl, cUIListBox * ListBox ) { +cUIComboBox * cUITheme::CreateComboBox( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 MinNumVisibleItems, bool PopUpToMainControl, cUIListBox * ListBox ) { cUIComboBox::CreateParams ComboParams; ComboParams.Parent( Parent ); ComboParams.PosSet( Pos ); @@ -603,7 +603,7 @@ cUIComboBox * cUITheme::CreateComboBox( cUIControl * Parent, const eeSize& Size, return Ctrl; } -cUIDropDownList * cUITheme::CreateDropDownList( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Uint32 MinNumVisibleItems, bool PopUpToMainControl, cUIListBox * ListBox ) { +cUIDropDownList * cUITheme::CreateDropDownList( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 MinNumVisibleItems, bool PopUpToMainControl, cUIListBox * ListBox ) { cUIDropDownList::CreateParams DDLParams; DDLParams.Parent( Parent ); DDLParams.PosSet( Pos ); @@ -618,7 +618,7 @@ cUIDropDownList * cUITheme::CreateDropDownList( cUIControl * Parent, const eeSiz return Ctrl; } -cUIListBox * cUITheme::CreateListBox( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, bool SmoothScroll, Uint32 RowHeight, UI_SCROLLBAR_MODE VScrollMode, UI_SCROLLBAR_MODE HScrollMode, eeRecti PaddingContainer ) { +cUIListBox * cUITheme::CreateListBox( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, bool SmoothScroll, Uint32 RowHeight, UI_SCROLLBAR_MODE VScrollMode, UI_SCROLLBAR_MODE HScrollMode, Recti PaddingContainer ) { cUIListBox::CreateParams LBParams; LBParams.Parent( Parent ); LBParams.PosSet( Pos ); @@ -635,7 +635,7 @@ cUIListBox * cUITheme::CreateListBox( cUIControl * Parent, const eeSize& Size, c return Ctrl; } -cUIMenu * cUITheme::CreateMenu( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Uint32 RowHeight, eeRecti PaddingContainer, Uint32 MinWidth, Uint32 MinSpaceForIcons, Uint32 MinRightMargin ) { +cUIMenu * cUITheme::CreateMenu( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 RowHeight, Recti PaddingContainer, Uint32 MinWidth, Uint32 MinSpaceForIcons, Uint32 MinRightMargin ) { cUIMenu::CreateParams MenuParams; MenuParams.Parent( Parent ); MenuParams.PosSet( Pos ); @@ -653,7 +653,7 @@ cUIMenu * cUITheme::CreateMenu( cUIControl * Parent, const eeSize& Size, const e return Ctrl; } -cUIPopUpMenu * cUITheme::CreatePopUpMenu( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Uint32 RowHeight, eeRecti PaddingContainer, Uint32 MinWidth, Uint32 MinSpaceForIcons, Uint32 MinRightMargin ) { +cUIPopUpMenu * cUITheme::CreatePopUpMenu( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 RowHeight, Recti PaddingContainer, Uint32 MinWidth, Uint32 MinSpaceForIcons, Uint32 MinRightMargin ) { cUIPopUpMenu::CreateParams MenuParams; MenuParams.Parent( Parent ); MenuParams.PosSet( Pos ); @@ -667,7 +667,7 @@ cUIPopUpMenu * cUITheme::CreatePopUpMenu( cUIControl * Parent, const eeSize& Siz return eeNew( cUIPopUpMenu, ( MenuParams ) ); } -cUIProgressBar * cUITheme::CreateProgressBar( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, bool DisplayPercent, bool VerticalExpand, eeVector2f MovementSpeed, eeRectf FillerMargin ) { +cUIProgressBar * cUITheme::CreateProgressBar( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, bool DisplayPercent, bool VerticalExpand, Vector2f MovementSpeed, Rectf FillerMargin ) { cUIProgressBar::CreateParams PBParams; PBParams.Parent( Parent ); PBParams.PosSet( Pos ); @@ -684,7 +684,7 @@ cUIProgressBar * cUITheme::CreateProgressBar( cUIControl * Parent, const eeSize& return Ctrl; } -cUIPushButton * cUITheme::CreatePushButton( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, cSubTexture * Icon, Int32 IconHorizontalMargin, bool IconAutoMargin ) { +cUIPushButton * cUITheme::CreatePushButton( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, cSubTexture * Icon, Int32 IconHorizontalMargin, bool IconAutoMargin ) { cUIPushButton::CreateParams ButtonParams; ButtonParams.Parent( Parent ); ButtonParams.PosSet( Pos ); @@ -703,7 +703,7 @@ cUIPushButton * cUITheme::CreatePushButton( cUIControl * Parent, const eeSize& S return Ctrl; } -cUISelectButton * cUITheme::CreateSelectButton( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, cSubTexture * Icon, Int32 IconHorizontalMargin, bool IconAutoMargin ) { +cUISelectButton * cUITheme::CreateSelectButton( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, cSubTexture * Icon, Int32 IconHorizontalMargin, bool IconAutoMargin ) { cUIPushButton::CreateParams ButtonParams; ButtonParams.Parent( Parent ); ButtonParams.PosSet( Pos ); @@ -722,7 +722,7 @@ cUISelectButton * cUITheme::CreateSelectButton( cUIControl * Parent, const eeSiz return Ctrl; } -cUIWinMenu * cUITheme::CreateWinMenu( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Uint32 MarginBetweenButtons, Uint32 ButtonMargin, Uint32 MenuHeight, Uint32 FirstButtonMargin ) { +cUIWinMenu * cUITheme::CreateWinMenu( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 MarginBetweenButtons, Uint32 ButtonMargin, Uint32 MenuHeight, Uint32 FirstButtonMargin ) { cUIWinMenu::CreateParams WinMenuParams; WinMenuParams.Parent( Parent ); WinMenuParams.PosSet( Pos ); @@ -739,7 +739,7 @@ cUIWinMenu * cUITheme::CreateWinMenu( cUIControl * Parent, const eeSize& Size, c return Ctrl; } -cUIWindow * cUITheme::CreateWindow( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Uint32 WinFlags, eeSize MinWindowSize, Uint8 BaseAlpha ) { +cUIWindow * cUITheme::CreateWindow( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 WinFlags, Sizei MinWindowSize, Uint8 BaseAlpha ) { cUIWindow::CreateParams WinParams; WinParams.Parent( Parent ); WinParams.PosSet( Pos ); @@ -751,7 +751,7 @@ cUIWindow * cUITheme::CreateWindow( cUIControl * Parent, const eeSize& Size, con return eeNew( cUIWindow, ( WinParams ) ); } -cUICommonDialog * cUITheme::CreateCommonDialog( cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, Uint32 WinFlags, eeSize MinWindowSize, Uint8 BaseAlpha, Uint32 CDLFlags, std::string DefaultFilePattern, std::string DefaultDirectory ) { +cUICommonDialog * cUITheme::CreateCommonDialog( cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 WinFlags, Sizei MinWindowSize, Uint8 BaseAlpha, Uint32 CDLFlags, std::string DefaultFilePattern, std::string DefaultDirectory ) { cUICommonDialog::CreateParams DLGParams; DLGParams.Parent( Parent ); DLGParams.PosSet( Pos ); @@ -766,7 +766,7 @@ cUICommonDialog * cUITheme::CreateCommonDialog( cUIControl * Parent, const eeSiz return eeNew( cUICommonDialog, ( DLGParams ) ); } -cUIMessageBox * cUITheme::CreateMessageBox( UI_MSGBOX_TYPE Type, const String& Message, Uint32 WinFlags, cUIControl * Parent, const eeSize& Size, const eeVector2i& Pos, const Uint32& Flags, eeSize MinWindowSize, Uint8 BaseAlpha ) { +cUIMessageBox * cUITheme::CreateMessageBox( UI_MSGBOX_TYPE Type, const String& Message, Uint32 WinFlags, cUIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Sizei MinWindowSize, Uint8 BaseAlpha ) { cUIMessageBox::CreateParams MsgBoxParams; MsgBoxParams.Parent( Parent ); MsgBoxParams.PosSet( Pos ); @@ -780,7 +780,7 @@ cUIMessageBox * cUITheme::CreateMessageBox( UI_MSGBOX_TYPE Type, const String& M return eeNew( cUIMessageBox, ( MsgBoxParams ) ); } -cUITabWidget * cUITheme::CreateTabWidget( cUIControl *Parent, const eeSize &Size, const eeVector2i &Pos, const Uint32 &Flags, const bool &TabsClosable, const bool &SpecialBorderTabs, const Int32 &TabSeparation, const Uint32 &MaxTextLength, const Uint32 &TabWidgetHeight, const Uint32 &TabTextAlign, const Uint32 &MinTabWidth, const Uint32 &MaxTabWidth ) { +cUITabWidget * cUITheme::CreateTabWidget( cUIControl *Parent, const Sizei &Size, const Vector2i &Pos, const Uint32 &Flags, const bool &TabsClosable, const bool &SpecialBorderTabs, const Int32 &TabSeparation, const Uint32 &MaxTextLength, const Uint32 &TabWidgetHeight, const Uint32 &TabTextAlign, const Uint32 &MinTabWidth, const Uint32 &MaxTabWidth ) { cUITabWidget::CreateParams TabWidgetParams; TabWidgetParams.Parent( Parent ); TabWidgetParams.PosSet( Pos ); diff --git a/src/eepp/ui/cuithememanager.cpp b/src/eepp/ui/cuithememanager.cpp index 4e00b052e..ee48ba17c 100644 --- a/src/eepp/ui/cuithememanager.cpp +++ b/src/eepp/ui/cuithememanager.cpp @@ -109,11 +109,11 @@ const bool& cUIThemeManager::TooltipFollowMouse() const { return mTooltipFollowMouse; } -void cUIThemeManager::CursorSize( const eeSize& Size ) { +void cUIThemeManager::CursorSize( const Sizei& Size ) { mCursorSize = Size; } -const eeSize& cUIThemeManager::CursorSize() const { +const Sizei& cUIThemeManager::CursorSize() const { return mCursorSize; } diff --git a/src/eepp/ui/cuitooltip.cpp b/src/eepp/ui/cuitooltip.cpp index 0117c4f8e..300099407 100644 --- a/src/eepp/ui/cuitooltip.cpp +++ b/src/eepp/ui/cuitooltip.cpp @@ -97,7 +97,7 @@ void cUITooltip::Draw() { if ( mTextCache->GetTextWidth() ) { mTextCache->Flags( Flags() ); - mTextCache->Draw( (Float)mScreenPos.x + mAlignOffset.x, (Float)mScreenPos.y + mAlignOffset.y, eeVector2f::One, 0.f, Blend() ); + mTextCache->Draw( (Float)mScreenPos.x + mAlignOffset.x, (Float)mScreenPos.y + mAlignOffset.y, Vector2f::One, 0.f, Blend() ); } } } @@ -209,11 +209,11 @@ void cUITooltip::OnFontChanged() { SendCommonEvent( cUIEvent::EventOnFontChanged ); } -void cUITooltip::Padding( const eeRecti& padding ) { +void cUITooltip::Padding( const Recti& padding ) { mPadding = padding; } -const eeRecti& cUITooltip::Padding() const { +const Recti& cUITooltip::Padding() const { return mPadding; } @@ -233,7 +233,7 @@ const int& cUITooltip::GetNumLines() const { return mTextCache->GetNumLines(); } -const eeVector2f& cUITooltip::AlignOffset() const { +const Vector2f& cUITooltip::AlignOffset() const { return mAlignOffset; } diff --git a/src/eepp/ui/cuiwindow.cpp b/src/eepp/ui/cuiwindow.cpp index c00dfd72c..60166033b 100644 --- a/src/eepp/ui/cuiwindow.cpp +++ b/src/eepp/ui/cuiwindow.cpp @@ -117,7 +117,7 @@ void cUIWindow::CreateModalControl() { cUIControl * Ctrl = cUIManager::instance()->MainControl(); if ( NULL == mModalCtrl ) { - mModalCtrl = eeNew( cUIControlAnim, ( cUIControlAnim::CreateParams( Ctrl , eeVector2i(0,0), Ctrl->Size(), UI_ANCHOR_LEFT | UI_ANCHOR_TOP | UI_ANCHOR_RIGHT | UI_ANCHOR_BOTTOM ) ) ); + mModalCtrl = eeNew( cUIControlAnim, ( cUIControlAnim::CreateParams( Ctrl , Vector2i(0,0), Ctrl->Size(), UI_ANCHOR_LEFT | UI_ANCHOR_TOP | UI_ANCHOR_RIGHT | UI_ANCHOR_BOTTOM ) ) ); } else { mModalCtrl->Pos( 0, 0 ); mModalCtrl->Size( Ctrl->Size() ); @@ -173,7 +173,7 @@ bool cUIWindow::IsType( const Uint32& type ) const { } void cUIWindow::ContainerPosChange( const cUIEvent * Event ) { - eeVector2i PosDiff = mContainer->Pos() - eeVector2i( mBorderLeft->Size().Width(), mWindowDecoration->Size().Height() ); + Vector2i PosDiff = mContainer->Pos() - Vector2i( mBorderLeft->Size().Width(), mWindowDecoration->Size().Height() ); if ( PosDiff.x != 0 || PosDiff.y != 0 ) { mContainer->Pos( mBorderLeft->Size().Width(), mWindowDecoration->Size().Height() ); @@ -262,7 +262,7 @@ void cUIWindow::GetMinWinSize() { if ( NULL == mWindowDecoration || ( mMinWindowSize.x != 0 && mMinWindowSize.y != 0 ) ) return; - eeSize tSize; + Sizei tSize; tSize.x = mBorderLeft->Size().Width() + mBorderRight->Size().Width() - mButtonsPositionFixer.x; tSize.y = mWindowDecoration->Size().Height() + mBorderBottom->Size().Height(); @@ -288,9 +288,9 @@ void cUIWindow::OnSizeChange() { if ( mSize.x < mMinWindowSize.x && mSize.y < mMinWindowSize.y ) { Size( mMinWindowSize ); } else if ( mSize.x < mMinWindowSize.x ) { - Size( eeSize( mMinWindowSize.x, mSize.y ) ); + Size( Sizei( mMinWindowSize.x, mSize.y ) ); } else { - Size( eeSize( mSize.x, mMinWindowSize.y ) ); + Size( Sizei( mSize.x, mMinWindowSize.y ) ); } } else { FixChildsSize(); @@ -299,9 +299,9 @@ void cUIWindow::OnSizeChange() { } } -void cUIWindow::Size( const eeSize& Size ) { +void cUIWindow::Size( const Sizei& Size ) { if ( NULL != mWindowDecoration ) { - eeSize size = Size; + Sizei size = Size; size.x += mBorderLeft->Size().Width() + mBorderRight->Size().Width(); size.y += mWindowDecoration->Size().Height() + mBorderBottom->Size().Height(); @@ -313,10 +313,10 @@ void cUIWindow::Size( const eeSize& Size ) { } void cUIWindow::Size( const Int32& Width, const Int32& Height ) { - Size( eeSize( Width, Height ) ); + Size( Sizei( Width, Height ) ); } -const eeSize& cUIWindow::Size() { +const Sizei& cUIWindow::Size() { return cUIComplexControl::Size(); } @@ -327,7 +327,7 @@ void cUIWindow::FixChildsSize() { } if ( mDecoAutoSize ) { - mDecoSize = eeSize( mSize.Width(), mWindowDecoration->GetSkinSize().Height() ); + mDecoSize = Sizei( mSize.Width(), mWindowDecoration->GetSkinSize().Height() ); } mWindowDecoration->Size( mDecoSize ); @@ -445,7 +445,7 @@ void cUIWindow::DoResize ( const cUIMessage * Msg ) { } void cUIWindow::DecideResizeType( cUIControl * Control ) { - eeVector2i Pos = cUIManager::instance()->GetMousePos(); + Vector2i Pos = cUIManager::instance()->GetMousePos(); WorldToControl( Pos ); @@ -492,7 +492,7 @@ void cUIWindow::TryResize( const UI_RESIZE_TYPE& Type ) { DragEnable( false ); - eeVector2i Pos = cUIManager::instance()->GetMousePos(); + Vector2i Pos = cUIManager::instance()->GetMousePos(); WorldToControl( Pos ); @@ -564,7 +564,7 @@ void cUIWindow::UpdateResize() { return; } - eeVector2i Pos = cUIManager::instance()->GetMousePos(); + Vector2i Pos = cUIManager::instance()->GetMousePos(); WorldToControl( Pos ); @@ -629,10 +629,10 @@ void cUIWindow::UpdateResize() { } void cUIWindow::InternalSize( const Int32& w, const Int32& h ) { - InternalSize( eeSize( w, h ) ); + InternalSize( Sizei( w, h ) ); } -void cUIWindow::InternalSize( eeSize Size ) { +void cUIWindow::InternalSize( Sizei Size ) { if ( Size.x < mMinWindowSize.x || Size.y < mMinWindowSize.y ) { if ( Size.x < mMinWindowSize.x && Size.y < mMinWindowSize.y ) { Size = mMinWindowSize; @@ -660,25 +660,25 @@ void cUIWindow::Draw() { ColorA EndC( 0, 0, 0, 0 ); Float SSize = 16.f; - eeVector2i ShadowPos = mScreenPos + eeVector2i( 0, 16 ); + Vector2i ShadowPos = mScreenPos + Vector2i( 0, 16 ); - P.DrawRectangle( eeRectf( eeVector2f( ShadowPos.x, ShadowPos.y ), eeSizef( mSize.Width(), mSize.Height() ) ), BeginC, BeginC, BeginC, BeginC ); + P.DrawRectangle( Rectf( Vector2f( ShadowPos.x, ShadowPos.y ), Sizef( mSize.Width(), mSize.Height() ) ), BeginC, BeginC, BeginC, BeginC ); - P.DrawRectangle( eeRectf( eeVector2f( ShadowPos.x, ShadowPos.y - SSize ), eeSizef( mSize.Width(), SSize ) ), EndC, BeginC, BeginC, EndC ); + P.DrawRectangle( Rectf( Vector2f( ShadowPos.x, ShadowPos.y - SSize ), Sizef( mSize.Width(), SSize ) ), EndC, BeginC, BeginC, EndC ); - P.DrawRectangle( eeRectf( eeVector2f( ShadowPos.x - SSize, ShadowPos.y ), eeSizef( SSize, mSize.Height() ) ), EndC, EndC, BeginC, BeginC ); + P.DrawRectangle( Rectf( Vector2f( ShadowPos.x - SSize, ShadowPos.y ), Sizef( SSize, mSize.Height() ) ), EndC, EndC, BeginC, BeginC ); - P.DrawRectangle( eeRectf( eeVector2f( ShadowPos.x + mSize.Width(), ShadowPos.y ), eeSizef( SSize, mSize.Height() ) ), BeginC, BeginC, EndC, EndC ); + P.DrawRectangle( Rectf( Vector2f( ShadowPos.x + mSize.Width(), ShadowPos.y ), Sizef( SSize, mSize.Height() ) ), BeginC, BeginC, EndC, EndC ); - P.DrawRectangle( eeRectf( eeVector2f( ShadowPos.x, ShadowPos.y + mSize.Height() ), eeSizef( mSize.Width(), SSize ) ), BeginC, EndC, EndC, BeginC ); + P.DrawRectangle( Rectf( Vector2f( ShadowPos.x, ShadowPos.y + mSize.Height() ), Sizef( mSize.Width(), SSize ) ), BeginC, EndC, EndC, BeginC ); - P.DrawTriangle( eeTriangle2f( eeVector2f( ShadowPos.x + mSize.Width(), ShadowPos.y ), eeVector2f( ShadowPos.x + mSize.Width(), ShadowPos.y - SSize ), eeVector2f( ShadowPos.x + mSize.Width() + SSize, ShadowPos.y ) ), BeginC, EndC, EndC ); + P.DrawTriangle( Triangle2f( Vector2f( ShadowPos.x + mSize.Width(), ShadowPos.y ), Vector2f( ShadowPos.x + mSize.Width(), ShadowPos.y - SSize ), Vector2f( ShadowPos.x + mSize.Width() + SSize, ShadowPos.y ) ), BeginC, EndC, EndC ); - P.DrawTriangle( eeTriangle2f( eeVector2f( ShadowPos.x, ShadowPos.y ), eeVector2f( ShadowPos.x, ShadowPos.y - SSize ), eeVector2f( ShadowPos.x - SSize, ShadowPos.y ) ), BeginC, EndC, EndC ); + P.DrawTriangle( Triangle2f( Vector2f( ShadowPos.x, ShadowPos.y ), Vector2f( ShadowPos.x, ShadowPos.y - SSize ), Vector2f( ShadowPos.x - SSize, ShadowPos.y ) ), BeginC, EndC, EndC ); - P.DrawTriangle( eeTriangle2f( eeVector2f( ShadowPos.x + mSize.Width(), ShadowPos.y + mSize.Height() ), eeVector2f( ShadowPos.x + mSize.Width(), ShadowPos.y + mSize.Height() + SSize ), eeVector2f( ShadowPos.x + mSize.Width() + SSize, ShadowPos.y + mSize.Height() ) ), BeginC, EndC, EndC ); + P.DrawTriangle( Triangle2f( Vector2f( ShadowPos.x + mSize.Width(), ShadowPos.y + mSize.Height() ), Vector2f( ShadowPos.x + mSize.Width(), ShadowPos.y + mSize.Height() + SSize ), Vector2f( ShadowPos.x + mSize.Width() + SSize, ShadowPos.y + mSize.Height() ) ), BeginC, EndC, EndC ); - P.DrawTriangle( eeTriangle2f( eeVector2f( ShadowPos.x, ShadowPos.y + mSize.Height() ), eeVector2f( ShadowPos.x - SSize, ShadowPos.y + mSize.Height() ), eeVector2f( ShadowPos.x, ShadowPos.y + mSize.Height() + SSize ) ), BeginC, EndC, EndC ); + P.DrawTriangle( Triangle2f( Vector2f( ShadowPos.x, ShadowPos.y + mSize.Height() ), Vector2f( ShadowPos.x - SSize, ShadowPos.y + mSize.Height() ), Vector2f( ShadowPos.x, ShadowPos.y + mSize.Height() + SSize ) ), BeginC, EndC, EndC ); P.ForceDraw( true ); } @@ -845,7 +845,7 @@ void cUIWindow::Maximize() { } } -Uint32 cUIWindow::OnMouseDoubleClick( const eeVector2i &Pos, const Uint32 Flags ) { +Uint32 cUIWindow::OnMouseDoubleClick( const Vector2i &Pos, const Uint32 Flags ) { if ( ( mWinFlags & UI_WIN_RESIZEABLE ) && ( NULL != mButtonMaximize ) && ( Flags & EE_BUTTON_LMASK ) ) { ButtonMaximizeClick( NULL ); } @@ -864,8 +864,8 @@ void cUIWindow::CheckShortcuts( const Uint32& KeyCode, const Uint32& Mod ) { KeyboardShortcut kb = (*it); if ( KeyCode == kb.KeyCode && ( Mod & kb.Mod ) ) { - cUIManager::instance()->SendMouseUp( kb.Button, eeVector2i(0,0), EE_BUTTON_LMASK ); - cUIManager::instance()->SendMouseClick( kb.Button, eeVector2i(0,0), EE_BUTTON_LMASK ); + cUIManager::instance()->SendMouseUp( kb.Button, Vector2i(0,0), EE_BUTTON_LMASK ); + cUIManager::instance()->SendMouseClick( kb.Button, Vector2i(0,0), EE_BUTTON_LMASK ); } } } @@ -919,7 +919,7 @@ void cUIWindow::ResizeCursor() { if ( !IsMouseOverMeOrChilds() || !Man->UseGlobalCursors() || ( mWinFlags & UI_WIN_NO_BORDER ) || !( mWinFlags & UI_WIN_RESIZEABLE ) ) return; - eeVector2i Pos = Man->GetMousePos(); + Vector2i Pos = Man->GetMousePos(); WorldToControl( Pos ); diff --git a/src/eepp/ui/cuiwinmenu.cpp b/src/eepp/ui/cuiwinmenu.cpp index 424cf1048..a686aa97b 100644 --- a/src/eepp/ui/cuiwinmenu.cpp +++ b/src/eepp/ui/cuiwinmenu.cpp @@ -174,7 +174,7 @@ Uint32 cUIWinMenu::OnMessage( const cUIMessage * Msg ) { cUISelectButton * tbut = reinterpret_cast ( Msg->Sender() ); cUIPopUpMenu * tpop = GetMenuFromButton( tbut ); - eeVector2i pos( tbut->Pos().x, tbut->Pos().y + tbut->Size().Height() ); + Vector2i pos( tbut->Pos().x, tbut->Pos().y + tbut->Size().Height() ); tpop->Pos( pos ); if ( Msg->Msg() == cUIMessage::MsgMouseEnter ) { diff --git a/src/eepp/ui/tools/ctextureatlaseditor.cpp b/src/eepp/ui/tools/ctextureatlaseditor.cpp index 7f5c2bb0d..e307777b7 100644 --- a/src/eepp/ui/tools/ctextureatlaseditor.cpp +++ b/src/eepp/ui/tools/ctextureatlaseditor.cpp @@ -39,68 +39,68 @@ cTextureAtlasEditor::cTextureAtlasEditor( cUIWindow * AttatchTo, const TGEditorC Uint32 Flags = UI_CONTROL_DEFAULT_ALIGN | UI_ANCHOR_TOP | UI_ANCHOR_RIGHT | UI_CLIP_ENABLE | UI_AUTO_SIZE | UI_TEXT_SELECTION_ENABLED; Uint32 InitY = 230; - CreateTxtBox( eeVector2i( mUIContainer->Size().Width() - 205, 30 ), "SubTexture List:" ); + CreateTxtBox( Vector2i( mUIContainer->Size().Width() - 205, 30 ), "SubTexture List:" ); - mSubTextureList = mTheme->CreateListBox( mUIContainer, eeSize( 200, 156 ), eeVector2i( mUIContainer->Size().Width() - 205, 50 ), UI_CONTROL_DEFAULT_ALIGN | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP ); + mSubTextureList = mTheme->CreateListBox( mUIContainer, Sizei( 200, 156 ), Vector2i( mUIContainer->Size().Width() - 205, 50 ), UI_CONTROL_DEFAULT_ALIGN | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP ); mSubTextureList->Size( mSubTextureList->Size().Width(), mSubTextureList->RowHeight() * 9 + mSubTextureList->PaddingContainer().Top + mSubTextureList->PaddingContainer().Bottom ); mSubTextureList->AddEventListener( cUIEvent::EventOnItemSelected, cb::Make1( this, &cTextureAtlasEditor::OnSubTextureChange ) ); - CreateTxtBox( eeVector2i( mUIContainer->Size().Width() - 205, InitY ), "Current SubTexture:" ); + CreateTxtBox( Vector2i( mUIContainer->Size().Width() - 205, InitY ), "Current SubTexture:" ); InitY +=30; - mSpinOffX = mTheme->CreateSpinBox( mUIContainer, eeSize( 100, 22 ), eeVector2i(), Flags, 0, false ); + mSpinOffX = mTheme->CreateSpinBox( mUIContainer, Sizei( 100, 22 ), Vector2i(), Flags, 0, false ); mSpinOffX->MinValue( -32000 ); mSpinOffX->MaxValue( 32000 ); mSpinOffX->Pos( mUIContainer->Size().Width() - mSpinOffX->Size().Width() - 10, InitY ); mSpinOffX->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cTextureAtlasEditor::OnOffXChange ) ); - TxtBox = CreateTxtBox( eeVector2i(), "Offset X:" ); + TxtBox = CreateTxtBox( Vector2i(), "Offset X:" ); TxtBox->Pos( mSpinOffX->Pos().x - 10 - TxtBox->Size().Width(), InitY ); InitY +=30; - mSpinOffY = mTheme->CreateSpinBox( mUIContainer, eeSize( 100, 22 ), eeVector2i(), Flags, 0, false ); + mSpinOffY = mTheme->CreateSpinBox( mUIContainer, Sizei( 100, 22 ), Vector2i(), Flags, 0, false ); mSpinOffY->MinValue( -32000 ); mSpinOffY->MaxValue( 32000 ); mSpinOffY->Pos( mUIContainer->Size().Width() - mSpinOffY->Size().Width() - 10, InitY ); mSpinOffY->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cTextureAtlasEditor::OnOffYChange ) ); - TxtBox = CreateTxtBox( eeVector2i(), "Offset Y:" ); + TxtBox = CreateTxtBox( Vector2i(), "Offset Y:" ); TxtBox->Pos( mSpinOffY->Pos().x - 10 - TxtBox->Size().Width(), InitY ); InitY +=30; - mSpinDestW = mTheme->CreateSpinBox( mUIContainer, eeSize( 100, 22 ), eeVector2i(), Flags, 0, false ); + mSpinDestW = mTheme->CreateSpinBox( mUIContainer, Sizei( 100, 22 ), Vector2i(), Flags, 0, false ); mSpinDestW->MaxValue( 32000 ); mSpinDestW->Pos( mUIContainer->Size().Width() - mSpinDestW->Size().Width() - 10, InitY ); mSpinDestW->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cTextureAtlasEditor::OnDestWChange ) ); - TxtBox = CreateTxtBox( eeVector2i(), "Dest. Width:" ); + TxtBox = CreateTxtBox( Vector2i(), "Dest. Width:" ); TxtBox->Pos( mSpinDestW->Pos().x - 10 - TxtBox->Size().Width(), InitY ); InitY +=30; - mSpinDestH = mTheme->CreateSpinBox( mUIContainer, eeSize( 100, 22 ), eeVector2i(), Flags, 0, false ); + mSpinDestH = mTheme->CreateSpinBox( mUIContainer, Sizei( 100, 22 ), Vector2i(), Flags, 0, false ); mSpinDestH->MaxValue( 32000 ); mSpinDestH->Pos( mUIContainer->Size().Width() - mSpinDestH->Size().Width() - 10, InitY ); mSpinDestH->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cTextureAtlasEditor::OnDestHChange ) ); - TxtBox = CreateTxtBox( eeVector2i(), "Dest. Height:" ); + TxtBox = CreateTxtBox( Vector2i(), "Dest. Height:" ); TxtBox->Pos( mSpinDestH->Pos().x - 10 - TxtBox->Size().Width(), InitY ); Uint32 ButFlags = UI_CONTROL_ALIGN_CENTER | UI_ANCHOR_TOP | UI_ANCHOR_RIGHT | UI_AUTO_SIZE; - cUIPushButton * ResetButton = mTheme->CreatePushButton( mUIContainer, eeSize( 120, 22 ), eeVector2i( mUIContainer->Size().Width() - 120 - 5 , mSpinDestH->Pos().y + mSpinDestH->Size().Height() + 8 ), ButFlags ); + cUIPushButton * ResetButton = mTheme->CreatePushButton( mUIContainer, Sizei( 120, 22 ), Vector2i( mUIContainer->Size().Width() - 120 - 5 , mSpinDestH->Pos().y + mSpinDestH->Size().Height() + 8 ), ButFlags ); ResetButton->Text( "Reset Dest. Size" ); ResetButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cTextureAtlasEditor::OnResetDestSize ) ); - cUIPushButton * ResetOffsetButton = mTheme->CreatePushButton( mUIContainer, eeSize( 120, 22 ), eeVector2i( ResetButton->Pos().x, ResetButton->Pos().y + ResetButton->Size().Height() + 8 ), ButFlags ); + cUIPushButton * ResetOffsetButton = mTheme->CreatePushButton( mUIContainer, Sizei( 120, 22 ), Vector2i( ResetButton->Pos().x, ResetButton->Pos().y + ResetButton->Size().Height() + 8 ), ButFlags ); ResetOffsetButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cTextureAtlasEditor::OnResetOffset ) ); ResetOffsetButton->Text( "Reset Offset" ); - cUIPushButton * CenterOffsetButton = mTheme->CreatePushButton( mUIContainer, eeSize( 120, 22 ), eeVector2i( ResetOffsetButton->Pos().x, ResetOffsetButton->Pos().y + ResetOffsetButton->Size().Height() + 8 ), ButFlags ); + cUIPushButton * CenterOffsetButton = mTheme->CreatePushButton( mUIContainer, Sizei( 120, 22 ), Vector2i( ResetOffsetButton->Pos().x, ResetOffsetButton->Pos().y + ResetOffsetButton->Size().Height() + 8 ), ButFlags ); CenterOffsetButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cTextureAtlasEditor::OnCenterOffset ) ); CenterOffsetButton->Text( "Centered Offset" ); - cUIPushButton * HBOffsetButton = mTheme->CreatePushButton( mUIContainer, eeSize( 120, 22 ), eeVector2i( CenterOffsetButton->Pos().x, CenterOffsetButton->Pos().y + CenterOffsetButton->Size().Height() + 8 ), ButFlags ); + cUIPushButton * HBOffsetButton = mTheme->CreatePushButton( mUIContainer, Sizei( 120, 22 ), Vector2i( CenterOffsetButton->Pos().x, CenterOffsetButton->Pos().y + CenterOffsetButton->Size().Height() + 8 ), ButFlags ); HBOffsetButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cTextureAtlasEditor::OnHBOffset ) ); HBOffsetButton->Text( "Half-Bottom Offset" ); @@ -135,7 +135,7 @@ void cTextureAtlasEditor::OnResetDestSize( const cUIEvent * Event ) { const cUIEventMouse * MouseEvent = reinterpret_cast ( Event ); if ( NULL != mCurSubTexture && MouseEvent->Flags() & EE_BUTTON_LMASK ) { - eeSize RealSize = mCurSubTexture->RealSize(); + Sizei RealSize = mCurSubTexture->RealSize(); mCurSubTexture->ResetDestSize(); @@ -157,7 +157,7 @@ void cTextureAtlasEditor::OnCenterOffset( const cUIEvent * Event ) { const cUIEventMouse * MouseEvent = reinterpret_cast ( Event ); if ( NULL != mCurSubTexture && MouseEvent->Flags() & EE_BUTTON_LMASK ) { - eeSize NSize( -( (Int32)mCurSubTexture->DestSize().x / 2 ), -( (Int32)mCurSubTexture->DestSize().y / 2 ) ); + Sizei NSize( -( (Int32)mCurSubTexture->DestSize().x / 2 ), -( (Int32)mCurSubTexture->DestSize().y / 2 ) ); mSpinOffX->Value( NSize.x ); mSpinOffY->Value( NSize.y ); @@ -168,7 +168,7 @@ void cTextureAtlasEditor::OnHBOffset( const cUIEvent * Event ) { const cUIEventMouse * MouseEvent = reinterpret_cast ( Event ); if ( NULL != mCurSubTexture && MouseEvent->Flags() & EE_BUTTON_LMASK ) { - eeSize NSize( -( (Int32)mCurSubTexture->DestSize().x / 2 ), -(Int32)mCurSubTexture->DestSize().y ); + Sizei NSize( -( (Int32)mCurSubTexture->DestSize().x / 2 ), -(Int32)mCurSubTexture->DestSize().y ); mSpinOffX->Value( NSize.x ); mSpinOffY->Value( NSize.y ); @@ -177,30 +177,30 @@ void cTextureAtlasEditor::OnHBOffset( const cUIEvent * Event ) { void cTextureAtlasEditor::OnOffXChange( const cUIEvent * Event ) { if ( NULL != mCurSubTexture ) { - mCurSubTexture->Offset( eeVector2i( (Int32)mSpinOffX->Value(), mCurSubTexture->Offset().y ) ); + mCurSubTexture->Offset( Vector2i( (Int32)mSpinOffX->Value(), mCurSubTexture->Offset().y ) ); } } void cTextureAtlasEditor::OnOffYChange( const cUIEvent * Event ) { if ( NULL != mCurSubTexture ) { - mCurSubTexture->Offset( eeVector2i( mCurSubTexture->Offset().x, (Int32)mSpinOffY->Value() ) ); + mCurSubTexture->Offset( Vector2i( mCurSubTexture->Offset().x, (Int32)mSpinOffY->Value() ) ); } } void cTextureAtlasEditor::OnDestWChange( const cUIEvent * Event ) { if ( NULL != mCurSubTexture ) { - mCurSubTexture->DestSize( eeSizef( (Int32)mSpinDestW->Value(), mCurSubTexture->DestSize().y ) ); + mCurSubTexture->DestSize( Sizef( (Int32)mSpinDestW->Value(), mCurSubTexture->DestSize().y ) ); } } void cTextureAtlasEditor::OnDestHChange( const cUIEvent * Event ) { if ( NULL != mCurSubTexture ) { - mCurSubTexture->DestSize( eeSizef( mCurSubTexture->DestSize().x, (Int32)mSpinDestH->Value() ) ); + mCurSubTexture->DestSize( Sizef( mCurSubTexture->DestSize().x, (Int32)mSpinDestH->Value() ) ); } } -cUITextBox * cTextureAtlasEditor::CreateTxtBox( eeVector2i Pos, const String& Text ) { - return mTheme->CreateTextBox( Text, mUIContainer, eeSize(), Pos, UI_CONTROL_DEFAULT_ALIGN | UI_ANCHOR_TOP | UI_ANCHOR_RIGHT | UI_DRAW_SHADOW | UI_AUTO_SIZE ); +cUITextBox * cTextureAtlasEditor::CreateTxtBox( Vector2i Pos, const String& Text ) { + return mTheme->CreateTextBox( Text, mUIContainer, Sizei(), Pos, UI_CONTROL_DEFAULT_ALIGN | UI_ANCHOR_TOP | UI_ANCHOR_RIGHT | UI_DRAW_SHADOW | UI_AUTO_SIZE ); } void cTextureAtlasEditor::WindowClose( const cUIEvent * Event ) { @@ -240,7 +240,7 @@ void cTextureAtlasEditor::FileMenuClick( const cUIEvent * Event ) { if ( "New..." == txt ) { eeNew( cTextureAtlasNew, ( cb::Make1( this, &cTextureAtlasEditor::OnTextureAtlasCreate ) ) ); } else if ( "Open..." == txt ) { - cUICommonDialog * TGDialog = mTheme->CreateCommonDialog( NULL, eeSize(), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL, eeSize(), 255, UI_CDL_DEFAULT_FLAGS, std::string( "*" ) + EE_TEXTURE_ATLAS_EXTENSION ); + cUICommonDialog * TGDialog = mTheme->CreateCommonDialog( NULL, Sizei(), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL, Sizei(), 255, UI_CDL_DEFAULT_FLAGS, std::string( "*" ) + EE_TEXTURE_ATLAS_EXTENSION ); TGDialog->Title( "Open Texture Atlas" ); TGDialog->AddEventListener( cUIEvent::EventOpenFile, cb::Make1( this, &cTextureAtlasEditor::OpenTextureAtlas ) ); diff --git a/src/eepp/ui/tools/ctextureatlasnew.cpp b/src/eepp/ui/tools/ctextureatlasnew.cpp index 6e92e5f2f..af0f8f307 100644 --- a/src/eepp/ui/tools/ctextureatlasnew.cpp +++ b/src/eepp/ui/tools/ctextureatlasnew.cpp @@ -16,14 +16,14 @@ cTextureAtlasNew::cTextureAtlasNew( TGCreateCb NewTGCb ) : if ( NULL == mTheme ) return; - mUIWindow = mTheme->CreateWindow( NULL, eeSize( 378, 244 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL ); + mUIWindow = mTheme->CreateWindow( NULL, Sizei( 378, 244 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MODAL ); mUIWindow->AddEventListener( cUIEvent::EventOnWindowClose, cb::Make1( this, &cTextureAtlasNew::WindowClose ) ); mUIWindow->Title( "New Texture Atlas" ); Int32 PosX = mUIWindow->Container()->Size().Width() - 110; - CreateTxtBox( eeVector2i( 10, 20 ), "Save File Format:" ); - mSaveFileType = mTheme->CreateDropDownList( mUIWindow->Container(), eeSize( 100, 22 ), eeVector2i( PosX, 20 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE ); + CreateTxtBox( Vector2i( 10, 20 ), "Save File Format:" ); + mSaveFileType = mTheme->CreateDropDownList( mUIWindow->Container(), Sizei( 100, 22 ), Vector2i( PosX, 20 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE ); std::vector FileTypes; FileTypes.push_back( "TGA" ); @@ -34,11 +34,11 @@ cTextureAtlasNew::cTextureAtlasNew( TGCreateCb NewTGCb ) : mSaveFileType->ListBox()->AddListBoxItems( FileTypes ); mSaveFileType->ListBox()->SetSelected( "PNG" ); - CreateTxtBox( eeVector2i( 10, 50 ), "Max. Texture Atlas Width:" ); - mComboWidth = mTheme->CreateComboBox( mUIWindow->Container(), eeSize( 100, 22 ), eeVector2i( PosX, 50 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE ); + CreateTxtBox( Vector2i( 10, 50 ), "Max. Texture Atlas Width:" ); + mComboWidth = mTheme->CreateComboBox( mUIWindow->Container(), Sizei( 100, 22 ), Vector2i( PosX, 50 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE ); - CreateTxtBox( eeVector2i( 10, 80 ), "Max. Texture Atlas Height:" ); - mComboHeight = mTheme->CreateComboBox( mUIWindow->Container(), eeSize( 100, 22 ), eeVector2i( PosX, 80 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE ); + CreateTxtBox( Vector2i( 10, 80 ), "Max. Texture Atlas Height:" ); + mComboHeight = mTheme->CreateComboBox( mUIWindow->Container(), Sizei( 100, 22 ), Vector2i( PosX, 80 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE ); std::vector Sizes; @@ -53,23 +53,23 @@ cTextureAtlasNew::cTextureAtlasNew( TGCreateCb NewTGCb ) : mComboWidth->ListBox()->SetSelected( "512" ); mComboHeight->ListBox()->SetSelected( "512" ); - CreateTxtBox( eeVector2i( 10, 110 ), "Space between sub textures (pixels):" ); - mPixelSpace = mTheme->CreateSpinBox( mUIWindow->Container(), eeSize( 100, 22 ), eeVector2i( PosX, 110 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_SIZE | UI_TEXT_SELECTION_ENABLED, 0, false ); + CreateTxtBox( Vector2i( 10, 110 ), "Space between sub textures (pixels):" ); + mPixelSpace = mTheme->CreateSpinBox( mUIWindow->Container(), Sizei( 100, 22 ), Vector2i( PosX, 110 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_SIZE | UI_TEXT_SELECTION_ENABLED, 0, false ); - CreateTxtBox( eeVector2i( 10, 140 ), "Texture Atlas Folder Path:" ); - mTGPath = mTheme->CreateTextInput( mUIWindow->Container(), eeSize( mUIWindow->Container()->Size().Width() - 60, 22 ), eeVector2i( 10, 160 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE , false, 512 ); + CreateTxtBox( Vector2i( 10, 140 ), "Texture Atlas Folder Path:" ); + mTGPath = mTheme->CreateTextInput( mUIWindow->Container(), Sizei( mUIWindow->Container()->Size().Width() - 60, 22 ), Vector2i( 10, 160 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE , false, 512 ); mTGPath->AllowEditing( false ); - mSetPathButton = mTheme->CreatePushButton( mUIWindow->Container(), eeSize( 32, 32 ), eeVector2i( mUIWindow->Container()->Size().Width() - 10 - 32, 160 ) ); + mSetPathButton = mTheme->CreatePushButton( mUIWindow->Container(), Sizei( 32, 32 ), Vector2i( mUIWindow->Container()->Size().Width() - 10 - 32, 160 ) ); mSetPathButton->Text( "..." ); mSetPathButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cTextureAtlasNew::OnDialogFolderSelect ) ); - cUIPushButton * OKButton = mTheme->CreatePushButton( mUIWindow->Container(), eeSize( 80, 22 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->GetIconByName( "ok" ) ); + cUIPushButton * OKButton = mTheme->CreatePushButton( mUIWindow->Container(), Sizei( 80, 22 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->GetIconByName( "ok" ) ); OKButton->Pos( mUIWindow->Container()->Size().Width() - OKButton->Size().Width() - 4, mUIWindow->Container()->Size().Height() - OKButton->Size().Height() - 4 ); OKButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cTextureAtlasNew::OKClick ) ); OKButton->Text( "OK" ); - cUIPushButton * CancelButton = mTheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), eeVector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->GetIconByName( "cancel" ) ); + cUIPushButton * CancelButton = mTheme->CreatePushButton( mUIWindow->Container(), OKButton->Size(), Vector2i( OKButton->Pos().x - OKButton->Size().Width() - 4, OKButton->Pos().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->GetIconByName( "cancel" ) ); CancelButton->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cTextureAtlasNew::CancelClick ) ); CancelButton->Text( "Cancel" ); @@ -80,8 +80,8 @@ cTextureAtlasNew::cTextureAtlasNew( TGCreateCb NewTGCb ) : cTextureAtlasNew::~cTextureAtlasNew() { } -cUITextBox * cTextureAtlasNew::CreateTxtBox( eeVector2i Pos, const String& Text ) { - return mTheme->CreateTextBox( Text, mUIWindow->Container(), eeSize(), Pos, UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); +cUITextBox * cTextureAtlasNew::CreateTxtBox( Vector2i Pos, const String& Text ) { + return mTheme->CreateTextBox( Text, mUIWindow->Container(), Sizei(), Pos, UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); } void cTextureAtlasNew::OKClick( const cUIEvent * Event ) { @@ -91,7 +91,7 @@ void cTextureAtlasNew::OKClick( const cUIEvent * Event ) { std::string ext( mSaveFileType->Text() ); String::ToLower( ext ); - cUICommonDialog * TGDialog = mTheme->CreateCommonDialog( NULL, eeSize(), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL, eeSize(), 255, UI_CDL_DEFAULT_FLAGS | CDL_FLAG_SAVE_DIALOG, "*." + ext ); + cUICommonDialog * TGDialog = mTheme->CreateCommonDialog( NULL, Sizei(), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL, Sizei(), 255, UI_CDL_DEFAULT_FLAGS | CDL_FLAG_SAVE_DIALOG, "*." + ext ); TGDialog->Title( "Save Texture Atlas" ); TGDialog->AddEventListener( cUIEvent::EventSaveFile, cb::Make1( this, &cTextureAtlasNew::TextureAtlasSave ) ); @@ -159,7 +159,7 @@ void cTextureAtlasNew::OnDialogFolderSelect( const cUIEvent * Event ) { const cUIEventMouse * MouseEvent = reinterpret_cast( Event ); if ( MouseEvent->Flags() & EE_BUTTON_LMASK ) { - cUICommonDialog * TGDialog = mTheme->CreateCommonDialog( NULL, eeSize(), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL, eeSize(), 255, UI_CDL_DEFAULT_FLAGS | CDL_FLAG_ALLOW_FOLDER_SELECT, "*" ); + cUICommonDialog * TGDialog = mTheme->CreateCommonDialog( NULL, Sizei(), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL, Sizei(), 255, UI_CDL_DEFAULT_FLAGS | CDL_FLAG_ALLOW_FOLDER_SELECT, "*" ); TGDialog->Title( "Create Texture Atlas ( Select Folder Containing Textures )" ); TGDialog->AddEventListener( cUIEvent::EventOpenFile, cb::Make1( this, &cTextureAtlasNew::OnSelectFolder ) ); diff --git a/src/eepp/ui/tools/ctextureatlasnew.hpp b/src/eepp/ui/tools/ctextureatlasnew.hpp index 9c082810f..1567b3f18 100644 --- a/src/eepp/ui/tools/ctextureatlasnew.hpp +++ b/src/eepp/ui/tools/ctextureatlasnew.hpp @@ -34,7 +34,7 @@ class EE_API cTextureAtlasNew { void OKClick( const cUIEvent * Event ); - cUITextBox * CreateTxtBox( eeVector2i Pos, const String& Text ); + cUITextBox * CreateTxtBox( Vector2i Pos, const String& Text ); void OnDialogFolderSelect( const cUIEvent * Event ); diff --git a/src/eepp/ui/tools/ctextureatlassubtextureeditor.cpp b/src/eepp/ui/tools/ctextureatlassubtextureeditor.cpp index 31320bd8e..f3cf0d591 100644 --- a/src/eepp/ui/tools/ctextureatlassubtextureeditor.cpp +++ b/src/eepp/ui/tools/ctextureatlassubtextureeditor.cpp @@ -35,21 +35,21 @@ cTextureAtlasSubTextureEditor::~cTextureAtlasSubTextureEditor() { void cTextureAtlasSubTextureEditor::Draw() { cPrimitives P; 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() ) ) ); + P.DrawLine( Line2f( Vector2f( mScreenPos.x, mScreenPos.y + mUICenter.y ), Vector2f( mScreenPos.x + mSize.Width(), mScreenPos.y + mUICenter.y ) ) ); + P.DrawLine( Line2f( Vector2f( mScreenPos.x + mUICenter.x, mScreenPos.y ), Vector2f( mScreenPos.x + mUICenter.x, mScreenPos.y + mSize.Height() ) ) ); cUIComplexControl::Draw(); } void cTextureAtlasSubTextureEditor::Update() { - eeVector2i Pos = mDrag->Pos(); + Vector2i Pos = mDrag->Pos(); cUIComplexControl::Update(); if ( NULL != mGfx->SubTexture() && mDrag->DragEnable() && mDrag->Dragging() && Pos != mDrag->Pos() ) { - eeVector2i Diff = -( Pos - mDrag->Pos() ); + Vector2i Diff = -( Pos - mDrag->Pos() ); - mGfx->SubTexture()->Offset( eeVector2i( mGfx->SubTexture()->Offset().x + Diff.x, mGfx->SubTexture()->Offset().y + Diff.y ) ); + mGfx->SubTexture()->Offset( Vector2i( mGfx->SubTexture()->Offset().x + Diff.x, mGfx->SubTexture()->Offset().y + Diff.y ) ); mEditor->SpinOffX()->Value( mGfx->SubTexture()->Offset().x ); mEditor->SpinOffY()->Value( mGfx->SubTexture()->Offset().y ); @@ -75,7 +75,7 @@ cUIGfx * cTextureAtlasSubTextureEditor::Gfx() const { } void cTextureAtlasSubTextureEditor::GetCenter() { - mUICenter = eeVector2i( mSize.Width() / 2, mSize.Height() / 2 ); + mUICenter = Vector2i( mSize.Width() / 2, mSize.Height() / 2 ); } }}} diff --git a/src/eepp/ui/tools/ctextureatlassubtextureeditor.hpp b/src/eepp/ui/tools/ctextureatlassubtextureeditor.hpp index 1644e7869..93e3a83ac 100644 --- a/src/eepp/ui/tools/ctextureatlassubtextureeditor.hpp +++ b/src/eepp/ui/tools/ctextureatlassubtextureeditor.hpp @@ -29,7 +29,7 @@ class EE_API cTextureAtlasSubTextureEditor : public cUIComplexControl { cUITheme * mTheme; cUIGfx * mGfx; cUIDragable * mDrag; - eeVector2i mUICenter; + Vector2i mUICenter; cTextureAtlasEditor * mEditor; virtual void OnSizeChange(); diff --git a/src/eepp/window/backend/SDL/ccursormanagersdl.cpp b/src/eepp/window/backend/SDL/ccursormanagersdl.cpp index cb9d9ed2e..560d03c60 100644 --- a/src/eepp/window/backend/SDL/ccursormanagersdl.cpp +++ b/src/eepp/window/backend/SDL/ccursormanagersdl.cpp @@ -18,7 +18,7 @@ cCursorManagerSDL::cCursorManagerSDL( cWindow * window ) : { } -cCursor * cCursorManagerSDL::Create( cTexture * tex, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cCursorManagerSDL::Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { #if defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_WIN return mWindow->GetPlatform()->CreateMouseCursor( tex, hotspot, name ); #else @@ -26,7 +26,7 @@ cCursor * cCursorManagerSDL::Create( cTexture * tex, const eeVector2i& hotspot, #endif } -cCursor * cCursorManagerSDL::Create( cImage * img, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cCursorManagerSDL::Create( cImage * img, const Vector2i& hotspot, const std::string& name ) { #if defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_WIN return mWindow->GetPlatform()->CreateMouseCursor( img, hotspot, name ); #else @@ -34,7 +34,7 @@ cCursor * cCursorManagerSDL::Create( cImage * img, const eeVector2i& hotspot, co #endif } -cCursor * cCursorManagerSDL::Create( const std::string& path, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cCursorManagerSDL::Create( const std::string& path, const Vector2i& hotspot, const std::string& name ) { #if defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_WIN return mWindow->GetPlatform()->CreateMouseCursor( path, hotspot, name ); #else diff --git a/src/eepp/window/backend/SDL/ccursormanagersdl.hpp b/src/eepp/window/backend/SDL/ccursormanagersdl.hpp index 72c80bae0..458f04277 100644 --- a/src/eepp/window/backend/SDL/ccursormanagersdl.hpp +++ b/src/eepp/window/backend/SDL/ccursormanagersdl.hpp @@ -14,11 +14,11 @@ class cCursorManagerSDL : public cCursorManager { public: cCursorManagerSDL( Window::cWindow * window ); - cCursor * Create( cTexture * tex, const eeVector2i& hotspot, const std::string& name ); + cCursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( cImage * img, const eeVector2i& hotspot, const std::string& name ); + cCursor * Create( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( const std::string& path, const eeVector2i& hotspot, const std::string& name ); + cCursor * Create( const std::string& path, const Vector2i& hotspot, const std::string& name ); void Set( cCursor * cursor ); diff --git a/src/eepp/window/backend/SDL/ccursorsdl.cpp b/src/eepp/window/backend/SDL/ccursorsdl.cpp index 629780f98..980f09b8b 100644 --- a/src/eepp/window/backend/SDL/ccursorsdl.cpp +++ b/src/eepp/window/backend/SDL/ccursorsdl.cpp @@ -4,17 +4,17 @@ namespace EE { namespace Window { namespace Backend { namespace SDL { -cCursorSDL::cCursorSDL( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorSDL::cCursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( tex, hotspot, name, window ) { } -cCursorSDL::cCursorSDL( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorSDL::cCursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( img, hotspot, name, window ) { } -cCursorSDL::cCursorSDL( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorSDL::cCursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( path, hotspot, name, window ) { } diff --git a/src/eepp/window/backend/SDL/ccursorsdl.hpp b/src/eepp/window/backend/SDL/ccursorsdl.hpp index e6896e633..4512fbfc1 100644 --- a/src/eepp/window/backend/SDL/ccursorsdl.hpp +++ b/src/eepp/window/backend/SDL/ccursorsdl.hpp @@ -1,7 +1,7 @@ #ifndef EE_WINDOWCCURSORSDL_HPP #define EE_WINDOWCCURSORSDL_HPP -#include +#include #include #ifdef EE_BACKEND_SDL_1_2 @@ -14,11 +14,11 @@ class cCursorSDL : public cCursor { protected: friend class cCursorManagerSDL; - cCursorSDL( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorSDL( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorSDL( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); void Create(); }; diff --git a/src/eepp/window/backend/SDL/cinputsdl.cpp b/src/eepp/window/backend/SDL/cinputsdl.cpp index 7dc37de3a..82218e664 100644 --- a/src/eepp/window/backend/SDL/cinputsdl.cpp +++ b/src/eepp/window/backend/SDL/cinputsdl.cpp @@ -225,7 +225,7 @@ void cInputSDL::InjectMousePos( const Uint16& x, const Uint16& y ) { } void cInputSDL::Init() { - eeVector2if mTempMouse; + Vector2if mTempMouse; SDL_GetMouseState( &mTempMouse.x, &mTempMouse.y ); mMousePos.x = (int)mTempMouse.x; mMousePos.y = (int)mTempMouse.y; diff --git a/src/eepp/window/backend/SDL/cjoysticksdl.cpp b/src/eepp/window/backend/SDL/cjoysticksdl.cpp index 247efb000..f08e70668 100644 --- a/src/eepp/window/backend/SDL/cjoysticksdl.cpp +++ b/src/eepp/window/backend/SDL/cjoysticksdl.cpp @@ -67,8 +67,8 @@ Float cJoystickSDL::GetAxis( const Int32& axis ) { return 0; } -eeVector2i cJoystickSDL::GetBallMotion( const Int32& ball ) { - eeVector2i v; +Vector2i cJoystickSDL::GetBallMotion( const Int32& ball ) { + Vector2i v; if ( ball >= 0 && ball < mBalls ) SDL_JoystickGetBall( mJoystick, ball, &v.x, &v.y ); diff --git a/src/eepp/window/backend/SDL/cjoysticksdl.hpp b/src/eepp/window/backend/SDL/cjoysticksdl.hpp index c2739d752..a1e02cabe 100644 --- a/src/eepp/window/backend/SDL/cjoysticksdl.hpp +++ b/src/eepp/window/backend/SDL/cjoysticksdl.hpp @@ -31,7 +31,7 @@ class EE_API cJoystickSDL : public cJoystick { Float GetAxis( const Int32& axis ); - eeVector2i GetBallMotion( const Int32& ball ); + Vector2i GetBallMotion( const Int32& ball ); bool Plugged() const; protected: diff --git a/src/eepp/window/backend/SDL/cwindowsdl.cpp b/src/eepp/window/backend/SDL/cwindowsdl.cpp index 6e14d9410..43bb7ea81 100644 --- a/src/eepp/window/backend/SDL/cwindowsdl.cpp +++ b/src/eepp/window/backend/SDL/cwindowsdl.cpp @@ -72,7 +72,7 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) { const SDL_VideoInfo * videoInfo = SDL_GetVideoInfo(); - mWindow.DesktopResolution = eeSize( videoInfo->current_w, videoInfo->current_h ); + mWindow.DesktopResolution = Sizei( videoInfo->current_w, videoInfo->current_h ); if ( mWindow.WindowConfig.Style & WindowStyle::UseDesktopResolution ) { mWindow.WindowConfig.Width = mWindow.DesktopResolution.Width(); @@ -107,7 +107,7 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) { return false; } - mWindow.WindowSize = eeSize( mWindow.WindowConfig.Width, mWindow.WindowConfig.Height ); + mWindow.WindowSize = Sizei( mWindow.WindowConfig.Width, mWindow.WindowConfig.Height ); if ( NULL == mSurface ) { eePRINTL( "Unable to set video mode: %s", SDL_GetError() ); @@ -314,9 +314,9 @@ void cWindowSDL::Size( Uint32 Width, Uint32 Height, bool Windowed ) { mWindow.WindowConfig.Height = Height; if ( Windowed ) { - mWindow.WindowSize = eeSize( Width, Height ); + mWindow.WindowSize = Sizei( Width, Height ); } else { - mWindow.WindowSize = eeSize( oldWidth, oldHeight ); + mWindow.WindowSize = Sizei( oldWidth, oldHeight ); } if ( this->Windowed() && !Windowed ) { diff --git a/src/eepp/window/backend/SDL/cwindowsdl.hpp b/src/eepp/window/backend/SDL/cwindowsdl.hpp index 074cbcd0d..58a1ba431 100644 --- a/src/eepp/window/backend/SDL/cwindowsdl.hpp +++ b/src/eepp/window/backend/SDL/cwindowsdl.hpp @@ -47,7 +47,7 @@ class EE_API cWindowSDL : public cWindow { SDL_SysWMinfo * mWMinfo; #endif - eeVector2i mWinPos; + Vector2i mWinPos; void CreatePlatform(); diff --git a/src/eepp/window/backend/SDL2/ccursormanagersdl2.cpp b/src/eepp/window/backend/SDL2/ccursormanagersdl2.cpp index fe6cafbac..1291c80c4 100644 --- a/src/eepp/window/backend/SDL2/ccursormanagersdl2.cpp +++ b/src/eepp/window/backend/SDL2/ccursormanagersdl2.cpp @@ -21,15 +21,15 @@ cCursorManagerSDL::cCursorManagerSDL( cWindow * window ) : { } -cCursor * cCursorManagerSDL::Create( cTexture * tex, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cCursorManagerSDL::Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { return eeNew( cCursorSDL, ( tex, hotspot, name, mWindow ) ); } -cCursor * cCursorManagerSDL::Create( cImage * img, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cCursorManagerSDL::Create( cImage * img, const Vector2i& hotspot, const std::string& name ) { return eeNew( cCursorSDL, ( img, hotspot, name, mWindow ) ); } -cCursor * cCursorManagerSDL::Create( const std::string& path, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cCursorManagerSDL::Create( const std::string& path, const Vector2i& hotspot, const std::string& name ) { return eeNew( cCursorSDL, ( path, hotspot, name, mWindow ) ); } diff --git a/src/eepp/window/backend/SDL2/ccursormanagersdl2.hpp b/src/eepp/window/backend/SDL2/ccursormanagersdl2.hpp index 7656989fb..ffcf3d7f3 100644 --- a/src/eepp/window/backend/SDL2/ccursormanagersdl2.hpp +++ b/src/eepp/window/backend/SDL2/ccursormanagersdl2.hpp @@ -14,11 +14,11 @@ class cCursorManagerSDL : public cCursorManager { public: cCursorManagerSDL( Window::cWindow * window ); - cCursor * Create( cTexture * tex, const eeVector2i& hotspot, const std::string& name ); + cCursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( cImage * img, const eeVector2i& hotspot, const std::string& name ); + cCursor * Create( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( const std::string& path, const eeVector2i& hotspot, const std::string& name ); + cCursor * Create( const std::string& path, const Vector2i& hotspot, const std::string& name ); void Set( cCursor * cursor ); diff --git a/src/eepp/window/backend/SDL2/ccursorsdl2.cpp b/src/eepp/window/backend/SDL2/ccursorsdl2.cpp index acc82a353..24f71551e 100644 --- a/src/eepp/window/backend/SDL2/ccursorsdl2.cpp +++ b/src/eepp/window/backend/SDL2/ccursorsdl2.cpp @@ -4,21 +4,21 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 { -cCursorSDL::cCursorSDL( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorSDL::cCursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( tex, hotspot, name, window ), mCursor( NULL ) { Create(); } -cCursorSDL::cCursorSDL( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorSDL::cCursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( img, hotspot, name, window ), mCursor( NULL ) { Create(); } -cCursorSDL::cCursorSDL( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorSDL::cCursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( path, hotspot, name, window ), mCursor( NULL ) { diff --git a/src/eepp/window/backend/SDL2/ccursorsdl2.hpp b/src/eepp/window/backend/SDL2/ccursorsdl2.hpp index c185e9437..c4553c1c0 100644 --- a/src/eepp/window/backend/SDL2/ccursorsdl2.hpp +++ b/src/eepp/window/backend/SDL2/ccursorsdl2.hpp @@ -18,11 +18,11 @@ class cCursorSDL : public cCursor { SDL_Cursor * mCursor; - cCursorSDL( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorSDL( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorSDL( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); virtual ~cCursorSDL(); diff --git a/src/eepp/window/backend/SDL2/cinputsdl2.cpp b/src/eepp/window/backend/SDL2/cinputsdl2.cpp index db4e2f329..3ad2fb8c3 100644 --- a/src/eepp/window/backend/SDL2/cinputsdl2.cpp +++ b/src/eepp/window/backend/SDL2/cinputsdl2.cpp @@ -322,7 +322,7 @@ void cInputSDL::InjectMousePos( const Uint16& x, const Uint16& y ) { } void cInputSDL::Init() { - eeVector2if mTempMouse; + Vector2if mTempMouse; SDL_GetMouseState( &mTempMouse.x, &mTempMouse.y ); diff --git a/src/eepp/window/backend/SDL2/cjoysticksdl2.cpp b/src/eepp/window/backend/SDL2/cjoysticksdl2.cpp index afacced3b..115a07d5f 100644 --- a/src/eepp/window/backend/SDL2/cjoysticksdl2.cpp +++ b/src/eepp/window/backend/SDL2/cjoysticksdl2.cpp @@ -75,8 +75,8 @@ Float cJoystickSDL::GetAxis( const Int32& axis ) { return 0; } -eeVector2i cJoystickSDL::GetBallMotion( const Int32& ball ) { - eeVector2i v; +Vector2i cJoystickSDL::GetBallMotion( const Int32& ball ) { + Vector2i v; if ( ball >= 0 && ball < mBalls ) SDL_JoystickGetBall( mJoystick, ball, &v.x, &v.y ); diff --git a/src/eepp/window/backend/SDL2/cjoysticksdl2.hpp b/src/eepp/window/backend/SDL2/cjoysticksdl2.hpp index acba8e5fe..9b19944aa 100644 --- a/src/eepp/window/backend/SDL2/cjoysticksdl2.hpp +++ b/src/eepp/window/backend/SDL2/cjoysticksdl2.hpp @@ -26,7 +26,7 @@ class EE_API cJoystickSDL : public cJoystick { Float GetAxis( const Int32& axis ); - eeVector2i GetBallMotion( const Int32& ball ); + Vector2i GetBallMotion( const Int32& ball ); bool Plugged() const; protected: diff --git a/src/eepp/window/backend/SDL2/cwindowsdl2.cpp b/src/eepp/window/backend/SDL2/cwindowsdl2.cpp index 952bbea63..fc17b96ff 100644 --- a/src/eepp/window/backend/SDL2/cwindowsdl2.cpp +++ b/src/eepp/window/backend/SDL2/cwindowsdl2.cpp @@ -115,7 +115,7 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) { SDL_DisplayMode dpm; SDL_GetDesktopDisplayMode( 0, &dpm ); - mWindow.DesktopResolution = eeSize( dpm.w, dpm.h ); + mWindow.DesktopResolution = Sizei( dpm.w, dpm.h ); #if EE_PLATFORM == EE_PLATFORM_ANDROID mWindow.WindowConfig.Style = WindowStyle::Fullscreen | WindowStyle::UseDesktopResolution; @@ -160,7 +160,7 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) { mWindow.WindowConfig.Width = w; mWindow.WindowConfig.Height = h; - mWindow.WindowSize = eeSize( mWindow.WindowConfig.Width, mWindow.WindowConfig.Height ); + mWindow.WindowSize = Sizei( mWindow.WindowConfig.Width, mWindow.WindowConfig.Height ); #if EE_PLATFORM == EE_PLATFORM_ANDROID || EE_PLATFORM == EE_PLATFORM_IOS eePRINTL( "Choosing GL Version from: %d", Context.Version ); @@ -390,9 +390,9 @@ void cWindowSDL::Size( Uint32 Width, Uint32 Height, bool Windowed ) { mWindow.WindowConfig.Height = Height; if ( Windowed ) { - mWindow.WindowSize = eeSize( Width, Height ); + mWindow.WindowSize = Sizei( Width, Height ); } else { - mWindow.WindowSize = eeSize( oldWidth, oldHeight ); + mWindow.WindowSize = Sizei( oldWidth, oldHeight ); } if ( this->Windowed() && !Windowed ) { @@ -570,8 +570,8 @@ void cWindowSDL::Position( Int16 Left, Int16 Top ) { SDL_SetWindowPosition( mSDLWindow, Left, Top ); } -eeVector2i cWindowSDL::Position() { - eeVector2i p; +Vector2i cWindowSDL::Position() { + Vector2i p; SDL_GetWindowPosition( mSDLWindow, &p.x, &p.y ); @@ -582,10 +582,10 @@ void cWindowSDL::UpdateDesktopResolution() { SDL_DisplayMode dpm; SDL_GetDesktopDisplayMode( SDL_GetWindowDisplayIndex( mSDLWindow ), &dpm ); - mWindow.DesktopResolution = eeSize( dpm.w, dpm.h ); + mWindow.DesktopResolution = Sizei( dpm.w, dpm.h ); } -const eeSize& cWindowSDL::GetDesktopResolution() { +const Sizei& cWindowSDL::GetDesktopResolution() { UpdateDesktopResolution(); return cWindow::GetDesktopResolution(); } @@ -606,7 +606,7 @@ void cWindowSDL::StopTextInput() { SDL_StopTextInput(); } -void cWindowSDL::SetTextInputRect( eeRecti& rect ) { +void cWindowSDL::SetTextInputRect( Recti& rect ) { SDL_Rect r; r.x = rect.Left; diff --git a/src/eepp/window/backend/SDL2/cwindowsdl2.hpp b/src/eepp/window/backend/SDL2/cwindowsdl2.hpp index 0387b7167..195e87439 100644 --- a/src/eepp/window/backend/SDL2/cwindowsdl2.hpp +++ b/src/eepp/window/backend/SDL2/cwindowsdl2.hpp @@ -55,9 +55,9 @@ class EE_API cWindowSDL : public cWindow { virtual void Position( Int16 Left, Int16 Top ); - virtual eeVector2i Position(); + virtual Vector2i Position(); - const eeSize& GetDesktopResolution(); + const Sizei& GetDesktopResolution(); SDL_Window * GetSDLWindow() const; @@ -67,7 +67,7 @@ class EE_API cWindowSDL : public cWindow { void StopTextInput(); - void SetTextInputRect( eeRecti& rect ); + void SetTextInputRect( Recti& rect ); bool HasScreenKeyboardSupport(); @@ -107,7 +107,7 @@ class EE_API cWindowSDL : public cWindow { Zip * mZip; #endif - eeVector2i mWinPos; + Vector2i mWinPos; void CreatePlatform(); diff --git a/src/eepp/window/backend/SFML/ccursormanagersfml.cpp b/src/eepp/window/backend/SFML/ccursormanagersfml.cpp index 629041137..7369f9a71 100644 --- a/src/eepp/window/backend/SFML/ccursormanagersfml.cpp +++ b/src/eepp/window/backend/SFML/ccursormanagersfml.cpp @@ -17,7 +17,7 @@ cCursorManagerSFML::cCursorManagerSFML( cWindow * window ) : { } -cCursor * cCursorManagerSFML::Create( cTexture * tex, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cCursorManagerSFML::Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { #if defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_WIN return mWindow->GetPlatform()->CreateMouseCursor( tex, hotspot, name ); #else @@ -25,7 +25,7 @@ cCursor * cCursorManagerSFML::Create( cTexture * tex, const eeVector2i& hotspot, #endif } -cCursor * cCursorManagerSFML::Create( cImage * img, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cCursorManagerSFML::Create( cImage * img, const Vector2i& hotspot, const std::string& name ) { #if defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_WIN return mWindow->GetPlatform()->CreateMouseCursor( img, hotspot, name ); #else @@ -33,7 +33,7 @@ cCursor * cCursorManagerSFML::Create( cImage * img, const eeVector2i& hotspot, c #endif } -cCursor * cCursorManagerSFML::Create( const std::string& path, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cCursorManagerSFML::Create( const std::string& path, const Vector2i& hotspot, const std::string& name ) { #if defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_WIN return mWindow->GetPlatform()->CreateMouseCursor( path, hotspot, name ); #else diff --git a/src/eepp/window/backend/SFML/ccursormanagersfml.hpp b/src/eepp/window/backend/SFML/ccursormanagersfml.hpp index a4376c95b..386b43c6c 100644 --- a/src/eepp/window/backend/SFML/ccursormanagersfml.hpp +++ b/src/eepp/window/backend/SFML/ccursormanagersfml.hpp @@ -13,11 +13,11 @@ class cCursorManagerSFML : public cCursorManager { public: cCursorManagerSFML( Window::cWindow * window ); - cCursor * Create( cTexture * tex, const eeVector2i& hotspot, const std::string& name ); + cCursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( cImage * img, const eeVector2i& hotspot, const std::string& name ); + cCursor * Create( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( const std::string& path, const eeVector2i& hotspot, const std::string& name ); + cCursor * Create( const std::string& path, const Vector2i& hotspot, const std::string& name ); void Set( cCursor * cursor ); diff --git a/src/eepp/window/backend/SFML/ccursorsfml.cpp b/src/eepp/window/backend/SFML/ccursorsfml.cpp index 3710d8f87..5772de3d0 100644 --- a/src/eepp/window/backend/SFML/ccursorsfml.cpp +++ b/src/eepp/window/backend/SFML/ccursorsfml.cpp @@ -4,17 +4,17 @@ namespace EE { namespace Window { namespace Backend { namespace SFML { -cCursorSFML::cCursorSFML( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorSFML::cCursorSFML( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( tex, hotspot, name, window ) { } -cCursorSFML::cCursorSFML( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorSFML::cCursorSFML( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( img, hotspot, name, window ) { } -cCursorSFML::cCursorSFML( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorSFML::cCursorSFML( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( path, hotspot, name, window ) { } diff --git a/src/eepp/window/backend/SFML/ccursorsfml.hpp b/src/eepp/window/backend/SFML/ccursorsfml.hpp index 2ebb239f7..57e73d680 100644 --- a/src/eepp/window/backend/SFML/ccursorsfml.hpp +++ b/src/eepp/window/backend/SFML/ccursorsfml.hpp @@ -13,11 +13,11 @@ class cCursorSFML : public cCursor { protected: friend class cCursorManagerSFML; - cCursorSFML( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorSFML( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorSFML( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorSFML( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorSFML( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorSFML( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); void Create(); }; diff --git a/src/eepp/window/backend/SFML/cinputsfml.cpp b/src/eepp/window/backend/SFML/cinputsfml.cpp index e2ba7c8bb..0593c62b2 100644 --- a/src/eepp/window/backend/SFML/cinputsfml.cpp +++ b/src/eepp/window/backend/SFML/cinputsfml.cpp @@ -66,7 +66,7 @@ void cInputSFML::Update() { case sf::Event::MouseMoved: { EEEvent.Type = InputEvent::MouseMotion; - eeVector2i mp( win->GetInput()->GetMousePos() ); + Vector2i mp( win->GetInput()->GetMousePos() ); EEEvent.motion.xrel = mp.x - event.mouseMove.x; EEEvent.motion.yrel = mp.y - event.mouseMove.y; EEEvent.motion.x = event.mouseMove.x; diff --git a/src/eepp/window/backend/SFML/cjoysticksfml.cpp b/src/eepp/window/backend/SFML/cjoysticksfml.cpp index 3c33b3ab7..771bfb1bc 100644 --- a/src/eepp/window/backend/SFML/cjoysticksfml.cpp +++ b/src/eepp/window/backend/SFML/cjoysticksfml.cpp @@ -73,8 +73,8 @@ Float cJoystickSFML::GetAxis( const Int32& axis ) { return sf::Joystick::getAxisPosition( mIndex, raxis ) * 0.01; } -eeVector2i cJoystickSFML::GetBallMotion( const Int32& ball ) { - return eeVector2i(); +Vector2i cJoystickSFML::GetBallMotion( const Int32& ball ) { + return Vector2i(); } bool cJoystickSFML::Plugged() const { diff --git a/src/eepp/window/backend/SFML/cjoysticksfml.hpp b/src/eepp/window/backend/SFML/cjoysticksfml.hpp index e8c1d4512..b5c10e4d6 100644 --- a/src/eepp/window/backend/SFML/cjoysticksfml.hpp +++ b/src/eepp/window/backend/SFML/cjoysticksfml.hpp @@ -23,7 +23,7 @@ class EE_API cJoystickSFML : public cJoystick { Float GetAxis( const Int32& axis ); - eeVector2i GetBallMotion( const Int32& ball ); + Vector2i GetBallMotion( const Int32& ball ); bool Plugged() const; protected: diff --git a/src/eepp/window/backend/SFML/cwindowsfml.cpp b/src/eepp/window/backend/SFML/cwindowsfml.cpp index 19c021342..0baaeb66d 100644 --- a/src/eepp/window/backend/SFML/cwindowsfml.cpp +++ b/src/eepp/window/backend/SFML/cwindowsfml.cpp @@ -36,7 +36,7 @@ bool cWindowSFML::Create( WindowSettings Settings, ContextSettings Context ) { sf::VideoMode mode = sf::VideoMode::getDesktopMode(); mWindow.WindowConfig = Settings; mWindow.ContextConfig = Context; - mWindow.DesktopResolution = eeSize( mode.width, mode.height ); + mWindow.DesktopResolution = Sizei( mode.width, mode.height ); if ( mWindow.WindowConfig.Style & WindowStyle::Titlebar ) mWindow.Flags |= sf::Style::Titlebar; @@ -153,9 +153,9 @@ bool cWindowSFML::Visible() { return mVisible; } -eeVector2i cWindowSFML::Position() { +Vector2i cWindowSFML::Position() { sf::Vector2i v( mSFMLWindow.getPosition() ); - return eeVector2i( v.x, v.y ); + return Vector2i( v.x, v.y ); } void cWindowSFML::Size( Uint32 Width, Uint32 Height, bool Windowed ) { diff --git a/src/eepp/window/backend/SFML/cwindowsfml.hpp b/src/eepp/window/backend/SFML/cwindowsfml.hpp index 28682f04a..1ad3480e0 100644 --- a/src/eepp/window/backend/SFML/cwindowsfml.hpp +++ b/src/eepp/window/backend/SFML/cwindowsfml.hpp @@ -36,7 +36,7 @@ class EE_API cWindowSFML : public cWindow { bool Visible(); - eeVector2i Position(); + Vector2i Position(); void Size( Uint32 Width, Uint32 Height, bool Windowed ); diff --git a/src/eepp/window/backend/null/ccursormanagernull.cpp b/src/eepp/window/backend/null/ccursormanagernull.cpp index 7af625032..16fba4917 100644 --- a/src/eepp/window/backend/null/ccursormanagernull.cpp +++ b/src/eepp/window/backend/null/ccursormanagernull.cpp @@ -8,15 +8,15 @@ cCursorManagerNull::cCursorManagerNull( cWindow * window ) : { } -cCursor * cCursorManagerNull::Create( cTexture * tex, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cCursorManagerNull::Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { return eeNew( cCursorNull, ( tex, hotspot, name, mWindow ) ); } -cCursor * cCursorManagerNull::Create( cImage * img, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cCursorManagerNull::Create( cImage * img, const Vector2i& hotspot, const std::string& name ) { return eeNew( cCursorNull, ( img, hotspot, name, mWindow ) ); } -cCursor * cCursorManagerNull::Create( const std::string& path, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cCursorManagerNull::Create( const std::string& path, const Vector2i& hotspot, const std::string& name ) { return eeNew( cCursorNull, ( path, hotspot, name, mWindow ) ); } @@ -33,10 +33,10 @@ void cCursorManagerNull::Hide() { } void cCursorManagerNull::Visible( bool visible ) { -} - -void cCursorManagerNull::Remove( cCursor * cursor, bool Delete ) { - cCursorManager::Remove( cursor, Delete ); +} + +void cCursorManagerNull::Remove( cCursor * cursor, bool Delete ) { + cCursorManager::Remove( cursor, Delete ); } void cCursorManagerNull::Reload() { diff --git a/src/eepp/window/backend/null/ccursormanagernull.hpp b/src/eepp/window/backend/null/ccursormanagernull.hpp index 120c80179..38567e48a 100644 --- a/src/eepp/window/backend/null/ccursormanagernull.hpp +++ b/src/eepp/window/backend/null/ccursormanagernull.hpp @@ -11,11 +11,11 @@ class cCursorManagerNull : public cCursorManager { public: cCursorManagerNull( Window::cWindow * window ); - cCursor * Create( cTexture * tex, const eeVector2i& hotspot, const std::string& name ); + cCursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( cImage * img, const eeVector2i& hotspot, const std::string& name ); + cCursor * Create( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( const std::string& path, const eeVector2i& hotspot, const std::string& name ); + cCursor * Create( const std::string& path, const Vector2i& hotspot, const std::string& name ); void Set( cCursor * cursor ); diff --git a/src/eepp/window/backend/null/ccursornull.cpp b/src/eepp/window/backend/null/ccursornull.cpp index 0c754cb39..c34639445 100644 --- a/src/eepp/window/backend/null/ccursornull.cpp +++ b/src/eepp/window/backend/null/ccursornull.cpp @@ -2,17 +2,17 @@ namespace EE { namespace Window { namespace Backend { namespace Null { -cCursorNull::cCursorNull( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorNull::cCursorNull( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( tex, hotspot, name, window ) { } -cCursorNull::cCursorNull( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorNull::cCursorNull( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( img, hotspot, name, window ) { } -cCursorNull::cCursorNull( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorNull::cCursorNull( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( path, hotspot, name, window ) { } diff --git a/src/eepp/window/backend/null/ccursornull.hpp b/src/eepp/window/backend/null/ccursornull.hpp index 447728d46..4e0249c72 100644 --- a/src/eepp/window/backend/null/ccursornull.hpp +++ b/src/eepp/window/backend/null/ccursornull.hpp @@ -11,11 +11,11 @@ class cCursorNull : public cCursor { protected: friend class cCursorManagerNull; - cCursorNull( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorNull( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorNull( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorNull( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorNull( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorNull( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); void Create(); }; diff --git a/src/eepp/window/backend/null/cjoysticknull.cpp b/src/eepp/window/backend/null/cjoysticknull.cpp index 211c54359..ee12d25f8 100644 --- a/src/eepp/window/backend/null/cjoysticknull.cpp +++ b/src/eepp/window/backend/null/cjoysticknull.cpp @@ -27,8 +27,8 @@ Float cJoystickNull::GetAxis( const Int32& axis ) { return 0; } -eeVector2i cJoystickNull::GetBallMotion( const Int32& ball ) { - return eeVector2i(); +Vector2i cJoystickNull::GetBallMotion( const Int32& ball ) { + return Vector2i(); } bool cJoystickNull::Plugged() const { diff --git a/src/eepp/window/backend/null/cjoysticknull.hpp b/src/eepp/window/backend/null/cjoysticknull.hpp index 61e7e852e..3a9146a60 100644 --- a/src/eepp/window/backend/null/cjoysticknull.hpp +++ b/src/eepp/window/backend/null/cjoysticknull.hpp @@ -21,7 +21,7 @@ class EE_API cJoystickNull : public cJoystick { Float GetAxis( const Int32& axis ); - eeVector2i GetBallMotion( const Int32& ball ); + Vector2i GetBallMotion( const Int32& ball ); bool Plugged() const; protected: diff --git a/src/eepp/window/backend/null/cwindownull.cpp b/src/eepp/window/backend/null/cwindownull.cpp index 957cff2f8..f437d8005 100644 --- a/src/eepp/window/backend/null/cwindownull.cpp +++ b/src/eepp/window/backend/null/cwindownull.cpp @@ -58,8 +58,8 @@ bool cWindowNull::Visible() { return true; } -eeVector2i cWindowNull::Position() { - return eeVector2i(); +Vector2i cWindowNull::Position() { + return Vector2i(); } void cWindowNull::Size( Uint32 Width, Uint32 Height, bool Windowed ) { diff --git a/src/eepp/window/backend/null/cwindownull.hpp b/src/eepp/window/backend/null/cwindownull.hpp index 04f692f64..45ccc1872 100644 --- a/src/eepp/window/backend/null/cwindownull.hpp +++ b/src/eepp/window/backend/null/cwindownull.hpp @@ -37,7 +37,7 @@ class EE_API cWindowNull : public cWindow { bool Visible(); - eeVector2i Position(); + Vector2i Position(); void Size( Uint32 Width, Uint32 Height, bool Windowed ); diff --git a/src/eepp/window/ccursor.cpp b/src/eepp/window/ccursor.cpp index 92f52dc3b..000fd5d82 100644 --- a/src/eepp/window/ccursor.cpp +++ b/src/eepp/window/ccursor.cpp @@ -2,7 +2,7 @@ namespace EE { namespace Window { -cCursor::cCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursor::cCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : mId( String::Hash( name ) ), mName( name ), mImage( NULL ), @@ -18,7 +18,7 @@ cCursor::cCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& } } -cCursor::cCursor( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursor::cCursor( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : mId( String::Hash( name ) ), mName( name ), mImage( NULL ), @@ -32,7 +32,7 @@ cCursor::cCursor( cImage * img, const eeVector2i& hotspot, const std::string& na } } -cCursor::cCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursor::cCursor( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : mId( String::Hash( name ) ), mName( name ), mImage( NULL ), @@ -50,7 +50,7 @@ cCursor::~cCursor() { eeSAFE_DELETE( mImage ); } -const eeVector2i& cCursor::HotSpot() const { +const Vector2i& cCursor::HotSpot() const { return mHotSpot; } diff --git a/src/eepp/window/cinput.cpp b/src/eepp/window/cinput.cpp index 5fd612f57..f6197a8ae 100644 --- a/src/eepp/window/cinput.cpp +++ b/src/eepp/window/cinput.cpp @@ -261,22 +261,22 @@ void cInput::InjectButtonRelease( const Uint32& Button ) { } } -eeVector2i cInput::GetMousePos() const { +Vector2i cInput::GetMousePos() const { return mMousePos; } -void cInput::SetMousePos( const eeVector2i& Pos ) { +void cInput::SetMousePos( const Vector2i& Pos ) { mMousePos = Pos; } -eeVector2f cInput::GetMousePosf() { - return eeVector2f( (Float)mMousePos.x, (Float)mMousePos.y ); +Vector2f cInput::GetMousePosf() { + return Vector2f( (Float)mMousePos.x, (Float)mMousePos.y ); } -eeVector2i cInput::GetMousePosFromView( const cView& View ) { - eeVector2i RealMousePos = GetMousePos(); - eeRecti RView = View.GetView(); - return eeVector2i( RealMousePos.x - RView.Left, RealMousePos.y - RView.Top ); +Vector2i cInput::GetMousePosFromView( const cView& View ) { + Vector2i RealMousePos = GetMousePos(); + Recti RView = View.GetView(); + return Vector2i( RealMousePos.x - RView.Left, RealMousePos.y - RView.Top ); } Uint16 cInput::MouseX() const { @@ -298,7 +298,7 @@ void cInput::PopCallback( const Uint32& CallbackId ) { mCallbacks.erase( mCallbacks.find(CallbackId) ); } -void cInput::InjectMousePos( const eeVector2i& Pos ) { +void cInput::InjectMousePos( const Vector2i& Pos ) { InjectMousePos( Pos.x, Pos.y ); } diff --git a/src/eepp/window/cinputfinger.cpp b/src/eepp/window/cinputfinger.cpp index b49758097..f4ae1635b 100644 --- a/src/eepp/window/cinputfinger.cpp +++ b/src/eepp/window/cinputfinger.cpp @@ -25,8 +25,8 @@ bool cInputFinger::WasDown() { return was_down; } -eeVector2i cInputFinger::Pos() { - return eeVector2i( x, y ); +Vector2i cInputFinger::Pos() { + return Vector2i( x, y ); } void cInputFinger::WriteLast() { diff --git a/src/eepp/window/cview.cpp b/src/eepp/window/cview.cpp index 2dd6994f4..68782eb3d 100755 --- a/src/eepp/window/cview.cpp +++ b/src/eepp/window/cview.cpp @@ -15,7 +15,7 @@ cView::cView( const int& X, const int& Y, const int& Width, const int& Height ) SetView( X, Y, Width, Height ); } -cView::cView( const eeRecti& View ) : mNeedUpdate(true) { +cView::cView( const Recti& View ) : mNeedUpdate(true) { mView = View; CalcCenter(); @@ -38,11 +38,11 @@ void cView::CalcCenter() { mCenter.y = ( ( mView.Top + mView.Bottom ) - mView.Top ) * 0.5f; } -eeVector2i cView::Center() const { - return eeVector2i( (int)mCenter.x, (Int32)mCenter.y ); +Vector2i cView::Center() const { + return Vector2i( (int)mCenter.x, (Int32)mCenter.y ); } -void cView::Center( const eeVector2i& Center ) { +void cView::Center( const Vector2i& Center ) { mCenter.x = (Float)Center.x; mCenter.y = (Float)Center.y; mView.Left = static_cast ( mCenter.x - (Float)mView.Right * 0.5f ); @@ -59,12 +59,12 @@ void cView::Move( const int& OffsetX, const int& OffsetY ) { mNeedUpdate = true; } -void cView::Move( const eeVector2i& Offset ) { +void cView::Move( const Vector2i& Offset ) { Move( Offset.x, Offset.y ); } -void cView::Scale( const eeVector2f& Factor ) { - eeVector2f v( mView.Right * 0.5f, mView.Bottom * 0.5f ); +void cView::Scale( const Vector2f& Factor ) { + Vector2f v( mView.Right * 0.5f, mView.Bottom * 0.5f ); mView.Left = mView.Left + static_cast ( v.x - v.x * Factor.x ); mView.Top = mView.Top + static_cast ( v.y - v.y * Factor.y ); @@ -76,7 +76,7 @@ void cView::Scale( const eeVector2f& Factor ) { } void cView::Scale( const Float& Factor ) { - Scale( eeVector2f( Factor, Factor ) ); + Scale( Vector2f( Factor, Factor ) ); } void cView::SetPosition( const int& X, const int& Y ) { diff --git a/src/eepp/window/cwindow.cpp b/src/eepp/window/cwindow.cpp index d364d0df9..82e73bd5f 100644 --- a/src/eepp/window/cwindow.cpp +++ b/src/eepp/window/cwindow.cpp @@ -62,8 +62,8 @@ cWindow::~cWindow() { eeSAFE_DELETE( mPlatform ); } -eeSize cWindow::Size() { - return eeSize( mWindow.WindowConfig.Width, mWindow.WindowConfig.Height ); +Sizei cWindow::Size() { + return Sizei( mWindow.WindowConfig.Width, mWindow.WindowConfig.Height ); } const Uint32& cWindow::GetWidth() const { @@ -74,7 +74,7 @@ const Uint32& cWindow::GetHeight() const { return mWindow.WindowConfig.Height; } -const eeSize& cWindow::GetDesktopResolution() { +const Sizei& cWindow::GetDesktopResolution() { return mWindow.DesktopResolution; } @@ -111,7 +111,7 @@ void cWindow::SetViewport( const Int32& x, const Int32& y, const Uint32& Width, void cWindow::SetView( const cView& View ) { mCurrentView = &View; - eeRecti RView = mCurrentView->GetView(); + Recti RView = mCurrentView->GetView(); SetViewport( RView.Left, RView.Top, RView.Right, RView.Bottom ); } @@ -466,11 +466,11 @@ void cWindow::Position( Int16 Left, Int16 Top ) { mPlatform->MoveWindow( Left, Top ); } -eeVector2i cWindow::Position() { +Vector2i cWindow::Position() { if ( NULL != mPlatform ) return mPlatform->Position(); - return eeVector2i(); + return Vector2i(); } void cWindow::SetCurrentContext( eeWindowContex Context ) { @@ -506,7 +506,7 @@ bool cWindow::IsTextInputActive() { void cWindow::StopTextInput() { } -void cWindow::SetTextInputRect( eeRecti& rect ) { +void cWindow::SetTextInputRect( Recti& rect ) { } bool cWindow::HasScreenKeyboardSupport() diff --git a/src/eepp/window/platform/null/cnullimpl.cpp b/src/eepp/window/platform/null/cnullimpl.cpp index 0fed4bb39..6c3981259 100644 --- a/src/eepp/window/platform/null/cnullimpl.cpp +++ b/src/eepp/window/platform/null/cnullimpl.cpp @@ -35,8 +35,8 @@ void cNullImpl::MoveWindow( int left, int top ) { void cNullImpl::SetContext( eeWindowContex Context ) { } -eeVector2i cNullImpl::Position() { - return eeVector2i(0,0); +Vector2i cNullImpl::Position() { + return Vector2i(0,0); } void cNullImpl::ShowMouseCursor() { @@ -45,15 +45,15 @@ void cNullImpl::ShowMouseCursor() { void cNullImpl::HideMouseCursor() { } -cCursor * cNullImpl::CreateMouseCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cNullImpl::CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { return NULL; } -cCursor * cNullImpl::CreateMouseCursor( cImage * img, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cNullImpl::CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ) { return NULL; } -cCursor * cNullImpl::CreateMouseCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cNullImpl::CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ) { return NULL; } diff --git a/src/eepp/window/platform/null/cnullimpl.hpp b/src/eepp/window/platform/null/cnullimpl.hpp index c34384871..bdd52abec 100644 --- a/src/eepp/window/platform/null/cnullimpl.hpp +++ b/src/eepp/window/platform/null/cnullimpl.hpp @@ -30,17 +30,17 @@ class cNullImpl : public cPlatformImpl { void SetContext( eeWindowContex Context ); - eeVector2i Position(); + Vector2i Position(); void ShowMouseCursor(); void HideMouseCursor(); - cCursor * CreateMouseCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name ); + cCursor * CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( cImage * img, const eeVector2i& hotspot, const std::string& name ); + cCursor * CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name ); + cCursor * CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ); void SetMouseCursor( cCursor * cursor ); diff --git a/src/eepp/window/platform/osx/cosximpl.cpp b/src/eepp/window/platform/osx/cosximpl.cpp index 422026cf3..282140f0e 100644 --- a/src/eepp/window/platform/osx/cosximpl.cpp +++ b/src/eepp/window/platform/osx/cosximpl.cpp @@ -40,8 +40,8 @@ void cOSXImpl::SetContext( eeWindowContex Context ) { aglSetCurrentContext( Context ); } -eeVector2i cOSXImpl::Position() { - return eeVector2i(0,0); +Vector2i cOSXImpl::Position() { + return Vector2i(0,0); } void cOSXImpl::ShowMouseCursor() { @@ -50,15 +50,15 @@ void cOSXImpl::ShowMouseCursor() { void cOSXImpl::HideMouseCursor() { } -cCursor * cOSXImpl::CreateMouseCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cOSXImpl::CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { return NULL; } -cCursor * cOSXImpl::CreateMouseCursor( cImage * img, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cOSXImpl::CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ) { return NULL; } -cCursor * cOSXImpl::CreateMouseCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cOSXImpl::CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ) { return NULL; } diff --git a/src/eepp/window/platform/osx/cosximpl.hpp b/src/eepp/window/platform/osx/cosximpl.hpp index 7aa67d198..dde7983dd 100644 --- a/src/eepp/window/platform/osx/cosximpl.hpp +++ b/src/eepp/window/platform/osx/cosximpl.hpp @@ -33,17 +33,17 @@ class cOSXImpl : public cPlatformImpl { void SetContext( eeWindowContex Context ); - eeVector2i Position(); + Vector2i Position(); void ShowMouseCursor(); void HideMouseCursor(); - cCursor * CreateMouseCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name ); + cCursor * CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( cImage * img, const eeVector2i& hotspot, const std::string& name ); + cCursor * CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name ); + cCursor * CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ); void SetMouseCursor( cCursor * cursor ); diff --git a/src/eepp/window/platform/win/ccursorwin.cpp b/src/eepp/window/platform/win/ccursorwin.cpp index c667a9aa6..1e16e6fd3 100644 --- a/src/eepp/window/platform/win/ccursorwin.cpp +++ b/src/eepp/window/platform/win/ccursorwin.cpp @@ -14,19 +14,19 @@ namespace EE { namespace Window { namespace Platform { -cCursorWin::cCursorWin( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window ) : +cCursorWin::cCursorWin( cTexture * tex, const Vector2i& hotspot, const std::string& name, cWindow * window ) : cCursor( tex, hotspot, name, window ) { Create(); } -cCursorWin::cCursorWin( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window ) : +cCursorWin::cCursorWin( cImage * img, const Vector2i& hotspot, const std::string& name, cWindow * window ) : cCursor( img, hotspot, name, window ) { Create(); } -cCursorWin::cCursorWin( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window ) : +cCursorWin::cCursorWin( const std::string& path, const Vector2i& hotspot, const std::string& name, cWindow * window ) : cCursor( path, hotspot, name, window ) { Create(); diff --git a/src/eepp/window/platform/win/ccursorwin.hpp b/src/eepp/window/platform/win/ccursorwin.hpp index 5e13d7520..c1482a96b 100644 --- a/src/eepp/window/platform/win/ccursorwin.hpp +++ b/src/eepp/window/platform/win/ccursorwin.hpp @@ -19,11 +19,11 @@ class cCursorWin : public cCursor { void * mCursor; - cCursorWin( cTexture * tex, const eeVector2i& hotspot, const std::string& name, cWindow * window ); + cCursorWin( cTexture * tex, const Vector2i& hotspot, const std::string& name, cWindow * window ); - cCursorWin( cImage * img, const eeVector2i& hotspot, const std::string& name, cWindow * window ); + cCursorWin( cImage * img, const Vector2i& hotspot, const std::string& name, cWindow * window ); - cCursorWin( const std::string& path, const eeVector2i& hotspot, const std::string& name, cWindow * window ); + cCursorWin( const std::string& path, const Vector2i& hotspot, const std::string& name, cWindow * window ); ~cCursorWin(); diff --git a/src/eepp/window/platform/win/cwinimpl.cpp b/src/eepp/window/platform/win/cwinimpl.cpp index 6ab358e39..be0a8c723 100644 --- a/src/eepp/window/platform/win/cwinimpl.cpp +++ b/src/eepp/window/platform/win/cwinimpl.cpp @@ -83,10 +83,10 @@ void cWinImpl::SetContext( eeWindowContex Context ) { wglMakeCurrent( (HDC)GetDC( mHandler ), (HGLRC)Context ); } -eeVector2i cWinImpl::Position() { +Vector2i cWinImpl::Position() { RECT r; GetWindowRect( mHandler, &r ); - return eeVector2i( r.left, r.top ); + return Vector2i( r.left, r.top ); } void cWinImpl::ShowMouseCursor() { @@ -113,15 +113,15 @@ void cWinImpl::HideMouseCursor() { PostMessage( mHandler, WM_SETCURSOR, 0, 0 ); } -cCursor * cWinImpl::CreateMouseCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cWinImpl::CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { return eeNew( cCursorWin, ( tex, hotspot, name, mWindow ) ); } -cCursor * cWinImpl::CreateMouseCursor( cImage * img, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cWinImpl::CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ) { return eeNew( cCursorWin, ( img, hotspot, name, mWindow ) ); } -cCursor * cWinImpl::CreateMouseCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cWinImpl::CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ) { return eeNew( cCursorWin, ( path, hotspot, name, mWindow ) ); } diff --git a/src/eepp/window/platform/win/cwinimpl.hpp b/src/eepp/window/platform/win/cwinimpl.hpp index 9f12ea3f5..4e00169d8 100644 --- a/src/eepp/window/platform/win/cwinimpl.hpp +++ b/src/eepp/window/platform/win/cwinimpl.hpp @@ -33,17 +33,17 @@ class cWinImpl : public cPlatformImpl { void SetContext( eeWindowContex Context ); - eeVector2i Position(); + Vector2i Position(); void ShowMouseCursor(); void HideMouseCursor(); - cCursor * CreateMouseCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name ); + cCursor * CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( cImage * img, const eeVector2i& hotspot, const std::string& name ); + cCursor * CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name ); + cCursor * CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ); void SetMouseCursor( cCursor * cursor ); diff --git a/src/eepp/window/platform/x11/ccursorx11.cpp b/src/eepp/window/platform/x11/ccursorx11.cpp index 62a243d23..53b1002ec 100644 --- a/src/eepp/window/platform/x11/ccursorx11.cpp +++ b/src/eepp/window/platform/x11/ccursorx11.cpp @@ -15,21 +15,21 @@ namespace EE { namespace Window { namespace Platform { -cCursorX11::cCursorX11( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorX11::cCursorX11( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( tex, hotspot, name, window ), mCursor( None ) { Create(); } -cCursorX11::cCursorX11( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorX11::cCursorX11( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( img, hotspot, name, window ), mCursor( None ) { Create(); } -cCursorX11::cCursorX11( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) : +cCursorX11::cCursorX11( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : cCursor( path, hotspot, name, window ), mCursor( None ) { diff --git a/src/eepp/window/platform/x11/ccursorx11.hpp b/src/eepp/window/platform/x11/ccursorx11.hpp index afa2b9caa..d1ae74118 100644 --- a/src/eepp/window/platform/x11/ccursorx11.hpp +++ b/src/eepp/window/platform/x11/ccursorx11.hpp @@ -19,11 +19,11 @@ class cCursorX11 : public cCursor { X11Cursor mCursor; - cCursorX11( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorX11( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorX11( cImage * img, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorX11( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorX11( const std::string& path, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ); + cCursorX11( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); ~cCursorX11(); diff --git a/src/eepp/window/platform/x11/cx11impl.cpp b/src/eepp/window/platform/x11/cx11impl.cpp index 0078e859c..7a93518f6 100644 --- a/src/eepp/window/platform/x11/cx11impl.cpp +++ b/src/eepp/window/platform/x11/cx11impl.cpp @@ -169,13 +169,13 @@ void cX11Impl::SetContext( eeWindowContex Context ) { Unlock(); } -eeVector2i cX11Impl::Position() { +Vector2i cX11Impl::Position() { int x, y; X11Window child_return; XTranslateCoordinates ( mDisplay, mX11Window, DefaultRootWindow( mDisplay ), 0, 0, &x, &y, &child_return ); - return eeVector2i( x, y ); + return Vector2i( x, y ); } void cX11Impl::ShowMouseCursor() { @@ -229,15 +229,15 @@ void cX11Impl::HideMouseCursor() { Unlock(); } -cCursor * cX11Impl::CreateMouseCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cX11Impl::CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { return eeNew( cCursorX11, ( tex, hotspot, name, mWindow ) ); } -cCursor * cX11Impl::CreateMouseCursor( cImage * img, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cX11Impl::CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ) { return eeNew( cCursorX11, ( img, hotspot, name, mWindow ) ); } -cCursor * cX11Impl::CreateMouseCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name ) { +cCursor * cX11Impl::CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ) { return eeNew( cCursorX11, ( path, hotspot, name, mWindow ) ); } diff --git a/src/eepp/window/platform/x11/cx11impl.hpp b/src/eepp/window/platform/x11/cx11impl.hpp index 1c174b1ff..3dd5a807d 100644 --- a/src/eepp/window/platform/x11/cx11impl.hpp +++ b/src/eepp/window/platform/x11/cx11impl.hpp @@ -36,17 +36,17 @@ class cX11Impl : public cPlatformImpl { void SetContext( eeWindowContex Context ); - eeVector2i Position(); + Vector2i Position(); void ShowMouseCursor(); void HideMouseCursor(); - cCursor * CreateMouseCursor( cTexture * tex, const eeVector2i& hotspot, const std::string& name ); + cCursor * CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( cImage * img, const eeVector2i& hotspot, const std::string& name ); + cCursor * CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( const std::string& path, const eeVector2i& hotspot, const std::string& name ); + cCursor * CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ); void SetMouseCursor( cCursor * cursor ); diff --git a/src/examples/empty_window/empty_window.cpp b/src/examples/empty_window/empty_window.cpp index 772be0055..7acc0698d 100644 --- a/src/examples/empty_window/empty_window.cpp +++ b/src/examples/empty_window/empty_window.cpp @@ -23,7 +23,7 @@ void MainLoop() } // Draw a circle - p.DrawCircle( eeVector2f( win->GetWidth() * 0.5f, win->GetHeight() * 0.5f ), 200, 50 ); + p.DrawCircle( Vector2f( win->GetWidth() * 0.5f, win->GetHeight() * 0.5f ), 200, 50 ); // Draw frame win->Display(); diff --git a/src/examples/external_shader/external_shader.cpp b/src/examples/external_shader/external_shader.cpp index f6938395f..82805fdc7 100644 --- a/src/examples/external_shader/external_shader.cpp +++ b/src/examples/external_shader/external_shader.cpp @@ -17,8 +17,8 @@ bool ShadersSupported = false; Float tw; Float th; Float aspectRatio; -eeVector3ff * vertices = eeNewArray( eeVector3ff, ParticlesNum ); -eeVector3ff * velocities = eeNewArray( eeVector3ff, ParticlesNum ); +Vector3ff * vertices = eeNewArray( Vector3ff, ParticlesNum ); +Vector3ff * velocities = eeNewArray( Vector3ff, ParticlesNum ); ColorAf * colors = eeNewArray( ColorAf, ParticlesNum ); void videoResize( cWindow * w ) { @@ -113,7 +113,7 @@ void MainLoop() } Float p; - eeVector2f mf = imp->GetMousePosf(); + Vector2f mf = imp->GetMousePosf(); Float tratio = tw / th; Float touchX = ( mf.x / tw - 1 ) * tratio; Float touchY = -( mf.y / th - 1 ); @@ -186,7 +186,7 @@ void MainLoop() /// VertexPointer assigns values by default to the attribute "dgl_Vertex" /// TextureCoordPointer to "dgl_MultiTexCoord0" - GLi->VertexPointer( 3, GL_FLOAT, sizeof(eeVector3ff), reinterpret_cast ( &vertices[0] ), ParticlesNum * sizeof(float) * 3 ); + GLi->VertexPointer( 3, GL_FLOAT, sizeof(Vector3ff), reinterpret_cast ( &vertices[0] ), ParticlesNum * sizeof(float) * 3 ); /// ColorPointer to "dgl_FrontColor" GLi->ColorPointer( 4, GL_FP, sizeof(ColorAf), reinterpret_cast ( &colors[0] ), ParticlesNum * sizeof(Float) * 4 ); @@ -258,8 +258,8 @@ EE_MAIN_FUNC int main (int argc, char * argv []) for (i = 0; i < ParticlesNum; i++ ) { - vertices[i] = eeVector3ff( 0, 0, 1.83 ); - velocities[i] = eeVector3ff( (Math::Randf() * 2 - 1)*.05, (Math::Randf() * 2 - 1)*.05, .93 + Math::Randf()*.02 ); + vertices[i] = Vector3ff( 0, 0, 1.83 ); + velocities[i] = Vector3ff( (Math::Randf() * 2 - 1)*.05, (Math::Randf() * 2 - 1)*.05, .93 + Math::Randf()*.02 ); colors[i] = ColorAf( Math::Randf() * 0.5, 0.1, 0.8, 0.5 ); } diff --git a/src/examples/fonts/fonts.cpp b/src/examples/fonts/fonts.cpp index 4fc0aaa23..392ba4464 100644 --- a/src/examples/fonts/fonts.cpp +++ b/src/examples/fonts/fonts.cpp @@ -39,7 +39,7 @@ void MainLoop() TxtCache->Draw( 48, ( YPos += TexF2->GetTextHeight() + 24 ) ); // Text rotated and scaled - TTF->Draw( win->GetWidth() * 0.5f - TTF->GetTextWidth() * 0.5f, 512, FONT_DRAW_LEFT, eeVector2f( 0.75f, 0.75f ), 12.5f ); + TTF->Draw( win->GetWidth() * 0.5f - TTF->GetTextWidth() * 0.5f, 512, FONT_DRAW_LEFT, Vector2f( 0.75f, 0.75f ), 12.5f ); // Draw frame win->Display(); diff --git a/src/examples/sprites/sprites.cpp b/src/examples/sprites/sprites.cpp index d126e0d14..7cc1fb4e8 100644 --- a/src/examples/sprites/sprites.cpp +++ b/src/examples/sprites/sprites.cpp @@ -3,9 +3,9 @@ cWindow * win = NULL; // Define a interpolation to control the Rock sprite angle -cInterpolation RockAngle; +Interpolation RockAngle; -cInterpolation PlanetAngle; +Interpolation PlanetAngle; // Create a primitive drawer instance to draw the AABB of the Rock cPrimitives P; @@ -24,7 +24,7 @@ void spriteCallback( Uint32 Event, cSprite * Sprite, void * UserData ) { Sprite->FireEvent( USER_SPRITE_EVENT ); } else if ( Event == USER_SPRITE_EVENT ) { // Create an interpolation to change the angle of the sprite - cInterpolation * RotationInterpolation = reinterpret_cast( UserData ); + Interpolation * RotationInterpolation = reinterpret_cast( UserData ); RotationInterpolation->ClearWaypoints(); RotationInterpolation->AddWaypoint( Sprite->Angle() ); RotationInterpolation->AddWaypoint( Sprite->Angle() + 45.f ); @@ -112,7 +112,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) for ( Int32 my = 0; my < 4; my++ ) { for( Int32 mx = 0; mx < 8; mx++ ) { // DestSize as 0,0 will use the SubTexture size - Rock->AddFrame( RockId, eeSizef( 0, 0 ), eeVector2i( 0, 0 ), eeRecti( mx * 64, my * 64, mx * 64 + 64, my * 64 + 64 ) ); + Rock->AddFrame( RockId, Sizef( 0, 0 ), Vector2i( 0, 0 ), Recti( mx * 64, my * 64, mx * 64 + 64, my * 64 + 64 ) ); } } @@ -140,7 +140,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) P.FillMode( DRAW_LINE ); // Set the sprites position to the screen center - eeVector2i ScreenCenter( cEngine::instance()->GetWidth() / 2, cEngine::instance()->GetHeight() / 2 ); + Vector2i ScreenCenter( cEngine::instance()->GetWidth() / 2, cEngine::instance()->GetHeight() / 2 ); Planet->Position( ScreenCenter.x - Planet->GetAABB().Size().Width() / 2, ScreenCenter.y - Planet->GetAABB().Size().Height() / 2 ); diff --git a/src/examples/vbo_fbo_batch/vbo_fbo_batch.cpp b/src/examples/vbo_fbo_batch/vbo_fbo_batch.cpp index 64a76032c..71fff124d 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, ColorA(255,255,255,100) ); + FBO->GetTexture()->Draw( x * 200, y * 200, -ang, Vector2f::One, ColorA(255,255,255,100) ); } } @@ -61,18 +61,18 @@ void MainLoop() // The batch can be rotated, scale and moved Batch->BatchRotation( ang ); Batch->BatchScale( scale ); - Batch->BatchCenter( eeVector2f( HWidth, HHeight ) ); + Batch->BatchCenter( Vector2f( HWidth, HHeight ) ); // Create a quad to render Float aX = HWidth - 256.f; Float aY = HHeight - 256.f; - eeQuad2f TmpQuad( - eeVector2f( aX , aY ), - eeVector2f( aX , aY + 32.f ), - eeVector2f( aX + 32.f, aY + 32.f ), - eeVector2f( aX + 32.f, aY ) + Quad2f TmpQuad( + Vector2f( aX , aY ), + Vector2f( aX , aY + 32.f ), + Vector2f( aX + 32.f, aY + 32.f ), + Vector2f( aX + 32.f, aY ) ); - TmpQuad.Rotate( ang, eeVector2f( aX + 16.f, aY + 16.f ) ); + TmpQuad.Rotate( ang, Vector2f( aX + 16.f, aY + 16.f ) ); // Begin drawing quads Batch->QuadsBegin(); @@ -120,7 +120,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) // Check if created if ( win->Created() ) { - eePolygon2f Poly( eePolygon2f::CreateRoundedRectangle( 0, 0, 200, 50 ) ); + Polygon2f Poly( Polygon2f::CreateRoundedRectangle( 0, 0, 200, 50 ) ); // Create the Vertex Buffer, the vertex buffer stores the vertex data in the GPU, making the rendering much faster // In the case that Vertex Buffer Object is not supported by the GPU, it will fallback to a inmediate-mode vertex buffer diff --git a/src/test/eetest.cpp b/src/test/eetest.cpp index 4a17943af..0628df4a3 100644 --- a/src/test/eetest.cpp +++ b/src/test/eetest.cpp @@ -100,12 +100,12 @@ void cEETest::Init() { } WP.Type( Ease::QuarticInOut ); - WP.AddWaypoint( eeVector2f(0,0), 100 ); - WP.AddWaypoint( eeVector2f(800,0), 100 ); - WP.AddWaypoint( eeVector2f(0,0), 100 ); - WP.AddWaypoint( eeVector2f(1024,768), 100 ); - WP.AddWaypoint( eeVector2f(0,600), 100 ); - WP.EditWaypoint( 2, eeVector2f(800,600), 100 ); + WP.AddWaypoint( Vector2f(0,0), 100 ); + WP.AddWaypoint( Vector2f(800,0), 100 ); + WP.AddWaypoint( Vector2f(0,0), 100 ); + WP.AddWaypoint( Vector2f(1024,768), 100 ); + WP.AddWaypoint( Vector2f(0,600), 100 ); + WP.EditWaypoint( 2, Vector2f(800,600), 100 ); WP.EraseWaypoint( 3 ); WP.Loop(true); WP.SetTotalTime( Milliseconds( 5000 ) ); @@ -119,7 +119,7 @@ void cEETest::Init() { if ( NULL != mFBO ) mFBO->ClearColor( ColorAf( 0, 0, 0, 0.5f ) ); - eePolygon2f Poly = eePolygon2f::CreateRoundedRectangle( 0, 0, 256, 50 ); + Polygon2f Poly = Polygon2f::CreateRoundedRectangle( 0, 0, 256, 50 ); mVBO = cVertexBuffer::New( VERTEX_FLAGS_PRIMITIVE, DM_TRIANGLE_FAN ); @@ -237,7 +237,7 @@ void cEETest::OnShowMenu( const cUIEvent * Event ) { cUIPushButton * PB = static_cast( Event->Ctrl() ); if ( Menu->Show() ) { - eeVector2i Pos = eeVector2i( (Int32)PB->GetPolygon()[0].x, (Int32)PB->GetPolygon()[0].y - 2 ); + Vector2i Pos = Vector2i( (Int32)PB->GetPolygon()[0].x, (Int32)PB->GetPolygon()[0].y - 2 ); cUIMenu::FixMenuPos( Pos , Menu ); Menu->Pos( Pos ); } @@ -267,13 +267,13 @@ void cEETest::CreateUI() { cUIThemeManager::instance()->DefaultFont( TTF ); cUIThemeManager::instance()->DefaultTheme( "uitheme" ); - cUIControl::CreateParams Params( cUIManager::instance()->MainControl(), eeVector2i(0,0), eeSize( 530, 380 ), UI_FILL_BACKGROUND | UI_CLIP_ENABLE | UI_BORDER ); + cUIControl::CreateParams Params( cUIManager::instance()->MainControl(), Vector2i(0,0), Sizei( 530, 380 ), UI_FILL_BACKGROUND | UI_CLIP_ENABLE | UI_BORDER ); Params.Border.Width( 2 ); Params.Border.Color( 0x979797CC ); 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 ); + cUIWindow * tWin = mTheme->CreateWindow( NULL, Sizei( 530, 405 ), Vector2i( 320, 240 ), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DRAGABLE_CONTAINER , Sizei( 530, 405 ), 200 ); C = tWin->Container(); tWin->Title( "Controls Test" ); @@ -285,7 +285,7 @@ void cEETest::CreateUI() { Params.Background.Corners(0); Params.Background.Colors( ColorA( 0x00FF0077 ), ColorA( 0x00CC0077 ), ColorA( 0x00CC0077 ), ColorA( 0x00FF0077 ) ); Params.Parent( C ); - Params.Size = eeSize( 50, 50 ); + Params.Size = Sizei( 50, 50 ); cUITest * Child = eeNew( cUITest, ( Params ) ); Child->Pos( 240, 130 ); Child->Visible( true ); @@ -295,7 +295,7 @@ void cEETest::CreateUI() { Params.Background.Colors( ColorA( 0xFFFF0077 ), ColorA( 0xCCCC0077 ), ColorA( 0xCCCC0077 ), ColorA( 0xFFFF0077 ) ); Params.Parent( Child ); - Params.Size = eeSize( 25, 25 ); + Params.Size = Sizei( 25, 25 ); cUITest * Child2 = eeNew( cUITest, ( Params ) ); Child2->Pos( 15, 15 ); Child2->Visible( true ); @@ -303,12 +303,12 @@ void cEETest::CreateUI() { Child2->StartRotation( 0.f, 360.f, Milliseconds( 5000.f ) ); Child2->RotationInterpolation()->Loop( true ); - mTheme->CreateSprite( eeNew( cSprite, ( "gn" ) ), C, eeSize(), eeVector2i( 160, 100 ) ); + mTheme->CreateSprite( eeNew( cSprite, ( "gn" ) ), C, Sizei(), Vector2i( 160, 100 ) ); cUITextBox::CreateParams TextParams; TextParams.Parent( C ); TextParams.PosSet( 0, 0 ); - TextParams.Size = eeSize( 320, 240 ); + TextParams.Size = Sizei( 320, 240 ); TextParams.Flags = UI_VALIGN_TOP | UI_HALIGN_RIGHT; cUITextBox * Text = eeNew( cUITextBox, ( TextParams ) ); Text->Visible( true ); @@ -318,7 +318,7 @@ void cEETest::CreateUI() { cUITextInput::CreateParams InputParams; InputParams.Parent( C ); InputParams.PosSet( 20, 216 ); - InputParams.Size = eeSize( 200, 22 ); + InputParams.Size = Sizei( 200, 22 ); InputParams.Flags = UI_VALIGN_CENTER | UI_HALIGN_LEFT | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_TEXT_SELECTION_ENABLED; cUITextInput * Input = eeNew( cUITextInput, ( InputParams ) ); Input->Visible( true ); @@ -328,7 +328,7 @@ void cEETest::CreateUI() { ButtonParams.Parent( C ); ButtonParams.Flags = UI_VALIGN_CENTER | UI_HALIGN_CENTER | UI_AUTO_SIZE; ButtonParams.PosSet( 225, 216 ); - ButtonParams.Size = eeSize( 90, 0 ); + ButtonParams.Size = Sizei( 90, 0 ); ButtonParams.SetIcon( mTheme->GetIconByName( "ok" ) ); cUIPushButton * Button = eeNew( cUIPushButton, ( ButtonParams ) ); Button->Visible( true ); @@ -338,7 +338,7 @@ void cEETest::CreateUI() { Button->TooltipText( "Click and see what happens..." ); TextParams.PosSet( 130, 20 ); - TextParams.Size = eeSize( 80, 22 ); + TextParams.Size = Sizei( 80, 22 ); TextParams.Flags = UI_VALIGN_CENTER | UI_HALIGN_LEFT; cUICheckBox * Checkbox = eeNew( cUICheckBox, ( TextParams ) ); Checkbox->Visible( true ); @@ -360,14 +360,14 @@ void cEETest::CreateUI() { cUISlider::CreateParams SliderParams; SliderParams.Parent( C ); SliderParams.PosSet( 220, 80 ); - SliderParams.Size = eeSize( 80, 24 ); + SliderParams.Size = Sizei( 80, 24 ); mSlider = eeNew( cUISlider, ( SliderParams ) ); mSlider->Visible( true ); mSlider->Enabled( true ); mSlider->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cEETest::OnSliderValueChange ) ); SliderParams.PosSet( 40, 110 ); - SliderParams.Size = eeSize( 24, 80 ); + SliderParams.Size = Sizei( 24, 80 ); SliderParams.VerticalSlider = true; mSlider = eeNew( cUISlider, ( SliderParams ) ); mSlider->Visible( true ); @@ -381,7 +381,7 @@ void cEETest::CreateUI() { cUISpinBox::CreateParams SpinBoxParams; SpinBoxParams.Parent( C ); SpinBoxParams.PosSet( 80, 150 ); - SpinBoxParams.Size = eeSize( 80, 24 ); + SpinBoxParams.Size = Sizei( 80, 24 ); SpinBoxParams.Flags = UI_VALIGN_CENTER | UI_HALIGN_LEFT | UI_CLIP_ENABLE; SpinBoxParams.AllowDotsInNumbers = true; cUISpinBox * mSpinBox = eeNew( cUISpinBox, ( SpinBoxParams ) ); @@ -391,7 +391,7 @@ void cEETest::CreateUI() { cUIScrollBar::CreateParams ScrollBarP; ScrollBarP.Parent( C ); ScrollBarP.PosSet( 0, 0 ); - ScrollBarP.Size = eeSize( 15, 240 ); + ScrollBarP.Size = Sizei( 15, 240 ); ScrollBarP.Flags = UI_AUTO_SIZE; ScrollBarP.VerticalScrollBar = true; mScrollBar = eeNew( cUIScrollBar, ( ScrollBarP ) ); @@ -399,7 +399,7 @@ void cEETest::CreateUI() { mScrollBar->Enabled( true ); mScrollBar->AddEventListener( cUIEvent::EventOnValueChange, cb::Make1( this, &cEETest::OnValueChange ) ); - mProgressBar = mTheme->CreateProgressBar( C, eeSize( 200, 20 ), eeVector2i( 20, 190 ) ); + mProgressBar = mTheme->CreateProgressBar( C, Sizei( 200, 20 ), Vector2i( 20, 190 ) ); TextParams.PosSet( 20, 5 ); mTextBoxValue = eeNew( cUITextBox, ( TextParams ) ); @@ -409,7 +409,7 @@ void cEETest::CreateUI() { cUIListBox::CreateParams LBParams; LBParams.Parent( C ); LBParams.PosSet( 325, 8 ); - LBParams.Size = eeSize( 200, 240-16 ); + LBParams.Size = Sizei( 200, 240-16 ); LBParams.Flags = UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_TOUCH_DRAG_ENABLED; // | UI_MULTI_SELECT mListBox = eeNew( cUIListBox, ( LBParams ) ); mListBox->Visible( true ); @@ -429,7 +429,7 @@ void cEETest::CreateUI() { cUIDropDownList::CreateParams DDLParams; DDLParams.Parent( C ); DDLParams.PosSet( 20, 55 ); - DDLParams.Size = eeSize( 100, 21 ); + DDLParams.Size = Sizei( 100, 21 ); DDLParams.Flags = UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_VALIGN_CENTER | UI_HALIGN_LEFT | UI_TOUCH_DRAG_ENABLED; cUIDropDownList * mDropDownList = eeNew( cUIDropDownList, ( DDLParams ) ); mDropDownList->Visible( true ); @@ -451,7 +451,7 @@ void cEETest::CreateUI() { cUIComboBox::CreateParams ComboParams; ComboParams.Parent( C ); ComboParams.PosSet( 20, 80 ); - ComboParams.Size = eeSize( 100, 1 ); + ComboParams.Size = Sizei( 100, 1 ); ComboParams.Flags = UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_VALIGN_CENTER | UI_HALIGN_LEFT | UI_AUTO_SIZE | UI_TOUCH_DRAG_ENABLED | UI_TEXT_SELECTION_ENABLED; cUIComboBox * mComboBox = eeNew( cUIComboBox, ( ComboParams ) ); mComboBox->Visible( true ); @@ -507,7 +507,7 @@ void cEETest::CreateUI() { cUITextEdit::CreateParams TEParams; TEParams.Parent( C ); TEParams.PosSet( 5, 245 ); - TEParams.Size = eeSize( 315, 130 ); + TEParams.Size = Sizei( 315, 130 ); TEParams.Flags = UI_AUTO_PADDING | UI_CLIP_ENABLE | UI_TEXT_SELECTION_ENABLED; cUITextEdit * TextEdit = eeNew( cUITextEdit, ( TEParams ) ); TextEdit->Visible( true ); @@ -564,7 +564,7 @@ void cEETest::CreateMapEditor() { if ( NULL != mMapEditor ) return; - cUIWindow * tWin = mTheme->CreateWindow( NULL, eeSize( 1024, 768 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_DRAGABLE_CONTAINER, eeSize( 1024, 768 ) ); + cUIWindow * tWin = mTheme->CreateWindow( NULL, Sizei( 1024, 768 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_DRAGABLE_CONTAINER, Sizei( 1024, 768 ) ); mMapEditor = eeNew( cMapEditor, ( tWin, cb::Make0( this, &cEETest::OnMapEditorClose ) ) ); tWin->Center(); tWin->Show(); @@ -575,7 +575,7 @@ void cEETest::OnMapEditorClose() { } void cEETest::CreateETGEditor() { - cUIWindow * tWin = mTheme->CreateWindow( NULL, eeSize( 1024, 768 ), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_DRAGABLE_CONTAINER, eeSize( 1024, 768 ) ); + cUIWindow * tWin = mTheme->CreateWindow( NULL, Sizei( 1024, 768 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_DRAGABLE_CONTAINER, Sizei( 1024, 768 ) ); mETGEditor = eeNew ( Tools::cTextureAtlasEditor, ( tWin, cb::Make0( this, &cEETest::OnETGEditorClose ) ) ); tWin->Center(); tWin->Show(); @@ -586,7 +586,7 @@ void cEETest::OnETGEditorClose() { } void cEETest::CreateCommonDialog() { - cUICommonDialog * CDialog = mTheme->CreateCommonDialog( NULL, eeSize(), eeVector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON ); + cUICommonDialog * CDialog = mTheme->CreateCommonDialog( NULL, Sizei(), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON ); CDialog->AddFilePattern( "*.hpp;*.cpp", true ); CDialog->Center(); CDialog->Show(); @@ -612,29 +612,29 @@ void cEETest::CreateWinMenu() { } void cEETest::CreateDecoratedWindow() { - mUIWindow = mTheme->CreateWindow( NULL, eeSize( 530, 350 ), eeVector2i( 200, 50 ), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON, eeSize( 100, 200 ) ); + mUIWindow = mTheme->CreateWindow( NULL, Sizei( 530, 350 ), Vector2i( 200, 50 ), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON, Sizei( 100, 200 ) ); mUIWindow->AddEventListener( cUIEvent::EventOnWindowCloseClick, cb::Make1( this, &cEETest::CloseClick ) ); mUIWindow->Title( "Test Window" ); mUIWindow->ToBack(); - cUIPushButton * Button = mTheme->CreatePushButton( mUIWindow->Container(), eeSize( 510, 22 ), eeVector2i( 10, 28 ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_ANCHOR_RIGHT ); + cUIPushButton * Button = mTheme->CreatePushButton( mUIWindow->Container(), Sizei( 510, 22 ), Vector2i( 10, 28 ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_ANCHOR_RIGHT ); Button->Text( "Click Me" ); Button->AddEventListener( cUIEvent::EventMouseClick, cb::Make1( this, &cEETest::ButtonClick ) ); mUIWindow->AddShortcut( KEY_C, KEYMOD_ALT, Button ); - cUITabWidget * TabWidget = mTheme->CreateTabWidget( mUIWindow->Container(), eeSize( 510, 250 ), eeVector2i( 10, 55 ), UI_HALIGN_CENTER | UI_VALIGN_CENTER | UI_ANCHOR_RIGHT | UI_ANCHOR_BOTTOM | UI_ANCHOR_LEFT | UI_ANCHOR_TOP ); + cUITabWidget * TabWidget = mTheme->CreateTabWidget( mUIWindow->Container(), Sizei( 510, 250 ), Vector2i( 10, 55 ), UI_HALIGN_CENTER | UI_VALIGN_CENTER | UI_ANCHOR_RIGHT | UI_ANCHOR_BOTTOM | UI_ANCHOR_LEFT | UI_ANCHOR_TOP ); - cUITextEdit * TEdit = mTheme->CreateTextEdit( TabWidget, eeSize(), eeVector2i() ); + cUITextEdit * TEdit = mTheme->CreateTextEdit( TabWidget, Sizei(), Vector2i() ); TEdit->Text( mBuda ); TabWidget->Add( "TextEdit", TEdit ); - cUITextInput * Txt = mTheme->CreateTextInput( TabWidget, eeSize(), eeVector2i(), UI_AUTO_PADDING | UI_AUTO_SHRINK_TEXT | UI_TEXT_SELECTION_ENABLED ); + cUITextInput * Txt = mTheme->CreateTextInput( TabWidget, Sizei(), Vector2i(), UI_AUTO_PADDING | UI_AUTO_SHRINK_TEXT | UI_TEXT_SELECTION_ENABLED ); Txt->Text( mBuda ); TabWidget->Add( "TextInput", Txt ); - TabWidget->Add( "TextBox", mTheme->CreateTextBox( mBuda, TabWidget, eeSize(), eeVector2i(), UI_AUTO_PADDING | UI_AUTO_SHRINK_TEXT | UI_TEXT_SELECTION_ENABLED ) ); + TabWidget->Add( "TextBox", mTheme->CreateTextBox( mBuda, TabWidget, Sizei(), Vector2i(), UI_AUTO_PADDING | UI_AUTO_SHRINK_TEXT | UI_TEXT_SELECTION_ENABLED ) ); CreateWinMenu(); } @@ -678,11 +678,11 @@ void cEETest::ItemClick( const cUIEvent * Event ) { if ( Chk->Active() ) { if ( C->Scale() == 1.f ) C->Scale( 0.f ); - C->StartScaleAnim( C->Scale(), eeVector2f::One, Milliseconds( 500.f ), Ease::SineOut ); + C->StartScaleAnim( C->Scale(), Vector2f::One, Milliseconds( 500.f ), Ease::SineOut ); C->StartAlphaAnim( C->Alpha(), 255.f, Milliseconds( 500.f ) ); C->StartRotation( 0, 360, Milliseconds( 500.f ), Ease::SineOut ); } else { - C->StartScaleAnim( C->Scale(), eeVector2f::Zero, Milliseconds( 500.f ), Ease::SineIn ); + C->StartScaleAnim( C->Scale(), Vector2f::Zero, Milliseconds( 500.f ), Ease::SineIn ); C->StartAlphaAnim( C->Alpha(), 0.f, Milliseconds( 500.f ) ); C->StartRotation( 0, 360, Milliseconds( 500.f ), Ease::SineIn ); } @@ -729,7 +729,7 @@ void cEETest::QuitClick( const cUIEvent * Event ) { void cEETest::ShowMenu() { if ( Menu->Show() ) { - eeVector2i Pos = mWindow->GetInput()->GetMousePos(); + Vector2i Pos = mWindow->GetInput()->GetMousePos(); cUIMenu::FixMenuPos( Pos , Menu ); Menu->Pos( Pos ); } @@ -755,7 +755,7 @@ void cEETest::ButtonClick( const cUIEvent * Event ) { Gfx->Enabled( false ); Gfx->StartRotation( 0, 2500, Milliseconds( 2500 ) ); - Gfx->StartMovement( eeVector2i( Math::Randi( 0, mWindow->GetWidth() ), -64 ), eeVector2i( Math::Randi( 0, mWindow->GetWidth() ), mWindow->GetHeight() + 64 ), Milliseconds( 2500 ) ); + Gfx->StartMovement( Vector2i( Math::Randi( 0, mWindow->GetWidth() ), -64 ), Vector2i( Math::Randi( 0, mWindow->GetWidth() ), mWindow->GetHeight() + 64 ), Milliseconds( 2500 ) ); Gfx->CloseFadeOut( Milliseconds( 3500 ) ); mListBox->AddListBoxItem( "Test ListBox " + String::ToStr( mListBox->Count() + 1 ) + " testing it right now!" ); @@ -781,7 +781,7 @@ void cEETest::CmdSetPartsNum ( const std::vector < String >& params ) { bool Res = String::FromString( tInt, params[1] ); if ( Res && ( tInt >= 0 && tInt <= 100000 ) ) { - PS[2].Create( PSE_WormHole, tInt, TN[5], eeVector2f( mWindow->GetWidth() * 0.5f, mWindow->GetHeight() * 0.5f ), 32, true ); + PS[2].Create( PSE_WormHole, tInt, TN[5], Vector2f( mWindow->GetWidth() * 0.5f, mWindow->GetHeight() * 0.5f ), 32, true ); Con.PushText( "Wormhole Particles Number Changed to: " + String::ToStr(tInt) ); } else Con.PushText( "Valid parameters are between 0 and 100000 (0 = no limit)." ); @@ -856,14 +856,14 @@ void cEETest::LoadTextures() { for ( Int32 my = 0; my < 4; my++ ) for( Int32 mx = 0; mx < 8; mx++ ) - SP.AddFrame( TN[4], eeSizef( 0, 0 ), eeVector2i( 0, 0 ), eeRecti( mx * 64, my * 64, mx * 64 + 64, my * 64 + 64 ) ); + SP.AddFrame( TN[4], Sizef( 0, 0 ), Vector2i( 0, 0 ), Recti( mx * 64, my * 64, mx * 64 + 64, my * 64 + 64 ) ); PS[0].SetCallbackReset( cb::Make2( this, &cEETest::ParticlesCallback ) ); - PS[0].Create( PSE_Callback, 500, TN[5], eeVector2f( 0, 0 ), 16, true ); - PS[1].Create( PSE_Heal, 250, TN[5], eeVector2f( mWindow->GetWidth() * 0.5f, mWindow->GetHeight() * 0.5f ), 16, true ); - PS[2].Create( PSE_WormHole, PartsNum, TN[5], eeVector2f( mWindow->GetWidth() * 0.5f, mWindow->GetHeight() * 0.5f ), 32, true ); - PS[3].Create( PSE_Fire, 350, TN[5], eeVector2f( -50.f, -50.f ), 32, true ); - PS[4].Create( PSE_Fire, 350, TN[5], eeVector2f( -50.f, -50.f ), 32, true ); + PS[0].Create( PSE_Callback, 500, TN[5], Vector2f( 0, 0 ), 16, true ); + PS[1].Create( PSE_Heal, 250, TN[5], Vector2f( mWindow->GetWidth() * 0.5f, mWindow->GetHeight() * 0.5f ), 16, true ); + PS[2].Create( PSE_WormHole, PartsNum, TN[5], Vector2f( mWindow->GetWidth() * 0.5f, mWindow->GetHeight() * 0.5f ), 32, true ); + PS[3].Create( PSE_Fire, 350, TN[5], Vector2f( -50.f, -50.f ), 32, true ); + PS[4].Create( PSE_Fire, 350, TN[5], Vector2f( -50.f, -50.f ), 32, true ); Con.AddCommand( "setparticlesnum", cb::Make1( this, &cEETest::CmdSetPartsNum ) ); @@ -894,14 +894,14 @@ void cEETest::LoadTextures() { CurMan->Visible( false ); CurMan->Visible( true ); CurMan->Set( Window::Cursor::SYS_CURSOR_HAND ); - CurMan->SetGlobalCursor( EE_CURSOR_ARROW, CurMan->Add( CurMan->Create( CursorP[0], eeVector2i( 1, 1 ), "cursor_special" ) ) ); + CurMan->SetGlobalCursor( EE_CURSOR_ARROW, CurMan->Add( CurMan->Create( CursorP[0], Vector2i( 1, 1 ), "cursor_special" ) ) ); CurMan->Set( EE_CURSOR_ARROW ); CL1.AddFrame( TN[2] ); CL1.Position( 500, 400 ); CL1.Scale( 0.5f ); - CL2.AddFrame(TN[0], eeSizef(96, 96) ); + CL2.AddFrame(TN[0], Sizef(96, 96) ); CL2.Color( ColorA( 255, 255, 255, 255 ) ); mTGL = eeNew( cTextureAtlasLoader, ( MyPath + "atlases/bnb" + EE_TEXTURE_ATLAS_EXTENSION ) ); @@ -966,17 +966,17 @@ void cEETest::Screen2() { Batch.BatchRotation( ang ); Batch.BatchScale( scale ); - Batch.BatchCenter( eeVector2f( HWidth, HHeight ) ); + Batch.BatchCenter( Vector2f( HWidth, HHeight ) ); Float aX = HWidth - 256.f; Float aY = HHeight - 256.f; - eeQuad2f TmpQuad( - eeVector2f( aX , aY ), - eeVector2f( aX , aY + 32.f ), - eeVector2f( aX + 32.f, aY + 32.f ), - eeVector2f( aX + 32.f, aY ) + Quad2f TmpQuad( + Vector2f( aX , aY ), + Vector2f( aX , aY + 32.f ), + Vector2f( aX + 32.f, aY + 32.f ), + Vector2f( aX + 32.f, aY ) ); - TmpQuad.Rotate( ang, eeVector2f( aX + 16.f, aY + 16.f ) ); + TmpQuad.Rotate( ang, Vector2f( aX + 16.f, aY + 16.f ) ); for ( Uint32 z = 0; z < 16; z++ ) { for ( Uint32 y = 0; y < 16; y++ ) { @@ -991,7 +991,7 @@ void cEETest::Screen2() { Batch.BatchRotation( 0.0f ); Batch.BatchScale( 1.0f ); - Batch.BatchCenter( eeVector2f( 0, 0 ) ); + Batch.BatchCenter( Vector2f( 0, 0 ) ); Float PlanetX = HWidth - TNP[6]->Width() * 0.5f; Float PlanetY = HHeight - TNP[6]->Height() * 0.5f; @@ -1014,15 +1014,15 @@ void cEETest::Screen2() { mShaderProgram->SetUniform( "blurfactor" , (float)mBlurFactor ); } - TNP[6]->DrawFast( PlanetX, PlanetY, ang, eeVector2f(scale,scale)); + TNP[6]->DrawFast( PlanetX, PlanetY, ang, Vector2f(scale,scale)); if ( mUseShaders ) mShaderProgram->Unbind(); - 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); + TNP[3]->Draw( HWidth - 128, HHeight, 0, Vector2f::One, ColorA(255,255,255,150), ALPHA_NORMAL, RN_ISOMETRIC); + TNP[3]->Draw( HWidth - 128, HHeight - 128, 0, Vector2f::One, ColorA(255,255,255,50), ALPHA_NORMAL, RN_ISOMETRIC); + TNP[3]->Draw( HWidth - 128, HHeight, 0, Vector2f::One, ColorA(255,255,255,50), ALPHA_NORMAL, RN_ISOMETRICVERTICAL); + TNP[3]->Draw( HWidth, HHeight, 0, Vector2f::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) { @@ -1034,7 +1034,7 @@ void cEETest::Screen2() { } 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); + TNP[1]->DrawEx( (Float)mWindow->GetWidth() - 128.f, (Float)mWindow->GetHeight() - 128.f, 128.f, 128.f, ang, Vector2f::One, Col, Col, Col, Col, ALPHA_BLENDONE, RN_FLIPMIRROR); SP.Position( alpha, alpha ); SP.Draw(); @@ -1047,7 +1047,7 @@ void cEETest::Screen2() { else CL1.Color( ColorA(255, 255, 255, 200) ); - if ( eePolygon2f::IntersectQuad2( CL1.GetQuad() , CL2.GetQuad() ) ) { + if ( Polygon2f::IntersectQuad2( CL1.GetQuad() , CL2.GetQuad() ) ) { CL1.Color( ColorA(0, 255, 0, 255) ); CL2.Color( ColorA(0, 255, 0, 255) ); } else @@ -1076,10 +1076,10 @@ void cEETest::Screen2() { 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) ); - eeLine2f Line3( eeVector2f((Float)mWindow->GetWidth(), 0.f), eeVector2f( 0.f, (Float)mWindow->GetHeight() ) ); - eeLine2f Line4( eeVector2f(Mousef.x - 80.f, Mousef.y + 80.f), eeVector2f(Mousef.x + 80.f, Mousef.y - 80.f) ); + Line2f Line( Vector2f(0.f, 0.f), Vector2f( (Float)mWindow->GetWidth(), (Float)mWindow->GetHeight() ) ); + Line2f Line2( Vector2f(Mousef.x - 80.f, Mousef.y - 80.f), Vector2f(Mousef.x + 80.f, Mousef.y + 80.f) ); + Line2f Line3( Vector2f((Float)mWindow->GetWidth(), 0.f), Vector2f( 0.f, (Float)mWindow->GetHeight() ) ); + Line2f Line4( Vector2f(Mousef.x - 80.f, Mousef.y + 80.f), Vector2f(Mousef.x + 80.f, Mousef.y - 80.f) ); if ( Line.Intersect( Line2 ) ) iL1 = true; @@ -1099,18 +1099,18 @@ void cEETest::Screen2() { PR.SetColor( ColorA(255, 255, 0, 255) ); PR.FillMode( DRAW_LINE ); - PR.DrawCircle( eeVector2f( Mousef.x, Mousef.y ), 80.f, (Uint32)(Ang/3) ); - PR.DrawTriangle( eeTriangle2f( eeVector2f( Mousef.x, Mousef.y - 10.f ), eeVector2f( Mousef.x - 10.f, Mousef.y + 10.f ), eeVector2f( Mousef.x + 10.f, Mousef.y + 10.f ) ) ); - 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(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.DrawCircle( Vector2f( Mousef.x, Mousef.y ), 80.f, (Uint32)(Ang/3) ); + PR.DrawTriangle( Triangle2f( Vector2f( Mousef.x, Mousef.y - 10.f ), Vector2f( Mousef.x - 10.f, Mousef.y + 10.f ), Vector2f( Mousef.x + 10.f, Mousef.y + 10.f ) ) ); + PR.DrawLine( Line2f( Vector2f(Mousef.x - 80.f, Mousef.y - 80.f), Vector2f(Mousef.x + 80.f, Mousef.y + 80.f) ) ); + PR.DrawLine( Line2f( Vector2f(Mousef.x - 80.f, Mousef.y + 80.f), Vector2f(Mousef.x + 80.f, Mousef.y - 80.f) ) ); + PR.DrawLine( Line2f( Vector2f((Float)mWindow->GetWidth(), 0.f), Vector2f( 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) ), ColorA(220, 240, 0, 125), ColorA(100, 0, 240, 125), ColorA(250, 50, 25, 125), ColorA(50, 150, 150, 125) ); + PR.DrawQuad( Quad2f( Vector2f(0.f, 0.f), Vector2f(0.f, 100.f), Vector2f(150.f, 150.f), Vector2f(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() ) ) ); + PR.DrawRectangle( Rectf( Vector2f( Mousef.x - 80.f, Mousef.y - 80.f ), Sizef( 160.f, 160.f ) ), 45.f ); + PR.DrawLine( Line2f( Vector2f(0.f, 0.f), Vector2f( (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), ColorA(220, 240, 0, 125), ColorA(100, 0, 240, 125), ColorA(250, 50, 25, 125), ColorA(50, 150, 150, 125) ); + TNP[3]->DrawQuadEx( Quad2f( Vector2f(0.f, 0.f), Vector2f(0.f, 100.f), Vector2f(150.f, 150.f), Vector2f(200.f, 150.f) ), Vector2f(), ang, Vector2f(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( ColorA(0, 255, 0, 255) ); @@ -1204,12 +1204,12 @@ void cEETest::Render() { mWindow->SetView( Views[1] ); Mouse = KM->GetMousePosFromView( Views[1] ); - Mousef = eeVector2f( (Float)Mouse.x, (Float)Mouse.y ); + Mousef = Vector2f( (Float)Mouse.x, (Float)Mouse.y ); Screen2(); mWindow->SetView( Views[0] ); Mouse = KM->GetMousePosFromView( Views[0] ); - Mousef = eeVector2f( (Float)Mouse.x, (Float)Mouse.y ); + Mousef = Vector2f( (Float)Mouse.x, (Float)Mouse.y ); Screen1(); mWindow->SetView( mWindow->GetDefaultView() ); @@ -1228,12 +1228,12 @@ void cEETest::Render() { PR.SetColor( ColorA(150, 150, 150, 220) ); PR.FillMode( DRAW_FILL ); PR.DrawRectangle( - eeRectf( - eeVector2f( + Rectf( + Vector2f( 0.f, (Float)mWindow->GetHeight() - mEEText.GetTextHeight() ), - eeVector2f( + Vector2f( mEEText.GetTextWidth(), mEEText.GetTextHeight() ) @@ -1274,7 +1274,7 @@ void cEETest::Input() { JM->Update(); Mouse = KM->GetMousePos(); - Mousef = eeVector2f( (Float)Mouse.x, (Float)Mouse.y ); + Mousef = Vector2f( (Float)Mouse.x, (Float)Mouse.y ); if ( KM->IsKeyUp( KEY_F1 ) ) Graphics::cShaderProgramManager::instance()->Reload(); @@ -1520,7 +1520,7 @@ void cEETest::Process() { void cEETest::ParticlesCallback( cParticle * P, cParticleSystem * Me ) { Float x, y, radio; - eeVector2f MePos( Me->Position() ); + Vector2f MePos( Me->Position() ); radio = (Math::Randf(1.f, 1.2f) + sin( 20.0f / P->Id() )) * 24; x = MePos.x + radio * cos( (Float)P->Id() ); diff --git a/src/test/eetest.hpp b/src/test/eetest.hpp index 0cc7c16e0..dda198fab 100644 --- a/src/test/eetest.hpp +++ b/src/test/eetest.hpp @@ -9,7 +9,7 @@ class cUITest : public cUIControlAnim { public: cUITest( cUIControlAnim::CreateParams& Params ) : cUIControlAnim( Params ) { mOldColor = mBackground->Colors(); } - virtual Uint32 OnMouseEnter( const eeVector2i& Pos, const Uint32 Flags ) { + virtual Uint32 OnMouseEnter( const Vector2i& Pos, const Uint32 Flags ) { if ( 4 == mOldColor.size() ) { mBackground->Colors( ColorA( mOldColor[0].R(), mOldColor[0].G(), mOldColor[0].B(), 200 ), ColorA( mOldColor[1].R(), mOldColor[1].G(), mOldColor[1].B(), 200 ), @@ -23,7 +23,7 @@ class cUITest : public cUIControlAnim { return 1; } - virtual Uint32 OnMouseExit( const eeVector2i& Pos, const Uint32 Flags ) { + virtual Uint32 OnMouseExit( const Vector2i& Pos, const Uint32 Flags ) { if ( 4 == mOldColor.size() ) { mBackground->Colors( mOldColor[0], mOldColor[1], mOldColor[2], mOldColor[3] ); } else { @@ -33,7 +33,7 @@ class cUITest : public cUIControlAnim { return 1; } - virtual Uint32 OnMouseUp( const eeVector2i& Pos, const Uint32 Flags ) { + virtual Uint32 OnMouseUp( const Vector2i& Pos, const Uint32 Flags ) { cUIDragable::OnMouseUp( Pos, Flags ); if ( cEngine::instance()->GetCurrentWindow()->GetInput()->MouseWheelUp() ) @@ -107,8 +107,8 @@ class cEETest : private Thread { std::vector Tiles; std::vector PS; - eeVector2i Mouse; - eeVector2f Mousef; + Vector2i Mouse; + Vector2f Mousef; cSprite SP; cSprite CL1, CL2; @@ -129,7 +129,7 @@ class cEETest : private Thread { cConsole Con; virtual void Run(); - eeVector2f Point; + Vector2f Point; std::string MyPath; bool ShowParticles; @@ -149,7 +149,7 @@ class cEETest : private Thread { std::vector tmpv; std::vector MySong; - cWaypoints WP; + Waypoints WP; Int32 PartsNum; Uint32 Cursor[1]; cTexture * CursorP[1];