aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMarisa-Chan2014-10-23 17:13:56 +0700
committerMarisa-Chan2014-10-23 17:13:56 +0700
commit8b18ba64ae544e762ca29449e7be29f6a430201e (patch)
tree1e15f1799e95ddbeb1d8d963f2e566181b2d5921 /engines
parent19b2e9123db86193ad297bf867f7768dfdb389e9 (diff)
downloadscummvm-rg350-8b18ba64ae544e762ca29449e7be29f6a430201e.tar.gz
scummvm-rg350-8b18ba64ae544e762ca29449e7be29f6a430201e.tar.bz2
scummvm-rg350-8b18ba64ae544e762ca29449e7be29f6a430201e.zip
ZVISION: Add support for doubleFPS feature
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/detection.cpp8
-rw-r--r--engines/zvision/zvision.cpp3
-rw-r--r--engines/zvision/zvision.h1
3 files changed, 12 insertions, 0 deletions
diff --git a/engines/zvision/detection.cpp b/engines/zvision/detection.cpp
index 5ad2e7d977..1492ade639 100644
--- a/engines/zvision/detection.cpp
+++ b/engines/zvision/detection.cpp
@@ -106,6 +106,13 @@ static const ExtraGuiOption ZVisionExtraGuiOption = {
false
};
+static const ExtraGuiOption ZVisionExtraGuiOption2 = {
+ _s("Double FPS"),
+ _s("Halve the update delay"),
+ "doublefps",
+ false
+};
+
class ZVisionMetaEngine : public AdvancedMetaEngine {
public:
ZVisionMetaEngine() : AdvancedMetaEngine(ZVision::gameDescriptions, sizeof(ZVision::ZVisionGameDescription), zVisionGames) {
@@ -162,6 +169,7 @@ bool ZVisionMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADG
const ExtraGuiOptions ZVisionMetaEngine::getExtraGuiOptions(const Common::String &target) const {
ExtraGuiOptions options;
options.push_back(ZVisionExtraGuiOption);
+ options.push_back(ZVisionExtraGuiOption2);
return options;
}
diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp
index a78d68dc8c..0bc5fef39a 100644
--- a/engines/zvision/zvision.cpp
+++ b/engines/zvision/zvision.cpp
@@ -173,6 +173,7 @@ void ZVision::initialize() {
// Create debugger console. It requires GFX to be initialized
_console = new Console(this);
+ _halveDelay = ConfMan.getBool("doublefps");
}
Common::Error ZVision::run() {
@@ -210,6 +211,8 @@ Common::Error ZVision::run() {
int delay = _desiredFrameTime - int32(_system->getMillis() - currentTime);
// Ensure non-negative
delay = delay < 0 ? 0 : delay;
+ if (_halveDelay)
+ delay >>= 1;
_system->delayMillis(delay);
}
diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h
index cbd10da0d5..8a305f5d37 100644
--- a/engines/zvision/zvision.h
+++ b/engines/zvision/zvision.h
@@ -121,6 +121,7 @@ private:
int _rendDelay;
int16 _velocity;
+ bool _halveDelay;
public:
uint32 getFeatures() const;
Common::Language getLanguage() const;