aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he/script_v72he.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2007-09-20 20:50:38 +0000
committerMatthew Hoops2007-09-20 20:50:38 +0000
commitf3175861ba23318520a9044d8c35c33a083847cc (patch)
tree38b5ba0fb889b8d4a436d46bdb0880616e92adb8 /engines/scumm/he/script_v72he.cpp
parent14b89bcf466acc2c4c9267f4986082c7dcf7ac1f (diff)
downloadscummvm-rg350-f3175861ba23318520a9044d8c35c33a083847cc.tar.gz
scummvm-rg350-f3175861ba23318520a9044d8c35c33a083847cc.tar.bz2
scummvm-rg350-f3175861ba23318520a9044d8c35c33a083847cc.zip
implement o72_debugInput (with some help from Kirben)
svn-id: r28988
Diffstat (limited to 'engines/scumm/he/script_v72he.cpp')
-rw-r--r--engines/scumm/he/script_v72he.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 5db2ae74ec..df70fb7b0d 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -31,6 +31,7 @@
#include "scumm/actor.h"
#include "scumm/charset.h"
+#include "scumm/dialogs.h"
#include "scumm/file.h"
#include "scumm/he/intern_he.h"
#include "scumm/object.h"
@@ -1692,13 +1693,20 @@ void ScummEngine_v72he::o72_drawWizImage() {
void ScummEngine_v72he::o72_debugInput() {
byte string[255];
+ byte *debugInputString;
copyScriptString(string, sizeof(string));
- debug(0,"o72_debugInput: String %s", string);
- // TODO: Request input and store string result in array
+ DebugInputDialog dialog(this, (char*)string);
+ runDialog(dialog);
+ while (!dialog.done) {
+ parseEvents();
+ dialog.handleKeyDown(_keyPressed);
+ }
+
writeVar(0, 0);
- defineArray(0, kStringArray, 0, 0, 0, 0);
+ debugInputString = defineArray(0, kStringArray, 0, 0, 0, dialog.buffer.size());
+ memcpy(debugInputString, dialog.buffer.c_str(), dialog.buffer.size());
push(readVar(0));
}