diff options
author | James Brown | 2004-04-09 12:36:06 +0000 |
---|---|---|
committer | James Brown | 2004-04-09 12:36:06 +0000 |
commit | 3978b728dbaad08a112f2f3b980221dea57523bb (patch) | |
tree | eb9a891d67ea204782829758ab54620a23d44928 /kyra | |
parent | 86a546652633b6768656ffe747b56f37931b3cc7 (diff) | |
download | scummvm-rg350-3978b728dbaad08a112f2f3b980221dea57523bb.tar.gz scummvm-rg350-3978b728dbaad08a112f2f3b980221dea57523bb.tar.bz2 scummvm-rg350-3978b728dbaad08a112f2f3b980221dea57523bb.zip |
Add Kyrandia base
svn-id: r13516
Diffstat (limited to 'kyra')
-rw-r--r-- | kyra/.cvsignore | 1 | ||||
-rw-r--r-- | kyra/kyra.cpp | 101 | ||||
-rw-r--r-- | kyra/kyra.h | 49 | ||||
-rw-r--r-- | kyra/kyra.o | bin | 0 -> 66348 bytes | |||
-rw-r--r-- | kyra/libkyra.a | bin | 0 -> 67154 bytes | |||
-rw-r--r-- | kyra/module.mk | 15 |
6 files changed, 166 insertions, 0 deletions
diff --git a/kyra/.cvsignore b/kyra/.cvsignore new file mode 100644 index 0000000000..39a06683b7 --- /dev/null +++ b/kyra/.cvsignore @@ -0,0 +1 @@ +.deps diff --git a/kyra/kyra.cpp b/kyra/kyra.cpp new file mode 100644 index 0000000000..242395e75c --- /dev/null +++ b/kyra/kyra.cpp @@ -0,0 +1,101 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2003 The ScummVM project + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Header$ + * + */ + +#include "stdafx.h" + +#include "base/gameDetector.h" +#include "base/plugins.h" +#include "backends/fs/fs.h" + +#include "sound/mixer.h" +#include "common/file.h" +#include "common/config-manager.h" +#include "kyra.h" + +static const GameSettings kyra_setting = + { "kyra", "Legend of Kyrandia", 0 }; + +GameList Engine_KYRA_gameList() { + GameList games; + + games.push_back(kyra_setting); + return games; +} + +// TODO: Improve this :) +DetectedGameList Engine_KYRA_detectGames(const FSList &fslist) { + DetectedGameList detectedGames; + File test_file; + + printf("Detecting Kyra...\n"); + + // Iterate over all files in the given directory + for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { + const char *name = file->displayName().c_str(); + if ((0 == scumm_stricmp("chapter1.vrm", name)) || + (0 == scumm_stricmp("chapter5.vrm", name))) { + detectedGames.push_back(kyra_setting); + break; + } + } + + return detectedGames; +} + +Engine *Engine_KYRA_create(GameDetector *detector, OSystem *syst) { + return new Kyra::KyraEngine(detector, syst); +} + +REGISTER_PLUGIN("Legend of Kyrandia Engine", Engine_KYRA_gameList, Engine_KYRA_create, Engine_KYRA_detectGames) + +namespace Kyra { +KyraEngine::KyraEngine(GameDetector *detector, OSystem *syst) + : Engine(syst) { + + // Setup mixer + if (!_mixer->isReady()) { + warning("Sound initialization failed."); + } + + _mixer->setVolume(ConfMan.getInt("sfx_volume") * ConfMan.getInt("master_volume") / 255); + + //getGameDataPath(); + + // Initialize backend + syst->initSize(320, 240); +} + +KyraEngine::~KyraEngine() { +} + +void KyraEngine::errorString(const char *buf1, char *buf2) { + strcpy(buf2, buf1); +} + +void KyraEngine::go() { + warning("Kyrandia Engine ::go()"); +} + +void KyraEngine::shutdown() { + _system->quit(); +} +} // End of namespace KYRA + diff --git a/kyra/kyra.h b/kyra/kyra.h new file mode 100644 index 0000000000..9bcf09e3c4 --- /dev/null +++ b/kyra/kyra.h @@ -0,0 +1,49 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2003 The ScummVM project + * + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Header$ + * + */ + +#ifndef KYRA_H +#define KYRA_H + +#include "common/scummsys.h" +#include "base/engine.h" +#include "base/gameDetector.h" +#include "common/util.h" + +namespace Kyra { + +class KyraEngine : public Engine { + + void errorString( const char *buf_input, char *buf_output); + +protected: + void go(); + void shutdown(); + +public: + + KyraEngine(GameDetector *detector, OSystem *syst); + virtual ~KyraEngine(); + +}; + +} // End of namespace Kyra + +#endif diff --git a/kyra/kyra.o b/kyra/kyra.o Binary files differnew file mode 100644 index 0000000000..59a0c31fd9 --- /dev/null +++ b/kyra/kyra.o diff --git a/kyra/libkyra.a b/kyra/libkyra.a Binary files differnew file mode 100644 index 0000000000..11359e0af3 --- /dev/null +++ b/kyra/libkyra.a diff --git a/kyra/module.mk b/kyra/module.mk new file mode 100644 index 0000000000..bf81faf477 --- /dev/null +++ b/kyra/module.mk @@ -0,0 +1,15 @@ +MODULE := kyra + +MODULE_OBJS = \ + kyra/kyra.o + +MODULE_DIRS += \ + kyra + +# This module can be built as a plugin +ifdef BUILD_PLUGINS +PLUGIN := 1 +endif + +# Include common rules +include $(srcdir)/common.rules |