diff options
author | Alejandro Marzini | 2010-07-10 22:47:29 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-10 22:47:29 +0000 |
commit | 85034dc730148dab3eb85b47be3f3984337e9484 (patch) | |
tree | b2877f92e3738fcf79956a91d17f1beabca6dcad /backends/graphics/sdl | |
parent | 386785e2b85b066398122d747117f97dbbb4896a (diff) | |
download | scummvm-rg350-85034dc730148dab3eb85b47be3f3984337e9484.tar.gz scummvm-rg350-85034dc730148dab3eb85b47be3f3984337e9484.tar.bz2 scummvm-rg350-85034dc730148dab3eb85b47be3f3984337e9484.zip |
Added BaseSdlGraphicsManager. Added GLTexture.
svn-id: r50795
Diffstat (limited to 'backends/graphics/sdl')
-rw-r--r-- | backends/graphics/sdl/basesdl-graphics.h | 79 | ||||
-rw-r--r-- | backends/graphics/sdl/sdl-graphics.h | 37 |
2 files changed, 81 insertions, 35 deletions
diff --git a/backends/graphics/sdl/basesdl-graphics.h b/backends/graphics/sdl/basesdl-graphics.h new file mode 100644 index 0000000000..6e25e095f4 --- /dev/null +++ b/backends/graphics/sdl/basesdl-graphics.h @@ -0,0 +1,79 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef BACKENDS_GRAPHICS_BASESDL_H +#define BACKENDS_GRAPHICS_BASESDL_H + +#include "backends/graphics/graphics.h" + +#if defined(__SYMBIAN32__) +#include <esdl\SDL.h> +#else +#include <SDL.h> +#endif + +/** + * Base SDL graphics manager, contains common functions + * used by other SDL managers + */ +class BaseSdlGraphicsManager : public GraphicsManager { +public: + /** + * Marks the screen for a full redraw + */ + virtual void forceFullRedraw() = 0; + + /** + * Handles the scalar hotkeys + */ + virtual bool handleScalerHotkeys(const SDL_KeyboardEvent &key) = 0; + + /** + * Returns if the event passed is a hotkey for the graphics scalers + */ + virtual bool isScalerHotkey(const Common::Event &event) = 0; + + /** + * Adjusts mouse event coords for the current scaler + */ + virtual void adjustMouseEvent(Common::Event &event) = 0; + + /** + * Updates the mouse cursor position + */ + virtual void setMousePos(int x, int y) = 0; + + /** + * Toggles fullscreen + */ + virtual void toggleFullScreen() = 0; + + /** + * Saves a screenshot to a file + */ + virtual bool saveScreenshot(const char *filename) = 0; +}; + +#endif diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h index 10ed9a7c46..b5bb23d247 100644 --- a/backends/graphics/sdl/sdl-graphics.h +++ b/backends/graphics/sdl/sdl-graphics.h @@ -26,16 +26,10 @@ #ifndef BACKENDS_GRAPHICS_SDL_H #define BACKENDS_GRAPHICS_SDL_H -#include "backends/graphics/graphics.h" +#include "backends/graphics/sdl/basesdl-graphics.h" #include "common/system.h" #include "graphics/scaler.h" -#if defined(__SYMBIAN32__) -#include <esdl\SDL.h> -#else -#include <SDL.h> -#endif - #if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) // Uncomment this to enable the 'on screen display' code. #define USE_OSD 1 @@ -72,7 +66,7 @@ public: /** * SDL graphics manager */ -class SdlGraphicsManager : public GraphicsManager { +class SdlGraphicsManager : public BaseSdlGraphicsManager { public: SdlGraphicsManager(); virtual ~SdlGraphicsManager(); @@ -127,39 +121,12 @@ public: virtual void displayMessageOnOSD(const char *msg); #endif - /** - * Marks the screen for a full redraw - */ virtual void forceFullRedraw(); - - /** - * Handles the scalar hotkeys - */ virtual bool handleScalerHotkeys(const SDL_KeyboardEvent &key); - - /** - * Returns if the event passed is a hotkey for the graphics scalers - */ virtual bool isScalerHotkey(const Common::Event &event); - - /** - * Adjusts mouse event coords for the current scaler - */ virtual void adjustMouseEvent(Common::Event &event); - - /** - * Updates the mouse cursor position - */ virtual void setMousePos(int x, int y); - - /** - * Toggles fullscreen - */ virtual void toggleFullScreen(); - - /** - * Saves a screenshot to a file - */ virtual bool saveScreenshot(const char *filename); protected: |