Skip to content

Commit

Permalink
XEEN: Added skeletons for Clouds, Dark Side, and World of Xeen engines
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Dec 25, 2014
1 parent 977a25e commit a8da12b
Show file tree
Hide file tree
Showing 11 changed files with 267 additions and 11 deletions.
38 changes: 38 additions & 0 deletions 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
42 changes: 42 additions & 0 deletions 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 */
38 changes: 38 additions & 0 deletions 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
42 changes: 42 additions & 0 deletions 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 */
21 changes: 20 additions & 1 deletion engines/xeen/detection.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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}
};
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion engines/xeen/detection_tables.h
Expand Up @@ -38,7 +38,7 @@ static const XeenGameDescription gameDescriptions[] = {
ADGF_NO_FLAGS,
GUIO1(GUIO_NONE)
},
GType_World,
GType_WorldOfXeen,
0
},

Expand Down
3 changes: 3 additions & 0 deletions 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 \
Expand Down
36 changes: 36 additions & 0 deletions 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
41 changes: 41 additions & 0 deletions 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 */
3 changes: 0 additions & 3 deletions engines/xeen/xeen.cpp
Expand Up @@ -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
12 changes: 6 additions & 6 deletions engines/xeen/xeen.h
Expand Up @@ -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
};

Expand Down Expand Up @@ -80,13 +80,13 @@ class XeenEngine : public Engine {
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
Expand Down

0 comments on commit a8da12b

Please sign in to comment.