Go to the documentation of this file.
26 #include "../client/qmenu.h"
35 #define NUM_CURSOR_FRAMES 15
64 const char *(*m_keyfunc) (
int key);
69 #define MAX_MENU_DEPTH 8
75 const char *(*key) (
int k);
89 void M_PushMenu (
void (*draw) (
void),
const char *(*key) (
int k) )
150 const char *sound =
NULL;
326 Com_sprintf( cursorname,
sizeof( cursorname ),
"m_cursor%d",
i );
333 Com_sprintf( cursorname,
sizeof(cursorname),
"m_cursor%d", f );
346 for (n = 0; n < lines; n++)
359 for (n = 0; n < lines; n++)
372 for (n = 0; n < lines; n++)
403 "m_main_multiplayer",
410 for (
i = 0; names[
i] != 0;
i++ )
416 totalheight += ( h + 12 );
422 for (
i = 0; names[
i] != 0;
i++ )
428 strcat( litname,
"_sel" );
589 {
"+attack",
"attack"},
590 {
"weapnext",
"next weapon"},
591 {
"weapprev",
"prev weapon"},
592 {
"weaplast",
"last weapon"},
593 {
"+forward",
"walk forward"},
594 {
"+back",
"backpedal"},
595 {
"+left",
"turn left"},
596 {
"+right",
"turn right"},
598 {
"+moveleft",
"step left"},
599 {
"+moveright",
"step right"},
600 {
"+strafe",
"sidestep"},
601 {
"+lookup",
"look up"},
602 {
"+lookdown",
"look down"},
603 {
"centerview",
"center view"},
604 {
"+mlook",
"mouse look"},
605 {
"+klook",
"keyboard look"},
606 {
"+moveup",
"up / jump"},
607 {
"+movedown",
"down / crouch"},
609 {
"inven",
"inventory"},
610 {
"invuse",
"use item"},
611 {
"invdrop",
"drop item"},
612 {
"invprev",
"prev item"},
613 {
"invnext",
"next item"},
615 {
"cmd help",
"help computer" },
656 l = (
int)strlen(command);
658 for (
j=0 ;
j<256 ;
j++)
663 if (!strncmp (b, command, l) )
675 twokeys[0] = twokeys[1] = -1;
676 l = (
int)strlen(command);
679 for (
j=0 ;
j<256 ;
j++)
684 if (!strncmp (b, command, l) )
1000 if ( key !=
K_ESCAPE && key !=
'`' )
1209 static const char *cd_music_items[] =
1215 static const char *quality_items[] =
1220 static const char *compatibility_items[] =
1222 "max compatibility",
"max performance", 0
1225 static const char *yesno_names[] =
1232 static const char *crosshair_names[] =
1433 "+QUAKE II BY ID SOFTWARE",
1454 "Barrett (Bear) Alexander",
1459 "Ben Donges for beta testing",
1466 "+ADDITIONAL SUPPORT",
1468 "+LINUX PORT AND CTF",
1469 "Dave \"Zoid\" Kirsch",
1471 "+CINEMATIC SEQUENCES",
1472 "Ending Cinematic by Blur Studio - ",
1475 "Environment models for Introduction",
1476 "Cinematic by Karl Dolgener",
1478 "Assistance with environment design",
1481 "+SOUND EFFECTS AND MUSIC",
1482 "Sound Design by Soundelux Media Labs.",
1483 "Music Composed and Produced by",
1484 "Soundelux Media Labs. Special thanks",
1485 "to Bill Brown, Tom Ozanich, Brian",
1486 "Celano, Jeff Eisner, and The Soundelux",
1489 "\"Level Music\" by Sonic Mayhem",
1490 "www.sonicmayhem.com",
1492 "\"Quake II Theme Song\"",
1493 "(C) 1997 Rob Zombie. All Rights",
1496 "Track 10 (\"Climb\") by Jer Sypult",
1498 "Voice of computers by",
1499 "Carly Staehlin-Taylor",
1501 "+THANKS TO ACTIVISION",
1509 "Quake II(tm) (C)1997 Id Software, Inc.",
1510 "All Rights Reserved. Distributed by",
1511 "Activision, Inc. under license.",
1512 "Quake II(tm), the Id Software name,",
1513 "the \"Q II\"(tm) logo and id(tm)",
1514 "logo are trademarks of Id Software,",
1515 "Inc. Activision(R) is a registered",
1516 "trademark of Activision, Inc. All",
1517 "other trademarks and trade names are",
1518 "properties of their respective owners.",
1524 "+QUAKE II MISSION PACK: THE RECKONING",
1526 "+XATRIX ENTERTAINMENT, INC.",
1528 "+DESIGN AND DIRECTION",
1537 "+LEVEL DESIGN / ADDITIONAL GAME DESIGN",
1545 "Michael \"Maxx\" Kaufman",
1547 "+COMPUTER GRAPHICS SUPERVISOR AND",
1548 "+CHARACTER ANIMATION DIRECTION",
1551 "+SENIOR ANIMATOR AND MODELER",
1554 "+CHARACTER ANIMATION AND",
1555 "+MOTION CAPTURE SPECIALIST",
1559 "Claire Praderie-Markham",
1563 "+INTRODUCTION ANIMATION",
1566 "+ADDITIONAL LEVEL DESIGN",
1570 "+3D CHARACTER ANIMATION TOOLS",
1571 "Gerry Tyra, SA Technology",
1573 "+ADDITIONAL EDITOR TOOL PROGRAMMING",
1576 "+ADDITIONAL PROGRAMMING",
1579 "+PRODUCTION COORDINATOR",
1580 "Victoria Sylvester",
1592 "+OUR FRIENDS AT ID SOFTWARE",
1605 "Barrett (Bear) Alexander",
1606 "Dave \"Zoid\" Kirsch",
1611 "+THANKS TO ACTIVISION",
1615 "Henk \"The Original Ripper\" Hartong",
1620 "+AND THE GAME TESTERS",
1636 "+THANKS TO INTERGRAPH COMPUTER SYTEMS",
1639 "Michael T. Nicolaou",
1642 "Quake II Mission Pack: The Reckoning",
1643 "(tm) (C)1998 Id Software, Inc. All",
1644 "Rights Reserved. Developed by Xatrix",
1645 "Entertainment, Inc. for Id Software,",
1646 "Inc. Distributed by Activision Inc.",
1647 "under license. Quake(R) is a",
1648 "registered trademark of Id Software,",
1649 "Inc. Quake II Mission Pack: The",
1650 "Reckoning(tm), Quake II(tm), the Id",
1651 "Software name, the \"Q II\"(tm) logo",
1652 "and id(tm) logo are trademarks of Id",
1653 "Software, Inc. Activision(R) is a",
1654 "registered trademark of Activision,",
1655 "Inc. Xatrix(R) is a registered",
1656 "trademark of Xatrix Entertainment,",
1657 "Inc. All other trademarks and trade",
1658 "names are properties of their",
1659 "respective owners.",
1665 "+QUAKE II MISSION PACK 2: GROUND ZERO",
1667 "+ROGUE ENTERTAINMENT, INC.",
1678 "Cameron Lamprecht",
1692 "+ANIMATION SEQUENCES",
1696 "+ADDITIONAL LEVEL DESIGN",
1704 "+GROUND ZERO THEME",
1710 "Brent \"Hentai\" Dill",
1716 "+OUR FRIENDS AT ID SOFTWARE",
1729 "Barrett (Bear) Alexander",
1730 "Katherine Anna Kang",
1732 "Dave \"Zoid\" Kirsch",
1736 "+THANKS TO ACTIVISION",
1745 "+AND THE GAME TESTERS",
1748 "Dave \"Zoid\" Kirsch",
1749 "Nihilistic Software",
1752 "And Countless Others",
1756 "Quake II Mission Pack 2: Ground Zero",
1757 "(tm) (C)1998 Id Software, Inc. All",
1758 "Rights Reserved. Developed by Rogue",
1759 "Entertainment, Inc. for Id Software,",
1760 "Inc. Distributed by Activision Inc.",
1761 "under license. Quake(R) is a",
1762 "registered trademark of Id Software,",
1763 "Inc. Quake II Mission Pack 2: Ground",
1764 "Zero(tm), Quake II(tm), the Id",
1765 "Software name, the \"Q II\"(tm) logo",
1766 "and id(tm) logo are trademarks of Id",
1767 "Software, Inc. Activision(R) is a",
1768 "registered trademark of Activision,",
1769 "Inc. Rogue(R) is a registered",
1770 "trademark of Rogue Entertainment,",
1771 "Inc. All other trademarks and trade",
1772 "names are properties of their",
1773 "respective owners.",
1787 int j, stringoffset = 0;
1843 int isdeveloper = 0;
1850 for (n = 0; n < 255; n++)
1853 while (*p !=
'\r' && *p !=
'\n')
1876 if (isdeveloper == 1)
1878 else if (isdeveloper == 2)
1920 Cbuf_AddText (
"loading ; killserver ; wait ; newgame\n");
2045 #define MAX_SAVEGAMES 15
2064 f = fopen (
name,
"rb");
2222 #define MAX_LOCAL_SERVERS 8
2231 #define NO_SERVER_STRING "<no server>"
2245 while ( *info ==
' ' )
2345 for (
i = 0;
i < 8;
i++ )
2355 M_Banner(
"m_banner_join_server" );
2450 char startmap[1024];
2489 else if(
Q_stricmp(startmap,
"mintro") == 0)
2491 else if(
Q_stricmp(startmap,
"fact1") == 0)
2493 else if(
Q_stricmp(startmap,
"power1") == 0)
2495 else if(
Q_stricmp(startmap,
"biggun") == 0)
2497 else if(
Q_stricmp(startmap,
"hangar1") == 0)
2499 else if(
Q_stricmp(startmap,
"city1") == 0)
2501 else if(
Q_stricmp(startmap,
"boss1") == 0)
2532 static const char *dm_coop_names[] =
2540 static const char *dm_coop_names_rogue[] =
2551 char mapsname[1024];
2561 if ( ( fp = fopen( mapsname,
"rb" ) ) == 0 )
2569 length = filelength( fileno( fp ) );
2571 fseek(fp, 0, SEEK_END);
2573 fseek(fp, 0, SEEK_SET);
2575 buffer = malloc( length );
2576 fread(
buffer, length, 1, fp );
2582 while (
i < length )
2605 l = (
int)strlen(shortname);
2606 for (
j=0 ;
j<l ;
j++)
2607 shortname[
j] = toupper(shortname[
j]);
2609 Com_sprintf( scratch,
sizeof( scratch ),
"%s\n%s", longname, shortname );
2611 mapnames[
i] = malloc( strlen( scratch ) + 1 );
2944 static const char *yes_no_names[] =
2948 static const char *teamplay_names[] =
2950 "disabled",
"by skin",
"by model", 0
3216 static const char *yes_no_names[] =
3306 #define NUM_ADDRESSBOOK_ENTRIES 9
3362 M_Banner(
"m_banner_addressbook" );
3391 #define MAX_DISPLAYNAME 16
3392 #define MAX_PLAYERMODELS 1024
3406 static int rate_tbl[] = { 2500, 3200, 5000, 10000, 25000, 0 };
3407 static const char *
rate_names[] = {
"28.8 Modem",
"33.6 Modem",
"Single ISDN",
3408 "Dual ISDN/Cable",
"T1/LAN",
"User defined", 0 };
3436 for (
i = 0;
i < n;
i++ )
3452 strcpy( scratch,
skin );
3453 *strrchr( scratch,
'.' ) = 0;
3454 strcat( scratch,
"_i.pcx" );
3456 for (
i = 0;
i < npcxfiles;
i++ )
3458 if ( strcmp( pcxfiles[
i], scratch ) == 0 )
3467 char findname[1024];
3469 int ndirs = 0, npms = 0;
3474 extern char **
FS_ListFiles(
char *,
int *,
unsigned,
unsigned );
3484 Com_sprintf( findname,
sizeof(findname),
"%s/players/*.*", path );
3500 for (
i = 0;
i < npms;
i++ )
3509 if ( dirnames[
i] == 0 )
3513 strcpy( scratch, dirnames[
i] );
3514 strcat( scratch,
"/tris.md2" );
3517 free( dirnames[
i] );
3525 strcpy( scratch, dirnames[
i] );
3526 strcat( scratch,
"/*.pcx" );
3531 free( dirnames[
i] );
3537 for ( k = 0; k < npcxfiles-1; k++ )
3539 if ( !strstr( pcxnames[k],
"_i.pcx" ) )
3550 skinnames = malloc(
sizeof(
char * ) * ( nskins + 1 ) );
3551 memset( skinnames, 0,
sizeof(
char * ) * ( nskins + 1 ) );
3554 for (
s = 0, k = 0; k < npcxfiles-1; k++ )
3558 if ( !strstr( pcxnames[k],
"_i.pcx" ) )
3562 a = strrchr( pcxnames[k],
'/' );
3563 b = strrchr( pcxnames[k],
'\\' );
3570 strcpy( scratch, c + 1 );
3572 if ( strrchr( scratch,
'.' ) )
3573 *strrchr( scratch,
'.' ) = 0;
3575 skinnames[
s] = strdup( scratch );
3586 a = strrchr( dirnames[
i],
'/' );
3587 b = strrchr( dirnames[
i],
'\\' );
3615 if ( strcmp( a->
directory,
"male" ) == 0 )
3617 else if ( strcmp( b->
directory,
"male" ) == 0 )
3620 if ( strcmp( a->
directory,
"female" ) == 0 )
3622 else if ( strcmp( b->
directory,
"female" ) == 0 )
3634 char currentdirectory[1024];
3635 char currentskin[1024];
3638 int currentdirectoryindex = 0;
3639 int currentskinindex = 0;
3643 static const char *handedness[] = {
"right",
"left",
"center", 0 };
3655 if ( strchr( currentdirectory,
'/' ) )
3657 strcpy( currentskin, strchr( currentdirectory,
'/' ) + 1 );
3658 *strchr( currentdirectory,
'/' ) = 0;
3660 else if ( strchr( currentdirectory,
'\\' ) )
3662 strcpy( currentskin, strchr( currentdirectory,
'\\' ) + 1 );
3663 *strchr( currentdirectory,
'\\' ) = 0;
3667 strcpy( currentdirectory,
"male" );
3668 strcpy( currentskin,
"grunt" );
3681 currentdirectoryindex =
i;
3687 currentskinindex =
j;
3794 extern float CalcFov(
float fov_x,
float w,
float h );
3798 memset( &refdef, 0,
sizeof( refdef ) );
3813 memset( &entity, 0,
sizeof( entity ) );
3827 entity.
angles[1] = yaw++;
3844 Com_sprintf( scratch,
sizeof( scratch ),
"/players/%s/%s_i.pcx",
3873 if (
s_pmi[
i].skindisplaynames[
j] )
3874 free(
s_pmi[
i].skindisplaynames[
j] );
3877 free(
s_pmi[
i].skindisplaynames );
3906 void M_Menu_Gallery_f(
void )
3908 extern void Gallery_MenuDraw(
void );
3909 extern const char *Gallery_MenuKey(
int key );
3911 M_PushMenu( Gallery_MenuDraw, Gallery_MenuKey );
struct image_s *(* RegisterSkin)(char *name)
void FS_Read(void *buffer, int len, FILE *f)
CONST PIXELFORMATDESCRIPTOR int
char directory[MAX_QPATH]
void Key_SetBinding(int keynum, char *binding)
void CL_PingServers_f(void)
struct image_s *(* RegisterPic)(char *name)
void(* DrawFill)(int x, int y, int w, int h, int c)
char * FS_NextPath(char *prevpath)
char * NET_AdrToString(netadr_t a)
#define DF_SPAWN_FARTHEST
void SCR_DirtyScreen(void)
cvar_t * Cvar_Get(char *var_name, char *var_value, int flags)
char * va(char *format,...)
cvar_t * Cvar_ForceSet(char *var_name, char *value)
void(* DrawFadeScreen)(void)
void CL_Snd_Restart_f(void)
char * Sys_FindFirst(char *path, unsigned musthave, unsigned canthave)
void Cmd_AddCommand(char *cmd_name, xcommand_t function)
char * Key_KeynumToString(int keynum)
int FS_LoadFile(char *path, void **buffer)
void Cbuf_AddText(char *text)
void Cvar_SetValue(char *var_name, float value)
void(* DrawGetPicSize)(int *w, int *h, char *name)
char ** FS_ListFiles(char *findname, int *numfiles, unsigned musthave, unsigned canthave)
float CalcFov(float fov_x, float width, float height)
void Com_Error(int code, char *fmt,...)
void Con_ClearNotify(void)
void(* DrawPic)(int x, int y, char *name)
struct model_s *(* RegisterModel)(char *name)
int Q_stricmp(char *s1, char *s2)
char displayname[MAX_DISPLAYNAME]
void Key_ClearTyping(void)
lightstyle_t * lightstyles
#define DF_NO_STACK_DOUBLE
void Cbuf_InsertText(char *text)
int Com_ServerState(void)
char * COM_Parse(char **data_p)
cvar_t * Cvar_Set(char *var_name, char *value)
void FS_FreeFile(void *buffer)
void(* DrawChar)(int x, int y, int c)
void S_StartLocalSound(char *sound)
GLdouble GLdouble GLdouble w
int Sys_Milliseconds(void)
void Key_ClearStates(void)
char * Cvar_VariableString(char *var_name)
void Com_sprintf(char *dest, int size, char *fmt,...)
void(* RenderFrame)(refdef_t *fd)
void(APIENTRY *qglAccum)(GLenum op
#define DF_NO_FRIENDLY_FIRE
float Cvar_VariableValue(char *var_name)