aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2015-12-23 22:04:38 +0200
committerWillem Jan Palenstijn2015-12-23 21:43:17 +0100
commit60f7849c20c07fc9507d89354abb0df3ddfdb62e (patch)
tree2406d54c50382ce844e1d6756352222ac4b86b6c
parentc66d5eca3a9d8ed7254d07435b74acf7ebf7d2d1 (diff)
downloadscummvm-rg350-60f7849c20c07fc9507d89354abb0df3ddfdb62e.tar.gz
scummvm-rg350-60f7849c20c07fc9507d89354abb0df3ddfdb62e.tar.bz2
scummvm-rg350-60f7849c20c07fc9507d89354abb0df3ddfdb62e.zip
LAB: Improve the palette assignment in writeColorRegs()
Thanks to LordHoto
-rw-r--r--engines/lab/dispman.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp
index e0661b7446..de2bcc42bf 100644
--- a/engines/lab/dispman.cpp
+++ b/engines/lab/dispman.cpp
@@ -486,7 +486,7 @@ void DisplayMan::writeColorRegs(byte *buf, uint16 first, uint16 numReg) {
byte tmp[256 * 3];
for (int i = 0; i < 256 * 3; i++)
- tmp[i] = buf[i] * 4;
+ tmp[i] = (buf[i] << 2) | (buf[i] >> 4); // better results than buf[i] * 4
_vm->_system->getPaletteManager()->setPalette(tmp, first, numReg);
memcpy(&(_curvgapal[first * 3]), buf, numReg * 3);