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)
{
for (i = leveldir_current->first_level; i <= leveldir_current->last_level;i++)
{
TreeInfo *ti = newTreeInfo_setDefaults(TREE_TYPE_LEVEL_NR);
- char identifier[32], name[32];
+ char identifier[32], name[64];
int value = i;
// temporarily load level info to get level name
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;