diff options
-rw-r--r-- | common/system.h | 39 | ||||
-rw-r--r-- | sword2/driver/animation.cpp | 3 |
2 files changed, 41 insertions, 1 deletions
diff --git a/common/system.h b/common/system.h index ec7c7b40b7..bcfdfe704a 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; /** @@ -293,6 +297,9 @@ public: * * @param width the new virtual screen width * @param height the new virtual screen height + * @param overlayScale optional: the scale to be used for the overlay, if different + * from the default scale (default is -1, which means the + * overlay uses the same scale) */ virtual void initSize(uint width, uint height, int overlayScale = -1) = 0; @@ -358,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 palette + * format is like it is described in 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. @@ -368,6 +385,28 @@ public: * @see updateScreen */ virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) = 0; + + /** + * Copies the screen to a surface + * if bitsPerPixel = 15 a RGB555 format is used + * if bitsPerPixel = 16 a RGB565 format is used + * WARNING: surf->free() musst be called by the user + * + * @param surf the surfce to store the data in it + * @param bitsPerPixel must be higher than 15 and lower than 16 + */ + virtual void grabScreen(Graphics::Surface *surf, int bitsPerPixel); + + /** + * Copies the screen to a surface (with original bit depth) + * It should return a 1 byte per pixel surface in all cases + * because currently all games supported by ScummVM are + * using 1 byte per pixel. + * WARNING: surf->free() musst be called by the user + * + * @param surf the surfce to store the data in it + */ + virtual void grabRawScreen(Graphics::Surface *surf) = 0; /** * Clear the screen to black. diff --git a/sword2/driver/animation.cpp b/sword2/driver/animation.cpp index c91d1dd933..0d9c376ea1 100644 --- a/sword2/driver/animation.cpp +++ b/sword2/driver/animation.cpp @@ -163,7 +163,8 @@ void MoviePlayer::drawTextObject(AnimationState *anim, MovieTextObject *obj) { * Plays an animated cutscene. * @param filename the file name of the cutscene file * @param text the subtitles and voiceovers for the cutscene - * @param musicOut lead-out music + * @param leadInRes lead-in music resource id + * @param leadOutRes lead-out music resource id */ int32 MoviePlayer::play(const char *filename, MovieTextObject *text[], int32 leadInRes, int32 leadOutRes) { |