aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlolbot-iichan2019-05-09 00:38:48 +0300
committerFilippos Karapetis2020-01-11 18:05:39 +0200
commit665136bb088f1b25c1e7c37c854f6742a0575611 (patch)
tree491d870a9ace9ea7c17c45121d03a60e8a099e21
parenta2f25f301e09a4b639e9bc978ce9377deda3d360 (diff)
downloadscummvm-rg350-665136bb088f1b25c1e7c37c854f6742a0575611.tar.gz
scummvm-rg350-665136bb088f1b25c1e7c37c854f6742a0575611.tar.bz2
scummvm-rg350-665136bb088f1b25c1e7c37c854f6742a0575611.zip
WINTERMUTE: Add FoxTail engine versions to WMETargetExecutable enum
FoxTail engine is a WME Light engine fork with closed sources. Some features have different behaviour in different versions of FoxTail engine. That's why we need to detect engine version. Note that FOXTAIL_OLDEST_VERSION > LATEST_VERSION. Most features are just new methods for Game, Actor, Array, etc. and are not guarded. Some hacks are common for all FoxTail versions, and are guarded with isFoxTail(). Some changes are specific to versions from v1 to v2, isFoxTail(v1,v2) is checked then.
-rw-r--r--engines/wintermute/base/base_engine.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/wintermute/base/base_engine.h b/engines/wintermute/base/base_engine.h
index a8770f6168..14a14a3c19 100644
--- a/engines/wintermute/base/base_engine.h
+++ b/engines/wintermute/base/base_engine.h
@@ -84,7 +84,14 @@ enum WMETargetExecutable {
WME_1_9_2, // DEAD:CODE 2010
WME_1_9_3, // DEAD:CODE 2012, released as "1.10.1 beta"
WME_LITE,
- LATEST_VERSION
+ LATEST_VERSION,
+ FOXTAIL_OLDEST_VERSION,
+ FOXTAIL_1_2_227,
+ FOXTAIL_1_2_230,
+ FOXTAIL_1_2_304,
+ FOXTAIL_1_2_362,
+ FOXTAIL_1_2_527,
+ FOXTAIL_LATEST_VERSION
};
class BaseFileManager;
@@ -129,6 +136,12 @@ public:
WMETargetExecutable getTargetExecutable() const {
return _targetExecutable;
}
+ static bool isFoxTailCheck(WMETargetExecutable t, WMETargetExecutable v1=FOXTAIL_OLDEST_VERSION, WMETargetExecutable v2=FOXTAIL_LATEST_VERSION) {
+ return t >= v1 && t <= v2;
+ }
+ bool isFoxTail(WMETargetExecutable v1=FOXTAIL_OLDEST_VERSION, WMETargetExecutable v2=FOXTAIL_LATEST_VERSION) const {
+ return isFoxTailCheck(_targetExecutable, v1, v2);
+ }
};
} // End of namespace Wintermute