aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/features.h35
-rw-r--r--engines/sci/engine/kgraphics32.cpp4
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 {