diff options
author | Gregory Montoir | 2007-02-25 19:01:59 +0000 |
---|---|---|
committer | Gregory Montoir | 2007-02-25 19:01:59 +0000 |
commit | c5f5583ded3a76538edc0a0bcf117914c4d4b1a2 (patch) | |
tree | 51ea4b6ee8e6e0aa7dddc965f33b0b1a61da6c2f /engines/queen/display.cpp | |
parent | 198f32ea8ee8c432a0b348c009e5f5a0a241dc86 (diff) | |
download | scummvm-rg350-c5f5583ded3a76538edc0a0bcf117914c4d4b1a2.tar.gz scummvm-rg350-c5f5583ded3a76538edc0a0bcf117914c4d4b1a2.tar.bz2 scummvm-rg350-c5f5583ded3a76538edc0a0bcf117914c4d4b1a2.zip |
added AmigaSound::playRandomPatternJungle, minor cleanup
svn-id: r25860
Diffstat (limited to 'engines/queen/display.cpp')
-rw-r--r-- | engines/queen/display.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/engines/queen/display.cpp b/engines/queen/display.cpp index 35282440e1..e25470a9e7 100644 --- a/engines/queen/display.cpp +++ b/engines/queen/display.cpp @@ -286,7 +286,7 @@ void Display::palCustomColors(uint16 roomNum) { palSetAmigaColor(30, 0x600); break; case 29: - palSetAmigaColor(27, 0X58B); + palSetAmigaColor(27, 0x58B); palSetAmigaColor(28, 0x369); palSetAmigaColor(29, 0x158); palSetAmigaColor(30, 0x046); @@ -755,7 +755,7 @@ void Display::drawInventoryItem(const uint8 *data, uint16 x, uint16 y, uint16 w, if (data != NULL) { if (_vm->resource()->getPlatform() == Common::kPlatformAmiga) { uint8 *dst = _panelBuf + y * PANEL_W + x; - while (h--) { + for (int j = 0; j < h; ++j) { for (int i = 0; i < w; ++i) { dst[i] = 144 + *data++; } @@ -932,19 +932,14 @@ void Display::horizontalScroll(int16 scroll) { void Display::setDirtyBlock(uint16 x, uint16 y, uint16 w, uint16 h) { if (_fullRefresh < 2) { + assert(x + w <= SCREEN_W && y + h <= SCREEN_H); uint16 ex = (x + w - 1) / D_BLOCK_W; uint16 ey = (y + h - 1) / D_BLOCK_H; x /= D_BLOCK_W; y /= D_BLOCK_H; - uint16 cy = ey - y + 1; - uint16 cx = ex - x + 1; - if (cy >= _dirtyBlocksHeight) cy = _dirtyBlocksHeight - 1; - if (cx >= _dirtyBlocksWidth) cx = _dirtyBlocksWidth - 1; uint8 *p = _dirtyBlocks + _dirtyBlocksWidth * y + x; - while (cy--) { - for (uint16 i = 0; i < cx; ++i) { - p[i] = 2; - } + for (; y <= ey; ++y) { + memset(p, 2, ex - x + 1); p += _dirtyBlocksWidth; } } |