]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - menu.c
add new pseudo variable $# containing the number of arguments to the alias
[xonotic/darkplaces.git] / menu.c
diff --git a/menu.c b/menu.c
index 7dd5ddce6128506aff241195bf6a9ba01c64cf2c..754152cc10afd18aab5f98f3a2a18fe27a7c850b 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -111,7 +111,7 @@ void M_Update_Return_Reason(char *s)
 {
        strlcpy(m_return_reason, s, sizeof(m_return_reason));
        if (s)
-               Con_Printf("%s\n", s);
+               Con_DPrintf("%s\n", s);
 }
 
 #define StartingGame   (m_multiplayer_cursor == 1)
@@ -187,30 +187,30 @@ static void M_DrawCharacter (float cx, float cy, int num)
        char temp[2];
        temp[0] = num;
        temp[1] = 0;
-       DrawQ_String_Font(menu_x + cx, menu_y + cy, temp, 1, 8, 8, 1, 1, 1, 1, 0, NULL, true, FONT_MENU);
+       DrawQ_String(menu_x + cx, menu_y + cy, temp, 1, 8, 8, 1, 1, 1, 1, 0, NULL, true, FONT_MENU);
 }
 
 static void M_PrintColored(float cx, float cy, const char *str)
 {
-       DrawQ_String_Font(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0, NULL, false, FONT_MENU);
+       DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0, NULL, false, FONT_MENU);
 }
 
 static void M_Print(float cx, float cy, const char *str)
 {
-       DrawQ_String_Font(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0, NULL, true, FONT_MENU);
+       DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0, NULL, true, FONT_MENU);
 }
 
 static void M_PrintRed(float cx, float cy, const char *str)
 {
-       DrawQ_String_Font(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 0, 0, 1, 0, NULL, true, FONT_MENU);
+       DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 0, 0, 1, 0, NULL, true, FONT_MENU);
 }
 
 static void M_ItemPrint(float cx, float cy, const char *str, int unghosted)
 {
        if (unghosted)
-               DrawQ_String_Font(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0, NULL, true, FONT_MENU);
+               DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0, NULL, true, FONT_MENU);
        else
-               DrawQ_String_Font(menu_x + cx, menu_y + cy, str, 0, 8, 8, 0.4, 0.4, 0.4, 1, 0, NULL, true, FONT_MENU);
+               DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 0.4, 0.4, 0.4, 1, 0, NULL, true, FONT_MENU);
 }
 
 static void M_DrawPic(float cx, float cy, const char *picname)
@@ -2884,7 +2884,7 @@ static void M_Video_Draw (void)
        // Current and Proposed Resolution
        M_Print(16, video_cursor_table[t] - 12, "    Current Resolution");
        if (vid_supportrefreshrate && vid.userefreshrate && vid.fullscreen)
-               M_Print(220, video_cursor_table[t] - 12, va("%dx%d %dhz", vid.width, vid.height, vid.refreshrate));
+               M_Print(220, video_cursor_table[t] - 12, va("%dx%d %.2fhz", vid.width, vid.height, vid.refreshrate));
        else
                M_Print(220, video_cursor_table[t] - 12, va("%dx%d", vid.width, vid.height));
        M_Print(16, video_cursor_table[t], "        New Resolution");
@@ -2909,7 +2909,7 @@ static void M_Video_Draw (void)
 
        // Refresh Rate
        M_ItemPrint(16, video_cursor_table[t], "          Refresh Rate", vid_supportrefreshrate && vid_userefreshrate.integer);
-       M_DrawSlider(220, video_cursor_table[t], vid_refreshrate.integer, 60, 150);
+       M_DrawSlider(220, video_cursor_table[t], vid_refreshrate.value, 50, 150);
        t++;
 
        // Fullscreen
@@ -2918,19 +2918,19 @@ static void M_Video_Draw (void)
        t++;
 
        // Vertical Sync
-       M_ItemPrint(16, video_cursor_table[t], "         Vertical Sync", gl_videosyncavailable);
+       M_ItemPrint(16, video_cursor_table[t], "         Vertical Sync", true);
        M_DrawCheckbox(220, video_cursor_table[t], vid_vsync.integer);
        t++;
 
-       M_ItemPrint(16, video_cursor_table[t], "    Anisotropic Filter", gl_support_anisotropy);
-       M_DrawSlider(220, video_cursor_table[t], gl_texture_anisotropy.integer, 1, gl_max_anisotropy);
+       M_ItemPrint(16, video_cursor_table[t], "    Anisotropic Filter", vid.support.ext_texture_filter_anisotropic);
+       M_DrawSlider(220, video_cursor_table[t], gl_texture_anisotropy.integer, 1, vid.max_anisotropy);
        t++;
 
        M_ItemPrint(16, video_cursor_table[t], "       Texture Quality", true);
        M_DrawSlider(220, video_cursor_table[t], gl_picmip.value, 3, 0);
        t++;
 
-       M_ItemPrint(16, video_cursor_table[t], "   Texture Compression", gl_support_texture_compression);
+       M_ItemPrint(16, video_cursor_table[t], "   Texture Compression", vid.support.arb_texture_compression);
        M_DrawCheckbox(220, video_cursor_table[t], gl_texturecompression.integer);
        t++;
 
@@ -2972,13 +2972,13 @@ static void M_Menu_Video_AdjustSliders (int dir)
        else if (video_cursor == t++)
                Cvar_SetValueQuick (&vid_userefreshrate, !vid_userefreshrate.integer);
        else if (video_cursor == t++)
-               Cvar_SetValueQuick (&vid_refreshrate, bound(60, vid_refreshrate.integer + dir, 150));
+               Cvar_SetValueQuick (&vid_refreshrate, bound(50, vid_refreshrate.value + dir, 150));
        else if (video_cursor == t++)
                Cvar_SetValueQuick (&vid_fullscreen, !vid_fullscreen.integer);
        else if (video_cursor == t++)
                Cvar_SetValueQuick (&vid_vsync, !vid_vsync.integer);
        else if (video_cursor == t++)
-               Cvar_SetValueQuick (&gl_texture_anisotropy, bound(1, gl_texture_anisotropy.value * (dir < 0 ? 0.5 : 2.0), gl_max_anisotropy));
+               Cvar_SetValueQuick (&gl_texture_anisotropy, bound(1, gl_texture_anisotropy.value * (dir < 0 ? 0.5 : 2.0), vid.max_anisotropy));
        else if (video_cursor == t++)
                Cvar_SetValueQuick (&gl_picmip, bound(0, gl_picmip.value - dir, 3));
        else if (video_cursor == t++)
@@ -4486,7 +4486,6 @@ typedef struct modlist_entry_s
 static int modlist_cursor;
 //static int modlist_viewcount;
 
-#define MODLIST_TOTALSIZE              256
 static int modlist_count = 0;
 static modlist_entry_t modlist[MODLIST_TOTALSIZE];