aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/celobj32.cpp
diff options
context:
space:
mode:
authorColin Snover2016-09-23 21:40:03 -0500
committerColin Snover2016-09-29 19:39:16 -0500
commitcb66bfead0bbd0ff2ba3eebc8202f1bedc7777b3 (patch)
tree64836d0663656fccd49540f5b4e20411662dad41 /engines/sci/graphics/celobj32.cpp
parent2c61569c62b450aa9aba904680d1de4183b5539b (diff)
downloadscummvm-rg350-cb66bfead0bbd0ff2ba3eebc8202f1bedc7777b3.tar.gz
scummvm-rg350-cb66bfead0bbd0ff2ba3eebc8202f1bedc7777b3.tar.bz2
scummvm-rg350-cb66bfead0bbd0ff2ba3eebc8202f1bedc7777b3.zip
SCI32: Fix CelObj scaling in games with hi-res scripts
Diffstat (limited to 'engines/sci/graphics/celobj32.cpp')
-rw-r--r--engines/sci/graphics/celobj32.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/sci/graphics/celobj32.cpp b/engines/sci/graphics/celobj32.cpp
index 9019517aa5..27d20de637 100644
--- a/engines/sci/graphics/celobj32.cpp
+++ b/engines/sci/graphics/celobj32.cpp
@@ -221,17 +221,17 @@ struct SCALER_Scale {
} else {
if (FLIP) {
const int lastIndex = celObj._width - 1;
- for (int16 x = 0; x < targetRect.width(); ++x) {
- _valuesX[targetRect.left + x] = lastIndex - table->valuesX[x];
+ for (int16 x = targetRect.left; x < targetRect.right; ++x) {
+ _valuesX[x] = lastIndex - table->valuesX[x - scaledPosition.x];
}
} else {
- for (int16 x = 0; x < targetRect.width(); ++x) {
- _valuesX[targetRect.left + x] = table->valuesX[x];
+ for (int16 x = targetRect.left; x < targetRect.right; ++x) {
+ _valuesX[x] = table->valuesX[x - scaledPosition.x];
}
}
- for (int16 y = 0; y < targetRect.height(); ++y) {
- _valuesY[targetRect.top + y] = table->valuesY[y];
+ for (int16 y = targetRect.top; y < targetRect.bottom; ++y) {
+ _valuesY[y] = table->valuesY[y - scaledPosition.y];
}
}
}