diff options
author | Willem Jan Palenstijn | 2013-08-24 12:33:17 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-09-26 02:17:26 +0200 |
commit | 6d1ca9d94eb2d7b1665814b23aa7b56b8dd6bfb3 (patch) | |
tree | 4c86964d6bfedb476523b36671c9ad4f040fde2d | |
parent | b27ac796d84670d77bff73276de5d6f8affb0323 (diff) | |
download | scummvm-rg350-6d1ca9d94eb2d7b1665814b23aa7b56b8dd6bfb3.tar.gz scummvm-rg350-6d1ca9d94eb2d7b1665814b23aa7b56b8dd6bfb3.tar.bz2 scummvm-rg350-6d1ca9d94eb2d7b1665814b23aa7b56b8dd6bfb3.zip |
WINTERMUTE: No longer use ticket->_drawNum
-rw-r--r-- | engines/wintermute/base/gfx/osystem/base_render_osystem.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp index d7a8378ae2..a7df076c84 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp @@ -378,7 +378,7 @@ void BaseRenderOSystem::drawFromTicket(RenderTicket *renderTicket) { { ++_lastFrameIter; // In-order - if (_renderQueue.empty() || _drawNum > (_renderQueue.back())->_drawNum) { + if (_renderQueue.empty() || _lastFrameIter == _renderQueue.end()) { assert(_renderQueue.empty() || _lastFrameIter == _renderQueue.end()); _lastFrameIter--; renderTicket->_drawNum = _drawNum++; @@ -389,12 +389,7 @@ void BaseRenderOSystem::drawFromTicket(RenderTicket *renderTicket) { ++_lastAddedTicket; } else { // Before something - RenderQueueIterator pos; - for (pos = _renderQueue.begin(); pos != _renderQueue.end(); pos++) { - if ((*pos)->_drawNum >= _drawNum) { - break; - } - } + RenderQueueIterator pos = _lastFrameIter; assert(!_renderQueue.empty() && _lastFrameIter != _renderQueue.end()); assert(pos == _lastFrameIter); _renderQueue.insert(pos, renderTicket); @@ -421,7 +416,7 @@ void BaseRenderOSystem::drawFromQueuedTicket(const RenderQueueIterator &ticket) { ++_lastFrameIter; // Was drawn last round, still in the same order - if (_drawNum == renderTicket->_drawNum) { + if (*_lastFrameIter == renderTicket) { assert((*_lastFrameIter)->_drawNum == _drawNum); assert(*_lastFrameIter == renderTicket); _drawNum++; |