diff options
author | Colin Snover | 2016-10-19 12:57:08 -0500 |
---|---|---|
committer | Colin Snover | 2016-10-20 11:33:29 -0500 |
commit | 34bd1bcaa9246d6599819ff3ed1ab4c35812136d (patch) | |
tree | 9543804205b0bce0fdb4bfb4b0e1fbfe807ec79e /engines/sci/engine | |
parent | 55222ec06c030a03d288b7ad476c5dbf1444a48b (diff) | |
download | scummvm-rg350-34bd1bcaa9246d6599819ff3ed1ab4c35812136d.tar.gz scummvm-rg350-34bd1bcaa9246d6599819ff3ed1ab4c35812136d.tar.bz2 scummvm-rg350-34bd1bcaa9246d6599819ff3ed1ab4c35812136d.zip |
SCI32: Split out detection of features that cross SSCI versions
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/features.h | 35 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics32.cpp | 4 |
2 files changed, 36 insertions, 3 deletions
diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h index b2d40f400f..15c80a7277 100644 --- a/engines/sci/engine/features.h +++ b/engines/sci/engine/features.h @@ -82,6 +82,41 @@ public: * @return Graphics functions type, SCI_VERSION_2 / SCI_VERSION_2_1 */ SciVersion detectSci21KernelType(); + + inline bool usesModifiedAudioAttenuation() const { + switch (g_sci->getGameId()) { + // Assuming MGDX uses modified attenuation since SQ6 does and it was + // released earlier, but not verified (Phar Lap Windows-only release) + case GID_MOTHERGOOSEHIRES: + case GID_PQ4: + case GID_SQ6: + return true; + case GID_KQ7: + case GID_QFG4: + // (1) KQ7 1.51 (SCI2.1early) uses the non-standard attenuation, but + // 2.00b (SCI2.1mid) does not + // (2) QFG4 CD is SCI2.1early; QFG4 floppy is SCI2 and does not use + // the SCI2.1 audio system + return getSciVersion() == SCI_VERSION_2_1_EARLY; + default: + return false; + } + } + + inline bool hasTransparentPicturePlanes() const { + const SciGameId &gid = g_sci->getGameId(); + + // NOTE: MGDX is assumed to not have transparent picture planes since it + // was released before SQ6, but this has not been verified since it + // cannot be disassembled at the moment (Phar Lap Windows-only release) + return getSciVersion() >= SCI_VERSION_2_1_MIDDLE && + gid != GID_SQ6 && + gid != GID_MOTHERGOOSEHIRES; + } + + inline bool hasNewPaletteCode() const { + return getSciVersion() >= SCI_VERSION_2_1_MIDDLE || g_sci->getGameId() == GID_KQ7; + } #endif /** diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 039373c387..d4377417a8 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -972,9 +972,7 @@ reg_t kPalVarySetVary(EngineState *s, int argc, reg_t *argv) { int16 fromColor; int16 toColor; - if ((getSciVersion() >= SCI_VERSION_2_1_MIDDLE || g_sci->getGameId() == GID_KQ7) - && argc > 4) { - + if (g_sci->_features->hasNewPaletteCode() && argc > 4) { fromColor = argv[3].toSint16(); toColor = argv[4].toSint16(); } else { |