From ef64f49c4cc4474504a3597af57636a9ad33817d Mon Sep 17 00:00:00 2001 From: Robin Eklind Date: Wed, 13 Jan 2021 01:50:32 +0100 Subject: [PATCH] control: add BUGFIX comment for DrawSpellBook The render of the spellbook page 3 and page 4 buttons were both off by one pixel. --- Source/control.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/control.cpp b/Source/control.cpp index 24582d01e..0ea632df6 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -2498,6 +2498,14 @@ void DrawSpellBook() if (sbooktab < 5) CelDraw(RIGHT_PANEL_X + 61 * sbooktab + 7, 348 + SCREEN_Y, pSBkBtnCel, sbooktab + 1, 61); #else + // BUGFIX: rendering of page 3 and page 4 buttons are both off-by-one pixel. + // The fix would look as follows: + // + // int sx = RIGHT_PANEL_X + 76 * sbooktab + 7; + // if (sbooktab == 2 || sbooktab == 3) { + // sx++; + // } + // CelDraw(sx, 348 + SCREEN_Y, pSBkBtnCel, sbooktab + 1, 76); CelDraw(RIGHT_PANEL_X + 76 * sbooktab + 7, 348 + SCREEN_Y, pSBkBtnCel, sbooktab + 1, 76); #endif