diff options
author | Strangerke | 2013-12-17 07:43:58 +0100 |
---|---|---|
committer | Strangerke | 2013-12-17 07:43:58 +0100 |
commit | 408f1b3aa3dde0c5d72bc8be180d3ef1675f9705 (patch) | |
tree | 463e6b78b145cd8a798e818594613eabb95e0013 /engines/tony | |
parent | b5316f4c2a5544cb54f310dbaced5315a28e79f9 (diff) | |
download | scummvm-rg350-408f1b3aa3dde0c5d72bc8be180d3ef1675f9705.tar.gz scummvm-rg350-408f1b3aa3dde0c5d72bc8be180d3ef1675f9705.tar.bz2 scummvm-rg350-408f1b3aa3dde0c5d72bc8be180d3ef1675f9705.zip |
TONY: Add a reset function in RMWindow in order to group variable initialization
Diffstat (limited to 'engines/tony')
-rw-r--r-- | engines/tony/window.cpp | 12 | ||||
-rw-r--r-- | engines/tony/window.h | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp index a732862854..02991975ce 100644 --- a/engines/tony/window.cpp +++ b/engines/tony/window.cpp @@ -40,7 +40,7 @@ namespace Tony { \****************************************************************************/ RMWindow::RMWindow() { - _showDirtyRects = false; + reset(); } RMWindow::~RMWindow() { @@ -55,11 +55,21 @@ RMWindow::~RMWindow() { void RMWindow::init() { Graphics::PixelFormat pixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); initGraphics(RM_SX, RM_SY, true, &pixelFormat); + + reset(); +} +/** + * Reset the variables + */ +void RMWindow::reset() { + _showDirtyRects = false; _bGrabScreenshot = false; _bGrabThumbnail = false; _bGrabMovie = false; _wiping = false; + + _wThumbBuf = nullptr; } void RMWindow::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { diff --git a/engines/tony/window.h b/engines/tony/window.h index 3874652f64..2cc9bfd37c 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -72,6 +72,7 @@ public: * Initialization */ void init(); + void reset(); void close(); /** |