diff options
author | Martin Kiewitz | 2010-06-23 13:42:09 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-06-23 13:42:09 +0000 |
commit | eeba2812c1a950380ea3ea8766704ced11afaffd (patch) | |
tree | 29838d32c9e135cb120eaeada2fc0e2692c4ff65 /engines | |
parent | 3bc011357bba0104de2e7f910cde6a7d62d7581f (diff) | |
download | scummvm-rg350-eeba2812c1a950380ea3ea8766704ced11afaffd.tar.gz scummvm-rg350-eeba2812c1a950380ea3ea8766704ced11afaffd.tar.bz2 scummvm-rg350-eeba2812c1a950380ea3ea8766704ced11afaffd.zip |
SCI: adding some more global scaling code, adding vanishingY and vanishingX as selectors
svn-id: r50180
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/selector.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/static_selectors.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/vm.h | 2 | ||||
-rw-r--r-- | engines/sci/graphics/animate.cpp | 4 |
4 files changed, 10 insertions, 0 deletions
diff --git a/engines/sci/engine/selector.cpp b/engines/sci/engine/selector.cpp index cc2adeb62b..65024742c7 100644 --- a/engines/sci/engine/selector.cpp +++ b/engines/sci/engine/selector.cpp @@ -158,6 +158,8 @@ void Kernel::mapSelectors() { FIND_SELECTOR(scaleX); FIND_SELECTOR(scaleY); FIND_SELECTOR(maxScale); + FIND_SELECTOR(vanishingX); + FIND_SELECTOR(vanishingY); FIND_SELECTOR(iconIndex); #ifdef ENABLE_SCI32 diff --git a/engines/sci/engine/static_selectors.cpp b/engines/sci/engine/static_selectors.cpp index c7ee7b854a..6f44788fd7 100644 --- a/engines/sci/engine/static_selectors.cpp +++ b/engines/sci/engine/static_selectors.cpp @@ -108,6 +108,8 @@ static const SelectorRemap sciSelectorRemap[] = { { SCI_VERSION_1_1, SCI_VERSION_1_1, "scaleX", 104 }, { SCI_VERSION_1_1, SCI_VERSION_1_1, "scaleY", 105 }, { SCI_VERSION_1_1, SCI_VERSION_1_1, "maxScale", 106 }, + { SCI_VERSION_1_1, SCI_VERSION_1_1, "vanishingX", 107 }, + { SCI_VERSION_1_1, SCI_VERSION_1_1, "vanishingY", 108 }, { SCI_VERSION_NONE, SCI_VERSION_NONE, 0, 0 } }; diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index d4be76dd40..9de7cc587c 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -155,6 +155,8 @@ struct SelectorCache { Selector scaleSignal; //< Used by kAnimate() for cel scaling (SCI1.1+) Selector scaleX, scaleY; ///< SCI1.1 view scaling Selector maxScale; ///< SCI1.1 view scaling, limit for cel, when using global scaling + Selector vanishingX; ///< SCI1.1 view scaling, used by global scaling + Selector vanishingY; ///< SCI1.1 view scaling, used by global scaling // Used for auto detection purposes Selector overlay; ///< Used to determine if a game is using old gfx functions or not diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index 57879b6653..f96a1646ef 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -233,9 +233,13 @@ void GfxAnimate::fill(byte &old_picNotValid) { // Process global scaling, if needed if (listEntry->scaleSignal & kScaleSignalDoScaling) { if (listEntry->scaleSignal & kScaleSignalGlobalScaling) { + warning("%lx:%lx", PRINT_REG(curObject)); // Global scaling uses global var 2 and some other stuff to calculate scaleX/scaleY int16 maxScale = readSelectorValue(_s->_segMan, curObject, SELECTOR(maxScale)); int16 maxCelHeight = (maxScale * view->getHeight(listEntry->loopNo, listEntry->celNo)) >> 7; + reg_t globalVar2 = _s->variables[VAR_GLOBAL][1]; // current room + int16 vanishingY = readSelectorValue(_s->_segMan, globalVar2, SELECTOR(vanishingY)); + //warning("vanishingY %d maxScale %d", vanishingY, maxScale); // TODO! // and set objects scale selectors |