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 #include "lastexpress/lastexpress.h"
24 #include "engines/advancedDetector.h"
25 
26 namespace LastExpress {
27 
28 static const PlainGameDescriptor lastExpressGames[] = {
29 	// Games
30 	{"lastexpress", "The Last Express"},
31 	{0, 0}
32 };
33 
34 static const ADGameDescription gameDescriptions[] = {
35 
36 	// The Last Express (English) - US Broderbund Release
37 	//   expressw.exe 1997-02-12 17:24:44
38 	//   express.exe  1997-02-12 17:29:08
39 	{
40 		"lastexpress",
41 		"",
42 		{
43 			{"HD.HPF",  0, "2d331459e0e68cf277ef4e4043750413", 29865984},   // 1997-02-10 19:38:19
44 			{"CD1.HPF", 0, "8c86db47304033fcff32c69fddd5a920", 525522944},  // 1997-02-10 17:04:40
45 			{"CD2.HPF", 0, "58aa26e782d10ec5d2231e539d2fe6a2", 669581312},  // 1997-02-10 16:19:30
46 			{"CD3.HPF", 0, "00554fbf78a2ad391d98578fbbbe1c48", 641128448},  // 1997-02-10 15:44:09
47 			AD_LISTEND
48 		},
49 		Common::EN_ANY,
50 		Common::kPlatformUnknown,
51 		ADGF_UNSTABLE,
52 		GUIO1(GUIO_NOASPECT)
53 	},
54 
55 	// The Last Express (English) - UK Broderbund Release
56 	//   expressw.exe 1997-04-02 14:30:32
57 	//   express.exe  1997-04-02 15:00:50
58 	{
59 		"lastexpress",
60 		"",
61 		{
62 			{"HD.HPF",  0, "2d331459e0e68cf277ef4e4043750413", 29865984},   // 1997-04-10 11:03:41
63 			{"CD1.HPF", 0, "8c86db47304033fcff32c69fddd5a920", 525522944},  // 1997-04-10 11:03:36
64 			{"CD2.HPF", 0, "2672348691e1ae22d37d9f46f3683a07", 669509632},  // 1997-04-11 09:48:33
65 			{"CD3.HPF", 0, "33f5e35f51063cb90f6bed9974475aa6", 641056768},  // 1997-04-11 09:48:55
66 			AD_LISTEND
67 		},
68 		Common::EN_ANY,
69 		Common::kPlatformUnknown,
70 		ADGF_UNSTABLE,
71 		GUIO1(GUIO_NOASPECT)
72 	},
73 
74 	// The Last Express (English) - Interplay Release
75 	//   expressw.exe ???
76 	//   express.exe  ???
77 	{
78 		"lastexpress",
79 		"",
80 		{
81 			{"HD.HPF",  0, "bcc32d977f92bb52c060a0b4e8589cac", 30715904},
82 			{"CD1.HPF", 0, "8c86db47304033fcff32c69fddd5a920", 525522944},
83 			{"CD2.HPF", 0, "58aa26e782d10ec5d2231e539d2fe6a2", 669581312},
84 			{"CD3.HPF", 0, "00554fbf78a2ad391d98578fbbbe1c48", 641128448},
85 			AD_LISTEND
86 		},
87 		Common::EN_ANY,
88 		Common::kPlatformUnknown,
89 		ADGF_UNSTABLE,
90 		GUIO1(GUIO_NOASPECT)
91 	},
92 
93 	// The Last Express (Demo - English) - Broderbund
94 	//   expressw.exe 1997-08-14 14:09:42
95 	//   express.exe  1997-08-14 14:19:34
96 	{
97 		"lastexpress",
98 		"Demo",
99 		{
100 			{"Demo.HPF",  0, "baf3b1f64155d34872896e61c3d3cb78", 58191872},  // 1997-08-14 14:44:26
101 			AD_LISTEND
102 		},
103 		Common::EN_ANY,
104 		Common::kPlatformUnknown,
105 		ADGF_DEMO | ADGF_UNSTABLE,
106 		GUIO1(GUIO_NOASPECT)
107 	},
108 
109 	// The Last Express (French) - Broderbund Release
110 	//   expressw.exe 1997-04-02 09:31:24
111 	//   express.exe  1997-04-02 10:01:12
112 	{
113 		"lastexpress",
114 		"",
115 		{
116 			{"HD.HPF",  0, "c14c6d685d9bf8705d9f659062e6c5c2", 29505536},   // 1997-04-03 07:53:20
117 			{"CD1.HPF", 0, "b4277b22bc5cd6ad3b00c2ec04d4645d", 522924032},  // 1997-04-03 07:53:14
118 			{"CD2.HPF", 0, "8c9610aa4cb707ab51f61c30feb22c1a", 665710592},  // 1997-04-09 12:04:30
119 			{"CD3.HPF", 0, "411c1bab57b3e8da4fb359c5b40ef5d7", 640884736},  // 1997-04-03 08:21:47
120 			AD_LISTEND
121 		},
122 		Common::FR_FRA,
123 		Common::kPlatformUnknown,
124 		ADGF_UNSTABLE,
125 		GUIO1(GUIO_NOASPECT)
126 	},
127 
128 	// The Last Express (German)
129 	//   expressw.exe ???
130 	//   express.exe  ???
131 	{
132 		"lastexpress",
133 		"",
134 		{
135 			{"HD.HPF",  0, "7cdd70fc0b1555785f1e9e8d371ea85c", 31301632},   // 1997-04-08 14:33:42
136 			{"CD1.HPF", 0, "6d74cc861d172466bc745ff8bf0e59c5", 522971136},  // 1997-04-08 13:05:56
137 			{"CD2.HPF", 0, "b71ac9391de415807c74ff078f4fab22", 655702016},  // 1997-04-08 15:26:14
138 			{"CD3.HPF", 0, "ee55d4310546dd2a38560b096d1c2771", 641144832},  // 1997-04-05 18:35:50
139 			AD_LISTEND
140 		},
141 		Common::DE_DEU,
142 		Common::kPlatformUnknown,
143 		ADGF_UNSTABLE,
144 		GUIO1(GUIO_NOASPECT)
145 	},
146 
147 	// The Last Express (Spanish)
148 	//   expressw.exe 1997-04-02 07:30:32
149 	//   express.exe  1997-04-02 09:00:50
150 	{
151 		"lastexpress",
152 		"",
153 		{
154 			{"HD.HPF",  0, "46bed8832f06cf7160883a2aae2d667f", 29657088},   // 1997-09-30 20:43:54
155 			{"CD1.HPF", 0, "367a3a8581f6f88ddc51af7cde105ba9", 519927808},  // 1997-09-28 19:30:38
156 			{"CD2.HPF", 0, "af5566df3000472852ec182c9ec57797", 662210560},  // 1997-10-03 05:36:20
157 			{"CD3.HPF", 0, "0d1901662f4d063a5c250c9fbf64b771", 639504384},  // 1997-09-28 19:55:34
158 			AD_LISTEND
159 		},
160 		Common::ES_ESP,
161 		Common::kPlatformUnknown,
162 		ADGF_UNSTABLE,
163 		GUIO1(GUIO_NOASPECT)
164 	},
165 
166 	// The Last Express (Italian)
167 	//   expressw.exe 1997-09-15 12:11:56
168 	//   express.exe  1997-09-15 12:41:46
169 	{
170 		"lastexpress",
171 		"",
172 		{
173 			{"HD.HPF",  0, "5539e78fd7eecb70bc858e86b5709fe9", 29562880},   // 1997-12-11 14:11:52
174 			{"CD1.HPF", 0, "3c1c80b41f2c454b7b89dcb32648796c", 522328064},  // 1997-12-11 14:39:46
175 			{"CD2.HPF", 0, "ea6414d5a718501cfd55de3884f4431d", 665411584},  // 1997-12-11 15:20:26
176 			{"CD3.HPF", 0, "a5bd5b58acddbd951d4551f68de22025", 637718528},  // 1997-12-11 15:58:44
177 			AD_LISTEND
178 		},
179 		Common::IT_ITA,
180 		Common::kPlatformUnknown,
181 		ADGF_UNSTABLE,
182 		GUIO1(GUIO_NOASPECT)
183 	},
184 
185 	// The Last Express (Russian)
186 	//   expressw.exe 1999-04-05 15:33:56
187 	//   express.exe  ???
188 	{
189 		"lastexpress",
190 		"",
191 		{
192 			{"HD.HPF",  0, "a9e915c20f3231c5a1ac4455286971bb", 29908992},   // 1999-04-08 12:43:56
193 			{"CD1.HPF", 0, "80fbb95c9228353436b7b38e4b5bb64d", 525805568},  // 1999-04-07 13:30:14
194 			{"CD2.HPF", 0, "a1c8c344754e03eaa86eaabc6024709e", 677289984},  // 1999-04-07 16:19:56
195 			{"CD3.HPF", 0, "ea5adac447e59ea6d4a1737abad46480", 642584576},  // 1999-04-07 17:26:18
196 			AD_LISTEND
197 		},
198 		Common::RU_RUS,
199 		Common::kPlatformUnknown,
200 		ADGF_UNSTABLE,
201 		GUIO1(GUIO_NOASPECT)
202 	},
203 
204 	// The Last Express (GOG)
205 	//   expressw.exe ???
206 	//   express.exe  2010-12-14 13:49:04
207 	{
208 		"lastexpress",
209 		"",
210 		{
211 			{"HD.HPF",  0, "ab940d5815008b176502f759ae753fb7", 30715904},   // 2000-03-01 17:03:58
212 			{"CD1.HPF", 0, "cec8810125b050f41b7f34ab72371f81", 525522944},  // 2000-02-14 16:02:02
213 			{"CD2.HPF", 0, "c648872b31e43d458680cf16bedc636c", 669581312},  // 1997-02-10 21:19:30
214 			{"CD3.HPF", 0, "8cb3e68a6dca354e556c487ea24a6b10", 641128448},  // 1997-02-10 20:44:08
215 			AD_LISTEND
216 		},
217 		Common::EN_ANY,
218 		Common::kPlatformUnknown,
219 		ADGF_UNSTABLE,
220 		GUIO1(GUIO_NOASPECT)
221 	},
222 
223 	AD_TABLE_END_MARKER
224 };
225 
226 
227 class LastExpressMetaEngine : public AdvancedMetaEngine {
228 public:
LastExpressMetaEngine()229 	LastExpressMetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(ADGameDescription), lastExpressGames) {
230 		_singleId = "lastexpress";
231 		_guiOptions = GUIO2(GUIO_NOSUBTITLES, GUIO_NOSFX);
232 	}
233 
getName() const234 	const char *getName() const {
235 		return "The Last Express";
236 	}
237 
getOriginalCopyright() const238 	const char *getOriginalCopyright() const {
239 		return "The Last Express (C) 1997 Smoking Car Productions";
240 	}
241 
242 protected:
243 	bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const;
244 };
245 
createInstance(OSystem * syst,Engine ** engine,const ADGameDescription * gd) const246 bool LastExpressMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
247 	if (gd) {
248 		*engine = new LastExpressEngine(syst, (const ADGameDescription *)gd);
249 	}
250 	return gd != 0;
251 }
252 
isDemo() const253 bool LastExpressEngine::isDemo() const {
254 	return (bool)(_gameDescription->flags & ADGF_DEMO);
255 }
256 
257 } // End of namespace LastExpress
258 
259 #if PLUGIN_ENABLED_DYNAMIC(LASTEXPRESS)
260 	REGISTER_PLUGIN_DYNAMIC(LASTEXPRESS, PLUGIN_TYPE_ENGINE, LastExpress::LastExpressMetaEngine);
261 #else
262 	REGISTER_PLUGIN_STATIC(LASTEXPRESS, PLUGIN_TYPE_ENGINE, LastExpress::LastExpressMetaEngine);
263 #endif
264