aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Montoir2004-12-21 16:08:14 +0000
committerGregory Montoir2004-12-21 16:08:14 +0000
commit118cc4d2552844622b633223c3677a4eafd0275e (patch)
tree19e03cdf43b2d94f8c676fd4e992b640be805f4e
parent418c5f847303f7d177d953e35ea64ec8ed22acf7 (diff)
downloadscummvm-rg350-118cc4d2552844622b633223c3677a4eafd0275e.tar.gz
scummvm-rg350-118cc4d2552844622b633223c3677a4eafd0275e.tar.bz2
scummvm-rg350-118cc4d2552844622b633223c3677a4eafd0275e.zip
no need to updateScreen() if there are no screen blocks marked as dirty
svn-id: r16243
-rw-r--r--queen/display.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/queen/display.cpp b/queen/display.cpp
index 1609ddb687..16bb4a74a7 100644
--- a/queen/display.cpp
+++ b/queen/display.cpp
@@ -83,10 +83,15 @@ Display::~Display() {
delete[] _backdropBuf;
delete[] _panelBuf;
delete[] _screenBuf;
+
+ delete[] _dirtyBlocks;
delete[] _pal.room;
delete[] _pal.screen;
delete[] _pal.panel;
+
+ delete[] _dynalum.mskBuf;
+ delete[] _dynalum.lumBuf;
}
void Display::dynalumInit(const char *roomName, uint16 roomNum) {
@@ -598,6 +603,7 @@ void Display::update(bool dynalum, int16 dynaX, int16 dynaY) {
// _fullRefresh = 1;
if (_fullRefresh) {
_system->copyRectToScreen(_screenBuf, SCREEN_W, 0, 0, SCREEN_W, SCREEN_H);
+ _system->updateScreen();
--_fullRefresh;
if (_fullRefresh) {
memset(_dirtyBlocks, 0, _dirtyBlocksWidth * _dirtyBlocksHeight);
@@ -628,9 +634,11 @@ void Display::update(bool dynalum, int16 dynaX, int16 dynaY) {
dbBuf += _dirtyBlocksWidth;
scrBuf += SCREEN_W * D_BLOCK_H;
}
+ if (count != 0) {
+ _system->updateScreen();
+ }
debug(7, "Display::update() - Dirtyblocks blit (%d)", count);
}
- _system->updateScreen();
}
void Display::setupPanel() {