From 408f1b3aa3dde0c5d72bc8be180d3ef1675f9705 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 17 Dec 2013 07:43:58 +0100 Subject: TONY: Add a reset function in RMWindow in order to group variable initialization --- engines/tony/window.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'engines/tony/window.cpp') 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) { -- cgit v1.2.3