diff options
author | Filippos Karapetis | 2013-01-13 17:28:09 +0200 |
---|---|---|
committer | Filippos Karapetis | 2013-01-13 17:28:09 +0200 |
commit | 31aec8c581043f4a94eb8dfb1e1554c8300ab3b5 (patch) | |
tree | 680693a79f06ccaad8a8403531ea9db850e56375 /engines | |
parent | bbec4acff5ab800445095d826f7a391f46aaf6a8 (diff) | |
download | scummvm-rg350-31aec8c581043f4a94eb8dfb1e1554c8300ab3b5.tar.gz scummvm-rg350-31aec8c581043f4a94eb8dfb1e1554c8300ab3b5.tar.bz2 scummvm-rg350-31aec8c581043f4a94eb8dfb1e1554c8300ab3b5.zip |
SCI: Some more work on scaling in SCI32
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/graphics/animate.h | 1 | ||||
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 9 | ||||
-rw-r--r-- | engines/sci/graphics/frameout.h | 7 |
3 files changed, 12 insertions, 5 deletions
diff --git a/engines/sci/graphics/animate.h b/engines/sci/graphics/animate.h index 5e2e39ea1a..52da7d6ec6 100644 --- a/engines/sci/graphics/animate.h +++ b/engines/sci/graphics/animate.h @@ -51,7 +51,6 @@ enum ViewScaleSignals { kScaleSignalDoScaling = 0x0001, // enables scaling when drawing that cel (involves scaleX and scaleY) kScaleSignalGlobalScaling = 0x0002, // means that global scaling shall get applied on that cel (sets scaleX/scaleY) kScaleSignalHoyle4SpecialHandling = 0x0004 // HOYLE4-exclusive: special handling inside kAnimate, is used when giving out cards - }; struct AnimateEntry { diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 220a7ed712..e251bd3dc0 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -421,7 +421,8 @@ void GfxFrameout::kernelUpdateScreenItem(reg_t object) { itemEntry->signal = readSelectorValue(_segMan, object, SELECTOR(signal)); itemEntry->scaleSignal = readSelectorValue(_segMan, object, SELECTOR(scaleSignal)); - if (itemEntry->scaleSignal == 1) { + + if (itemEntry->scaleSignal & kScaleSignalDoScaling32) { itemEntry->scaleX = readSelectorValue(_segMan, object, SELECTOR(scaleX)); itemEntry->scaleY = readSelectorValue(_segMan, object, SELECTOR(scaleY)); } else { @@ -743,10 +744,10 @@ void GfxFrameout::kernelFrameout() { } else if (view) { // Process global scaling, if needed. // TODO: Seems like SCI32 always processes global scaling for scaled objects - if (itemEntry->scaleSignal != 0 && itemEntry->scaleSignal != 1) - error("Unknown scale signal: %d", itemEntry->scaleSignal); // TODO: We can only process symmetrical scaling for now (i.e. same value for scaleX/scaleY) - if (itemEntry->scaleSignal == 1 && itemEntry->scaleX == itemEntry->scaleY) + if ((itemEntry->scaleSignal & kScaleSignalDoScaling32) && + !(itemEntry->scaleSignal & kScaleSignalDisableGlobalScaling32) && + (itemEntry->scaleX == itemEntry->scaleY)) applyGlobalScaling(itemEntry, it->planeRect, view->getHeight(itemEntry->loopNo, itemEntry->celNo)); if ((itemEntry->scaleX == 128) && (itemEntry->scaleY == 128)) diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index 5dadca674d..5ef770486f 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -97,11 +97,18 @@ struct ScrollTextEntry { typedef Common::Array<ScrollTextEntry> ScrollTextList; +enum ViewScaleSignals32 { + kScaleSignalDoScaling32 = 0x0001, // enables scaling when drawing that cel (involves scaleX and scaleY) + kScaleSignalUnk1 = 0x0002, // unknown + kScaleSignalDisableGlobalScaling32 = 0x0004 +}; + class GfxCache; class GfxCoordAdjuster32; class GfxPaint32; class GfxPalette; class GfxScreen; + /** * Frameout class, kFrameout and relevant functions for SCI32 games */ |