aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/xeen/dialogs.cpp30
-rw-r--r--engines/xeen/dialogs.h9
-rw-r--r--engines/xeen/dialogs_options.cpp17
-rw-r--r--engines/xeen/resdata.cpp41
-rw-r--r--engines/xeen/resdata.h4
5 files changed, 91 insertions, 10 deletions
diff --git a/engines/xeen/dialogs.cpp b/engines/xeen/dialogs.cpp
index 1342353b9a..b550cf2f01 100644
--- a/engines/xeen/dialogs.cpp
+++ b/engines/xeen/dialogs.cpp
@@ -22,6 +22,7 @@
#include "common/scummsys.h"
#include "xeen/dialogs.h"
+#include "xeen/resdata.h"
namespace Xeen {
@@ -80,4 +81,33 @@ void SettingsBaseDialog::showContents(SpriteResource &title1, bool waitFlag) {
/*------------------------------------------------------------------------*/
+void CreditsScreen::show(XeenEngine *vm) {
+ CreditsScreen *dlg = new CreditsScreen(vm);
+ dlg->execute();
+ delete dlg;
+}
+
+void CreditsScreen::execute() {
+ Screen &screen = *_vm->_screen;
+ EventsManager &events = *_vm->_events;
+
+ // Handle drawing the credits screen
+ doScroll(true, false);
+ screen._windows[28].close();
+
+ screen.loadBackground("marb.raw");
+ screen._windows[0].writeString(CREDITS);
+ doScroll(false, false);
+
+ events.setCursor(0);
+ screen._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.h b/engines/xeen/dialogs.h
index 21bf57c8e7..9810380081 100644
--- a/engines/xeen/dialogs.h
+++ b/engines/xeen/dialogs.h
@@ -73,6 +73,15 @@ public:
SettingsBaseDialog(XeenEngine *vm) : Dialog(vm) {}
};
+class CreditsScreen: public Dialog {
+private:
+ CreditsScreen(XeenEngine *vm) : Dialog(vm) {}
+
+ void execute();
+public:
+ static void show(XeenEngine *vm);
+};
+
} // End of namespace Xeen
#endif /* XEEN_DIALOGS_H */
diff --git a/engines/xeen/dialogs_options.cpp b/engines/xeen/dialogs_options.cpp
index e4ebf27b79..e7f296c9a4 100644
--- a/engines/xeen/dialogs_options.cpp
+++ b/engines/xeen/dialogs_options.cpp
@@ -22,6 +22,7 @@
#include "common/scummsys.h"
#include "xeen/dialogs_options.h"
+#include "xeen/resdata.h"
namespace Xeen {
@@ -86,14 +87,13 @@ void OptionsMenu::execute() {
return;
// Handle keypress
- switch (toupper(_key)) {
- case 'C':
- case 'V':
+ char key = toupper(_key);
+ if (key == 'C' || key == 'V') {
// Show credits
- break;
- default:
+ CreditsScreen::show(_vm);
break;
}
+
_key = '\0';
}
}
@@ -188,7 +188,7 @@ void Dialog::doScroll(bool drawFlag, bool doFade) {
// Load hand vga files
SpriteResource *hand[16];
for (int i = 0; i < 16; ++i) {
- Common::String name = Common::String::format("hand%02u.vga");
+ Common::String name = Common::String::format("hand%02u.vga", i);
hand[i] = new SpriteResource(name);
}
@@ -317,10 +317,7 @@ void WorldOptionsMenu::showContents(SpriteResource &title1, bool waitFlag) {
// Draw the basic frame for the optitons menu and title text
screen._windows[28].frame();
- screen._windows[28].writeString("\x0D\x01\003c\014dMight and Magic Options\n"
- "World of Xeen\x02\n"
- "\v117Copyright (c) 1993 NWC, Inc.\n"
- "All Rights Reserved\x01");
+ screen._windows[28].writeString(OPTIONS_TITLE);
for (uint btnIndex = 0; btnIndex < _buttons.size(); ++btnIndex) {
DialogButton &btn = _buttons[btnIndex];
diff --git a/engines/xeen/resdata.cpp b/engines/xeen/resdata.cpp
index 1cdd3ac0fb..b9309b4adb 100644
--- a/engines/xeen/resdata.cpp
+++ b/engines/xeen/resdata.cpp
@@ -25,6 +25,47 @@
namespace Xeen {
+const char *const CREDITS =
+ "\013012\010000\003c\01435Designed and Directed By:\n"
+ "\01417Jon Van Caneghem\003l\n"
+ "\n"
+ "\t025\01435Programming:\n"
+ "\t035\01417Mark Caldwell\n"
+ "\t035Dave Hathaway\n"
+ "\n"
+ "\t025\01435Sound System & FX:\n"
+ "\t035\01417Mike Heilemann\n"
+ "\n"
+ "\t025\01435Music & Speech:\n"
+ "\t035\01417Tim Tully\n"
+ "\n"
+ "\t025\01435Writing:\n"
+ "\t035\01417Paul Rattner\n"
+ "\t035Debbie Van Caneghem\n"
+ "\t035Jon Van Caneghem\013012\n"
+ "\n"
+ "\n"
+ "\t180\01435Graphics:\n"
+ "\t190\01417Jonathan P. Gwyn\n"
+ "\t190Bonita Long-Hemsath\n"
+ "\t190Julia Ulano\n"
+ "\t190Ricardo Barrera\n"
+ "\n"
+ "\t180\01435Testing:\n"
+ "\t190\01417Benjamin Bent\n"
+ "\t190Christian Dailey\n"
+ "\t190Mario Escamilla\n"
+ "\t190Marco Hunter\n"
+ "\t190Robert J. Lupo\n"
+ "\t190Clayton Retzer\n"
+ "\t190David Vela\003c";
+
+const char *const OPTIONS_TITLE =
+ "\x0D\x01\003c\014dMight and Magic Options\n"
+ "World of Xeen\x02\n"
+ "\v117Copyright (c) 1993 NWC, Inc.\n"
+ "All Rights Reserved\x01";
+
const byte SYMBOLS[20][64] = {
{ // 0
0x00, 0x00, 0xA8, 0xA4, 0xA4, 0xA4, 0xA4, 0xA4, 0x00, 0xA8, 0x9E, 0x9C, 0x9C, 0x9E, 0x9E, 0x9E,
diff --git a/engines/xeen/resdata.h b/engines/xeen/resdata.h
index deb6e589be..3c549fc225 100644
--- a/engines/xeen/resdata.h
+++ b/engines/xeen/resdata.h
@@ -28,6 +28,10 @@
namespace Xeen {
+extern const char *const CREDITS;
+
+extern const char *const OPTIONS_TITLE;
+
extern const byte SYMBOLS[20][64];
extern const byte TEXT_COLORS[40][4];