aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/worldofxeen
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-27 15:19:25 -0400
committerPaul Gilbert2016-08-27 15:19:25 -0400
commit552f0cce8e5af656568b4cac2a2fd665f2e8809d (patch)
tree6f4628411afde902e8632668db487aa22c71f115 /engines/xeen/worldofxeen
parentf5ab3d1cd9eb3a884b0ab5d0b154a4f9cccc74b7 (diff)
downloadscummvm-rg350-552f0cce8e5af656568b4cac2a2fd665f2e8809d.tar.gz
scummvm-rg350-552f0cce8e5af656568b4cac2a2fd665f2e8809d.tar.bz2
scummvm-rg350-552f0cce8e5af656568b4cac2a2fd665f2e8809d.zip
XEEN: Move game cutscene methods into their own classes
Diffstat (limited to 'engines/xeen/worldofxeen')
-rw-r--r--engines/xeen/worldofxeen/clouds_cutscenes.cpp (renamed from engines/xeen/worldofxeen/clouds_intro.cpp)13
-rw-r--r--engines/xeen/worldofxeen/clouds_cutscenes.h (renamed from engines/xeen/worldofxeen/darkside_intro.h)29
-rw-r--r--engines/xeen/worldofxeen/clouds_ending.cpp36
-rw-r--r--engines/xeen/worldofxeen/clouds_ending.h34
-rw-r--r--engines/xeen/worldofxeen/darkside_cutscenes.cpp (renamed from engines/xeen/worldofxeen/darkside_intro.cpp)29
-rw-r--r--engines/xeen/worldofxeen/darkside_cutscenes.h (renamed from engines/xeen/worldofxeen/clouds_intro.h)32
-rw-r--r--engines/xeen/worldofxeen/darkside_ending.cpp32
-rw-r--r--engines/xeen/worldofxeen/darkside_ending.h34
-rw-r--r--engines/xeen/worldofxeen/worldofxeen.cpp (renamed from engines/xeen/worldofxeen/worldofxeen_game.cpp)12
-rw-r--r--engines/xeen/worldofxeen/worldofxeen.h (renamed from engines/xeen/worldofxeen/worldofxeen_game.h)11
10 files changed, 91 insertions, 171 deletions
diff --git a/engines/xeen/worldofxeen/clouds_intro.cpp b/engines/xeen/worldofxeen/clouds_cutscenes.cpp
index 1ea6765761..1d578bdbea 100644
--- a/engines/xeen/worldofxeen/clouds_intro.cpp
+++ b/engines/xeen/worldofxeen/clouds_cutscenes.cpp
@@ -20,16 +20,23 @@
*
*/
-#include "xeen/worldofxeen/clouds_intro.h"
+#include "xeen/worldofxeen/clouds_cutscenes.h"
#include "xeen/sound.h"
namespace Xeen {
-bool showCloudsTitle(XeenEngine &vm) {
+bool CloudsCutscenes::showCloudsTitle() {
+ // TODO
return true;
}
-bool showCloudsIntro(XeenEngine &vm) {
+bool CloudsCutscenes::showCloudsIntro() {
+ // TODO
+ return true;
+}
+
+bool CloudsCutscenes::showCloudsEnding() {
+ // TODO
return true;
}
diff --git a/engines/xeen/worldofxeen/darkside_intro.h b/engines/xeen/worldofxeen/clouds_cutscenes.h
index e37f095347..2c2ed602ea 100644
--- a/engines/xeen/worldofxeen/darkside_intro.h
+++ b/engines/xeen/worldofxeen/clouds_cutscenes.h
@@ -20,17 +20,36 @@
*
*/
-#ifndef XEEN_DARKSIDE_INTRO_H
-#define XEEN_DARKSIDE_INTRO_H
+#ifndef XEEN_WORLDOFXEEN_CLOUDS_CUTSCENES_H
+#define XEEN_WORLDOFXEEN_CLOUDS_CUTSCENES_H
#include "xeen/xeen.h"
namespace Xeen {
-bool showDarkSideTitle(XeenEngine &vm);
+class XeenEngine;
-bool showDarkSideIntro(XeenEngine &vm);
+class CloudsCutscenes {
+private:
+ XeenEngine *_vm;
+public:
+ CloudsCutscenes(XeenEngine *vm) : _vm(vm) {}
+ /**
+ * Shows the Clouds of Xeen title screen
+ */
+ bool showCloudsTitle();
+
+ /**
+ * Shows the Clouds of Xeen intro sequence
+ */
+ bool showCloudsIntro();
+
+ /**
+ * Shows the Clouds of Xeen ending sequence
+ */
+ bool showCloudsEnding();
+};
} // End of namespace Xeen
-#endif /* XEEN_DARKSIDE_INTRO_H */
+#endif /* XEEN_WORLDOFXEEN_CLOUDS_CUTSCENES_H */
diff --git a/engines/xeen/worldofxeen/clouds_ending.cpp b/engines/xeen/worldofxeen/clouds_ending.cpp
deleted file mode 100644
index 75c8755bb7..0000000000
--- a/engines/xeen/worldofxeen/clouds_ending.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/* 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/clouds_ending.h"
-#include "xeen/sound.h"
-
-namespace Xeen {
-
-bool showCloudsEnding(XeenEngine &vm) {
- EventsManager &events = *vm._events;
- Screen &screen = *vm._screen;
- SoundManager &sound = *vm._sound;
-
- return true;
-}
-
-} // End of namespace Xeen
diff --git a/engines/xeen/worldofxeen/clouds_ending.h b/engines/xeen/worldofxeen/clouds_ending.h
deleted file mode 100644
index fc7945f2a1..0000000000
--- a/engines/xeen/worldofxeen/clouds_ending.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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_ENDING_H
-#define XEEN_CLOUDS_ENDING_H
-
-#include "xeen/xeen.h"
-
-namespace Xeen {
-
-bool showCloudsEnding(XeenEngine &vm);
-
-} // End of namespace Xeen
-
-#endif /* XEEN_CLOUDS_ENDING_H */
diff --git a/engines/xeen/worldofxeen/darkside_intro.cpp b/engines/xeen/worldofxeen/darkside_cutscenes.cpp
index 7ea03286d3..90efef1a96 100644
--- a/engines/xeen/worldofxeen/darkside_intro.cpp
+++ b/engines/xeen/worldofxeen/darkside_cutscenes.cpp
@@ -20,15 +20,17 @@
*
*/
-#include "xeen/worldofxeen/darkside_intro.h"
+#include "xeen/worldofxeen/darkside_cutscenes.h"
+#include "xeen/worldofxeen/worldofxeen.h"
#include "xeen/sound.h"
+#include "xeen/xeen.h"
namespace Xeen {
-bool showDarkSideTitle(XeenEngine &vm) {
- EventsManager &events = *vm._events;
- Screen &screen = *vm._screen;
- SoundManager &sound = *vm._sound;
+bool DarkSideCutscenes::showDarkSideTitle() {
+ EventsManager &events = *_vm->_events;
+ Screen &screen = *_vm->_screen;
+ SoundManager &sound = *_vm->_sound;
// TODO: Starting method, and sound
//sub_28F40
@@ -55,7 +57,7 @@ bool showDarkSideTitle(XeenEngine &vm) {
// Initial loop for dragon roaring
int nwcIndex = 0, nwcFrame = 0;
- for (int idx = 0; idx < 55 && !vm.shouldQuit(); ++idx) {
+ for (int idx = 0; idx < 55 && !_vm->shouldQuit(); ++idx) {
// Render the next frame
events.updateGameCounter();
screen.vertMerge(0);
@@ -83,7 +85,7 @@ bool showDarkSideTitle(XeenEngine &vm) {
}
// Loop for dragon using flyspray
- for (int idx = 0; idx < 42 && !vm.shouldQuit(); ++idx) {
+ for (int idx = 0; idx < 42 && !_vm->shouldQuit(); ++idx) {
events.updateGameCounter();
screen.vertMerge(SCREEN_HEIGHT);
nwc[3].draw(screen, idx);
@@ -132,10 +134,10 @@ bool showDarkSideTitle(XeenEngine &vm) {
return true;
}
-bool showDarkSideIntro(XeenEngine &vm) {
- EventsManager &events = *vm._events;
- Screen &screen = *vm._screen;
- SoundManager &sound = *vm._sound;
+bool DarkSideCutscenes::showDarkSideIntro() {
+ EventsManager &events = *_vm->_events;
+ Screen &screen = *_vm->_screen;
+ SoundManager &sound = *_vm->_sound;
const int XLIST1[] = {
0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 58, 60, 62
};
@@ -231,4 +233,9 @@ bool showDarkSideIntro(XeenEngine &vm) {
return true;
}
+bool DarkSideCutscenes::showDarkSideEnding() {
+ // TODO
+ return true;
+}
+
} // End of namespace Xeen
diff --git a/engines/xeen/worldofxeen/clouds_intro.h b/engines/xeen/worldofxeen/darkside_cutscenes.h
index 0bd5633315..1b78e3ea2d 100644
--- a/engines/xeen/worldofxeen/clouds_intro.h
+++ b/engines/xeen/worldofxeen/darkside_cutscenes.h
@@ -20,17 +20,35 @@
*
*/
-#ifndef XEEN_CLOUDS_INTRO_H
-#define XEEN_CLOUDS_INTRO_H
-
-#include "xeen/xeen.h"
+#ifndef XEEN_WORLDOFXEEN_DARKSIDE_CUTSCENES_H
+#define XEEN_WORLDOFXEEN_DARKSIDE_CUTSCENES_H
namespace Xeen {
-bool showCloudsTitle(XeenEngine &vm);
+class XeenEngine;
+
+class DarkSideCutscenes {
+private:
+ XeenEngine *_vm;
+public:
+ DarkSideCutscenes(XeenEngine *vm) : _vm(vm) {}
+
+ /**
+ * Shows the Dark Side of Xeen title screen
+ */
+ bool showDarkSideTitle();
+
+ /**
+ * Shows the Dark Side of Xeen intro sequence
+ */
+ bool showDarkSideIntro();
-bool showCloudsIntro(XeenEngine &vm);
+ /**
+ * Shows the Dark Side of Xeen ending sequence
+ */
+ bool showDarkSideEnding();
+};
} // End of namespace Xeen
-#endif /* XEEN_CLOUDS_INTRO_H */
+#endif /* XEEN_WORLDOFXEEN_DARKSIDE_CUTSCENES_H */
diff --git a/engines/xeen/worldofxeen/darkside_ending.cpp b/engines/xeen/worldofxeen/darkside_ending.cpp
deleted file mode 100644
index 0a8211f55c..0000000000
--- a/engines/xeen/worldofxeen/darkside_ending.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/* 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/darkside_ending.h"
-#include "xeen/sound.h"
-
-namespace Xeen {
-
-bool showDarkSideEnding(XeenEngine &vm) {
- return true;
-}
-
-} // End of namespace Xeen
diff --git a/engines/xeen/worldofxeen/darkside_ending.h b/engines/xeen/worldofxeen/darkside_ending.h
deleted file mode 100644
index 49dcf2d40b..0000000000
--- a/engines/xeen/worldofxeen/darkside_ending.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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_ENDING_H
-#define XEEN_DARKSIDE_ENDING_H
-
-#include "xeen/xeen.h"
-
-namespace Xeen {
-
-bool showDarkSideEnding(XeenEngine &vm);
-
-} // End of namespace Xeen
-
-#endif /* XEEN_DARKSIDE_ENDING_H */
diff --git a/engines/xeen/worldofxeen/worldofxeen_game.cpp b/engines/xeen/worldofxeen/worldofxeen.cpp
index f7c9336c64..86a6ee3da7 100644
--- a/engines/xeen/worldofxeen/worldofxeen_game.cpp
+++ b/engines/xeen/worldofxeen/worldofxeen.cpp
@@ -20,14 +20,16 @@
*
*/
-#include "xeen/worldofxeen/worldofxeen_game.h"
-#include "xeen/worldofxeen/darkside_intro.h"
+#include "xeen/worldofxeen/worldofxeen.h"
+#include "xeen/worldofxeen/darkside_cutscenes.h"
+#include "xeen/worldofxeen/clouds_cutscenes.h"
#include "xeen/sound.h"
namespace Xeen {
WorldOfXeenEngine::WorldOfXeenEngine(OSystem *syst, const XeenGameDescription *gameDesc)
- : XeenEngine(syst, gameDesc) {
+ : XeenEngine(syst, gameDesc), CloudsCutscenes(this),
+ DarkSideCutscenes(this) {
_seenDarkSideIntro = false;
}
@@ -36,9 +38,9 @@ void WorldOfXeenEngine::showIntro() {
if (gDebugLevel == 0)
return;
- bool completed = showDarkSideTitle(*this);
+ bool completed = showDarkSideTitle();
if (!_seenDarkSideIntro && completed)
- showDarkSideIntro(*this);
+ showDarkSideIntro();
}
} // End of namespace Xeen
diff --git a/engines/xeen/worldofxeen/worldofxeen_game.h b/engines/xeen/worldofxeen/worldofxeen.h
index 97a8754470..68a83bb89d 100644
--- a/engines/xeen/worldofxeen/worldofxeen_game.h
+++ b/engines/xeen/worldofxeen/worldofxeen.h
@@ -20,10 +20,12 @@
*
*/
-#ifndef XEEN_WORLDOFXEEN_GAME_H
-#define XEEN_WORLDOFXEEN_GAME_H
+#ifndef XEEN_WORLDOFXEEN_WORLDOFXEEN_H
+#define XEEN_WORLDOFXEEN_WORLDOFXEEN_H
#include "xeen/xeen.h"
+#include "xeen/worldofxeen/clouds_cutscenes.h"
+#include "xeen/worldofxeen/darkside_cutscenes.h"
namespace Xeen {
@@ -32,7 +34,8 @@ namespace Xeen {
* Clouds of Xeen, Dark Side of Xeen, and Worlds of Xeen specific
* game code
*/
-class WorldOfXeenEngine: public XeenEngine {
+class WorldOfXeenEngine: public XeenEngine, public CloudsCutscenes,
+ public DarkSideCutscenes {
protected:
virtual void showIntro();
public:
@@ -44,4 +47,4 @@ public:
} // End of namespace Xeen
-#endif /* XEEN_WORLDOFXEEN_GAME_H */
+#endif /* XEEN_WORLDOFXEEN_WORLDOFXEEN_H */