-#endif
-
- // printf("::: startx == %d\n", startx);
-
- DrawText(startx, starty, value_string, font_nr);
-
- if (font_draw_xoffset_modified)
- getFontBitmapInfo(font_nr)->draw_xoffset = font_draw_xoffset_old;
-}
-
-#else
-
-static void drawSetupValue(int pos)
-{
- boolean font_draw_xoffset_modified = FALSE;
- int font_draw_xoffset_old = -1;
- int xpos = MENU_SCREEN_VALUE_XPOS;
- int ypos = MENU_SCREEN_START_YPOS + pos;
- int startx = mSX + xpos * 32;
- int starty = mSY + ypos * 32;
- int font_nr, font_width;
-#if 0
- int font_height;
-#endif
- int type = setup_info[pos].type;
- void *value = setup_info[pos].value;
- char *value_string = getSetupValue(type, value);
-#if 1
- int i;
-#endif
-
- if (value_string == NULL)
- return;
-
- if (type & TYPE_KEY)
- {
- xpos = MENU_SCREEN_START_XPOS;
-
- if (type & TYPE_QUERY)
- value_string = "<press key>";
- }
- else if (type & TYPE_STRING)
- {
- int max_value_len = (SCR_FIELDX - 2) * 2;
-
- xpos = MENU_SCREEN_START_XPOS;
-
- if (strlen(value_string) > max_value_len)
- value_string[max_value_len] = '\0';
- }
- else if (type & TYPE_YES_NO_AUTO)
- {
- xpos = MENU_SCREEN_VALUE_XPOS - 1;
- }
-
- startx = mSX + xpos * 32;
- starty = mSY + ypos * 32;
- font_nr = getSetupValueFont(type, value);
- font_width = getFontWidth(font_nr);
-#if 0
- font_height = getFontHeight(font_nr);
-#endif
-
- /* downward compatibility correction for Juergen Bonhagen's menu settings */
- if (setup_mode != SETUP_MODE_INPUT)
- {
- int check_font_nr = FONT_OPTION_ON; /* known font that needs correction */
- int font1_xoffset = getFontBitmapInfo(font_nr)->draw_xoffset;
- int font2_xoffset = getFontBitmapInfo(check_font_nr)->draw_xoffset;
- int text_startx = mSX + MENU_SCREEN_START_XPOS * 32;
- int text_font_nr = getSetupTextFont(FONT_MENU_2);
- int text_font_xoffset = getFontBitmapInfo(text_font_nr)->draw_xoffset;
- int text_width = MAX_MENU_TEXT_LENGTH_MEDIUM * getFontWidth(text_font_nr);
- boolean correct_font_draw_xoffset = FALSE;
-
- if (xpos == MENU_SCREEN_START_XPOS &&
- startx + font1_xoffset < text_startx + text_font_xoffset)
- correct_font_draw_xoffset = TRUE;
-
- if (xpos == MENU_SCREEN_VALUE_XPOS &&
- startx + font2_xoffset < text_startx + text_width + text_font_xoffset)
- correct_font_draw_xoffset = TRUE;
-
- /* check if setup value would overlap with setup text when printed */
- /* (this can happen for extreme/wrong values for font draw offset) */
- if (correct_font_draw_xoffset)
- {
- font_draw_xoffset_old = getFontBitmapInfo(font_nr)->draw_xoffset;
- font_draw_xoffset_modified = TRUE;
-
- if (type & TYPE_KEY)
- getFontBitmapInfo(font_nr)->draw_xoffset += 2 * getFontWidth(font_nr);
- else if (!(type & TYPE_STRING))
- getFontBitmapInfo(font_nr)->draw_xoffset = text_font_xoffset + 20 -
- MAX_MENU_TEXT_LENGTH_MEDIUM * (16 - getFontWidth(text_font_nr));
- }
- }
-
-#if 0
- DrawBackground(startx, starty, SX + SXSIZE - startx, font_height);
-#else
- for (i = 0; i <= MENU_SCREEN_MAX_XPOS - xpos; i++)
- DrawText(startx + i * font_width, starty, " ", font_nr);
-#endif