diff options
author | Johannes Schickel | 2006-05-25 08:02:17 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-05-25 08:02:17 +0000 |
commit | 259e06a69b14b0612188a167bf2a0d1e4beb3708 (patch) | |
tree | 64a03def358a679231aed896b92d7c84d895cde1 /engines/kyra | |
parent | a052d89f8b35cf9afdf4c1622de59a4d56388ac3 (diff) | |
download | scummvm-rg350-259e06a69b14b0612188a167bf2a0d1e4beb3708.tar.gz scummvm-rg350-259e06a69b14b0612188a167bf2a0d1e4beb3708.tar.bz2 scummvm-rg350-259e06a69b14b0612188a167bf2a0d1e4beb3708.zip |
- Adds some _quitFlag checks
- deletes Screen::drawPixel
svn-id: r22622
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/kyra.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/kyra3.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/screen.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/screen.h | 1 |
4 files changed, 5 insertions, 12 deletions
diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp index f761efbe30..5895769b90 100644 --- a/engines/kyra/kyra.cpp +++ b/engines/kyra/kyra.cpp @@ -575,7 +575,7 @@ void KyraEngine::quitGame() { } void KyraEngine::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) { - while (_system->getMillis() < timestamp) { + while (_system->getMillis() < timestamp && !_quitFlag) { if (updateTimers) updateGameTimers(); if (timestamp - _system->getMillis() >= 10) @@ -661,10 +661,10 @@ void KyraEngine::delay(uint32 amount, bool update, bool isMainLoop) { if (_skipFlag && !_abortIntroFlag && !queryGameFlag(0xFE)) _skipFlag = false; - if (amount > 0 && !_skipFlag) { + if (amount > 0 && !_skipFlag && !_quitFlag) { _system->delayMillis((amount > 10) ? 10 : amount); } - } while (!_skipFlag && _system->getMillis() < start + amount); + } while (!_skipFlag && _system->getMillis() < start + amount && !_quitFlag); } diff --git a/engines/kyra/kyra3.cpp b/engines/kyra/kyra3.cpp index 79d65b5d17..8814e19cf7 100644 --- a/engines/kyra/kyra3.cpp +++ b/engines/kyra/kyra3.cpp @@ -284,8 +284,8 @@ void KyraEngine_v3::drawMainBox(int x, int y, int w, int h, int fill) { _screen->drawClippedLine(x, y, x+w, y, colorTable[2]); _screen->drawClippedLine(x, y, x, y+h, colorTable[2]); - _screen->drawPixel(x, y+h, colorTable[3]); - _screen->drawPixel(x+w, y, colorTable[3]); + _screen->setPagePixel(_screen->_curPage, x, y+h, colorTable[3]); + _screen->setPagePixel(_screen->_curPage, x+w, y, colorTable[3]); } void KyraEngine_v3::gui_printString(const char *format, int x, int y, int col1, int col2, int flags, ...) { diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 4065b35207..fe06842225 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -494,12 +494,6 @@ void Screen::drawBox(int x1, int y1, int x2, int y2, int color) { drawClippedLine(x1, y2, x2, y2, color); } -void Screen::drawPixel(int x, int y, int color, int pageNum) { - debugC(9, kDebugLevelScreen, "Screen::drawPixel(%i, %i, %i, %i)", x, y, color, pageNum); - uint8 *dst = getPagePtr((pageNum != -1) ? pageNum : 0) + y * SCREEN_W + x; - *dst = color; -} - void Screen::drawShadedBox(int x1, int y1, int x2, int y2, int color1, int color2) { debugC(9, kDebugLevelScreen, "Screen::drawShadedBox(%i, %i, %i, %i, %i, %i)", x1, y1, x2, y2, color1, color2); assert(x1 > 0 && y1 > 0); diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h index 5853eef7bf..0b6426847c 100644 --- a/engines/kyra/screen.h +++ b/engines/kyra/screen.h @@ -115,7 +115,6 @@ public: void drawClippedLine(int x1, int y1, int x2, int y2, int color); void drawShadedBox(int x1, int y1, int x2, int y2, int color1, int color2); void drawBox(int x1, int y1, int x2, int y2, int color); - void drawPixel(int x, int y, int color, int pageNum = -1); void setAnimBlockPtr(int size); void setTextColorMap(const uint8 *cmap); void setTextColor(const uint8 *cmap, int a, int b); |