aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/scriptconsole.cpp
diff options
context:
space:
mode:
authorMax Horn2009-02-23 03:04:52 +0000
committerMax Horn2009-02-23 03:04:52 +0000
commit9744fc615ca646f3d963675905c07d18bd0fa62d (patch)
tree5bf0fdc9037a542d0e11e46182c1cb8403b3112d /engines/sci/engine/scriptconsole.cpp
parent327f5c9f7720ec2ed3b2e7281ee33238ae536fc3 (diff)
downloadscummvm-rg350-9744fc615ca646f3d963675905c07d18bd0fa62d.tar.gz
scummvm-rg350-9744fc615ca646f3d963675905c07d18bd0fa62d.tar.bz2
scummvm-rg350-9744fc615ca646f3d963675905c07d18bd0fa62d.zip
SCI: Changed selector name table to a Common::StringList
svn-id: r38805
Diffstat (limited to 'engines/sci/engine/scriptconsole.cpp')
-rw-r--r--engines/sci/engine/scriptconsole.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/engines/sci/engine/scriptconsole.cpp b/engines/sci/engine/scriptconsole.cpp
index c352f2ae9d..b81b2794d3 100644
--- a/engines/sci/engine/scriptconsole.cpp
+++ b/engines/sci/engine/scriptconsole.cpp
@@ -1010,28 +1010,22 @@ static int c_hexgrep(EngineState *s) {
}
static int c_selectornames(EngineState * s) {
- int namectr;
- char **snames = NULL;
- int seeker = 0;
+ Common::StringList selectorNames;
if (NULL == s) {
sciprintf("console.c: c_selectornames(): NULL passed for parameter s\n");
return -1;
}
- snames = vocabulary_get_snames(s->resmgr, &namectr, s ? s->version : 0);
-
- if (!snames) {
+ if (!vocabulary_get_snames(s->resmgr, s ? s->version : 0, selectorNames)) {
sciprintf("No selector name table found!\n");
return 1;
}
sciprintf("Selector names in numeric order:\n");
- while (snames[seeker]) {
- sciprintf("%03x: %s\n", seeker, snames[seeker]);
- seeker++;
+ for (uint seeker = 0; seeker < selectorNames.size(); seeker++) {
+ sciprintf("%03x: %s\n", seeker, selectorNames[seeker].c_str());
}
- vocabulary_free_snames(snames);
return 0;
}
@@ -1066,7 +1060,7 @@ static int c_dissectscript(EngineState * s) {
return -1;
}
- script_dissect(s->resmgr, cmd_params[0].val, s->selector_names, s->selector_names_nr);
+ script_dissect(s->resmgr, cmd_params[0].val, s->_selectorNames);
return 0;
}