aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he/script_v72he.cpp
diff options
context:
space:
mode:
authorTravis Howell2009-06-05 01:20:39 +0000
committerTravis Howell2009-06-05 01:20:39 +0000
commite90364c890dcea2ca824941495365ed915146d41 (patch)
treed7804c00555bfe16c75f4bbd3fe128cfcedd9985 /engines/scumm/he/script_v72he.cpp
parent9911c1bf59048d9661b720f3de6f33176b5ef1e2 (diff)
downloadscummvm-rg350-e90364c890dcea2ca824941495365ed915146d41.tar.gz
scummvm-rg350-e90364c890dcea2ca824941495365ed915146d41.tar.bz2
scummvm-rg350-e90364c890dcea2ca824941495365ed915146d41.zip
Update o72_getPixel() for 16bit color, and cleanup.
svn-id: r41187
Diffstat (limited to 'engines/scumm/he/script_v72he.cpp')
-rw-r--r--engines/scumm/he/script_v72he.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index bb209e78d1..049fb13cd2 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -1572,7 +1572,7 @@ void ScummEngine_v72he::o72_rename() {
}
void ScummEngine_v72he::o72_getPixel() {
- byte area;
+ uint16 area;
int y = pop();
int x = pop();
@@ -1587,11 +1587,17 @@ void ScummEngine_v72he::o72_getPixel() {
switch (subOp) {
case 9: // HE 100
case 218:
- area = *vs->getBackPixels(x, y - vs->topline);
+ if (_game.features & GF_16BIT_COLOR)
+ area = READ_UINT16(vs->getBackPixels(x, y - vs->topline));
+ else
+ area = *vs->getBackPixels(x, y - vs->topline);
break;
case 8: // HE 100
case 219:
- area = *vs->getPixels(x, y - vs->topline);
+ if (_game.features & GF_16BIT_COLOR)
+ area = READ_UINT16(vs->getPixels(x, y - vs->topline));
+ else
+ area = *vs->getPixels(x, y - vs->topline);
break;
default:
error("o72_getPixel: default case %d", subOp);