X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fscreens.c;h=bf9f0a966348c1a9a9b4a82e764287ef8fed4c69;hp=175bae6f743fd39421c5939cff067d5329c8b7cf;hb=6cb445fa1f8aea1bafe3d66b961ddbe3c049769a;hpb=9a2dd50332a4973a75ec1b7829e2155b99cc20ed diff --git a/src/screens.c b/src/screens.c index 175bae6f..bf9f0a96 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1938,7 +1938,7 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) static boolean button_pressed_last = FALSE; boolean button_pressed = FALSE; int pos = choice; - int i; + int i = 0; // needed to prevent compiler warning due to bad code below if (button == MB_MENU_INITIALIZE) { @@ -8497,16 +8497,8 @@ static void CreateScreenMenubuttons(void) menubutton_info[i].get_gadget_position(&x, &y, id); - if (menubutton_info[i].screen_mask == SCREEN_MASK_MAIN_HAS_SOLUTION) - { - width = graphic_info[menubutton_info[i].gfx_pressed].width; - height = graphic_info[menubutton_info[i].gfx_pressed].height; - } - else - { - width = SC_MENUBUTTON_XSIZE; - height = SC_MENUBUTTON_YSIZE; - } + width = graphic_info[menubutton_info[i].gfx_pressed].width; + height = graphic_info[menubutton_info[i].gfx_pressed].height; gfx_unpressed = menubutton_info[i].gfx_unpressed; gfx_pressed = menubutton_info[i].gfx_pressed;