diff options
-rw-r--r-- | base/plugins.cpp | 3 | ||||
-rwxr-xr-x | configure | 7 | ||||
-rw-r--r-- | dists/msvc8/scummvm.sln | 33 | ||||
-rw-r--r-- | dists/msvc8/scummvm.vcproj | 4 | ||||
-rw-r--r-- | engines/drascula/detection.cpp | 183 | ||||
-rw-r--r-- | engines/drascula/drascula.cpp | 104 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 81 | ||||
-rw-r--r-- | engines/drascula/module.mk | 14 | ||||
-rw-r--r-- | engines/engines.mk | 6 |
9 files changed, 420 insertions, 15 deletions
diff --git a/base/plugins.cpp b/base/plugins.cpp index 382ea4f640..84f1d22501 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -131,6 +131,9 @@ public: #ifndef DISABLE_CRUISE LINK_PLUGIN(CRUISE) #endif + #ifndef DISABLE_DRASCULA + LINK_PLUGIN(DRASCULA) + #endif return pl; } @@ -63,6 +63,7 @@ _build_agi=yes _build_touche=yes _build_parallaction=yes _build_cruise=no +_build_drascula=no _build_hq_scalers=yes _build_scalers=yes @@ -353,6 +354,7 @@ Optional Features: --disable-agos don't build the AGOS engine --disable-cine don't build the Cinematique engine evo 1 --enable-cruise build the Cruise for a Corpse engine + --enable-drascula build the Drascula: The Vampire Strikes Back engine --disable-gob don't build the Gobli*ns engine --disable-kyra don't build the Legend of Kyrandia engine --enable-lure build the Lure of the Temptress engine @@ -438,6 +440,7 @@ for ac_option in $@; do --disable-touche) _build_touche=no ;; --disable-parallaction) _build_parallaction=no ;; --enable-cruise) _build_cruise=yes ;; + --enable-drascula) _build_drascula=yes ;; --disable-hq-scalers) _build_hq_scalers=no ;; --disable-scalers) _build_scalers=no ;; --enable-alsa) _alsa=yes ;; @@ -730,6 +733,7 @@ add_to_config_mk_if_no $_build_agi 'DISABLE_AGI = 1' add_to_config_mk_if_no $_build_touche 'DISABLE_TOUCHE = 1' add_to_config_mk_if_no $_build_parallaction 'DISABLE_PARALLACTION = 1' add_to_config_mk_if_no $_build_cruise 'DISABLE_CRUISE = 1' +add_to_config_mk_if_no $_build_drascula 'DISABLE_DRASCULA = 1' add_to_config_mk_if_no $_build_hq_scalers 'DISABLE_HQ_SCALERS = 1' add_to_config_mk_if_no $_build_scalers 'DISABLE_SCALERS = 1' @@ -1388,6 +1392,9 @@ fi if test "$_build_cruise" = yes ; then echo " Cinematique evo 2" fi +if test "$_build_drascula" = yes ; then + echo " Drascula" +fi echo diff --git a/dists/msvc8/scummvm.sln b/dists/msvc8/scummvm.sln index 3f36ba78e9..179e106a4e 100644 --- a/dists/msvc8/scummvm.sln +++ b/dists/msvc8/scummvm.sln @@ -3,20 +3,21 @@ Microsoft Visual Studio Solution File, Format Version 9.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scummvm", "scummvm.vcproj", "{8434CB15-D08F-427D-9E6D-581AE5B28440}" ProjectSection(ProjectDependencies) = postProject {6CC3E421-779D-4E80-8100-520886A0F9FF} = {6CC3E421-779D-4E80-8100-520886A0F9FF} - {1A1CA028-61B5-4A6C-A918-F5D8721AB1AC} = {1A1CA028-61B5-4A6C-A918-F5D8721AB1AC} - {0068957B-E2E1-4988-8C87-D541D84DAF20} = {0068957B-E2E1-4988-8C87-D541D84DAF20} - {8863B00B-059A-471E-876D-A955ECEFD0D2} = {8863B00B-059A-471E-876D-A955ECEFD0D2} - {676DB4C5-9A3E-4EE1-8483-EBB79DC0700E} = {676DB4C5-9A3E-4EE1-8483-EBB79DC0700E} - {9D9A98A0-F88F-4CA2-B8FF-462470EBE3EC} = {9D9A98A0-F88F-4CA2-B8FF-462470EBE3EC} - {976D947A-A45F-4437-991E-412F695C64C7} = {976D947A-A45F-4437-991E-412F695C64C7} - {E0EC9C72-A33E-49DA-B1DC-BB44B9799BFA} = {E0EC9C72-A33E-49DA-B1DC-BB44B9799BFA} - {F5F57066-CDF4-4F80-B9E7-7F4D21850D6E} = {F5F57066-CDF4-4F80-B9E7-7F4D21850D6E} - {6A55AF61-7CA1-49E0-9385-59C1FE9D4DB7} = {6A55AF61-7CA1-49E0-9385-59C1FE9D4DB7} - {B5527758-2F51-4CCD-AAE1-B0E28654BD6A} = {B5527758-2F51-4CCD-AAE1-B0E28654BD6A} - {D4986356-D0BB-4981-924A-854157BDF11F} = {D4986356-D0BB-4981-924A-854157BDF11F} - {1CA4AC50-5426-433A-8B5E-FFE39568098E} = {1CA4AC50-5426-433A-8B5E-FFE39568098E} - {B6AFD548-63D2-40CD-A652-E87095AFCBAF} = {B6AFD548-63D2-40CD-A652-E87095AFCBAF} + {CF888EE2-239C-40D7-83F1-1CDD4F7D56E3} = {CF888EE2-239C-40D7-83F1-1CDD4F7D56E3} {C8AAE83E-198B-4ECA-A877-166827953979} = {C8AAE83E-198B-4ECA-A877-166827953979} + {B6AFD548-63D2-40CD-A652-E87095AFCBAF} = {B6AFD548-63D2-40CD-A652-E87095AFCBAF} + {1CA4AC50-5426-433A-8B5E-FFE39568098E} = {1CA4AC50-5426-433A-8B5E-FFE39568098E} + {D4986356-D0BB-4981-924A-854157BDF11F} = {D4986356-D0BB-4981-924A-854157BDF11F} + {B5527758-2F51-4CCD-AAE1-B0E28654BD6A} = {B5527758-2F51-4CCD-AAE1-B0E28654BD6A} + {6A55AF61-7CA1-49E0-9385-59C1FE9D4DB7} = {6A55AF61-7CA1-49E0-9385-59C1FE9D4DB7} + {F5F57066-CDF4-4F80-B9E7-7F4D21850D6E} = {F5F57066-CDF4-4F80-B9E7-7F4D21850D6E} + {E0EC9C72-A33E-49DA-B1DC-BB44B9799BFA} = {E0EC9C72-A33E-49DA-B1DC-BB44B9799BFA} + {976D947A-A45F-4437-991E-412F695C64C7} = {976D947A-A45F-4437-991E-412F695C64C7} + {9D9A98A0-F88F-4CA2-B8FF-462470EBE3EC} = {9D9A98A0-F88F-4CA2-B8FF-462470EBE3EC} + {676DB4C5-9A3E-4EE1-8483-EBB79DC0700E} = {676DB4C5-9A3E-4EE1-8483-EBB79DC0700E} + {8863B00B-059A-471E-876D-A955ECEFD0D2} = {8863B00B-059A-471E-876D-A955ECEFD0D2} + {0068957B-E2E1-4988-8C87-D541D84DAF20} = {0068957B-E2E1-4988-8C87-D541D84DAF20} + {1A1CA028-61B5-4A6C-A918-F5D8721AB1AC} = {1A1CA028-61B5-4A6C-A918-F5D8721AB1AC} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sword2", "sword2.vcproj", "{6CC3E421-779D-4E80-8100-520886A0F9FF}" @@ -49,6 +50,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parallaction", "parallactio EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cruise", "cruise.vcproj", "{8863B00B-059A-471E-876D-A955ECEFD0D2}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "drascula", "drascula.vcproj", "{CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -119,6 +122,10 @@ Global {8863B00B-059A-471E-876D-A955ECEFD0D2}.Debug|Win32.Build.0 = Debug|Win32 {8863B00B-059A-471E-876D-A955ECEFD0D2}.Release|Win32.ActiveCfg = Release|Win32 {8863B00B-059A-471E-876D-A955ECEFD0D2}.Release|Win32.Build.0 = Release|Win32 + {CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}.Debug|Win32.Build.0 = Debug|Win32 + {CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}.Release|Win32.ActiveCfg = Release|Win32 + {CF888EE2-239C-40D7-83F1-1CDD4F7D56E3}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/dists/msvc8/scummvm.vcproj b/dists/msvc8/scummvm.vcproj index 9c41118229..978e6ddc3f 100644 --- a/dists/msvc8/scummvm.vcproj +++ b/dists/msvc8/scummvm.vcproj @@ -68,7 +68,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="winmm.lib sdl.lib zlib.lib libmad.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib libmpeg2.lib sword1_debug/sword1.lib sword2_debug/sword2.lib lure_debug/lure.lib cine_debug/cine.lib cruise_debug/cruise.lib kyra_debug/kyra.lib gob_debug/gob.lib queen_debug/queen.lib saga_debug/saga.lib agi_debug/agi.lib scumm_debug/scumm.lib agos_debug/agos.lib sky_debug/sky.lib parallaction_debug/parallaction.lib" + AdditionalDependencies="winmm.lib sdl.lib zlib.lib libmad.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib libmpeg2.lib sword1_debug/sword1.lib sword2_debug/sword2.lib lure_debug/lure.lib cine_debug/cine.lib cruise_debug/cruise.lib kyra_debug/kyra.lib gob_debug/gob.lib queen_debug/queen.lib saga_debug/saga.lib agi_debug/agi.lib scumm_debug/scumm.lib agos_debug/agos.lib drascula_debug/drascula.lib sky_debug/sky.lib parallaction_debug/parallaction.lib" OutputFile="$(OutDir)/scummvm.exe" LinkIncremental="2" IgnoreDefaultLibraryNames="libc.lib;libcmt.lib" @@ -158,7 +158,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="winmm.lib sdl.lib zlib.lib libmad.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib libmpeg2.lib saga_release/saga.lib agi_release/agi.lib sword1_release/sword1.lib sword2_release/sword2.lib lure_release/lure.lib cine_release/cine.lib cruise_release/cruise.lib kyra_release/kyra.lib gob_release/gob.lib queen_release/queen.lib scumm_release/scumm.lib agos_release/agos.lib sky_release/sky.lib parallaction_release/parallaction.lib" + AdditionalDependencies="winmm.lib sdl.lib zlib.lib libmad.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib libmpeg2.lib saga_release/saga.lib agi_release/agi.lib sword1_release/sword1.lib sword2_release/sword2.lib lure_release/lure.lib cine_release/cine.lib cruise_release/cruise.lib kyra_release/kyra.lib gob_release/gob.lib queen_release/queen.lib scumm_release/scumm.lib agos_release/agos.lib sky_release/sky.lib drascula_release/drascula.lib parallaction_release/parallaction.lib" OutputFile="$(OutDir)/scummvm.exe" LinkIncremental="1" SuppressStartupBanner="true" diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp new file mode 100644 index 0000000000..7748b71bd2 --- /dev/null +++ b/engines/drascula/detection.cpp @@ -0,0 +1,183 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program 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 General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "common/stdafx.h" + +#include "base/plugins.h" + +#include "common/advancedDetector.h" +#include "common/file.h" + +#include "drascula/drascula.h" + + +namespace Drascula { + +struct DrasculaGameDescription { + Common::ADGameDescription desc; + + int gameID; + int gameType; + uint32 features; + uint16 version; +}; + +uint32 DrasculaEngine::getGameID() const { + return _gameDescription->gameID; +} + +uint32 DrasculaEngine::getFeatures() const { + return _gameDescription->features; +} + +Common::Platform DrasculaEngine::getPlatform() const { + return _gameDescription->desc.platform; +} + +uint16 DrasculaEngine::getVersion() const { + return _gameDescription->version; +} + +} + +static const PlainGameDescriptor drasculaGames[] = { + {"drascula", "Drascula game"}, + + {0, 0} +}; + + +namespace Drascula { + +static const DrasculaGameDescription gameDescriptions[] = { +/* + { + // Drascula English + { + "drascula", + "English", + AD_ENTRY1("logdir", "9c4a5b09cc3564bc48b4766e679ea332"), + Common::EN_ANY, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + 0, + 0, + 0, + 0, + }, + + { + // Drascula Spanish + { + "drascula", + "Spanish", + AD_ENTRY1("logdir", "9c4a5b09cc3564bc48b4766e679ea332"), + Common::EN_ANY, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + 0, + 0, + 0, + 0, + }, +*/ + { AD_TABLE_END_MARKER, 0, 0, 0, 0 } +}; + +/** + * The fallback game descriptor used by the Drascula engine's fallbackDetector. + * Contents of this struct are to be overwritten by the fallbackDetector. + */ +static DrasculaGameDescription g_fallbackDesc = { + { + "", // Not used by the fallback descriptor, it uses the EncapsulatedADGameDesc's gameid + "", // Not used by the fallback descriptor, it uses the EncapsulatedADGameDesc's extra + AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor + Common::UNK_LANG, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + 0, + 0, + 0, + 0, +}; + +Common::EncapsulatedADGameDesc fallbackDetector(const FSList *fslist) { + // Set the default values for the fallback descriptor's ADGameDescription part. + g_fallbackDesc.desc.language = Common::UNK_LANG; + g_fallbackDesc.desc.platform = Common::kPlatformPC; + g_fallbackDesc.desc.flags = Common::ADGF_NO_FLAGS; + + // Set default values for the fallback descriptor's DrasculaGameDescription part. + g_fallbackDesc.gameID = 0; + g_fallbackDesc.features = 0; + g_fallbackDesc.version = 0; + + Common::EncapsulatedADGameDesc result; + + return result; +} + +} // End of namespace Drascula + +static const Common::ADParams detectionParams = { + // Pointer to ADGameDescription or its superset structure + (const byte *)Drascula::gameDescriptions, + // Size of that superset structure + sizeof(Drascula::DrasculaGameDescription), + // Number of bytes to compute MD5 sum for + 5000, + // List of all engine targets + drasculaGames, + // Structure for autoupgrading obsolete targets + 0, + // Name of single gameid (optional) + "drascula", + // List of files for file-based fallback detection (optional) + 0, + // Fallback callback + Drascula::fallbackDetector, + // Flags + Common::kADFlagAugmentPreferredTarget +}; + +ADVANCED_DETECTOR_DEFINE_PLUGIN(DRASCULA, Drascula::DrasculaEngine, detectionParams); + +REGISTER_PLUGIN(DRASCULA, "Drascula Engine", "Drascula Engine (C) 2000 Alcachofa Soft, 1996 (C) Digital Dreams Multimedia, 1994 (C) Emilio de Paz"); + +namespace Drascula { + +bool DrasculaEngine::initGame() { + Common::EncapsulatedADGameDesc encapsulatedDesc = Common::AdvancedDetector::detectBestMatchingGame(detectionParams); + _gameDescription = (const DrasculaGameDescription *)(encapsulatedDesc.realDesc); + + return (_gameDescription != 0); +} + +} // End of namespace Drascula + diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp new file mode 100644 index 0000000000..abf5d182f4 --- /dev/null +++ b/engines/drascula/drascula.cpp @@ -0,0 +1,104 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program 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 General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $UR$ + * $Id$ + * + */ + +#include "common/stdafx.h" + +#include "common/events.h" +#include "common/file.h" +#include "common/savefile.h" +#include "common/config-manager.h" + +#include "base/plugins.h" +#include "base/version.h" + +#include "sound/mixer.h" + +#include "drascula/drascula.h" + +namespace Drascula { + +struct GameSettings { + const char *gameid; + const char *description; + byte id; + uint32 features; + const char *detectname; +}; + +static const GameSettings agiSettings[] = { + {"drascula", "Drascula game", 0, 0, 0}, + + {NULL, NULL, 0, 0, NULL} +}; + +DrasculaEngine::DrasculaEngine(OSystem *syst) : Engine(syst) { + + // Setup mixer + if (!_mixer->isReady()) { + warning("Sound initialization failed."); + } + + _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); + + const GameSettings *g; + + const char *gameid = ConfMan.get("gameid").c_str(); + for (g = agiSettings; g->gameid; ++g) + if (!scumm_stricmp(g->gameid, gameid)) + _gameId = g->id; + + _rnd = new Common::RandomSource(); + +} + +DrasculaEngine::~DrasculaEngine() { + delete _rnd; +} + +int DrasculaEngine::init() { + // Detect game + if (!initGame()) { + GUIErrorMessage("No valid games were found in the specified directory."); + return -1; + } + + // Initialize backend + _system->beginGFXTransaction(); + initCommonGFX(false); + _system->initSize(320, 200); + _system->endGFXTransaction(); + + return 0; +} + +int DrasculaEngine::go() { + + //runGame(); + + return 0; +} + +} // End of namespace Drascula diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h new file mode 100644 index 0000000000..ff3e77c798 --- /dev/null +++ b/engines/drascula/drascula.h @@ -0,0 +1,81 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program 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 General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef DRASCULA_H +#define DRASCULA_H + +#include "common/stdafx.h" +#include "common/scummsys.h" +#include "common/endian.h" +#include "common/util.h" +#include "common/file.h" +#include "common/savefile.h" +#include "common/system.h" +#include "common/hash-str.h" + +#include "engines/engine.h" + +namespace Drascula { + +enum DrasculaGameFeatures { +}; + +struct DrasculaGameDescription; + + +class DrasculaEngine : public ::Engine { + int _gameId; + +protected: + + int init(); + int go(); +// void shutdown(); + + bool initGame(); + +public: + DrasculaEngine(OSystem *syst); + virtual ~DrasculaEngine(); + int getGameId() { + return _gameId; + } + + Common::RandomSource *_rnd; + const DrasculaGameDescription *_gameDescription; + uint32 getGameID() const; + uint32 getFeatures() const; + uint16 getVersion() const; + Common::Platform getPlatform() const; + +private: + +public: + +}; + +} // End of namespace Drascula + +#endif /* DRASCULA_H */ diff --git a/engines/drascula/module.mk b/engines/drascula/module.mk new file mode 100644 index 0000000000..51fb965915 --- /dev/null +++ b/engines/drascula/module.mk @@ -0,0 +1,14 @@ +MODULE := engines/drascula + +MODULE_OBJS = \ + detection.o \ + drascula.o + + +# This module can be built as a plugin +ifdef BUILD_PLUGINS +PLUGIN := 1 +endif + +# Include common rules +include $(srcdir)/rules.mk diff --git a/engines/engines.mk b/engines/engines.mk index b141d66585..2d6031ff12 100644 --- a/engines/engines.mk +++ b/engines/engines.mk @@ -96,3 +96,9 @@ DEFINES += -DDISABLE_CRUISE else MODULES += engines/cruise endif + +ifdef DISABLE_DRASCULA +DEFINES += -DDISABLE_DRASCULA +else +MODULES += engines/drascula +endif |