2 Copyright (C) 1996-1997 Id Software, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 enum m_state_e m_state;
32 void M_Menu_Main_f (void);
33 void M_Menu_SinglePlayer_f (void);
34 void M_Menu_Load_f (void);
35 void M_Menu_Save_f (void);
36 void M_Menu_MultiPlayer_f (void);
37 void M_Menu_Setup_f (void);
38 void M_Menu_Options_f (void);
39 void M_Menu_Options_Effects_f (void);
40 void M_Menu_Options_ColorControl_f (void);
41 void M_Menu_Keys_f (void);
42 void M_Menu_Video_f (void);
43 void M_Menu_Help_f (void);
44 void M_Menu_Quit_f (void);
45 void M_Menu_LanConfig_f (void);
46 void M_Menu_GameOptions_f (void);
47 void M_Menu_ServerList_f (void);
49 void M_Main_Draw (void);
50 void M_SinglePlayer_Draw (void);
51 void M_Load_Draw (void);
52 void M_Save_Draw (void);
53 void M_MultiPlayer_Draw (void);
54 void M_Setup_Draw (void);
55 void M_Options_Draw (void);
56 void M_Options_Effects_Draw (void);
57 void M_Options_ColorControl_Draw (void);
58 void M_Keys_Draw (void);
59 void M_Video_Draw (void);
60 void M_Help_Draw (void);
61 void M_Quit_Draw (void);
62 void M_LanConfig_Draw (void);
63 void M_GameOptions_Draw (void);
64 void M_ServerList_Draw (void);
66 void M_Main_Key (int key);
67 void M_SinglePlayer_Key (int key);
68 void M_Load_Key (int key);
69 void M_Save_Key (int key);
70 void M_MultiPlayer_Key (int key);
71 void M_Setup_Key (int key);
72 void M_Options_Key (int key);
73 void M_Options_Effects_Key (int key);
74 void M_Options_ColorControl_Key (int key);
75 void M_Keys_Key (int key);
76 void M_Video_Key (int key);
77 void M_Help_Key (int key);
78 void M_Quit_Key (int key);
79 void M_LanConfig_Key (int key);
80 void M_GameOptions_Key (int key);
81 void M_ServerList_Key (int key);
83 qboolean m_entersound; // play after drawing a frame, so caching
84 // won't disrupt the sound
86 char m_return_reason [32];
88 #define StartingGame (m_multiplayer_cursor == 1)
89 #define JoiningGame (m_multiplayer_cursor == 0)
92 #define NumberOfNehahraDemos 34
99 nehahrademonames_t NehahraDemos[NumberOfNehahraDemos] =
101 {"intro", "Prologue"},
102 {"genf", "The Beginning"},
103 {"genlab", "A Doomed Project"},
104 {"nehcre", "The New Recruits"},
105 {"maxneh", "Breakthrough"},
106 {"maxchar", "Renewal and Duty"},
107 {"crisis", "Worlds Collide"},
108 {"postcris", "Darkening Skies"},
109 {"hearing", "The Hearing"},
110 {"getjack", "On a Mexican Radio"},
111 {"prelude", "Honor and Justice"},
112 {"abase", "A Message Sent"},
113 {"effect", "The Other Side"},
114 {"uhoh", "Missing in Action"},
115 {"prepare", "The Response"},
116 {"vision", "Farsighted Eyes"},
117 {"maxturns", "Enter the Immortal"},
118 {"backlot", "Separate Ways"},
119 {"maxside", "The Ancient Runes"},
120 {"counter", "The New Initiative"},
121 {"warprep", "Ghosts to the World"},
122 {"counter1", "A Fate Worse Than Death"},
123 {"counter2", "Friendly Fire"},
124 {"counter3", "Minor Setback"},
125 {"madmax", "Scores to Settle"},
126 {"quake", "One Man"},
127 {"cthmm", "Shattered Masks"},
128 {"shades", "Deal with the Dead"},
129 {"gophil", "An Unlikely Hero"},
130 {"cstrike", "War in Hell"},
131 {"shubset", "The Conspiracy"},
132 {"shubdie", "Even Death May Die"},
133 {"newranks", "An Empty Throne"},
134 {"seal", "The Seal is Broken"}
137 float menu_x, menu_y, menu_width, menu_height;
139 void M_Background(int width, int height)
142 menu_height = height;
143 menu_x = (vid.conwidth - menu_width) * 0.5;
144 menu_y = (vid.conheight - menu_height) * 0.5;
145 DrawQ_Fill(menu_x, menu_y, menu_width, menu_height, 0, 0, 0, 0.5, 0);
146 //DrawQ_Fill(0, 0, vid.conwidth, vid.conheight, 0, 0, 0, 0.5, 0);
153 Draws one solid graphics character
156 void M_DrawCharacter (float cx, float cy, int num)
161 DrawQ_String(menu_x + cx, menu_y + cy, temp, 1, 8, 8, 1, 1, 1, 1, 0);
164 void M_Print (float cx, float cy, const char *str)
166 DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0);
169 void M_PrintWhite (float cx, float cy, const char *str)
171 DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0);
174 void M_ItemPrint (float cx, float cy, char *str, int unghosted)
177 DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0);
179 DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 0.4, 0.4, 0.4, 1, 0);
182 void M_DrawPic (float cx, float cy, char *picname)
184 DrawQ_Pic (menu_x + cx, menu_y + cy, picname, 0, 0, 1, 1, 1, 1, 0);
187 qbyte identityTable[256];
188 qbyte translationTable[256];
190 void M_BuildTranslationTable(int top, int bottom)
193 qbyte *dest, *source;
195 for (j = 0; j < 256; j++)
196 identityTable[j] = j;
197 dest = translationTable;
198 source = identityTable;
199 memcpy (dest, source, 256);
201 // LordHavoc: corrected skin color ranges
202 if (top < 128 || (top >= 224 && top < 240)) // the artists made some backwards ranges. sigh.
203 memcpy (dest + TOP_RANGE, source + top, 16);
205 for (j=0 ; j<16 ; j++)
206 dest[TOP_RANGE+j] = source[top+15-j];
208 // LordHavoc: corrected skin color ranges
209 if (bottom < 128 || (bottom >= 224 && bottom < 240))
210 memcpy (dest + BOTTOM_RANGE, source + bottom, 16);
212 for (j=0 ; j<16 ; j++)
213 dest[BOTTOM_RANGE+j] = source[bottom+15-j];
217 void M_DrawTextBox (float x, float y, float width, float height)
225 M_DrawPic (cx, cy, "gfx/box_tl.lmp");
226 for (n = 0; n < height; n++)
229 M_DrawPic (cx, cy, "gfx/box_ml.lmp");
231 M_DrawPic (cx, cy+8, "gfx/box_bl.lmp");
238 M_DrawPic (cx, cy, "gfx/box_tm.lmp");
239 for (n = 0; n < height; n++)
243 M_DrawPic (cx, cy, "gfx/box_mm2.lmp");
245 M_DrawPic (cx, cy, "gfx/box_mm.lmp");
247 M_DrawPic (cx, cy+8, "gfx/box_bm.lmp");
254 M_DrawPic (cx, cy, "gfx/box_tr.lmp");
255 for (n = 0; n < height; n++)
258 M_DrawPic (cx, cy, "gfx/box_mr.lmp");
260 M_DrawPic (cx, cy+8, "gfx/box_br.lmp");
263 //=============================================================================
265 //int m_save_demonum;
272 void M_ToggleMenu_f (void)
276 if (key_dest != key_menu || m_state != m_main)
287 void M_Demo_Draw (void)
291 M_Background(320, 200);
293 for (i = 0;i < NumberOfNehahraDemos;i++)
294 M_Print (16, 16 + 8*i, NehahraDemos[i].desc);
297 M_DrawCharacter (8, 16 + demo_cursor*8, 12+((int)(realtime*4)&1));
301 void M_Menu_Demos_f (void)
308 void M_Demo_Key (int k)
317 S_LocalSound ("misc/menu2.wav");
320 Cbuf_AddText (va ("playdemo %s\n", NehahraDemos[demo_cursor].name));
325 S_LocalSound ("misc/menu1.wav");
328 demo_cursor = NumberOfNehahraDemos;
333 S_LocalSound ("misc/menu1.wav");
335 if (demo_cursor > NumberOfNehahraDemos)
341 //=============================================================================
346 int MAIN_ITEMS = 4; // Nehahra: Menu Disable
348 void M_Menu_Main_f (void)
350 if (gamemode == GAME_NEHAHRA)
352 if (NehGameType == TYPE_DEMO)
354 else if (NehGameType == TYPE_GAME)
363 if (key_dest != key_menu)
365 m_save_demonum = cls.demonum;
375 void M_Main_Draw (void)
380 M_Background(320, 200);
382 M_DrawPic (16, 4, "gfx/qplaque.lmp");
383 p = Draw_CachePic ("gfx/ttl_main.lmp");
384 M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_main.lmp");
386 if (gamemode == GAME_NEHAHRA)
388 if (NehGameType == TYPE_BOTH)
389 M_DrawPic (72, 32, "gfx/mainmenu.lmp");
390 else if (NehGameType == TYPE_GAME)
391 M_DrawPic (72, 32, "gfx/gamemenu.lmp");
393 M_DrawPic (72, 32, "gfx/demomenu.lmp");
396 M_DrawPic (72, 32, "gfx/mainmenu.lmp");
398 f = (int)(realtime * 10)%6;
400 M_DrawPic (54, 32 + m_main_cursor * 20, va("gfx/menudot%i.lmp", f+1));
404 void M_Main_Key (int key)
411 //cls.demonum = m_save_demonum;
412 //if (cls.demonum != -1 && !cls.demoplayback && cls.state != ca_connected)
417 S_LocalSound ("misc/menu1.wav");
418 if (++m_main_cursor >= MAIN_ITEMS)
423 S_LocalSound ("misc/menu1.wav");
424 if (--m_main_cursor < 0)
425 m_main_cursor = MAIN_ITEMS - 1;
431 if (gamemode == GAME_NEHAHRA)
436 switch (m_main_cursor)
439 M_Menu_SinglePlayer_f ();
447 M_Menu_MultiPlayer_f ();
457 Cbuf_AddText ("disconnect\n");
458 Cbuf_AddText ("playdemo endcred\n");
467 switch (m_main_cursor)
470 M_Menu_SinglePlayer_f ();
474 M_Menu_MultiPlayer_f ();
484 Cbuf_AddText ("disconnect\n");
485 Cbuf_AddText ("playdemo endcred\n");
494 switch (m_main_cursor)
503 Cbuf_AddText ("disconnect\n");
504 Cbuf_AddText ("playdemo endcred\n");
520 switch (m_main_cursor)
523 M_Menu_SinglePlayer_f ();
527 M_Menu_MultiPlayer_f ();
546 //=============================================================================
547 /* SINGLE PLAYER MENU */
549 int m_singleplayer_cursor;
550 #define SINGLEPLAYER_ITEMS 3
553 void M_Menu_SinglePlayer_f (void)
556 m_state = m_singleplayer;
561 void M_SinglePlayer_Draw (void)
565 M_Background(320, 200);
567 M_DrawPic (16, 4, "gfx/qplaque.lmp");
568 p = Draw_CachePic ("gfx/ttl_sgl.lmp");
570 // Transfusion doesn't have a single player mode
571 if (gamemode == GAME_TRANSFUSION || gamemode == GAME_NEXUIZ)
573 M_DrawPic ((320 - p->width) / 2, 4, "gfx/ttl_sgl.lmp");
575 M_DrawTextBox (60, 8 * 8, 23, 4);
576 if (gamemode == GAME_NEXUIZ)
577 M_PrintWhite (95, 10 * 8, "Nexuiz is for");
579 M_PrintWhite (95, 10 * 8, "Transfusion is for");
580 M_PrintWhite (83, 11 * 8, "multiplayer play only");
586 M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_sgl.lmp");
587 M_DrawPic (72, 32, "gfx/sp_menu.lmp");
589 f = (int)(realtime * 10)%6;
591 M_DrawPic (54, 32 + m_singleplayer_cursor * 20, va("gfx/menudot%i.lmp", f+1));
596 void M_SinglePlayer_Key (int key)
598 if (gamemode == GAME_TRANSFUSION || gamemode == GAME_NEXUIZ)
600 if (key == K_ESCAPE || key == K_ENTER)
612 S_LocalSound ("misc/menu1.wav");
613 if (++m_singleplayer_cursor >= SINGLEPLAYER_ITEMS)
614 m_singleplayer_cursor = 0;
618 S_LocalSound ("misc/menu1.wav");
619 if (--m_singleplayer_cursor < 0)
620 m_singleplayer_cursor = SINGLEPLAYER_ITEMS - 1;
626 switch (m_singleplayer_cursor)
631 Cbuf_AddText ("disconnect\n");
632 Cbuf_AddText ("maxplayers 1\n");
633 Cbuf_AddText ("deathmatch 0\n");
634 Cbuf_AddText ("coop 0\n");
635 if (gamemode == GAME_NEHAHRA)
636 Cbuf_AddText ("map nehstart\n");
638 Cbuf_AddText ("map start\n");
652 //=============================================================================
655 int load_cursor; // 0 < load_cursor < MAX_SAVEGAMES
657 #define MAX_SAVEGAMES 12
658 char m_filenames[MAX_SAVEGAMES][SAVEGAME_COMMENT_LENGTH+1];
659 int loadable[MAX_SAVEGAMES];
661 void M_ScanSaves (void)
664 char name[MAX_OSPATH];
669 for (i=0 ; i<MAX_SAVEGAMES ; i++)
671 strcpy (m_filenames[i], "--- UNUSED SLOT ---");
673 sprintf (name, "s%i.sav", i);
674 f = FS_Open (name, "r", false);
677 str = FS_Getline (f);
678 sscanf (str, "%i\n", &version);
679 str = FS_Getline (f);
680 strncpy (m_filenames[i], str, sizeof(m_filenames[i])-1);
682 // change _ back to space
683 for (j=0 ; j<SAVEGAME_COMMENT_LENGTH ; j++)
684 if (m_filenames[i][j] == '_')
685 m_filenames[i][j] = ' ';
691 void M_Menu_Load_f (void)
700 void M_Menu_Save_f (void)
706 if (svs.maxclients != 1)
715 void M_Load_Draw (void)
720 M_Background(320, 200);
722 p = Draw_CachePic ("gfx/p_load.lmp");
723 M_DrawPic ( (320-p->width)/2, 4, "gfx/p_load.lmp");
725 for (i=0 ; i< MAX_SAVEGAMES; i++)
726 M_Print (16, 32 + 8*i, m_filenames[i]);
729 M_DrawCharacter (8, 32 + load_cursor*8, 12+((int)(realtime*4)&1));
733 void M_Save_Draw (void)
738 M_Background(320, 200);
740 p = Draw_CachePic ("gfx/p_save.lmp");
741 M_DrawPic ( (320-p->width)/2, 4, "gfx/p_save.lmp");
743 for (i=0 ; i<MAX_SAVEGAMES ; i++)
744 M_Print (16, 32 + 8*i, m_filenames[i]);
747 M_DrawCharacter (8, 32 + load_cursor*8, 12+((int)(realtime*4)&1));
751 void M_Load_Key (int k)
756 M_Menu_SinglePlayer_f ();
760 S_LocalSound ("misc/menu2.wav");
761 if (!loadable[load_cursor])
766 // issue the load command
767 Cbuf_AddText (va ("load s%i\n", load_cursor) );
772 S_LocalSound ("misc/menu1.wav");
775 load_cursor = MAX_SAVEGAMES-1;
780 S_LocalSound ("misc/menu1.wav");
782 if (load_cursor >= MAX_SAVEGAMES)
789 void M_Save_Key (int k)
794 M_Menu_SinglePlayer_f ();
800 Cbuf_AddText (va("save s%i\n", load_cursor));
805 S_LocalSound ("misc/menu1.wav");
808 load_cursor = MAX_SAVEGAMES-1;
813 S_LocalSound ("misc/menu1.wav");
815 if (load_cursor >= MAX_SAVEGAMES)
821 //=============================================================================
822 /* MULTIPLAYER MENU */
824 int m_multiplayer_cursor;
825 #define MULTIPLAYER_ITEMS 3
828 void M_Menu_MultiPlayer_f (void)
831 m_state = m_multiplayer;
836 void M_MultiPlayer_Draw (void)
841 M_Background(320, 200);
843 M_DrawPic (16, 4, "gfx/qplaque.lmp");
844 p = Draw_CachePic ("gfx/p_multi.lmp");
845 M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
846 M_DrawPic (72, 32, "gfx/mp_menu.lmp");
848 f = (int)(realtime * 10)%6;
850 M_DrawPic (54, 32 + m_multiplayer_cursor * 20, va("gfx/menudot%i.lmp", f+1));
854 void M_MultiPlayer_Key (int key)
863 S_LocalSound ("misc/menu1.wav");
864 if (++m_multiplayer_cursor >= MULTIPLAYER_ITEMS)
865 m_multiplayer_cursor = 0;
869 S_LocalSound ("misc/menu1.wav");
870 if (--m_multiplayer_cursor < 0)
871 m_multiplayer_cursor = MULTIPLAYER_ITEMS - 1;
876 switch (m_multiplayer_cursor)
880 M_Menu_LanConfig_f ();
890 //=============================================================================
893 int setup_cursor = 4;
894 int setup_cursor_table[] = {40, 56, 80, 104, 140};
896 char setup_hostname[16];
897 char setup_myname[16];
903 #define NUM_SETUP_CMDS 5
905 void M_Menu_Setup_f (void)
910 strcpy(setup_myname, cl_name.string);
911 strcpy(setup_hostname, hostname.string);
912 setup_top = setup_oldtop = cl_color.integer >> 4;
913 setup_bottom = setup_oldbottom = cl_color.integer & 15;
916 // LordHavoc: rewrote this code greatly
917 void M_MenuPlayerTranslate (qbyte *translation, int top, int bottom)
920 unsigned int trans[4096];
922 static qbyte pixels[4096];
923 static int menuplyr_width, menuplyr_height, menuplyr_top, menuplyr_bottom, menuplyr_load = true, menuplyr_failed = false;
927 if (menuplyr_top == top && menuplyr_bottom == bottom)
931 menuplyr_bottom = bottom;
935 menuplyr_load = false;
936 f = FS_LoadFile("gfx/menuplyr.lmp", true);
939 menuplyr_failed = true;
942 data = LoadLMPAs8Bit (f, 0, 0);
944 if (image_width * image_height > 4096)
946 Con_Printf("M_MenuPlayerTranslate: image larger than 4096 pixel buffer\n");
948 menuplyr_failed = true;
951 menuplyr_width = image_width;
952 menuplyr_height = image_height;
953 memcpy(pixels, data, menuplyr_width * menuplyr_height);
957 M_BuildTranslationTable (menuplyr_top*16, menuplyr_bottom*16);
959 for (i = 0;i < menuplyr_width * menuplyr_height;i++)
960 trans[i] = palette_complete[translation[pixels[i]]];
962 Draw_NewPic("gfx/menuplyr.lmp", menuplyr_width, menuplyr_height, true, (qbyte *)trans);
965 void M_Setup_Draw (void)
969 M_Background(320, 200);
971 M_DrawPic (16, 4, "gfx/qplaque.lmp");
972 p = Draw_CachePic ("gfx/p_multi.lmp");
973 M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
975 M_Print (64, 40, "Hostname");
976 M_DrawTextBox (160, 32, 16, 1);
977 M_Print (168, 40, setup_hostname);
979 M_Print (64, 56, "Your name");
980 M_DrawTextBox (160, 48, 16, 1);
981 M_Print (168, 56, setup_myname);
983 M_Print (64, 80, "Shirt color");
984 M_Print (64, 104, "Pants color");
986 M_DrawTextBox (64, 140-8, 14, 1);
987 M_Print (72, 140, "Accept Changes");
989 M_DrawPic (160, 64, "gfx/bigbox.lmp");
991 // LordHavoc: rewrote this code greatly
992 M_MenuPlayerTranslate (translationTable, setup_top, setup_bottom);
993 M_DrawPic (172, 72, "gfx/menuplyr.lmp");
995 M_DrawCharacter (56, setup_cursor_table [setup_cursor], 12+((int)(realtime*4)&1));
997 if (setup_cursor == 0)
998 M_DrawCharacter (168 + 8*strlen(setup_hostname), setup_cursor_table [setup_cursor], 10+((int)(realtime*4)&1));
1000 if (setup_cursor == 1)
1001 M_DrawCharacter (168 + 8*strlen(setup_myname), setup_cursor_table [setup_cursor], 10+((int)(realtime*4)&1));
1005 void M_Setup_Key (int k)
1012 M_Menu_MultiPlayer_f ();
1016 S_LocalSound ("misc/menu1.wav");
1018 if (setup_cursor < 0)
1019 setup_cursor = NUM_SETUP_CMDS-1;
1023 S_LocalSound ("misc/menu1.wav");
1025 if (setup_cursor >= NUM_SETUP_CMDS)
1030 if (setup_cursor < 2)
1032 S_LocalSound ("misc/menu3.wav");
1033 if (setup_cursor == 2)
1034 setup_top = setup_top - 1;
1035 if (setup_cursor == 3)
1036 setup_bottom = setup_bottom - 1;
1039 if (setup_cursor < 2)
1042 S_LocalSound ("misc/menu3.wav");
1043 if (setup_cursor == 2)
1044 setup_top = setup_top + 1;
1045 if (setup_cursor == 3)
1046 setup_bottom = setup_bottom + 1;
1050 if (setup_cursor == 0 || setup_cursor == 1)
1053 if (setup_cursor == 2 || setup_cursor == 3)
1056 // setup_cursor == 4 (OK)
1057 if (strcmp(cl_name.string, setup_myname) != 0)
1058 Cbuf_AddText ( va ("name \"%s\"\n", setup_myname) );
1059 if (strcmp(hostname.string, setup_hostname) != 0)
1060 Cvar_Set("hostname", setup_hostname);
1061 if (setup_top != setup_oldtop || setup_bottom != setup_oldbottom)
1062 Cbuf_AddText( va ("color %i %i\n", setup_top, setup_bottom) );
1063 m_entersound = true;
1064 M_Menu_MultiPlayer_f ();
1068 if (setup_cursor == 0)
1070 if (strlen(setup_hostname))
1071 setup_hostname[strlen(setup_hostname)-1] = 0;
1074 if (setup_cursor == 1)
1076 if (strlen(setup_myname))
1077 setup_myname[strlen(setup_myname)-1] = 0;
1082 if (k < 32 || k > 127)
1084 if (setup_cursor == 0)
1086 l = strlen(setup_hostname);
1089 setup_hostname[l+1] = 0;
1090 setup_hostname[l] = k;
1093 if (setup_cursor == 1)
1095 l = strlen(setup_myname);
1098 setup_myname[l+1] = 0;
1099 setup_myname[l] = k;
1108 if (setup_bottom > 15)
1110 if (setup_bottom < 0)
1114 //=============================================================================
1117 #define SLIDER_RANGE 10
1119 void M_DrawSlider (int x, int y, float num, float rangemin, float rangemax)
1124 range = bound(0, (num - rangemin) / (rangemax - rangemin), 1);
1125 M_DrawCharacter (x-8, y, 128);
1126 for (i = 0;i < SLIDER_RANGE;i++)
1127 M_DrawCharacter (x + i*8, y, 129);
1128 M_DrawCharacter (x+i*8, y, 130);
1129 M_DrawCharacter (x + (SLIDER_RANGE-1)*8 * range, y, 131);
1130 sprintf(text, "%g", num);
1131 M_Print(x + (SLIDER_RANGE+2) * 8, y, text);
1134 void M_DrawCheckbox (int x, int y, int on)
1137 M_Print (x, y, "on");
1139 M_Print (x, y, "off");
1143 #define OPTIONS_ITEMS 28
1147 void M_Menu_Options_f (void)
1149 key_dest = key_menu;
1150 m_state = m_options;
1151 m_entersound = true;
1154 extern cvar_t gl_delayfinish;
1155 extern cvar_t slowmo;
1156 extern dllhandle_t jpeg_dll;
1158 void M_Menu_Options_AdjustSliders (int dir)
1160 S_LocalSound ("misc/menu3.wav");
1162 switch (options_cursor)
1165 Cvar_SetValueQuick (&scr_2dresolution, bound(0, scr_2dresolution.value + dir * 0.2, 1));
1168 Cvar_SetValueQuick (&scr_viewsize, bound(30, scr_viewsize.value + dir * 10, 120));
1171 if (jpeg_dll != NULL)
1172 Cvar_SetValueQuick (&scr_screenshot_jpeg, !scr_screenshot_jpeg.integer);
1175 Cvar_SetValueQuick (&r_sky, !r_sky.integer);
1178 Cvar_SetValueQuick (&v_overbrightbits, bound(0, v_overbrightbits.integer + dir, 4));
1181 Cvar_SetValueQuick (&gl_combine, !gl_combine.integer);
1184 Cvar_SetValueQuick (&gl_dither, !gl_dither.integer);
1187 Cvar_SetValueQuick (&gl_delayfinish, !gl_delayfinish.integer);
1190 Cvar_SetValueQuick (&slowmo, bound(0, slowmo.value + dir * 0.25, 5));
1192 case 15: // music volume
1194 Cvar_SetValueQuick (&bgmvolume, bound(0, bgmvolume.value + dir * 1.0, 1));
1196 Cvar_SetValueQuick (&bgmvolume, bound(0, bgmvolume.value + dir * 0.1, 1));
1199 case 16: // sfx volume
1200 Cvar_SetValueQuick (&volume, bound(0, volume.value + dir * 0.1, 1));
1203 Cvar_SetValueQuick (&crosshair, bound(0, crosshair.integer + dir, 5));
1206 Cvar_SetValueQuick (&crosshair_size, bound(1, crosshair_size.value + dir, 5));
1208 case 19: // static crosshair
1209 Cvar_SetValueQuick (&crosshair_static, !crosshair_static.integer);
1211 case 20: // show framerate
1212 Cvar_SetValueQuick (&showfps, !showfps.integer);
1214 case 21: // always run
1215 if (cl_forwardspeed.value > 200)
1217 Cvar_SetValueQuick (&cl_forwardspeed, 200);
1218 Cvar_SetValueQuick (&cl_backspeed, 200);
1222 Cvar_SetValueQuick (&cl_forwardspeed, 400);
1223 Cvar_SetValueQuick (&cl_backspeed, 400);
1226 case 22: // lookspring
1227 Cvar_SetValueQuick (&lookspring, !lookspring.integer);
1229 case 23: // lookstrafe
1230 Cvar_SetValueQuick (&lookstrafe, !lookstrafe.integer);
1232 case 24: // mouse speed
1233 Cvar_SetValueQuick (&sensitivity, bound(1, sensitivity.value + dir * 0.5, 50));
1235 case 25: // mouse look
1236 Cvar_SetValueQuick (&freelook, !freelook.integer);
1238 case 26: // invert mouse
1239 Cvar_SetValueQuick (&m_pitch, -m_pitch.value);
1241 case 27: // windowed mouse
1242 Cvar_SetValueQuick (&vid_mouse, !vid_mouse.integer);
1247 void M_Options_Draw (void)
1252 M_Background(320, 240);
1254 M_DrawPic(16, 4, "gfx/qplaque.lmp");
1255 p = Draw_CachePic("gfx/p_option.lmp");
1256 M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
1259 M_Print(16, y, " Customize controls");y += 8;
1260 M_Print(16, y, " Go to console");y += 8;
1261 M_Print(16, y, " Reset to defaults");y += 8;
1262 M_Print(16, y, " Video Options");y += 8;
1263 M_Print(16, y, " Effects Options");y += 8;
1264 M_Print(16, y, " Color Control Options");y += 8;
1265 M_Print(16, y, " 2D Resolution");M_DrawSlider(220, y, scr_2dresolution.value, 0, 1);y += 8;
1266 M_Print(16, y, " Screen size");M_DrawSlider(220, y, scr_viewsize.value, 30, 120);y += 8;
1267 M_ItemPrint(16, y, " JPEG screenshots", jpeg_dll != NULL);M_DrawCheckbox(220, y, scr_screenshot_jpeg.integer);y += 8;
1268 M_Print(16, y, " Sky");M_DrawCheckbox(220, y, r_sky.integer);y += 8;
1269 M_Print(16, y, " Overbright Bits");M_DrawSlider(220, y, v_overbrightbits.value, 0, 4);y += 8;
1270 M_Print(16, y, " Texture Combine");M_DrawCheckbox(220, y, gl_combine.integer);y += 8;
1271 M_Print(16, y, " Dithering");M_DrawCheckbox(220, y, gl_dither.integer);y += 8;
1272 M_Print(16, y, "Delay refresh (faster)");M_DrawCheckbox(220, y, gl_delayfinish.integer);y += 8;
1273 M_ItemPrint(16, y, " Game Speed", sv.active);M_DrawSlider(220, y, slowmo.value, 0, 5);y += 8;
1274 M_ItemPrint(16, y, " CD Music Volume", cdaudioinitialized);M_DrawSlider(220, y, bgmvolume.value, 0, 1);y += 8;
1275 M_ItemPrint(16, y, " Sound Volume", snd_initialized);M_DrawSlider(220, y, volume.value, 0, 1);y += 8;
1276 M_Print(16, y, " Crosshair");M_DrawSlider(220, y, crosshair.value, 0, 5);y += 8;
1277 M_Print(16, y, " Crosshair Size");M_DrawSlider(220, y, crosshair_size.value, 1, 5);y += 8;
1278 M_Print(16, y, " Static Crosshair");M_DrawCheckbox(220, y, crosshair_static.integer);y += 8;
1279 M_Print(16, y, " Show Framerate");M_DrawCheckbox(220, y, showfps.integer);y += 8;
1280 M_Print(16, y, " Always Run");M_DrawCheckbox(220, y, cl_forwardspeed.value > 200);y += 8;
1281 M_Print(16, y, " Lookspring");M_DrawCheckbox(220, y, lookspring.integer);y += 8;
1282 M_Print(16, y, " Lookstrafe");M_DrawCheckbox(220, y, lookstrafe.integer);y += 8;
1283 M_Print(16, y, " Mouse Speed");M_DrawSlider(220, y, sensitivity.value, 1, 50);y += 8;
1284 M_Print(16, y, " Mouse Look");M_DrawCheckbox(220, y, freelook.integer);y += 8;
1285 M_Print(16, y, " Invert Mouse");M_DrawCheckbox(220, y, m_pitch.value < 0);y += 8;
1286 M_Print(16, y, " Use Mouse");M_DrawCheckbox(220, y, vid_mouse.integer);y += 8;
1289 M_DrawCharacter(200, 32 + options_cursor*8, 12+((int)(realtime*4)&1));
1293 void M_Options_Key (int k)
1302 m_entersound = true;
1303 switch (options_cursor)
1310 key_dest = key_game;
1311 Con_ToggleConsole_f ();
1314 Cbuf_AddText ("exec default.cfg\n");
1320 M_Menu_Options_Effects_f ();
1323 M_Menu_Options_ColorControl_f ();
1326 M_Menu_Options_AdjustSliders (1);
1332 S_LocalSound ("misc/menu1.wav");
1334 if (options_cursor < 0)
1335 options_cursor = OPTIONS_ITEMS-1;
1339 S_LocalSound ("misc/menu1.wav");
1341 if (options_cursor >= OPTIONS_ITEMS)
1346 M_Menu_Options_AdjustSliders (-1);
1350 M_Menu_Options_AdjustSliders (1);
1355 #define OPTIONS_EFFECTS_ITEMS 16
1357 int options_effects_cursor;
1359 void M_Menu_Options_Effects_f (void)
1361 key_dest = key_menu;
1362 m_state = m_options_effects;
1363 m_entersound = true;
1367 extern cvar_t r_detailtextures;
1368 extern cvar_t cl_particles;
1369 extern cvar_t cl_explosions;
1370 extern cvar_t cl_stainmaps;
1371 extern cvar_t r_explosionclip;
1372 extern cvar_t r_dlightmap;
1373 extern cvar_t r_modellights;
1374 extern cvar_t r_coronas;
1375 extern cvar_t gl_flashblend;
1376 extern cvar_t cl_particles_bulletimpacts;
1377 extern cvar_t cl_particles_smoke;
1378 extern cvar_t cl_particles_sparks;
1379 extern cvar_t cl_particles_bubbles;
1380 extern cvar_t cl_particles_blood;
1381 extern cvar_t cl_particles_blood_size;
1382 extern cvar_t cl_particles_blood_alpha;
1384 void M_Menu_Options_Effects_AdjustSliders (int dir)
1386 S_LocalSound ("misc/menu3.wav");
1388 switch (options_effects_cursor)
1391 Cvar_SetValueQuick (&r_modellights, bound(0, r_modellights.value + dir, 8));
1394 Cvar_SetValueQuick (&r_dlightmap, !r_dlightmap.integer);
1397 Cvar_SetValueQuick (&r_coronas, !r_coronas.integer);
1400 Cvar_SetValueQuick (&gl_flashblend, !gl_flashblend.integer);
1403 Cvar_SetValueQuick (&cl_particles, !cl_particles.integer);
1406 Cvar_SetValueQuick (&cl_explosions, !cl_explosions.integer);
1409 Cvar_SetValueQuick (&r_explosionclip, !r_explosionclip.integer);
1412 Cvar_SetValueQuick (&cl_stainmaps, !cl_stainmaps.integer);
1415 Cvar_SetValueQuick (&r_detailtextures, !r_detailtextures.integer);
1418 Cvar_SetValueQuick (&cl_particles_bulletimpacts, !cl_particles_bulletimpacts.integer);
1421 Cvar_SetValueQuick (&cl_particles_smoke, !cl_particles_smoke.integer);
1424 Cvar_SetValueQuick (&cl_particles_sparks, !cl_particles_sparks.integer);
1427 Cvar_SetValueQuick (&cl_particles_bubbles, !cl_particles_bubbles.integer);
1430 Cvar_SetValueQuick (&cl_particles_blood, !cl_particles_blood.integer);
1433 Cvar_SetValueQuick (&cl_particles_blood_size, bound(2, cl_particles_blood_size.value + dir * 1, 20));
1436 Cvar_SetValueQuick (&cl_particles_blood_alpha, bound(0.2, cl_particles_blood_alpha.value + dir * 0.1, 1));
1441 void M_Options_Effects_Draw (void)
1446 M_Background(320, 200);
1448 M_DrawPic(16, 4, "gfx/qplaque.lmp");
1449 p = Draw_CachePic("gfx/p_option.lmp");
1450 M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
1453 M_Print(16, y, " Lights Per Model");M_DrawSlider(220, y, r_modellights.value, 0, 8);y += 8;
1454 M_Print(16, y, " Fast Dynamic Lighting");M_DrawCheckbox(220, y, !r_dlightmap.integer);y += 8;
1455 M_Print(16, y, " Coronas");M_DrawCheckbox(220, y, r_coronas.integer);y += 8;
1456 M_Print(16, y, " Use Only Coronas");M_DrawCheckbox(220, y, gl_flashblend.integer);y += 8;
1457 M_Print(16, y, " Particles");M_DrawCheckbox(220, y, cl_particles.integer);y += 8;
1458 M_Print(16, y, " Explosions");M_DrawCheckbox(220, y, cl_explosions.integer);y += 8;
1459 M_Print(16, y, " Explosion Clipping");M_DrawCheckbox(220, y, r_explosionclip.integer);y += 8;
1460 M_Print(16, y, " Stainmaps");M_DrawCheckbox(220, y, cl_stainmaps.integer);y += 8;
1461 M_Print(16, y, " Detail Texturing");M_DrawCheckbox(220, y, r_detailtextures.integer);y += 8;
1462 M_Print(16, y, " Bullet Impacts");M_DrawCheckbox(220, y, cl_particles_bulletimpacts.integer);y += 8;
1463 M_Print(16, y, " Smoke");M_DrawCheckbox(220, y, cl_particles_smoke.integer);y += 8;
1464 M_Print(16, y, " Sparks");M_DrawCheckbox(220, y, cl_particles_sparks.integer);y += 8;
1465 M_Print(16, y, " Bubbles");M_DrawCheckbox(220, y, cl_particles_bubbles.integer);y += 8;
1466 M_Print(16, y, " Blood");M_DrawCheckbox(220, y, cl_particles_blood.integer);y += 8;
1467 M_Print(16, y, " Blood Size");M_DrawSlider(220, y, cl_particles_blood_size.value, 2, 20);y += 8;
1468 M_Print(16, y, " Blood Opacity");M_DrawSlider(220, y, cl_particles_blood_alpha.value, 0.2, 1);y += 8;
1471 M_DrawCharacter(200, 32 + options_effects_cursor*8, 12+((int)(realtime*4)&1));
1475 void M_Options_Effects_Key (int k)
1480 M_Menu_Options_f ();
1484 M_Menu_Options_Effects_AdjustSliders (1);
1488 S_LocalSound ("misc/menu1.wav");
1489 options_effects_cursor--;
1490 if (options_effects_cursor < 0)
1491 options_effects_cursor = OPTIONS_EFFECTS_ITEMS-1;
1495 S_LocalSound ("misc/menu1.wav");
1496 options_effects_cursor++;
1497 if (options_effects_cursor >= OPTIONS_EFFECTS_ITEMS)
1498 options_effects_cursor = 0;
1502 M_Menu_Options_Effects_AdjustSliders (-1);
1506 M_Menu_Options_Effects_AdjustSliders (1);
1515 #define OPTIONS_COLORCONTROL_ITEMS 18
1517 int options_colorcontrol_cursor;
1519 // intensity value to match up to 50% dither to 'correct' quake
1520 cvar_t menu_options_colorcontrol_correctionvalue = {0, "menu_options_colorcontrol_correctionvalue", "0.25"};
1522 void M_Menu_Options_ColorControl_f (void)
1524 key_dest = key_menu;
1525 m_state = m_options_colorcontrol;
1526 m_entersound = true;
1530 void M_Menu_Options_ColorControl_AdjustSliders (int dir)
1533 S_LocalSound ("misc/menu3.wav");
1535 switch (options_colorcontrol_cursor)
1538 Cvar_SetValueQuick (&v_hwgamma, !v_hwgamma.integer);
1541 Cvar_SetValueQuick (&v_color_enable, 0);
1542 Cvar_SetValueQuick (&v_gamma, bound(1, v_gamma.value + dir * 0.125, 5));
1545 Cvar_SetValueQuick (&v_color_enable, 0);
1546 Cvar_SetValueQuick (&v_contrast, bound(1, v_contrast.value + dir * 0.125, 5));
1549 Cvar_SetValueQuick (&v_color_enable, 0);
1550 Cvar_SetValueQuick (&v_brightness, bound(0, v_brightness.value + dir * 0.05, 0.8));
1553 Cvar_SetValueQuick (&v_color_enable, !v_color_enable.integer);
1556 Cvar_SetValueQuick (&v_color_enable, 1);
1557 Cvar_SetValueQuick (&v_color_black_r, bound(0, v_color_black_r.value + dir * 0.0125, 0.8));
1560 Cvar_SetValueQuick (&v_color_enable, 1);
1561 Cvar_SetValueQuick (&v_color_black_g, bound(0, v_color_black_g.value + dir * 0.0125, 0.8));
1564 Cvar_SetValueQuick (&v_color_enable, 1);
1565 Cvar_SetValueQuick (&v_color_black_b, bound(0, v_color_black_b.value + dir * 0.0125, 0.8));
1568 Cvar_SetValueQuick (&v_color_enable, 1);
1569 f = bound(0, (v_color_black_r.value + v_color_black_g.value + v_color_black_b.value) / 3 + dir * 0.0125, 0.8);
1570 Cvar_SetValueQuick (&v_color_black_r, f);
1571 Cvar_SetValueQuick (&v_color_black_g, f);
1572 Cvar_SetValueQuick (&v_color_black_b, f);
1575 Cvar_SetValueQuick (&v_color_enable, 1);
1576 Cvar_SetValueQuick (&v_color_grey_r, bound(0, v_color_grey_r.value + dir * 0.0125, 0.95));
1579 Cvar_SetValueQuick (&v_color_enable, 1);
1580 Cvar_SetValueQuick (&v_color_grey_g, bound(0, v_color_grey_g.value + dir * 0.0125, 0.95));
1583 Cvar_SetValueQuick (&v_color_enable, 1);
1584 Cvar_SetValueQuick (&v_color_grey_b, bound(0, v_color_grey_b.value + dir * 0.0125, 0.95));
1587 Cvar_SetValueQuick (&v_color_enable, 1);
1588 f = bound(0, (v_color_grey_r.value + v_color_grey_g.value + v_color_grey_b.value) / 3 + dir * 0.0125, 0.95);
1589 Cvar_SetValueQuick (&v_color_grey_r, f);
1590 Cvar_SetValueQuick (&v_color_grey_g, f);
1591 Cvar_SetValueQuick (&v_color_grey_b, f);
1594 Cvar_SetValueQuick (&v_color_enable, 1);
1595 Cvar_SetValueQuick (&v_color_white_r, bound(1, v_color_white_r.value + dir * 0.125, 5));
1598 Cvar_SetValueQuick (&v_color_enable, 1);
1599 Cvar_SetValueQuick (&v_color_white_g, bound(1, v_color_white_g.value + dir * 0.125, 5));
1602 Cvar_SetValueQuick (&v_color_enable, 1);
1603 Cvar_SetValueQuick (&v_color_white_b, bound(1, v_color_white_b.value + dir * 0.125, 5));
1606 Cvar_SetValueQuick (&v_color_enable, 1);
1607 f = bound(1, (v_color_white_r.value + v_color_white_g.value + v_color_white_b.value) / 3 + dir * 0.125, 5);
1608 Cvar_SetValueQuick (&v_color_white_r, f);
1609 Cvar_SetValueQuick (&v_color_white_g, f);
1610 Cvar_SetValueQuick (&v_color_white_b, f);
1615 void M_Options_ColorControl_Draw (void)
1617 float x, y, c, s, t, u, v;
1620 M_Background(320, 256);
1622 M_DrawPic(16, 4, "gfx/qplaque.lmp");
1623 p = Draw_CachePic("gfx/p_option.lmp");
1624 M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
1627 M_Print(16, y, " Reset to defaults");y += 8;
1628 M_ItemPrint(16, y, "Hardware Gamma Control", vid_hardwaregammasupported);M_DrawCheckbox(220, y, v_hwgamma.integer);y += 8;
1629 M_ItemPrint(16, y, " Gamma", !v_color_enable.integer && vid_hardwaregammasupported && v_hwgamma.integer);M_DrawSlider(220, y, v_gamma.value, 1, 5);y += 8;
1630 M_ItemPrint(16, y, " Contrast", !v_color_enable.integer);M_DrawSlider(220, y, v_contrast.value, 1, 5);y += 8;
1631 M_ItemPrint(16, y, " Brightness", !v_color_enable.integer);M_DrawSlider(220, y, v_brightness.value, 0, 0.8);y += 8;
1632 M_Print(16, y, " Color Level Controls");M_DrawCheckbox(220, y, v_color_enable.integer);y += 8;
1633 M_ItemPrint(16, y, " Black: Red ", v_color_enable.integer);M_DrawSlider(220, y, v_color_black_r.value, 0, 0.8);y += 8;
1634 M_ItemPrint(16, y, " Black: Green", v_color_enable.integer);M_DrawSlider(220, y, v_color_black_g.value, 0, 0.8);y += 8;
1635 M_ItemPrint(16, y, " Black: Blue ", v_color_enable.integer);M_DrawSlider(220, y, v_color_black_b.value, 0, 0.8);y += 8;
1636 M_ItemPrint(16, y, " Black: Grey ", v_color_enable.integer);M_DrawSlider(220, y, (v_color_black_r.value + v_color_black_g.value + v_color_black_b.value) / 3, 0, 0.8);y += 8;
1637 M_ItemPrint(16, y, " Grey: Red ", v_color_enable.integer && vid_hardwaregammasupported && v_hwgamma.integer);M_DrawSlider(220, y, v_color_grey_r.value, 0, 0.95);y += 8;
1638 M_ItemPrint(16, y, " Grey: Green", v_color_enable.integer && vid_hardwaregammasupported && v_hwgamma.integer);M_DrawSlider(220, y, v_color_grey_g.value, 0, 0.95);y += 8;
1639 M_ItemPrint(16, y, " Grey: Blue ", v_color_enable.integer && vid_hardwaregammasupported && v_hwgamma.integer);M_DrawSlider(220, y, v_color_grey_b.value, 0, 0.95);y += 8;
1640 M_ItemPrint(16, y, " Grey: Grey ", v_color_enable.integer && vid_hardwaregammasupported && v_hwgamma.integer);M_DrawSlider(220, y, (v_color_grey_r.value + v_color_grey_g.value + v_color_grey_b.value) / 3, 0, 0.95);y += 8;
1641 M_ItemPrint(16, y, " White: Red ", v_color_enable.integer);M_DrawSlider(220, y, v_color_white_r.value, 1, 5);y += 8;
1642 M_ItemPrint(16, y, " White: Green", v_color_enable.integer);M_DrawSlider(220, y, v_color_white_g.value, 1, 5);y += 8;
1643 M_ItemPrint(16, y, " White: Blue ", v_color_enable.integer);M_DrawSlider(220, y, v_color_white_b.value, 1, 5);y += 8;
1644 M_ItemPrint(16, y, " White: Grey ", v_color_enable.integer);M_DrawSlider(220, y, (v_color_white_r.value + v_color_white_g.value + v_color_white_b.value) / 3, 1, 5);y += 8;
1647 DrawQ_Fill(menu_x, menu_y + y, 320, 4 + 64 + 8 + 64 + 4, 0, 0, 0, 1, 0);y += 4;
1648 s = (float) 312 / 2 * vid.realwidth / vid.conwidth;
1649 t = (float) 4 / 2 * vid.realheight / vid.conheight;
1650 DrawQ_SuperPic(menu_x + 4, menu_y + y, "gfx/colorcontrol/ditherpattern.tga", 312, 4, 0,0, 1,0,0,1, s,0, 1,0,0,1, 0,t, 1,0,0,1, s,t, 1,0,0,1, 0);y += 4;
1651 DrawQ_SuperPic(menu_x + 4, menu_y + y, NULL , 312, 4, 0,0, 0,0,0,1, 1,0, 1,0,0,1, 0,1, 0,0,0,1, 1,1, 1,0,0,1, 0);y += 4;
1652 DrawQ_SuperPic(menu_x + 4, menu_y + y, "gfx/colorcontrol/ditherpattern.tga", 312, 4, 0,0, 0,1,0,1, s,0, 0,1,0,1, 0,t, 0,1,0,1, s,t, 0,1,0,1, 0);y += 4;
1653 DrawQ_SuperPic(menu_x + 4, menu_y + y, NULL , 312, 4, 0,0, 0,0,0,1, 1,0, 0,1,0,1, 0,1, 0,0,0,1, 1,1, 0,1,0,1, 0);y += 4;
1654 DrawQ_SuperPic(menu_x + 4, menu_y + y, "gfx/colorcontrol/ditherpattern.tga", 312, 4, 0,0, 0,0,1,1, s,0, 0,0,1,1, 0,t, 0,0,1,1, s,t, 0,0,1,1, 0);y += 4;
1655 DrawQ_SuperPic(menu_x + 4, menu_y + y, NULL , 312, 4, 0,0, 0,0,0,1, 1,0, 0,0,1,1, 0,1, 0,0,0,1, 1,1, 0,0,1,1, 0);y += 4;
1656 DrawQ_SuperPic(menu_x + 4, menu_y + y, "gfx/colorcontrol/ditherpattern.tga", 312, 4, 0,0, 1,1,1,1, s,0, 1,1,1,1, 0,t, 1,1,1,1, s,t, 1,1,1,1, 0);y += 4;
1657 DrawQ_SuperPic(menu_x + 4, menu_y + y, NULL , 312, 4, 0,0, 0,0,0,1, 1,0, 1,1,1,1, 0,1, 0,0,0,1, 1,1, 1,1,1,1, 0);y += 4;
1659 c = menu_options_colorcontrol_correctionvalue.value; // intensity value that should be matched up to a 50% dither to 'correct' quake
1660 s = (float) 48 / 2 * vid.realwidth / vid.conwidth;
1661 t = (float) 48 / 2 * vid.realheight / vid.conheight;
1666 DrawQ_Fill(menu_x + x, menu_y + y, 64, 48, c, 0, 0, 1, 0);
1667 DrawQ_SuperPic(menu_x + x + 16, menu_y + y + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 1,0,0,1, s,0, 1,0,0,1, 0,t, 1,0,0,1, s,t, 1,0,0,1, 0);
1668 DrawQ_SuperPic(menu_x + x + 32, menu_y + y + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 1,0,0,1, u,0, 1,0,0,1, 0,v, 1,0,0,1, u,v, 1,0,0,1, 0);
1670 DrawQ_Fill(menu_x + x, menu_y + y, 64, 48, 0, c, 0, 1, 0);
1671 DrawQ_SuperPic(menu_x + x + 16, menu_y + y + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 0,1,0,1, s,0, 0,1,0,1, 0,t, 0,1,0,1, s,t, 0,1,0,1, 0);
1672 DrawQ_SuperPic(menu_x + x + 32, menu_y + y + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 0,1,0,1, u,0, 0,1,0,1, 0,v, 0,1,0,1, u,v, 0,1,0,1, 0);
1674 DrawQ_Fill(menu_x + x, menu_y + y, 64, 48, 0, 0, c, 1, 0);
1675 DrawQ_SuperPic(menu_x + x + 16, menu_y + y + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 0,0,1,1, s,0, 0,0,1,1, 0,t, 0,0,1,1, s,t, 0,0,1,1, 0);
1676 DrawQ_SuperPic(menu_x + x + 32, menu_y + y + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 0,0,1,1, u,0, 0,0,1,1, 0,v, 0,0,1,1, u,v, 0,0,1,1, 0);
1678 DrawQ_Fill(menu_x + x, menu_y + y, 64, 48, c, c, c, 1, 0);
1679 DrawQ_SuperPic(menu_x + x + 16, menu_y + y + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 1,1,1,1, s,0, 1,1,1,1, 0,t, 1,1,1,1, s,t, 1,1,1,1, 0);
1680 DrawQ_SuperPic(menu_x + x + 32, menu_y + y + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 1,1,1,1, u,0, 1,1,1,1, 0,v, 1,1,1,1, u,v, 1,1,1,1, 0);
1683 M_DrawCharacter(200, 32 + options_colorcontrol_cursor*8, 12+((int)(realtime*4)&1));
1687 void M_Options_ColorControl_Key (int k)
1696 m_entersound = true;
1697 switch (options_colorcontrol_cursor)
1700 Cvar_SetValueQuick(&v_hwgamma, 1);
1701 Cvar_SetValueQuick(&v_gamma, 1);
1702 Cvar_SetValueQuick(&v_contrast, 1);
1703 Cvar_SetValueQuick(&v_brightness, 0);
1704 Cvar_SetValueQuick(&v_color_enable, 0);
1705 Cvar_SetValueQuick(&v_color_black_r, 0);
1706 Cvar_SetValueQuick(&v_color_black_g, 0);
1707 Cvar_SetValueQuick(&v_color_black_b, 0);
1708 Cvar_SetValueQuick(&v_color_grey_r, 0);
1709 Cvar_SetValueQuick(&v_color_grey_g, 0);
1710 Cvar_SetValueQuick(&v_color_grey_b, 0);
1711 Cvar_SetValueQuick(&v_color_white_r, 1);
1712 Cvar_SetValueQuick(&v_color_white_g, 1);
1713 Cvar_SetValueQuick(&v_color_white_b, 1);
1714 Cbuf_AddText ("exec default.cfg\n");
1717 M_Menu_Options_ColorControl_AdjustSliders (1);
1723 S_LocalSound ("misc/menu1.wav");
1724 options_colorcontrol_cursor--;
1725 if (options_colorcontrol_cursor < 0)
1726 options_colorcontrol_cursor = OPTIONS_COLORCONTROL_ITEMS-1;
1730 S_LocalSound ("misc/menu1.wav");
1731 options_colorcontrol_cursor++;
1732 if (options_colorcontrol_cursor >= OPTIONS_COLORCONTROL_ITEMS)
1733 options_colorcontrol_cursor = 0;
1737 M_Menu_Options_ColorControl_AdjustSliders (-1);
1741 M_Menu_Options_ColorControl_AdjustSliders (1);
1747 //=============================================================================
1750 char *quakebindnames[][2] =
1752 {"+attack", "attack"},
1753 {"impulse 10", "next weapon"},
1754 {"impulse 12", "previous weapon"},
1755 {"+jump", "jump / swim up"},
1756 {"+forward", "walk forward"},
1757 {"+back", "backpedal"},
1758 {"+left", "turn left"},
1759 {"+right", "turn right"},
1761 {"+moveleft", "step left"},
1762 {"+moveright", "step right"},
1763 {"+strafe", "sidestep"},
1764 {"+lookup", "look up"},
1765 {"+lookdown", "look down"},
1766 {"centerview", "center view"},
1767 {"+mlook", "mouse look"},
1768 {"+klook", "keyboard look"},
1769 {"+moveup", "swim up"},
1770 {"+movedown", "swim down"}
1773 char *transfusionbindnames[][2] =
1775 {"+forward", "walk forward"},
1776 {"+back", "backpedal"},
1777 {"+left", "turn left"},
1778 {"+right", "turn right"},
1779 {"+moveleft", "step left"},
1780 {"+moveright", "step right"},
1781 {"+jump", "jump / swim up"},
1782 {"+movedown", "swim down"},
1783 {"+attack", "attack"},
1784 {"+button3", "altfire"},
1785 {"impulse 1", "Pitch Fork"},
1786 {"impulse 2", "Flare Gun"},
1787 {"impulse 3", "Shotgun"},
1788 {"impulse 4", "Machine Gun"},
1789 {"impulse 5", "Incinerator"},
1790 {"impulse 6", "Bombs"},
1791 {"impulse 7", "Aerosol Can"},
1792 {"impulse 8", "Tesla Cannon"},
1793 {"impulse 9", "Life Leech"},
1794 {"impulse 17", "Voodoo Doll"},
1795 {"impulse 11", "previous weapon"},
1796 {"impulse 10", "next weapon"},
1797 {"impulse 14", "previous item"},
1798 {"impulse 15", "next item"},
1799 {"impulse 13", "use item"},
1800 {"impulse 100", "add bot (red)"},
1801 {"impulse 101", "add bot (blue)"},
1802 {"impulse 102", "kick a bot"},
1803 {"impulse 50", "voting menu"},
1804 {"impulse 141", "identify player"},
1805 {"impulse 16", "next armor type"},
1806 {"impulse 20", "observer mode"}
1810 char *(*bindnames)[2];
1813 typedef struct binditem_s
1815 char *command, *description;
1816 struct binditem_s *next;
1820 typedef struct bindcategory_s
1824 struct bindcategory_s *next;
1828 bindcategory_t *bindcategories = NULL;
1830 void M_ClearBinds (void)
1832 for (c = bindcategories;c;c = cnext)
1835 for (b = c->binds;b;b = bnext)
1842 bindcategories = NULL;
1845 void M_AddBindToCategory(bindcategory_t *c, char *command, char *description)
1847 for (b = &c->binds;*b;*b = &(*b)->next);
1848 *b = Z_Alloc(sizeof(binditem_t) + strlen(command) + 1 + strlen(description) + 1);
1849 *b->command = (char *)((*b) + 1);
1850 *b->description = *b->command + strlen(command) + 1;
1851 strcpy(*b->command, command);
1852 strcpy(*b->description, description);
1855 void M_AddBind (char *category, char *command, char *description)
1857 for (c = &bindcategories;*c;c = &(*c)->next)
1859 if (!strcmp(category, (*c)->name))
1861 M_AddBindToCategory(*c, command, description);
1865 *c = Z_Alloc(sizeof(bindcategory_t));
1866 M_AddBindToCategory(*c, command, description);
1869 void M_DefaultBinds (void)
1872 M_AddBind("movement", "+jump", "jump / swim up");
1873 M_AddBind("movement", "+forward", "walk forward");
1874 M_AddBind("movement", "+back", "backpedal");
1875 M_AddBind("movement", "+left", "turn left");
1876 M_AddBind("movement", "+right", "turn right");
1877 M_AddBind("movement", "+speed", "run");
1878 M_AddBind("movement", "+moveleft", "step left");
1879 M_AddBind("movement", "+moveright", "step right");
1880 M_AddBind("movement", "+strafe", "sidestep");
1881 M_AddBind("movement", "+lookup", "look up");
1882 M_AddBind("movement", "+lookdown", "look down");
1883 M_AddBind("movement", "centerview", "center view");
1884 M_AddBind("movement", "+mlook", "mouse look");
1885 M_AddBind("movement", "+klook", "keyboard look");
1886 M_AddBind("movement", "+moveup", "swim up");
1887 M_AddBind("movement", "+movedown", "swim down");
1888 M_AddBind("weapons", "+attack", "attack");
1889 M_AddBind("weapons", "impulse 10", "next weapon");
1890 M_AddBind("weapons", "impulse 12", "previous weapon");
1891 M_AddBind("weapons", "impulse 1", "select weapon 1 (axe)");
1892 M_AddBind("weapons", "impulse 2", "select weapon 2 (shotgun)");
1893 M_AddBind("weapons", "impulse 3", "select weapon 3 (super )");
1894 M_AddBind("weapons", "impulse 4", "select weapon 4 (nailgun)");
1895 M_AddBind("weapons", "impulse 5", "select weapon 5 (super nailgun)");
1896 M_AddBind("weapons", "impulse 6", "select weapon 6 (grenade launcher)");
1897 M_AddBind("weapons", "impulse 7", "select weapon 7 (rocket launcher)");
1898 M_AddBind("weapons", "impulse 8", "select weapon 8 (lightning gun)");
1906 void M_Menu_Keys_f (void)
1908 key_dest = key_menu;
1910 m_entersound = true;
1915 void M_FindKeysForCommand (char *command, int *keys)
1921 for (j = 0;j < NUMKEYS;j++)
1926 for (j=0 ; j<256 ; j++)
1931 if (!strcmp (b, command) )
1934 if (count == NUMKEYS)
1940 void M_UnbindCommand (char *command)
1945 for (j=0 ; j<256 ; j++)
1950 if (!strcmp (b, command))
1951 Key_SetBinding (j, "");
1956 void M_Keys_Draw (void)
1962 char keystring[1024];
1964 M_Background(320, 200);
1966 p = Draw_CachePic ("gfx/ttl_cstm.lmp");
1967 M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_cstm.lmp");
1970 M_Print (12, 32, "Press a key or button for this action");
1972 M_Print (18, 32, "Enter to change, backspace to clear");
1974 // search for known bindings
1975 for (i=0 ; i<numcommands ; i++)
1979 M_Print (16, y, bindnames[i][1]);
1981 M_FindKeysForCommand (bindnames[i][0], keys);
1983 // LordHavoc: redesigned to print more than 2 keys, inspired by Tomaz's MiniRacer
1985 strcpy(keystring, "???");
1989 for (j = 0;j < NUMKEYS;j++)
1994 strcat(keystring, " or ");
1995 strcat(keystring, Key_KeynumToString (keys[j]));
1999 M_Print (150, y, keystring);
2003 M_DrawCharacter (140, 48 + keys_cursor*8, '=');
2005 M_DrawCharacter (140, 48 + keys_cursor*8, 12+((int)(realtime*4)&1));
2009 void M_Keys_Key (int k)
2016 S_LocalSound ("misc/menu1.wav");
2021 else //if (k != '`')
2023 sprintf (cmd, "bind \"%s\" \"%s\"\n", Key_KeynumToString (k), bindnames[keys_cursor][0]);
2024 Cbuf_InsertText (cmd);
2034 M_Menu_Options_f ();
2039 S_LocalSound ("misc/menu1.wav");
2041 if (keys_cursor < 0)
2042 keys_cursor = numcommands-1;
2047 S_LocalSound ("misc/menu1.wav");
2049 if (keys_cursor >= numcommands)
2053 case K_ENTER: // go into bind mode
2054 M_FindKeysForCommand (bindnames[keys_cursor][0], keys);
2055 S_LocalSound ("misc/menu2.wav");
2056 if (keys[NUMKEYS - 1] != -1)
2057 M_UnbindCommand (bindnames[keys_cursor][0]);
2061 case K_BACKSPACE: // delete bindings
2062 case K_DEL: // delete bindings
2063 S_LocalSound ("misc/menu2.wav");
2064 M_UnbindCommand (bindnames[keys_cursor][0]);
2069 //=============================================================================
2072 #define VIDEO_ITEMS 5
2074 int video_cursor = 0;
2075 int video_cursor_table[] = {56, 68, 80, 92, 116};
2076 // note: if modes are added to the beginning of this list, update the
2077 // video_resolution = x; in M_Menu_Video_f below
2078 unsigned short video_resolutions[][2] = {{320,240}, {400,300}, {512,384}, {640,480}, {800,600}, {1024,768}, {1152,864}, {1280,960}, {1280,1024}, {1600,1200}, {1792,1344}, {1920,1440}, {2048,1536}};
2079 int video_resolution;
2081 extern int current_vid_fullscreen;
2082 extern int current_vid_width;
2083 extern int current_vid_height;
2084 extern int current_vid_bitsperpixel;
2085 extern int current_vid_stencil;
2088 void M_Menu_Video_f (void)
2090 key_dest = key_menu;
2092 m_entersound = true;
2094 // Look for the current resolution
2095 for (video_resolution = 0; video_resolution < (int) (sizeof (video_resolutions) / sizeof (video_resolutions[0])); video_resolution++)
2097 if (video_resolutions[video_resolution][0] == current_vid_width &&
2098 video_resolutions[video_resolution][1] == current_vid_height)
2102 // Default to 800x600 if we didn't find it
2103 if (video_resolution == sizeof (video_resolutions) / sizeof (video_resolutions[0]))
2105 // may need to update this number if mode list changes
2106 video_resolution = 4;
2107 Cvar_SetValueQuick (&vid_width, video_resolutions[video_resolution][0]);
2108 Cvar_SetValueQuick (&vid_height, video_resolutions[video_resolution][1]);
2113 void M_Video_Draw (void)
2118 M_Background(320, 200);
2120 M_DrawPic(16, 4, "gfx/qplaque.lmp");
2121 p = Draw_CachePic("gfx/vidmodes.lmp");
2122 M_DrawPic((320-p->width)/2, 4, "gfx/vidmodes.lmp");
2125 M_Print(16, video_cursor_table[0], " Resolution");
2126 string = va("%dx%d", video_resolutions[video_resolution][0], video_resolutions[video_resolution][1]);
2127 M_Print (220, video_cursor_table[0], string);
2130 M_Print(16, video_cursor_table[1], " Bits per pixel");
2131 M_Print (220, video_cursor_table[1], (vid_bitsperpixel.integer == 32) ? "32" : "16");
2134 M_Print(16, video_cursor_table[2], " Fullscreen");
2135 M_DrawCheckbox(220, video_cursor_table[2], vid_fullscreen.integer);
2138 M_Print(16, video_cursor_table[3], " Stencil");
2139 M_DrawCheckbox(220, video_cursor_table[3], vid_stencil.integer);
2142 M_Print(220, video_cursor_table[4], "Apply");
2145 M_DrawCharacter(200, video_cursor_table[video_cursor], 12+((int)(realtime*4)&1));
2149 void M_Menu_Video_AdjustSliders (int dir)
2151 S_LocalSound ("misc/menu3.wav");
2153 switch (video_cursor)
2158 int new_resolution = video_resolution + dir;
2159 if (new_resolution < 0)
2160 video_resolution = sizeof (video_resolutions) / sizeof (video_resolutions[0]) - 1;
2161 else if (new_resolution > (int) (sizeof (video_resolutions) / sizeof (video_resolutions[0]) - 1))
2162 video_resolution = 0;
2164 video_resolution = new_resolution;
2166 Cvar_SetValueQuick (&vid_width, video_resolutions[video_resolution][0]);
2167 Cvar_SetValueQuick (&vid_height, video_resolutions[video_resolution][1]);
2173 Cvar_SetValueQuick (&vid_bitsperpixel, (vid_bitsperpixel.integer == 32) ? 16 : 32);
2176 Cvar_SetValueQuick (&vid_fullscreen, !vid_fullscreen.integer);
2179 Cvar_SetValueQuick (&vid_stencil, !vid_stencil.integer);
2185 void M_Video_Key (int key)
2190 // vid_shared.c has a copy of the current video config. We restore it
2191 Cvar_SetValueQuick(&vid_fullscreen, current_vid_fullscreen);
2192 Cvar_SetValueQuick(&vid_width, current_vid_width);
2193 Cvar_SetValueQuick(&vid_height, current_vid_height);
2194 Cvar_SetValueQuick(&vid_bitsperpixel, current_vid_bitsperpixel);
2195 Cvar_SetValueQuick(&vid_stencil, current_vid_stencil);
2197 S_LocalSound ("misc/menu1.wav");
2198 M_Menu_Options_f ();
2202 m_entersound = true;
2203 switch (video_cursor)
2206 Cbuf_AddText ("vid_restart\n");
2207 M_Menu_Options_f ();
2210 M_Menu_Video_AdjustSliders (1);
2215 S_LocalSound ("misc/menu1.wav");
2217 if (video_cursor < 0)
2218 video_cursor = VIDEO_ITEMS-1;
2222 S_LocalSound ("misc/menu1.wav");
2224 if (video_cursor >= VIDEO_ITEMS)
2229 M_Menu_Video_AdjustSliders (-1);
2233 M_Menu_Video_AdjustSliders (1);
2238 //=============================================================================
2242 #define NUM_HELP_PAGES 6
2245 void M_Menu_Help_f (void)
2247 key_dest = key_menu;
2249 m_entersound = true;
2255 void M_Help_Draw (void)
2257 M_Background(320, 200);
2258 M_DrawPic (0, 0, va("gfx/help%i.lmp", help_page));
2262 void M_Help_Key (int key)
2272 m_entersound = true;
2273 if (++help_page >= NUM_HELP_PAGES)
2279 m_entersound = true;
2280 if (--help_page < 0)
2281 help_page = NUM_HELP_PAGES-1;
2287 //=============================================================================
2291 int m_quit_prevstate;
2292 qboolean wasInMenus;
2294 char *quitMessage [] =
2296 /* .........1.........2.... */
2298 " Are you gonna quit ",
2299 " this game just like ",
2300 " everything else? ",
2303 " Milord, methinks that ",
2304 " thou art a lowly ",
2305 " quitter. Is this true? ",
2308 " Do I need to bust your ",
2309 " face open for trying ",
2313 " Man, I oughta smack you",
2314 " for trying to quit! ",
2318 " Press Y to quit like a ",
2319 " big loser in life. ",
2320 " Press N to stay proud ",
2321 " and successful! ",
2323 " If you press Y to ",
2324 " quit, I will summon ",
2325 " Satan all over your ",
2328 " Um, Asmodeus dislikes ",
2329 " his children trying to ",
2330 " quit. Press Y to return",
2331 " to your Tinkertoys. ",
2333 " If you quit now, I'll ",
2334 " throw a blanket-party ",
2335 " for you next time! ",
2339 /* .........1.........2.... */
2341 " Tired of fragging ",
2346 " Quit now and forfeit ",
2347 " your bodycount? ",
2351 " Are you sure you ",
2356 " Off to do something ",
2361 void M_Menu_Quit_f (void)
2363 if (m_state == m_quit)
2365 wasInMenus = (key_dest == key_menu);
2366 key_dest = key_menu;
2367 m_quit_prevstate = m_state;
2369 m_entersound = true;
2370 msgNumber = rand()&3; //&7;
2374 void M_Quit_Key (int key)
2383 m_state = m_quit_prevstate;
2384 m_entersound = true;
2388 key_dest = key_game;
2405 void M_Quit_Draw (void)
2407 M_Background(208, 48);
2408 M_DrawTextBox(0, 0, 24, 4);
2409 M_Print(8, 8, quitMessage[msgNumber*4+0]);
2410 M_Print(8, 16, quitMessage[msgNumber*4+1]);
2411 M_Print(8, 24, quitMessage[msgNumber*4+2]);
2412 M_Print(8, 32, quitMessage[msgNumber*4+3]);
2415 //=============================================================================
2416 /* LAN CONFIG MENU */
2418 int lanConfig_cursor = -1;
2419 int lanConfig_cursor_table [] = {56, 76, 112};
2420 #define NUM_LANCONFIG_CMDS 3
2423 char lanConfig_portname[6];
2424 char lanConfig_joinname[22];
2426 void M_Menu_LanConfig_f (void)
2428 key_dest = key_menu;
2429 m_state = m_lanconfig;
2430 m_entersound = true;
2431 if (lanConfig_cursor == -1)
2434 lanConfig_cursor = 1;
2437 lanConfig_cursor = 1;
2438 lanConfig_port = 26000;
2439 sprintf(lanConfig_portname, "%u", lanConfig_port);
2441 m_return_reason[0] = 0;
2445 void M_LanConfig_Draw (void)
2452 M_Background(320, 200);
2454 M_DrawPic (16, 4, "gfx/qplaque.lmp");
2455 p = Draw_CachePic ("gfx/p_multi.lmp");
2456 basex = (320-p->width)/2;
2457 M_DrawPic (basex, 4, "gfx/p_multi.lmp");
2460 startJoin = "New Game";
2462 startJoin = "Join Game";
2463 protocol = "TCP/IP";
2464 M_Print (basex, 32, va ("%s - %s", startJoin, protocol));
2467 M_Print (basex, lanConfig_cursor_table[0], "Port");
2468 M_DrawTextBox (basex+8*8, lanConfig_cursor_table[0]-8, 6, 1);
2469 M_Print (basex+9*8, lanConfig_cursor_table[0], lanConfig_portname);
2473 M_Print (basex, lanConfig_cursor_table[1], "Search for games...");
2474 M_Print (basex, lanConfig_cursor_table[2]-16, "Join game at:");
2475 M_DrawTextBox (basex+8, lanConfig_cursor_table[2]-8, 22, 1);
2476 M_Print (basex+16, lanConfig_cursor_table[2], lanConfig_joinname);
2480 M_DrawTextBox (basex, lanConfig_cursor_table[1]-8, 2, 1);
2481 M_Print (basex+8, lanConfig_cursor_table[1], "OK");
2484 M_DrawCharacter (basex-8, lanConfig_cursor_table [lanConfig_cursor], 12+((int)(realtime*4)&1));
2486 if (lanConfig_cursor == 0)
2487 M_DrawCharacter (basex+9*8 + 8*strlen(lanConfig_portname), lanConfig_cursor_table [0], 10+((int)(realtime*4)&1));
2489 if (lanConfig_cursor == 2)
2490 M_DrawCharacter (basex+16 + 8*strlen(lanConfig_joinname), lanConfig_cursor_table [2], 10+((int)(realtime*4)&1));
2492 if (*m_return_reason)
2493 M_PrintWhite (basex, 168, m_return_reason);
2497 void M_LanConfig_Key (int key)
2504 M_Menu_MultiPlayer_f ();
2508 S_LocalSound ("misc/menu1.wav");
2510 if (lanConfig_cursor < 0)
2511 lanConfig_cursor = NUM_LANCONFIG_CMDS-1;
2515 S_LocalSound ("misc/menu1.wav");
2517 if (lanConfig_cursor >= NUM_LANCONFIG_CMDS)
2518 lanConfig_cursor = 0;
2522 if (lanConfig_cursor == 0)
2525 m_entersound = true;
2527 Cbuf_AddText ("stopdemo\n");
2529 Cvar_SetValue("port", lanConfig_port);
2531 if (lanConfig_cursor == 1)
2535 M_Menu_GameOptions_f ();
2538 M_Menu_ServerList_f();
2542 if (lanConfig_cursor == 2)
2543 Cbuf_AddText ( va ("connect \"%s\"\n", lanConfig_joinname) );
2547 if (lanConfig_cursor == 0)
2549 if (strlen(lanConfig_portname))
2550 lanConfig_portname[strlen(lanConfig_portname)-1] = 0;
2553 if (lanConfig_cursor == 2)
2555 if (strlen(lanConfig_joinname))
2556 lanConfig_joinname[strlen(lanConfig_joinname)-1] = 0;
2561 if (key < 32 || key > 127)
2564 if (lanConfig_cursor == 2)
2566 l = strlen(lanConfig_joinname);
2569 lanConfig_joinname[l+1] = 0;
2570 lanConfig_joinname[l] = key;
2574 if (key < '0' || key > '9')
2576 if (lanConfig_cursor == 0)
2578 l = strlen(lanConfig_portname);
2581 lanConfig_portname[l+1] = 0;
2582 lanConfig_portname[l] = key;
2587 if (StartingGame && lanConfig_cursor == 2)
2589 if (key == K_UPARROW)
2590 lanConfig_cursor = 1;
2592 lanConfig_cursor = 0;
2595 l = atoi(lanConfig_portname);
2598 sprintf(lanConfig_portname, "%u", lanConfig_port);
2601 //=============================================================================
2602 /* GAME OPTIONS MENU */
2621 episode_t *episodes;
2626 level_t quakelevels[] =
2628 {"start", "Entrance"}, // 0
2630 {"e1m1", "Slipgate Complex"}, // 1
2631 {"e1m2", "Castle of the Damned"},
2632 {"e1m3", "The Necropolis"},
2633 {"e1m4", "The Grisly Grotto"},
2634 {"e1m5", "Gloom Keep"},
2635 {"e1m6", "The Door To Chthon"},
2636 {"e1m7", "The House of Chthon"},
2637 {"e1m8", "Ziggurat Vertigo"},
2639 {"e2m1", "The Installation"}, // 9
2640 {"e2m2", "Ogre Citadel"},
2641 {"e2m3", "Crypt of Decay"},
2642 {"e2m4", "The Ebon Fortress"},
2643 {"e2m5", "The Wizard's Manse"},
2644 {"e2m6", "The Dismal Oubliette"},
2645 {"e2m7", "Underearth"},
2647 {"e3m1", "Termination Central"}, // 16
2648 {"e3m2", "The Vaults of Zin"},
2649 {"e3m3", "The Tomb of Terror"},
2650 {"e3m4", "Satan's Dark Delight"},
2651 {"e3m5", "Wind Tunnels"},
2652 {"e3m6", "Chambers of Torment"},
2653 {"e3m7", "The Haunted Halls"},
2655 {"e4m1", "The Sewage System"}, // 23
2656 {"e4m2", "The Tower of Despair"},
2657 {"e4m3", "The Elder God Shrine"},
2658 {"e4m4", "The Palace of Hate"},
2659 {"e4m5", "Hell's Atrium"},
2660 {"e4m6", "The Pain Maze"},
2661 {"e4m7", "Azure Agony"},
2662 {"e4m8", "The Nameless City"},
2664 {"end", "Shub-Niggurath's Pit"}, // 31
2666 {"dm1", "Place of Two Deaths"}, // 32
2667 {"dm2", "Claustrophobopolis"},
2668 {"dm3", "The Abandoned Base"},
2669 {"dm4", "The Bad Place"},
2670 {"dm5", "The Cistern"},
2671 {"dm6", "The Dark Zone"}
2674 episode_t quakeepisodes[] =
2676 {"Welcome to Quake", 0, 1},
2677 {"Doomed Dimension", 1, 8},
2678 {"Realm of Black Magic", 9, 7},
2679 {"Netherworld", 16, 7},
2680 {"The Elder World", 23, 8},
2681 {"Final Level", 31, 1},
2682 {"Deathmatch Arena", 32, 6}
2685 //MED 01/06/97 added hipnotic levels
2686 level_t hipnoticlevels[] =
2688 {"start", "Command HQ"}, // 0
2690 {"hip1m1", "The Pumping Station"}, // 1
2691 {"hip1m2", "Storage Facility"},
2692 {"hip1m3", "The Lost Mine"},
2693 {"hip1m4", "Research Facility"},
2694 {"hip1m5", "Military Complex"},
2696 {"hip2m1", "Ancient Realms"}, // 6
2697 {"hip2m2", "The Black Cathedral"},
2698 {"hip2m3", "The Catacombs"},
2699 {"hip2m4", "The Crypt"},
2700 {"hip2m5", "Mortum's Keep"},
2701 {"hip2m6", "The Gremlin's Domain"},
2703 {"hip3m1", "Tur Torment"}, // 12
2704 {"hip3m2", "Pandemonium"},
2705 {"hip3m3", "Limbo"},
2706 {"hip3m4", "The Gauntlet"},
2708 {"hipend", "Armagon's Lair"}, // 16
2710 {"hipdm1", "The Edge of Oblivion"} // 17
2713 //MED 01/06/97 added hipnotic episodes
2714 episode_t hipnoticepisodes[] =
2716 {"Scourge of Armagon", 0, 1},
2717 {"Fortress of the Dead", 1, 5},
2718 {"Dominion of Darkness", 6, 6},
2719 {"The Rift", 12, 4},
2720 {"Final Level", 16, 1},
2721 {"Deathmatch Arena", 17, 1}
2724 //PGM 01/07/97 added rogue levels
2725 //PGM 03/02/97 added dmatch level
2726 level_t roguelevels[] =
2728 {"start", "Split Decision"},
2729 {"r1m1", "Deviant's Domain"},
2730 {"r1m2", "Dread Portal"},
2731 {"r1m3", "Judgement Call"},
2732 {"r1m4", "Cave of Death"},
2733 {"r1m5", "Towers of Wrath"},
2734 {"r1m6", "Temple of Pain"},
2735 {"r1m7", "Tomb of the Overlord"},
2736 {"r2m1", "Tempus Fugit"},
2737 {"r2m2", "Elemental Fury I"},
2738 {"r2m3", "Elemental Fury II"},
2739 {"r2m4", "Curse of Osiris"},
2740 {"r2m5", "Wizard's Keep"},
2741 {"r2m6", "Blood Sacrifice"},
2742 {"r2m7", "Last Bastion"},
2743 {"r2m8", "Source of Evil"},
2744 {"ctf1", "Division of Change"}
2747 //PGM 01/07/97 added rogue episodes
2748 //PGM 03/02/97 added dmatch episode
2749 episode_t rogueepisodes[] =
2751 {"Introduction", 0, 1},
2752 {"Hell's Fortress", 1, 7},
2753 {"Corridors of Time", 8, 8},
2754 {"Deathmatch Arena", 16, 1}
2757 level_t nehahralevels[] =
2759 {"nehstart", "Welcome to Nehahra"},
2760 {"neh1m1", "Forge City1: Slipgates"},
2761 {"neh1m2", "Forge City2: Boiler"},
2762 {"neh1m3", "Forge City3: Escape"},
2763 {"neh1m4", "Grind Core"},
2764 {"neh1m5", "Industrial Silence"},
2765 {"neh1m6", "Locked-Up Anger"},
2766 {"neh1m7", "Wanderer of the Wastes"},
2767 {"neh1m8", "Artemis System Net"},
2768 {"neh1m9", "To the Death"},
2769 {"neh2m1", "The Gates of Ghoro"},
2770 {"neh2m2", "Sacred Trinity"},
2771 {"neh2m3", "Realm of the Ancients"},
2772 {"neh2m4", "Temple of the Ancients"},
2773 {"neh2m5", "Dreams Made Flesh"},
2774 {"neh2m6", "Your Last Cup of Sorrow"},
2775 {"nehsec", "Ogre's Bane"},
2776 {"nehahra", "Nehahra's Den"},
2777 {"nehend", "Quintessence"}
2780 episode_t nehahraepisodes[] =
2782 {"Welcome to Nehahra", 0, 1},
2783 {"The Fall of Forge", 1, 9},
2784 {"The Outlands", 10, 7},
2785 {"Dimension of the Lost", 17, 2}
2788 // Map list for Transfusion
2789 level_t transfusionlevels[] =
2791 {"bb1", "The Stronghold"},
2792 {"bb2", "Winter Wonderland"},
2794 {"bb4", "The Tower"},
2796 {"bb6", "Twin Fortress"},
2798 {"bb8", "Fun With Heads"},
2800 {"e1m1", "Cradle to Grave"},
2801 {"e1m2", "Wrong Side of the Tracks"},
2802 {"e1m7", "Altar of Stone"},
2803 {"e2m8", "The Lair of Shial"},
2804 {"e3m7", "The Pit of Cerberus"},
2805 {"e4m8", "The Hall of the Epiphany"},
2806 {"e4m9", "Mall of the Dead"},
2808 {"dm1", "Monolith Building 11"},
2811 {"e6m1", "Welcome to Your Life"},
2812 {"e6m8", "Beauty and the Beast"},
2814 {"cpbb01", "Crypt of Despair"},
2815 {"cpbb03", "Unholy Cathedral"},
2817 {"b2a15", "Area 15 (B2)"},
2818 {"barena", "Blood Arena"},
2819 {"bkeep", "Blood Keep"},
2820 {"bstar", "Brown Star"},
2821 {"crypt", "The Crypt"},
2823 {"bb3_2k1", "Bodies Infusion"},
2824 {"dcamp", "DeathCamp"},
2825 {"highnoon", "HighNoon"},
2826 {"qbb1", "The Confluence"},
2827 {"qbb2", "KathartiK"},
2828 {"qbb3", "Caleb's Woodland Retreat"},
2830 {"dranzbb6", "Black Coffee"},
2831 {"fragm", "Frag'M"},
2833 {"qe1m7", "The House of Chthon"},
2834 {"simple", "Dead Simple"}
2837 episode_t transfusionepisodes[] =
2840 {"Blood Single Player", 8, 7},
2841 {"Plasma Pack", 15, 5},
2842 {"Cryptic Passage", 20, 2},
2844 {"Transfusion", 27, 6},
2845 {"Conversions", 33, 5}
2848 gamelevels_t sharewarequakegame = {"Shareware Quake", quakelevels, quakeepisodes, 2};
2849 gamelevels_t registeredquakegame = {"Quake", quakelevels, quakeepisodes, 7};
2850 gamelevels_t hipnoticgame = {"Scourge of Armagon", hipnoticlevels, hipnoticepisodes, 6};
2851 gamelevels_t roguegame = {"Dissolution of Eternity", roguelevels, rogueepisodes, 4};
2852 gamelevels_t nehahragame = {"Nehahra", nehahralevels, nehahraepisodes, 4};
2853 gamelevels_t transfusiongame = {"Transfusion", transfusionlevels, transfusionepisodes, 7};
2858 gamelevels_t *notregistered;
2859 gamelevels_t *registered;
2863 gameinfo_t gamelist[] =
2865 {GAME_NORMAL, &sharewarequakegame, ®isteredquakegame},
2866 {GAME_HIPNOTIC, &hipnoticgame, &hipnoticgame},
2867 {GAME_ROGUE, &roguegame, &roguegame},
2868 {GAME_NEHAHRA, &nehahragame, &nehahragame},
2869 {GAME_TRANSFUSION, &transfusiongame, &transfusiongame},
2870 {-1, &sharewarequakegame, ®isteredquakegame} // final fallback
2873 gamelevels_t *lookupgameinfo(void)
2876 for (i = 0;gamelist[i].gameid >= 0 && gamelist[i].gameid != gamemode;i++);
2877 if (registered.integer)
2878 return gamelist[i].registered;
2880 return gamelist[i].notregistered;
2886 qboolean m_serverInfoMessage = false;
2887 double m_serverInfoMessageTime;
2889 extern cvar_t sv_public;
2891 void M_Menu_GameOptions_f (void)
2893 key_dest = key_menu;
2894 m_state = m_gameoptions;
2895 m_entersound = true;
2896 if (maxplayers == 0)
2897 maxplayers = svs.maxclients;
2899 maxplayers = MAX_SCOREBOARD;
2903 int gameoptions_cursor_table[] = {40, 56, 64, 72, 80, 88, 96, 104, 120, 128};
2904 #define NUM_GAMEOPTIONS 10
2905 int gameoptions_cursor;
2907 void M_GameOptions_Draw (void)
2913 M_Background(320, 200);
2915 M_DrawPic (16, 4, "gfx/qplaque.lmp");
2916 p = Draw_CachePic ("gfx/p_multi.lmp");
2917 M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
2919 M_DrawTextBox (152, 32, 10, 1);
2920 M_Print (160, 40, "begin game");
2922 M_Print (0, 56, " Max players");
2923 M_Print (160, 56, va("%i", maxplayers) );
2925 M_Print (0, 64, " Game Type");
2926 if (gamemode == GAME_TRANSFUSION)
2928 if (!deathmatch.integer)
2929 Cvar_SetValue("deathmatch", 1);
2930 if (deathmatch.integer == 2)
2931 M_Print (160, 64, "Capture the Flag");
2933 M_Print (160, 64, "Blood Bath");
2937 if (!coop.integer && !deathmatch.integer)
2938 Cvar_SetValue("deathmatch", 1);
2940 M_Print (160, 64, "Cooperative");
2942 M_Print (160, 64, "Deathmatch");
2945 M_Print (0, 72, " Teamplay");
2946 if (gamemode == GAME_ROGUE)
2950 switch((int)teamplay.integer)
2952 case 1: msg = "No Friendly Fire"; break;
2953 case 2: msg = "Friendly Fire"; break;
2954 case 3: msg = "Tag"; break;
2955 case 4: msg = "Capture the Flag"; break;
2956 case 5: msg = "One Flag CTF"; break;
2957 case 6: msg = "Three Team CTF"; break;
2958 default: msg = "Off"; break;
2960 M_Print (160, 72, msg);
2962 else if (gamemode == GAME_TRANSFUSION)
2966 switch (teamplay.integer)
2968 case 0: msg = "Off"; break;
2969 case 2: msg = "Friendly Fire"; break;
2970 default: msg = "No Friendly Fire"; break;
2972 M_Print (160, 72, msg);
2978 switch((int)teamplay.integer)
2980 case 1: msg = "No Friendly Fire"; break;
2981 case 2: msg = "Friendly Fire"; break;
2982 default: msg = "Off"; break;
2984 M_Print (160, 72, msg);
2987 M_Print (0, 80, " Skill");
2988 if (skill.integer == 0)
2989 M_Print (160, 80, "Easy difficulty");
2990 else if (skill.integer == 1)
2991 M_Print (160, 80, "Normal difficulty");
2992 else if (skill.integer == 2)
2993 M_Print (160, 80, "Hard difficulty");
2995 M_Print (160, 80, "Nightmare difficulty");
2997 M_Print (0, 88, " Frag Limit");
2998 if (fraglimit.integer == 0)
2999 M_Print (160, 88, "none");
3001 M_Print (160, 88, va("%i frags", fraglimit.integer));
3003 M_Print (0, 96, " Time Limit");
3004 if (timelimit.integer == 0)
3005 M_Print (160, 96, "none");
3007 M_Print (160, 96, va("%i minutes", timelimit.integer));
3009 M_Print (0, 104, " Public server");
3010 M_Print (160, 104, (sv_public.integer == 0) ? "no" : "yes");
3012 g = lookupgameinfo();
3014 M_Print (0, 120, " Episode");
3015 M_Print (160, 120, g->episodes[startepisode].description);
3017 M_Print (0, 128, " Level");
3018 M_Print (160, 128, g->levels[g->episodes[startepisode].firstLevel + startlevel].description);
3019 M_Print (160, 136, g->levels[g->episodes[startepisode].firstLevel + startlevel].name);
3022 M_DrawCharacter (144, gameoptions_cursor_table[gameoptions_cursor], 12+((int)(realtime*4)&1));
3024 if (m_serverInfoMessage)
3026 if ((realtime - m_serverInfoMessageTime) < 5.0)
3029 M_DrawTextBox (x, 138, 24, 4);
3031 M_Print (x, 146, " More than 64 players?? ");
3032 M_Print (x, 154, " First, question your ");
3033 M_Print (x, 162, " sanity, then email ");
3034 M_Print (x, 170, " havoc@telefragged.com ");
3038 m_serverInfoMessage = false;
3044 void M_NetStart_Change (int dir)
3049 switch (gameoptions_cursor)
3053 if (maxplayers > MAX_SCOREBOARD)
3055 maxplayers = MAX_SCOREBOARD;
3056 m_serverInfoMessage = true;
3057 m_serverInfoMessageTime = realtime;
3064 if (gamemode == GAME_TRANSFUSION)
3066 if (deathmatch.integer == 2) // changing from CTF to BloodBath
3067 Cvar_SetValueQuick (&deathmatch, 0);
3068 else // changing from BloodBath to CTF
3069 Cvar_SetValueQuick (&deathmatch, 2);
3073 if (deathmatch.integer) // changing from deathmatch to coop
3075 Cvar_SetValueQuick (&coop, 1);
3076 Cvar_SetValueQuick (&deathmatch, 0);
3078 else // changing from coop to deathmatch
3080 Cvar_SetValueQuick (&coop, 0);
3081 Cvar_SetValueQuick (&deathmatch, 1);
3087 if (gamemode == GAME_ROGUE)
3092 Cvar_SetValueQuick (&teamplay, teamplay.integer + dir);
3093 if (teamplay.integer > count)
3094 Cvar_SetValueQuick (&teamplay, 0);
3095 else if (teamplay.integer < 0)
3096 Cvar_SetValueQuick (&teamplay, count);
3100 Cvar_SetValueQuick (&skill, skill.integer + dir);
3101 if (skill.integer > 3)
3102 Cvar_SetValueQuick (&skill, 0);
3103 if (skill.integer < 0)
3104 Cvar_SetValueQuick (&skill, 3);
3108 Cvar_SetValueQuick (&fraglimit, fraglimit.integer + dir*10);
3109 if (fraglimit.integer > 100)
3110 Cvar_SetValueQuick (&fraglimit, 0);
3111 if (fraglimit.integer < 0)
3112 Cvar_SetValueQuick (&fraglimit, 100);
3116 Cvar_SetValueQuick (&timelimit, timelimit.value + dir*5);
3117 if (timelimit.value > 60)
3118 Cvar_SetValueQuick (&timelimit, 0);
3119 if (timelimit.value < 0)
3120 Cvar_SetValueQuick (&timelimit, 60);
3124 Cvar_SetValueQuick (&sv_public, !sv_public.integer);
3128 startepisode += dir;
3129 g = lookupgameinfo();
3131 if (startepisode < 0)
3132 startepisode = g->numepisodes - 1;
3134 if (startepisode >= g->numepisodes)
3142 g = lookupgameinfo();
3145 startlevel = g->episodes[startepisode].levels - 1;
3147 if (startlevel >= g->episodes[startepisode].levels)
3153 void M_GameOptions_Key (int key)
3160 M_Menu_MultiPlayer_f ();
3164 S_LocalSound ("misc/menu1.wav");
3165 gameoptions_cursor--;
3166 if (gameoptions_cursor < 0)
3167 gameoptions_cursor = NUM_GAMEOPTIONS-1;
3171 S_LocalSound ("misc/menu1.wav");
3172 gameoptions_cursor++;
3173 if (gameoptions_cursor >= NUM_GAMEOPTIONS)
3174 gameoptions_cursor = 0;
3178 if (gameoptions_cursor == 0)
3180 S_LocalSound ("misc/menu3.wav");
3181 M_NetStart_Change (-1);
3185 if (gameoptions_cursor == 0)
3187 S_LocalSound ("misc/menu3.wav");
3188 M_NetStart_Change (1);
3192 S_LocalSound ("misc/menu2.wav");
3193 if (gameoptions_cursor == 0)
3196 Cbuf_AddText ("disconnect\n");
3197 Cbuf_AddText ( va ("maxplayers %u\n", maxplayers) );
3199 g = lookupgameinfo();
3200 Cbuf_AddText ( va ("map %s\n", g->levels[g->episodes[startepisode].firstLevel + startlevel].name) );
3204 M_NetStart_Change (1);
3209 //=============================================================================
3214 void M_Menu_ServerList_f (void)
3216 key_dest = key_menu;
3218 m_entersound = true;
3220 m_return_reason[0] = 0;
3225 void M_ServerList_Draw (void)
3227 int n, y, visible, start, end;
3230 // use as much vertical space as available
3231 M_Background(640, vid.conheight);
3232 // scroll the list as the cursor moves
3233 visible = (vid.conheight - 16 - 32) / 8;
3234 start = bound(0, slist_cursor - (visible >> 1), hostCacheCount - visible);
3235 end = min(start + visible, hostCacheCount);
3237 p = Draw_CachePic("gfx/p_multi.lmp");
3238 M_DrawPic((640 - p->width) / 2, 4, "gfx/p_multi.lmp");
3240 for (n = start;n < end;n++)
3242 M_Print(0, y, hostcache[n].line1);y += 8;
3243 M_Print(0, y, hostcache[n].line2);y += 8;
3245 M_DrawCharacter(0, 32 + (slist_cursor - start) * 16, 12+((int)(realtime*4)&1));
3247 if (*m_return_reason)
3248 M_PrintWhite(16, vid.conheight - 8, m_return_reason);
3252 void M_ServerList_Key(int k)
3257 M_Menu_LanConfig_f();
3266 S_LocalSound("misc/menu1.wav");
3268 if (slist_cursor < 0)
3269 slist_cursor = hostCacheCount - 1;
3274 S_LocalSound("misc/menu1.wav");
3276 if (slist_cursor >= hostCacheCount)
3281 S_LocalSound("misc/menu2.wav");
3282 Cbuf_AddText(va("connect \"%s\"\n", hostcache[slist_cursor].cname));
3291 //=============================================================================
3292 /* Menu Subsystem */
3297 Cmd_AddCommand ("togglemenu", M_ToggleMenu_f);
3299 Cmd_AddCommand ("menu_main", M_Menu_Main_f);
3300 Cmd_AddCommand ("menu_singleplayer", M_Menu_SinglePlayer_f);
3301 Cmd_AddCommand ("menu_load", M_Menu_Load_f);
3302 Cmd_AddCommand ("menu_save", M_Menu_Save_f);
3303 Cmd_AddCommand ("menu_multiplayer", M_Menu_MultiPlayer_f);
3304 Cmd_AddCommand ("menu_setup", M_Menu_Setup_f);
3305 Cmd_AddCommand ("menu_options", M_Menu_Options_f);
3306 Cmd_AddCommand ("menu_options_effects", M_Menu_Options_Effects_f);
3307 Cmd_AddCommand ("menu_options_colorcontrol", M_Menu_Options_ColorControl_f);
3308 Cvar_RegisterVariable (&menu_options_colorcontrol_correctionvalue);
3309 Cmd_AddCommand ("menu_keys", M_Menu_Keys_f);
3310 Cmd_AddCommand ("menu_video", M_Menu_Video_f);
3311 Cmd_AddCommand ("help", M_Menu_Help_f);
3312 Cmd_AddCommand ("menu_quit", M_Menu_Quit_f);
3314 if (gamemode == GAME_TRANSFUSION)
3316 numcommands = sizeof(transfusionbindnames) / sizeof(transfusionbindnames[0]);
3317 bindnames = transfusionbindnames;
3321 numcommands = sizeof(quakebindnames) / sizeof(quakebindnames[0]);
3322 bindnames = quakebindnames;
3325 if (gamemode == GAME_NEHAHRA)
3327 if (FS_FileExists("maps/neh1m4.bsp"))
3329 if (FS_FileExists("hearing.dem"))
3331 Con_Printf("Nehahra movie and game detected.\n");
3332 NehGameType = TYPE_BOTH;
3336 Con_Printf("Nehahra game detected.\n");
3337 NehGameType = TYPE_GAME;
3342 if (FS_FileExists("hearing.dem"))
3344 Con_Printf("Nehahra movie detected.\n");
3345 NehGameType = TYPE_DEMO;
3349 Con_Printf("Nehahra not found.\n");
3350 NehGameType = TYPE_GAME; // could just complain, but...
3358 if (key_dest != key_menu)
3360 if (m_state == m_none)
3376 case m_singleplayer:
3377 M_SinglePlayer_Draw ();
3389 M_MultiPlayer_Draw ();
3400 case m_options_effects:
3401 M_Options_Effects_Draw ();
3404 case m_options_colorcontrol:
3405 M_Options_ColorControl_Draw ();
3425 M_LanConfig_Draw ();
3429 M_GameOptions_Draw ();
3433 M_ServerList_Draw ();
3439 S_LocalSound ("misc/menu2.wav");
3440 m_entersound = false;
3447 void M_Keydown (int key)
3462 case m_singleplayer:
3463 M_SinglePlayer_Key (key);
3475 M_MultiPlayer_Key (key);
3483 M_Options_Key (key);
3486 case m_options_effects:
3487 M_Options_Effects_Key (key);
3490 case m_options_colorcontrol:
3491 M_Options_ColorControl_Key (key);
3511 M_LanConfig_Key (key);
3515 M_GameOptions_Key (key);
3519 M_ServerList_Key (key);