aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2011-10-08 19:11:14 +0300
committerFilippos Karapetis2011-10-08 19:11:14 +0300
commit227e69ef08105ac9af64374fd8333a96078e194d (patch)
treea1c9bc3f5744883cb63be67489a970fc9febbab6 /engines/sci/engine
parent4ad2ebd9959a8413c0d00cd7498ac4166edfe886 (diff)
downloadscummvm-rg350-227e69ef08105ac9af64374fd8333a96078e194d.tar.gz
scummvm-rg350-227e69ef08105ac9af64374fd8333a96078e194d.tar.bz2
scummvm-rg350-227e69ef08105ac9af64374fd8333a96078e194d.zip
SCI2+: Fixed the implementation of kTextSize(), removing some hacks
Thanks to lskovlun for the fix
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kgraphics.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 83eb94195b..ec0b4a8756 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -379,8 +379,13 @@ reg_t kTextSize(EngineState *s, int argc, reg_t *argv) {
}
debugC(kDebugLevelStrings, "GetTextSize '%s' -> %dx%d", text.c_str(), textWidth, textHeight);
- dest[2] = make_reg(0, textHeight);
- dest[3] = make_reg(0, textWidth);
+ if (getSciVersion() <= SCI_VERSION_1_1) {
+ dest[2] = make_reg(0, textHeight);
+ dest[3] = make_reg(0, textWidth);
+ } else {
+ dest[2] = make_reg(0, textWidth);
+ dest[3] = make_reg(0, textHeight);
+ }
return s->r_acc;
}