aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-12-02 07:55:59 +0100
committerEinar Johan Trøan Sømåen2012-12-02 07:55:59 +0100
commit72b198b752d4b05cda3be2f5fa8cd6532b3dd2b2 (patch)
tree441ca5d69ac42a9f1ad08cab5b99a18222cdf3e6
parentc00ee9d801c5052b46fb3624f8dd9aa00260ca71 (diff)
downloadscummvm-rg350-72b198b752d4b05cda3be2f5fa8cd6532b3dd2b2.tar.gz
scummvm-rg350-72b198b752d4b05cda3be2f5fa8cd6532b3dd2b2.tar.bz2
scummvm-rg350-72b198b752d4b05cda3be2f5fa8cd6532b3dd2b2.zip
WINTERMUTE: Reset renderTicket-system on SaveGame-load
-rw-r--r--engines/wintermute/base/gfx/base_renderer.h2
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.cpp13
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.h2
3 files changed, 15 insertions, 2 deletions
diff --git a/engines/wintermute/base/gfx/base_renderer.h b/engines/wintermute/base/gfx/base_renderer.h
index 0475824464..9027c66a14 100644
--- a/engines/wintermute/base/gfx/base_renderer.h
+++ b/engines/wintermute/base/gfx/base_renderer.h
@@ -179,7 +179,7 @@ public:
void setIndicator(int width, int height, int x, int y, uint32 color);
void persistSaveLoadImages(BasePersistenceManager *persistMgr);
void initSaveLoad(bool isSaving, bool quickSave = false);
- void endSaveLoad();
+ virtual void endSaveLoad();
void setLoadingScreen(const char *filename, int x, int y);
void setSaveImage(const char *filename, int x, int y);
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index 074ea2b9a0..350fc2d87c 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -612,4 +612,17 @@ BaseSurface *BaseRenderOSystem::createSurface() {
return new BaseSurfaceOSystem(_gameRef);
}
+void BaseRenderOSystem::endSaveLoad() {
+ BaseRenderer::endSaveLoad();
+
+ // Clear the scale-buffered tickets as we just loaded.
+ RenderQueueIterator it = _renderQueue.begin();
+ while (it != _renderQueue.end()) {
+ RenderTicket *ticket = *it;
+ it = _renderQueue.erase(it);
+ delete ticket;
+ }
+ _drawNum = 1;
+}
+
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.h b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
index 1e72508cd0..0d52611b17 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.h
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
@@ -97,7 +97,7 @@ public:
float getScaleRatioY() const {
return _ratioY;
}
-
+ void endSaveLoad();
void drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY, bool disableAlpha = false);
BaseSurface *createSurface();
private: