mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 00:42:24 +00:00
XEEN: Added skeleton child engine for Swords of Xeen
This commit is contained in:
parent
565719f3fa
commit
e0ea40c3e3
@ -22,6 +22,7 @@
|
||||
|
||||
#include "xeen/xeen.h"
|
||||
#include "xeen/worldofxeen/worldofxeen.h"
|
||||
#include "xeen/swordsofxeen/swordsofxeen.h"
|
||||
|
||||
#include "base/plugins.h"
|
||||
#include "common/savefile.h"
|
||||
@ -66,6 +67,7 @@ static const PlainGameDescriptor XeenGames[] = {
|
||||
{ "clouds", "Clouds of Xeen" },
|
||||
{ "darkside", "Dark Side of Xeen" },
|
||||
{ "worldofxeen", "World of Xeen" },
|
||||
{ "swordsofxeen", "Swords of Xeen" },
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
@ -82,7 +84,7 @@ public:
|
||||
}
|
||||
|
||||
virtual const char *getOriginalCopyright() const {
|
||||
return "Xeen Engine (c) ???";
|
||||
return "Xeen Engine (c) 1992-1993 New World Computing, Inc.";
|
||||
}
|
||||
|
||||
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||
@ -121,6 +123,9 @@ bool XeenMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
|
||||
case Xeen::GType_WorldOfXeen:
|
||||
*engine = new Xeen::WorldOfXeen::WorldOfXeenEngine(syst, gd);
|
||||
break;
|
||||
case Xeen::GType_Swords:
|
||||
*engine = new Xeen::SwordsOfXeen::SwordsOfXeenEngine(syst, gd);
|
||||
break;
|
||||
default:
|
||||
error("Invalid game");
|
||||
}
|
||||
|
@ -80,6 +80,24 @@ static const XeenGameDescription gameDescriptions[] = {
|
||||
0
|
||||
},
|
||||
|
||||
{
|
||||
// Swords of Xeen (GOG)
|
||||
{
|
||||
"swordsofxeen",
|
||||
nullptr,
|
||||
{
|
||||
{"swrd.cc", 0, "0d51c3457070cc7d1a596da9241924a5", 13026924 },
|
||||
AD_LISTEND
|
||||
},
|
||||
Common::EN_ANY,
|
||||
Common::kPlatformDOS,
|
||||
ADGF_NO_FLAGS,
|
||||
GUIO1(GUIO_NONE)
|
||||
},
|
||||
GType_Swords,
|
||||
0
|
||||
},
|
||||
|
||||
{ AD_TABLE_END_MARKER, 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -221,16 +221,22 @@ FileManager::FileManager(XeenEngine *vm) {
|
||||
Common::File f;
|
||||
_isDarkCc = vm->getGameID() == GType_DarkSide;
|
||||
|
||||
File::_xeenCc = (vm->getGameID() == GType_DarkSide) ? nullptr :
|
||||
new CCArchive("xeen.cc", "xeen", true);
|
||||
File::_darkCc = (vm->getGameID() == GType_Clouds) ? nullptr :
|
||||
new CCArchive("dark.cc", "dark", true);
|
||||
if (vm->getGameID() == GType_Swords) {
|
||||
File::_xeenCc = nullptr;
|
||||
File::_darkCc = new CCArchive("swrd.cc", "xeen", true);
|
||||
} else {
|
||||
File::_xeenCc = (vm->getGameID() == GType_DarkSide) ? nullptr :
|
||||
new CCArchive("xeen.cc", "xeen", true);
|
||||
File::_darkCc = (vm->getGameID() == GType_Clouds) ? nullptr :
|
||||
new CCArchive("dark.cc", "dark", true);
|
||||
}
|
||||
|
||||
if (Common::File::exists("intro.cc")) {
|
||||
CCArchive *introCc = new CCArchive("intro.cc", "intro", true);
|
||||
SearchMan.add("intro", introCc);
|
||||
}
|
||||
|
||||
File::_currentArchive = vm->getGameID() == GType_DarkSide ?
|
||||
File::_currentArchive = vm->getGameID() == GType_DarkSide || vm->getGameID() == GType_Swords ?
|
||||
File::_darkCc : File::_xeenCc;
|
||||
assert(File::_currentArchive);
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ MODULE_OBJS := \
|
||||
worldofxeen/worldofxeen_menu.o \
|
||||
worldofxeen/worldofxeen.o \
|
||||
worldofxeen/worldofxeen_resources.o \
|
||||
swordsofxeen/swordsofxeen.o \
|
||||
character.o \
|
||||
combat.o \
|
||||
cutscenes.o \
|
||||
|
@ -43,12 +43,12 @@ SavesManager::SavesManager(const Common::String &targetName): _targetName(target
|
||||
File::_darkSave = new SaveArchive(g_vm->_party);
|
||||
File::_darkSave->reset(File::_darkCc);
|
||||
}
|
||||
if (g_vm->getGameID() != GType_DarkSide) {
|
||||
if (g_vm->getGameID() != GType_DarkSide && g_vm->getGameID() != GType_Swords) {
|
||||
File::_xeenSave = new SaveArchive(g_vm->_party);
|
||||
File::_xeenSave->reset(File::_xeenCc);
|
||||
}
|
||||
|
||||
File::_currentSave = g_vm->getGameID() == GType_DarkSide ?
|
||||
File::_currentSave = g_vm->getGameID() == GType_DarkSide || g_vm->getGameID() == GType_Swords ?
|
||||
File::_darkSave : File::_xeenSave;
|
||||
assert(File::_currentSave);
|
||||
|
||||
|
47
engines/xeen/swordsofxeen/swordsofxeen.cpp
Normal file
47
engines/xeen/swordsofxeen/swordsofxeen.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "xeen/swordsofxeen/swordsofxeen.h"
|
||||
|
||||
namespace Xeen {
|
||||
namespace SwordsOfXeen {
|
||||
|
||||
SwordsOfXeenEngine::SwordsOfXeenEngine(OSystem *syst, const XeenGameDescription *gameDesc)
|
||||
: XeenEngine(syst, gameDesc) {
|
||||
}
|
||||
|
||||
void SwordsOfXeenEngine::outerGameLoop() {
|
||||
// TODO: Implement Swords of Xeen main menu
|
||||
|
||||
playGame();
|
||||
}
|
||||
|
||||
void SwordsOfXeenEngine::death() {
|
||||
error("TODO: Swords of Xeen death screen");
|
||||
}
|
||||
|
||||
void SwordsOfXeenEngine::showCutscene(const Common::String &name, int status, uint score) {
|
||||
_quitMode = QMODE_MENU;
|
||||
}
|
||||
|
||||
} // End of namespace SwordsOfXeen
|
||||
} // End of namespace Xeen
|
63
engines/xeen/swordsofxeen/swordsofxeen.h
Normal file
63
engines/xeen/swordsofxeen/swordsofxeen.h
Normal file
@ -0,0 +1,63 @@
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef XEEN_SWORDSOFXEEN_SWORDSOFXEEN_H
|
||||
#define XEEN_SWORDSOFXEEN_SWORDSOFXEEN_H
|
||||
|
||||
#include "xeen/xeen.h"
|
||||
#include "xeen/worldofxeen/worldofxeen_cutscenes.h"
|
||||
|
||||
namespace Xeen {
|
||||
namespace SwordsOfXeen {
|
||||
|
||||
/**
|
||||
* Implements a descendant of the base Xeen engine to handle
|
||||
* Swords of Xeen specific game code
|
||||
*/
|
||||
class SwordsOfXeenEngine: public XeenEngine {
|
||||
protected:
|
||||
/**
|
||||
* Outer gameplay loop responsible for dispatching control to game-specific
|
||||
* intros, main menus, or to play the actual game
|
||||
*/
|
||||
virtual void outerGameLoop();
|
||||
|
||||
/**
|
||||
* Death cutscene
|
||||
*/
|
||||
virtual void death();
|
||||
public:
|
||||
SwordsOfXeenEngine(OSystem *syst, const XeenGameDescription *gameDesc);
|
||||
virtual ~SwordsOfXeenEngine() {}
|
||||
|
||||
/**
|
||||
* Show a cutscene
|
||||
*/
|
||||
virtual void showCutscene(const Common::String &name, int status, uint score);
|
||||
};
|
||||
|
||||
#define SWORDS_VM (*(::Xeen::SwordsOfXeen::SwordsOfXeenEngine *)g_vm)
|
||||
|
||||
} // End of namespace SwordsOfXeen
|
||||
} // End of namespace Xeen
|
||||
|
||||
#endif /* XEEN_SWORDSOFXEEN_SWORDSOFXEEN_H */
|
@ -165,7 +165,8 @@ void XeenEngine::play() {
|
||||
_screen->loadBackground("back.raw");
|
||||
_screen->loadPalette("mm4.pal");
|
||||
|
||||
if (getGameID() != GType_WorldOfXeen && !_map->_loadDarkSide) {
|
||||
if (getGameID() != GType_WorldOfXeen && getGameID() != GType_Swords
|
||||
&& !_map->_loadDarkSide) {
|
||||
_map->_loadDarkSide = true;
|
||||
_party->_mazeId = 29;
|
||||
_party->_mazeDirection = DIR_NORTH;
|
||||
|
Loading…
x
Reference in New Issue
Block a user