Ticket #12000: detection.cpp.old

File detection.cpp.old, 10.0 KB (added by goodoldgeorge, 4 years ago)
Line 
1/* ResidualVM - A 3D game interpreter
2 *
3 * ResidualVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the AUTHORS
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#include "engines/advancedDetector.h"
24
25#include "common/translation.h"
26
27namespace Stark {
28
29static const PlainGameDescriptor starkGames[] = {
30 { "tlj", "The Longest Journey" },
31 { nullptr, nullptr }
32};
33
34static const ADGameDescription gameDescriptions[] = {
35 // The Longest Journey
36 // English DVD
37 {
38 "tlj", "DVD", {
39 {"x.xarc", 0, "de8327850d7bba90b690b141eaa23f61", 3032},
40 {"chapters.ini", 0, "5b5a1f1dd2297d9ce0d3d12216d5d2c5", 485},
41 {nullptr, 0, nullptr, 0}
42 },
43 Common::EN_ANY,
44 Common::kPlatformWindows,
45 ADGF_NO_FLAGS,
46 GUIO_NONE
47 },
48
49 // The Longest Journey
50 // GOG edition
51 {
52 "tlj", "GOG", {
53 {"x.xarc", 0, "a0559457126caadab0cadac02d35f26f", 3032},
54 {"chapters.ini", 0, "5b5a1f1dd2297d9ce0d3d12216d5d2c5", 485},
55 {nullptr, 0, nullptr, 0}
56 },
57 Common::EN_ANY,
58 Common::kPlatformWindows,
59 ADGF_NO_FLAGS,
60 GUIO_NONE
61 },
62
63 // The Longest Journey
64 // English Old Demo
65 {
66 "tlj", "Old Demo", {
67 {"x.xarc", 0, "97abc1bb9239dee4c208e533f3c97e1c", 98},
68 {"chapters.ini", 0, "5b5a1f1dd2297d9ce0d3d12216d5d2c5", 485},
69 {nullptr, 0, nullptr, 0}
70 },
71 Common::EN_ANY,
72 Common::kPlatformWindows,
73 ADGF_DEMO,
74 GUIO_NONE
75 },
76
77 // The Longest Journey
78 // English v1.61 Demo
79 {
80 "tlj", "v1.61 Demo", {
81 {"x.xarc", 0, "61093bcd499b386ed5c0345c52f48909", 98},
82 {"chapters.ini", 0, "5b5a1f1dd2297d9ce0d3d12216d5d2c5", 485},
83 {nullptr, 0, nullptr, 0}
84 },
85 Common::EN_ANY,
86 Common::kPlatformWindows,
87 ADGF_DEMO,
88 GUIO_NONE
89 },
90
91 // The Longest Journey
92 // French Demo
93 {
94 "tlj", "Demo", {
95 {"x.xarc", 0, "97abc1bb9239dee4c208e533f3c97e1c", 98},
96 {"chapters.ini", 0, "e54f6370dca06496069790840409cf95", 506},
97 {nullptr, 0, nullptr, 0}
98 },
99 Common::FR_FRA,
100 Common::kPlatformWindows,
101 ADGF_DEMO,
102 GUIO_NONE
103 },
104
105 // The Longest Journey
106 // Norwegian Demo
107 {
108 "tlj", "Demo", {
109 {"x.xarc", 0, "97abc1bb9239dee4c208e533f3c97e1c", 98},
110 {"chapters.ini", 0, "f358f604abd1aa1476ed05d6d271ac70", 473},
111 {nullptr, 0, nullptr, 0}
112 },
113 Common::NB_NOR,
114 Common::kPlatformWindows,
115 ADGF_DEMO,
116 GUIO_NONE
117 },
118
119 // The Longest Journey
120 // Norwegian 4 CD version - supplied by L0ngcat
121 {
122 "tlj", "4 CD", {
123 {"x.xarc", 0, "a0559457126caadab0cadac02d35f26f", 3032},
124 {"chapters.ini", 0, "f358f604abd1aa1476ed05d6d271ac70", 473},
125 {nullptr, 0, nullptr, 0}
126 },
127 Common::NB_NOR,
128 Common::kPlatformWindows,
129 ADGF_NO_FLAGS,
130 GUIO_NONE
131 },
132
133 // The Longest Journey
134 // Norwegian DLC-edition (DVD?)
135 {
136 "tlj", "DVD", {
137 {"x.xarc", 0, "de8327850d7bba90b690b141eaa23f61", 3032},
138 {"chapters.ini", 0, "f358f604abd1aa1476ed05d6d271ac70", 473},
139 {nullptr, 0, nullptr, 0}
140 },
141 Common::NB_NOR,
142 Common::kPlatformWindows,
143 ADGF_NO_FLAGS,
144 GUIO_NONE
145 },
146
147 // The Longest Journey
148 // German DVD version supplied by Vorph on the forums
149 {
150 "tlj", "DVD", {
151 {"x.xarc", 0, "de8327850d7bba90b690b141eaa23f61", 3032},
152 {"chapters.ini", 0, "e4611d143a87b263d8d7a54edc7e7cd7", 515},
153 {nullptr, 0, nullptr, 0}
154 },
155 Common::DE_DEU,
156 Common::kPlatformWindows,
157 ADGF_NO_FLAGS,
158 GUIO_NONE
159 },
160
161 // The Longest Journey
162 // German 4CD
163 {
164 "tlj", "4 CD", {
165 {"x.xarc", 0, "a0559457126caadab0cadac02d35f26f", 3032},
166 {"chapters.ini", 0, "e4611d143a87b263d8d7a54edc7e7cd7", 515},
167 {nullptr, 0, nullptr, 0}
168 },
169 Common::DE_DEU,
170 Common::kPlatformWindows,
171 ADGF_NO_FLAGS,
172 GUIO_NONE
173 },
174
175 // The Longest Journey
176 // Italian DVD version
177 {
178 "tlj", "DVD", {
179 {"x.xarc", 0, "de8327850d7bba90b690b141eaa23f61", 3032},
180 {"chapters.ini", 0, "9a81ea4e6f5b84511dd4e56d04a64e2e", 498},
181 {nullptr, 0, nullptr, 0}
182 },
183 Common::IT_ITA,
184 Common::kPlatformWindows,
185 ADGF_NO_FLAGS,
186 GUIO_NONE
187 },
188
189 // The Longest Journey
190 // Italian 4CD
191 {
192 "tlj", "4 CD", {
193 {"x.xarc", 0, "a0559457126caadab0cadac02d35f26f", 3032},
194 {"chapters.ini", 0, "9a81ea4e6f5b84511dd4e56d04a64e2e", 498},
195 {nullptr, 0, nullptr, 0}
196 },
197 Common::IT_ITA,
198 Common::kPlatformWindows,
199 ADGF_NO_FLAGS,
200 GUIO_NONE
201 },
202
203 // The Longest Journey
204 // Dutch 4CD
205 {
206 "tlj", "4 CD", {
207 {"x.xarc", 0, "a0559457126caadab0cadac02d35f26f", 3032},
208 {"chapters.ini", 0, "c8dadd9a3b41640734d6213e89cd5635", 508},
209 {nullptr, 0, nullptr, 0}
210 },
211 Common::NL_NLD,
212 Common::kPlatformWindows,
213 ADGF_NO_FLAGS,
214 GUIO_NONE
215 },
216
217 // The Longest Journey
218 // Spanish 4CD
219 {
220 "tlj", "4 CD", {
221 {"x.xarc", 0, "a0559457126caadab0cadac02d35f26f", 3032},
222 {"chapters.ini", 0, "3640df6d536b186bff228337284d9631", 525},
223 {nullptr, 0, nullptr, 0}
224 },
225 Common::ES_ESP,
226 Common::kPlatformWindows,
227 ADGF_NO_FLAGS,
228 GUIO_NONE
229 },
230
231 // The Longest Journey
232 // French 2CD
233 {
234 "tlj", "2 CD", {
235 {"x.xarc", 0, "de8327850d7bba90b690b141eaa23f61", 3032},
236 {"chapters.ini", 0, "e54f6370dca06496069790840409cf95", 506},
237 {nullptr, 0, nullptr, 0}
238 },
239 Common::FR_FRA,
240 Common::kPlatformWindows,
241 ADGF_NO_FLAGS,
242 GUIO_NONE
243 },
244
245 // The Longest Journey
246 // French 4CD
247 {
248 "tlj", "4 CD", {
249 {"x.xarc", 0, "a0559457126caadab0cadac02d35f26f", 3032},
250 {"chapters.ini", 0, "e54f6370dca06496069790840409cf95", 506},
251 {nullptr, 0, nullptr, 0}
252 },
253 Common::FR_FRA,
254 Common::kPlatformWindows,
255 ADGF_NO_FLAGS,
256 GUIO_NONE
257 },
258
259 // The Longest Journey
260 // Swedish Demo
261 {
262 "tlj", "Demo", {
263 {"x.xarc", 0, "97abc1bb9239dee4c208e533f3c97e1c", 98},
264 {"chapters.ini", 0, "f6a2007300209492b7b90b4c0467832d", 462},
265 {nullptr, 0, nullptr, 0}
266 },
267 Common::SE_SWE,
268 Common::kPlatformWindows,
269 ADGF_DEMO,
270 GUIO_NONE
271 },
272
273 // The Longest Journey
274 // Swedish 4CD
275 {
276 "tlj", "4 CD", {
277 {"x.xarc", 0, "a0559457126caadab0cadac02d35f26f", 3032},
278 {"chapters.ini", 0, "f6a2007300209492b7b90b4c0467832d", 462},
279 {nullptr, 0, nullptr, 0}
280 },
281 Common::SE_SWE,
282 Common::kPlatformWindows,
283 ADGF_NO_FLAGS,
284 GUIO_NONE
285 },
286
287 // The Longest Journey
288 // Swedish DVD Nordic Special Edition - supplied by L0ngcat
289 {
290 "tlj", "DVD", {
291 {"x.xarc", 0, "de8327850d7bba90b690b141eaa23f61", 3032},
292 {"chapters.ini", 0, "f6a2007300209492b7b90b4c0467832d", 462},
293 {nullptr, 0, nullptr, 0}
294 },
295 Common::SE_SWE,
296 Common::kPlatformWindows,
297 ADGF_NO_FLAGS,
298 GUIO_NONE
299 },
300
301 // The Longest Journey
302 // Polish 4CD
303 {
304 "tlj", "4 CD", {
305 {"x.xarc", 0, "a0559457126caadab0cadac02d35f26f", 3032},
306 {"chapters.ini", 0, "6abc5c38e6e31face4b675355b117620", 499},
307 {nullptr, 0, nullptr, 0}
308 },
309 Common::PL_POL,
310 Common::kPlatformWindows,
311 ADGF_NO_FLAGS,
312 GUIO_NONE
313 },
314
315 // The Longest Journey
316 // Russian 2CD by 1C
317 {
318 "tlj", "2 CD/Fargus", {
319 {"x.xarc", 0, "de8327850d7bba90b690b141eaa23f61", 3032},
320 {"chapters.ini", 0, "740b97b94e97ed11f064f5fa125ebee1", 486},
321 {nullptr, 0, nullptr, 0}
322 },
323 Common::RU_RUS,
324 Common::kPlatformWindows,
325 ADGF_NO_FLAGS,
326 GUIO_NONE
327 },
328
329 // The Longest Journey
330 // Russian 2CD by 7Wolf
331 {
332 "tlj", "2 CD/7Wolf", {
333 {"x.xarc", 0, "a0559457126caadab0cadac02d35f26f", 3032},
334 {"chapters.ini", 0, "8e08025c89575d2573c2edf0daa1cb34", 406},
335 {nullptr, 0, nullptr, 0}
336 },
337 Common::RU_RUS,
338 Common::kPlatformWindows,
339 ADGF_UNSTABLE,
340 GUIO_NONE
341 },
342
343 // The Longest Journey
344 // Hungarian fan-made
345 {
346 "tlj", "Fanmade", {
347 {"x.xarc", 0, "a0559457126caadab0cadac02d35f26f", 3032},
348 {"chapters.ini", 0, "790b51a88b5493bff5168a77738e0e84", 451},
349 {nullptr, 0, nullptr, 0}
350 },
351 Common::HU_HUN,
352 Common::kPlatformWindows,
353 ADGF_NO_FLAGS,
354 GUIO_NONE
355 },
356
357 AD_TABLE_END_MARKER
358};
359
360#define GAMEOPTION_ASSETS_MOD GUIO_GAMEOPTIONS1
361#define GAMEOPTION_LINEAR_FILTERING GUIO_GAMEOPTIONS2
362#define GAMEOPTION_FONT_ANTIALIASING GUIO_GAMEOPTIONS3
363
364static const ADExtraGuiOptionsMap optionsList[] = {
365 {
366 GAMEOPTION_ASSETS_MOD,
367 {
368 _s("Load modded assets"),
369 _s("Enable loading of external replacement assets."),
370 "enable_assets_mod",
371 true
372 }
373 },
374 {
375 GAMEOPTION_LINEAR_FILTERING,
376 {
377 _s("Enable linear filtering of the backgrounds images"),
378 _s("When linear filtering is enabled the background graphics are smoother in full screen mode, at the cost of some details."),
379 "use_linear_filtering",
380 true
381 }
382 },
383 {
384 GAMEOPTION_FONT_ANTIALIASING,
385 {
386 _s("Enable font anti-aliasing"),
387 _s("When font anti-aliasing is enabled, the text is smoother."),
388 "enable_font_antialiasing",
389 true
390 }
391 },
392
393 AD_EXTRA_GUI_OPTIONS_TERMINATOR
394};
395
396class StarkMetaEngineDetection : public AdvancedMetaEngineDetection {
397public:
398 StarkMetaEngineDetection() : AdvancedMetaEngineDetection(gameDescriptions, sizeof(ADGameDescription), starkGames, optionsList) {
399 _guiOptions = GUIO4(GUIO_NOMIDI, GAMEOPTION_ASSETS_MOD, GAMEOPTION_LINEAR_FILTERING, GAMEOPTION_FONT_ANTIALIASING);
400 }
401
402 const char *getName() const override {
403 return "Stark";
404 }
405
406 const char *getEngineId() const override {
407 return "stark";
408 }
409
410 const char *getOriginalCopyright() const override {
411 return "(C) Funcom";
412 }
413};
414
415} // End of namespace Stark
416
417REGISTER_PLUGIN_STATIC(STARK_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, Stark::StarkMetaEngineDetection);