From f3caea6bae94b3cf82da4ad92fbfe723dcebf020 Mon Sep 17 00:00:00 2001 From: Angelo Geels Date: Fri, 11 Jul 2014 21:22:26 +0200 Subject: [PATCH] Some consistency cleanup --- src/game.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/game.c b/src/game.c index e460e2ec86..3efdc05b3e 100644 --- a/src/game.c +++ b/src/game.c @@ -752,17 +752,14 @@ static void input_hscrollbar_rightbutton(rct_window* w) left += 3; widgetWidth = widget->right - widget->left - 1; - if (scroll->flags & 0x0010) { + if (scroll->flags & 0x0010) widgetWidth -= 11; - } widgetWidth *= -1; widgetWidth += scroll->h_right; - if (widgetWidth < 0) { + if (widgetWidth < 0) widgetWidth = 0; - } - if (left > widgetWidth) { + if (left > widgetWidth) left = widgetWidth; - } scroll->h_left = left; @@ -891,17 +888,14 @@ static void input_vscrollbar_bottombutton(rct_window* w) top += 3; widgetHeight = widget->bottom - widget->top - 1; - if (scroll->flags & 0x0001) { + if (scroll->flags & 0x0001) widgetHeight -= 11; - } widgetHeight *= -1; widgetHeight += scroll->v_bottom; - if (widgetHeight < 0) { + if (widgetHeight < 0) widgetHeight = 0; - } - if (top > widgetHeight) { + if (top > widgetHeight) top = widgetHeight; - } scroll->v_top = top;