aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'engines/xeen/dialogs')
-rw-r--r--engines/xeen/dialogs/credits_screen.cpp72
-rw-r--r--engines/xeen/dialogs/credits_screen.h41
-rw-r--r--engines/xeen/dialogs/dialogs.cpp67
-rw-r--r--engines/xeen/dialogs/dialogs.h19
-rw-r--r--engines/xeen/dialogs/please_wait.cpp50
-rw-r--r--engines/xeen/dialogs/please_wait.h45
6 files changed, 208 insertions, 86 deletions
diff --git a/engines/xeen/dialogs/credits_screen.cpp b/engines/xeen/dialogs/credits_screen.cpp
new file mode 100644
index 0000000000..8fe0387ccf
--- /dev/null
+++ b/engines/xeen/dialogs/credits_screen.cpp
@@ -0,0 +1,72 @@
+/* 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/dialogs/credits_screen.h"
+#include "xeen/resources.h"
+#include "xeen/xeen.h"
+
+namespace Xeen {
+
+void CreditsScreen::show(XeenEngine *vm) {
+ CreditsScreen *dlg = new CreditsScreen(vm);
+
+ switch (vm->getGameID()) {
+ case GType_Clouds:
+ dlg->execute(Res.CLOUDS_CREDITS);
+ break;
+ case GType_Swords:
+ dlg->execute(Res.SWORDS_CREDITS1);
+ dlg->execute(Res.SWORDS_CREDITS2);
+ break;
+ default:
+ dlg->execute(Res.DARK_SIDE_CREDITS);
+ break;
+ }
+
+ delete dlg;
+}
+
+void CreditsScreen::execute(const char *content) {
+ Screen &screen = *_vm->_screen;
+ Windows &windows = *_vm->_windows;
+ EventsManager &events = *_vm->_events;
+
+ // Handle drawing the credits screen
+ doScroll(true, false);
+ windows[GAME_WINDOW].close();
+
+ screen.loadBackground("marb.raw");
+ windows[0].writeString(content);
+ doScroll(false, false);
+
+ events.setCursor(0);
+ windows[0].update();
+ clearButtons();
+
+ // Wait for keypress
+ while (!events.isKeyMousePressed())
+ events.pollEventsAndWait();
+
+ doScroll(true, false);
+}
+
+} // End of namespace Xeen
diff --git a/engines/xeen/dialogs/credits_screen.h b/engines/xeen/dialogs/credits_screen.h
new file mode 100644
index 0000000000..b52839d5ae
--- /dev/null
+++ b/engines/xeen/dialogs/credits_screen.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_DIALOGS_CREDITS_SCREEN_H
+#define XEEN_DIALOGS_CREDITS_SCREEN_H
+
+#include "xeen/dialogs/dialogs.h"
+
+namespace Xeen {
+
+class CreditsScreen: public ButtonContainer {
+private:
+ CreditsScreen(XeenEngine *vm) : ButtonContainer(vm) {}
+
+ void execute(const char *content);
+public:
+ static void show(XeenEngine *vm);
+};
+
+} // End of namespace Xeen
+
+#endif /* XEEN_DIALOGS_CREDITS_SCREEN_H */
diff --git a/engines/xeen/dialogs/dialogs.cpp b/engines/xeen/dialogs/dialogs.cpp
index c9b5658a0e..d7a696b8d5 100644
--- a/engines/xeen/dialogs/dialogs.cpp
+++ b/engines/xeen/dialogs/dialogs.cpp
@@ -187,71 +187,4 @@ void SettingsBaseDialog::showContents(SpriteResource &title1, bool waitFlag) {
checkEvents(_vm);
}
-/*------------------------------------------------------------------------*/
-
-void CreditsScreen::show(XeenEngine *vm) {
- CreditsScreen *dlg = new CreditsScreen(vm);
-
- switch (vm->getGameID()) {
- case GType_Clouds:
- dlg->execute(Res.CLOUDS_CREDITS);
- break;
- case GType_Swords:
- dlg->execute(Res.SWORDS_CREDITS1);
- dlg->execute(Res.SWORDS_CREDITS2);
- break;
- default:
- dlg->execute(Res.DARK_SIDE_CREDITS);
- break;
- }
-
- delete dlg;
-}
-
-void CreditsScreen::execute(const char *content) {
- Screen &screen = *_vm->_screen;
- Windows &windows = *_vm->_windows;
- EventsManager &events = *_vm->_events;
-
- // Handle drawing the credits screen
- doScroll(true, false);
- windows[GAME_WINDOW].close();
-
- screen.loadBackground("marb.raw");
- windows[0].writeString(content);
- doScroll(false, false);
-
- events.setCursor(0);
- windows[0].update();
- clearButtons();
-
- // Wait for keypress
- while (!events.isKeyMousePressed())
- events.pollEventsAndWait();
-
- doScroll(true, false);
-}
-
-/*------------------------------------------------------------------------*/
-
-PleaseWait::PleaseWait(bool isOops) {
- _msg = isOops ? Res.OOPS : Res.PLEASE_WAIT;
-}
-
-PleaseWait::~PleaseWait() {
- Windows &windows = *g_vm->_windows;
- windows[9].close();
-}
-
-void PleaseWait::show() {
- Windows &windows = *g_vm->_windows;
- Window &w = windows[9];
-
- if (g_vm->_mode != MODE_0) {
- w.open();
- w.writeString(_msg);
- w.update();
- }
-}
-
} // End of namespace Xeen
diff --git a/engines/xeen/dialogs/dialogs.h b/engines/xeen/dialogs/dialogs.h
index cabc921536..9038f75ef8 100644
--- a/engines/xeen/dialogs/dialogs.h
+++ b/engines/xeen/dialogs/dialogs.h
@@ -113,25 +113,6 @@ public:
virtual ~SettingsBaseDialog() {}
};
-class CreditsScreen: public ButtonContainer {
-private:
- CreditsScreen(XeenEngine *vm) : ButtonContainer(vm) {}
-
- void execute(const char *content);
-public:
- static void show(XeenEngine *vm);
-};
-
-class PleaseWait {
-private:
- Common::String _msg;
-public:
- PleaseWait(bool isOops = false);
- ~PleaseWait();
-
- void show();
-};
-
} // End of namespace Xeen
#endif /* XEEN_DIALOGS_H */
diff --git a/engines/xeen/dialogs/please_wait.cpp b/engines/xeen/dialogs/please_wait.cpp
new file mode 100644
index 0000000000..749c6a850a
--- /dev/null
+++ b/engines/xeen/dialogs/please_wait.cpp
@@ -0,0 +1,50 @@
+/* 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/dialogs/please_wait.h"
+#include "xeen/resources.h"
+#include "xeen/window.h"
+#include "xeen/xeen.h"
+
+namespace Xeen {
+
+PleaseWait::PleaseWait(bool isOops) {
+ _msg = isOops ? Res.OOPS : Res.PLEASE_WAIT;
+}
+
+PleaseWait::~PleaseWait() {
+ Windows &windows = *g_vm->_windows;
+ windows[9].close();
+}
+
+void PleaseWait::show() {
+ Windows &windows = *g_vm->_windows;
+ Window &w = windows[9];
+
+ if (g_vm->_mode != MODE_0) {
+ w.open();
+ w.writeString(_msg);
+ w.update();
+ }
+}
+
+} // End of namespace Xeen
diff --git a/engines/xeen/dialogs/please_wait.h b/engines/xeen/dialogs/please_wait.h
new file mode 100644
index 0000000000..0432e5552a
--- /dev/null
+++ b/engines/xeen/dialogs/please_wait.h
@@ -0,0 +1,45 @@
+/* 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_DIALOGS_PLEASE_WAIT_H
+#define XEEN_DIALOGS_PLEASE_WAIT_H
+
+#include "xeen/dialogs/dialogs.h"
+
+namespace Xeen {
+
+class PleaseWait {
+private:
+ Common::String _msg;
+public:
+ PleaseWait(bool isOops = false);
+ ~PleaseWait();
+
+ /**
+ * Show the dialog
+ */
+ void show();
+};
+
+} // End of namespace Xeen
+
+#endif /* XEEN_DIALOGS_PLEASE_WAIT_H */