1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 
24 #include "bladerunner/bladerunner.h"
25 #include "bladerunner/detection_tables.h"
26 #include "bladerunner/savefile.h"
27 
28 #include "common/config-manager.h"
29 #include "common/system.h"
30 #include "common/savefile.h"
31 #include "common/serializer.h"
32 #include "common/translation.h"
33 
34 #include "engines/advancedDetector.h"
35 
36 static const DebugChannelDef debugFlagList[] = {
37 	{BladeRunner::kDebugScript, "Script", "Debug the scripts"},
38 	DEBUG_CHANNEL_END
39 };
40 
41 namespace BladeRunner {
42 
43 static const PlainGameDescriptor bladeRunnerGames[] = {
44 	{"bladerunner", "Blade Runner"},
45 	{"bladerunner-final", "Blade Runner with restored content"},
46 	{0, 0}
47 };
48 
49 static const ADExtraGuiOptionsMap optionsList[] = {
50 	{
51 		GAMEOPTION_SITCOM,
52 		{
53 			_s("Sitcom mode"),
54 			_s("Game will add laughter after actor's line or narration"),
55 			"sitcom",
56 			false
57 		}
58 	},
59 	{
60 		GAMEOPTION_SHORTY,
61 		{
62 			_s("Shorty mode"),
63 			_s("Game will shrink the actors and make their voices high pitched"),
64 			"shorty",
65 			false
66 		}
67 	},
68 	{
69 		GAMEOPTION_FRAMELIMITER_NODELAYMILLIS,
70 		{
71 			_s("Frame limiter high performance mode"),
72 			_s("This mode may result in high CPU usage! It avoids use of delayMillis() function."),
73 			"nodelaymillisfl",
74 			false
75 		}
76 	},
77 	{
78 		GAMEOPTION_FRAMELIMITER_FPS,
79 		{
80 			_s("Max frames per second limit"),
81 			_s("This mode targets a maximum of 120 fps. When disabled, the game targets 60 fps"),
82 			"frames_per_secondfl",
83 			false
84 		}
85 	},
86 	{
87 		GAMEOPTION_DISABLE_STAMINA_DRAIN,
88 		{
89 			_s("Disable McCoy's quick stamina drain"),
90 			_s("When running, McCoy won't start slowing down as soon as the player stops clicking the mouse"),
91 			"disable_stamina_drain",
92 			false
93 		}
94 	},
95 	AD_EXTRA_GUI_OPTIONS_TERMINATOR
96 };
97 
98 } // End of namespace BladeRunner
99 
100 class BladeRunnerMetaEngineDetection : public AdvancedMetaEngineDetection {
101 public:
102 	BladeRunnerMetaEngineDetection();
103 
104 	const char *getEngineId() const override;
105 	const char *getName() const override;
106 	const char *getOriginalCopyright() const override;
107 	const DebugChannelDef *getDebugChannels() const override;
108 };
109 
BladeRunnerMetaEngineDetection()110 BladeRunnerMetaEngineDetection::BladeRunnerMetaEngineDetection()
111 	: AdvancedMetaEngineDetection(
112 		BladeRunner::gameDescriptions,
113 		sizeof(BladeRunner::gameDescriptions[0]),
114 		BladeRunner::bladeRunnerGames,
115 		BladeRunner::optionsList) {}
116 
getEngineId() const117 const char *BladeRunnerMetaEngineDetection::getEngineId() const {
118 	return "bladerunner";
119 }
120 
getName() const121 const char *BladeRunnerMetaEngineDetection::getName() const {
122 	return "Blade Runner";
123 }
124 
getOriginalCopyright() const125 const char *BladeRunnerMetaEngineDetection::getOriginalCopyright() const {
126 	return "Blade Runner (C) 1997 Westwood Studios";
127 }
128 
getDebugChannels() const129 const DebugChannelDef *BladeRunnerMetaEngineDetection::getDebugChannels() const {
130 	return debugFlagList;
131 }
132 
133 REGISTER_PLUGIN_STATIC(BLADERUNNER_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, BladeRunnerMetaEngineDetection);
134