diff options
author | Max Horn | 2005-05-08 21:39:05 +0000 |
---|---|---|
committer | Max Horn | 2005-05-08 21:39:05 +0000 |
commit | 013e30eb389c40eb579cc8e3f05b8e8da80925ca (patch) | |
tree | 12bfa9c83719a6a3bf94a3505cdf5534415578f4 /common | |
parent | 315943f19a3d7b9acb64e9fb8b7e1587d81c1ae5 (diff) | |
download | scummvm-rg350-013e30eb389c40eb579cc8e3f05b8e8da80925ca.tar.gz scummvm-rg350-013e30eb389c40eb579cc8e3f05b8e8da80925ca.tar.bz2 scummvm-rg350-013e30eb389c40eb579cc8e3f05b8e8da80925ca.zip |
Added two new methods to OSystem: grabPalette and grabRawScreen
svn-id: r17974
Diffstat (limited to 'common')
-rw-r--r-- | common/system.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/common/system.h b/common/system.h index 262a88c3b9..63d50530ce 100644 --- a/common/system.h +++ b/common/system.h @@ -28,6 +28,10 @@ #include "common/rect.h" #include "common/singleton.h" +namespace Graphics { +class Surface; +} // end of namespace Graphics + class SaveFileManager; /** @@ -361,6 +365,16 @@ public: * API are probably going to remove it. */ virtual void setPalette(const byte *colors, uint start, uint num) = 0; + + /** + * Grabs a specified part of the currently active palette. + * The format is the same as for setPalette. + * + * @param buf the buffer + * @param start the first platte entry + * @param num nummber of the entries + */ + virtual void grabPalette(byte *colors, uint start, uint num) = 0; /** * Blit a bitmap to the virtual screen. @@ -371,6 +385,16 @@ public: * @see updateScreen */ virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) = 0; + + /** + * Copies the current screen contents to a new surface, with the original + * bit depth. This will allocate memory for the pixel data. + * WARNING: surf->free() must be called by the user to avoid leaking. + * + * @param surf the surfce to store the data in it + * @return true if all went well, false if an error occured + */ + virtual bool grabRawScreen(Graphics::Surface *surf) { return false; } /** * Clear the screen to black. |