From d9c5a439d09211ec210195709d275596c6c3c9ba Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sun, 1 Jul 2012 22:59:22 +0200 Subject: CGLDevice implementation - extended Gfx::CDevice interface - written OpenGL implementation in Gfx::CGLDevice - rewrote color and light module - added Gfx::VertexCol - added array casts to Math::Vector, Math::Matrix and Gfx::Color --- src/app/app.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/app/app.h') diff --git a/src/app/app.h b/src/app/app.h index 4cb6976..098f0ad 100644 --- a/src/app/app.h +++ b/src/app/app.h @@ -21,6 +21,7 @@ #include "common/misc.h" +#include "graphics/common/device.h" #include "graphics/common/engine.h" #include @@ -75,7 +76,7 @@ public: ~CApplication(); //! Returns the only CApplication instance - static CApplication* RetInstance() + static CApplication* GetInstance() { return m_appInstance; } public: @@ -83,6 +84,8 @@ public: Error ParseArguments(int argc, char *argv[]); //! Initializes the application bool Create(); + //! Cleans up before exit + void Destroy(); //! Main event loop int Run(); @@ -96,33 +99,31 @@ public: void UpdateJoystick(); void SetShowStat(bool show); - bool RetShowStat(); + bool GetShowStat(); void SetDebugMode(bool mode); - bool RetDebugMode(); + bool GetDebugMode(); - bool RetSetupMode(); + bool GetSetupMode(); void SetJoystickEnabled(bool enable); - bool RetJoystickEnabled(); + bool GetJoystickEnabled(); void FlushPressKey(); void ResetKey(); void SetKey(int keyRank, int option, int key); - int RetKey(int keyRank, int option); + int GetKey(int keyRank, int option); void SetMouseType(Gfx::MouseType type); void SetMousePos(Math::Point pos); //? void SetNiceMouse(bool nice); - //? bool RetNiceMouse(); - //? bool RetNiceMouseCap(); + //? bool GetNiceMouse(); + //? bool GetNiceMouseCap(); bool WriteScreenShot(char *filename, int width, int height); protected: - //! Cleans up before exit - void Destroy(); //! Processes an SDL event to Event struct void ParseEvent(); //! Handles some incoming events @@ -163,6 +164,8 @@ protected: CEventQueue* m_eventQueue; //! Graphics engine Gfx::CEngine* m_engine; + //! Graphics device + Gfx::CDevice* m_device; //! Sound subsystem CSound* m_sound; //! Main class of the proper game engine -- cgit v1.2.3-1-g7c22