From 0d1c44301ab51ad375e88479b3f965cfccc53a45 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Wed, 21 Jul 2010 20:22:24 +0000 Subject: SCI: halfing kCelWide for sci2.1 fixes lsl6 inventory icon placement, ffs. see comments svn-id: r51104 --- engines/sci/engine/kgraphics.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engines/sci/engine') 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); } -- cgit v1.2.3