From a8da12bbe4684183cbe4d5c6ac480af2515d07cf Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 25 Dec 2014 17:02:51 +1100 Subject: XEEN: Added skeletons for Clouds, Dark Side, and World of Xeen engines --- engines/xeen/clouds/clouds_game.cpp | 38 ++++++++++++++++++++++++ engines/xeen/clouds/clouds_game.h | 42 +++++++++++++++++++++++++++ engines/xeen/darkside/darkside_game.cpp | 38 ++++++++++++++++++++++++ engines/xeen/darkside/darkside_game.h | 42 +++++++++++++++++++++++++++ engines/xeen/detection.cpp | 21 +++++++++++++- engines/xeen/detection_tables.h | 2 +- engines/xeen/module.mk | 3 ++ engines/xeen/worldofxeen/worldofxeen_game.cpp | 36 +++++++++++++++++++++++ engines/xeen/worldofxeen/worldofxeen_game.h | 41 ++++++++++++++++++++++++++ engines/xeen/xeen.cpp | 3 -- engines/xeen/xeen.h | 12 ++++---- 11 files changed, 267 insertions(+), 11 deletions(-) create mode 100644 engines/xeen/clouds/clouds_game.cpp create mode 100644 engines/xeen/clouds/clouds_game.h create mode 100644 engines/xeen/darkside/darkside_game.cpp create mode 100644 engines/xeen/darkside/darkside_game.h create mode 100644 engines/xeen/worldofxeen/worldofxeen_game.cpp create mode 100644 engines/xeen/worldofxeen/worldofxeen_game.h (limited to 'engines/xeen') diff --git a/engines/xeen/clouds/clouds_game.cpp b/engines/xeen/clouds/clouds_game.cpp new file mode 100644 index 0000000000..4987ce05dd --- /dev/null +++ b/engines/xeen/clouds/clouds_game.cpp @@ -0,0 +1,38 @@ +/* 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/clouds/clouds_game.h" + +namespace Xeen { + +CloudsEngine::CloudsEngine(OSystem *syst, const XeenGameDescription *gameDesc) + : XeenEngine(syst, gameDesc) { +} + +void CloudsEngine::playGame() { + cloudsIntro(); +} + +void CloudsEngine::cloudsIntro() { +} + +} // End of namespace Xeen diff --git a/engines/xeen/clouds/clouds_game.h b/engines/xeen/clouds/clouds_game.h new file mode 100644 index 0000000000..a8c4fbea3b --- /dev/null +++ b/engines/xeen/clouds/clouds_game.h @@ -0,0 +1,42 @@ +/* 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_CLOUDS_GAME_H +#define XEEN_CLOUDS_GAME_H + +#include "xeen/xeen.h" + +namespace Xeen { + +class CloudsEngine : virtual public XeenEngine { +protected: + void cloudsIntro(); + + virtual void playGame(); +public: + CloudsEngine(OSystem *syst, const XeenGameDescription *gameDesc); + virtual ~CloudsEngine() {} +}; + +} // End of namespace Xeen + +#endif /* XEEN_CLOUDS_GAME_H */ diff --git a/engines/xeen/darkside/darkside_game.cpp b/engines/xeen/darkside/darkside_game.cpp new file mode 100644 index 0000000000..bc0d156f7f --- /dev/null +++ b/engines/xeen/darkside/darkside_game.cpp @@ -0,0 +1,38 @@ +/* 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/darkside/darkside_game.h" + +namespace Xeen { + +DarkSideEngine::DarkSideEngine(OSystem *syst, const XeenGameDescription *gameDesc) + : XeenEngine(syst, gameDesc) { +} + +void DarkSideEngine::playGame() { + playGame(); +} + +void DarkSideEngine::darkSideIntro() { +} + +} // End of namespace Xeen diff --git a/engines/xeen/darkside/darkside_game.h b/engines/xeen/darkside/darkside_game.h new file mode 100644 index 0000000000..827ba2088d --- /dev/null +++ b/engines/xeen/darkside/darkside_game.h @@ -0,0 +1,42 @@ +/* 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_DARKSIDE_GAME_H +#define XEEN_DARKSIDE_GAME_H + +#include "xeen/xeen.h" + +namespace Xeen { + +class DarkSideEngine : virtual public XeenEngine { +protected: + void darkSideIntro(); + + virtual void playGame(); +public: + DarkSideEngine(OSystem *syst, const XeenGameDescription *gameDesc); + virtual ~DarkSideEngine() {} +}; + +} // End of namespace Xeen + +#endif /* XEEN_DARKSIDE_GAME_H */ diff --git a/engines/xeen/detection.cpp b/engines/xeen/detection.cpp index 2b30478808..3bd4c22f97 100644 --- a/engines/xeen/detection.cpp +++ b/engines/xeen/detection.cpp @@ -21,6 +21,9 @@ */ #include "xeen/xeen.h" +#include "xeen/clouds/clouds_game.h" +#include "xeen/darkside/darkside_game.h" +#include "xeen/worldofxeen/worldofxeen_game.h" #include "base/plugins.h" #include "common/savefile.h" @@ -62,6 +65,8 @@ Common::Platform XeenEngine::getPlatform() const { static const PlainGameDescriptor XeenGames[] = { { "xeen", "Xeen" }, + { "clouds", "Clouds of Xeen" }, + { "darkside", "Dark Side of Xeen" }, { "worldofxeen", "World of Xeen" }, {0, 0} }; @@ -108,7 +113,21 @@ bool Xeen::XeenEngine::hasFeature(EngineFeature f) const { bool XeenMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const { const Xeen::XeenGameDescription *gd = (const Xeen::XeenGameDescription *)desc; - *engine = new Xeen::XeenEngine(syst, gd); + + switch (gd->gameID) { + case Xeen::GType_Clouds: + *engine = new Xeen::CloudsEngine(syst, gd); + break; + case Xeen::GType_DarkSide: + *engine = new Xeen::DarkSideEngine(syst, gd); + break; + case Xeen::GType_WorldOfXeen: + *engine = new Xeen::WorldOfXeenEngine(syst, gd); + break; + default: + break; + } + return gd != 0; } diff --git a/engines/xeen/detection_tables.h b/engines/xeen/detection_tables.h index e106abf8cd..0735daa507 100644 --- a/engines/xeen/detection_tables.h +++ b/engines/xeen/detection_tables.h @@ -38,7 +38,7 @@ static const XeenGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO1(GUIO_NONE) }, - GType_World, + GType_WorldOfXeen, 0 }, diff --git a/engines/xeen/module.mk b/engines/xeen/module.mk index d129d10efe..b02d26d58c 100644 --- a/engines/xeen/module.mk +++ b/engines/xeen/module.mk @@ -1,6 +1,9 @@ MODULE := engines/xeen MODULE_OBJS := \ + clouds\clouds_game.o \ + darkside\darkside_game.o \ + worldofxeen\worldofxeen_game.o \ debugger.o \ detection.o \ resources.o \ diff --git a/engines/xeen/worldofxeen/worldofxeen_game.cpp b/engines/xeen/worldofxeen/worldofxeen_game.cpp new file mode 100644 index 0000000000..f27b8b9380 --- /dev/null +++ b/engines/xeen/worldofxeen/worldofxeen_game.cpp @@ -0,0 +1,36 @@ +/* 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/worldofxeen/worldofxeen_game.h" + +namespace Xeen { + +WorldOfXeenEngine::WorldOfXeenEngine(OSystem *syst, const XeenGameDescription *gameDesc) + : CloudsEngine(syst, gameDesc), DarkSideEngine(syst, gameDesc), + XeenEngine(syst, gameDesc) { +} + +void WorldOfXeenEngine::playGame () { + darkSideIntro(); +} + +} // End of namespace Xeen diff --git a/engines/xeen/worldofxeen/worldofxeen_game.h b/engines/xeen/worldofxeen/worldofxeen_game.h new file mode 100644 index 0000000000..7227e11fc4 --- /dev/null +++ b/engines/xeen/worldofxeen/worldofxeen_game.h @@ -0,0 +1,41 @@ +/* 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_WORLDOFXEEN_GAME_H +#define XEEN_WORLDOFXEEN_GAME_H + +#include "xeen/clouds/clouds_game.h" +#include "xeen/darkside/darkside_game.h" + +namespace Xeen { + +class WorldOfXeenEngine : public DarkSideEngine, CloudsEngine { +protected: + virtual void playGame(); +public: + WorldOfXeenEngine(OSystem *syst, const XeenGameDescription *gameDesc); + virtual ~WorldOfXeenEngine() {} +}; + +} // End of namespace Xeen + +#endif /* XEEN_WORLDOFXEEN_GAME_H */ diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp index 12871fda91..73f0c24d9f 100644 --- a/engines/xeen/xeen.cpp +++ b/engines/xeen/xeen.cpp @@ -205,9 +205,6 @@ void XeenEngine::writeSavegameHeader(Common::OutSaveFile *out, XeenSavegameHeade } void XeenEngine::playGame() { - // TODO - // Test resource manager - File f("FNT"); } } // End of namespace Xeen diff --git a/engines/xeen/xeen.h b/engines/xeen/xeen.h index 2566c1b1eb..e5122ce147 100644 --- a/engines/xeen/xeen.h +++ b/engines/xeen/xeen.h @@ -49,8 +49,8 @@ namespace Xeen { enum { GType_Clouds = 1, - GType_Dark = 2, - GType_World = 3, + GType_DarkSide = 2, + GType_WorldOfXeen = 3, GType_Swords = 4 }; @@ -80,13 +80,13 @@ private: const XeenGameDescription *_gameDescription; Common::RandomSource _randomSource; int _loadSaveSlot; -private: - void initialize(); - +protected: /** * Play the game */ - void playGame(); + virtual void playGame(); +private: + void initialize(); /** * Synchronize savegame data -- cgit v1.2.3