diff options
Diffstat (limited to 'engines/sci/engine/features.h')
-rw-r--r-- | engines/sci/engine/features.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h index 1c410267e6..36b0d06360 100644 --- a/engines/sci/engine/features.h +++ b/engines/sci/engine/features.h @@ -34,6 +34,12 @@ enum MoveCountType { kIncrementMoveCount }; +enum PseudoMouseAbilityType { + kPseudoMouseAbilityUninitialized, + kPseudoMouseAbilityFalse, + kPseudoMouseAbilityTrue +}; + class GameFeatures { public: GameFeatures(SegManager *segMan, Kernel *kernel); @@ -76,6 +82,52 @@ 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; + } + + inline bool VMDOpenStopsAudio() const { + // Of the games that use VMDs: + // Yes: Phant1, Shivers, Torin + // No: SQ6 + // TODO: Optional extra flag to kPlayVMD which defaults to Yes: PQ:SWAT + // TODO: SCI3, GK2 (GK2's VMD code is closer to SCI3 than SCI21) + return getSciVersion() == SCI_VERSION_2_1_MIDDLE && + g_sci->getGameId() != GID_SQ6 && + g_sci->getGameId() != GID_GK2; + } #endif /** @@ -110,6 +162,12 @@ public: */ void forceDOSTracks() { _forceDOSTracks = true; } + /** + * Autodetects, if Pseudo Mouse ability is enabled (different behavior in keyboard driver) + * @return kPseudoMouseAbilityTrue or kPseudoMouseAbilityFalse + */ + PseudoMouseAbilityType detectPseudoMouseAbility(); + private: reg_t getDetectionAddr(const Common::String &objName, Selector slc, int methodNum = -1); @@ -130,6 +188,8 @@ private: bool _usesCdTrack; bool _forceDOSTracks; + PseudoMouseAbilityType _pseudoMouseAbility; + SegManager *_segMan; Kernel *_kernel; }; |