aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/celobj32.h
diff options
context:
space:
mode:
authorColin Snover2016-09-24 13:52:49 -0500
committerColin Snover2016-09-29 19:39:16 -0500
commit9a64c0587bbbb68d80130149ec03a9c592bc5e2a (patch)
treeafeab3fbf36d9186b43101722066f66db8e8df89 /engines/sci/graphics/celobj32.h
parent2a27f27bb4f4ad979559e77d547cd6c8c2504f11 (diff)
downloadscummvm-rg350-9a64c0587bbbb68d80130149ec03a9c592bc5e2a.tar.gz
scummvm-rg350-9a64c0587bbbb68d80130149ec03a9c592bc5e2a.tar.bz2
scummvm-rg350-9a64c0587bbbb68d80130149ec03a9c592bc5e2a.zip
SCI32: Always build scaler tables to the maximum possible size
This fixes rendering errors in Torin caused by the scaler table being cut off early when cels larger than the dimensions of the screen are scaled.
Diffstat (limited to 'engines/sci/graphics/celobj32.h')
-rw-r--r--engines/sci/graphics/celobj32.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/sci/graphics/celobj32.h b/engines/sci/graphics/celobj32.h
index 21e86d03e0..c30529fde5 100644
--- a/engines/sci/graphics/celobj32.h
+++ b/engines/sci/graphics/celobj32.h
@@ -141,13 +141,20 @@ typedef Common::Array<CelCacheEntry> CelCache;
#pragma mark -
#pragma mark CelScaler
+enum {
+ /**
+ * The maximum size of a row/column of scaled pixel data.
+ */
+ kCelScalerTableSize = 4096
+};
+
struct CelScalerTable {
/**
* A lookup table of indexes that should be used to find
* the correct column to read from the source bitmap
* when drawing a scaled version of the source bitmap.
*/
- int valuesX[4096];
+ int valuesX[kCelScalerTableSize];
/**
* The ratio used to generate the x-values.
@@ -159,7 +166,7 @@ struct CelScalerTable {
* the correct row to read from a source bitmap when
* drawing a scaled version of the source bitmap.
*/
- int valuesY[4096];
+ int valuesY[kCelScalerTableSize];
/**
* The ratio used to generate the y-values.