aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner
diff options
context:
space:
mode:
Diffstat (limited to 'engines/bladerunner')
-rw-r--r--engines/bladerunner/bladerunner.cpp51
-rw-r--r--engines/bladerunner/bladerunner.h1
-rw-r--r--engines/bladerunner/detection.cpp9
-rw-r--r--engines/bladerunner/detection_tables.h31
4 files changed, 53 insertions, 39 deletions
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp
index ed7846f29b..21ebebcd0b 100644
--- a/engines/bladerunner/bladerunner.cpp
+++ b/engines/bladerunner/bladerunner.cpp
@@ -83,6 +83,7 @@
#include "common/events.h"
#include "common/savefile.h"
#include "common/system.h"
+#include "common/debug.h"
#include "common/debug-channels.h"
#include "common/translation.h"
#include "gui/message.h"
@@ -111,10 +112,11 @@ BladeRunnerEngine::BladeRunnerEngine(OSystem *syst, const ADGameDescription *des
_subtitlesEnabled = false;
- _sitcomMode = false;
- _shortyMode = false;
- _noDelayMillisFramelimiter = false;
- _cutContent = Common::String(desc->gameId).contains("bladerunner-final");
+ _sitcomMode = false;
+ _shortyMode = false;
+ _noDelayMillisFramelimiter = false;
+ _framesPerSecondMax = false;
+ _cutContent = Common::String(desc->gameId).contains("bladerunner-final");
_playerLosesControlCounter = 0;
@@ -464,8 +466,24 @@ bool BladeRunnerEngine::checkFiles(Common::Array<Common::String> &missingFiles)
}
bool BladeRunnerEngine::startup(bool hasSavegames) {
- // These are static objects in original game
+ // Assign default values to the ScummVM configuration manager, in case settings are missing
+ ConfMan.registerDefault("subtitles", "true");
+ ConfMan.registerDefault("sfx_volume", 192);
+ ConfMan.registerDefault("music_volume", 192);
+ ConfMan.registerDefault("speech_volume", 192);
+ ConfMan.registerDefault("mute", "false");
+ ConfMan.registerDefault("speech_mute", "false");
+ ConfMan.registerDefault("sitcom", "false");
+ ConfMan.registerDefault("shorty", "false");
+ ConfMan.registerDefault("nodelaymillisfl", "false");
+ ConfMan.registerDefault("frames_per_secondfl", "false");
+ _sitcomMode = ConfMan.getBool("sitcom");
+ _shortyMode = ConfMan.getBool("shorty");
+ _noDelayMillisFramelimiter = ConfMan.getBool("nodelaymillisfl");
+ _framesPerSecondMax = ConfMan.getBool("frames_per_secondfl");
+
+ // These are static objects in original game
_screenEffects = new ScreenEffects(this, 0x8000);
_endCredits = new EndCredits(this);
@@ -493,7 +511,8 @@ bool BladeRunnerEngine::startup(bool hasSavegames) {
_time = new Time(this);
- _framelimiter = new Framelimiter(this);
+ debug("_framesPerSecondMax:: %s", _framesPerSecondMax? "true" : "false");
+ _framelimiter = new Framelimiter(this, _framesPerSecondMax? 120 : 60);
// Try to load the SUBTITLES.MIX first, before Startup.MIX
// allows overriding any identically named resources (such as the original font files and as a bonus also the TRE files for the UI and dialogue menu)
@@ -559,25 +578,9 @@ bool BladeRunnerEngine::startup(bool hasSavegames) {
_ambientSounds = new AmbientSounds(this);
- // Assign default values to the ScummVM configuration manager, in case settings are missing
- ConfMan.registerDefault("subtitles", "true");
- ConfMan.registerDefault("sfx_volume", 192);
- ConfMan.registerDefault("music_volume", 192);
- ConfMan.registerDefault("speech_volume", 192);
- ConfMan.registerDefault("mute", "false");
- ConfMan.registerDefault("speech_mute", "false");
-
- // get value from the ScummVM configuration manager
- syncSoundSettings();
-
- _sitcomMode = ConfMan.getBool("sitcom");
- _shortyMode = ConfMan.getBool("shorty");
-
- if (!ConfMan.hasKey("nodelaymillisfl")) {
- ConfMan.setBool("nodelaymillisfl", false);
- }
- _noDelayMillisFramelimiter = ConfMan.getBool("nodelaymillisfl");
// BLADE.INI was read here, but it was replaced by ScummVM configuration
+ //
+ syncSoundSettings();
_chapters = new Chapters(this);
if (!_chapters)
diff --git a/engines/bladerunner/bladerunner.h b/engines/bladerunner/bladerunner.h
index 3bc6404250..c033e16960 100644
--- a/engines/bladerunner/bladerunner.h
+++ b/engines/bladerunner/bladerunner.h
@@ -215,6 +215,7 @@ public:
bool _sitcomMode;
bool _shortyMode;
bool _noDelayMillisFramelimiter;
+ bool _framesPerSecondMax;
bool _cutContent;
int _walkSoundId;
diff --git a/engines/bladerunner/detection.cpp b/engines/bladerunner/detection.cpp
index 4576ae65d8..210774bbbf 100644
--- a/engines/bladerunner/detection.cpp
+++ b/engines/bladerunner/detection.cpp
@@ -69,6 +69,15 @@ static const ADExtraGuiOptionsMap optionsList[] = {
false
}
},
+ {
+ GAMEOPTION_FRAMELIMITER_FPS,
+ {
+ _s("Max frames per second limit"),
+ _s("This mode targets a maximum of 120 fps. When disabled, the game targets 60 fps"),
+ "frames_per_secondfl",
+ false
+ }
+ },
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
diff --git a/engines/bladerunner/detection_tables.h b/engines/bladerunner/detection_tables.h
index af6cfe93e6..bc504bd235 100644
--- a/engines/bladerunner/detection_tables.h
+++ b/engines/bladerunner/detection_tables.h
@@ -28,6 +28,7 @@
#define GAMEOPTION_SITCOM GUIO_GAMEOPTIONS1
#define GAMEOPTION_SHORTY GUIO_GAMEOPTIONS2
#define GAMEOPTION_FRAMELIMITER_NODELAYMILLIS GUIO_GAMEOPTIONS3
+#define GAMEOPTION_FRAMELIMITER_FPS GUIO_GAMEOPTIONS4
namespace BladeRunner {
@@ -40,7 +41,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// BladeRunner (German)
@@ -51,7 +52,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::DE_DEU,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// BladeRunner (French) - Bug #9722
@@ -62,7 +63,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::FR_FRA,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// BladeRunner (Italian)
@@ -73,7 +74,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::IT_ITA,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// BladeRunner (Russian - Fargus Multimedia + Home Systems, Inc.)
@@ -84,7 +85,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::RU_RUS,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// BladeRunner (Russian - Fargus Multimedia + Home Systems, Inc. + Siberian Studio, R3)
@@ -95,7 +96,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::RU_RUS,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// BladeRunner (Russian - Fargus Multimedia + Home Systems, Inc. + Siberian Studio, R4)
@@ -106,7 +107,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::RU_RUS,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// BladeRunner (Spanish)
@@ -117,7 +118,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::ES_ESP,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// Versions with restored content
@@ -130,7 +131,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_UNSTABLE,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// BladeRunner (German)
@@ -141,7 +142,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::DE_DEU,
Common::kPlatformWindows,
ADGF_UNSTABLE,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// BladeRunner (French)
@@ -152,7 +153,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::FR_FRA,
Common::kPlatformWindows,
ADGF_UNSTABLE,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// BladeRunner (Italian)
@@ -163,7 +164,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::IT_ITA,
Common::kPlatformWindows,
ADGF_UNSTABLE,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// BladeRunner (Russian - Fargus Multimedia + Home Systems, Inc.)
@@ -174,7 +175,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::RU_RUS,
Common::kPlatformWindows,
ADGF_UNSTABLE,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// BladeRunner (Russian - Fargus Multimedia + Home Systems, Inc. + Siberian Studio, R3)
@@ -185,7 +186,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::RU_RUS,
Common::kPlatformWindows,
ADGF_UNSTABLE,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
// BladeRunner (Russian - Fargus Multimedia + Home Systems, Inc. + Siberian Studio, R4)
@@ -196,7 +197,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::RU_RUS,
Common::kPlatformWindows,
ADGF_UNSTABLE,
- GUIO4(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GUIO_NOMIDI)
+ GUIO5(GAMEOPTION_SITCOM, GAMEOPTION_SHORTY, GAMEOPTION_FRAMELIMITER_NODELAYMILLIS, GAMEOPTION_FRAMELIMITER_FPS, GUIO_NOMIDI)
},
AD_TABLE_END_MARKER