From 29afdabb6b703f614f6fa5ab6138953ed5c3d6dd Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Thu, 22 Nov 2012 23:04:12 +0100 Subject: TINSEL: Fix inventory scrollbar handle position The scrollbar handle was one pixel too far to the left, and the topmost position was off by one as well. I've verified this to the best of my ability. I've compared it visually in DOSBox (which is a bit tricky for Discworld 2, but I think it's right now), and against the initial Tinsel v1 source code that was added to ScummVM. I don't know what the initial Tinsel v2 source code looked like, though. --- engines/tinsel/dialogs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/tinsel/dialogs.cpp') diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp index 66bf0c2cdb..e1a2923233 100644 --- a/engines/tinsel/dialogs.cpp +++ b/engines/tinsel/dialogs.cpp @@ -2723,7 +2723,7 @@ static OBJECT *AddObject(const FREEL *pfreel, int num) { static void AddSlider(OBJECT **slide, const FILM *pfilm) { g_SlideObject = *slide = AddObject(&pfilm->reels[IX_SLIDE], -1); - MultiSetAniXY(*slide, MultiRightmost(g_RectObject) + (TinselV2 ? NM_SLX : -M_SXOFF + 2) - 1, + MultiSetAniXY(*slide, MultiRightmost(g_RectObject) + (TinselV2 ? NM_SLX : -M_SXOFF + 2), g_InvD[g_ino].inventoryY + g_sliderYpos); MultiSetZPosition(*slide, Z_INV_MFRAME); } @@ -3318,7 +3318,7 @@ static void ConstructInventory(InventoryType filling) { } } } else if (g_InvD[g_ino].NoofItems > g_InvD[g_ino].NoofHicons*g_InvD[g_ino].NoofVicons) { - g_sliderYmin = g_TLheight - (TinselV2 ? 2 : 1); + g_sliderYmin = g_TLheight - (TinselV2 ? 1 : 2); g_sliderYmax = g_TLheight + eV + (TinselV2 ? 12 : 10); AddSlider(&retObj[n++], pfilm); } -- cgit v1.2.3