diff options
author | Strangerke | 2012-12-22 01:28:31 +0100 |
---|---|---|
committer | Strangerke | 2012-12-22 01:28:31 +0100 |
commit | e44df7732925e42d52e5567185a16839e9ba2cfb (patch) | |
tree | 3300bf5a594c48121df16dcaa044da2ac966a559 /engines/hopkins/graphics.cpp | |
parent | fcbcca45b1a3f5abd1961a2e68b41cd2d78c899c (diff) | |
download | scummvm-rg350-e44df7732925e42d52e5567185a16839e9ba2cfb.tar.gz scummvm-rg350-e44df7732925e42d52e5567185a16839e9ba2cfb.tar.bz2 scummvm-rg350-e44df7732925e42d52e5567185a16839e9ba2cfb.zip |
HOPKINS: Remove useless IF statements
Diffstat (limited to 'engines/hopkins/graphics.cpp')
-rw-r--r-- | engines/hopkins/graphics.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 793d2fe96c..8ed4c03bc6 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -662,19 +662,17 @@ void GraphicsManager::fade_out(const byte *palette, int step, const byte *surfac m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); DD_VBL(); - if (palMax > 0) { - for (int palCtr3 = 0; palCtr3 < palMax; palCtr3++) { - for (int palCtr4 = 0; palCtr4 < PALETTE_BLOCK_SIZE; palCtr4++) { - int palCtr5 = palCtr4; - int palValue = tempPalette[palCtr4] - (palette[palCtr4] << 8) / palMax; - tempPalette[palCtr5] = palValue; - palData[palCtr5] = (palValue >> 8) & 0xff; - } - - setpal_vga256(palData); - m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); - DD_VBL(); + for (int palCtr3 = 0; palCtr3 < palMax; palCtr3++) { + for (int palCtr4 = 0; palCtr4 < PALETTE_BLOCK_SIZE; palCtr4++) { + int palCtr5 = palCtr4; + int palValue = tempPalette[palCtr4] - (palette[palCtr4] << 8) / palMax; + tempPalette[palCtr5] = palValue; + palData[palCtr5] = (palValue >> 8) & 0xff; } + + setpal_vga256(palData); + m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); + DD_VBL(); } for (int i = 0; i < PALETTE_BLOCK_SIZE; i++) |