aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek/console.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2019-08-18 15:29:14 +0300
committerFilippos Karapetis2019-08-19 00:18:00 +0300
commit6a9969ed25e485e393cd76fe486d3778b541d0c4 (patch)
treeee34ce9a3f4a199eeca8b7534fe98a34d33c1f01 /engines/startrek/console.cpp
parent073d8332834b18023207c4aad194986df92bb414 (diff)
downloadscummvm-rg350-6a9969ed25e485e393cd76fe486d3778b541d0c4.tar.gz
scummvm-rg350-6a9969ed25e485e393cd76fe486d3778b541d0c4.tar.bz2
scummvm-rg350-6a9969ed25e485e393cd76fe486d3778b541d0c4.zip
STARTREK: Fix loading of some texts, and add the "text" console command
Diffstat (limited to 'engines/startrek/console.cpp')
-rw-r--r--engines/startrek/console.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/engines/startrek/console.cpp b/engines/startrek/console.cpp
index 471294fe9c..d3f012d4d1 100644
--- a/engines/startrek/console.cpp
+++ b/engines/startrek/console.cpp
@@ -30,6 +30,7 @@ namespace StarTrek {
Console::Console(StarTrekEngine *vm) : GUI::Debugger(), _vm(vm) {
registerCmd("room", WRAP_METHOD(Console, Cmd_Room));
registerCmd("actions", WRAP_METHOD(Console, Cmd_Actions));
+ registerCmd("text", WRAP_METHOD(Console, Cmd_Text));
}
Console::~Console() {
@@ -84,6 +85,30 @@ bool Console::Cmd_Actions(int argc, const char **argv) {
return true;
}
+bool Console::Cmd_Text(int argc, const char **argv) {
+ typedef Common::HashMap<int, Common::String>::iterator MessageIterator;
+
+ debugPrintf("\nLook messages\n");
+ debugPrintf("-------------\n");
+ for (MessageIterator i = _vm->_room->_lookMessages.begin(); i != _vm->_room->_lookMessages.end(); ++i) {
+ debugPrintf("%i: %s\n", i->_key, i->_value.c_str());
+ }
+
+ debugPrintf("\nLook with talker messages\n");
+ debugPrintf("-------------------------\n");
+ for (MessageIterator i = _vm->_room->_lookWithTalkerMessages.begin(); i != _vm->_room->_lookWithTalkerMessages.end(); ++i) {
+ debugPrintf("%i: %s\n", i->_key, i->_value.c_str());
+ }
+
+ debugPrintf("\nTalk messages\n");
+ debugPrintf("-------------\n");
+ for (MessageIterator i = _vm->_room->_talkMessages.begin(); i != _vm->_room->_talkMessages.end(); ++i) {
+ debugPrintf("%i: %s\n", i->_key, i->_value.c_str());
+ }
+
+ return true;
+}
+
Common::String Console::EventToString(uint32 action) {
const char *actions[] = {
"Tick",