diff options
author | Filippos Karapetis | 2010-01-30 01:45:59 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-01-30 01:45:59 +0000 |
commit | 928b4a6df6cc24c57ce899c431a5d98da4325af8 (patch) | |
tree | 0205b2d0ea7b49158ebb1e356f3b60b850c29fb9 /engines/sci/engine/kstring.cpp | |
parent | 42ec4e37801b7724380437033c86180e79b9a67a (diff) | |
download | scummvm-rg350-928b4a6df6cc24c57ce899c431a5d98da4325af8.tar.gz scummvm-rg350-928b4a6df6cc24c57ce899c431a5d98da4325af8.tar.bz2 scummvm-rg350-928b4a6df6cc24c57ce899c431a5d98da4325af8.zip |
Added support for String types to kFormat (seems to work but needs testing...)
svn-id: r47694
Diffstat (limited to 'engines/sci/engine/kstring.cpp')
-rw-r--r-- | engines/sci/engine/kstring.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 769964e914..89d1d0da56 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -28,6 +28,7 @@ #include "sci/resource.h" #include "sci/engine/state.h" #include "sci/engine/message.h" +#include "sci/engine/selector.h" #include "sci/engine/kernel.h" namespace Sci { @@ -270,6 +271,11 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) { switch (xfer) { case 's': { /* Copy string */ reg_t reg = argv[startarg + paramindex]; + if (s->_segMan->isObject(reg)) { + Selector slc = s->_kernel->findSelector("data"); // TODO: place in selector table + reg = read_selector(s->_segMan, reg, slc); + } + Common::String tempsource = (reg == NULL_REG) ? "" : kernel_lookup_text(s, reg, arguments[paramindex + 1]); int slen = strlen(tempsource.c_str()); |