aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl/sdl.h
diff options
context:
space:
mode:
authorJody Northup2009-08-21 09:37:51 +0000
committerJody Northup2009-08-21 09:37:51 +0000
commit3084919b32771d43d17fdd5d584505cd31d20b72 (patch)
tree3f42b5e0cb69f340ccd30fad96f6ee4e51e260cf /backends/platform/sdl/sdl.h
parentcba2897cc8f7b70d27fc75ca8b8d55cde4738e4a (diff)
parent89d7fea4e619cd44d5ce16eee1e46ad417e26c9c (diff)
downloadscummvm-rg350-3084919b32771d43d17fdd5d584505cd31d20b72.tar.gz
scummvm-rg350-3084919b32771d43d17fdd5d584505cd31d20b72.tar.bz2
scummvm-rg350-3084919b32771d43d17fdd5d584505cd31d20b72.zip
Merged RGB color API and support in from /scummvm/branches/gsoc2009-16bit/
svn-id: r43577
Diffstat (limited to 'backends/platform/sdl/sdl.h')
-rw-r--r--backends/platform/sdl/sdl.h27
1 files changed, 23 insertions, 4 deletions
diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h
index 2a5fda30bd..09213ad417 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -93,9 +93,17 @@ public:
void beginGFXTransaction(void);
TransactionError endGFXTransaction(void);
- // Set the size of the video bitmap.
- // Typically, 320x200
- virtual void initSize(uint w, uint h); // overloaded by CE backend
+#ifdef ENABLE_RGB_COLOR
+ // Game screen
+ virtual Graphics::PixelFormat getScreenFormat() const { return _screenFormat; }
+
+ // Highest supported
+ virtual Common::List<Graphics::PixelFormat> getSupportedFormats();
+#endif
+
+ // Set the size and format of the video bitmap.
+ // Typically, 320x200 CLUT8
+ virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format); // overloaded by CE backend
virtual int getScreenChangeID() const { return _screenChangeCount; }
@@ -124,7 +132,7 @@ public:
virtual void warpMouse(int x, int y); // overloaded by CE backend (FIXME)
// Set the bitmap that's used when drawing the cursor.
- virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor, int cursorTargetScale); // overloaded by CE backend (FIXME)
+ virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format); // overloaded by CE backend (FIXME)
// Set colors of cursor palette
void setCursorPalette(const byte *colors, uint start, uint num);
@@ -186,6 +194,7 @@ public:
// Overlay
virtual Graphics::PixelFormat getOverlayFormat() const { return _overlayFormat; }
+
virtual void showOverlay();
virtual void hideOverlay();
virtual void clearOverlay();
@@ -239,6 +248,10 @@ protected:
// unseen game screen
SDL_Surface *_screen;
+#ifdef ENABLE_RGB_COLOR
+ Graphics::PixelFormat _screenFormat;
+ Graphics::PixelFormat _cursorFormat;
+#endif
// temporary screen (for scalers)
SDL_Surface *_tmpscreen;
@@ -272,6 +285,9 @@ protected:
bool needHotswap;
bool needUpdatescreen;
bool normal1xScaler;
+#ifdef ENABLE_RGB_COLOR
+ bool formatChanged;
+#endif
};
TransactionDetails _transactionDetails;
@@ -288,6 +304,9 @@ protected:
int screenWidth, screenHeight;
int overlayWidth, overlayHeight;
int hardwareWidth, hardwareHeight;
+#ifdef ENABLE_RGB_COLOR
+ Graphics::PixelFormat format;
+#endif
};
VideoState _videoMode, _oldVideoMode;