added using setup values for tile selection cursor for MM game engine
[rocksndiamonds.git] / src / screens.c
index 421238bebf31da5c0e423d6764cb15d1efe4b75d..4d5c8b18cbf992b9fa4f516fffccb433c8628c83 100644 (file)
@@ -680,6 +680,8 @@ static char *main_text_title_1                      = NULL;
 static char *main_text_title_2                 = NULL;
 static char *main_text_title_3                 = NULL;
 
+extern char debug_xsn_mode[];
+
 struct MainControlInfo
 {
   int nr;
@@ -3692,6 +3694,10 @@ static void DrawInfoScreen_Version(void)
 
   DrawTextF(xstart1, ystart, font_head, "Source date");
   DrawTextF(xstart2, ystart, font_text, getSourceDateString());
+  ystart += ystep_line;
+
+  DrawTextF(xstart1, ystart, font_head, "Commit hash");
+  DrawTextF(xstart2, ystart, font_text, getSourceHashString());
   ystart += ystep_para;
 
   DrawTextF(xstart1, ystart, font_head, "Library");
@@ -6387,6 +6393,7 @@ static struct TokenInfo setup_info_graphics[] =
   { TYPE_SWITCH,       &setup.show_titlescreen,"Show Title Screens:"   },
   { TYPE_SWITCH,       &setup.toons,           "Show Menu Animations:" },
   { TYPE_SWITCH,       &setup.small_game_graphics, "Small Game Graphics:" },
+  { TYPE_YES_NO_AUTO,  &setup.debug.xsn_mode,  debug_xsn_mode          },
   { TYPE_EMPTY,                NULL,                   ""                      },
   { TYPE_LEAVE_MENU,   execSetupMain,          "Back"                  },
 
@@ -6757,6 +6764,10 @@ static void drawSetupValue(int screen_pos, int setup_info_pos_raw)
 
     if (startx + font_xoffset < text_startx + text_width + text_font_xoffset)
     {
+      // when using narrow font, left-shifting text "auto" not needed
+      if (type & TYPE_YES_NO_AUTO)
+       xpos += 1;
+
       xpos += 1;
       startx = mSX + xpos * 32;
 
@@ -7543,7 +7554,7 @@ static boolean ConfigureJoystickMapButtonsAndAxes(SDL_Joystick *joystick)
   Event event;
   int alpha = 200, alpha_step = -1;
   int alpha_ticks = 0;
-  char mapping[4096], temp[4096];
+  char mapping[4096], temp[256];
   int font_name = MENU_SETUP_FONT_TITLE;
   int font_info = MENU_SETUP_FONT_TEXT;
   int spacing_name = menu.line_spacing_setup[SETUP_MODE_INPUT];
@@ -8714,7 +8725,7 @@ static void CreateScreenMenubuttons(void)
                      GDI_END);
 
     if (gi == NULL)
-      Error(ERR_EXIT, "cannot create gadget");
+      Fail("cannot create gadget");
 
     screen_gadget[id] = gi;
   }
@@ -8782,7 +8793,7 @@ static void CreateScreenScrollbuttons(void)
                      GDI_END);
 
     if (gi == NULL)
-      Error(ERR_EXIT, "cannot create gadget");
+      Fail("cannot create gadget");
 
     screen_gadget[id] = gi;
   }
@@ -8863,7 +8874,7 @@ static void CreateScreenScrollbars(void)
                      GDI_END);
 
     if (gi == NULL)
-      Error(ERR_EXIT, "cannot create gadget");
+      Fail("cannot create gadget");
 
     screen_gadget[id] = gi;
   }
@@ -8909,7 +8920,7 @@ static void CreateScreenTextInputGadgets(void)
                      GDI_END);
 
     if (gi == NULL)
-      Error(ERR_EXIT, "cannot create gadget");
+      Fail("cannot create gadget");
 
     screen_gadget[id] = gi;
   }