Skip to content

Commit

Permalink
TINSEL: Fix inventory scrollbar handle position
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Torbjörn Andersson committed Nov 22, 2012
1 parent c16de40 commit 29afdab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engines/tinsel/dialogs.cpp
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 29afdab

Please sign in to comment.