2009-05-26 14:13:08 +00:00
|
|
|
/* Residual - A 3D game interpreter
|
2009-05-25 19:21:58 +00:00
|
|
|
*
|
|
|
|
* 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/grim/grim.h"
|
|
|
|
|
|
|
|
namespace Grim {
|
|
|
|
|
|
|
|
struct GrimGameDescription {
|
|
|
|
ADGameDescription desc;
|
|
|
|
};
|
|
|
|
|
|
|
|
static const PlainGameDescriptor grimGames[] = {
|
|
|
|
{"grim", "Grim Fandango"},
|
|
|
|
{"monkey", "Escape From Monkey Island"},
|
|
|
|
{0, 0}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const GrimGameDescription gameDescriptions[] = {
|
|
|
|
{
|
2009-05-26 06:41:24 +00:00
|
|
|
// Grim Fandago English version
|
2009-05-25 19:21:58 +00:00
|
|
|
{
|
|
|
|
"grim",
|
|
|
|
0,
|
2009-05-25 21:18:07 +00:00
|
|
|
AD_ENTRY1s("grim.tab", "cfb333d6aec260c905151b6b98ef71e8", 362212),
|
2009-05-25 19:21:58 +00:00
|
|
|
Common::EN_ANY,
|
|
|
|
Common::kPlatformPC,
|
|
|
|
ADGF_NO_FLAGS
|
|
|
|
},
|
|
|
|
},
|
2009-05-26 06:41:24 +00:00
|
|
|
{
|
|
|
|
// Grim Fandago German version
|
|
|
|
{
|
|
|
|
"grim",
|
|
|
|
0,
|
2009-05-28 21:51:50 +00:00
|
|
|
AD_ENTRY1s("grim.tab", "464138caf47e580cbb237dee10674b16", 398592),
|
2009-05-26 06:41:24 +00:00
|
|
|
Common::DE_DEU,
|
|
|
|
Common::kPlatformPC,
|
|
|
|
ADGF_NO_FLAGS
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// Grim Fandago Spanish version
|
|
|
|
{
|
|
|
|
"grim",
|
|
|
|
0,
|
2009-05-27 18:07:10 +00:00
|
|
|
AD_ENTRY1s("grim.tab", "b1460cd029f13718f7f62c2403e047ec", 372709),
|
2009-05-26 06:41:24 +00:00
|
|
|
Common::ES_ESP,
|
|
|
|
Common::kPlatformPC,
|
|
|
|
ADGF_NO_FLAGS
|
|
|
|
},
|
|
|
|
},
|
2009-05-28 16:08:33 +00:00
|
|
|
{
|
|
|
|
// Grim Fandago Italian version
|
|
|
|
{
|
|
|
|
"grim",
|
|
|
|
0,
|
|
|
|
AD_ENTRY1s("grim.tab", "2d99c796b7a4e5c421cae49dc29dab6c", 369071),
|
|
|
|
Common::IT_ITA,
|
|
|
|
Common::kPlatformPC,
|
|
|
|
ADGF_NO_FLAGS
|
|
|
|
},
|
|
|
|
},
|
2009-05-25 19:21:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
{ AD_TABLE_END_MARKER }
|
|
|
|
};
|
|
|
|
|
2009-05-30 11:32:43 +00:00
|
|
|
static const GrimGameDescription fallbackGameDescriptions[] = {
|
|
|
|
{{"grim", 0, {{0, 0, 0, 0}}, Common::UNK_LANG, Common::kPlatformPC, ADGF_NO_FLAGS}}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const ADFileBasedFallback grimFallback[] = {
|
|
|
|
{&fallbackGameDescriptions[0], {"grim.tab"}},
|
|
|
|
{0, {0}}
|
|
|
|
};
|
|
|
|
|
2009-05-25 19:21:58 +00:00
|
|
|
static const ADParams detectionParams = {
|
|
|
|
// Pointer to ADGameDescription or its superset structure
|
2009-05-30 11:38:42 +00:00
|
|
|
(const byte *)gameDescriptions,
|
2009-05-25 19:21:58 +00:00
|
|
|
// Size of that superset structure
|
2009-05-30 11:38:42 +00:00
|
|
|
sizeof(GrimGameDescription),
|
2009-05-25 19:21:58 +00:00
|
|
|
// Number of bytes to compute MD5 sum for
|
|
|
|
5000,
|
|
|
|
// List of all engine targets
|
|
|
|
grimGames,
|
|
|
|
// Structure for autoupgrading obsolete targets
|
|
|
|
0,
|
|
|
|
// Name of single gameid (optional)
|
|
|
|
"grim",
|
|
|
|
// List of files for file-based fallback detection (optional)
|
2009-05-30 11:38:42 +00:00
|
|
|
grimFallback,
|
2009-05-25 19:21:58 +00:00
|
|
|
// Flags
|
|
|
|
0
|
|
|
|
};
|
|
|
|
|
|
|
|
class GrimMetaEngine : public AdvancedMetaEngine {
|
|
|
|
public:
|
|
|
|
GrimMetaEngine() : AdvancedMetaEngine(detectionParams) {}
|
|
|
|
|
|
|
|
virtual const char *getName() const {
|
|
|
|
return "Grim Engine";
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual const char *getOriginalCopyright() const {
|
|
|
|
return "LucasArts GrimE Games (C) LucasArts";
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
bool GrimMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
2009-05-30 11:38:42 +00:00
|
|
|
const GrimGameDescription *gd = (const GrimGameDescription *)desc;
|
2009-05-25 19:21:58 +00:00
|
|
|
if (gd) {
|
2009-05-30 11:38:42 +00:00
|
|
|
*engine = new GrimEngine(syst, gd);
|
2009-05-25 19:21:58 +00:00
|
|
|
}
|
|
|
|
return gd != 0;
|
|
|
|
}
|
|
|
|
|
2009-05-30 11:38:42 +00:00
|
|
|
} // End of namespace Grim
|
|
|
|
|
2009-05-25 19:21:58 +00:00
|
|
|
#if PLUGIN_ENABLED_DYNAMIC(GRIM)
|
2009-05-30 11:38:42 +00:00
|
|
|
REGISTER_PLUGIN_DYNAMIC(GRIM, PLUGIN_TYPE_ENGINE, Grim::GrimMetaEngine);
|
2009-05-25 19:21:58 +00:00
|
|
|
#else
|
2009-05-30 11:38:42 +00:00
|
|
|
REGISTER_PLUGIN_STATIC(GRIM, PLUGIN_TYPE_ENGINE, Grim::GrimMetaEngine);
|
2009-05-25 19:21:58 +00:00
|
|
|
#endif
|