diff options
author | Walter van Niftrik | 2010-06-07 02:11:19 +0000 |
---|---|---|
committer | Walter van Niftrik | 2010-06-07 02:11:19 +0000 |
commit | d30d57b923ddad194071d3fc07d79385c1ce4a37 (patch) | |
tree | 2fd930cbbfa121d059f7f456bbf79835653751cf /engines/sci/engine | |
parent | b04535d487dd292b16768b036a0b24fc6965ed36 (diff) | |
download | scummvm-rg350-d30d57b923ddad194071d3fc07d79385c1ce4a37.tar.gz scummvm-rg350-d30d57b923ddad194071d3fc07d79385c1ce4a37.tar.bz2 scummvm-rg350-d30d57b923ddad194071d3fc07d79385c1ce4a37.zip |
SCI: Relax signature of kCreateTextBitmap.
svn-id: r49470
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kernel.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 0b7198d1bc..6ebee2dfbd 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -363,7 +363,7 @@ SciKernelFunction kfunct_mappers[] = { DEFUN("ListIndexOf", kListIndexOf, "lZo"), DEFUN("OnMe", kOnMe, "iio.*"), DEFUN("InPolygon", kInPolygon, "iio"), - DEFUN("CreateTextBitmap", kCreateTextBitmap, "iiio"), + DEFUN("CreateTextBitmap", kCreateTextBitmap, "i.*"), // SCI2.1 Kernel Functions DEFUN("Save", kSave, ".*"), diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp index d2a3362aca..0afdc3f2eb 100644 --- a/engines/sci/engine/kernel32.cpp +++ b/engines/sci/engine/kernel32.cpp @@ -804,9 +804,16 @@ reg_t kInPolygon(EngineState *s, int argc, reg_t *argv) { reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) { // TODO: argument 0 is usually 0, and arguments 1 and 2 are usually 1 - reg_t object = argv[3]; - Common::String text = s->_segMan->getString(readSelector(s->_segMan, object, SELECTOR(text))); - debug("kCreateTextBitmap: %s", text.c_str()); + switch (argv[0].toUint16()) { + case 0: + if (argc != 4) { + warning("kCreateTextBitmap(0): expected 4 arguments, got %i", argc); + return NULL_REG; + } + reg_t object = argv[3]; + Common::String text = s->_segMan->getString(readSelector(s->_segMan, object, SELECTOR(text))); + debug("kCreateTextBitmap: %s", text.c_str()); + } return NULL_REG; } |