aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-07-21 20:22:24 +0000
committerMartin Kiewitz2010-07-21 20:22:24 +0000
commit0d1c44301ab51ad375e88479b3f965cfccc53a45 (patch)
treeb7993e1ba81ae289521f01e5f35dc205dd27b68b /engines
parentab655ba01fb0eef4864401ab9cd023bd42f6c318 (diff)
downloadscummvm-rg350-0d1c44301ab51ad375e88479b3f965cfccc53a45.tar.gz
scummvm-rg350-0d1c44301ab51ad375e88479b3f965cfccc53a45.tar.bz2
scummvm-rg350-0d1c44301ab51ad375e88479b3f965cfccc53a45.zip
SCI: halfing kCelWide for sci2.1
fixes lsl6 inventory icon placement, ffs. see comments svn-id: r51104
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kgraphics.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 22ccf843d6..4c7d08c24e 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -427,6 +427,11 @@ reg_t kCelWide(EngineState *s, int argc, reg_t *argv) {
celWidth = g_sci->_gfxCache->kernelViewGetCelWidth(viewId, loopNo, celNo);
+ if (getSciVersion() == SCI_VERSION_2_1)
+ celWidth = celWidth / 2; // half the width returned here, fixes lsl6 action icon placements
+ // the scripts work low-res and add the returned value from here to the coordinate
+ // TODO: check, if this is actually right. I'm slightly confused by this, but even GK1CD has some idivs in this
+ // code, so it seems plausible.
return make_reg(0, celWidth);
}