From 8354f236285bfd55536a19b177a4fcfbdd0aaa1b Mon Sep 17 00:00:00 2001 From: RichieSams Date: Sun, 8 Sep 2013 15:15:32 -0500 Subject: ZVISION: Add a debug assert to make sure we're not trying to render ouside the working window --- engines/zvision/render_manager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/zvision/render_manager.cpp b/engines/zvision/render_manager.cpp index 441580c1bc..04163fab61 100644 --- a/engines/zvision/render_manager.cpp +++ b/engines/zvision/render_manager.cpp @@ -289,6 +289,9 @@ void RenderManager::copyRectToWorkingWindow(const uint16 *buffer, int32 destX, i } _workingWindowDirtyRect.extend(Common::Rect(destX, destY, destX + width, destY + height)); + + // TODO: Remove this from release. It's here to make sure code that uses this function clips their destinations correctly + assert(_workingWindowDirtyRect.width() <= _workingWidth && _workingWindowDirtyRect.height() <= _workingHeight); } void RenderManager::copyRectToWorkingWindow(const uint16 *buffer, int32 destX, int32 destY, int32 imageWidth, int32 width, int32 height, int16 alphaColor) { -- cgit v1.2.3