This repository has been archived by the owner on Feb 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
detection.cpp
219 lines (193 loc) · 5.24 KB
/
detection.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
/* Residual - A 3D game interpreter
*
* Residual is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the AUTHORS
* file distributed with this source distribution.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*
* $URL$
* $Id$
*
*/
#include "engines/advancedDetector.h"
#include "engines/stark/stark.h"
namespace Stark {
static const PlainGameDescriptor starkGames[] = {
{"stark", "Stark Game"},
{"tlj", "The Longest Journey"},
{0, 0}
};
static const ADGameDescription gameDescriptions[] = {
// The Longest Journey
// English 4CD
{
"tlj", "4 CD", {
// TODO: Fill file sizes and chapters.ini's MD5
{"x.xarc", 0, "a0559457126caadab0cadac02d35f26f", -1},
{"chapters.ini", 0, "", -1},
{NULL, 0, NULL, 0}
},
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
Common::GUIO_NONE
},
// The Longest Journey
// English DVD
{
"tlj", "DVD", {
// TODO: Fill file sizes and chapters.ini's MD5
{"x.xarc", 0, "de8327850d7bba90b690b141eaa23f61", -1},
{"chapters.ini", 0, "", -1},
{NULL, 0, NULL, 0}
},
Common::EN_ANY,
Common::kPlatformWindows,
GF_DVD,
Common::GUIO_NONE
},
// The Longest Journey
// English Old Demo
{
"tlj", "Old Demo", {
{"x.xarc", 0, "97abc1bb9239dee4c208e533f3c97e1c", 98},
{"chapters.ini", 0, "5b5a1f1dd2297d9ce0d3d12216d5d2c5", 485},
{NULL, 0, NULL, 0}
},
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_DEMO,
Common::GUIO_NONE
},
// The Longest Journey
// English v1.61 Demo
{
"tlj", "v1.61 Demo", {
{"x.xarc", 0, "61093bcd499b386ed5c0345c52f48909", 98},
{"chapters.ini", 0, "5b5a1f1dd2297d9ce0d3d12216d5d2c5", 485},
{NULL, 0, NULL, 0}
},
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_DEMO | GF_DVD,
Common::GUIO_NONE
},
// The Longest Journey
// French Demo
{
"tlj", "Demo", {
{"x.xarc", 0, "97abc1bb9239dee4c208e533f3c97e1c", 98},
{"chapters.ini", 0, "e54f6370dca06496069790840409cf95", 506},
{NULL, 0, NULL, 0}
},
Common::FR_FRA,
Common::kPlatformWindows,
ADGF_DEMO,
Common::GUIO_NONE
},
// The Longest Journey
// Norwegian Demo
{
"tlj", "Demo", {
{"x.xarc", 0, "97abc1bb9239dee4c208e533f3c97e1c", 98},
{"chapters.ini", 0, "f358f604abd1aa1476ed05d6d271ac70", 473},
{NULL, 0, NULL, 0}
},
Common::NB_NOR,
Common::kPlatformWindows,
ADGF_DEMO,
Common::GUIO_NONE
},
// The Longest Journey
// Norwegian DLC-edition (DVD?)
{
"tlj", "DVD", {
{"x.xarc", 0, "de8327850d7bba90b690b141eaa23f61", 3032},
{"chapters.ini", 0, "f358f604abd1aa1476ed05d6d271ac70", 473},
{NULL, 0, NULL, 0}
},
Common::NB_NOR,
Common::kPlatformWindows,
ADGF_DEMO,
Common::GUIO_NONE
},
// The Longest Journey
// Spanish 4CD
{
"tlj", "4 CD", {
{"x.xarc", 0, "a0559457126caadab0cadac02d35f26f", 3032},
{"chapters.ini", 0, "3640df6d536b186bff228337284d9631", 525},
{NULL, 0, NULL, 0}
},
Common::ES_ESP,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
Common::GUIO_NONE
},
// The Longest Journey
// Swedish Demo
{
"tlj", "Demo", {
{"x.xarc", 0, "97abc1bb9239dee4c208e533f3c97e1c", 98},
{"chapters.ini", 0, "f6a2007300209492b7b90b4c0467832d", 462},
{NULL, 0, NULL, 0}
},
Common::SE_SWE,
Common::kPlatformWindows,
ADGF_DEMO,
Common::GUIO_NONE
},
AD_TABLE_END_MARKER
};
// File based fallback game description
static const ADGameDescription fallbackDescription = {
"tlj", "Unknown", {
{"x.xarc", 0, NULL, -1},
{"chapters.ini", 0, NULL, -1},
{NULL, 0, NULL, 0}
},
Common::UNK_LANG,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
Common::GUIO_NONE
};
static const ADFileBasedFallback fileBasedFallback[] = {
{&fallbackDescription, {"x.xarc", "chapters.ini", "w_world.ini", NULL}},
{NULL, {NULL}}
};
class StarkMetaEngine : public AdvancedMetaEngine {
public:
StarkMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(ADGameDescription), starkGames) {
_singleid = "stark";
_guioptions = Common::GUIO_NOMIDI;
}
virtual const char *getName() const {
return "Stark Engine";
}
virtual const char *getOriginalCopyright() const {
return "(C) Funcom";
}
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
};
bool StarkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
if (desc)
*engine = new StarkEngine(syst, desc);
return desc != 0;
}
} // End of namespace Stark
#if PLUGIN_ENABLED_DYNAMIC(STARK)
REGISTER_PLUGIN_DYNAMIC(STARK, PLUGIN_TYPE_ENGINE, Stark::StarkMetaEngine);
#else
REGISTER_PLUGIN_STATIC(STARK, PLUGIN_TYPE_ENGINE, Stark::StarkMetaEngine);
#endif