aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/gph
diff options
context:
space:
mode:
authorColin Snover2017-10-08 12:47:33 -0500
committerColin Snover2017-10-15 13:24:21 -0500
commit4757c24c683c2f2b8e3b55aa8d7a767aad9e947e (patch)
treea35cf3cd386219e8c945ba8aacc3e20c442fbf69 /backends/graphics/gph
parentf6ab0e5c10921be55e719ba93f8b5b980d4439e7 (diff)
downloadscummvm-rg350-4757c24c683c2f2b8e3b55aa8d7a767aad9e947e.tar.gz
scummvm-rg350-4757c24c683c2f2b8e3b55aa8d7a767aad9e947e.tar.bz2
scummvm-rg350-4757c24c683c2f2b8e3b55aa8d7a767aad9e947e.zip
BACKENDS: Fix up graphics manager ports with const & override where appropriate
Diffstat (limited to 'backends/graphics/gph')
-rw-r--r--backends/graphics/gph/gph-graphics.cpp12
-rw-r--r--backends/graphics/gph/gph-graphics.h37
2 files changed, 19 insertions, 30 deletions
diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp
index 767fb57e11..e2c84114c4 100644
--- a/backends/graphics/gph/gph-graphics.cpp
+++ b/backends/graphics/gph/gph-graphics.cpp
@@ -477,7 +477,7 @@ bool GPHGraphicsManager::loadGFXMode() {
return true;
}
-bool GPHGraphicsManager::hasFeature(OSystem::Feature f) {
+bool GPHGraphicsManager::hasFeature(OSystem::Feature f) const {
return
(f == OSystem::kFeatureAspectRatioCorrection) ||
(f == OSystem::kFeatureCursorPalette);
@@ -497,7 +497,7 @@ void GPHGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
}
}
-bool GPHGraphicsManager::getFeatureState(OSystem::Feature f) {
+bool GPHGraphicsManager::getFeatureState(OSystem::Feature f) const {
assert(_transactionMode == kTransactionNone);
switch (f) {
@@ -510,14 +510,6 @@ bool GPHGraphicsManager::getFeatureState(OSystem::Feature f) {
}
}
-SurfaceSdlGraphicsManager::MousePos *GPHGraphicsManager::getMouseCurState() {
- return &_mouseCurState;
-}
-
-SurfaceSdlGraphicsManager::VideoState *GPHGraphicsManager::getVideoMode() {
- return &_videoMode;
-}
-
void GPHGraphicsManager::warpMouse(int x, int y) {
if (_mouseCurState.x != x || _mouseCurState.y != y) {
if (_videoMode.mode == GFX_HALF && !_overlayVisible) {
diff --git a/backends/graphics/gph/gph-graphics.h b/backends/graphics/gph/gph-graphics.h
index 152d29ddf4..69e3b8947f 100644
--- a/backends/graphics/gph/gph-graphics.h
+++ b/backends/graphics/gph/gph-graphics.h
@@ -35,26 +35,23 @@ class GPHGraphicsManager : public SurfaceSdlGraphicsManager {
public:
GPHGraphicsManager(SdlEventSource *boss, SdlWindow *window);
- bool hasFeature(OSystem::Feature f);
- void setFeatureState(OSystem::Feature f, bool enable);
- bool getFeatureState(OSystem::Feature f);
- int getDefaultGraphicsMode() const;
-
- void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL);
- const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
- bool setGraphicsMode(const char *name);
- bool setGraphicsMode(int mode);
- void setGraphicsModeIntern();
- void internUpdateScreen();
- void showOverlay();
- void hideOverlay();
- bool loadGFXMode();
- void drawMouse();
- void undrawMouse();
- virtual void warpMouse(int x, int y);
-
- SurfaceSdlGraphicsManager::MousePos *getMouseCurState();
- SurfaceSdlGraphicsManager::VideoState *getVideoMode();
+ bool hasFeature(OSystem::Feature f) const override;
+ void setFeatureState(OSystem::Feature f, bool enable) override;
+ bool getFeatureState(OSystem::Feature f) const;
+ int getDefaultGraphicsMode() const override;
+
+ void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL) override;
+ const OSystem::GraphicsMode *getSupportedGraphicsModes() const override;
+ bool setGraphicsMode(const char *name) override;
+ bool setGraphicsMode(int mode) override;
+ void setGraphicsModeIntern() override;
+ void internUpdateScreen() override;
+ void showOverlay() override;
+ void hideOverlay() override;
+ bool loadGFXMode() override;
+ void drawMouse() override;
+ void undrawMouse() override;
+ void warpMouse(int x, int y) override;
virtual void transformMouseCoordinates(Common::Point &point);
};