diff options
author | Martin Kiewitz | 2010-06-15 13:01:07 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-06-15 13:01:07 +0000 |
commit | 891b568fde51c7f1732c86fd34cc40efcd4314ce (patch) | |
tree | 7eabcb3211243df20bc292970701f593f7b82a64 /engines/sci/engine | |
parent | 604f85588965498f7852b579e19a9f6e99d32590 (diff) | |
download | scummvm-rg350-891b568fde51c7f1732c86fd34cc40efcd4314ce.tar.gz scummvm-rg350-891b568fde51c7f1732c86fd34cc40efcd4314ce.tar.bz2 scummvm-rg350-891b568fde51c7f1732c86fd34cc40efcd4314ce.zip |
SCI: move textSize and textFonts and textColors inside gfxText16
svn-id: r49851
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index cf6bd41fa9..3e74bb206a 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -48,6 +48,7 @@ #include "sci/graphics/paint16.h" #include "sci/graphics/ports.h" #include "sci/graphics/screen.h" +#include "sci/graphics/text16.h" #include "sci/graphics/view.h" namespace Sci { @@ -345,11 +346,12 @@ reg_t kTextSize(EngineState *s, int argc, reg_t *argv) { textWidth = dest[3].toUint16(); textHeight = dest[2].toUint16(); #ifdef ENABLE_SCI32 - if (g_sci->_gui32) - g_sci->_gui32->textSize(g_sci->strSplit(text.c_str(), sep).c_str(), font_nr, maxwidth, &textWidth, &textHeight); - else + if (!g_sci->_gfxText16) { + // TODO: Implement this + textWidth = 0; textHeight = 0; + } else #endif - g_sci->_gui->textSize(g_sci->strSplit(text.c_str(), sep).c_str(), font_nr, maxwidth, &textWidth, &textHeight); + g_sci->_gfxText16->kernelTextSize(g_sci->strSplit(text.c_str(), sep).c_str(), font_nr, maxwidth, &textWidth, &textHeight); debugC(2, kDebugLevelStrings, "GetTextSize '%s' -> %dx%d", text.c_str(), textWidth, textHeight); dest[2] = make_reg(0, textHeight); @@ -1246,12 +1248,12 @@ reg_t kSetVideoMode(EngineState *s, int argc, reg_t *argv) { // New calls for SCI11. Using those is only needed when using text-codes so that one is able to change // font and/or color multiple times during kDisplay and kDrawControl reg_t kTextFonts(EngineState *s, int argc, reg_t *argv) { - g_sci->_gui->textFonts(argc, argv); + g_sci->_gfxText16->kernelTextFonts(argc, argv); return s->r_acc; } reg_t kTextColors(EngineState *s, int argc, reg_t *argv) { - g_sci->_gui->textColors(argc, argv); + g_sci->_gfxText16->kernelTextColors(argc, argv); return s->r_acc; } |