Added an empty Myst 3 engine

This commit is contained in:
Bastien Bouclet 2009-09-14 16:26:56 +02:00
parent ca30d2f5f2
commit fc7f7fa11c
7 changed files with 246 additions and 0 deletions

View file

@ -88,6 +88,9 @@ public:
#if PLUGIN_ENABLED_STATIC(GRIM)
LINK_PLUGIN(GRIM)
#endif
#if PLUGIN_ENABLED_STATIC(MYST3)
LINK_PLUGIN(MYST3)
#endif
// Music plugins
// TODO: Use defines to disable or enable each MIDI driver as a

1
configure vendored
View file

@ -78,6 +78,7 @@ add_engine() {
}
add_engine grim "Grim" yes
add_engine myst3 "Myst 3" yes
#

View file

@ -2,3 +2,8 @@ ifdef ENABLE_GRIM
DEFINES += -DENABLE_GRIM=$(ENABLE_GRIM)
MODULES += engines/grim
endif
ifdef ENABLE_MYST3
DEFINES += -DENABLE_MYST3=$(ENABLE_MYST3)
MODULES += engines/myst3
endif

122
engines/myst3/detection.cpp Normal file
View file

@ -0,0 +1,122 @@
/* 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/myst3/myst3.h"
namespace Myst3 {
struct Myst3GameDescription {
ADGameDescription desc;
int flags;
};
static const PlainGameDescriptor myst3Games[] = {
{"myst3", "Myst III Exile"},
{0, 0}
};
using Common::GUIO_NONE;
static const Myst3GameDescription gameDescriptions[] = {
{
// Myst 3 French Version
{
"myst3",
0,
AD_ENTRY1s("RSRC.m3r", "a2c8ed69800f60bf5667e5c76a88e481", 1223862),
Common::FR_FRA,
Common::kPlatformPC,
ADGF_NO_FLAGS,
GUIO_NONE
},
0,
},
{ AD_TABLE_END_MARKER, 0 }
};
static const Myst3GameDescription fallbackGameDescriptions[] = {
{{"myst3", 0, {{0, 0, 0, 0}}, Common::UNK_LANG, Common::kPlatformPC, ADGF_NO_FLAGS, GUIO_NONE}, 0}
};
static const ADFileBasedFallback myst3Fallback[] = {
{&fallbackGameDescriptions[0], {"RSRC.m3r"}},
{0, {0}}
};
static const ADParams detectionParams = {
// Pointer to ADGameDescription or its superset structure
(const byte *)gameDescriptions,
// Size of that superset structure
sizeof(Myst3GameDescription),
// Number of bytes to compute MD5 sum for
5000,
// List of all engine targets
myst3Games,
// Structure for autoupgrading obsolete targets
0,
// Name of single gameid (optional)
"myst3",
// List of files for file-based fallback detection (optional)
myst3Fallback,
// Flags
0,
// Additional GUI options (for every game}
Common::GUIO_NOMIDI
};
class Myst3MetaEngine : public AdvancedMetaEngine {
public:
Myst3MetaEngine() : AdvancedMetaEngine(detectionParams) {}
virtual const char *getName() const {
return "Myst III Engine";
}
virtual const char *getOriginalCopyright() const {
return "Myst III Game (C) Presto Studios";
}
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
};
bool Myst3MetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
const Myst3GameDescription *gd = (const Myst3GameDescription *)desc;
if (gd) {
*engine = new Myst3Engine(syst, gd->flags);
}
return gd != 0;
}
} // End of namespace Myst3
#if PLUGIN_ENABLED_DYNAMIC(MYST3)
REGISTER_PLUGIN_DYNAMIC(MYST3, PLUGIN_TYPE_ENGINE, Myst3::Myst3MetaEngine);
#else
REGISTER_PLUGIN_STATIC(MYST3, PLUGIN_TYPE_ENGINE, Myst3::Myst3MetaEngine);
#endif

13
engines/myst3/module.mk Executable file
View file

@ -0,0 +1,13 @@
MODULE := engines/myst3
MODULE_OBJS := \
detection.o \
myst3.o
# This module can be built as a plugin
ifeq ($(ENABLE_MYST3), DYNAMIC_PLUGIN)
PLUGIN := 1
endif
# Include common rules
include $(srcdir)/rules.mk

50
engines/myst3/myst3.cpp Normal file
View file

@ -0,0 +1,50 @@
/* 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 "common/events.h"
#include "common/config-manager.h"
#include "engines/engine.h"
#include "engines/myst3/myst3.h"
namespace Myst3 {
Myst3Engine::Myst3Engine(OSystem *syst, int gameFlags) :
Engine(syst) {
}
Myst3Engine::~Myst3Engine() {
}
Common::Error Myst3Engine::run() {
return Common::kNoError;
}
} // end of namespace Myst3

52
engines/myst3/myst3.h Normal file
View file

@ -0,0 +1,52 @@
/* 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$
*
*/
#ifndef MYST3_ENGINE_H
#define MYST3_ENGINE_H
#include "engines/engine.h"
#include "engines/grim/textobject.h"
namespace Myst3 {
class Myst3Engine : public Engine {
protected:
// Engine APIs
virtual Common::Error run();
public:
Myst3Engine(OSystem *syst, int gameFlags);
virtual ~Myst3Engine();
private:
};
} // end of namespace Myst3
#endif