Added missing virtual functions in abstract class GraphicsManager.
svn-id: r49589
This commit is contained in:
parent
475fe8a3bd
commit
11e8ac61d1
4 changed files with 35 additions and 24 deletions
|
@ -41,9 +41,16 @@ public:
|
||||||
virtual int getDefaultGraphicsMode() const = 0;
|
virtual int getDefaultGraphicsMode() const = 0;
|
||||||
virtual bool setGraphicsMode(int mode) = 0;
|
virtual bool setGraphicsMode(int mode) = 0;
|
||||||
virtual int getGraphicsMode() const = 0;
|
virtual int getGraphicsMode() const = 0;
|
||||||
|
#ifdef USE_RGB_COLOR
|
||||||
virtual Graphics::PixelFormat getScreenFormat() const = 0;
|
virtual Graphics::PixelFormat getScreenFormat() const = 0;
|
||||||
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() = 0;
|
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() = 0;
|
||||||
|
#endif
|
||||||
virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) = 0;
|
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 getHeight() = 0;
|
||||||
virtual int16 getWidth() = 0;
|
virtual int16 getWidth() = 0;
|
||||||
virtual void setPalette(const byte *colors, uint start, uint num) = 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 fillScreen(uint32 col) = 0;
|
||||||
virtual void updateScreen() = 0;
|
virtual void updateScreen() = 0;
|
||||||
virtual void setShakePos(int shakeOffset) = 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 showOverlay() = 0;
|
||||||
virtual void hideOverlay() = 0;
|
virtual void hideOverlay() = 0;
|
||||||
virtual Graphics::PixelFormat getOverlayFormat() const = 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 void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h)= 0;
|
||||||
virtual int16 getOverlayHeight() = 0;
|
virtual int16 getOverlayHeight() = 0;
|
||||||
virtual int16 getOverlayWidth() = 0;
|
virtual int16 getOverlayWidth() = 0;
|
||||||
|
|
||||||
virtual bool showMouse(bool visible) = 0;
|
virtual bool showMouse(bool visible) = 0;
|
||||||
virtual void warpMouse(int x, int y) = 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 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
|
#endif
|
||||||
|
|
|
@ -81,17 +81,16 @@ public:
|
||||||
int getDefaultGraphicsMode() const;
|
int getDefaultGraphicsMode() const;
|
||||||
bool setGraphicsMode(int mode);
|
bool setGraphicsMode(int mode);
|
||||||
int getGraphicsMode() const;
|
int getGraphicsMode() const;
|
||||||
|
|
||||||
#ifdef USE_RGB_COLOR
|
#ifdef USE_RGB_COLOR
|
||||||
// Game screen
|
|
||||||
virtual Graphics::PixelFormat getScreenFormat() const { return _screenFormat; }
|
virtual Graphics::PixelFormat getScreenFormat() const { return _screenFormat; }
|
||||||
|
|
||||||
// Highest supported
|
|
||||||
virtual Common::List<Graphics::PixelFormat> getSupportedFormats();
|
virtual Common::List<Graphics::PixelFormat> getSupportedFormats();
|
||||||
#endif
|
#endif
|
||||||
|
virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL);
|
||||||
|
virtual int getScreenChangeID() const { return _screenChangeCount; }
|
||||||
|
|
||||||
void beginGFXTransaction();
|
void beginGFXTransaction();
|
||||||
OSystem::TransactionError endGFXTransaction();
|
OSystem::TransactionError endGFXTransaction();
|
||||||
virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL);
|
|
||||||
virtual int16 getHeight();
|
virtual int16 getHeight();
|
||||||
virtual int16 getWidth();
|
virtual int16 getWidth();
|
||||||
void setPalette(const byte *colors, uint start, uint num);
|
void setPalette(const byte *colors, uint start, uint num);
|
||||||
|
@ -102,6 +101,9 @@ public:
|
||||||
void fillScreen(uint32 col);
|
void fillScreen(uint32 col);
|
||||||
void updateScreen();
|
void updateScreen();
|
||||||
void setShakePos(int shakeOffset);
|
void setShakePos(int shakeOffset);
|
||||||
|
void setFocusRectangle(const Common::Rect& rect) {}
|
||||||
|
void clearFocusRectangle() {}
|
||||||
|
|
||||||
virtual void showOverlay();
|
virtual void showOverlay();
|
||||||
virtual void hideOverlay();
|
virtual void hideOverlay();
|
||||||
virtual Graphics::PixelFormat getOverlayFormat() const { return _overlayFormat; }
|
virtual Graphics::PixelFormat getOverlayFormat() const { return _overlayFormat; }
|
||||||
|
@ -110,6 +112,7 @@ public:
|
||||||
void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);
|
void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);
|
||||||
virtual int16 getOverlayHeight() { return _videoMode.overlayHeight; }
|
virtual int16 getOverlayHeight() { return _videoMode.overlayHeight; }
|
||||||
virtual int16 getOverlayWidth() { return _videoMode.overlayWidth; }
|
virtual int16 getOverlayWidth() { return _videoMode.overlayWidth; }
|
||||||
|
|
||||||
bool showMouse(bool visible);
|
bool showMouse(bool visible);
|
||||||
virtual void warpMouse(int x, int y);
|
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 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;
|
_cursorPaletteDisabled = disable;
|
||||||
blitCursor();
|
blitCursor();
|
||||||
}
|
}
|
||||||
virtual int getScreenChangeID() const { return _screenChangeCount; }
|
|
||||||
|
|
||||||
#ifdef USE_OSD
|
#ifdef USE_OSD
|
||||||
void displayMessageOnOSD(const char *msg);
|
void displayMessageOnOSD(const char *msg);
|
||||||
|
|
|
@ -89,8 +89,6 @@ void ModularBackend::initSize(uint w, uint h, const Graphics::PixelFormat *forma
|
||||||
_graphicsManager->initSize(w, h, format);
|
_graphicsManager->initSize(w, h, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** TODO: Add getScreenChangeID, beginGFXTransaction and
|
|
||||||
** endGFXTransaction to graphics manager
|
|
||||||
int ModularBackend::getScreenChangeID() const {
|
int ModularBackend::getScreenChangeID() const {
|
||||||
return _graphicsManager->getScreenChangeID();
|
return _graphicsManager->getScreenChangeID();
|
||||||
}
|
}
|
||||||
|
@ -101,7 +99,7 @@ void ModularBackend::beginGFXTransaction() {
|
||||||
|
|
||||||
OSystem::TransactionError ModularBackend::endGFXTransaction() {
|
OSystem::TransactionError ModularBackend::endGFXTransaction() {
|
||||||
return _graphicsManager->endGFXTransaction();
|
return _graphicsManager->endGFXTransaction();
|
||||||
}*/
|
}
|
||||||
|
|
||||||
int16 ModularBackend::getHeight() {
|
int16 ModularBackend::getHeight() {
|
||||||
return _graphicsManager->getHeight();
|
return _graphicsManager->getHeight();
|
||||||
|
@ -142,15 +140,13 @@ void ModularBackend::updateScreen() {
|
||||||
void ModularBackend::setShakePos(int shakeOffset) {
|
void ModularBackend::setShakePos(int shakeOffset) {
|
||||||
_graphicsManager->setShakePos(shakeOffset);
|
_graphicsManager->setShakePos(shakeOffset);
|
||||||
}
|
}
|
||||||
/** TODO: Add setFocusRectangle and clearFocusRectangle
|
|
||||||
** to graphics manager
|
|
||||||
void ModularBackend::setFocusRectangle(const Common::Rect& rect) {
|
void ModularBackend::setFocusRectangle(const Common::Rect& rect) {
|
||||||
_graphicsManager->setFocusRectangle(rect);
|
_graphicsManager->setFocusRectangle(rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModularBackend::clearFocusRectangle() {
|
void ModularBackend::clearFocusRectangle() {
|
||||||
_graphicsManager->clearFocusRectangle();
|
_graphicsManager->clearFocusRectangle();
|
||||||
}*/
|
}
|
||||||
|
|
||||||
void ModularBackend::showOverlay() {
|
void ModularBackend::showOverlay() {
|
||||||
_graphicsManager->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);
|
_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) {
|
void ModularBackend::setCursorPalette(const byte *colors, uint start, uint num) {
|
||||||
_graphicsManager->setCursorPalette(colors, start, num);
|
_graphicsManager->setCursorPalette(colors, start, num);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModularBackend::disableCursorPalette(bool disable) {
|
void ModularBackend::disableCursorPalette(bool disable) {
|
||||||
_graphicsManager->disableCursorPalette(disable);
|
_graphicsManager->disableCursorPalette(disable);
|
||||||
}*/
|
}
|
||||||
|
|
||||||
/** TODO: Add getMillis, delayMillis and getTimeAndDate
|
/** TODO: Add getMillis, delayMillis and getTimeAndDate
|
||||||
** to timer manager
|
** to timer manager
|
||||||
|
|
|
@ -50,10 +50,10 @@ public:
|
||||||
virtual Common::List<Graphics::PixelFormat> getSupportedFormats();
|
virtual Common::List<Graphics::PixelFormat> getSupportedFormats();
|
||||||
#endif
|
#endif
|
||||||
virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL);
|
virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL);
|
||||||
//virtual int getScreenChangeID() const;
|
virtual int getScreenChangeID() const;
|
||||||
|
|
||||||
//virtual void beginGFXTransaction();
|
virtual void beginGFXTransaction();
|
||||||
//virtual OSystem::TransactionError endGFXTransaction();
|
virtual OSystem::TransactionError endGFXTransaction();
|
||||||
|
|
||||||
virtual int16 getHeight();
|
virtual int16 getHeight();
|
||||||
virtual int16 getWidth();
|
virtual int16 getWidth();
|
||||||
|
@ -65,8 +65,8 @@ public:
|
||||||
virtual void fillScreen(uint32 col);
|
virtual void fillScreen(uint32 col);
|
||||||
virtual void updateScreen();
|
virtual void updateScreen();
|
||||||
virtual void setShakePos(int shakeOffset);
|
virtual void setShakePos(int shakeOffset);
|
||||||
//virtual void setFocusRectangle(const Common::Rect& rect);
|
virtual void setFocusRectangle(const Common::Rect& rect);
|
||||||
//virtual void clearFocusRectangle();
|
virtual void clearFocusRectangle();
|
||||||
|
|
||||||
virtual void showOverlay();
|
virtual void showOverlay();
|
||||||
virtual void hideOverlay();
|
virtual void hideOverlay();
|
||||||
|
@ -80,8 +80,8 @@ public:
|
||||||
virtual bool showMouse(bool visible);
|
virtual bool showMouse(bool visible);
|
||||||
virtual void warpMouse(int x, int y);
|
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 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 setCursorPalette(const byte *colors, uint start, uint num);
|
||||||
virtual void disableCursorPalette(bool disable);*/
|
virtual void disableCursorPalette(bool disable);
|
||||||
|
|
||||||
/*virtual uint32 getMillis();
|
/*virtual uint32 getMillis();
|
||||||
virtual void delayMillis(uint msecs);
|
virtual void delayMillis(uint msecs);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue