mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-30 04:40:39 +00:00
Add Kyrandia base
svn-id: r13516
This commit is contained in:
parent
86a5466526
commit
3978b728db
@ -85,6 +85,12 @@ else
|
||||
MODULES += saga
|
||||
endif
|
||||
|
||||
ifdef DISABLE_KYRA
|
||||
DEFINES += -DDISABLE_KYRA
|
||||
else
|
||||
MODULES += kyra
|
||||
endif
|
||||
|
||||
# After the game specific modules follow the shared modules
|
||||
MODULES += \
|
||||
gui \
|
||||
|
@ -245,6 +245,10 @@ void PluginManager::loadPlugins() {
|
||||
LOAD_MODULE("queen", QUEEN);
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_KYRA
|
||||
LOAD_MODULE("kyra", KYRA);
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_SAGA
|
||||
LOAD_MODULE("saga", SAGA);
|
||||
#endif
|
||||
|
@ -165,6 +165,10 @@ DECLARE_PLUGIN(SWORD2)
|
||||
DECLARE_PLUGIN(QUEEN)
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_KYRA
|
||||
DECLARE_PLUGIN(KYRA)
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_SAGA
|
||||
DECLARE_PLUGIN(SAGA)
|
||||
#endif
|
||||
|
13
configure
vendored
13
configure
vendored
@ -38,6 +38,7 @@ _build_sky=yes
|
||||
_build_sword1=yes
|
||||
_build_sword2=yes
|
||||
_build_queen=yes
|
||||
_build_kyra=no
|
||||
_build_saga=no
|
||||
_need_memalign=no
|
||||
_build_plugins=no
|
||||
@ -212,6 +213,7 @@ Optional Features:
|
||||
--disable-sword1 don't build the Broken Sword I engine
|
||||
--disable-sword2 don't build the Broken Sword II engine
|
||||
--disable-queen don't build the Flight of the Amazon Queen engine
|
||||
--enable-kyra build the Legend of Kyrandia engine
|
||||
--enable-saga build the SAGA engine
|
||||
--enable-plugins build engines as loadable modules instead of
|
||||
static linking them
|
||||
@ -261,6 +263,7 @@ for ac_option in $@; do
|
||||
--disable-sword1) _build_sword1=no ;;
|
||||
--disable-sword2) _build_sword2=no ;;
|
||||
--disable-queen) _build_queen=no ;;
|
||||
--enable-kyra) _build_kyra=yes ;;
|
||||
--enable-saga) _build_saga=yes ;;
|
||||
--enable-alsa) _alsa=yes ;;
|
||||
--disable-alsa) _alsa=no ;;
|
||||
@ -478,6 +481,12 @@ else
|
||||
_mak_queen='# DISABLE_QUEEN = 1'
|
||||
fi
|
||||
|
||||
if test "$_build_kyra" = no ; then
|
||||
_mak_queen='DISABLE_KYRA = 1'
|
||||
else
|
||||
_mak_queen='# DISABLE_KYRA = 1'
|
||||
fi
|
||||
|
||||
if test "$_build_saga" = no ; then
|
||||
_mak_saga='DISABLE_SAGA = 1'
|
||||
else
|
||||
@ -848,6 +857,9 @@ fi
|
||||
if test "$_build_saga" = yes ; then
|
||||
echo " SAGA Engine"
|
||||
fi
|
||||
if test "$_build_kyra" = yes ; then
|
||||
echo " Legend of Kyrandia"
|
||||
fi
|
||||
echo
|
||||
|
||||
echo_n "Backend... "
|
||||
@ -934,6 +946,7 @@ $_mak_sky
|
||||
$_mak_sword1
|
||||
$_mak_sword2
|
||||
$_mak_queen
|
||||
$_mak_kyra
|
||||
$_mak_saga
|
||||
|
||||
INCLUDES += $INCLUDES
|
||||
|
1
kyra/.cvsignore
Normal file
1
kyra/.cvsignore
Normal file
@ -0,0 +1 @@
|
||||
.deps
|
101
kyra/kyra.cpp
Normal file
101
kyra/kyra.cpp
Normal file
@ -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
|
||||
|
49
kyra/kyra.h
Normal file
49
kyra/kyra.h
Normal file
@ -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
|
BIN
kyra/kyra.o
Normal file
BIN
kyra/kyra.o
Normal file
Binary file not shown.
BIN
kyra/libkyra.a
Normal file
BIN
kyra/libkyra.a
Normal file
Binary file not shown.
15
kyra/module.mk
Normal file
15
kyra/module.mk
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user