aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/screen.cpp
diff options
context:
space:
mode:
authorStrangerke2015-05-18 23:23:37 +0200
committerStrangerke2015-05-18 23:23:37 +0200
commit0aebac9174f935e535b8e133efde43bd94be5b27 (patch)
tree6c22cb2a4741af814b1014d8a213f1a30555b53c /engines/sherlock/screen.cpp
parentc4513607473ed6889445b08ea4f77165df126854 (diff)
downloadscummvm-rg350-0aebac9174f935e535b8e133efde43bd94be5b27.tar.gz
scummvm-rg350-0aebac9174f935e535b8e133efde43bd94be5b27.tar.bz2
scummvm-rg350-0aebac9174f935e535b8e133efde43bd94be5b27.zip
SHERLOCK: Fix some issues pointed by LordHoto
Diffstat (limited to 'engines/sherlock/screen.cpp')
-rw-r--r--engines/sherlock/screen.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp
index e98d9a51a9..d9ec1d745d 100644
--- a/engines/sherlock/screen.cpp
+++ b/engines/sherlock/screen.cpp
@@ -116,8 +116,7 @@ int Screen::equalizePalette(const byte palette[PALETTE_SIZE]) {
// For any palette component that doesn't already match the given destination
// palette, change by 1 towards the reference palette component
for (int idx = 0; idx < PALETTE_SIZE; ++idx) {
- if (tempPalette[idx] > palette[idx])
- {
+ if (tempPalette[idx] > palette[idx]) {
tempPalette[idx] = MAX((int)palette[idx], (int)tempPalette[idx] - 4);
++total;
} else if (tempPalette[idx] < palette[idx]) {
@@ -216,7 +215,7 @@ void Screen::randomTransition() {
for (int idx = 0; idx <= 65535 && !_vm->shouldQuit(); ++idx) {
_transitionSeed = _transitionSeed * TRANSITION_MULTIPLIER + 1;
- int offset = _transitionSeed & 65535;
+ int offset = _transitionSeed & 0xFFFF;
if (offset < (SHERLOCK_SCREEN_WIDTH * SHERLOCK_SCREEN_HEIGHT))
*((byte *)getPixels() + offset) = *((const byte *)_backBuffer->getPixels() + offset);