diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/graphics/abstract-graphics.h | 15 | ||||
-rw-r--r-- | backends/graphics/sdl/sdl-graphics.h | 18 | ||||
-rw-r--r-- | backends/modular-backend.cpp | 12 | ||||
-rw-r--r-- | backends/modular-backend.h | 14 |
4 files changed, 35 insertions, 24 deletions
diff --git a/backends/graphics/abstract-graphics.h b/backends/graphics/abstract-graphics.h index c38f66c9ed..6037bb10e3 100644 --- a/backends/graphics/abstract-graphics.h +++ b/backends/graphics/abstract-graphics.h @@ -41,9 +41,16 @@ public: virtual int getDefaultGraphicsMode() const = 0; virtual bool setGraphicsMode(int mode) = 0; virtual int getGraphicsMode() const = 0; +#ifdef USE_RGB_COLOR virtual Graphics::PixelFormat getScreenFormat() const = 0; virtual Common::List<Graphics::PixelFormat> getSupportedFormats() = 0; +#endif virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) = 0; + virtual int getScreenChangeID() const = 0; + + virtual void beginGFXTransaction() = 0; + virtual OSystem::TransactionError endGFXTransaction() = 0; + virtual int16 getHeight() = 0; virtual int16 getWidth() = 0; virtual void setPalette(const byte *colors, uint start, uint num) = 0; @@ -54,6 +61,9 @@ public: virtual void fillScreen(uint32 col) = 0; virtual void updateScreen() = 0; virtual void setShakePos(int shakeOffset) = 0; + virtual void setFocusRectangle(const Common::Rect& rect) = 0; + virtual void clearFocusRectangle() = 0; + virtual void showOverlay() = 0; virtual void hideOverlay() = 0; virtual Graphics::PixelFormat getOverlayFormat() const = 0; @@ -62,9 +72,14 @@ public: virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h)= 0; virtual int16 getOverlayHeight() = 0; virtual int16 getOverlayWidth() = 0; + virtual bool showMouse(bool visible) = 0; virtual void warpMouse(int x, int y) = 0; virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL) = 0; + virtual void setCursorPalette(const byte *colors, uint start, uint num) = 0; + virtual void disableCursorPalette(bool disable) = 0; + + virtual void displayMessageOnOSD(const char *msg) {} }; #endif diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h index 650b01794b..84935baaeb 100644 --- a/backends/graphics/sdl/sdl-graphics.h +++ b/backends/graphics/sdl/sdl-graphics.h @@ -81,17 +81,16 @@ public: int getDefaultGraphicsMode() const; bool setGraphicsMode(int mode); int getGraphicsMode() const; - #ifdef USE_RGB_COLOR - // Game screen virtual Graphics::PixelFormat getScreenFormat() const { return _screenFormat; } - - // Highest supported virtual Common::List<Graphics::PixelFormat> getSupportedFormats(); #endif + virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL); + virtual int getScreenChangeID() const { return _screenChangeCount; } + void beginGFXTransaction(); OSystem::TransactionError endGFXTransaction(); - virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL); + virtual int16 getHeight(); virtual int16 getWidth(); void setPalette(const byte *colors, uint start, uint num); @@ -102,14 +101,18 @@ public: void fillScreen(uint32 col); void updateScreen(); void setShakePos(int shakeOffset); + void setFocusRectangle(const Common::Rect& rect) {} + void clearFocusRectangle() {} + virtual void showOverlay(); virtual void hideOverlay(); virtual Graphics::PixelFormat getOverlayFormat() const { return _overlayFormat; } void clearOverlay(); void grabOverlay(OverlayColor *buf, int pitch); void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); - virtual int16 getOverlayHeight() { return _videoMode.overlayHeight; } - virtual int16 getOverlayWidth() { return _videoMode.overlayWidth; } + virtual int16 getOverlayHeight() { return _videoMode.overlayHeight; } + virtual int16 getOverlayWidth() { return _videoMode.overlayWidth; } + bool showMouse(bool visible); virtual void warpMouse(int x, int y); virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL); @@ -118,7 +121,6 @@ public: _cursorPaletteDisabled = disable; blitCursor(); } - virtual int getScreenChangeID() const { return _screenChangeCount; } #ifdef USE_OSD void displayMessageOnOSD(const char *msg); diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp index 17514c7652..7052fc0d3a 100644 --- a/backends/modular-backend.cpp +++ b/backends/modular-backend.cpp @@ -89,8 +89,6 @@ void ModularBackend::initSize(uint w, uint h, const Graphics::PixelFormat *forma _graphicsManager->initSize(w, h, format); } -/** TODO: Add getScreenChangeID, beginGFXTransaction and - ** endGFXTransaction to graphics manager int ModularBackend::getScreenChangeID() const { return _graphicsManager->getScreenChangeID(); } @@ -101,7 +99,7 @@ void ModularBackend::beginGFXTransaction() { OSystem::TransactionError ModularBackend::endGFXTransaction() { return _graphicsManager->endGFXTransaction(); -}*/ +} int16 ModularBackend::getHeight() { return _graphicsManager->getHeight(); @@ -142,15 +140,13 @@ void ModularBackend::updateScreen() { void ModularBackend::setShakePos(int shakeOffset) { _graphicsManager->setShakePos(shakeOffset); } -/** TODO: Add setFocusRectangle and clearFocusRectangle - ** to graphics manager void ModularBackend::setFocusRectangle(const Common::Rect& rect) { _graphicsManager->setFocusRectangle(rect); } void ModularBackend::clearFocusRectangle() { _graphicsManager->clearFocusRectangle(); -}*/ +} void ModularBackend::showOverlay() { _graphicsManager->showOverlay(); @@ -196,15 +192,13 @@ void ModularBackend::setMouseCursor(const byte *buf, uint w, uint h, int hotspot _graphicsManager->setMouseCursor(buf, w, h, hotspotX, hotspotY, keycolor, cursorTargetScale, format); } -/** TODO: Add setCursorPalette and disableCursorPalette - ** to graphics manager void ModularBackend::setCursorPalette(const byte *colors, uint start, uint num) { _graphicsManager->setCursorPalette(colors, start, num); } void ModularBackend::disableCursorPalette(bool disable) { _graphicsManager->disableCursorPalette(disable); -}*/ +} /** TODO: Add getMillis, delayMillis and getTimeAndDate ** to timer manager diff --git a/backends/modular-backend.h b/backends/modular-backend.h index 96a4c78cde..8f4c5e01ec 100644 --- a/backends/modular-backend.h +++ b/backends/modular-backend.h @@ -50,10 +50,10 @@ public: virtual Common::List<Graphics::PixelFormat> getSupportedFormats(); #endif virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL); - //virtual int getScreenChangeID() const; + virtual int getScreenChangeID() const; - //virtual void beginGFXTransaction(); - //virtual OSystem::TransactionError endGFXTransaction(); + virtual void beginGFXTransaction(); + virtual OSystem::TransactionError endGFXTransaction(); virtual int16 getHeight(); virtual int16 getWidth(); @@ -65,8 +65,8 @@ public: virtual void fillScreen(uint32 col); virtual void updateScreen(); virtual void setShakePos(int shakeOffset); - //virtual void setFocusRectangle(const Common::Rect& rect); - //virtual void clearFocusRectangle(); + virtual void setFocusRectangle(const Common::Rect& rect); + virtual void clearFocusRectangle(); virtual void showOverlay(); virtual void hideOverlay(); @@ -80,8 +80,8 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL); - /*virtual void setCursorPalette(const byte *colors, uint start, uint num); - virtual void disableCursorPalette(bool disable);*/ + virtual void setCursorPalette(const byte *colors, uint start, uint num); + virtual void disableCursorPalette(bool disable); /*virtual uint32 getMillis(); virtual void delayMillis(uint msecs); |