From 4b31bb9fbc07f227472353d6c20c44837dcec96d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sat, 14 Jun 2014 18:50:04 -0300 Subject: [PATCH] Working on the Window refactoring. --- include/eepp/graphics/cconsole.hpp | 4 +- include/eepp/graphics/cframebuffer.hpp | 2 +- include/eepp/graphics/cparticlesystem.hpp | 2 +- include/eepp/graphics/csprite.hpp | 2 +- include/eepp/ui/cuimanager.hpp | 6 +- include/eepp/ui/cuitextinput.hpp | 4 +- include/eepp/window/cclipboard.hpp | 6 +- include/eepp/window/ccursor.hpp | 12 +- include/eepp/window/ccursormanager.hpp | 37 +++--- include/eepp/window/cengine.hpp | 18 +-- include/eepp/window/cinput.hpp | 26 ++-- include/eepp/window/cinputfinger.hpp | 6 +- include/eepp/window/cinputtextbuffer.hpp | 8 +- include/eepp/window/cjoystick.hpp | 8 +- include/eepp/window/cjoystickmanager.hpp | 12 +- include/eepp/window/cplatformimpl.hpp | 18 +-- include/eepp/window/cursorhelper.hpp | 4 +- include/eepp/window/cview.hpp | 10 +- include/eepp/window/cwindow.hpp | 38 +++--- src/eepp/gaming/cmap.cpp | 4 +- src/eepp/graphics/cconsole.cpp | 18 +-- src/eepp/graphics/cframebuffer.cpp | 2 +- src/eepp/graphics/cframebufferfbo.cpp | 2 +- src/eepp/graphics/cparticlesystem.cpp | 2 +- src/eepp/graphics/csprite.cpp | 2 +- src/eepp/graphics/ctextureloader.cpp | 18 +-- src/eepp/physics/cspace.cpp | 2 +- src/eepp/system/sys.cpp | 12 +- src/eepp/ui/cuimanager.cpp | 10 +- src/eepp/ui/cuitextinput.cpp | 2 +- src/eepp/window/backend/SDL/cbackendsdl.cpp | 6 +- src/eepp/window/backend/SDL/cbackendsdl.hpp | 6 +- src/eepp/window/backend/SDL/cclipboardsdl.cpp | 24 ++-- src/eepp/window/backend/SDL/cclipboardsdl.hpp | 6 +- .../window/backend/SDL/ccursormanagersdl.cpp | 32 ++--- .../window/backend/SDL/ccursormanagersdl.hpp | 14 +- src/eepp/window/backend/SDL/ccursorsdl.cpp | 14 +- src/eepp/window/backend/SDL/ccursorsdl.hpp | 10 +- src/eepp/window/backend/SDL/cinputsdl.cpp | 16 +-- src/eepp/window/backend/SDL/cinputsdl.hpp | 6 +- .../backend/SDL/cjoystickmanagersdl.cpp | 16 +-- .../backend/SDL/cjoystickmanagersdl.hpp | 10 +- src/eepp/window/backend/SDL/cjoysticksdl.cpp | 20 +-- src/eepp/window/backend/SDL/cjoysticksdl.hpp | 6 +- src/eepp/window/backend/SDL/cwindowsdl.cpp | 8 +- src/eepp/window/backend/SDL/cwindowsdl.hpp | 2 +- src/eepp/window/backend/SDL2/cbackendsdl2.cpp | 6 +- src/eepp/window/backend/SDL2/cbackendsdl2.hpp | 6 +- .../window/backend/SDL2/cclipboardsdl2.cpp | 14 +- .../window/backend/SDL2/cclipboardsdl2.hpp | 6 +- .../backend/SDL2/ccursormanagersdl2.cpp | 36 +++--- .../backend/SDL2/ccursormanagersdl2.hpp | 14 +- src/eepp/window/backend/SDL2/ccursorsdl2.cpp | 18 +-- src/eepp/window/backend/SDL2/ccursorsdl2.hpp | 12 +- src/eepp/window/backend/SDL2/cinputsdl2.cpp | 18 +-- src/eepp/window/backend/SDL2/cinputsdl2.hpp | 6 +- .../backend/SDL2/cjoystickmanagersdl2.cpp | 16 +-- .../backend/SDL2/cjoystickmanagersdl2.hpp | 6 +- .../window/backend/SDL2/cjoysticksdl2.cpp | 20 +-- .../window/backend/SDL2/cjoysticksdl2.hpp | 6 +- src/eepp/window/backend/SDL2/cwindowsdl2.cpp | 8 +- src/eepp/window/backend/SDL2/cwindowsdl2.hpp | 2 +- src/eepp/window/backend/SFML/cbackendsfml.hpp | 6 +- .../window/backend/SFML/cclipboardsfml.cpp | 14 +- .../window/backend/SFML/cclipboardsfml.hpp | 6 +- .../backend/SFML/ccursormanagersfml.cpp | 32 ++--- .../backend/SFML/ccursormanagersfml.hpp | 14 +- src/eepp/window/backend/SFML/ccursorsfml.cpp | 14 +- src/eepp/window/backend/SFML/ccursorsfml.hpp | 10 +- src/eepp/window/backend/SFML/cinputsfml.cpp | 22 ++-- src/eepp/window/backend/SFML/cinputsfml.hpp | 6 +- .../backend/SFML/cjoystickmanagersfml.cpp | 16 +-- .../backend/SFML/cjoystickmanagersfml.hpp | 6 +- .../window/backend/SFML/cjoysticksfml.cpp | 22 ++-- .../window/backend/SFML/cjoysticksfml.hpp | 6 +- src/eepp/window/backend/SFML/cwindowsfml.cpp | 8 +- src/eepp/window/backend/SFML/cwindowsfml.hpp | 4 +- src/eepp/window/backend/null/cbackendnull.hpp | 6 +- .../window/backend/null/cclipboardnull.cpp | 14 +- .../window/backend/null/cclipboardnull.hpp | 6 +- .../backend/null/ccursormanagernull.cpp | 32 ++--- .../backend/null/ccursormanagernull.hpp | 14 +- src/eepp/window/backend/null/ccursornull.cpp | 14 +- src/eepp/window/backend/null/ccursornull.hpp | 10 +- src/eepp/window/backend/null/cinputnull.cpp | 16 +-- src/eepp/window/backend/null/cinputnull.hpp | 6 +- .../backend/null/cjoystickmanagernull.cpp | 14 +- .../backend/null/cjoystickmanagernull.hpp | 6 +- .../window/backend/null/cjoysticknull.cpp | 20 +-- .../window/backend/null/cjoysticknull.hpp | 6 +- src/eepp/window/backend/null/cwindownull.cpp | 2 +- src/eepp/window/backend/null/cwindownull.hpp | 2 +- src/eepp/window/cbackend.hpp | 6 +- src/eepp/window/cclipboard.cpp | 6 +- src/eepp/window/ccursor.cpp | 22 ++-- src/eepp/window/ccursormanager.cpp | 38 +++--- src/eepp/window/cengine.cpp | 66 +++++----- src/eepp/window/cinput.cpp | 114 ++++++++--------- src/eepp/window/cinputfinger.cpp | 10 +- src/eepp/window/cinputtextbuffer.cpp | 120 +++++++++--------- src/eepp/window/cjoystick.cpp | 30 ++--- src/eepp/window/cjoystickmanager.cpp | 14 +- src/eepp/window/cplatformimpl.cpp | 4 +- src/eepp/window/cview.cpp | 32 ++--- src/eepp/window/cwindow.cpp | 16 +-- src/eepp/window/platform/null/cnullimpl.cpp | 12 +- src/eepp/window/platform/null/cnullimpl.hpp | 12 +- src/eepp/window/platform/osx/cosximpl.cpp | 12 +- src/eepp/window/platform/osx/cosximpl.hpp | 12 +- src/eepp/window/platform/win/ccursorwin.cpp | 20 +-- src/eepp/window/platform/win/ccursorwin.hpp | 10 +- src/eepp/window/platform/win/cwinimpl.cpp | 24 ++-- src/eepp/window/platform/win/cwinimpl.hpp | 12 +- src/eepp/window/platform/x11/ccursorx11.cpp | 20 +-- src/eepp/window/platform/x11/ccursorx11.hpp | 10 +- src/eepp/window/platform/x11/cx11impl.cpp | 22 ++-- src/eepp/window/platform/x11/cx11impl.hpp | 12 +- src/examples/empty_window/empty_window.cpp | 4 +- .../external_shader/external_shader.cpp | 6 +- src/examples/fonts/fonts.cpp | 4 +- src/examples/physics/physics.cpp | 6 +- src/examples/sprites/sprites.cpp | 6 +- src/examples/vbo_fbo_batch/vbo_fbo_batch.cpp | 4 +- src/test/eetest.cpp | 16 +-- src/test/eetest.hpp | 14 +- 125 files changed, 875 insertions(+), 882 deletions(-) diff --git a/include/eepp/graphics/cconsole.hpp b/include/eepp/graphics/cconsole.hpp index 5846d82c5..8af9575b4 100755 --- a/include/eepp/graphics/cconsole.hpp +++ b/include/eepp/graphics/cconsole.hpp @@ -7,7 +7,7 @@ #include #include -namespace EE { namespace Window { class cWindow; class cInputTextBuffer; class InputEvent; } } +namespace EE { namespace Window { class cWindow; class InputTextBuffer; class InputEvent; } } using namespace EE::Window; @@ -150,7 +150,7 @@ class EE_API cConsole : protected LogReaderInterface { Uint32 mMaxLogLines; int mLastLogPos; - cInputTextBuffer * mTBuf; + InputTextBuffer * mTBuf; cFont * mFont; diff --git a/include/eepp/graphics/cframebuffer.hpp b/include/eepp/graphics/cframebuffer.hpp index 2a49a4f30..74f1c3def 100644 --- a/include/eepp/graphics/cframebuffer.hpp +++ b/include/eepp/graphics/cframebuffer.hpp @@ -68,7 +68,7 @@ class EE_API cFrameBuffer { bool mHasDepthBuffer; cTexture * mTexture; ColorAf mClearColor; - cView mPrevView; + View mPrevView; float mProjMat[16]; cFrameBuffer( Window::cWindow * window ); diff --git a/include/eepp/graphics/cparticlesystem.hpp b/include/eepp/graphics/cparticlesystem.hpp index dfa53a9c0..733e1f2af 100755 --- a/include/eepp/graphics/cparticlesystem.hpp +++ b/include/eepp/graphics/cparticlesystem.hpp @@ -76,7 +76,7 @@ class EE_API cParticleSystem { */ void Update(const Time &time ); - /** Update the particles effect taking the elapsed time from cEngine */ + /** Update the particles effect taking the elapsed time from Engine */ void Update(); /** Stop using the effect but wait to end the animation */ diff --git a/include/eepp/graphics/csprite.hpp b/include/eepp/graphics/csprite.hpp index dbb4f0763..e9bb785e6 100755 --- a/include/eepp/graphics/csprite.hpp +++ b/include/eepp/graphics/csprite.hpp @@ -344,7 +344,7 @@ class EE_API cSprite { /** Update the sprite animation */ void Update( const Time& ElapsedTime ); - /** Update the sprite animation using the current elapsed time provided by cEngine */ + /** Update the sprite animation using the current elapsed time provided by Engine */ void Update(); /** Fire a User Event in the sprite */ diff --git a/include/eepp/ui/cuimanager.hpp b/include/eepp/ui/cuimanager.hpp index c97063606..5fa78c6c6 100644 --- a/include/eepp/ui/cuimanager.hpp +++ b/include/eepp/ui/cuimanager.hpp @@ -7,8 +7,6 @@ #include #include -using namespace EE::Window::Cursor; - namespace EE { namespace UI { class EE_API cUIManager { @@ -43,7 +41,7 @@ class EE_API cUIManager { Vector2i GetMousePos(); - cInput * GetInput() const; + Input * GetInput() const; const Uint32& PressTrigger() const; @@ -106,7 +104,7 @@ class EE_API cUIManager { friend class cUIWindow; Window::cWindow * mWindow; - cInput * mKM; + Input * mKM; cUIWindow * mControl; cUIControl * mFocusControl; cUIControl * mOverControl; diff --git a/include/eepp/ui/cuitextinput.hpp b/include/eepp/ui/cuitextinput.hpp index 64e2e034d..d27addc88 100644 --- a/include/eepp/ui/cuitextinput.hpp +++ b/include/eepp/ui/cuitextinput.hpp @@ -42,7 +42,7 @@ class EE_API cUITextInput : public cUITextBox { virtual void SetTheme( cUITheme * Theme ); - cInputTextBuffer * GetInputTextBuffer(); + InputTextBuffer * GetInputTextBuffer(); void AllowEditing( const bool& allow ); @@ -54,7 +54,7 @@ class EE_API cUITextInput : public cUITextBox { virtual void ShrinkText( const Uint32& MaxWidth ); protected: - cInputTextBuffer mTextBuffer; + InputTextBuffer mTextBuffer; Float mWaitCursorTime; Vector2f mCurPos; int mCursorPos; diff --git a/include/eepp/window/cclipboard.hpp b/include/eepp/window/cclipboard.hpp index dad30284a..2b0a3078f 100644 --- a/include/eepp/window/cclipboard.hpp +++ b/include/eepp/window/cclipboard.hpp @@ -5,9 +5,9 @@ namespace EE { namespace Window { -class EE_API cClipboard { +class EE_API Clipboard { public: - virtual ~cClipboard(); + virtual ~Clipboard(); /** @return The Clipboard Text if available */ virtual std::string GetText() = 0; @@ -23,7 +23,7 @@ class EE_API cClipboard { protected: friend class cWindow; - cClipboard( Window::cWindow * window ); + Clipboard( Window::cWindow * window ); /** Initialize the clipboard manager. This is needed because the backends first create the instance of the clipboard and then initialize the window context. */ virtual void Init() = 0; diff --git a/include/eepp/window/ccursor.hpp b/include/eepp/window/ccursor.hpp index b79ec90c8..e460453cb 100644 --- a/include/eepp/window/ccursor.hpp +++ b/include/eepp/window/ccursor.hpp @@ -13,7 +13,7 @@ namespace EE { namespace Window { class cWindow; -class EE_API cCursor { +class EE_API Cursor { public: /** @return The cursor id */ const Uint32& Id() const; @@ -27,9 +27,9 @@ class EE_API cCursor { /** @return The pointer to the image that represents the cursor */ cImage * Image() const; - virtual ~cCursor(); + virtual ~Cursor(); protected: - friend class cCursorManager; + friend class CursorManager; Uint32 mId; std::string mName; @@ -37,11 +37,11 @@ class EE_API cCursor { Vector2i mHotSpot; cWindow * mWindow; - cCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + Cursor( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursor( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + Cursor( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursor( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + Cursor( 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 43c977111..4c8517a62 100644 --- a/include/eepp/window/ccursormanager.hpp +++ b/include/eepp/window/ccursormanager.hpp @@ -10,47 +10,46 @@ using namespace EE::Graphics; #include #include #include -using namespace EE::Window::Cursor; #include namespace EE { namespace Window { -class EE_API cCursorManager { +class EE_API CursorManager { public: - cCursorManager( Window::cWindow * window ); + CursorManager( Window::cWindow * window ); - virtual ~cCursorManager(); + virtual ~CursorManager(); /** Creates a cursor from a texture * @param tex The texture 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( cTexture * tex, const Vector2i& hotspot, const std::string& name ) = 0; + virtual Cursor * 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 Vector2i& hotspot, const std::string& name ) = 0; + virtual Cursor * 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 Vector2i& hotspot, const std::string& name ) = 0; + virtual Cursor * 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 ); + virtual Cursor * Add( Cursor * cursor ); /** Removes the cursor from the cursor manager * @param cursor The cursor pointer * @param Delete Indicates if the cursor must be delete after being removed from the cursor manager */ - virtual void Remove( cCursor * cursor, bool Delete = false ) = 0; + virtual void Remove( Cursor * cursor, bool Delete = false ) = 0; /** Removes the cursor by its name * @param name The cursor name @@ -65,10 +64,10 @@ class EE_API cCursorManager { virtual void Remove( const Uint32& id, bool Delete = false ); /** @return The cursor pointer by its name */ - virtual cCursor * Get( const std::string& name ); + virtual Cursor * Get( const std::string& name ); /** @return The cursor pointer by its id */ - virtual cCursor * GetById( const Uint32& id ); + virtual Cursor * GetById( const Uint32& id ); /** Set the the current cursor by its name */ virtual void Set( const std::string& name ); @@ -77,7 +76,7 @@ class EE_API cCursorManager { virtual void SetById( const Uint32& id ); /** Set the the current cursor by its cursor pointer */ - virtual void Set( cCursor * cursor ) = 0; + virtual void Set( Cursor * cursor ) = 0; /** Set the cursor using a system cursor */ virtual void Set( EE_SYSTEM_CURSOR syscurid ) = 0; @@ -87,9 +86,9 @@ class EE_API cCursorManager { virtual void Set( EE_CURSOR_TYPE cursor ); /** A Global Cursor is a cursor setted to be used in eepp. It's the system cursor of the engine. - ** The global cursor can be a cCursor ( user created cursor ) or a system cursor ( the OS cursor ). + ** The global cursor can be a Cursor ( user created cursor ) or a system cursor ( the OS cursor ). ** The system cursor is used by default, but can be override it with this function. */ - virtual void SetGlobalCursor( EE_CURSOR_TYPE cursor, cCursor * fromCursor ); + virtual void SetGlobalCursor( EE_CURSOR_TYPE cursor, Cursor * fromCursor ); /** @see SetGlobalCursor */ virtual void SetGlobalCursor( EE_CURSOR_TYPE cursor, EE_SYSTEM_CURSOR fromCursor ); @@ -110,7 +109,7 @@ class EE_API cCursorManager { virtual bool Visible(); /** @return A pointer to the curent cursor */ - cCursor * Current() const; + Cursor * Current() const; /** @return The current system cursor */ EE_SYSTEM_CURSOR CurrentSysCursor() const; @@ -118,7 +117,7 @@ class EE_API cCursorManager { /** @return True if the current cursor seted is a system cursor */ bool CurrentIsSysCursor() const; protected: - typedef std::set CursorsList; + typedef std::set CursorsList; class GlobalCursor { public: @@ -128,18 +127,18 @@ class EE_API cCursorManager { { } - GlobalCursor( EE_SYSTEM_CURSOR sysCur, cCursor * cur ) : + GlobalCursor( EE_SYSTEM_CURSOR sysCur, Cursor * cur ) : SysCur( sysCur ), Cur( cur ) { } EE_SYSTEM_CURSOR SysCur; - cCursor * Cur; + Cursor * Cur; }; GlobalCursor mGlobalCursors[ EE_CURSOR_COUNT ]; cWindow * mWindow; - cCursor * mCurrent; + Cursor * mCurrent; EE_SYSTEM_CURSOR mSysCursor; CursorsList mCursors; bool mCurSysCursor; diff --git a/include/eepp/window/cengine.hpp b/include/eepp/window/cengine.hpp index e1413428c..a17d2c8c6 100755 --- a/include/eepp/window/cengine.hpp +++ b/include/eepp/window/cengine.hpp @@ -6,16 +6,16 @@ #include namespace EE { namespace System { class IniFile; } } -namespace EE { namespace Window { namespace Backend { class cBackend; } } } +namespace EE { namespace Window { namespace Backend { class WindowBackend; } } } namespace EE { namespace Window { /** @brief The window management class. Here the engine starts working. (Singleton Class). */ -class EE_API cEngine { - SINGLETON_DECLARE_HEADERS(cEngine) +class EE_API Engine { + SINGLETON_DECLARE_HEADERS(Engine) public: - ~cEngine(); + ~Engine(); /** Creates a new window. * SDL2, SFML backends support more than one window creation, SDL 1.2 backend only 1 window. @@ -128,21 +128,21 @@ class EE_API cEngine { protected: friend class cWindow; - Backend::cBackend * mBackend; + Backend::WindowBackend * mBackend; std::list mWindows; cWindow * mWindow; bool mSharedGLContext; Uint32 mMainThreadId; - cEngine(); + Engine(); void Destroy(); - Backend::cBackend * CreateSDLBackend( const WindowSettings& Settings ); + Backend::WindowBackend * CreateSDLBackend( const WindowSettings& Settings ); - Backend::cBackend * CreateSDL2Backend( const WindowSettings& Settings ); + Backend::WindowBackend * CreateSDL2Backend( const WindowSettings& Settings ); - Backend::cBackend * CreateSFMLBackend( const WindowSettings& Settings ); + Backend::WindowBackend * CreateSFMLBackend( const WindowSettings& Settings ); cWindow * CreateSDLWindow( const WindowSettings& Settings, const ContextSettings& Context ); diff --git a/include/eepp/window/cinput.hpp b/include/eepp/window/cinput.hpp index 944222a59..3fa2d79d2 100644 --- a/include/eepp/window/cinput.hpp +++ b/include/eepp/window/cinput.hpp @@ -11,14 +11,14 @@ namespace EE { namespace Window { -class cView; +class View; /** @brief The basic input class. For mouse and keyboard. */ -class EE_API cInput { +class EE_API Input { public: typedef cb::Callback1 InputCallback; - virtual ~cInput(); + virtual ~Input(); /** Update the Input */ virtual void Update() = 0; @@ -116,7 +116,7 @@ class EE_API cInput { void SetMousePos( const Vector2i& Pos ); /** @return The mouse position over the current view */ - Vector2i GetMousePosFromView( const cView& View ); + Vector2i GetMousePosFromView( const View& View ); /** @return The Mouse X axis position */ Uint16 MouseX() const; @@ -163,31 +163,31 @@ class EE_API cInput { void SendEvent( InputEvent * Event ); /** @return The joystick manager */ - cJoystickManager * GetJoystickManager() const; + JoystickManager * GetJoystickManager() const; /** @return The maximun number of fingers */ Uint32 GetFingerCount(); /** @return The input finger from it's index */ - cInputFinger * GetFingerIndex( const Uint32& Index ); + InputFinger * GetFingerIndex( const Uint32& Index ); /** @return The Input Finder from it's id */ - cInputFinger * GetFinger( const Int64& fingerId ); + InputFinger * GetFinger( const Int64& fingerId ); /** @return A list of the input finders that are currently down */ - std::list GetFingersDown(); + std::list GetFingersDown(); /** @return A list of the input finders that were down in the last update */ - std::list GetFingersWasDown(); + std::list GetFingersWasDown(); protected: friend class cWindow; - cInput( Window::cWindow * window, cJoystickManager * joystickmanager ); + Input( Window::cWindow * window, JoystickManager * joystickmanager ); virtual void Init() = 0; cWindow * mWindow; - cJoystickManager * mJoystickManager; + JoystickManager * mJoystickManager; Uint8 mKeysDown [EE_KEYS_SPACE]; Uint8 mKeysUp [EE_KEYS_SPACE]; Uint32 mPressTrigger; @@ -208,13 +208,13 @@ class EE_API cInput { Uint32 mNumCallBacks; Float mMouseSpeed; bool mInputGrabed; - cInputFinger mFingers[ EE_MAX_FINGERS ]; + InputFinger mFingers[ EE_MAX_FINGERS ]; std::map mCallbacks; void ProcessEvent( InputEvent * Event ); - cInputFinger * GetFingerId( const Int64& fingerId ); + InputFinger * GetFingerId( const Int64& fingerId ); void ResetFingerWasDown(); }; diff --git a/include/eepp/window/cinputfinger.hpp b/include/eepp/window/cinputfinger.hpp index 5f7351281..05aeb5aec 100644 --- a/include/eepp/window/cinputfinger.hpp +++ b/include/eepp/window/cinputfinger.hpp @@ -8,9 +8,9 @@ namespace EE { namespace Window { #define EE_MAX_FINGERS (10) /** @brief A representation of the current state of a finger touching a screen */ -class cInputFinger { +class InputFinger { public: - cInputFinger(); + InputFinger(); Int64 id; Int32 x; @@ -33,7 +33,7 @@ class cInputFinger { /** @return The current position of the finger */ Vector2i Pos(); protected: - friend class cInput; + friend class Input; void WriteLast(); }; diff --git a/include/eepp/window/cinputtextbuffer.hpp b/include/eepp/window/cinputtextbuffer.hpp index 662f96866..f4968b487 100755 --- a/include/eepp/window/cinputtextbuffer.hpp +++ b/include/eepp/window/cinputtextbuffer.hpp @@ -22,15 +22,15 @@ enum INPUT_TEXTBUFFER_FLAGS { #define INPUT_LENGHT_MAX 0xFFFFFFFF /** @brief A class to keep a buffer of the user writed text */ -class EE_API cInputTextBuffer { +class EE_API InputTextBuffer { public: typedef cb::Callback0 EnterCallback; - cInputTextBuffer( const bool& active, const bool& supportNewLine, const bool& supportFreeEditing, Window::cWindow * window = NULL, const Uint32& maxLength = INPUT_LENGHT_MAX ); + InputTextBuffer( const bool& active, const bool& supportNewLine, const bool& supportFreeEditing, Window::cWindow * window = NULL, const Uint32& maxLength = INPUT_LENGHT_MAX ); - cInputTextBuffer( Window::cWindow * window = NULL ); + InputTextBuffer( Window::cWindow * window = NULL ); - ~cInputTextBuffer(); + ~InputTextBuffer(); /** @return The current buffer */ String Buffer() const; diff --git a/include/eepp/window/cjoystick.hpp b/include/eepp/window/cjoystick.hpp index db46b1d36..c9fb88b13 100644 --- a/include/eepp/window/cjoystick.hpp +++ b/include/eepp/window/cjoystick.hpp @@ -7,11 +7,11 @@ namespace EE { namespace Window { /** @brief Represents a physical Joystick, and contains all its states */ -class EE_API cJoystick { +class EE_API Joystick { public: - cJoystick( const Uint32& index ); + Joystick( const Uint32& index ); - virtual ~cJoystick(); + virtual ~Joystick(); /** Close the joystick */ virtual void Close(); @@ -67,7 +67,7 @@ class EE_API cJoystick { /** @return If the button index is up ( released ) */ bool IsButtonUp( const Int32& index ); protected: - friend class cJoystickManager; + friend class JoystickManager; Uint32 mIndex; std::string mName; Int32 mHats; diff --git a/include/eepp/window/cjoystickmanager.hpp b/include/eepp/window/cjoystickmanager.hpp index 528f39e2d..27aa7607a 100644 --- a/include/eepp/window/cjoystickmanager.hpp +++ b/include/eepp/window/cjoystickmanager.hpp @@ -7,11 +7,11 @@ namespace EE { namespace Window { /** @brief A Joystick Manager class */ -class EE_API cJoystickManager { +class EE_API JoystickManager { public: - cJoystickManager(); + JoystickManager(); - virtual ~cJoystickManager(); + virtual ~JoystickManager(); /** @return The number of joysticks attached to the system */ virtual Uint32 Count(); @@ -20,7 +20,7 @@ class EE_API cJoystickManager { virtual void Update() = 0; /** @return The joystick instante of the joystick index */ - cJoystick * GetJoystick( const Uint32& index ); + Joystick * GetJoystick( const Uint32& index ); /** Rescan all joysticks to look for new joystick connected. * This could be slow on some backends, and unnecessary on others. @@ -34,11 +34,11 @@ class EE_API cJoystickManager { /** Open all the joysticks */ virtual void Open(); protected: - friend class cJoystick; + friend class Joystick; bool mInit; - cJoystick * mJoysticks[ MAX_JOYSTICKS ]; + Joystick * mJoysticks[ MAX_JOYSTICKS ]; Uint32 mCount; diff --git a/include/eepp/window/cplatformimpl.hpp b/include/eepp/window/cplatformimpl.hpp index 7f5d29adb..a78b63cd0 100644 --- a/include/eepp/window/cplatformimpl.hpp +++ b/include/eepp/window/cplatformimpl.hpp @@ -19,7 +19,7 @@ class cImage; namespace Window { class cWindow; -class cCursor; +class Cursor; } } @@ -33,11 +33,11 @@ using namespace EE::Graphics; * It's not garanteed that everything is implemented in every platform. * X11 and Win32 implementation are complete, OS X implementation still lacks of most features. */ -class cPlatformImpl { +class PlatformImpl { public: - cPlatformImpl( Window::cWindow * window ); + PlatformImpl( Window::cWindow * window ); - virtual ~cPlatformImpl(); + virtual ~PlatformImpl(); /** Minimize the window */ virtual void MinimizeWindow() = 0; @@ -80,27 +80,27 @@ 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 Vector2i& hotspot, const std::string& name ) = 0; + virtual Cursor * 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 Vector2i& hotspot, const std::string& name ) = 0; + virtual Cursor * 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 Vector2i& hotspot, const std::string& name ) = 0; + virtual Cursor * 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; + virtual void SetMouseCursor( Cursor * cursor ) = 0; /** Set the cursor using a system cursor */ - virtual void SetSystemMouseCursor( Cursor::EE_SYSTEM_CURSOR syscursor ) = 0; + virtual void SetSystemMouseCursor( EE_SYSTEM_CURSOR syscursor ) = 0; /** Force to reset the state of the current seted cursor */ virtual void RestoreCursor() = 0; diff --git a/include/eepp/window/cursorhelper.hpp b/include/eepp/window/cursorhelper.hpp index 946880047..da0f76a82 100644 --- a/include/eepp/window/cursorhelper.hpp +++ b/include/eepp/window/cursorhelper.hpp @@ -1,7 +1,7 @@ #ifndef EE_WINDOWCURSORHELPER_HPP #define EE_WINDOWCURSORHELPER_HPP -namespace EE { namespace Window { namespace Cursor { +namespace EE { namespace Window { /** @enum EE_SYSTEM_CURSOR list the system cursors that can be used */ enum EE_SYSTEM_CURSOR { @@ -37,7 +37,7 @@ enum EE_CURSOR_TYPE { EE_CURSOR_COUNT }; -}}} +}} #endif diff --git a/include/eepp/window/cview.hpp b/include/eepp/window/cview.hpp index c53e80f31..06c006f46 100755 --- a/include/eepp/window/cview.hpp +++ b/include/eepp/window/cview.hpp @@ -6,15 +6,15 @@ namespace EE { namespace Window { /** @brief The class defines a view like a 2D camera ( position, size, move, scale ). Basically is a 2D proyection in pixels seted over a viewport. */ -class EE_API cView { +class EE_API View { public: - cView(); + View(); - cView( const int& X, const int& Y, const int& Width, const int& Height ); + View( const int& X, const int& Y, const int& Width, const int& Height ); - cView( const Recti& View ); + View( const Recti& View ); - ~cView(); + ~View(); /** Offset the position */ void Move( const int& OffsetX, const int& OffsetY ); diff --git a/include/eepp/window/cwindow.hpp b/include/eepp/window/cwindow.hpp index 13c9e3d33..3c6cf2b87 100644 --- a/include/eepp/window/cwindow.hpp +++ b/include/eepp/window/cwindow.hpp @@ -6,11 +6,11 @@ namespace EE { namespace Window { -namespace Platform { class cPlatformImpl; } +namespace Platform { class PlatformImpl; } -class cClipboard; -class cInput; -class cCursorManager; +class Clipboard; +class Input; +class CursorManager; /** @namespace EE::Window::WindowStyle Define the Windows Styles */ @@ -150,7 +150,7 @@ class EE_API cWindow { public: typedef cb::Callback1 WindowResizeCallback; - cWindow( WindowSettings Settings, ContextSettings Context, cClipboard * Clipboard, cInput * Input, cCursorManager * CursorManager ); + cWindow( WindowSettings Settings, ContextSettings Context, Clipboard * Clipboard, Input * Input, CursorManager * CursorManager ); virtual ~cWindow(); @@ -276,13 +276,13 @@ class EE_API cWindow { /** Set the current active view @param View New view to use (pass GetDefaultView() to set the default view) */ - void SetView( const cView& View ); + void SetView( const View& View ); /** Get the current view */ - const cView& GetView() const; + const View& GetView() const; /** Get the default view of the window */ - const cView& GetDefaultView() const; + const View& GetDefaultView() const; /** This will set the default rendering states and view to render in 2D mode */ void Setup2D( const bool& KeepView = false ); @@ -329,13 +329,13 @@ class EE_API cWindow { void ClipPlaneDisable(); /** @return The clipboard manager */ - cClipboard * GetClipboard() const; + Clipboard * GetClipboard() const; /** @return The input manager */ - cInput * GetInput() const; + Input * GetInput() const; /** @return The cursor manager */ - cCursorManager * GetCursorManager() const; + CursorManager * GetCursorManager() const; /** Push a new window resize callback. * @return The Callback Id @@ -346,7 +346,7 @@ class EE_API cWindow { void PopResizeCallback( const Uint32& CallbackId ); /** @return The pointer to the instance of the platform implementation functions. */ - Platform::cPlatformImpl * GetPlatform() const; + Platform::PlatformImpl * GetPlatform() const; /** * @brief Start accepting Unicode text input events. @@ -449,15 +449,15 @@ class EE_API cWindow { ** @param fps The desired FPS ( 0 = infinite ) */ void RunMainLoop( void (*func)(), int fps = 0 ); protected: - friend class cEngine; + friend class Engine; WindowInfo mWindow; - cClipboard * mClipboard; - cInput * mInput; - cCursorManager * mCursorManager; - Platform::cPlatformImpl * mPlatform; - cView mDefaultView; - const cView * mCurrentView; + Clipboard * mClipboard; + Input * mInput; + CursorManager * mCursorManager; + Platform::PlatformImpl * mPlatform; + View mDefaultView; + const View * mCurrentView; Uint32 mNumCallBacks; std::map mCallbacks; diff --git a/src/eepp/gaming/cmap.cpp b/src/eepp/gaming/cmap.cpp index 5c171f3de..e68f3fdd5 100644 --- a/src/eepp/gaming/cmap.cpp +++ b/src/eepp/gaming/cmap.cpp @@ -23,7 +23,7 @@ using namespace EE::Graphics; namespace EE { namespace Gaming { cMap::cMap() : - mWindow( cEngine::instance()->GetCurrentWindow() ), + mWindow( Engine::instance()->GetCurrentWindow() ), mLayers( NULL ), mFlags( 0 ), mMaxLayers( 0 ), @@ -90,7 +90,7 @@ void cMap::Create( Sizei Size, Uint32 MaxLayers, Sizei TileSize, Uint32 Flags, S mWindow = Window; if ( NULL == mWindow ) - mWindow = cEngine::instance()->GetCurrentWindow(); + mWindow = Engine::instance()->GetCurrentWindow(); mFlags = Flags; mMaxLayers = MaxLayers; diff --git a/src/eepp/graphics/cconsole.cpp b/src/eepp/graphics/cconsole.cpp index 6145cd1c2..2c22abf52 100755 --- a/src/eepp/graphics/cconsole.cpp +++ b/src/eepp/graphics/cconsole.cpp @@ -28,7 +28,7 @@ cConsole::cConsole( Window::cWindow * window ) : mVidCb(0), mMaxLogLines(1024), mLastLogPos(0), - mTBuf( eeNew( cInputTextBuffer, () ) ), + mTBuf( eeNew( InputTextBuffer, () ) ), mFont(NULL), mTexId(0), mCurAlpha(0), @@ -42,7 +42,7 @@ cConsole::cConsole( Window::cWindow * window ) : mCurSide(false) { if ( NULL == mWindow ) { - mWindow = cEngine::instance()->GetCurrentWindow(); + mWindow = Engine::instance()->GetCurrentWindow(); } } @@ -62,7 +62,7 @@ cConsole::cConsole( cFont* Font, const bool& MakeDefaultCommands, const bool& At mVidCb(0), mMaxLogLines(1024), mLastLogPos(0), - mTBuf( eeNew( cInputTextBuffer, () ) ), + mTBuf( eeNew( InputTextBuffer, () ) ), mFont(NULL), mTexId(0), mCurAlpha(0), @@ -76,7 +76,7 @@ cConsole::cConsole( cFont* Font, const bool& MakeDefaultCommands, const bool& At mCurSide(false) { if ( NULL == mWindow ) { - mWindow = cEngine::instance()->GetCurrentWindow(); + mWindow = Engine::instance()->GetCurrentWindow(); } Create( Font, MakeDefaultCommands, AttachToLog, MaxLogLines, TextureId ); @@ -84,8 +84,8 @@ cConsole::cConsole( cFont* Font, const bool& MakeDefaultCommands, const bool& At cConsole::~cConsole() { if ( mMyCallback && - NULL != cEngine::ExistsSingleton() && - cEngine::instance()->ExistsWindow( mWindow ) + NULL != Engine::ExistsSingleton() && + Engine::instance()->ExistsWindow( mWindow ) ) { mWindow->GetInput()->PopCallback( mMyCallback ); @@ -101,7 +101,7 @@ cConsole::~cConsole() { void cConsole::Create( cFont* Font, const bool& MakeDefaultCommands, const bool& AttachToLog, const unsigned int& MaxLogLines, const Uint32& TextureId ) { if ( NULL == mWindow ) { - mWindow = cEngine::instance()->GetCurrentWindow(); + mWindow = Engine::instance()->GetCurrentWindow(); } mFont = Font; @@ -126,8 +126,8 @@ void cConsole::Create( cFont* Font, const bool& MakeDefaultCommands, const bool& mHeight = (Float) mWindow->GetHeight(); mHeightMin = (Float) ( mWindow->GetHeight() / 2 ); - if ( NULL != cEngine::ExistsSingleton() && - cEngine::instance()->ExistsWindow( mWindow ) ) + if ( NULL != Engine::ExistsSingleton() && + Engine::instance()->ExistsWindow( mWindow ) ) { mMyCallback = mWindow->GetInput()->PushCallback( cb::Make1( this, &cConsole::PrivInputCallback ) ); mVidCb = mWindow->PushResizeCallback( cb::Make1( this, &cConsole::PrivVideoResize ) ); diff --git a/src/eepp/graphics/cframebuffer.cpp b/src/eepp/graphics/cframebuffer.cpp index 79bab9471..a80b1f611 100644 --- a/src/eepp/graphics/cframebuffer.cpp +++ b/src/eepp/graphics/cframebuffer.cpp @@ -26,7 +26,7 @@ cFrameBuffer::cFrameBuffer( Window::cWindow * window ) : mClearColor(0,0,0,0) { if ( NULL == mWindow ) { - mWindow = cEngine::instance()->GetCurrentWindow(); + mWindow = Engine::instance()->GetCurrentWindow(); } cFrameBufferManager::instance()->Add( this ); diff --git a/src/eepp/graphics/cframebufferfbo.cpp b/src/eepp/graphics/cframebufferfbo.cpp index 3f0700524..1733a20fe 100644 --- a/src/eepp/graphics/cframebufferfbo.cpp +++ b/src/eepp/graphics/cframebufferfbo.cpp @@ -59,7 +59,7 @@ bool cFrameBufferFBO::Create( const Uint32& Width, const Uint32& Height, bool De return false; if ( NULL == mWindow ) { - mWindow = cEngine::instance()->GetCurrentWindow(); + mWindow = Engine::instance()->GetCurrentWindow(); } mWidth = Width; diff --git a/src/eepp/graphics/cparticlesystem.cpp b/src/eepp/graphics/cparticlesystem.cpp index be128296a..e4e98980a 100755 --- a/src/eepp/graphics/cparticlesystem.cpp +++ b/src/eepp/graphics/cparticlesystem.cpp @@ -363,7 +363,7 @@ void cParticleSystem::Draw() { } void cParticleSystem::Update() { - Update( cEngine::instance()->Elapsed() ); + Update( Engine::instance()->Elapsed() ); } void cParticleSystem::Update( const System::Time& time ) { diff --git a/src/eepp/graphics/csprite.cpp b/src/eepp/graphics/csprite.cpp index 6847567fb..ae0c98ef9 100755 --- a/src/eepp/graphics/csprite.cpp +++ b/src/eepp/graphics/csprite.cpp @@ -481,7 +481,7 @@ bool cSprite::AddSubFrame(const Uint32& TexId, const unsigned int& NumFrame, con } void cSprite::Update() { - Update( cEngine::instance()->Elapsed() ); + Update( Engine::instance()->Elapsed() ); } void cSprite::Update( const Time& ElapsedTime ) { diff --git a/src/eepp/graphics/ctextureloader.cpp b/src/eepp/graphics/ctextureloader.cpp index d9458c5b9..2eed76716 100644 --- a/src/eepp/graphics/ctextureloader.cpp +++ b/src/eepp/graphics/ctextureloader.cpp @@ -242,7 +242,7 @@ void cTextureLoader::Start() { mTexLoaded = true; - if ( !mThreaded || ( cEngine::instance()->IsSharedGLContextEnabled() && cEngine::instance()->GetCurrentWindow()->IsThreadedGLContext() ) ) { + if ( !mThreaded || ( Engine::instance()->IsSharedGLContextEnabled() && Engine::instance()->GetCurrentWindow()->IsThreadedGLContext() ) ) { LoadFromPixels(); } } @@ -424,13 +424,13 @@ void cTextureLoader::LoadFromPixels() { flags = ( mClampMode == CLAMP_REPEAT) ? (flags | SOIL_FLAG_TEXTURE_REPEATS) : flags; flags = ( mCompressTexture ) ? ( flags | SOIL_FLAG_COMPRESS_TO_DXT ) : flags; - bool ForceGLThreaded = Thread::GetCurrentThreadId() != cEngine::instance()->GetMainThreadId(); + bool ForceGLThreaded = Thread::GetCurrentThreadId() != Engine::instance()->GetMainThreadId(); if ( ( mThreaded || ForceGLThreaded ) && - ( ForceGLThreaded || cEngine::instance()->IsSharedGLContextEnabled() ) && - cEngine::instance()->GetCurrentWindow()->IsThreadedGLContext() ) + ( ForceGLThreaded || Engine::instance()->IsSharedGLContextEnabled() ) && + Engine::instance()->GetCurrentWindow()->IsThreadedGLContext() ) { - cEngine::instance()->GetCurrentWindow()->SetGLContextThread(); + Engine::instance()->GetCurrentWindow()->SetGLContextThread(); } int PreviousTexture; @@ -463,10 +463,10 @@ void cTextureLoader::LoadFromPixels() { GLi->BindTexture( GL_TEXTURE_2D, PreviousTexture ); if ( ( mThreaded || ForceGLThreaded ) && - ( ForceGLThreaded || cEngine::instance()->IsSharedGLContextEnabled() ) && - cEngine::instance()->GetCurrentWindow()->IsThreadedGLContext() ) + ( ForceGLThreaded || Engine::instance()->IsSharedGLContextEnabled() ) && + Engine::instance()->GetCurrentWindow()->IsThreadedGLContext() ) { - cEngine::instance()->GetCurrentWindow()->UnsetGLContextThread(); + Engine::instance()->GetCurrentWindow()->UnsetGLContextThread(); } if ( tTexId ) { @@ -527,7 +527,7 @@ void cTextureLoader::LoadFromPixels() { } void cTextureLoader::Update() { - if ( !( cEngine::instance()->IsSharedGLContextEnabled() && cEngine::instance()->GetCurrentWindow()->IsThreadedGLContext() ) ) { + if ( !( Engine::instance()->IsSharedGLContextEnabled() && Engine::instance()->GetCurrentWindow()->IsThreadedGLContext() ) ) { LoadFromPixels(); } } diff --git a/src/eepp/physics/cspace.cpp b/src/eepp/physics/cspace.cpp index f430b2839..f514ddbe1 100644 --- a/src/eepp/physics/cspace.cpp +++ b/src/eepp/physics/cspace.cpp @@ -64,7 +64,7 @@ void cSpace::Step( const cpFloat& dt ) { void cSpace::Update() { #ifdef PHYSICS_RENDERER_ENABLED - Step( Window::cEngine::instance()->Elapsed().AsSeconds() ); + Step( Window::Engine::instance()->Elapsed().AsSeconds() ); #else Step( 1 / 60 ); #endif diff --git a/src/eepp/system/sys.cpp b/src/eepp/system/sys.cpp index ca0a47a76..e248b89f9 100644 --- a/src/eepp/system/sys.cpp +++ b/src/eepp/system/sys.cpp @@ -446,8 +446,8 @@ static std::string sGetProcessPath() { return FileSystem::FileRemoveFileName( std::string( info.name ) ); #elif EE_PLATFORM == EE_PLATFORM_ANDROID - if ( NULL != Window::cEngine::instance() && NULL != Window::cEngine::instance()->GetCurrentWindow() ) - return Window::cEngine::instance()->GetCurrentWindow()->GetExternalStoragePath(); + if ( NULL != Window::Engine::instance() && NULL != Window::Engine::instance()->GetCurrentWindow() ) + return Window::Engine::instance()->GetCurrentWindow()->GetExternalStoragePath(); return "/sdcard/"; #else @@ -569,8 +569,8 @@ std::string Sys::GetConfigPath( std::string appname ) { #elif EE_PLATFORM == EE_PLATFORM_IOS return GetProcessPath() + "config"; #elif EE_PLATFORM == EE_PLATFORM_ANDROID - if ( NULL != Window::cEngine::instance() ) - return Window::cEngine::instance()->GetCurrentWindow()->GetInternalStoragePath(); + if ( NULL != Window::Engine::instance() ) + return Window::Engine::instance()->GetCurrentWindow()->GetInternalStoragePath(); return std::string(); #else @@ -598,8 +598,8 @@ std::string Sys::GetTempPath() { return std::string( "C:\\WINDOWS\\TEMP\\" ); } #elif EE_PLATFORM == EE_PLATFORM_ANDROID - if ( NULL != Window::cEngine::instance() ) { - String::StrCopy( path, Window::cEngine::instance()->GetCurrentWindow()->GetInternalStoragePath().c_str(), EE_MAX_CFG_PATH_LEN ); + if ( NULL != Window::Engine::instance() ) { + String::StrCopy( path, Window::Engine::instance()->GetCurrentWindow()->GetInternalStoragePath().c_str(), EE_MAX_CFG_PATH_LEN ); } else { String::StrCopy( path, "/tmp", EE_MAX_CFG_PATH_LEN ); } diff --git a/src/eepp/ui/cuimanager.cpp b/src/eepp/ui/cuimanager.cpp index 6ab071647..636d43b07 100644 --- a/src/eepp/ui/cuimanager.cpp +++ b/src/eepp/ui/cuimanager.cpp @@ -41,7 +41,7 @@ void cUIManager::Init( Uint32 Flags, Window::cWindow * window ) { mFlags = Flags; if ( NULL == mWindow ) { - mWindow = cEngine::instance()->GetCurrentWindow(); + mWindow = Engine::instance()->GetCurrentWindow(); } mKM = mWindow->GetInput(); @@ -51,7 +51,7 @@ void cUIManager::Init( Uint32 Flags, Window::cWindow * window ) { cUIWindow::CreateParams Params; Params.Parent( NULL ); Params.PosSet( 0, 0 ); - Params.SizeSet( cEngine::instance()->GetWidth(), cEngine::instance()->GetHeight() ); + Params.SizeSet( Engine::instance()->GetWidth(), Engine::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 = Sizei( 0, 0 ); @@ -74,8 +74,8 @@ void cUIManager::Init( Uint32 Flags, Window::cWindow * window ) { void cUIManager::Shutdown() { if ( mInit ) { if ( -1 != mCbId && - NULL != cEngine::ExistsSingleton() && - cEngine::instance()->ExistsWindow( mWindow ) + NULL != Engine::ExistsSingleton() && + Engine::instance()->ExistsWindow( mWindow ) ) { mKM->PopCallback( mCbId ); @@ -273,7 +273,7 @@ Vector2i cUIManager::GetMousePos() { return mKM->GetMousePos(); } -cInput * cUIManager::GetInput() const { +Input * cUIManager::GetInput() const { return mKM; } diff --git a/src/eepp/ui/cuitextinput.cpp b/src/eepp/ui/cuitextinput.cpp index f315f08c4..1b74a685a 100644 --- a/src/eepp/ui/cuitextinput.cpp +++ b/src/eepp/ui/cuitextinput.cpp @@ -187,7 +187,7 @@ void cUITextInput::AutoPadding() { } } -cInputTextBuffer * cUITextInput::GetInputTextBuffer() { +InputTextBuffer * cUITextInput::GetInputTextBuffer() { return &mTextBuffer; } diff --git a/src/eepp/window/backend/SDL/cbackendsdl.cpp b/src/eepp/window/backend/SDL/cbackendsdl.cpp index d729e77e4..ff49b1187 100644 --- a/src/eepp/window/backend/SDL/cbackendsdl.cpp +++ b/src/eepp/window/backend/SDL/cbackendsdl.cpp @@ -6,12 +6,12 @@ namespace EE { namespace Window { namespace Backend { namespace SDL { -cBackendSDL::cBackendSDL() : - cBackend() +WindowBackendSDL::WindowBackendSDL() : + WindowBackend() { } -cBackendSDL::~cBackendSDL() +WindowBackendSDL::~WindowBackendSDL() { SDL_Quit(); } diff --git a/src/eepp/window/backend/SDL/cbackendsdl.hpp b/src/eepp/window/backend/SDL/cbackendsdl.hpp index b30e185f4..c69247d2a 100644 --- a/src/eepp/window/backend/SDL/cbackendsdl.hpp +++ b/src/eepp/window/backend/SDL/cbackendsdl.hpp @@ -10,11 +10,11 @@ namespace EE { namespace Window { namespace Backend { namespace SDL { -class EE_API cBackendSDL : public cBackend { +class EE_API WindowBackendSDL : public WindowBackend { public: - cBackendSDL(); + WindowBackendSDL(); - ~cBackendSDL(); + ~WindowBackendSDL(); }; }}}} diff --git a/src/eepp/window/backend/SDL/cclipboardsdl.cpp b/src/eepp/window/backend/SDL/cclipboardsdl.cpp index ff11f1637..1689a7de5 100644 --- a/src/eepp/window/backend/SDL/cclipboardsdl.cpp +++ b/src/eepp/window/backend/SDL/cclipboardsdl.cpp @@ -96,16 +96,16 @@ static int clipboard_filter( const SDL_Event *event ) { } #endif -cClipboardSDL::cClipboardSDL( cWindow * window ) : - cClipboard( window ), +ClipboardSDL::ClipboardSDL( cWindow * window ) : + Clipboard( window ), mInfo( NULL ) { } -cClipboardSDL::~cClipboardSDL() { +ClipboardSDL::~ClipboardSDL() { } -void cClipboardSDL::Init() { +void ClipboardSDL::Init() { #if defined( EE_X11_PLATFORM ) /// Enable the special window hook events SDL_EventState( SDL_SYSWMEVENT, SDL_ENABLE ); @@ -127,7 +127,7 @@ void cClipboardSDL::Init() { #endif #endif -void cClipboardSDL::SetText( const std::string& Text ) { +void ClipboardSDL::SetText( const std::string& Text ) { #if defined( EE_X11_PLATFORM ) eeWindowHandle display = mInfo->info.x11.display; X11Window window = mInfo->info.x11.wmwindow; @@ -143,7 +143,7 @@ void cClipboardSDL::SetText( const std::string& Text ) { #endif } -int cClipboardSDL::clipboard_convert_scrap( int type, char *dst, char *src, int srclen ) { +int ClipboardSDL::clipboard_convert_scrap( int type, char *dst, char *src, int srclen ) { int dstlen; dstlen = 0; @@ -196,7 +196,7 @@ int cClipboardSDL::clipboard_convert_scrap( int type, char *dst, char *src, int return dstlen; } -eeScrapType cClipboardSDL::clipboard_convert_format( int type ) { +eeScrapType ClipboardSDL::clipboard_convert_format( int type ) { switch (type) { case T('T', 'E', 'X', 'T'): #if defined( EE_X11_PLATFORM ) @@ -223,7 +223,7 @@ eeScrapType cClipboardSDL::clipboard_convert_format( int type ) { return 0; } -void cClipboardSDL::clipboard_get_scrap( int type, int *dstlen, char **dst ) { +void ClipboardSDL::clipboard_get_scrap( int type, int *dstlen, char **dst ) { eeScrapType format; *dstlen = 0; format = clipboard_convert_format( type ); @@ -300,7 +300,7 @@ void cClipboardSDL::clipboard_get_scrap( int type, int *dstlen, char **dst ) { #endif } -std::string cClipboardSDL::GetText() { +std::string ClipboardSDL::GetText() { std::string tStr; #if defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_WIN @@ -323,13 +323,13 @@ std::string cClipboardSDL::GetText() { eeSAFE_DELETE_ARRAY( scrap ); #else - #warning cClipboardSDL::GetClipboardText() not implemented on this platform. + #warning ClipboardSDL::GetClipboardText() not implemented on this platform. #endif return tStr; } -String cClipboardSDL::GetWideText() { +String ClipboardSDL::GetWideText() { String tStr; #if defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_WIN @@ -355,7 +355,7 @@ String cClipboardSDL::GetWideText() { eeSAFE_DELETE_ARRAY( scrap ); #else - #warning cClipboardSDL::GetWideText() not implemented on this platform. + #warning ClipboardSDL::GetWideText() not implemented on this platform. #endif return tStr; diff --git a/src/eepp/window/backend/SDL/cclipboardsdl.hpp b/src/eepp/window/backend/SDL/cclipboardsdl.hpp index 60c053c2a..aed44d407 100644 --- a/src/eepp/window/backend/SDL/cclipboardsdl.hpp +++ b/src/eepp/window/backend/SDL/cclipboardsdl.hpp @@ -22,9 +22,9 @@ namespace EE { namespace Window { namespace Backend { namespace SDL { typedef unsigned int eeScrapType; #endif -class EE_API cClipboardSDL : public cClipboard { +class EE_API ClipboardSDL : public Clipboard { public: - virtual ~cClipboardSDL(); + virtual ~ClipboardSDL(); std::string GetText(); @@ -34,7 +34,7 @@ class EE_API cClipboardSDL : public cClipboard { protected: friend class cWindowSDL; - cClipboardSDL( Window::cWindow * window ); + ClipboardSDL( Window::cWindow * window ); void Init(); diff --git a/src/eepp/window/backend/SDL/ccursormanagersdl.cpp b/src/eepp/window/backend/SDL/ccursormanagersdl.cpp index 560d03c60..7edcd9b40 100644 --- a/src/eepp/window/backend/SDL/ccursormanagersdl.cpp +++ b/src/eepp/window/backend/SDL/ccursormanagersdl.cpp @@ -13,52 +13,52 @@ namespace EE { namespace Window { namespace Backend { namespace SDL { -cCursorManagerSDL::cCursorManagerSDL( cWindow * window ) : - cCursorManager( window ) +CursorManagerSDL::CursorManagerSDL( cWindow * window ) : + CursorManager( window ) { } -cCursor * cCursorManagerSDL::Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { +Cursor * CursorManagerSDL::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 - return eeNew( cCursorSDL, ( tex, hotspot, name, mWindow ) ); + return eeNew( CursorSDL, ( tex, hotspot, name, mWindow ) ); #endif } -cCursor * cCursorManagerSDL::Create( cImage * img, const Vector2i& hotspot, const std::string& name ) { +Cursor * CursorManagerSDL::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 - return eeNew( cCursorSDL, ( img, hotspot, name, mWindow ) ); + return eeNew( CursorSDL, ( img, hotspot, name, mWindow ) ); #endif } -cCursor * cCursorManagerSDL::Create( const std::string& path, const Vector2i& hotspot, const std::string& name ) { +Cursor * CursorManagerSDL::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 - return eeNew( cCursorSDL, ( path, hotspot, name, mWindow ) ); + return eeNew( CursorSDL, ( path, hotspot, name, mWindow ) ); #endif } -void cCursorManagerSDL::Set( cCursor * cursor ) { +void CursorManagerSDL::Set( Cursor * cursor ) { mWindow->GetPlatform()->SetMouseCursor( cursor ); } -void cCursorManagerSDL::Set( EE_SYSTEM_CURSOR syscurid ) { +void CursorManagerSDL::Set( EE_SYSTEM_CURSOR syscurid ) { mWindow->GetPlatform()->SetSystemMouseCursor( syscurid ); } -void cCursorManagerSDL::Show() { +void CursorManagerSDL::Show() { Visible( true ); } -void cCursorManagerSDL::Hide() { +void CursorManagerSDL::Hide() { Visible( false ); } -void cCursorManagerSDL::Visible( bool visible ) { +void CursorManagerSDL::Visible( bool visible ) { if ( visible ) { SDL_ShowCursor( SDL_ENABLE ); @@ -74,11 +74,11 @@ void cCursorManagerSDL::Visible( bool visible ) { } } -void cCursorManagerSDL::Remove( cCursor * cursor, bool Delete ) { - cCursorManager::Remove( cursor, Delete ); +void CursorManagerSDL::Remove( Cursor * cursor, bool Delete ) { + CursorManager::Remove( cursor, Delete ); } -void cCursorManagerSDL::Reload() { +void CursorManagerSDL::Reload() { if ( mVisible ) { Show(); diff --git a/src/eepp/window/backend/SDL/ccursormanagersdl.hpp b/src/eepp/window/backend/SDL/ccursormanagersdl.hpp index 458f04277..83770bc86 100644 --- a/src/eepp/window/backend/SDL/ccursormanagersdl.hpp +++ b/src/eepp/window/backend/SDL/ccursormanagersdl.hpp @@ -10,17 +10,17 @@ using namespace EE::Window; namespace EE { namespace Window { namespace Backend { namespace SDL { -class cCursorManagerSDL : public cCursorManager { +class CursorManagerSDL : public CursorManager { public: - cCursorManagerSDL( Window::cWindow * window ); + CursorManagerSDL( Window::cWindow * window ); - cCursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ); + Cursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( cImage * img, const Vector2i& hotspot, const std::string& name ); + Cursor * Create( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( const std::string& path, const Vector2i& hotspot, const std::string& name ); + Cursor * Create( const std::string& path, const Vector2i& hotspot, const std::string& name ); - void Set( cCursor * cursor ); + void Set( Cursor * cursor ); void Set( EE_SYSTEM_CURSOR syscurid ); @@ -30,7 +30,7 @@ class cCursorManagerSDL : public cCursorManager { void Visible( bool visible ); - void Remove( cCursor * cursor, bool Delete = false ); + void Remove( Cursor * cursor, bool Delete = false ); void Reload(); }; diff --git a/src/eepp/window/backend/SDL/ccursorsdl.cpp b/src/eepp/window/backend/SDL/ccursorsdl.cpp index 980f09b8b..011a70b21 100644 --- a/src/eepp/window/backend/SDL/ccursorsdl.cpp +++ b/src/eepp/window/backend/SDL/ccursorsdl.cpp @@ -4,22 +4,22 @@ namespace EE { namespace Window { namespace Backend { namespace SDL { -cCursorSDL::cCursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( tex, hotspot, name, window ) +CursorSDL::CursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( tex, hotspot, name, window ) { } -cCursorSDL::cCursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( img, hotspot, name, window ) +CursorSDL::CursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( img, hotspot, name, window ) { } -cCursorSDL::cCursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( path, hotspot, name, window ) +CursorSDL::CursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( path, hotspot, name, window ) { } -void cCursorSDL::Create() { +void CursorSDL::Create() { } }}}} diff --git a/src/eepp/window/backend/SDL/ccursorsdl.hpp b/src/eepp/window/backend/SDL/ccursorsdl.hpp index 4512fbfc1..8982b70f7 100644 --- a/src/eepp/window/backend/SDL/ccursorsdl.hpp +++ b/src/eepp/window/backend/SDL/ccursorsdl.hpp @@ -10,15 +10,15 @@ using namespace EE::Window; namespace EE { namespace Window { namespace Backend { namespace SDL { -class cCursorSDL : public cCursor { +class CursorSDL : public Cursor { protected: - friend class cCursorManagerSDL; + friend class CursorManagerSDL; - cCursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorSDL( 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 82218e664..c823f82c6 100644 --- a/src/eepp/window/backend/SDL/cinputsdl.cpp +++ b/src/eepp/window/backend/SDL/cinputsdl.cpp @@ -28,18 +28,18 @@ namespace EE { namespace Window { namespace Backend { namespace SDL { -cInputSDL::cInputSDL( cWindow * window ) : - cInput( window, eeNew( cJoystickManagerSDL, () ) ) +InputSDL::InputSDL( cWindow * window ) : + Input( window, eeNew( JoystickManagerSDL, () ) ) { #if defined( EE_X11_PLATFORM ) mMouseSpeed = 1.75f; #endif } -cInputSDL::~cInputSDL() { +InputSDL::~InputSDL() { } -void cInputSDL::Update() { +void InputSDL::Update() { SDL_Event SDLEvent; InputEvent EEEvent; @@ -209,22 +209,22 @@ void cInputSDL::Update() { } } -bool cInputSDL::GrabInput() { +bool InputSDL::GrabInput() { return ( SDL_WM_GrabInput( SDL_GRAB_QUERY ) == SDL_GRAB_ON ) ? true : false; } -void cInputSDL::GrabInput( const bool& Grab ) { +void InputSDL::GrabInput( const bool& Grab ) { if ( Grab ) SDL_WM_GrabInput(SDL_GRAB_ON); else SDL_WM_GrabInput(SDL_GRAB_OFF); } -void cInputSDL::InjectMousePos( const Uint16& x, const Uint16& y ) { +void InputSDL::InjectMousePos( const Uint16& x, const Uint16& y ) { SDL_WarpMouse( x, y ); } -void cInputSDL::Init() { +void InputSDL::Init() { Vector2if mTempMouse; SDL_GetMouseState( &mTempMouse.x, &mTempMouse.y ); mMousePos.x = (int)mTempMouse.x; diff --git a/src/eepp/window/backend/SDL/cinputsdl.hpp b/src/eepp/window/backend/SDL/cinputsdl.hpp index 043debeb9..0c9b39bc9 100644 --- a/src/eepp/window/backend/SDL/cinputsdl.hpp +++ b/src/eepp/window/backend/SDL/cinputsdl.hpp @@ -10,9 +10,9 @@ namespace EE { namespace Window { namespace Backend { namespace SDL { -class EE_API cInputSDL : public cInput { +class EE_API InputSDL : public Input { public: - virtual ~cInputSDL(); + virtual ~InputSDL(); void Update(); @@ -24,7 +24,7 @@ class EE_API cInputSDL : public cInput { protected: friend class cWindowSDL; - cInputSDL( Window::cWindow * window ); + InputSDL( Window::cWindow * window ); virtual void Init(); }; diff --git a/src/eepp/window/backend/SDL/cjoystickmanagersdl.cpp b/src/eepp/window/backend/SDL/cjoystickmanagersdl.cpp index ef08859cc..744d579c0 100644 --- a/src/eepp/window/backend/SDL/cjoystickmanagersdl.cpp +++ b/src/eepp/window/backend/SDL/cjoystickmanagersdl.cpp @@ -11,15 +11,15 @@ namespace EE { namespace Window { namespace Backend { namespace SDL { -cJoystickManagerSDL::cJoystickManagerSDL() : - cJoystickManager() +JoystickManagerSDL::JoystickManagerSDL() : + JoystickManager() { } -cJoystickManagerSDL::~cJoystickManagerSDL() { +JoystickManagerSDL::~JoystickManagerSDL() { } -void cJoystickManagerSDL::Update() { +void JoystickManagerSDL::Update() { if ( mInit ) { SDL_JoystickUpdate(); @@ -29,7 +29,7 @@ void cJoystickManagerSDL::Update() { } } -void cJoystickManagerSDL::Open() { +void JoystickManagerSDL::Open() { int error = SDL_InitSubSystem( SDL_INIT_JOYSTICK ); if ( !error ) { @@ -42,7 +42,7 @@ void cJoystickManagerSDL::Open() { } } -void cJoystickManagerSDL::Close() { +void JoystickManagerSDL::Close() { if ( SDL_WasInit( SDL_INIT_JOYSTICK ) ) { SDL_QuitSubSystem( SDL_INIT_JOYSTICK ); @@ -50,11 +50,11 @@ void cJoystickManagerSDL::Close() { } } -void cJoystickManagerSDL::Create( const Uint32& index ) { +void JoystickManagerSDL::Create( const Uint32& index ) { if ( NULL != mJoysticks[ index ] ) mJoysticks[ index ]->ReOpen(); else - mJoysticks[ index ] = eeNew( cJoystickSDL, ( index ) ); + mJoysticks[ index ] = eeNew( JoystickSDL, ( index ) ); } }}}} diff --git a/src/eepp/window/backend/SDL/cjoystickmanagersdl.hpp b/src/eepp/window/backend/SDL/cjoystickmanagersdl.hpp index 4626f8e1c..d5edcf8ab 100644 --- a/src/eepp/window/backend/SDL/cjoystickmanagersdl.hpp +++ b/src/eepp/window/backend/SDL/cjoystickmanagersdl.hpp @@ -2,19 +2,19 @@ #define EE_WINDOWCJOYSTICKMANAGERSDL_HPP #include -#include +#include #ifdef EE_BACKEND_SDL_1_2 - + #include namespace EE { namespace Window { namespace Backend { namespace SDL { -class EE_API cJoystickManagerSDL : public cJoystickManager { +class EE_API JoystickManagerSDL : public JoystickManager { public: - cJoystickManagerSDL(); + JoystickManagerSDL(); - virtual ~cJoystickManagerSDL(); + virtual ~JoystickManagerSDL(); void Update(); diff --git a/src/eepp/window/backend/SDL/cjoysticksdl.cpp b/src/eepp/window/backend/SDL/cjoysticksdl.cpp index f08e70668..1df0cec7b 100644 --- a/src/eepp/window/backend/SDL/cjoysticksdl.cpp +++ b/src/eepp/window/backend/SDL/cjoysticksdl.cpp @@ -4,18 +4,18 @@ namespace EE { namespace Window { namespace Backend { namespace SDL { -cJoystickSDL::cJoystickSDL( const Uint32& index ) : - cJoystick( index ), +JoystickSDL::JoystickSDL( const Uint32& index ) : + Joystick( index ), mJoystick( NULL ) { Open(); } -cJoystickSDL::~cJoystickSDL() { +JoystickSDL::~JoystickSDL() { Close(); } -void cJoystickSDL::Open() { +void JoystickSDL::Open() { mJoystick = SDL_JoystickOpen( mIndex ); if ( NULL != mJoystick ) { @@ -32,7 +32,7 @@ void cJoystickSDL::Open() { } } -void cJoystickSDL::Close() { +void JoystickSDL::Close() { if( SDL_JoystickOpened( mIndex ) ) SDL_JoystickClose( mJoystick ); @@ -41,7 +41,7 @@ void cJoystickSDL::Close() { mHats = mButtons = mAxes = mBalls = 0; } -void cJoystickSDL::Update() { +void JoystickSDL::Update() { if ( NULL != mJoystick ) { ClearStates(); @@ -52,14 +52,14 @@ void cJoystickSDL::Update() { } } -Uint8 cJoystickSDL::GetHat( const Int32& index ) { +Uint8 JoystickSDL::GetHat( const Int32& index ) { if ( index >= 0 && index < mHats ) return SDL_JoystickGetHat( mJoystick, index ); return HAT_CENTERED; } -Float cJoystickSDL::GetAxis( const Int32& axis ) { +Float JoystickSDL::GetAxis( const Int32& axis ) { if ( axis >= 0 && axis < mAxes ) { return (Float)SDL_JoystickGetAxis( mJoystick, axis ) / 32768.f; } @@ -67,7 +67,7 @@ Float cJoystickSDL::GetAxis( const Int32& axis ) { return 0; } -Vector2i cJoystickSDL::GetBallMotion( const Int32& ball ) { +Vector2i JoystickSDL::GetBallMotion( const Int32& ball ) { Vector2i v; if ( ball >= 0 && ball < mBalls ) @@ -77,7 +77,7 @@ Vector2i cJoystickSDL::GetBallMotion( const Int32& ball ) { } -bool cJoystickSDL::Plugged() const { +bool JoystickSDL::Plugged() const { return NULL != mJoystick; } diff --git a/src/eepp/window/backend/SDL/cjoysticksdl.hpp b/src/eepp/window/backend/SDL/cjoysticksdl.hpp index a1e02cabe..52f102163 100644 --- a/src/eepp/window/backend/SDL/cjoysticksdl.hpp +++ b/src/eepp/window/backend/SDL/cjoysticksdl.hpp @@ -15,11 +15,11 @@ namespace EE { namespace Window { namespace Backend { namespace SDL { -class EE_API cJoystickSDL : public cJoystick { +class EE_API JoystickSDL : public Joystick { public: - cJoystickSDL( const Uint32& index ); + JoystickSDL( const Uint32& index ); - virtual ~cJoystickSDL(); + virtual ~JoystickSDL(); void Close(); diff --git a/src/eepp/window/backend/SDL/cwindowsdl.cpp b/src/eepp/window/backend/SDL/cwindowsdl.cpp index 43bb7ea81..154231f0b 100644 --- a/src/eepp/window/backend/SDL/cwindowsdl.cpp +++ b/src/eepp/window/backend/SDL/cwindowsdl.cpp @@ -33,7 +33,7 @@ namespace EE { namespace Window { namespace Backend { namespace SDL { cWindowSDL::cWindowSDL( WindowSettings Settings, ContextSettings Context ) : - cWindow( Settings, Context, eeNew( cClipboardSDL, ( this ) ), eeNew( cInputSDL, ( this ) ), eeNew( cCursorManagerSDL, ( this ) ) ), + cWindow( Settings, Context, eeNew( ClipboardSDL, ( this ) ), eeNew( InputSDL, ( this ) ), eeNew( CursorManagerSDL, ( this ) ) ), mSurface( NULL ) #if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM ) , @@ -149,12 +149,12 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) { LogSuccessfulInit( GetVersion() ); /// Init the clipboard after the window creation - reinterpret_cast ( mClipboard )->Init(); + reinterpret_cast ( mClipboard )->Init(); /// Init the input after the window creation - reinterpret_cast ( mInput )->Init(); + reinterpret_cast ( mInput )->Init(); - mCursorManager->Set( Cursor::SYS_CURSOR_ARROW ); + mCursorManager->Set( SYS_CURSOR_ARROW ); return true; } diff --git a/src/eepp/window/backend/SDL/cwindowsdl.hpp b/src/eepp/window/backend/SDL/cwindowsdl.hpp index 58a1ba431..735566666 100644 --- a/src/eepp/window/backend/SDL/cwindowsdl.hpp +++ b/src/eepp/window/backend/SDL/cwindowsdl.hpp @@ -39,7 +39,7 @@ class EE_API cWindowSDL : public cWindow { eeWindowHandle GetWindowHandler(); protected: - friend class cClipboardSDL; + friend class ClipboardSDL; SDL_Surface * mSurface; diff --git a/src/eepp/window/backend/SDL2/cbackendsdl2.cpp b/src/eepp/window/backend/SDL2/cbackendsdl2.cpp index d2959935f..62881b03c 100644 --- a/src/eepp/window/backend/SDL2/cbackendsdl2.cpp +++ b/src/eepp/window/backend/SDL2/cbackendsdl2.cpp @@ -10,12 +10,12 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 { -cBackendSDL2::cBackendSDL2() : - cBackend() +WindowBackendSDL2::WindowBackendSDL2() : + WindowBackend() { } -cBackendSDL2::~cBackendSDL2() +WindowBackendSDL2::~WindowBackendSDL2() { SDL_Quit(); } diff --git a/src/eepp/window/backend/SDL2/cbackendsdl2.hpp b/src/eepp/window/backend/SDL2/cbackendsdl2.hpp index cbc1935bc..d21227408 100644 --- a/src/eepp/window/backend/SDL2/cbackendsdl2.hpp +++ b/src/eepp/window/backend/SDL2/cbackendsdl2.hpp @@ -10,11 +10,11 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 { -class EE_API cBackendSDL2 : public cBackend { +class EE_API WindowBackendSDL2 : public WindowBackend { public: - cBackendSDL2(); + WindowBackendSDL2(); - ~cBackendSDL2(); + ~WindowBackendSDL2(); }; }}}} diff --git a/src/eepp/window/backend/SDL2/cclipboardsdl2.cpp b/src/eepp/window/backend/SDL2/cclipboardsdl2.cpp index 60991af85..a00e58002 100644 --- a/src/eepp/window/backend/SDL2/cclipboardsdl2.cpp +++ b/src/eepp/window/backend/SDL2/cclipboardsdl2.cpp @@ -5,29 +5,29 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 { -cClipboardSDL::cClipboardSDL( cWindow * window ) : - cClipboard( window ) +ClipboardSDL::ClipboardSDL( cWindow * window ) : + Clipboard( window ) { } -cClipboardSDL::~cClipboardSDL() { +ClipboardSDL::~ClipboardSDL() { } -void cClipboardSDL::Init() { +void ClipboardSDL::Init() { } -void cClipboardSDL::SetText( const std::string& Text ) { +void ClipboardSDL::SetText( const std::string& Text ) { SDL_SetClipboardText( Text.c_str() ); } -std::string cClipboardSDL::GetText() { +std::string ClipboardSDL::GetText() { char * text = SDL_GetClipboardText(); std::string str( text ); SDL_free(text); return str; } -String cClipboardSDL::GetWideText() { +String ClipboardSDL::GetWideText() { char * text = SDL_GetClipboardText(); String str( String::FromUtf8( text ) ); SDL_free(text); diff --git a/src/eepp/window/backend/SDL2/cclipboardsdl2.hpp b/src/eepp/window/backend/SDL2/cclipboardsdl2.hpp index da607723f..7fba6026e 100644 --- a/src/eepp/window/backend/SDL2/cclipboardsdl2.hpp +++ b/src/eepp/window/backend/SDL2/cclipboardsdl2.hpp @@ -11,9 +11,9 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 { -class EE_API cClipboardSDL : public cClipboard { +class EE_API ClipboardSDL : public Clipboard { public: - virtual ~cClipboardSDL(); + virtual ~ClipboardSDL(); std::string GetText(); @@ -23,7 +23,7 @@ class EE_API cClipboardSDL : public cClipboard { protected: friend class cWindowSDL; - cClipboardSDL( Window::cWindow * window ); + ClipboardSDL( Window::cWindow * window ); void Init(); }; diff --git a/src/eepp/window/backend/SDL2/ccursormanagersdl2.cpp b/src/eepp/window/backend/SDL2/ccursormanagersdl2.cpp index 1291c80c4..9599426fc 100644 --- a/src/eepp/window/backend/SDL2/ccursormanagersdl2.cpp +++ b/src/eepp/window/backend/SDL2/ccursormanagersdl2.cpp @@ -16,34 +16,34 @@ static SDL_Cursor * GetLoadCursor( const EE_SYSTEM_CURSOR& cursor ) { return SDL_SYS_CURSORS[ cursor ]; } -cCursorManagerSDL::cCursorManagerSDL( cWindow * window ) : - cCursorManager( window ) +CursorManagerSDL::CursorManagerSDL( cWindow * window ) : + CursorManager( window ) { } -cCursor * cCursorManagerSDL::Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { - return eeNew( cCursorSDL, ( tex, hotspot, name, mWindow ) ); +Cursor * CursorManagerSDL::Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { + return eeNew( CursorSDL, ( tex, hotspot, name, mWindow ) ); } -cCursor * cCursorManagerSDL::Create( cImage * img, const Vector2i& hotspot, const std::string& name ) { - return eeNew( cCursorSDL, ( img, hotspot, name, mWindow ) ); +Cursor * CursorManagerSDL::Create( cImage * img, const Vector2i& hotspot, const std::string& name ) { + return eeNew( CursorSDL, ( img, hotspot, name, mWindow ) ); } -cCursor * cCursorManagerSDL::Create( const std::string& path, const Vector2i& hotspot, const std::string& name ) { - return eeNew( cCursorSDL, ( path, hotspot, name, mWindow ) ); +Cursor * CursorManagerSDL::Create( const std::string& path, const Vector2i& hotspot, const std::string& name ) { + return eeNew( CursorSDL, ( path, hotspot, name, mWindow ) ); } -void cCursorManagerSDL::Set( cCursor * cursor ) { +void CursorManagerSDL::Set( Cursor * cursor ) { if ( NULL != cursor && cursor != mCurrent ) { - SDL_SetCursor( reinterpret_cast( cursor )->GetCursor() ); + SDL_SetCursor( reinterpret_cast( cursor )->GetCursor() ); mCurrent = cursor; mCurSysCursor = false; - mSysCursor = Cursor::SYS_CURSOR_NONE; + mSysCursor = SYS_CURSOR_NONE; } } -void cCursorManagerSDL::Set( EE_SYSTEM_CURSOR syscurid ) { +void CursorManagerSDL::Set( EE_SYSTEM_CURSOR syscurid ) { if ( syscurid != mSysCursor ) { SDL_SetCursor( GetLoadCursor( syscurid ) ); @@ -53,15 +53,15 @@ void cCursorManagerSDL::Set( EE_SYSTEM_CURSOR syscurid ) { } } -void cCursorManagerSDL::Show() { +void CursorManagerSDL::Show() { Visible( true ); } -void cCursorManagerSDL::Hide() { +void CursorManagerSDL::Hide() { Visible( false ); } -void cCursorManagerSDL::Visible( bool visible ) { +void CursorManagerSDL::Visible( bool visible ) { if ( visible ) { SDL_ShowCursor( SDL_ENABLE ); mVisible = true; @@ -71,11 +71,11 @@ void cCursorManagerSDL::Visible( bool visible ) { } } -void cCursorManagerSDL::Remove( cCursor * cursor, bool Delete ) { - cCursorManager::Remove( cursor, Delete ); +void CursorManagerSDL::Remove( Cursor * cursor, bool Delete ) { + CursorManager::Remove( cursor, Delete ); } -void cCursorManagerSDL::Reload() { +void CursorManagerSDL::Reload() { if ( mVisible ) { Show(); diff --git a/src/eepp/window/backend/SDL2/ccursormanagersdl2.hpp b/src/eepp/window/backend/SDL2/ccursormanagersdl2.hpp index ffcf3d7f3..2cc893374 100644 --- a/src/eepp/window/backend/SDL2/ccursormanagersdl2.hpp +++ b/src/eepp/window/backend/SDL2/ccursormanagersdl2.hpp @@ -10,17 +10,17 @@ using namespace EE::Window; namespace EE { namespace Window { namespace Backend { namespace SDL2 { -class cCursorManagerSDL : public cCursorManager { +class CursorManagerSDL : public CursorManager { public: - cCursorManagerSDL( Window::cWindow * window ); + CursorManagerSDL( Window::cWindow * window ); - cCursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ); + Cursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( cImage * img, const Vector2i& hotspot, const std::string& name ); + Cursor * Create( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( const std::string& path, const Vector2i& hotspot, const std::string& name ); + Cursor * Create( const std::string& path, const Vector2i& hotspot, const std::string& name ); - void Set( cCursor * cursor ); + void Set( Cursor * cursor ); void Set( EE_SYSTEM_CURSOR syscurid ); @@ -30,7 +30,7 @@ class cCursorManagerSDL : public cCursorManager { void Visible( bool visible ); - void Remove( cCursor * cursor, bool Delete = false ); + void Remove( Cursor * cursor, bool Delete = false ); void Reload(); }; diff --git a/src/eepp/window/backend/SDL2/ccursorsdl2.cpp b/src/eepp/window/backend/SDL2/ccursorsdl2.cpp index 24f71551e..239464778 100644 --- a/src/eepp/window/backend/SDL2/ccursorsdl2.cpp +++ b/src/eepp/window/backend/SDL2/ccursorsdl2.cpp @@ -4,33 +4,33 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 { -cCursorSDL::cCursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( tex, hotspot, name, window ), +CursorSDL::CursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( tex, hotspot, name, window ), mCursor( NULL ) { Create(); } -cCursorSDL::cCursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( img, hotspot, name, window ), +CursorSDL::CursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( img, hotspot, name, window ), mCursor( NULL ) { Create(); } -cCursorSDL::cCursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( path, hotspot, name, window ), +CursorSDL::CursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( path, hotspot, name, window ), mCursor( NULL ) { Create(); } -cCursorSDL::~cCursorSDL() { +CursorSDL::~CursorSDL() { if ( NULL != mCursor ) SDL_FreeCursor( mCursor ); } -void cCursorSDL::Create() { +void CursorSDL::Create() { if ( NULL == mImage ) return; @@ -65,7 +65,7 @@ void cCursorSDL::Create() { SDL_FreeSurface( TempGlyphSheet ); } -SDL_Cursor * cCursorSDL::GetCursor() const { +SDL_Cursor * CursorSDL::GetCursor() const { return mCursor; } diff --git a/src/eepp/window/backend/SDL2/ccursorsdl2.hpp b/src/eepp/window/backend/SDL2/ccursorsdl2.hpp index c4553c1c0..58e11c8a5 100644 --- a/src/eepp/window/backend/SDL2/ccursorsdl2.hpp +++ b/src/eepp/window/backend/SDL2/ccursorsdl2.hpp @@ -10,21 +10,21 @@ using namespace EE::Window; namespace EE { namespace Window { namespace Backend { namespace SDL2 { -class cCursorSDL : public cCursor { +class CursorSDL : public Cursor { public: SDL_Cursor * GetCursor() const; protected: - friend class cCursorManagerSDL; + friend class CursorManagerSDL; SDL_Cursor * mCursor; - cCursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - virtual ~cCursorSDL(); + virtual ~CursorSDL(); void Create(); }; diff --git a/src/eepp/window/backend/SDL2/cinputsdl2.cpp b/src/eepp/window/backend/SDL2/cinputsdl2.cpp index 3ad2fb8c3..001275b53 100644 --- a/src/eepp/window/backend/SDL2/cinputsdl2.cpp +++ b/src/eepp/window/backend/SDL2/cinputsdl2.cpp @@ -12,18 +12,18 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 { static Uint32 KeyCodesTable[ SDL_NUM_SCANCODES ]; static bool KeyCodesTableInit = false; -cInputSDL::cInputSDL( cWindow * window ) : - cInput( window, eeNew( cJoystickManagerSDL, () ) ) +InputSDL::InputSDL( cWindow * window ) : + Input( window, eeNew( JoystickManagerSDL, () ) ) { #if defined( EE_X11_PLATFORM ) mMouseSpeed = 1.75f; #endif } -cInputSDL::~cInputSDL() { +InputSDL::~InputSDL() { } -void cInputSDL::Update() { +void InputSDL::Update() { SDL_Event SDLEvent; InputEvent EEEvent; @@ -309,19 +309,19 @@ void cInputSDL::Update() { } } -bool cInputSDL::GrabInput() { +bool InputSDL::GrabInput() { return ( SDL_GetWindowGrab( reinterpret_cast ( mWindow )->GetSDLWindow() ) == SDL_TRUE ) ? true : false; } -void cInputSDL::GrabInput( const bool& Grab ) { +void InputSDL::GrabInput( const bool& Grab ) { SDL_SetWindowGrab( reinterpret_cast ( mWindow )->GetSDLWindow(), Grab ? SDL_TRUE : SDL_FALSE ); } -void cInputSDL::InjectMousePos( const Uint16& x, const Uint16& y ) { +void InputSDL::InjectMousePos( const Uint16& x, const Uint16& y ) { SDL_WarpMouseInWindow( reinterpret_cast( mWindow )->GetSDLWindow(), x, y ); } -void cInputSDL::Init() { +void InputSDL::Init() { Vector2if mTempMouse; SDL_GetMouseState( &mTempMouse.x, &mTempMouse.y ); @@ -334,7 +334,7 @@ void cInputSDL::Init() { mJoystickManager->Open(); } -void cInputSDL::InitializeTables() { +void InputSDL::InitializeTables() { if ( KeyCodesTableInit ) return; diff --git a/src/eepp/window/backend/SDL2/cinputsdl2.hpp b/src/eepp/window/backend/SDL2/cinputsdl2.hpp index 0af322ffe..75f748216 100644 --- a/src/eepp/window/backend/SDL2/cinputsdl2.hpp +++ b/src/eepp/window/backend/SDL2/cinputsdl2.hpp @@ -10,9 +10,9 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 { -class EE_API cInputSDL : public cInput { +class EE_API InputSDL : public Input { public: - virtual ~cInputSDL(); + virtual ~InputSDL(); void Update(); @@ -24,7 +24,7 @@ class EE_API cInputSDL : public cInput { protected: friend class cWindowSDL; - cInputSDL( Window::cWindow * window ); + InputSDL( Window::cWindow * window ); virtual void Init(); diff --git a/src/eepp/window/backend/SDL2/cjoystickmanagersdl2.cpp b/src/eepp/window/backend/SDL2/cjoystickmanagersdl2.cpp index 43a282ca4..8a9011492 100644 --- a/src/eepp/window/backend/SDL2/cjoystickmanagersdl2.cpp +++ b/src/eepp/window/backend/SDL2/cjoystickmanagersdl2.cpp @@ -5,15 +5,15 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 { -cJoystickManagerSDL::cJoystickManagerSDL() : - cJoystickManager() +JoystickManagerSDL::JoystickManagerSDL() : + JoystickManager() { } -cJoystickManagerSDL::~cJoystickManagerSDL() { +JoystickManagerSDL::~JoystickManagerSDL() { } -void cJoystickManagerSDL::Update() { +void JoystickManagerSDL::Update() { if ( mInit ) { SDL_JoystickUpdate(); @@ -23,7 +23,7 @@ void cJoystickManagerSDL::Update() { } } -void cJoystickManagerSDL::Open() { +void JoystickManagerSDL::Open() { int error = SDL_InitSubSystem( SDL_INIT_JOYSTICK ); if ( !error ) { @@ -36,7 +36,7 @@ void cJoystickManagerSDL::Open() { } } -void cJoystickManagerSDL::Close() { +void JoystickManagerSDL::Close() { if ( SDL_WasInit( SDL_INIT_JOYSTICK ) ) { SDL_QuitSubSystem( SDL_INIT_JOYSTICK ); @@ -44,11 +44,11 @@ void cJoystickManagerSDL::Close() { } } -void cJoystickManagerSDL::Create( const Uint32& index ) { +void JoystickManagerSDL::Create( const Uint32& index ) { if ( NULL != mJoysticks[ index ] ) mJoysticks[ index ]->ReOpen(); else - mJoysticks[ index ] = eeNew( cJoystickSDL, ( index ) ); + mJoysticks[ index ] = eeNew( JoystickSDL, ( index ) ); } }}}} diff --git a/src/eepp/window/backend/SDL2/cjoystickmanagersdl2.hpp b/src/eepp/window/backend/SDL2/cjoystickmanagersdl2.hpp index 4708ad6b6..5f45abea1 100644 --- a/src/eepp/window/backend/SDL2/cjoystickmanagersdl2.hpp +++ b/src/eepp/window/backend/SDL2/cjoystickmanagersdl2.hpp @@ -10,11 +10,11 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 { -class EE_API cJoystickManagerSDL : public cJoystickManager { +class EE_API JoystickManagerSDL : public JoystickManager { public: - cJoystickManagerSDL(); + JoystickManagerSDL(); - virtual ~cJoystickManagerSDL(); + virtual ~JoystickManagerSDL(); void Update(); diff --git a/src/eepp/window/backend/SDL2/cjoysticksdl2.cpp b/src/eepp/window/backend/SDL2/cjoysticksdl2.cpp index 115a07d5f..c225201d1 100644 --- a/src/eepp/window/backend/SDL2/cjoysticksdl2.cpp +++ b/src/eepp/window/backend/SDL2/cjoysticksdl2.cpp @@ -10,18 +10,18 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 { -cJoystickSDL::cJoystickSDL( const Uint32& index ) : - cJoystick( index ), +JoystickSDL::JoystickSDL( const Uint32& index ) : + Joystick( index ), mJoystick( NULL ) { Open(); } -cJoystickSDL::~cJoystickSDL() { +JoystickSDL::~JoystickSDL() { Close(); } -void cJoystickSDL::Open() { +void JoystickSDL::Open() { mJoystick = SDL_JoystickOpen( mIndex ); if ( NULL != mJoystick ) { @@ -40,7 +40,7 @@ void cJoystickSDL::Open() { } } -void cJoystickSDL::Close() { +void JoystickSDL::Close() { if( NULL != mJoystick ) SDL_JoystickClose( mJoystick ); @@ -49,7 +49,7 @@ void cJoystickSDL::Close() { mHats = mButtons = mAxes = mBalls = 0; } -void cJoystickSDL::Update() { +void JoystickSDL::Update() { if ( NULL != mJoystick ) { ClearStates(); @@ -60,14 +60,14 @@ void cJoystickSDL::Update() { } } -Uint8 cJoystickSDL::GetHat( const Int32& index ) { +Uint8 JoystickSDL::GetHat( const Int32& index ) { if ( index >= 0 && index < mHats ) return SDL_JoystickGetHat( mJoystick, index ); return HAT_CENTERED; } -Float cJoystickSDL::GetAxis( const Int32& axis ) { +Float JoystickSDL::GetAxis( const Int32& axis ) { if ( axis >= 0 && axis < mAxes ) { return (Float)SDL_JoystickGetAxis( mJoystick, axis ) / 32768.f; } @@ -75,7 +75,7 @@ Float cJoystickSDL::GetAxis( const Int32& axis ) { return 0; } -Vector2i cJoystickSDL::GetBallMotion( const Int32& ball ) { +Vector2i JoystickSDL::GetBallMotion( const Int32& ball ) { Vector2i v; if ( ball >= 0 && ball < mBalls ) @@ -84,7 +84,7 @@ Vector2i cJoystickSDL::GetBallMotion( const Int32& ball ) { return v; } -bool cJoystickSDL::Plugged() const { +bool JoystickSDL::Plugged() const { return NULL != mJoystick; } diff --git a/src/eepp/window/backend/SDL2/cjoysticksdl2.hpp b/src/eepp/window/backend/SDL2/cjoysticksdl2.hpp index 9b19944aa..091973bea 100644 --- a/src/eepp/window/backend/SDL2/cjoysticksdl2.hpp +++ b/src/eepp/window/backend/SDL2/cjoysticksdl2.hpp @@ -10,11 +10,11 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 { -class EE_API cJoystickSDL : public cJoystick { +class EE_API JoystickSDL : public Joystick { public: - cJoystickSDL( const Uint32& index ); + JoystickSDL( const Uint32& index ); - virtual ~cJoystickSDL(); + virtual ~JoystickSDL(); void Close(); diff --git a/src/eepp/window/backend/SDL2/cwindowsdl2.cpp b/src/eepp/window/backend/SDL2/cwindowsdl2.cpp index fc17b96ff..bb647063e 100644 --- a/src/eepp/window/backend/SDL2/cwindowsdl2.cpp +++ b/src/eepp/window/backend/SDL2/cwindowsdl2.cpp @@ -62,7 +62,7 @@ static std::string SDL_AndroidGetApkPath() { namespace EE { namespace Window { namespace Backend { namespace SDL2 { cWindowSDL::cWindowSDL( WindowSettings Settings, ContextSettings Context ) : - cWindow( Settings, Context, eeNew( cClipboardSDL, ( this ) ), eeNew( cInputSDL, ( this ) ), eeNew( cCursorManagerSDL, ( this ) ) ), + cWindow( Settings, Context, eeNew( ClipboardSDL, ( this ) ), eeNew( InputSDL, ( this ) ), eeNew( CursorManagerSDL, ( this ) ) ), mSDLWindow( NULL ), mGLContext( NULL ), mGLContextThread( NULL ), @@ -249,12 +249,12 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) { } /// Init the clipboard after the window creation - reinterpret_cast ( mClipboard )->Init(); + reinterpret_cast ( mClipboard )->Init(); /// Init the input after the window creation - reinterpret_cast ( mInput )->Init(); + reinterpret_cast ( mInput )->Init(); - mCursorManager->Set( Cursor::SYS_CURSOR_ARROW ); + mCursorManager->Set( SYS_CURSOR_ARROW ); #if EE_PLATFORM == EE_PLATFORM_ANDROID std::string apkPath( SDL_AndroidGetApkPath() ); diff --git a/src/eepp/window/backend/SDL2/cwindowsdl2.hpp b/src/eepp/window/backend/SDL2/cwindowsdl2.hpp index 195e87439..852db1fcb 100644 --- a/src/eepp/window/backend/SDL2/cwindowsdl2.hpp +++ b/src/eepp/window/backend/SDL2/cwindowsdl2.hpp @@ -93,7 +93,7 @@ class EE_API cWindowSDL : public cWindow { void UnsetGLContextThread(); protected: - friend class cClipboardSDL; + friend class ClipboardSDL; SDL_Window * mSDLWindow; SDL_GLContext mGLContext; diff --git a/src/eepp/window/backend/SFML/cbackendsfml.hpp b/src/eepp/window/backend/SFML/cbackendsfml.hpp index 3812aa447..814c6427d 100644 --- a/src/eepp/window/backend/SFML/cbackendsfml.hpp +++ b/src/eepp/window/backend/SFML/cbackendsfml.hpp @@ -8,13 +8,13 @@ namespace EE { namespace Window { namespace Backend { namespace SFML { -class EE_API cBackendSFML : public cBackend { +class EE_API WindowBackendSFML : public WindowBackend { public: - inline cBackendSFML() : cBackend() + inline WindowBackendSFML() : WindowBackend() { } - inline ~cBackendSFML() + inline ~WindowBackendSFML() { } }; diff --git a/src/eepp/window/backend/SFML/cclipboardsfml.cpp b/src/eepp/window/backend/SFML/cclipboardsfml.cpp index 93e72c7da..a15ed0d29 100644 --- a/src/eepp/window/backend/SFML/cclipboardsfml.cpp +++ b/src/eepp/window/backend/SFML/cclipboardsfml.cpp @@ -5,25 +5,25 @@ namespace EE { namespace Window { namespace Backend { namespace SFML { -cClipboardSFML::cClipboardSFML( cWindow * window ) : - cClipboard( window ) +ClipboardSFML::ClipboardSFML( cWindow * window ) : + Clipboard( window ) { } -cClipboardSFML::~cClipboardSFML() { +ClipboardSFML::~ClipboardSFML() { } -void cClipboardSFML::Init() { +void ClipboardSFML::Init() { } -void cClipboardSFML::SetText( const std::string& Text ) { +void ClipboardSFML::SetText( const std::string& Text ) { } -std::string cClipboardSFML::GetText() { +std::string ClipboardSFML::GetText() { return std::string(); } -String cClipboardSFML::GetWideText() { +String ClipboardSFML::GetWideText() { return String(); } diff --git a/src/eepp/window/backend/SFML/cclipboardsfml.hpp b/src/eepp/window/backend/SFML/cclipboardsfml.hpp index cddd9bcd0..6564fbb7a 100644 --- a/src/eepp/window/backend/SFML/cclipboardsfml.hpp +++ b/src/eepp/window/backend/SFML/cclipboardsfml.hpp @@ -8,9 +8,9 @@ namespace EE { namespace Window { namespace Backend { namespace SFML { -class EE_API cClipboardSFML : public cClipboard { +class EE_API ClipboardSFML : public Clipboard { public: - virtual ~cClipboardSFML(); + virtual ~ClipboardSFML(); std::string GetText(); @@ -20,7 +20,7 @@ class EE_API cClipboardSFML : public cClipboard { protected: friend class cWindowSFML; - cClipboardSFML( Window::cWindow * window ); + ClipboardSFML( Window::cWindow * window ); void Init(); }; diff --git a/src/eepp/window/backend/SFML/ccursormanagersfml.cpp b/src/eepp/window/backend/SFML/ccursormanagersfml.cpp index 7369f9a71..92c1a43a6 100644 --- a/src/eepp/window/backend/SFML/ccursormanagersfml.cpp +++ b/src/eepp/window/backend/SFML/ccursormanagersfml.cpp @@ -12,52 +12,52 @@ namespace EE { namespace Window { namespace Backend { namespace SFML { -cCursorManagerSFML::cCursorManagerSFML( cWindow * window ) : - cCursorManager( window ) +CursorManagerSFML::CursorManagerSFML( cWindow * window ) : + CursorManager( window ) { } -cCursor * cCursorManagerSFML::Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { +Cursor * CursorManagerSFML::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 - return eeNew( cCursorSFML, ( tex, hotspot, name, mWindow ) ); + return eeNew( CursorSFML, ( tex, hotspot, name, mWindow ) ); #endif } -cCursor * cCursorManagerSFML::Create( cImage * img, const Vector2i& hotspot, const std::string& name ) { +Cursor * CursorManagerSFML::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 - return eeNew( cCursorSFML, ( img, hotspot, name, mWindow ) ); + return eeNew( CursorSFML, ( img, hotspot, name, mWindow ) ); #endif } -cCursor * cCursorManagerSFML::Create( const std::string& path, const Vector2i& hotspot, const std::string& name ) { +Cursor * CursorManagerSFML::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 - return eeNew( cCursorSFML, ( path, hotspot, name, mWindow ) ); + return eeNew( CursorSFML, ( path, hotspot, name, mWindow ) ); #endif } -void cCursorManagerSFML::Set( cCursor * cursor ) { +void CursorManagerSFML::Set( Cursor * cursor ) { mWindow->GetPlatform()->SetMouseCursor( cursor ); } -void cCursorManagerSFML::Set( EE_SYSTEM_CURSOR syscurid ) { +void CursorManagerSFML::Set( EE_SYSTEM_CURSOR syscurid ) { mWindow->GetPlatform()->SetSystemMouseCursor( syscurid ); } -void cCursorManagerSFML::Show() { +void CursorManagerSFML::Show() { Visible( true ); } -void cCursorManagerSFML::Hide() { +void CursorManagerSFML::Hide() { Visible( false ); } -void cCursorManagerSFML::Visible( bool visible ) { +void CursorManagerSFML::Visible( bool visible ) { if ( visible ) { reinterpret_cast(mWindow)->GetSFMLWindow()->setMouseCursorVisible( true ); @@ -73,11 +73,11 @@ void cCursorManagerSFML::Visible( bool visible ) { } } -void cCursorManagerSFML::Remove( cCursor * cursor, bool Delete ) { - cCursorManager::Remove( cursor, Delete ); +void CursorManagerSFML::Remove( Cursor * cursor, bool Delete ) { + CursorManager::Remove( cursor, Delete ); } -void cCursorManagerSFML::Reload() { +void CursorManagerSFML::Reload() { if ( mVisible ) { Show(); diff --git a/src/eepp/window/backend/SFML/ccursormanagersfml.hpp b/src/eepp/window/backend/SFML/ccursormanagersfml.hpp index 386b43c6c..62d077506 100644 --- a/src/eepp/window/backend/SFML/ccursormanagersfml.hpp +++ b/src/eepp/window/backend/SFML/ccursormanagersfml.hpp @@ -9,17 +9,17 @@ using namespace EE::Window; namespace EE { namespace Window { namespace Backend { namespace SFML { -class cCursorManagerSFML : public cCursorManager { +class CursorManagerSFML : public CursorManager { public: - cCursorManagerSFML( Window::cWindow * window ); + CursorManagerSFML( Window::cWindow * window ); - cCursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ); + Cursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( cImage * img, const Vector2i& hotspot, const std::string& name ); + Cursor * Create( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( const std::string& path, const Vector2i& hotspot, const std::string& name ); + Cursor * Create( const std::string& path, const Vector2i& hotspot, const std::string& name ); - void Set( cCursor * cursor ); + void Set( Cursor * cursor ); void Set( EE_SYSTEM_CURSOR syscurid ); @@ -29,7 +29,7 @@ class cCursorManagerSFML : public cCursorManager { void Visible( bool visible ); - void Remove( cCursor * cursor, bool Delete = false ); + void Remove( Cursor * cursor, bool Delete = false ); void Reload(); }; diff --git a/src/eepp/window/backend/SFML/ccursorsfml.cpp b/src/eepp/window/backend/SFML/ccursorsfml.cpp index 5772de3d0..d308758b6 100644 --- a/src/eepp/window/backend/SFML/ccursorsfml.cpp +++ b/src/eepp/window/backend/SFML/ccursorsfml.cpp @@ -4,22 +4,22 @@ namespace EE { namespace Window { namespace Backend { namespace SFML { -cCursorSFML::cCursorSFML( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( tex, hotspot, name, window ) +CursorSFML::CursorSFML( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( tex, hotspot, name, window ) { } -cCursorSFML::cCursorSFML( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( img, hotspot, name, window ) +CursorSFML::CursorSFML( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( img, hotspot, name, window ) { } -cCursorSFML::cCursorSFML( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( path, hotspot, name, window ) +CursorSFML::CursorSFML( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( path, hotspot, name, window ) { } -void cCursorSFML::Create() { +void CursorSFML::Create() { } }}}} diff --git a/src/eepp/window/backend/SFML/ccursorsfml.hpp b/src/eepp/window/backend/SFML/ccursorsfml.hpp index 57e73d680..e9e13f3ac 100644 --- a/src/eepp/window/backend/SFML/ccursorsfml.hpp +++ b/src/eepp/window/backend/SFML/ccursorsfml.hpp @@ -9,15 +9,15 @@ using namespace EE::Window; namespace EE { namespace Window { namespace Backend { namespace SFML { -class cCursorSFML : public cCursor { +class CursorSFML : public Cursor { protected: - friend class cCursorManagerSFML; + friend class CursorManagerSFML; - cCursorSFML( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorSFML( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorSFML( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorSFML( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorSFML( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorSFML( 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 0593c62b2..32a2ddaae 100644 --- a/src/eepp/window/backend/SFML/cinputsfml.cpp +++ b/src/eepp/window/backend/SFML/cinputsfml.cpp @@ -11,16 +11,16 @@ namespace EE { namespace Window { namespace Backend { namespace SFML { static Uint32 KeyCodesTable[ sf::Keyboard::KeyCount ]; static bool KeyCodesTableInit = false; -cInputSFML::cInputSFML( cWindow * window ) : - cInput( window, eeNew( cJoystickManagerSFML, () ) ), +InputSFML::InputSFML( cWindow * window ) : + Input( window, eeNew( JoystickManagerSFML, () ) ), mWinActive( true ) { } -cInputSFML::~cInputSFML() { +InputSFML::~InputSFML() { } -void cInputSFML::Update() { +void InputSFML::Update() { sf::Event event; InputEvent EEEvent; @@ -189,26 +189,26 @@ void cInputSFML::Update() { } } -bool cInputSFML::GrabInput() { +bool InputSFML::GrabInput() { return false; } -void cInputSFML::GrabInput( const bool& Grab ) { +void InputSFML::GrabInput( const bool& Grab ) { } -void cInputSFML::InjectMousePos( const Uint16& x, const Uint16& y ) { +void InputSFML::InjectMousePos( const Uint16& x, const Uint16& y ) { cWindowSFML * win = reinterpret_cast( mWindow ); sf::Window * window = win->GetSFMLWindow(); sf::Mouse::setPosition( sf::Vector2i( x, y ), *window ); } -void cInputSFML::Init() { +void InputSFML::Init() { InitializeTables(); mJoystickManager->Open(); } -Uint32 cInputSFML::GetButton( const Uint32& sfmlBut ) { +Uint32 InputSFML::GetButton( const Uint32& sfmlBut ) { switch ( sfmlBut ) { case sf::Mouse::Left: return EE_BUTTON_LEFT; case sf::Mouse::Right: return EE_BUTTON_RIGHT; @@ -220,7 +220,7 @@ Uint32 cInputSFML::GetButton( const Uint32& sfmlBut ) { return EE_BUTTON_LEFT; } -Uint32 cInputSFML::SetMod( sf::Event::KeyEvent& key ) { +Uint32 InputSFML::SetMod( sf::Event::KeyEvent& key ) { Uint32 Ret = 0; if ( key.shift ) Ret |= KEYMOD_SHIFT; @@ -231,7 +231,7 @@ Uint32 cInputSFML::SetMod( sf::Event::KeyEvent& key ) { return Ret; } -void cInputSFML::InitializeTables() { +void InputSFML::InitializeTables() { if ( KeyCodesTableInit ) return; diff --git a/src/eepp/window/backend/SFML/cinputsfml.hpp b/src/eepp/window/backend/SFML/cinputsfml.hpp index 1fd16d6b9..905de964c 100644 --- a/src/eepp/window/backend/SFML/cinputsfml.hpp +++ b/src/eepp/window/backend/SFML/cinputsfml.hpp @@ -11,9 +11,9 @@ namespace EE { namespace Window { namespace Backend { namespace SFML { -class EE_API cInputSFML : public cInput { +class EE_API InputSFML : public Input { public: - virtual ~cInputSFML(); + virtual ~InputSFML(); void Update(); @@ -27,7 +27,7 @@ class EE_API cInputSFML : public cInput { bool mWinActive; - cInputSFML( Window::cWindow * window ); + InputSFML( Window::cWindow * window ); virtual void Init(); diff --git a/src/eepp/window/backend/SFML/cjoystickmanagersfml.cpp b/src/eepp/window/backend/SFML/cjoystickmanagersfml.cpp index edd324d5e..85fc632f4 100644 --- a/src/eepp/window/backend/SFML/cjoystickmanagersfml.cpp +++ b/src/eepp/window/backend/SFML/cjoystickmanagersfml.cpp @@ -10,18 +10,18 @@ namespace EE { namespace Window { namespace Backend { namespace SFML { -cJoystickManagerSFML::cJoystickManagerSFML() : - cJoystickManager() +JoystickManagerSFML::JoystickManagerSFML() : + JoystickManager() { } -cJoystickManagerSFML::~cJoystickManagerSFML() { +JoystickManagerSFML::~JoystickManagerSFML() { } -void cJoystickManagerSFML::Update() { +void JoystickManagerSFML::Update() { } -void cJoystickManagerSFML::Open() { +void JoystickManagerSFML::Open() { mCount = sf::Joystick::Count; for ( unsigned int i = 0; i < mCount; i++ ) @@ -30,15 +30,15 @@ void cJoystickManagerSFML::Open() { mInit = true; } -void cJoystickManagerSFML::Close() { +void JoystickManagerSFML::Close() { mInit = false; } -void cJoystickManagerSFML::Create( const Uint32& index ) { +void JoystickManagerSFML::Create( const Uint32& index ) { if ( NULL != mJoysticks[ index ] ) mJoysticks[ index ]->ReOpen(); else - mJoysticks[ index ] = eeNew( cJoystickSFML, ( index ) ); + mJoysticks[ index ] = eeNew( JoystickSFML, ( index ) ); } }}}} diff --git a/src/eepp/window/backend/SFML/cjoystickmanagersfml.hpp b/src/eepp/window/backend/SFML/cjoystickmanagersfml.hpp index 41712a70e..725d4f8ef 100644 --- a/src/eepp/window/backend/SFML/cjoystickmanagersfml.hpp +++ b/src/eepp/window/backend/SFML/cjoystickmanagersfml.hpp @@ -7,11 +7,11 @@ namespace EE { namespace Window { namespace Backend { namespace SFML { -class EE_API cJoystickManagerSFML : public cJoystickManager { +class EE_API JoystickManagerSFML : public JoystickManager { public: - cJoystickManagerSFML(); + JoystickManagerSFML(); - virtual ~cJoystickManagerSFML(); + virtual ~JoystickManagerSFML(); void Update(); diff --git a/src/eepp/window/backend/SFML/cjoysticksfml.cpp b/src/eepp/window/backend/SFML/cjoysticksfml.cpp index 771bfb1bc..05188d69a 100644 --- a/src/eepp/window/backend/SFML/cjoysticksfml.cpp +++ b/src/eepp/window/backend/SFML/cjoysticksfml.cpp @@ -9,17 +9,17 @@ namespace EE { namespace Window { namespace Backend { namespace SFML { -cJoystickSFML::cJoystickSFML( const Uint32& index ) : - cJoystick( index ), +JoystickSFML::JoystickSFML( const Uint32& index ) : + Joystick( index ), mHat( HAT_CENTERED ) { Open(); } -cJoystickSFML::~cJoystickSFML() { +JoystickSFML::~JoystickSFML() { } -void cJoystickSFML::Open() { +void JoystickSFML::Open() { mName = "Joystick " + String::ToStr( mIndex ); mHats = 0; mButtons = eemin( sf::Joystick::getButtonCount( mIndex ), (unsigned int)32 ); @@ -29,10 +29,10 @@ void cJoystickSFML::Open() { mButtonDown = mButtonDownLast = mButtonUp = 0; } -void cJoystickSFML::Close() { +void JoystickSFML::Close() { } -void cJoystickSFML::Update() { +void JoystickSFML::Update() { ClearStates(); for ( Int32 i = 0; i < mButtons; i++ ) { @@ -42,7 +42,7 @@ void cJoystickSFML::Update() { CalcHat(); } -void cJoystickSFML::CalcHat() { +void JoystickSFML::CalcHat() { Float hatX = sf::Joystick::getAxisPosition( mIndex, sf::Joystick::PovX ); Float hatY = sf::Joystick::getAxisPosition( mIndex, sf::Joystick::PovY ); @@ -55,11 +55,11 @@ void cJoystickSFML::CalcHat() { else if ( hatY > 0 ) mHat |= HAT_DOWN; } -Uint8 cJoystickSFML::GetHat( const Int32& index ) { +Uint8 JoystickSFML::GetHat( const Int32& index ) { return mHat; } -Float cJoystickSFML::GetAxis( const Int32& axis ) { +Float JoystickSFML::GetAxis( const Int32& axis ) { sf::Joystick::Axis raxis = sf::Joystick::X; switch ( axis ) @@ -73,11 +73,11 @@ Float cJoystickSFML::GetAxis( const Int32& axis ) { return sf::Joystick::getAxisPosition( mIndex, raxis ) * 0.01; } -Vector2i cJoystickSFML::GetBallMotion( const Int32& ball ) { +Vector2i JoystickSFML::GetBallMotion( const Int32& ball ) { return Vector2i(); } -bool cJoystickSFML::Plugged() const { +bool JoystickSFML::Plugged() const { return sf::Joystick::isConnected( mIndex ); } diff --git a/src/eepp/window/backend/SFML/cjoysticksfml.hpp b/src/eepp/window/backend/SFML/cjoysticksfml.hpp index b5c10e4d6..a869eee9c 100644 --- a/src/eepp/window/backend/SFML/cjoysticksfml.hpp +++ b/src/eepp/window/backend/SFML/cjoysticksfml.hpp @@ -7,11 +7,11 @@ namespace EE { namespace Window { namespace Backend { namespace SFML { -class EE_API cJoystickSFML : public cJoystick { +class EE_API JoystickSFML : public Joystick { public: - cJoystickSFML( const Uint32& index ); + JoystickSFML( const Uint32& index ); - virtual ~cJoystickSFML(); + virtual ~JoystickSFML(); void Close(); diff --git a/src/eepp/window/backend/SFML/cwindowsfml.cpp b/src/eepp/window/backend/SFML/cwindowsfml.cpp index 0baaeb66d..44298711e 100644 --- a/src/eepp/window/backend/SFML/cwindowsfml.cpp +++ b/src/eepp/window/backend/SFML/cwindowsfml.cpp @@ -19,7 +19,7 @@ namespace EE { namespace Window { namespace Backend { namespace SFML { cWindowSFML::cWindowSFML( WindowSettings Settings, ContextSettings Context ) : - cWindow( Settings, Context, eeNew( cClipboardSFML, ( this ) ), eeNew( cInputSFML, ( this ) ), eeNew( cCursorManagerSFML, ( this ) ) ), + cWindow( Settings, Context, eeNew( ClipboardSFML, ( this ) ), eeNew( InputSFML, ( this ) ), eeNew( CursorManagerSFML, ( this ) ) ), mWinHandler( 0 ), mVisible( false ) { @@ -82,10 +82,10 @@ bool cWindowSFML::Create( WindowSettings Settings, ContextSettings Context ) { } /// Init the clipboard after the window creation - reinterpret_cast ( mClipboard )->Init(); + reinterpret_cast ( mClipboard )->Init(); /// Init the input after the window creation - reinterpret_cast ( mInput )->Init(); + reinterpret_cast ( mInput )->Init(); LogSuccessfulInit( GetVersion() ); @@ -146,7 +146,7 @@ void cWindowSFML::Position( Int16 Left, Int16 Top ) { } bool cWindowSFML::Active() { - return reinterpret_cast ( mInput )->mWinActive; + return reinterpret_cast ( mInput )->mWinActive; } bool cWindowSFML::Visible() { diff --git a/src/eepp/window/backend/SFML/cwindowsfml.hpp b/src/eepp/window/backend/SFML/cwindowsfml.hpp index 1ad3480e0..cc0c3a19c 100644 --- a/src/eepp/window/backend/SFML/cwindowsfml.hpp +++ b/src/eepp/window/backend/SFML/cwindowsfml.hpp @@ -52,8 +52,8 @@ class EE_API cWindowSFML : public cWindow { sf::Window * GetSFMLWindow(); protected: - friend class cClipboardSFML; - friend class cInputSFML; + friend class ClipboardSFML; + friend class InputSFML; sf::Window mSFMLWindow; diff --git a/src/eepp/window/backend/null/cbackendnull.hpp b/src/eepp/window/backend/null/cbackendnull.hpp index 5293b8c42..ab4c6f747 100644 --- a/src/eepp/window/backend/null/cbackendnull.hpp +++ b/src/eepp/window/backend/null/cbackendnull.hpp @@ -5,13 +5,13 @@ namespace EE { namespace Window { namespace Backend { namespace Null { -class EE_API cBackendNull : public cBackend { +class EE_API WindowBackendNull : public WindowBackend { public: - inline cBackendNull() : cBackend() + inline WindowBackendNull() : WindowBackend() { } - inline ~cBackendNull() + inline ~WindowBackendNull() { } }; diff --git a/src/eepp/window/backend/null/cclipboardnull.cpp b/src/eepp/window/backend/null/cclipboardnull.cpp index edc8c1fd3..565ac2668 100644 --- a/src/eepp/window/backend/null/cclipboardnull.cpp +++ b/src/eepp/window/backend/null/cclipboardnull.cpp @@ -3,25 +3,25 @@ namespace EE { namespace Window { namespace Backend { namespace Null { -cClipboardNull::cClipboardNull( cWindow * window ) : - cClipboard( window ) +ClipboardNull::ClipboardNull( cWindow * window ) : + Clipboard( window ) { } -cClipboardNull::~cClipboardNull() { +ClipboardNull::~ClipboardNull() { } -void cClipboardNull::Init() { +void ClipboardNull::Init() { } -void cClipboardNull::SetText( const std::string& Text ) { +void ClipboardNull::SetText( const std::string& Text ) { } -std::string cClipboardNull::GetText() { +std::string ClipboardNull::GetText() { return std::string(); } -String cClipboardNull::GetWideText() { +String ClipboardNull::GetWideText() { return String(); } diff --git a/src/eepp/window/backend/null/cclipboardnull.hpp b/src/eepp/window/backend/null/cclipboardnull.hpp index 8683a13ea..306151ba2 100644 --- a/src/eepp/window/backend/null/cclipboardnull.hpp +++ b/src/eepp/window/backend/null/cclipboardnull.hpp @@ -6,9 +6,9 @@ namespace EE { namespace Window { namespace Backend { namespace Null { -class EE_API cClipboardNull : public cClipboard { +class EE_API ClipboardNull : public Clipboard { public: - virtual ~cClipboardNull(); + virtual ~ClipboardNull(); std::string GetText(); @@ -18,7 +18,7 @@ class EE_API cClipboardNull : public cClipboard { protected: friend class cWindowNull; - cClipboardNull( Window::cWindow * window ); + ClipboardNull( Window::cWindow * window ); void Init(); }; diff --git a/src/eepp/window/backend/null/ccursormanagernull.cpp b/src/eepp/window/backend/null/ccursormanagernull.cpp index 16fba4917..9fac403cf 100644 --- a/src/eepp/window/backend/null/ccursormanagernull.cpp +++ b/src/eepp/window/backend/null/ccursormanagernull.cpp @@ -3,43 +3,43 @@ namespace EE { namespace Window { namespace Backend { namespace Null { -cCursorManagerNull::cCursorManagerNull( cWindow * window ) : - cCursorManager( window ) +CursorManagerNull::CursorManagerNull( cWindow * window ) : + CursorManager( window ) { } -cCursor * cCursorManagerNull::Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { - return eeNew( cCursorNull, ( tex, hotspot, name, mWindow ) ); +Cursor * CursorManagerNull::Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { + return eeNew( CursorNull, ( tex, hotspot, name, mWindow ) ); } -cCursor * cCursorManagerNull::Create( cImage * img, const Vector2i& hotspot, const std::string& name ) { - return eeNew( cCursorNull, ( img, hotspot, name, mWindow ) ); +Cursor * CursorManagerNull::Create( cImage * img, const Vector2i& hotspot, const std::string& name ) { + return eeNew( CursorNull, ( img, hotspot, name, mWindow ) ); } -cCursor * cCursorManagerNull::Create( const std::string& path, const Vector2i& hotspot, const std::string& name ) { - return eeNew( cCursorNull, ( path, hotspot, name, mWindow ) ); +Cursor * CursorManagerNull::Create( const std::string& path, const Vector2i& hotspot, const std::string& name ) { + return eeNew( CursorNull, ( path, hotspot, name, mWindow ) ); } -void cCursorManagerNull::Set( cCursor * cursor ) { +void CursorManagerNull::Set( Cursor * cursor ) { } -void cCursorManagerNull::Set( EE_SYSTEM_CURSOR syscurid ) { +void CursorManagerNull::Set( EE_SYSTEM_CURSOR syscurid ) { } -void cCursorManagerNull::Show() { +void CursorManagerNull::Show() { } -void cCursorManagerNull::Hide() { +void CursorManagerNull::Hide() { } -void cCursorManagerNull::Visible( bool visible ) { +void CursorManagerNull::Visible( bool visible ) { } -void cCursorManagerNull::Remove( cCursor * cursor, bool Delete ) { - cCursorManager::Remove( cursor, Delete ); +void CursorManagerNull::Remove( Cursor * cursor, bool Delete ) { + CursorManager::Remove( cursor, Delete ); } -void cCursorManagerNull::Reload() { +void CursorManagerNull::Reload() { } }}}} diff --git a/src/eepp/window/backend/null/ccursormanagernull.hpp b/src/eepp/window/backend/null/ccursormanagernull.hpp index 38567e48a..63e533fd7 100644 --- a/src/eepp/window/backend/null/ccursormanagernull.hpp +++ b/src/eepp/window/backend/null/ccursormanagernull.hpp @@ -7,17 +7,17 @@ using namespace EE::Window; namespace EE { namespace Window { namespace Backend { namespace Null { -class cCursorManagerNull : public cCursorManager { +class CursorManagerNull : public CursorManager { public: - cCursorManagerNull( Window::cWindow * window ); + CursorManagerNull( Window::cWindow * window ); - cCursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ); + Cursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( cImage * img, const Vector2i& hotspot, const std::string& name ); + Cursor * Create( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * Create( const std::string& path, const Vector2i& hotspot, const std::string& name ); + Cursor * Create( const std::string& path, const Vector2i& hotspot, const std::string& name ); - void Set( cCursor * cursor ); + void Set( Cursor * cursor ); void Set( EE_SYSTEM_CURSOR syscurid ); @@ -27,7 +27,7 @@ class cCursorManagerNull : public cCursorManager { void Visible( bool visible ); - void Remove( cCursor * cursor, bool Delete = false ); + void Remove( Cursor * cursor, bool Delete = false ); void Reload(); }; diff --git a/src/eepp/window/backend/null/ccursornull.cpp b/src/eepp/window/backend/null/ccursornull.cpp index c34639445..dcdf4290a 100644 --- a/src/eepp/window/backend/null/ccursornull.cpp +++ b/src/eepp/window/backend/null/ccursornull.cpp @@ -2,22 +2,22 @@ namespace EE { namespace Window { namespace Backend { namespace Null { -cCursorNull::cCursorNull( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( tex, hotspot, name, window ) +CursorNull::CursorNull( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( tex, hotspot, name, window ) { } -cCursorNull::cCursorNull( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( img, hotspot, name, window ) +CursorNull::CursorNull( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( img, hotspot, name, window ) { } -cCursorNull::cCursorNull( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( path, hotspot, name, window ) +CursorNull::CursorNull( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( path, hotspot, name, window ) { } -void cCursorNull::Create() { +void CursorNull::Create() { } }}}} diff --git a/src/eepp/window/backend/null/ccursornull.hpp b/src/eepp/window/backend/null/ccursornull.hpp index 4e0249c72..d9d4efb3c 100644 --- a/src/eepp/window/backend/null/ccursornull.hpp +++ b/src/eepp/window/backend/null/ccursornull.hpp @@ -7,15 +7,15 @@ using namespace EE::Window; namespace EE { namespace Window { namespace Backend { namespace Null { -class cCursorNull : public cCursor { +class CursorNull : public Cursor { protected: - friend class cCursorManagerNull; + friend class CursorManagerNull; - cCursorNull( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorNull( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorNull( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorNull( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorNull( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorNull( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); void Create(); }; diff --git a/src/eepp/window/backend/null/cinputnull.cpp b/src/eepp/window/backend/null/cinputnull.cpp index a3014e073..108df8ccf 100644 --- a/src/eepp/window/backend/null/cinputnull.cpp +++ b/src/eepp/window/backend/null/cinputnull.cpp @@ -3,28 +3,28 @@ namespace EE { namespace Window { namespace Backend { namespace Null { -cInputNull::cInputNull( cWindow * window ) : - cInput( window, eeNew( cJoystickManagerNull, () ) ) +InputNull::InputNull( cWindow * window ) : + Input( window, eeNew( JoystickManagerNull, () ) ) { } -cInputNull::~cInputNull() { +InputNull::~InputNull() { } -void cInputNull::Update() { +void InputNull::Update() { } -bool cInputNull::GrabInput() { +bool InputNull::GrabInput() { return false; } -void cInputNull::GrabInput( const bool& Grab ) { +void InputNull::GrabInput( const bool& Grab ) { } -void cInputNull::InjectMousePos( const Uint16& x, const Uint16& y ) { +void InputNull::InjectMousePos( const Uint16& x, const Uint16& y ) { } -void cInputNull::Init() { +void InputNull::Init() { } }}}} diff --git a/src/eepp/window/backend/null/cinputnull.hpp b/src/eepp/window/backend/null/cinputnull.hpp index a1fb2c8e9..eb5cabeef 100644 --- a/src/eepp/window/backend/null/cinputnull.hpp +++ b/src/eepp/window/backend/null/cinputnull.hpp @@ -5,9 +5,9 @@ namespace EE { namespace Window { namespace Backend { namespace Null { -class EE_API cInputNull : public cInput { +class EE_API InputNull : public Input { public: - virtual ~cInputNull(); + virtual ~InputNull(); void Update(); @@ -19,7 +19,7 @@ class EE_API cInputNull : public cInput { protected: friend class cWindowNull; - cInputNull( Window::cWindow * window ); + InputNull( Window::cWindow * window ); virtual void Init(); }; diff --git a/src/eepp/window/backend/null/cjoystickmanagernull.cpp b/src/eepp/window/backend/null/cjoystickmanagernull.cpp index be234ea96..959e4dc06 100644 --- a/src/eepp/window/backend/null/cjoystickmanagernull.cpp +++ b/src/eepp/window/backend/null/cjoystickmanagernull.cpp @@ -3,24 +3,24 @@ namespace EE { namespace Window { namespace Backend { namespace Null { -cJoystickManagerNull::cJoystickManagerNull() : - cJoystickManager() +JoystickManagerNull::JoystickManagerNull() : + JoystickManager() { } -cJoystickManagerNull::~cJoystickManagerNull() { +JoystickManagerNull::~JoystickManagerNull() { } -void cJoystickManagerNull::Update() { +void JoystickManagerNull::Update() { } -void cJoystickManagerNull::Open() { +void JoystickManagerNull::Open() { } -void cJoystickManagerNull::Close() { +void JoystickManagerNull::Close() { } -void cJoystickManagerNull::Create( const Uint32& index ) { +void JoystickManagerNull::Create( const Uint32& index ) { } }}}} diff --git a/src/eepp/window/backend/null/cjoystickmanagernull.hpp b/src/eepp/window/backend/null/cjoystickmanagernull.hpp index 395fcec01..8922143ac 100644 --- a/src/eepp/window/backend/null/cjoystickmanagernull.hpp +++ b/src/eepp/window/backend/null/cjoystickmanagernull.hpp @@ -5,11 +5,11 @@ namespace EE { namespace Window { namespace Backend { namespace Null { -class EE_API cJoystickManagerNull : public cJoystickManager { +class EE_API JoystickManagerNull : public JoystickManager { public: - cJoystickManagerNull(); + JoystickManagerNull(); - virtual ~cJoystickManagerNull(); + virtual ~JoystickManagerNull(); void Update(); diff --git a/src/eepp/window/backend/null/cjoysticknull.cpp b/src/eepp/window/backend/null/cjoysticknull.cpp index ee12d25f8..bb8aeb4ea 100644 --- a/src/eepp/window/backend/null/cjoysticknull.cpp +++ b/src/eepp/window/backend/null/cjoysticknull.cpp @@ -2,36 +2,36 @@ namespace EE { namespace Window { namespace Backend { namespace Null { -cJoystickNull::cJoystickNull( const Uint32& index ) : - cJoystick( index ) +JoystickNull::JoystickNull( const Uint32& index ) : + Joystick( index ) { } -cJoystickNull::~cJoystickNull() { +JoystickNull::~JoystickNull() { } -void cJoystickNull::Open() { +void JoystickNull::Open() { } -void cJoystickNull::Close() { +void JoystickNull::Close() { } -void cJoystickNull::Update() { +void JoystickNull::Update() { } -Uint8 cJoystickNull::GetHat( const Int32& index ) { +Uint8 JoystickNull::GetHat( const Int32& index ) { return 0; } -Float cJoystickNull::GetAxis( const Int32& axis ) { +Float JoystickNull::GetAxis( const Int32& axis ) { return 0; } -Vector2i cJoystickNull::GetBallMotion( const Int32& ball ) { +Vector2i JoystickNull::GetBallMotion( const Int32& ball ) { return Vector2i(); } -bool cJoystickNull::Plugged() const { +bool JoystickNull::Plugged() const { return false; } diff --git a/src/eepp/window/backend/null/cjoysticknull.hpp b/src/eepp/window/backend/null/cjoysticknull.hpp index 3a9146a60..a727f8b76 100644 --- a/src/eepp/window/backend/null/cjoysticknull.hpp +++ b/src/eepp/window/backend/null/cjoysticknull.hpp @@ -5,11 +5,11 @@ namespace EE { namespace Window { namespace Backend { namespace Null { -class EE_API cJoystickNull : public cJoystick { +class EE_API JoystickNull : public Joystick { public: - cJoystickNull( const Uint32& index ); + JoystickNull( const Uint32& index ); - virtual ~cJoystickNull(); + virtual ~JoystickNull(); void Close(); diff --git a/src/eepp/window/backend/null/cwindownull.cpp b/src/eepp/window/backend/null/cwindownull.cpp index f437d8005..1b5dd95b5 100644 --- a/src/eepp/window/backend/null/cwindownull.cpp +++ b/src/eepp/window/backend/null/cwindownull.cpp @@ -6,7 +6,7 @@ namespace EE { namespace Window { namespace Backend { namespace Null { cWindowNull::cWindowNull( WindowSettings Settings, ContextSettings Context ) : - cWindow( Settings, Context, eeNew( cClipboardNull, ( this ) ), eeNew( cInputNull, ( this ) ), eeNew( cCursorManagerNull, ( this ) ) ) + cWindow( Settings, Context, eeNew( ClipboardNull, ( this ) ), eeNew( InputNull, ( this ) ), eeNew( CursorManagerNull, ( this ) ) ) { Create( Settings, Context ); } diff --git a/src/eepp/window/backend/null/cwindownull.hpp b/src/eepp/window/backend/null/cwindownull.hpp index 45ccc1872..5fcc4aac9 100644 --- a/src/eepp/window/backend/null/cwindownull.hpp +++ b/src/eepp/window/backend/null/cwindownull.hpp @@ -51,7 +51,7 @@ class EE_API cWindowNull : public cWindow { void SetDefaultContext(); protected: - friend class cClipboardNull; + friend class ClipboardNull; void SwapBuffers(); diff --git a/src/eepp/window/cbackend.hpp b/src/eepp/window/cbackend.hpp index 7ef0fb637..a2c3f1b0e 100644 --- a/src/eepp/window/cbackend.hpp +++ b/src/eepp/window/cbackend.hpp @@ -5,11 +5,11 @@ namespace EE { namespace Window { namespace Backend { -class EE_API cBackend { +class EE_API WindowBackend { public: - inline cBackend() {} + inline WindowBackend() {} - inline virtual ~cBackend() {} + inline virtual ~WindowBackend() {} }; }}} diff --git a/src/eepp/window/cclipboard.cpp b/src/eepp/window/cclipboard.cpp index 58482df3c..94b700d80 100644 --- a/src/eepp/window/cclipboard.cpp +++ b/src/eepp/window/cclipboard.cpp @@ -2,13 +2,13 @@ namespace EE { namespace Window { -cClipboard::cClipboard( cWindow * window ) : +Clipboard::Clipboard( cWindow * window ) : mWindow( window ) {} -cClipboard::~cClipboard() {} +Clipboard::~Clipboard() {} -cWindow * cClipboard::GetWindow() const { +cWindow * Clipboard::GetWindow() const { return mWindow; } diff --git a/src/eepp/window/ccursor.cpp b/src/eepp/window/ccursor.cpp index 000fd5d82..36d3d26ae 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 Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : +Cursor::Cursor( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : mId( String::Hash( name ) ), mName( name ), mImage( NULL ), @@ -14,11 +14,11 @@ cCursor::cCursor( cTexture * tex, const Vector2i& hotspot, const std::string& na tex->Unlock(); } else { - eePRINTL( "cCursor::cCursor: Error creating cursor from cTexture." ); + eePRINTL( "Cursor::Cursor: Error creating cursor from cTexture." ); } } -cCursor::cCursor( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : +Cursor::Cursor( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : mId( String::Hash( name ) ), mName( name ), mImage( NULL ), @@ -28,11 +28,11 @@ cCursor::cCursor( cImage * img, const Vector2i& hotspot, const std::string& name if ( img->MemSize() ) { mImage = eeNew( cImage, ( img->GetPixelsPtr(), img->Width(), img->Height(), img->Channels() ) ); } else { - eePRINTL( "cCursor::cCursor: Error creating cursor from cImage." ); + eePRINTL( "Cursor::Cursor: Error creating cursor from cImage." ); } } -cCursor::cCursor( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : +Cursor::Cursor( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : mId( String::Hash( name ) ), mName( name ), mImage( NULL ), @@ -42,27 +42,27 @@ cCursor::cCursor( const std::string& path, const Vector2i& hotspot, const std::s mImage = eeNew( cImage, ( path ) ); if ( NULL == mImage->GetPixels() ) { - eePRINTL( "cCursor::cCursor: Error creating cursor from path." ); + eePRINTL( "Cursor::Cursor: Error creating cursor from path." ); } } -cCursor::~cCursor() { +Cursor::~Cursor() { eeSAFE_DELETE( mImage ); } -const Vector2i& cCursor::HotSpot() const { +const Vector2i& Cursor::HotSpot() const { return mHotSpot; } -const Uint32& cCursor::Id() const { +const Uint32& Cursor::Id() const { return mId; } -const std::string& cCursor::Name() const { +const std::string& Cursor::Name() const { return mName; } -cImage * cCursor::Image() const { +cImage * Cursor::Image() const { return mImage; } diff --git a/src/eepp/window/ccursormanager.cpp b/src/eepp/window/ccursormanager.cpp index 6ffca0816..c9cef5c64 100644 --- a/src/eepp/window/ccursormanager.cpp +++ b/src/eepp/window/ccursormanager.cpp @@ -2,7 +2,7 @@ namespace EE { namespace Window { -cCursorManager::cCursorManager( cWindow * window ) : +CursorManager::CursorManager( cWindow * window ) : mWindow( window ), mCurrent( NULL ), mSysCursor( SYS_CURSOR_NONE ), @@ -13,30 +13,30 @@ cCursorManager::cCursorManager( cWindow * window ) : InitGlobalCursors(); } -cCursorManager::~cCursorManager() { +CursorManager::~CursorManager() { for ( CursorsList::iterator it = mCursors.begin(); it != mCursors.end(); ++it ) { - cCursor * tCursor = *it; + Cursor * tCursor = *it; eeSAFE_DELETE( tCursor ); } } -cCursor * cCursorManager::Add( cCursor * cursor ) { +Cursor * CursorManager::Add( Cursor * cursor ) { mCursors.insert( cursor ); return cursor; } -void cCursorManager::Remove( cCursor * cursor, bool Delete ) { +void CursorManager::Remove( Cursor * cursor, bool Delete ) { mCursors.erase( cursor ); if ( Delete ) eeSAFE_DELETE( cursor ); } -void cCursorManager::Remove( const std::string& name, bool Delete ) { +void CursorManager::Remove( const std::string& name, bool Delete ) { Remove( String::Hash( name ), Delete ); } -void cCursorManager::Remove( const Uint32& id, bool Delete ) { +void CursorManager::Remove( const Uint32& id, bool Delete ) { for ( CursorsList::iterator it = mCursors.begin(); it != mCursors.end(); ++it ) { if ( (*it)->Id() == id ) { Remove( (*it), Delete ); @@ -45,11 +45,11 @@ void cCursorManager::Remove( const Uint32& id, bool Delete ) { } } -cCursor * cCursorManager::Get( const std::string& name ) { +Cursor * CursorManager::Get( const std::string& name ) { return GetById( String::Hash( name ) ); } -cCursor * cCursorManager::GetById( const Uint32& id ) { +Cursor * CursorManager::GetById( const Uint32& id ) { for ( CursorsList::iterator it = mCursors.begin(); it != mCursors.end(); ++it ) { if ( (*it)->Id() == id ) { return (*it); @@ -59,11 +59,11 @@ cCursor * cCursorManager::GetById( const Uint32& id ) { return NULL; } -void cCursorManager::Set( const std::string& name ) { +void CursorManager::Set( const std::string& name ) { SetById( String::Hash( name ) ); } -void cCursorManager::SetById( const Uint32& id ) { +void CursorManager::SetById( const Uint32& id ) { for ( CursorsList::iterator it = mCursors.begin(); it != mCursors.end(); ++it ) { if ( (*it)->Id() == id ) { Set( *it ); @@ -72,21 +72,21 @@ void cCursorManager::SetById( const Uint32& id ) { } } -void cCursorManager::SetGlobalCursor( EE_CURSOR_TYPE cursor, cCursor * fromCursor ) { +void CursorManager::SetGlobalCursor( EE_CURSOR_TYPE cursor, Cursor * fromCursor ) { if ( cursor < EE_CURSOR_COUNT ) { mGlobalCursors[ cursor ].SysCur = SYS_CURSOR_NONE; mGlobalCursors[ cursor ].Cur = fromCursor; } } -void cCursorManager::SetGlobalCursor( EE_CURSOR_TYPE cursor, EE_SYSTEM_CURSOR fromCursor ) { +void CursorManager::SetGlobalCursor( EE_CURSOR_TYPE cursor, EE_SYSTEM_CURSOR fromCursor ) { if ( cursor < EE_CURSOR_COUNT ) { mGlobalCursors[ cursor ].SysCur = fromCursor; mGlobalCursors[ cursor ].Cur = NULL; } } -void cCursorManager::Set( EE_CURSOR_TYPE cursor ) { +void CursorManager::Set( EE_CURSOR_TYPE cursor ) { if ( cursor < EE_CURSOR_COUNT ) { GlobalCursor& Cursor = mGlobalCursors[ cursor ]; @@ -98,23 +98,23 @@ void cCursorManager::Set( EE_CURSOR_TYPE cursor ) { } } -bool cCursorManager::Visible() { +bool CursorManager::Visible() { return mVisible; } -cCursor * cCursorManager::Current() const { +Cursor * CursorManager::Current() const { return mCurrent; } -EE_SYSTEM_CURSOR cCursorManager::CurrentSysCursor() const { +EE_SYSTEM_CURSOR CursorManager::CurrentSysCursor() const { return mSysCursor; } -bool cCursorManager::CurrentIsSysCursor() const { +bool CursorManager::CurrentIsSysCursor() const { return mCurSysCursor; } -void cCursorManager::InitGlobalCursors() { +void CursorManager::InitGlobalCursors() { for ( int i = 0; i < EE_CURSOR_COUNT; i++ ) { mGlobalCursors[ i ].SysCur = static_cast( i ); } diff --git a/src/eepp/window/cengine.cpp b/src/eepp/window/cengine.cpp index 0d82b4f91..49bfbce55 100755 --- a/src/eepp/window/cengine.cpp +++ b/src/eepp/window/cengine.cpp @@ -37,9 +37,9 @@ namespace EE { namespace Window { -SINGLETON_DECLARE_IMPLEMENTATION(cEngine) +SINGLETON_DECLARE_IMPLEMENTATION(Engine) -cEngine::cEngine() : +Engine::Engine() : mBackend( NULL ), mWindow( NULL ), mSharedGLContext( false ), @@ -48,7 +48,7 @@ cEngine::cEngine() : cTextureAtlasManager::CreateSingleton(); } -cEngine::~cEngine() { +Engine::~Engine() { Physics::cPhysicsManager::DestroySingleton(); Graphics::Private::cFrameBufferManager::DestroySingleton(); @@ -84,7 +84,7 @@ cEngine::~cEngine() { eeSAFE_DELETE( mBackend ); } -void cEngine::Destroy() { +void Engine::Destroy() { std::list::iterator it; for ( it = mWindows.begin(); it != mWindows.end(); it++ ) { @@ -94,31 +94,31 @@ void cEngine::Destroy() { mWindow = NULL; } -Backend::cBackend * cEngine::CreateSDLBackend( const WindowSettings &Settings ) { +Backend::WindowBackend * Engine::CreateSDLBackend( const WindowSettings &Settings ) { #if defined( EE_SDL_VERSION_1_2 ) - return eeNew( Backend::SDL::cBackendSDL, () ); + return eeNew( Backend::SDL::WindowBackendSDL, () ); #else return NULL; #endif } -Backend::cBackend * cEngine::CreateSDL2Backend( const WindowSettings &Settings ) { +Backend::WindowBackend * Engine::CreateSDL2Backend( const WindowSettings &Settings ) { #if defined( EE_SDL_VERSION_2 ) - return eeNew( Backend::SDL2::cBackendSDL2, () ); + return eeNew( Backend::SDL2::WindowBackendSDL2, () ); #else return NULL; #endif } -Backend::cBackend * cEngine::CreateSFMLBackend( const WindowSettings &Settings ) { +Backend::WindowBackend * Engine::CreateSFMLBackend( const WindowSettings &Settings ) { #if defined( EE_BACKEND_SFML_ACTIVE ) - return eeNew( Backend::SFML::cBackendSFML, () ); + return eeNew( Backend::SFML::WindowBackendSFML, () ); #else return NULL; #endif } -cWindow * cEngine::CreateSDLWindow( const WindowSettings& Settings, const ContextSettings& Context ) { +cWindow * Engine::CreateSDLWindow( const WindowSettings& Settings, const ContextSettings& Context ) { #if defined( EE_SDL_VERSION_1_2 ) if ( NULL == mBackend ) { mBackend = CreateSDLBackend( Settings ); @@ -130,7 +130,7 @@ cWindow * cEngine::CreateSDLWindow( const WindowSettings& Settings, const Contex #endif } -cWindow * cEngine::CreateSDL2Window( const WindowSettings& Settings, const ContextSettings& Context ) { +cWindow * Engine::CreateSDL2Window( const WindowSettings& Settings, const ContextSettings& Context ) { #if defined( EE_SDL_VERSION_2 ) if ( NULL == mBackend ) { mBackend = CreateSDL2Backend( Settings ); @@ -142,7 +142,7 @@ cWindow * cEngine::CreateSDL2Window( const WindowSettings& Settings, const Conte #endif } -cWindow * cEngine::CreateSFMLWindow( const WindowSettings& Settings, const ContextSettings& Context ) { +cWindow * Engine::CreateSFMLWindow( const WindowSettings& Settings, const ContextSettings& Context ) { #if defined( EE_BACKEND_SFML_ACTIVE ) if ( NULL == mBackend ) { @@ -155,7 +155,7 @@ cWindow * cEngine::CreateSFMLWindow( const WindowSettings& Settings, const Conte #endif } -cWindow * cEngine::CreateDefaultWindow( const WindowSettings& Settings, const ContextSettings& Context ) { +cWindow * Engine::CreateDefaultWindow( const WindowSettings& Settings, const ContextSettings& Context ) { #if DEFAULT_BACKEND == BACKEND_SDL return CreateSDLWindow( Settings, Context ); #elif DEFAULT_BACKEND == BACKEND_SDL2 @@ -165,7 +165,7 @@ cWindow * cEngine::CreateDefaultWindow( const WindowSettings& Settings, const Co #endif } -cWindow * cEngine::CreateWindow( WindowSettings Settings, ContextSettings Context ) { +cWindow * Engine::CreateWindow( WindowSettings Settings, ContextSettings Context ) { cWindow * window = NULL; if ( NULL != mWindow ) { @@ -195,7 +195,7 @@ cWindow * cEngine::CreateWindow( WindowSettings Settings, ContextSettings Contex return window; } -void cEngine::DestroyWindow( cWindow * window ) { +void Engine::DestroyWindow( cWindow * window ) { mWindows.remove( window ); if ( window == mWindow ) { @@ -209,7 +209,7 @@ void cEngine::DestroyWindow( cWindow * window ) { eeSAFE_DELETE( window ); } -bool cEngine::ExistsWindow( cWindow * window ) { +bool Engine::ExistsWindow( cWindow * window ) { std::list::iterator it; for ( it = mWindows.begin(); it != mWindows.end(); it++ ) { @@ -220,11 +220,11 @@ bool cEngine::ExistsWindow( cWindow * window ) { return false; } -cWindow * cEngine::GetCurrentWindow() const { +cWindow * Engine::GetCurrentWindow() const { return mWindow; } -void cEngine::SetCurrentWindow( cWindow * window ) { +void Engine::SetCurrentWindow( cWindow * window ) { if ( NULL != window && window != mWindow ) { mWindow = window; @@ -232,33 +232,33 @@ void cEngine::SetCurrentWindow( cWindow * window ) { } } -Uint32 cEngine::GetWindowCount() const { +Uint32 Engine::GetWindowCount() const { return mWindows.size(); } -bool cEngine::Running() const { +bool Engine::Running() const { return NULL != mWindow; } -Time cEngine::Elapsed() const { +Time Engine::Elapsed() const { eeASSERT( Running() ); return mWindow->Elapsed(); } -const Uint32& cEngine::GetWidth() const { +const Uint32& Engine::GetWidth() const { eeASSERT( Running() ); return mWindow->GetWidth(); } -const Uint32& cEngine::GetHeight() const { +const Uint32& Engine::GetHeight() const { eeASSERT( Running() ); return mWindow->GetHeight(); } -Uint32 cEngine::GetDefaultBackend() const { +Uint32 Engine::GetDefaultBackend() const { #if DEFAULT_BACKEND == BACKEND_SDL return WindowBackend::SDL; #elif DEFAULT_BACKEND == BACKEND_SDL2 @@ -268,7 +268,7 @@ Uint32 cEngine::GetDefaultBackend() const { #endif } -WindowSettings cEngine::CreateWindowSettings( IniFile * ini, std::string iniKeyName ) { +WindowSettings Engine::CreateWindowSettings( IniFile * ini, std::string iniKeyName ) { eeASSERT ( NULL != ini ); ini->ReadFile(); @@ -311,13 +311,13 @@ WindowSettings cEngine::CreateWindowSettings( IniFile * ini, std::string iniKeyN return WinSettings; } -WindowSettings cEngine::CreateWindowSettings( std::string iniPath, std::string iniKeyName ) { +WindowSettings Engine::CreateWindowSettings( std::string iniPath, std::string iniKeyName ) { IniFile Ini( iniPath ); return CreateWindowSettings( &Ini, iniKeyName ); } -ContextSettings cEngine::CreateContextSettings( IniFile * ini, std::string iniKeyName ) { +ContextSettings Engine::CreateContextSettings( IniFile * ini, std::string iniKeyName ) { eeASSERT ( NULL != ini ); ini->ReadFile(); @@ -345,25 +345,25 @@ ContextSettings cEngine::CreateContextSettings( IniFile * ini, std::string iniKe return ContextSettings( VSync, GLVer, doubleBuffering, depthBufferSize, stencilBufferSize ); } -ContextSettings cEngine::CreateContextSettings( std::string iniPath, std::string iniKeyName ) { +ContextSettings Engine::CreateContextSettings( std::string iniPath, std::string iniKeyName ) { IniFile Ini( iniPath ); return CreateContextSettings( &Ini ); } -void cEngine::EnableSharedGLContext() { +void Engine::EnableSharedGLContext() { mSharedGLContext = true; } -void cEngine::DisableSharedGLContext() { +void Engine::DisableSharedGLContext() { mSharedGLContext = false; } -bool cEngine::IsSharedGLContextEnabled() { +bool Engine::IsSharedGLContextEnabled() { return mSharedGLContext; } -Uint32 cEngine::GetMainThreadId() { +Uint32 Engine::GetMainThreadId() { return mMainThreadId; } diff --git a/src/eepp/window/cinput.cpp b/src/eepp/window/cinput.cpp index f6197a8ae..e8c91b598 100644 --- a/src/eepp/window/cinput.cpp +++ b/src/eepp/window/cinput.cpp @@ -3,7 +3,7 @@ namespace EE { namespace Window { -cInput::cInput( cWindow * window, cJoystickManager * joystickmanager ) : +Input::Input( cWindow * window, JoystickManager * joystickmanager ) : mWindow( window ), mJoystickManager( joystickmanager ), mPressTrigger(0), mReleaseTrigger(0), mLastPressTrigger(0), mClickTrigger(0), mDoubleClickTrigger(0), mInputMod(0), @@ -18,11 +18,11 @@ cInput::cInput( cWindow * window, cJoystickManager * joystickmanager ) : memset( mKeysUp , 0, EE_KEYS_SPACE ); } -cInput::~cInput() { +Input::~Input() { eeSAFE_DELETE( mJoystickManager ); } -void cInput::CleanStates() { +void Input::CleanStates() { memset( mKeysUp, 0, EE_KEYS_SPACE ); mReleaseTrigger = 0; @@ -33,13 +33,13 @@ void cInput::CleanStates() { ResetFingerWasDown(); } -void cInput::SendEvent( InputEvent * Event ) { +void Input::SendEvent( InputEvent * Event ) { for ( std::map::iterator i = mCallbacks.begin(); i != mCallbacks.end(); i++ ) { i->second( Event ); } } -void cInput::ProcessEvent( InputEvent * Event ) { +void Input::ProcessEvent( InputEvent * Event ) { switch( Event->Type ) { case InputEvent::KeyDown: { @@ -136,7 +136,7 @@ void cInput::ProcessEvent( InputEvent * Event ) { } case InputEvent::FingerDown: { - cInputFinger * Finger = GetFingerId( Event->finger.fingerId ); + InputFinger * Finger = GetFingerId( Event->finger.fingerId ); Finger->WriteLast(); Finger->x = (Uint16)( Event->finger.x * (Float)mWindow->GetWidth() ); @@ -150,7 +150,7 @@ void cInput::ProcessEvent( InputEvent * Event ) { } case InputEvent::FingerUp: { - cInputFinger * Finger = GetFingerId( Event->finger.fingerId ); + InputFinger * Finger = GetFingerId( Event->finger.fingerId ); Finger->WriteLast(); Finger->x = (Uint16)( Event->finger.x * (Float)mWindow->GetWidth() ); @@ -165,7 +165,7 @@ void cInput::ProcessEvent( InputEvent * Event ) { } case InputEvent::FingerMotion: { - cInputFinger * Finger = GetFingerId( Event->finger.fingerId ); + InputFinger * Finger = GetFingerId( Event->finger.fingerId ); Finger->WriteLast(); Finger->x = (Uint16)( Event->finger.x * (Float)mWindow->GetWidth() ); @@ -192,7 +192,7 @@ void cInput::ProcessEvent( InputEvent * Event ) { SendEvent( Event ); } -cInputFinger * cInput::GetFingerId( const Int64 &fingerId ) { +InputFinger * Input::GetFingerId( const Int64 &fingerId ) { Uint32 i; for ( i = 0; i < EE_MAX_FINGERS; i++ ) { @@ -220,35 +220,35 @@ cInputFinger * cInput::GetFingerId( const Int64 &fingerId ) { return NULL; } -void cInput::ResetFingerWasDown() { +void Input::ResetFingerWasDown() { for ( Uint32 i = 0; i < EE_MAX_FINGERS; i++ ) { mFingers[i].was_down = false; } } -bool cInput::IsKeyDown( const EE_KEY& Key ) { +bool Input::IsKeyDown( const EE_KEY& Key ) { return 0 != BitOp::ReadBitKey( &mKeysDown[ Key / 8 ], Key % 8 ); } -bool cInput::IsKeyUp( const EE_KEY& Key ) { +bool Input::IsKeyUp( const EE_KEY& Key ) { return 0 != BitOp::ReadBitKey( &mKeysUp[ Key / 8 ], Key % 8 ); } -void cInput::InjectKeyDown( const EE_KEY& Key ) { +void Input::InjectKeyDown( const EE_KEY& Key ) { BitOp::WriteBitKey( &mKeysDown [ Key / 8 ], Key % 8, 1 ); } -void cInput::InjectKeyUp( const EE_KEY& Key ) { +void Input::InjectKeyUp( const EE_KEY& Key ) { BitOp::WriteBitKey( &mKeysUp [ Key / 8 ], Key % 8, 1 ); } -void cInput::InjectButtonPress( const Uint32& Button ) { +void Input::InjectButtonPress( const Uint32& Button ) { if ( Button < 8 ) if ( !( mPressTrigger & EE_BUTTON_MASK( Button ) ) ) mPressTrigger |= EE_BUTTON_MASK( Button ); } -void cInput::InjectButtonRelease( const Uint32& Button ) { +void Input::InjectButtonRelease( const Uint32& Button ) { if ( Button < 8 ) { if ( mPressTrigger & EE_BUTTON_MASK( Button ) ) mPressTrigger &= ~EE_BUTTON_MASK( Button ); @@ -261,157 +261,157 @@ void cInput::InjectButtonRelease( const Uint32& Button ) { } } -Vector2i cInput::GetMousePos() const { +Vector2i Input::GetMousePos() const { return mMousePos; } -void cInput::SetMousePos( const Vector2i& Pos ) { +void Input::SetMousePos( const Vector2i& Pos ) { mMousePos = Pos; } -Vector2f cInput::GetMousePosf() { +Vector2f Input::GetMousePosf() { return Vector2f( (Float)mMousePos.x, (Float)mMousePos.y ); } -Vector2i cInput::GetMousePosFromView( const cView& View ) { +Vector2i Input::GetMousePosFromView( const View& View ) { Vector2i RealMousePos = GetMousePos(); Recti RView = View.GetView(); return Vector2i( RealMousePos.x - RView.Left, RealMousePos.y - RView.Top ); } -Uint16 cInput::MouseX() const { +Uint16 Input::MouseX() const { return mMousePos.x; } -Uint16 cInput::MouseY() const { +Uint16 Input::MouseY() const { return mMousePos.y; } -Uint32 cInput::PushCallback( const InputCallback& cb ) { +Uint32 Input::PushCallback( const InputCallback& cb ) { mNumCallBacks++; mCallbacks[ mNumCallBacks ] = cb; return mNumCallBacks; } -void cInput::PopCallback( const Uint32& CallbackId ) { +void Input::PopCallback( const Uint32& CallbackId ) { mCallbacks[ CallbackId ] = 0; mCallbacks.erase( mCallbacks.find(CallbackId) ); } -void cInput::InjectMousePos( const Vector2i& Pos ) { +void Input::InjectMousePos( const Vector2i& Pos ) { InjectMousePos( Pos.x, Pos.y ); } -bool cInput::ControlPressed() const { +bool Input::ControlPressed() const { return ( mInputMod & KEYMOD_CTRL ) != 0; } -bool cInput::ShiftPressed() const { +bool Input::ShiftPressed() const { return ( mInputMod & KEYMOD_SHIFT ) != 0; } -bool cInput::AltPressed() const { +bool Input::AltPressed() const { return ( mInputMod & KEYMOD_ALT ) != 0; } -bool cInput::MetaPressed() const { +bool Input::MetaPressed() const { return ( mInputMod & KEYMOD_META ) != 0; } -bool cInput::MouseLeftPressed() const { +bool Input::MouseLeftPressed() const { return ( mPressTrigger & EE_BUTTON_LMASK ) != 0; } -bool cInput::MouseRightPressed() const { +bool Input::MouseRightPressed() const { return ( mPressTrigger & EE_BUTTON_RMASK ) != 0; } -bool cInput::MouseMiddlePressed() const { +bool Input::MouseMiddlePressed() const { return ( mPressTrigger & EE_BUTTON_MMASK ) != 0; } -bool cInput::MouseLeftClick() const { +bool Input::MouseLeftClick() const { return ( mClickTrigger & EE_BUTTON_LMASK ) != 0; } -bool cInput::MouseRightClick() const { +bool Input::MouseRightClick() const { return ( mClickTrigger & EE_BUTTON_RMASK ) != 0; } -bool cInput::MouseMiddleClick() const { +bool Input::MouseMiddleClick() const { return ( mClickTrigger & EE_BUTTON_MMASK ) != 0; } -bool cInput::MouseLeftDoubleClick() const { +bool Input::MouseLeftDoubleClick() const { return ( mDoubleClickTrigger & EE_BUTTON_LMASK ) != 0; } -bool cInput::MouseRightDoubleClick() const { +bool Input::MouseRightDoubleClick() const { return ( mDoubleClickTrigger & EE_BUTTON_RMASK ) != 0; } -bool cInput::MouseMiddleDoubleClick() const { +bool Input::MouseMiddleDoubleClick() const { return ( mDoubleClickTrigger & EE_BUTTON_MMASK ) != 0; } -bool cInput::MouseWheelUp() const { +bool Input::MouseWheelUp() const { return ( mReleaseTrigger & EE_BUTTON_WUMASK ) != 0; } -bool cInput::MouseWheelDown() const { +bool Input::MouseWheelDown() const { return ( mReleaseTrigger & EE_BUTTON_WDMASK ) != 0; } -void cInput::MouseSpeed( const Float& Speed ) { +void Input::MouseSpeed( const Float& Speed ) { mMouseSpeed = Speed; } -const Float& cInput::MouseSpeed() const { +const Float& Input::MouseSpeed() const { return mMouseSpeed; } -const Uint32& cInput::LastPressTrigger() const { +const Uint32& Input::LastPressTrigger() const { return mLastPressTrigger; } -const Uint32& cInput::PressTrigger() const { +const Uint32& Input::PressTrigger() const { return mPressTrigger; } -const Uint32& cInput::ReleaseTrigger() const { +const Uint32& Input::ReleaseTrigger() const { return mReleaseTrigger; } -const Uint32& cInput::ClickTrigger() const { +const Uint32& Input::ClickTrigger() const { return mClickTrigger; } -const Uint32& cInput::DoubleClickTrigger() const { +const Uint32& Input::DoubleClickTrigger() const { return mDoubleClickTrigger; } -const Uint32& cInput::DoubleClickInterval() const { +const Uint32& Input::DoubleClickInterval() const { return mDoubleClickInterval; } -void cInput::DoubleClickInterval( const Uint32& Interval ) { +void Input::DoubleClickInterval( const Uint32& Interval ) { mDoubleClickInterval = Interval; } -cJoystickManager * cInput::GetJoystickManager() const { +JoystickManager * Input::GetJoystickManager() const { return mJoystickManager; } -Uint32 cInput::GetFingerCount() { +Uint32 Input::GetFingerCount() { return EE_MAX_FINGERS; } -cInputFinger * cInput::GetFingerIndex( const Uint32 &Index ) { +InputFinger * Input::GetFingerIndex( const Uint32 &Index ) { eeASSERT( Index < EE_MAX_FINGERS ); return &mFingers[Index]; } -cInputFinger * cInput::GetFinger( const Int64 &fingerId ) { +InputFinger * Input::GetFinger( const Int64 &fingerId ) { for ( Uint32 i = 0; i < EE_MAX_FINGERS; i++ ) { if ( mFingers[i].id == fingerId ) { return &mFingers[i]; @@ -421,8 +421,8 @@ cInputFinger * cInput::GetFinger( const Int64 &fingerId ) { return NULL; } -std::list cInput::GetFingersDown() { - std::list fDown; +std::list Input::GetFingersDown() { + std::list fDown; for ( Uint32 i = 0; i < EE_MAX_FINGERS; i++ ) { if ( mFingers[i].down ) { @@ -433,8 +433,8 @@ std::list cInput::GetFingersDown() { return fDown; } -std::list cInput::GetFingersWasDown() { - std::list fDown; +std::list Input::GetFingersWasDown() { + std::list fDown; for ( Uint32 i = 0; i < EE_MAX_FINGERS; i++ ) { if ( mFingers[i].was_down ) { diff --git a/src/eepp/window/cinputfinger.cpp b/src/eepp/window/cinputfinger.cpp index f4ae1635b..09588a085 100644 --- a/src/eepp/window/cinputfinger.cpp +++ b/src/eepp/window/cinputfinger.cpp @@ -2,7 +2,7 @@ namespace EE { namespace Window { -cInputFinger::cInputFinger() : +InputFinger::InputFinger() : id(-1), x(0), y(0), @@ -17,19 +17,19 @@ cInputFinger::cInputFinger() : { } -bool cInputFinger::IsDown() { +bool InputFinger::IsDown() { return down; } -bool cInputFinger::WasDown() { +bool InputFinger::WasDown() { return was_down; } -Vector2i cInputFinger::Pos() { +Vector2i InputFinger::Pos() { return Vector2i( x, y ); } -void cInputFinger::WriteLast() { +void InputFinger::WriteLast() { last_x = x; last_y = y; last_pressure = pressure; diff --git a/src/eepp/window/cinputtextbuffer.cpp b/src/eepp/window/cinputtextbuffer.cpp index 85b8fb0f5..503a20894 100755 --- a/src/eepp/window/cinputtextbuffer.cpp +++ b/src/eepp/window/cinputtextbuffer.cpp @@ -4,7 +4,7 @@ namespace EE { namespace Window { -cInputTextBuffer::cInputTextBuffer( const bool& active, const bool& supportNewLine, const bool& supportFreeEditing, Window::cWindow * window, const Uint32& maxLength ) : +InputTextBuffer::InputTextBuffer( const bool& active, const bool& supportNewLine, const bool& supportFreeEditing, Window::cWindow * window, const Uint32& maxLength ) : mWindow( window ), mFlags(0), mCallback(0), @@ -14,7 +14,7 @@ cInputTextBuffer::cInputTextBuffer( const bool& active, const bool& supportNewLi mSelCurEnd(-1) { if ( NULL == mWindow ) { - mWindow = cEngine::instance()->GetCurrentWindow(); + mWindow = Engine::instance()->GetCurrentWindow(); } Active( active ); @@ -30,7 +30,7 @@ cInputTextBuffer::cInputTextBuffer( const bool& active, const bool& supportNewLi mMaxLength = maxLength; } -cInputTextBuffer::cInputTextBuffer( cWindow * window ) : +InputTextBuffer::InputTextBuffer( cWindow * window ) : mWindow( window ), mFlags(0), mCallback(0), @@ -40,7 +40,7 @@ cInputTextBuffer::cInputTextBuffer( cWindow * window ) : mSelCurEnd(-1) { if ( NULL == mWindow ) { - mWindow = cEngine::instance()->GetCurrentWindow(); + mWindow = Engine::instance()->GetCurrentWindow(); } Active( true ); @@ -56,10 +56,10 @@ cInputTextBuffer::cInputTextBuffer( cWindow * window ) : SupportCopyPaste( true ); } -cInputTextBuffer::~cInputTextBuffer() { +InputTextBuffer::~InputTextBuffer() { if ( 0 != mCallback && - cEngine::ExistsSingleton() && - cEngine::instance()->ExistsWindow( mWindow ) ) + Engine::ExistsSingleton() && + Engine::instance()->ExistsWindow( mWindow ) ) { mWindow->GetInput()->PopCallback( mCallback ); } @@ -67,17 +67,17 @@ cInputTextBuffer::~cInputTextBuffer() { mText.clear(); } -void cInputTextBuffer::Start() { +void InputTextBuffer::Start() { if ( NULL == mWindow ) { - mWindow = cEngine::instance()->GetCurrentWindow(); + mWindow = Engine::instance()->GetCurrentWindow(); } - if ( cEngine::instance()->ExistsWindow( mWindow ) ) { - mCallback = mWindow->GetInput()->PushCallback( cb::Make1( this, &cInputTextBuffer::Update ) ); + if ( Engine::instance()->ExistsWindow( mWindow ) ) { + mCallback = mWindow->GetInput()->PushCallback( cb::Make1( this, &InputTextBuffer::Update ) ); } } -void cInputTextBuffer::PromptToLeftFirstNoChar() { +void InputTextBuffer::PromptToLeftFirstNoChar() { if ( !mText.size() ) return; @@ -98,7 +98,7 @@ void cInputTextBuffer::PromptToLeftFirstNoChar() { ResetSelection(); } -void cInputTextBuffer::PromptToRightFirstNoChar() { +void InputTextBuffer::PromptToRightFirstNoChar() { Int32 s = static_cast ( mText.size() ); if ( 0 == s ) @@ -116,14 +116,14 @@ void cInputTextBuffer::PromptToRightFirstNoChar() { ResetSelection(); } -void cInputTextBuffer::ResetSelection() { +void InputTextBuffer::ResetSelection() { if ( TextSelectionEnabled() ) { SelCurInit( -1 ); SelCurEnd( -1 ); } } -void cInputTextBuffer::EraseToPrevNoChar() { +void InputTextBuffer::EraseToPrevNoChar() { if ( !mText.size() || !mPromptPos ) return; @@ -151,7 +151,7 @@ void cInputTextBuffer::EraseToPrevNoChar() { ChangedSinceLastUpdate( true ); } -void cInputTextBuffer::EraseToNextNoChar() { +void InputTextBuffer::EraseToNextNoChar() { if ( !mText.size() ) return; @@ -179,7 +179,7 @@ void cInputTextBuffer::EraseToNextNoChar() { } } -bool cInputTextBuffer::IsIgnoredChar( const Uint32& c ) { +bool InputTextBuffer::IsIgnoredChar( const Uint32& c ) { if ( mIgnoredChars.size() ) { for ( std::size_t i = 0; i < mIgnoredChars.size(); i++ ) { if ( mIgnoredChars[i] == c ) @@ -190,7 +190,7 @@ bool cInputTextBuffer::IsIgnoredChar( const Uint32& c ) { return false; } -bool cInputTextBuffer::ValidChar( const Uint32& c ) { +bool InputTextBuffer::ValidChar( const Uint32& c ) { if ( CanAdd() && String::IsCharacter( c ) ) { bool Ignored = false; @@ -210,7 +210,7 @@ bool cInputTextBuffer::ValidChar( const Uint32& c ) { return false; } -void cInputTextBuffer::TryAddChar( const Uint32& c ) { +void InputTextBuffer::TryAddChar( const Uint32& c ) { if ( SupportFreeEditing() ) { if ( ValidChar( c ) ) { RemoveSelection(); @@ -227,7 +227,7 @@ void cInputTextBuffer::TryAddChar( const Uint32& c ) { } } else { if ( CanAdd() && String::IsCharacter(c) ) { - cInput * Input = mWindow->GetInput(); + Input * Input = mWindow->GetInput(); if ( !Input->MetaPressed() && !Input->AltPressed() && !Input->ControlPressed() ) { if ( !( AllowOnlyNumbers() && !String::IsNumber( c, AllowDotsInNumbers() ) ) ) { @@ -238,7 +238,7 @@ void cInputTextBuffer::TryAddChar( const Uint32& c ) { } } -void cInputTextBuffer::RemoveSelection() { +void InputTextBuffer::RemoveSelection() { if ( TextSelectionEnabled() && -1 != mSelCurInit && -1 != mSelCurEnd ) { Int32 size = (Int32)mText.size(); @@ -259,9 +259,9 @@ void cInputTextBuffer::RemoveSelection() { } } -void cInputTextBuffer::Update( InputEvent* Event ) { +void InputTextBuffer::Update( InputEvent* Event ) { if ( Active() ) { - cInput * Input = mWindow->GetInput(); + Input * Input = mWindow->GetInput(); Uint32 c = eeConvertKeyCharacter( Event->key.keysym.sym, Event->key.keysym.unicode, Event->key.keysym.mod ); @@ -496,11 +496,11 @@ void cInputTextBuffer::Update( InputEvent* Event ) { } } -void cInputTextBuffer::ShiftSelection( const int& lastPromtpPos ) { +void InputTextBuffer::ShiftSelection( const int& lastPromtpPos ) { if ( !TextSelectionEnabled() ) return; - cInput * Input = mWindow->GetInput(); + Input * Input = mWindow->GetInput(); if ( Input->ShiftPressed() && !Input->ControlPressed() ) { if ( SelCurInit() != CurPos() ) { @@ -524,7 +524,7 @@ void cInputTextBuffer::ShiftSelection( const int& lastPromtpPos ) { } } -void cInputTextBuffer::MovePromptRowDown( const bool& breakit ) { +void InputTextBuffer::MovePromptRowDown( const bool& breakit ) { if ( SupportFreeEditing() && SupportNewLine() ) { int lPromtpPos = mPromptPos; @@ -569,7 +569,7 @@ void cInputTextBuffer::MovePromptRowDown( const bool& breakit ) { } } -void cInputTextBuffer::MovePromptRowUp( const bool& breakit ) { +void InputTextBuffer::MovePromptRowUp( const bool& breakit ) { if ( SupportFreeEditing() && SupportNewLine() ) { int lPromtpPos = mPromptPos; @@ -609,27 +609,27 @@ void cInputTextBuffer::MovePromptRowUp( const bool& breakit ) { } } -void cInputTextBuffer::Clear() { +void InputTextBuffer::Clear() { mText.clear(); AutoPrompt( true ); } -void cInputTextBuffer::SetReturnCallback( EnterCallback EC ) { +void InputTextBuffer::SetReturnCallback( EnterCallback EC ) { mEnterCall = EC; } -void cInputTextBuffer::Buffer( const String& str ) { +void InputTextBuffer::Buffer( const String& str ) { if ( mText != str ) { mText = str; ChangedSinceLastUpdate( true ); } } -int cInputTextBuffer::CurPos() const { +int InputTextBuffer::CurPos() const { return mPromptPos; } -void cInputTextBuffer::CurPos( const Uint32& pos ) { +void InputTextBuffer::CurPos( const Uint32& pos ) { if ( SupportFreeEditing() ) { if ( pos < mText.size() ) { mPromptPos = pos; @@ -640,7 +640,7 @@ void cInputTextBuffer::CurPos( const Uint32& pos ) { } } -Uint32 cInputTextBuffer::GetCurPosLinePos( Uint32& LastNewLinePos ) { +Uint32 InputTextBuffer::GetCurPosLinePos( Uint32& LastNewLinePos ) { if ( SupportFreeEditing() ) { Uint32 nl = 0; LastNewLinePos = 0; @@ -655,38 +655,38 @@ Uint32 cInputTextBuffer::GetCurPosLinePos( Uint32& LastNewLinePos ) { return 0; } -void cInputTextBuffer::PushIgnoredChar( const Uint32& ch ) { +void InputTextBuffer::PushIgnoredChar( const Uint32& ch ) { mIgnoredChars.push_back( ch ); } -bool cInputTextBuffer::CanAdd() { +bool InputTextBuffer::CanAdd() { return mText.size() < mMaxLength; } -void cInputTextBuffer::MaxLength( const Uint32& Max ) { +void InputTextBuffer::MaxLength( const Uint32& Max ) { mMaxLength = Max; if ( mText.size() > mMaxLength ) mText.resize( mMaxLength ); } -const Uint32& cInputTextBuffer::MaxLength() const { +const Uint32& InputTextBuffer::MaxLength() const { return mMaxLength; } -String cInputTextBuffer::Buffer() const { +String InputTextBuffer::Buffer() const { return mText; } -bool cInputTextBuffer::ChangedSinceLastUpdate() { +bool InputTextBuffer::ChangedSinceLastUpdate() { return 0 != ( mFlags & ( 1 << INPUT_TB_CHANGE_SINCE_LAST_UPDATE ) ); } -void cInputTextBuffer::ChangedSinceLastUpdate( const bool& Changed ) { +void InputTextBuffer::ChangedSinceLastUpdate( const bool& Changed ) { BitOp::WriteBitKey( &mFlags, INPUT_TB_CHANGE_SINCE_LAST_UPDATE, Changed == true ); } -void cInputTextBuffer::AutoPrompt( const bool& set ) { +void InputTextBuffer::AutoPrompt( const bool& set ) { BitOp::WriteBitKey( &mFlags, INPUT_TB_PROMPT_AUTO_POS, set == true ); if ( set ) { @@ -694,80 +694,80 @@ void cInputTextBuffer::AutoPrompt( const bool& set ) { } } -bool cInputTextBuffer::AutoPrompt() { +bool InputTextBuffer::AutoPrompt() { return 0 != ( mFlags & ( 1 << INPUT_TB_PROMPT_AUTO_POS ) ); } -bool cInputTextBuffer::Active() const { +bool InputTextBuffer::Active() const { return 0 != ( mFlags & ( 1 << INPUT_TB_ACTIVE ) ); } -void cInputTextBuffer::Active( const bool& Active ) { +void InputTextBuffer::Active( const bool& Active ) { BitOp::WriteBitKey( &mFlags, INPUT_TB_ACTIVE, Active == true ); } -bool cInputTextBuffer::SupportNewLine() { +bool InputTextBuffer::SupportNewLine() { return 0 != ( mFlags & ( 1 << INPUT_TB_SUPPORT_NEW_LINE ) ); } -void cInputTextBuffer::SupportNewLine( const bool& SupportNewLine ) { +void InputTextBuffer::SupportNewLine( const bool& SupportNewLine ) { BitOp::WriteBitKey( &mFlags, INPUT_TB_SUPPORT_NEW_LINE, SupportNewLine == true ); } -void cInputTextBuffer::AllowOnlyNumbers( const bool& onlynums, const bool& allowdots ) { +void InputTextBuffer::AllowOnlyNumbers( const bool& onlynums, const bool& allowdots ) { BitOp::WriteBitKey( &mFlags, INPUT_TB_ALLOW_ONLY_NUMBERS, onlynums == true ); BitOp::WriteBitKey( &mFlags, INPUT_TB_ALLOW_DOT_IN_NUMBERS, allowdots == true ); } -bool cInputTextBuffer::AllowOnlyNumbers() { +bool InputTextBuffer::AllowOnlyNumbers() { return 0 != ( mFlags & ( 1 << INPUT_TB_ALLOW_ONLY_NUMBERS ) ); } -bool cInputTextBuffer::AllowDotsInNumbers() { +bool InputTextBuffer::AllowDotsInNumbers() { return 0 != ( mFlags & ( 1 << INPUT_TB_ALLOW_DOT_IN_NUMBERS ) ); } -bool cInputTextBuffer::SupportFreeEditing() const { +bool InputTextBuffer::SupportFreeEditing() const { return 0 != ( mFlags & ( 1 << INPUT_TB_FREE_EDITING ) ); } -void cInputTextBuffer::SupportFreeEditing( const bool& Support ) { +void InputTextBuffer::SupportFreeEditing( const bool& Support ) { BitOp::WriteBitKey( &mFlags, INPUT_TB_FREE_EDITING, Support == true ); } -void cInputTextBuffer::SupportCopyPaste( const bool& support ) { +void InputTextBuffer::SupportCopyPaste( const bool& support ) { BitOp::WriteBitKey( &mFlags, INPUT_TB_SUPPORT_COPY_PASTE, support == true ); } -bool cInputTextBuffer::SupportCopyPaste() { +bool InputTextBuffer::SupportCopyPaste() { return 0 != ( mFlags & ( 1 << INPUT_TB_SUPPORT_COPY_PASTE ) ); } -bool cInputTextBuffer::TextSelectionEnabled() { +bool InputTextBuffer::TextSelectionEnabled() { return 0 != ( mFlags & ( 1 << INPUT_TB_TEXT_SELECTION_ENABLED ) ); } -void cInputTextBuffer::TextSelectionEnabled( const bool& enabled ) { +void InputTextBuffer::TextSelectionEnabled( const bool& enabled ) { BitOp::WriteBitKey( &mFlags, INPUT_TB_TEXT_SELECTION_ENABLED, enabled == true ); } -void cInputTextBuffer::CursorToEnd() { +void InputTextBuffer::CursorToEnd() { mPromptPos = mText.size(); } -void cInputTextBuffer::SelCurInit( const Int32& init ) { +void InputTextBuffer::SelCurInit( const Int32& init ) { mSelCurInit = init; } -void cInputTextBuffer::SelCurEnd( const Int32& end ) { +void InputTextBuffer::SelCurEnd( const Int32& end ) { mSelCurEnd = end; } -const Int32& cInputTextBuffer::SelCurInit() const { +const Int32& InputTextBuffer::SelCurInit() const { return mSelCurInit; } -const Int32& cInputTextBuffer::SelCurEnd() const { +const Int32& InputTextBuffer::SelCurEnd() const { return mSelCurEnd; } diff --git a/src/eepp/window/cjoystick.cpp b/src/eepp/window/cjoystick.cpp index b70eb3a6f..c2170eac0 100644 --- a/src/eepp/window/cjoystick.cpp +++ b/src/eepp/window/cjoystick.cpp @@ -3,7 +3,7 @@ namespace EE { namespace Window { -cJoystick::cJoystick( const Uint32& index ) : +Joystick::Joystick( const Uint32& index ) : mIndex( index ), mHats(0), mButtons(0), @@ -16,22 +16,22 @@ cJoystick::cJoystick( const Uint32& index ) : Open(); } -cJoystick::~cJoystick() { +Joystick::~Joystick() { Close(); } -void cJoystick::ReOpen() { +void Joystick::ReOpen() { Close(); Open(); } -void cJoystick::ClearStates() { +void Joystick::ClearStates() { mButtonUp = 0; mButtonDownLast = mButtonDown; } -void cJoystick::UpdateButton( const Uint32& index, const bool& down ) { +void Joystick::UpdateButton( const Uint32& index, const bool& down ) { if ( down ) { mButtonDown |= ( 1 << index ); } else { @@ -44,48 +44,48 @@ void cJoystick::UpdateButton( const Uint32& index, const bool& down ) { } } -const Int32& cJoystick::GetNumHats() const { +const Int32& Joystick::GetNumHats() const { return mHats; } -const Int32& cJoystick::GetNumButtons() const { +const Int32& Joystick::GetNumButtons() const { return mButtons; } -const Int32& cJoystick::GetNumAxes() const { +const Int32& Joystick::GetNumAxes() const { return mAxes; } -const Int32& cJoystick::GetNumBalls() const { +const Int32& Joystick::GetNumBalls() const { return mBalls; } -const Uint32& cJoystick::GetButtonTrigger() const { +const Uint32& Joystick::GetButtonTrigger() const { return mButtonDown; } -const Uint32& cJoystick::GetButtonUpTrigger() const { +const Uint32& Joystick::GetButtonUpTrigger() const { return mButtonUp; } -bool cJoystick::IsButtonDown( const Int32& index ) { +bool Joystick::IsButtonDown( const Int32& index ) { if ( index >= 0 && index < mButtons ) return 0 != ( mButtonDown & ( 1 << index ) ); return false; } -bool cJoystick::IsButtonUp( const Int32& index ) { +bool Joystick::IsButtonUp( const Int32& index ) { if ( index >= 0 && index < mButtons ) return 0 != ( mButtonUp & ( 1 << index ) ); return false; } -void cJoystick::Close() { +void Joystick::Close() { } -void cJoystick::Open() { +void Joystick::Open() { } }} diff --git a/src/eepp/window/cjoystickmanager.cpp b/src/eepp/window/cjoystickmanager.cpp index 03cb91e51..f8e5ac6cb 100644 --- a/src/eepp/window/cjoystickmanager.cpp +++ b/src/eepp/window/cjoystickmanager.cpp @@ -2,7 +2,7 @@ namespace EE { namespace Window { -cJoystickManager::cJoystickManager() : +JoystickManager::JoystickManager() : mInit(false), mCount(0) { @@ -12,34 +12,34 @@ cJoystickManager::cJoystickManager() : Open(); } -cJoystickManager::~cJoystickManager() { +JoystickManager::~JoystickManager() { for ( Uint32 i = 0; i < Count(); i++ ) eeSAFE_DELETE( mJoysticks[i] ); Close(); } -Uint32 cJoystickManager::Count() { +Uint32 JoystickManager::Count() { return mCount; } -cJoystick * cJoystickManager::GetJoystick( const Uint32& index ) { +Joystick * JoystickManager::GetJoystick( const Uint32& index ) { if ( index < MAX_JOYSTICKS ) return mJoysticks[ index ]; return NULL; } -void cJoystickManager::Rescan() { +void JoystickManager::Rescan() { Close(); Open(); } -void cJoystickManager::Close() { +void JoystickManager::Close() { } -void cJoystickManager::Open() { +void JoystickManager::Open() { } }} diff --git a/src/eepp/window/cplatformimpl.cpp b/src/eepp/window/cplatformimpl.cpp index 7afa2b2cc..417e2dc6c 100644 --- a/src/eepp/window/cplatformimpl.cpp +++ b/src/eepp/window/cplatformimpl.cpp @@ -3,12 +3,12 @@ namespace EE { namespace Window { namespace Platform { -cPlatformImpl::cPlatformImpl( cWindow * window ) : +PlatformImpl::PlatformImpl( cWindow * window ) : mWindow( window ) { } -cPlatformImpl::~cPlatformImpl() { +PlatformImpl::~PlatformImpl() { } }}} diff --git a/src/eepp/window/cview.cpp b/src/eepp/window/cview.cpp index 68782eb3d..d438189a7 100755 --- a/src/eepp/window/cview.cpp +++ b/src/eepp/window/cview.cpp @@ -2,7 +2,7 @@ namespace EE { namespace Window { -cView::cView() : mNeedUpdate(true) { +View::View() : mNeedUpdate(true) { mView.Left = 0; mView.Right = 0; mView.Top = 0; @@ -11,20 +11,20 @@ cView::cView() : mNeedUpdate(true) { CalcCenter(); } -cView::cView( const int& X, const int& Y, const int& Width, const int& Height ) : mNeedUpdate(true) { +View::View( const int& X, const int& Y, const int& Width, const int& Height ) : mNeedUpdate(true) { SetView( X, Y, Width, Height ); } -cView::cView( const Recti& View ) : mNeedUpdate(true) { +View::View( const Recti& View ) : mNeedUpdate(true) { mView = View; CalcCenter(); } -cView::~cView() { +View::~View() { } -void cView::SetView( const int& X, const int& Y, const int& Width, const int& Height ) { +void View::SetView( const int& X, const int& Y, const int& Width, const int& Height ) { mView.Left = X; mView.Top = Y; mView.Right = Width; @@ -33,16 +33,16 @@ void cView::SetView( const int& X, const int& Y, const int& Width, const int& He mNeedUpdate = true; } -void cView::CalcCenter() { +void View::CalcCenter() { mCenter.x = ( ( mView.Left + mView.Right ) - mView.Left ) * 0.5f; mCenter.y = ( ( mView.Top + mView.Bottom ) - mView.Top ) * 0.5f; } -Vector2i cView::Center() const { +Vector2i View::Center() const { return Vector2i( (int)mCenter.x, (Int32)mCenter.y ); } -void cView::Center( const Vector2i& Center ) { +void View::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 ); @@ -51,7 +51,7 @@ void cView::Center( const Vector2i& Center ) { mNeedUpdate = true; } -void cView::Move( const int& OffsetX, const int& OffsetY ) { +void View::Move( const int& OffsetX, const int& OffsetY ) { mView.Left += OffsetX; mView.Top += OffsetY; @@ -59,11 +59,11 @@ void cView::Move( const int& OffsetX, const int& OffsetY ) { mNeedUpdate = true; } -void cView::Move( const Vector2i& Offset ) { +void View::Move( const Vector2i& Offset ) { Move( Offset.x, Offset.y ); } -void cView::Scale( const Vector2f& Factor ) { +void View::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 ); @@ -75,11 +75,11 @@ void cView::Scale( const Vector2f& Factor ) { mNeedUpdate = true; } -void cView::Scale( const Float& Factor ) { +void View::Scale( const Float& Factor ) { Scale( Vector2f( Factor, Factor ) ); } -void cView::SetPosition( const int& X, const int& Y ) { +void View::SetPosition( const int& X, const int& Y ) { mView.Left = X; mView.Top = Y; @@ -87,7 +87,7 @@ void cView::SetPosition( const int& X, const int& Y ) { mNeedUpdate = true; } -void cView::SetSize( const int& Width, const int& Height ) { +void View::SetSize( const int& Width, const int& Height ) { mView.Right = Width; mView.Bottom = Height; @@ -95,11 +95,11 @@ void cView::SetSize( const int& Width, const int& Height ) { mNeedUpdate = true; } -bool cView::NeedUpdate() const { +bool View::NeedUpdate() const { bool Need = mNeedUpdate; if ( Need ) - const_cast(this)->mNeedUpdate = false; + const_cast(this)->mNeedUpdate = false; return Need; } diff --git a/src/eepp/window/cwindow.cpp b/src/eepp/window/cwindow.cpp index 82e73bd5f..be7e5ff7b 100644 --- a/src/eepp/window/cwindow.cpp +++ b/src/eepp/window/cwindow.cpp @@ -44,7 +44,7 @@ cWindow::cFrameData::~cFrameData() eeSAFE_DELETE( FrameElapsed ); } -cWindow::cWindow( WindowSettings Settings, ContextSettings Context, cClipboard * Clipboard, cInput * Input, cCursorManager * CursorManager ) : +cWindow::cWindow( WindowSettings Settings, ContextSettings Context, Clipboard * Clipboard, Input * Input, CursorManager * CursorManager ) : mClipboard( Clipboard ), mInput( Input ), mCursorManager( CursorManager ), @@ -108,18 +108,18 @@ void cWindow::SetViewport( const Int32& x, const Int32& y, const Uint32& Width, } } -void cWindow::SetView( const cView& View ) { +void cWindow::SetView( const View& View ) { mCurrentView = &View; Recti RView = mCurrentView->GetView(); SetViewport( RView.Left, RView.Top, RView.Right, RView.Bottom ); } -const cView& cWindow::GetDefaultView() const { +const View& cWindow::GetDefaultView() const { return mDefaultView; } -const cView& cWindow::GetView() const { +const View& cWindow::GetView() const { return *mCurrentView; } @@ -347,15 +347,15 @@ void cWindow::ClipPlaneDisable() { GLi->Clip2DPlaneDisable(); } -cClipboard * cWindow::GetClipboard() const { +Clipboard * cWindow::GetClipboard() const { return mClipboard; } -cInput * cWindow::GetInput() const { +Input * cWindow::GetInput() const { return mInput; } -cCursorManager * cWindow::GetCursorManager() const { +CursorManager * cWindow::GetCursorManager() const { return mCursorManager; } @@ -492,7 +492,7 @@ void cWindow::Center() { } } -Platform::cPlatformImpl * cWindow::GetPlatform() const { +Platform::PlatformImpl * cWindow::GetPlatform() const { return mPlatform; } diff --git a/src/eepp/window/platform/null/cnullimpl.cpp b/src/eepp/window/platform/null/cnullimpl.cpp index 6c3981259..c55d0691b 100644 --- a/src/eepp/window/platform/null/cnullimpl.cpp +++ b/src/eepp/window/platform/null/cnullimpl.cpp @@ -3,7 +3,7 @@ namespace EE { namespace Window { namespace Platform { cNullImpl::cNullImpl( cWindow * window ) : - cPlatformImpl( window ) + PlatformImpl( window ) { } @@ -45,22 +45,22 @@ void cNullImpl::ShowMouseCursor() { void cNullImpl::HideMouseCursor() { } -cCursor * cNullImpl::CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { +Cursor * cNullImpl::CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { return NULL; } -cCursor * cNullImpl::CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ) { +Cursor * cNullImpl::CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ) { return NULL; } -cCursor * cNullImpl::CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ) { +Cursor * cNullImpl::CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ) { return NULL; } -void cNullImpl::SetMouseCursor( cCursor * cursor ) { +void cNullImpl::SetMouseCursor( Cursor * cursor ) { } -void cNullImpl::SetSystemMouseCursor( Cursor::EE_SYSTEM_CURSOR syscursor ) { +void cNullImpl::SetSystemMouseCursor( EE_SYSTEM_CURSOR syscursor ) { } void cNullImpl::RestoreCursor() { diff --git a/src/eepp/window/platform/null/cnullimpl.hpp b/src/eepp/window/platform/null/cnullimpl.hpp index bdd52abec..5cc130304 100644 --- a/src/eepp/window/platform/null/cnullimpl.hpp +++ b/src/eepp/window/platform/null/cnullimpl.hpp @@ -8,7 +8,7 @@ namespace EE { namespace Window { namespace Platform { using namespace EE::Window; -class cNullImpl : public cPlatformImpl { +class cNullImpl : public PlatformImpl { public: cNullImpl( Window::cWindow * window ); @@ -36,15 +36,15 @@ class cNullImpl : public cPlatformImpl { void HideMouseCursor(); - cCursor * CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ); + Cursor * CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ); + Cursor * CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ); + Cursor * CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ); - void SetMouseCursor( cCursor * cursor ); + void SetMouseCursor( Cursor * cursor ); - void SetSystemMouseCursor( Cursor::EE_SYSTEM_CURSOR syscursor ); + void SetSystemMouseCursor( EE_SYSTEM_CURSOR syscursor ); void RestoreCursor(); diff --git a/src/eepp/window/platform/osx/cosximpl.cpp b/src/eepp/window/platform/osx/cosximpl.cpp index 282140f0e..5014175fe 100644 --- a/src/eepp/window/platform/osx/cosximpl.cpp +++ b/src/eepp/window/platform/osx/cosximpl.cpp @@ -7,7 +7,7 @@ namespace EE { namespace Window { namespace Platform { cOSXImpl::cOSXImpl( cWindow * window ) : - cPlatformImpl( window ) + PlatformImpl( window ) { } @@ -50,22 +50,22 @@ void cOSXImpl::ShowMouseCursor() { void cOSXImpl::HideMouseCursor() { } -cCursor * cOSXImpl::CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { +Cursor * cOSXImpl::CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { return NULL; } -cCursor * cOSXImpl::CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ) { +Cursor * cOSXImpl::CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ) { return NULL; } -cCursor * cOSXImpl::CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ) { +Cursor * cOSXImpl::CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ) { return NULL; } -void cOSXImpl::SetMouseCursor( cCursor * cursor ) { +void cOSXImpl::SetMouseCursor( Cursor * cursor ) { } -void cOSXImpl::SetSystemMouseCursor( Cursor::EE_SYSTEM_CURSOR syscursor ) { +void cOSXImpl::SetSystemMouseCursor( EE_SYSTEM_CURSOR syscursor ) { } void cOSXImpl::RestoreCursor() { diff --git a/src/eepp/window/platform/osx/cosximpl.hpp b/src/eepp/window/platform/osx/cosximpl.hpp index dde7983dd..82cbb6915 100644 --- a/src/eepp/window/platform/osx/cosximpl.hpp +++ b/src/eepp/window/platform/osx/cosximpl.hpp @@ -11,7 +11,7 @@ namespace EE { namespace Window { namespace Platform { using namespace EE::Window; -class cOSXImpl : public cPlatformImpl { +class cOSXImpl : public PlatformImpl { public: cOSXImpl( Window::cWindow * window ); @@ -39,15 +39,15 @@ class cOSXImpl : public cPlatformImpl { void HideMouseCursor(); - cCursor * CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ); + Cursor * CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ); + Cursor * CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ); + Cursor * CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ); - void SetMouseCursor( cCursor * cursor ); + void SetMouseCursor( Cursor * cursor ); - void SetSystemMouseCursor( Cursor::EE_SYSTEM_CURSOR syscursor ); + void SetSystemMouseCursor( EE_SYSTEM_CURSOR syscursor ); void RestoreCursor(); diff --git a/src/eepp/window/platform/win/ccursorwin.cpp b/src/eepp/window/platform/win/ccursorwin.cpp index 1e16e6fd3..5d327004c 100644 --- a/src/eepp/window/platform/win/ccursorwin.cpp +++ b/src/eepp/window/platform/win/ccursorwin.cpp @@ -14,25 +14,25 @@ namespace EE { namespace Window { namespace Platform { -cCursorWin::cCursorWin( cTexture * tex, const Vector2i& hotspot, const std::string& name, cWindow * window ) : - cCursor( tex, hotspot, name, window ) +CursorWin::CursorWin( cTexture * tex, const Vector2i& hotspot, const std::string& name, cWindow * window ) : + Cursor( tex, hotspot, name, window ) { Create(); } -cCursorWin::cCursorWin( cImage * img, const Vector2i& hotspot, const std::string& name, cWindow * window ) : - cCursor( img, hotspot, name, window ) +CursorWin::CursorWin( cImage * img, const Vector2i& hotspot, const std::string& name, cWindow * window ) : + Cursor( img, hotspot, name, window ) { Create(); } -cCursorWin::cCursorWin( const std::string& path, const Vector2i& hotspot, const std::string& name, cWindow * window ) : - cCursor( path, hotspot, name, window ) +CursorWin::CursorWin( const std::string& path, const Vector2i& hotspot, const std::string& name, cWindow * window ) : + Cursor( path, hotspot, name, window ) { Create(); } -cCursorWin::~cCursorWin() { +CursorWin::~CursorWin() { if ( NULL != mCursor ) DestroyIcon( (HCURSOR)mCursor ); } @@ -128,7 +128,7 @@ static void local_draw_to_hdc( HDC dc, cImage * bitmap, int x, int y ) { local_stretch_blit_to_hdc(bitmap, dc, 0, 0, w, h, x, y, w, h); } -void cCursorWin::Create() { +void CursorWin::Create() { if ( NULL == mImage && mImage->MemSize() ) return; @@ -208,11 +208,11 @@ void cCursorWin::Create() { mCursor = (void*)icon; } -cWinImpl * cCursorWin::GetPlatform() { +cWinImpl * CursorWin::GetPlatform() { return reinterpret_cast( mWindow->GetPlatform() ); } -void * cCursorWin::GetCursor() const { +void * CursorWin::GetCursor() const { return mCursor; } diff --git a/src/eepp/window/platform/win/ccursorwin.hpp b/src/eepp/window/platform/win/ccursorwin.hpp index c1482a96b..d53871db4 100644 --- a/src/eepp/window/platform/win/ccursorwin.hpp +++ b/src/eepp/window/platform/win/ccursorwin.hpp @@ -11,7 +11,7 @@ namespace EE { namespace Window { namespace Platform { class cWinImpl; -class cCursorWin : public cCursor { +class CursorWin : public Cursor { public: void * GetCursor() const; protected: @@ -19,13 +19,13 @@ class cCursorWin : public cCursor { void * mCursor; - cCursorWin( cTexture * tex, const Vector2i& hotspot, const std::string& name, cWindow * window ); + CursorWin( cTexture * tex, const Vector2i& hotspot, const std::string& name, cWindow * window ); - cCursorWin( cImage * img, const Vector2i& hotspot, const std::string& name, cWindow * window ); + CursorWin( cImage * img, const Vector2i& hotspot, const std::string& name, cWindow * window ); - cCursorWin( const std::string& path, const Vector2i& hotspot, const std::string& name, cWindow * window ); + CursorWin( const std::string& path, const Vector2i& hotspot, const std::string& name, cWindow * window ); - ~cCursorWin(); + ~CursorWin(); void Create(); diff --git a/src/eepp/window/platform/win/cwinimpl.cpp b/src/eepp/window/platform/win/cwinimpl.cpp index be0a8c723..14bbfb62a 100644 --- a/src/eepp/window/platform/win/cwinimpl.cpp +++ b/src/eepp/window/platform/win/cwinimpl.cpp @@ -19,8 +19,6 @@ static BOOL WIN_ShowWindow( HWND hWnd, int nCmdShow ) { #include #include -using namespace EE::Window::Cursor; - namespace EE { namespace Window { namespace Platform { static HCURSOR SYS_CURSORS[ SYS_CURSOR_COUNT ] = {0}; @@ -34,7 +32,7 @@ static HCURSOR GetLoadCursor( const EE_SYSTEM_CURSOR& cursor, LPCSTR syscur ) { } cWinImpl::cWinImpl( cWindow * window, eeWindowHandle handler ) : - cPlatformImpl( window ), + PlatformImpl( window ), mHandler( handler ), mCursorCurrent( NULL ), mCursorHidden( false ) @@ -93,7 +91,7 @@ void cWinImpl::ShowMouseCursor() { mCursorHidden = false; if ( !mCursorCurrent ) { - SetSystemMouseCursor( Cursor::SYS_CURSOR_ARROW ); + SetSystemMouseCursor( SYS_CURSOR_ARROW ); } else { SetCursor( (HCURSOR)mCursorCurrent ); SetClassLong( GetHandler(), GCL_HCURSOR, (DWORD)mCursorCurrent ); @@ -113,20 +111,20 @@ void cWinImpl::HideMouseCursor() { PostMessage( mHandler, WM_SETCURSOR, 0, 0 ); } -cCursor * cWinImpl::CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { - return eeNew( cCursorWin, ( tex, hotspot, name, mWindow ) ); +Cursor * cWinImpl::CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { + return eeNew( CursorWin, ( tex, hotspot, name, mWindow ) ); } -cCursor * cWinImpl::CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ) { - return eeNew( cCursorWin, ( img, hotspot, name, mWindow ) ); +Cursor * cWinImpl::CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ) { + return eeNew( CursorWin, ( img, hotspot, name, mWindow ) ); } -cCursor * cWinImpl::CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ) { - return eeNew( cCursorWin, ( path, hotspot, name, mWindow ) ); +Cursor * cWinImpl::CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ) { + return eeNew( CursorWin, ( path, hotspot, name, mWindow ) ); } -void cWinImpl::SetMouseCursor( cCursor * cursor ) { - mCursorCurrent = reinterpret_cast ( cursor )->GetCursor(); +void cWinImpl::SetMouseCursor( Cursor * cursor ) { + mCursorCurrent = reinterpret_cast ( cursor )->GetCursor(); if ( !mCursorHidden ) { SetCursor( (HCURSOR)mCursorCurrent ); @@ -138,7 +136,7 @@ void cWinImpl::SetMouseCursor( cCursor * cursor ) { } } -void cWinImpl::SetSystemMouseCursor( Cursor::EE_SYSTEM_CURSOR syscursor ) { +void cWinImpl::SetSystemMouseCursor( EE_SYSTEM_CURSOR syscursor ) { HCURSOR mc; switch ( syscursor ) { diff --git a/src/eepp/window/platform/win/cwinimpl.hpp b/src/eepp/window/platform/win/cwinimpl.hpp index 4e00169d8..826c0a61c 100644 --- a/src/eepp/window/platform/win/cwinimpl.hpp +++ b/src/eepp/window/platform/win/cwinimpl.hpp @@ -11,7 +11,7 @@ namespace EE { namespace Window { namespace Platform { using namespace EE::Window; -class cWinImpl : public cPlatformImpl { +class cWinImpl : public PlatformImpl { public: cWinImpl( Window::cWindow * window, eeWindowHandle handler ); @@ -39,15 +39,15 @@ class cWinImpl : public cPlatformImpl { void HideMouseCursor(); - cCursor * CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ); + Cursor * CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ); + Cursor * CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ); + Cursor * CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ); - void SetMouseCursor( cCursor * cursor ); + void SetMouseCursor( Cursor * cursor ); - void SetSystemMouseCursor( Cursor::EE_SYSTEM_CURSOR syscursor ); + void SetSystemMouseCursor( EE_SYSTEM_CURSOR syscursor ); void RestoreCursor(); diff --git a/src/eepp/window/platform/x11/ccursorx11.cpp b/src/eepp/window/platform/x11/ccursorx11.cpp index 53b1002ec..3e7252266 100644 --- a/src/eepp/window/platform/x11/ccursorx11.cpp +++ b/src/eepp/window/platform/x11/ccursorx11.cpp @@ -15,33 +15,33 @@ namespace EE { namespace Window { namespace Platform { -cCursorX11::cCursorX11( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( tex, hotspot, name, window ), +CursorX11::CursorX11( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( tex, hotspot, name, window ), mCursor( None ) { Create(); } -cCursorX11::cCursorX11( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( img, hotspot, name, window ), +CursorX11::CursorX11( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( img, hotspot, name, window ), mCursor( None ) { Create(); } -cCursorX11::cCursorX11( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : - cCursor( path, hotspot, name, window ), +CursorX11::CursorX11( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) : + Cursor( path, hotspot, name, window ), mCursor( None ) { Create(); } -cCursorX11::~cCursorX11() { +CursorX11::~CursorX11() { if ( None != mCursor ) XFreeCursor( GetPlatform()->GetDisplay(), mCursor ); } -void cCursorX11::Create() { +void CursorX11::Create() { if ( NULL == mImage || 0 == mImage->MemSize() ) return; @@ -74,11 +74,11 @@ void cCursorX11::Create() { XcursorImageDestroy( image ); } -cX11Impl * cCursorX11::GetPlatform() { +cX11Impl * CursorX11::GetPlatform() { return reinterpret_cast( mWindow->GetPlatform() ); } -X11Cursor cCursorX11::GetCursor() const { +X11Cursor CursorX11::GetCursor() const { return mCursor; } diff --git a/src/eepp/window/platform/x11/ccursorx11.hpp b/src/eepp/window/platform/x11/ccursorx11.hpp index d1ae74118..719749382 100644 --- a/src/eepp/window/platform/x11/ccursorx11.hpp +++ b/src/eepp/window/platform/x11/ccursorx11.hpp @@ -11,7 +11,7 @@ namespace EE { namespace Window { namespace Platform { class cX11Impl; -class cCursorX11 : public cCursor { +class CursorX11 : public Cursor { public: X11Cursor GetCursor() const; protected: @@ -19,13 +19,13 @@ class cCursorX11 : public cCursor { X11Cursor mCursor; - cCursorX11( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorX11( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorX11( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorX11( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - cCursorX11( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); + CursorX11( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ); - ~cCursorX11(); + ~CursorX11(); void Create(); diff --git a/src/eepp/window/platform/x11/cx11impl.cpp b/src/eepp/window/platform/x11/cx11impl.cpp index 7a93518f6..65845f3b6 100644 --- a/src/eepp/window/platform/x11/cx11impl.cpp +++ b/src/eepp/window/platform/x11/cx11impl.cpp @@ -14,12 +14,10 @@ #include #include -using namespace EE::Window::Cursor; - namespace EE { namespace Window { namespace Platform { cX11Impl::cX11Impl( cWindow * window, eeWindowHandle display, X11Window xwindow, X11Window mainwindow, LockFunc lock, UnlockFunc unlock ) : - cPlatformImpl( window ), + PlatformImpl( window ), mDisplay( display ), mX11Window( xwindow ), mMainWindow( mainwindow ), @@ -229,20 +227,20 @@ void cX11Impl::HideMouseCursor() { Unlock(); } -cCursor * cX11Impl::CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { - return eeNew( cCursorX11, ( tex, hotspot, name, mWindow ) ); +Cursor * cX11Impl::CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ) { + return eeNew( CursorX11, ( tex, hotspot, name, mWindow ) ); } -cCursor * cX11Impl::CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ) { - return eeNew( cCursorX11, ( img, hotspot, name, mWindow ) ); +Cursor * cX11Impl::CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ) { + return eeNew( CursorX11, ( img, hotspot, name, mWindow ) ); } -cCursor * cX11Impl::CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ) { - return eeNew( cCursorX11, ( path, hotspot, name, mWindow ) ); +Cursor * cX11Impl::CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ) { + return eeNew( CursorX11, ( path, hotspot, name, mWindow ) ); } -void cX11Impl::SetMouseCursor( cCursor * cursor ) { - mCursorCurrent = reinterpret_cast( cursor )->GetCursor(); +void cX11Impl::SetMouseCursor( Cursor * cursor ) { + mCursorCurrent = reinterpret_cast( cursor )->GetCursor(); if ( !mCursorHidden ) { Lock(); @@ -265,7 +263,7 @@ void cX11Impl::RestoreCursor() { } } -void cX11Impl::SetSystemMouseCursor( Cursor::EE_SYSTEM_CURSOR syscursor ) { +void cX11Impl::SetSystemMouseCursor( EE_SYSTEM_CURSOR syscursor ) { unsigned int cursor_shape; switch ( syscursor ) { diff --git a/src/eepp/window/platform/x11/cx11impl.hpp b/src/eepp/window/platform/x11/cx11impl.hpp index 3dd5a807d..149090be3 100644 --- a/src/eepp/window/platform/x11/cx11impl.hpp +++ b/src/eepp/window/platform/x11/cx11impl.hpp @@ -11,7 +11,7 @@ namespace EE { namespace Window { namespace Platform { using namespace EE::Window; -class cX11Impl : public cPlatformImpl { +class cX11Impl : public PlatformImpl { public: typedef void (*LockFunc)(void); typedef void (*UnlockFunc)(void); @@ -42,15 +42,15 @@ class cX11Impl : public cPlatformImpl { void HideMouseCursor(); - cCursor * CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ); + Cursor * CreateMouseCursor( cTexture * tex, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ); + Cursor * CreateMouseCursor( cImage * img, const Vector2i& hotspot, const std::string& name ); - cCursor * CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ); + Cursor * CreateMouseCursor( const std::string& path, const Vector2i& hotspot, const std::string& name ); - void SetMouseCursor( cCursor * cursor ); + void SetMouseCursor( Cursor * cursor ); - void SetSystemMouseCursor( Cursor::EE_SYSTEM_CURSOR syscursor ); + void SetSystemMouseCursor( EE_SYSTEM_CURSOR syscursor ); void RestoreCursor(); diff --git a/src/examples/empty_window/empty_window.cpp b/src/examples/empty_window/empty_window.cpp index 7acc0698d..3406208e3 100644 --- a/src/examples/empty_window/empty_window.cpp +++ b/src/examples/empty_window/empty_window.cpp @@ -33,7 +33,7 @@ void MainLoop() EE_MAIN_FUNC int main (int argc, char * argv []) { // Create a new window with vsync enabled - win = cEngine::instance()->CreateWindow( WindowSettings( 960, 640, "eepp - Empty Window" ), ContextSettings( true ) ); + win = Engine::instance()->CreateWindow( WindowSettings( 960, 640, "eepp - Empty Window" ), ContextSettings( true ) ); // Check if created if ( win->Created() ) { @@ -52,7 +52,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) } // Destroy the engine instance. Destroys all the windows and engine singletons. - cEngine::DestroySingleton(); + Engine::DestroySingleton(); // If was compiled in debug mode it will print the memory manager report MemoryManager::ShowResults(); diff --git a/src/examples/external_shader/external_shader.cpp b/src/examples/external_shader/external_shader.cpp index 82805fdc7..ef5dc1596 100644 --- a/src/examples/external_shader/external_shader.cpp +++ b/src/examples/external_shader/external_shader.cpp @@ -11,7 +11,7 @@ static Float sqrt_aprox[20001]; Uint32 ParticlesNum = 30000; cWindow * win = NULL; -cInput * imp = NULL; +Input * imp = NULL; cShaderProgram * ShaderProgram = NULL; bool ShadersSupported = false; Float tw; @@ -205,7 +205,7 @@ void MainLoop() EE_MAIN_FUNC int main (int argc, char * argv []) { - win = cEngine::instance()->CreateWindow( WindowSettings( 960, 640, "eepp - External Shaders" ), ContextSettings( true ) ); + win = Engine::instance()->CreateWindow( WindowSettings( 960, 640, "eepp - External Shaders" ), ContextSettings( true ) ); if ( win->Created() ) { @@ -279,7 +279,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) eeSAFE_DELETE_ARRAY( colors ); } - cEngine::DestroySingleton(); + Engine::DestroySingleton(); MemoryManager::ShowResults(); diff --git a/src/examples/fonts/fonts.cpp b/src/examples/fonts/fonts.cpp index 392ba4464..07b307b62 100644 --- a/src/examples/fonts/fonts.cpp +++ b/src/examples/fonts/fonts.cpp @@ -48,7 +48,7 @@ void MainLoop() EE_MAIN_FUNC int main (int argc, char * argv []) { // Create a new window - win = cEngine::instance()->CreateWindow( WindowSettings( 960, 640, "eepp - Fonts" ), ContextSettings( true ) ); + win = Engine::instance()->CreateWindow( WindowSettings( 960, 640, "eepp - Fonts" ), ContextSettings( true ) ); // Set window background color win->BackColor( RGB(255,255,255) ); @@ -131,7 +131,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) // Destroy the engine instance. Destroys all the windows and engine singletons. // Fonts are autoreleased by the engine - cEngine::DestroySingleton(); + Engine::DestroySingleton(); // If was compiled in debug mode it will print the memory manager report MemoryManager::ShowResults(); diff --git a/src/examples/physics/physics.cpp b/src/examples/physics/physics.cpp index caedb5866..c484c31e9 100644 --- a/src/examples/physics/physics.cpp +++ b/src/examples/physics/physics.cpp @@ -31,7 +31,7 @@ void CreateJointAndBody() { } cWindow * mWindow; -cInput * KM; +Input * KM; void DefaultDrawOptions() { cPhysicsManager::cDrawSpaceOptions * DSO = cPhysicsManager::instance()->GetDrawOptions(); @@ -628,7 +628,7 @@ void MainLoop() EE_MAIN_FUNC int main (int argc, char * argv []) { - mWindow = cEngine::instance()->CreateWindow( WindowSettings( 1024, 768, "eepp - Physics" ), ContextSettings( true ) ); + mWindow = Engine::instance()->CreateWindow( WindowSettings( 1024, 768, "eepp - Physics" ), ContextSettings( true ) ); if ( mWindow->Created() ) { KM = mWindow->GetInput(); @@ -642,7 +642,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) PhysicsDestroy(); } - cEngine::DestroySingleton(); + Engine::DestroySingleton(); MemoryManager::ShowResults(); diff --git a/src/examples/sprites/sprites.cpp b/src/examples/sprites/sprites.cpp index 7cc1fb4e8..fb8cd5ad7 100644 --- a/src/examples/sprites/sprites.cpp +++ b/src/examples/sprites/sprites.cpp @@ -91,7 +91,7 @@ void MainLoop() EE_MAIN_FUNC int main (int argc, char * argv []) { // Create a new window - win = cEngine::instance()->CreateWindow( WindowSettings( 640, 480, "eepp - Sprites" ), ContextSettings( true ) ); + win = Engine::instance()->CreateWindow( WindowSettings( 640, 480, "eepp - Sprites" ), ContextSettings( true ) ); // Check if created if ( win->Created() ) { @@ -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 - Vector2i ScreenCenter( cEngine::instance()->GetWidth() / 2, cEngine::instance()->GetHeight() / 2 ); + Vector2i ScreenCenter( Engine::instance()->GetWidth() / 2, Engine::instance()->GetHeight() / 2 ); Planet->Position( ScreenCenter.x - Planet->GetAABB().Size().Width() / 2, ScreenCenter.y - Planet->GetAABB().Size().Height() / 2 ); @@ -167,7 +167,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) eeSAFE_DELETE( Blindy ); // Destroy the engine instance. Destroys all the windows and engine singletons. - cEngine::DestroySingleton(); + Engine::DestroySingleton(); // If was compiled in debug mode it will print the memory manager report MemoryManager::ShowResults(); diff --git a/src/examples/vbo_fbo_batch/vbo_fbo_batch.cpp b/src/examples/vbo_fbo_batch/vbo_fbo_batch.cpp index 71fff124d..43a15c3ba 100644 --- a/src/examples/vbo_fbo_batch/vbo_fbo_batch.cpp +++ b/src/examples/vbo_fbo_batch/vbo_fbo_batch.cpp @@ -113,7 +113,7 @@ void MainLoop() EE_MAIN_FUNC int main (int argc, char * argv []) { // Create a new window - win = cEngine::instance()->CreateWindow( WindowSettings( 1024, 768, "eepp - VBO - FBO and Batch Rendering" ), ContextSettings( true ) ); + win = Engine::instance()->CreateWindow( WindowSettings( 1024, 768, "eepp - VBO - FBO and Batch Rendering" ), ContextSettings( true ) ); // Set window background color win->BackColor( RGB( 50, 50, 50 ) ); @@ -160,7 +160,7 @@ EE_MAIN_FUNC int main (int argc, char * argv []) } // Destroy the engine instance. Destroys all the windows and engine singletons. - cEngine::DestroySingleton(); + Engine::DestroySingleton(); // If was compiled in debug mode it will print the memory manager report MemoryManager::ShowResults(); diff --git a/src/test/eetest.cpp b/src/test/eetest.cpp index 0628df4a3..b0b4cc40a 100644 --- a/src/test/eetest.cpp +++ b/src/test/eetest.cpp @@ -9,7 +9,7 @@ static void MainLoop() { namespace Demo_Test { void cEETest::Init() { - EE = cEngine::instance(); + EE = Engine::instance(); Log::instance()->LiveWrite( true ); Log::instance()->ConsoleOutput( true ); @@ -139,7 +139,7 @@ void cEETest::Init() { #endif } else { - cEngine::DestroySingleton(); + Engine::DestroySingleton(); exit(0); } @@ -802,7 +802,7 @@ void cEETest::LoadTextures() { #ifndef EE_GLES #if defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX - cEngine::instance()->EnableSharedGLContext(); + Engine::instance()->EnableSharedGLContext(); #endif PakTest->Open( MyPath + "test.zip" ); @@ -890,10 +890,10 @@ void cEETest::LoadTextures() { Cursor[0] = TF->Load( MyPath + "cursors/cursor.tga" ); CursorP[0] = TF->GetTexture( Cursor[0] ); - cCursorManager * CurMan = mWindow->GetCursorManager(); + CursorManager * CurMan = mWindow->GetCursorManager(); CurMan->Visible( false ); CurMan->Visible( true ); - CurMan->Set( Window::Cursor::SYS_CURSOR_HAND ); + CurMan->Set( Window::SYS_CURSOR_HAND ); CurMan->SetGlobalCursor( EE_CURSOR_ARROW, CurMan->Add( CurMan->Create( CursorP[0], Vector2i( 1, 1 ), "cursor_special" ) ) ); CurMan->Set( EE_CURSOR_ARROW ); @@ -1364,7 +1364,7 @@ void cEETest::Input() { if ( KM->IsKeyUp(KEY_6) && KM->ControlPressed() ) SetScreen( 5 ); - cJoystick * Joy = JM->GetJoystick(0); + Joystick * Joy = JM->GetJoystick(0); if ( mJoyEnabled && NULL != Joy ) { if ( Joy->IsButtonDown(0) ) KM->InjectButtonPress(EE_BUTTON_LEFT); @@ -1816,7 +1816,7 @@ void cEETest::PhysicsUpdate() { } #else for ( Uint32 i = 0; i < EE_MAX_FINGERS; i++ ) { - cInputFinger * Finger = KM->GetFingerIndex(i); + InputFinger * Finger = KM->GetFingerIndex(i); mMousePoint[i] = cVectNew( Finger->x, Finger->y ); cVect newPoint = tovect( cpvlerp( tocpv( mMousePoint_last[i] ), tocpv( mMousePoint[i] ), 0.25 ) ); mMouseBody[i]->Pos( newPoint ); @@ -1867,7 +1867,7 @@ void cEETest::End() { Log::instance()->Save(); - cEngine::DestroySingleton(); + Engine::DestroySingleton(); } } diff --git a/src/test/eetest.hpp b/src/test/eetest.hpp index dda198fab..09a17f464 100644 --- a/src/test/eetest.hpp +++ b/src/test/eetest.hpp @@ -36,9 +36,9 @@ class cUITest : public cUIControlAnim { virtual Uint32 OnMouseUp( const Vector2i& Pos, const Uint32 Flags ) { cUIDragable::OnMouseUp( Pos, Flags ); - if ( cEngine::instance()->GetCurrentWindow()->GetInput()->MouseWheelUp() ) + if ( Engine::instance()->GetCurrentWindow()->GetInput()->MouseWheelUp() ) Scale( Scale() + 0.1f ); - else if ( cEngine::instance()->GetCurrentWindow()->GetInput()->MouseWheelDown() ) + else if ( Engine::instance()->GetCurrentWindow()->GetInput()->MouseWheelDown() ) Scale( Scale() - 0.1f ); return 1; @@ -88,12 +88,12 @@ class cEETest : private Thread { Clock cElapsed; Time PSElapsed; private: - cEngine * EE; + Engine * EE; Window::cWindow * mWindow; cTextureFactory* TF; System::Log* Log; - cInput* KM; - cInputTextBuffer InBuf; + Window::Input* KM; + InputTextBuffer InBuf; bool side, aside; Float ang, scale, alpha, Ang; @@ -161,7 +161,7 @@ class cEETest : private Thread { Float AnimVal; bool AnimSide; - cView Views[2]; + View Views[2]; cShaderProgram * mShaderProgram; @@ -186,7 +186,7 @@ class cEETest : private Thread { ResourceLoader mFontLoader; void OnFontLoaded( ResourceLoader * ObjLoaded ); - cJoystickManager * JM; + JoystickManager * JM; Float mAxisX; Float mAxisY;