diff options
author | Filippos Karapetis | 2011-10-09 19:56:17 +0300 |
---|---|---|
committer | Filippos Karapetis | 2011-10-09 19:56:51 +0300 |
commit | 90a11586e21d06c150f98842a62f2a5ae7857bb5 (patch) | |
tree | e128ecdf8436d67dfd680254fff0052cc750d0d1 /engines/sci/engine | |
parent | d8da625e5ed4fb8c3ec7de32541181c032963072 (diff) | |
download | scummvm-rg350-90a11586e21d06c150f98842a62f2a5ae7857bb5.tar.gz scummvm-rg350-90a11586e21d06c150f98842a62f2a5ae7857bb5.tar.bz2 scummvm-rg350-90a11586e21d06c150f98842a62f2a5ae7857bb5.zip |
SCI: CreateTextBitmap should return a pointer. Also, silenced a warning
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index e3a41fe361..3d8a7774e2 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -1391,8 +1391,7 @@ reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) { debugC(kDebugLevelStrings, "%s", text.c_str()); uint16 maxWidth = argv[1].toUint16(); // nsRight - nsLeft + 1 uint16 maxHeight = argv[2].toUint16(); // nsBottom - nsTop + 1 - g_sci->_gfxText32->createTextBitmap(object, maxWidth, maxHeight); - break; + return g_sci->_gfxText32->createTextBitmap(object, maxWidth, maxHeight); } case 1: { if (argc != 2) { @@ -1403,14 +1402,12 @@ reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) { Common::String text = s->_segMan->getString(readSelector(s->_segMan, object, SELECTOR(text))); debugC(kDebugLevelStrings, "kCreateTextBitmap case 1 (%04x:%04x)", PRINT_REG(argv[1])); debugC(kDebugLevelStrings, "%s", text.c_str()); - g_sci->_gfxText32->createTextBitmap(object); - break; + return g_sci->_gfxText32->createTextBitmap(object); } default: warning("CreateTextBitmap(%d)", argv[0].toUint16()); + return NULL_REG; } - - return NULL_REG; } reg_t kGetWindowsOption(EngineState *s, int argc, reg_t *argv) { |