diff options
author | Einar Johan Trøan Sømåen | 2012-07-18 13:00:43 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-18 13:00:43 +0200 |
commit | 9a37c9805fb93ea6ef49b2af28eee80c1d281882 (patch) | |
tree | c7f07ca407473d24b01c4850b87ac3a24f451b75 | |
parent | 764b7edee4b05804ef42c5991b450f606afeaaab (diff) | |
download | scummvm-rg350-9a37c9805fb93ea6ef49b2af28eee80c1d281882.tar.gz scummvm-rg350-9a37c9805fb93ea6ef49b2af28eee80c1d281882.tar.bz2 scummvm-rg350-9a37c9805fb93ea6ef49b2af28eee80c1d281882.zip |
WINTERMUTE: Decrement the following tickets when removing an unused ticket.
-rw-r--r-- | engines/wintermute/Base/BRenderSDL.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/wintermute/Base/BRenderSDL.cpp b/engines/wintermute/Base/BRenderSDL.cpp index 8898c97328..8a8a55e2ff 100644 --- a/engines/wintermute/Base/BRenderSDL.cpp +++ b/engines/wintermute/Base/BRenderSDL.cpp @@ -452,6 +452,7 @@ void CBRenderSDL::addDirtyRect(const Common::Rect &rect) { void CBRenderSDL::drawTickets() {
RenderQueueIterator it = _renderQueue.begin();
// Clean out the old tickets
+ int decrement = 0;
while (it != _renderQueue.end()) {
if ((*it)->_wantsDraw == false || (*it)->_isValid == false) {
RenderTicket* ticket = *it;
@@ -459,7 +460,9 @@ void CBRenderSDL::drawTickets() { //warning("Discarding Rect: %d %d %d %d Width: %d Height: %d", (*it)->_dstRect.left, (*it)->_dstRect.top, (*it)->_dstRect.right, (*it)->_dstRect.bottom, (*it)->_dstRect.width() , (*it)->_dstRect.height());
it = _renderQueue.erase(it);
delete ticket;
+ decrement++;
} else {
+ (*it)->_drawNum -= decrement;
it++;
}
}
|