aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular
diff options
context:
space:
mode:
authorPaul Gilbert2014-02-22 18:21:18 -0500
committerPaul Gilbert2014-02-22 18:21:18 -0500
commit6b774d228495e2dc9de08520a3064889d439335d (patch)
tree49678151bb3fb3042420e2c8c43d313fc674d8ae /engines/mads/nebular
parent6c354bccf253118d459f92f16d8f702ae07806fb (diff)
downloadscummvm-rg350-6b774d228495e2dc9de08520a3064889d439335d.tar.gz
scummvm-rg350-6b774d228495e2dc9de08520a3064889d439335d.tar.bz2
scummvm-rg350-6b774d228495e2dc9de08520a3064889d439335d.zip
MADS: Copy protection dialog is starting to be displayed
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r--engines/mads/nebular/dialogs_nebular.cpp21
-rw-r--r--engines/mads/nebular/dialogs_nebular.h12
-rw-r--r--engines/mads/nebular/game_nebular.cpp3
3 files changed, 21 insertions, 15 deletions
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index 76b6162d14..95a485d170 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -31,13 +31,6 @@ namespace MADS {
namespace Nebular {
-bool CopyProtectionDialog::show(MADSEngine *vm) {
- CopyProtectionDialog *dlg = new CopyProtectionDialog(vm, false);
-
- delete dlg;
- return true;
-}
-
CopyProtectionDialog::CopyProtectionDialog(MADSEngine *vm, bool priorAnswerWrong):
TextDialog(vm, FONT_INTERFACE, Common::Point(-1, -1), 32) {
getHogAnusEntry(_hogEntry);
@@ -76,6 +69,20 @@ CopyProtectionDialog::CopyProtectionDialog(MADSEngine *vm, bool priorAnswerWrong
wordWrap(" ");
wordWrap("\n");
+ // TODO: Rest of setup
+}
+
+bool CopyProtectionDialog::show() {
+ draw();
+ _vm->_events->showCursor();
+
+ // TODO: Replace with text input
+ while (!_vm->shouldQuit() && !_vm->_events->_keyPressed &&
+ !_vm->_events->_mouseClicked) {
+ _vm->_events->delay(1);
+ }
+
+ return true;
}
bool CopyProtectionDialog::getHogAnusEntry(HOGANUS &entry) {
diff --git a/engines/mads/nebular/dialogs_nebular.h b/engines/mads/nebular/dialogs_nebular.h
index 7a63397603..53f377ae0a 100644
--- a/engines/mads/nebular/dialogs_nebular.h
+++ b/engines/mads/nebular/dialogs_nebular.h
@@ -44,19 +44,19 @@ private:
HOGANUS _hogEntry;
/**
- * Constructor
- */
- CopyProtectionDialog(MADSEngine *vm, bool priorAnswerWrong);
-
- /**
* Get a random copy protection entry from the HOGANUS resource
*/
bool getHogAnusEntry(HOGANUS &entry);
public:
/**
+ * Constructor
+ */
+ CopyProtectionDialog(MADSEngine *vm, bool priorAnswerWrong);
+
+ /**
* Show the dialog
*/
- static bool show(MADSEngine *vm);
+ bool show();
};
} // End of namespace Nebular
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index dc2b1450ec..bf52af3733 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -41,11 +41,10 @@ bool GameNebular::checkCopyProtection() {
if (!ConfMan.getBool("copy_protection"))
return true;
- MessageDialog *dlg = new MessageDialog(_vm, 40, "Line 1", "Line 2", nullptr);
+ CopyProtectionDialog *dlg = new CopyProtectionDialog(_vm, false);
dlg->show();
delete dlg;
- //CopyProtectionDialog::show(_vm);
return false;
}