aboutsummaryrefslogtreecommitdiff
path: root/engines/chewy/console.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/chewy/console.cpp')
-rw-r--r--engines/chewy/console.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/engines/chewy/console.cpp b/engines/chewy/console.cpp
index 7fefe45ad0..cb2d5e21c1 100644
--- a/engines/chewy/console.cpp
+++ b/engines/chewy/console.cpp
@@ -42,6 +42,7 @@ Console::Console(ChewyEngine *vm) : GUI::Debugger(), _vm(vm) {
registerCmd("video_info", WRAP_METHOD(Console, Cmd_VideoInfo));
registerCmd("error_message", WRAP_METHOD(Console, Cmd_ErrorMessage));
registerCmd("dialog", WRAP_METHOD(Console, Cmd_Dialog));
+ registerCmd("text", WRAP_METHOD(Console, Cmd_Text));
}
Console::~Console() {
@@ -205,9 +206,9 @@ bool Console::Cmd_Dialog(int argc, const char **argv) {
int dialogNum = atoi(argv[1]);
int entryNum = atoi(argv[2]);
uint cur = 0;
- DialogList *d = _vm->_text->getDialog(dialogNum, entryNum);
+ TextEntryList *d = _vm->_text->getDialog(dialogNum, entryNum);
- for (DialogList::iterator it = d->begin(); it != d->end(); ++it) {
+ for (TextEntryList::iterator it = d->begin(); it != d->end(); ++it) {
this->debugPrintf("Entry %d: speech %d, text '%s'\n", cur, (*it).speechId, (*it).text.c_str());
}
@@ -217,4 +218,21 @@ bool Console::Cmd_Dialog(int argc, const char **argv) {
return true;
}
+bool Console::Cmd_Text(int argc, const char **argv) {
+ if (argc < 3) {
+ debugPrintf("Usage: text <dialog> <entry>\n");
+ return true;
+ }
+
+ int dialogNum = atoi(argv[1]);
+ int entryNum = atoi(argv[2]);
+ TextEntry *d = _vm->_text->getText(dialogNum, entryNum);
+
+ debugPrintf("Speech %d, text '%s'\n", d->speechId, d->text.c_str());
+
+ delete d;
+
+ return true;
+}
+
} // End of namespace Chewy