aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorColin Snover2016-03-15 14:29:35 -0500
committerColin Snover2016-03-15 14:30:57 -0500
commitbd81da1a6a7604805c927073f086767c5baf2bac (patch)
tree092cc265d77388b93eba4e3358aebd1573ff2cb2 /engines
parentbe58e5bc308c7364d971039d54e357b1ee3ed4ea (diff)
downloadscummvm-rg350-bd81da1a6a7604805c927073f086767c5baf2bac.tar.gz
scummvm-rg350-bd81da1a6a7604805c927073f086767c5baf2bac.tar.bz2
scummvm-rg350-bd81da1a6a7604805c927073f086767c5baf2bac.zip
SCI32: Initialise all scaler tables
Initialising only the first table means that if the first ratios aren't 1:1 but the *second* ratios are 1:1, the second ratios will read from an uninitialised table.
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/graphics/celobj32.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/sci/graphics/celobj32.h b/engines/sci/graphics/celobj32.h
index 8d030cfd4a..14d9fa3d87 100644
--- a/engines/sci/graphics/celobj32.h
+++ b/engines/sci/graphics/celobj32.h
@@ -180,13 +180,16 @@ public:
CelScaler() :
_scaleTables(),
_activeIndex(0) {
- CelScalerTable &table = _scaleTables[_activeIndex];
+ CelScalerTable &table = _scaleTables[0];
table.scaleX = Ratio();
table.scaleY = Ratio();
for (int i = 0; i < ARRAYSIZE(table.valuesX); ++i) {
table.valuesX[i] = i;
table.valuesY[i] = i;
}
+ for (int i = 1; i < ARRAYSIZE(_scaleTables); ++i) {
+ _scaleTables[i] = _scaleTables[0];
+ }
}
/**