icculus quake2 doxygen
1.0 dev
|
|
Go to the documentation of this file.
25 #include "../client/qmenu.h"
29 #define NUM_CURSOR_FRAMES 15
58 const char *(*m_keyfunc) (
int key);
63 #define MAX_MENU_DEPTH 8
69 const char *(*key) (
int k);
83 void M_PushMenu (
void (*draw) (
void),
const char *(*key) (
int k) )
144 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",
"previous weapon"},
592 {
"+forward",
"walk forward"},
593 {
"+back",
"backpedal"},
594 {
"+left",
"turn left"},
595 {
"+right",
"turn right"},
597 {
"+moveleft",
"step left"},
598 {
"+moveright",
"step right"},
599 {
"+strafe",
"sidestep"},
600 {
"+lookup",
"look up"},
601 {
"+lookdown",
"look down"},
602 {
"centerview",
"center view"},
603 {
"+mlook",
"mouse look"},
604 {
"+klook",
"keyboard look"},
605 {
"+moveup",
"up / jump"},
606 {
"+movedown",
"down / crouch"},
608 {
"inven",
"inventory"},
609 {
"invuse",
"use item"},
610 {
"invdrop",
"drop item"},
611 {
"invprev",
"prev item"},
612 {
"invnext",
"next item"},
614 {
"cmd help",
"help computer" },
655 for (
j=0 ;
j<256 ;
j++)
660 if (!strncmp (b, command, l) )
672 twokeys[0] = twokeys[1] = -1;
676 for (
j=0 ;
j<256 ;
j++)
681 if (!strncmp (b, command, l) )
726 x = strlen(
name) * 8;
986 if ( key !=
K_ESCAPE && key !=
'`' )
1082 static void NoAltTabFunc(
void *unused )
1090 if (
value < min )
return min;
1091 if (
value > max )
return max;
1218 M_Print( 16 + 16, 120 - 48 + 8,
"Restarting the sound system. This" );
1219 M_Print( 16 + 16, 120 - 48 + 16,
"could take up to a minute, so" );
1220 M_Print( 16 + 16, 120 - 48 + 24,
"please be patient." );
1230 static const char *cd_music_items[] =
1237 static const char *cd_shuffle[] =
1244 static const char *quality_items[] =
1249 static const char *compatibility_items[] =
1251 "max compatibility",
"max performance", 0
1254 static const char *yesno_names[] =
1261 static const char *crosshair_names[] =
1467 "+QUAKE II BY ID SOFTWARE",
1488 "Barrett (Bear) Alexander",
1493 "Ben Donges for beta testing",
1500 "+ADDITIONAL SUPPORT",
1502 "+LINUX PORT AND CTF",
1503 "Dave \"Zoid\" Kirsch",
1505 "+CINEMATIC SEQUENCES",
1506 "Ending Cinematic by Blur Studio - ",
1509 "Environment models for Introduction",
1510 "Cinematic by Karl Dolgener",
1512 "Assistance with environment design",
1515 "+SOUND EFFECTS AND MUSIC",
1516 "Sound Design by Soundelux Media Labs.",
1517 "Music Composed and Produced by",
1518 "Soundelux Media Labs. Special thanks",
1519 "to Bill Brown, Tom Ozanich, Brian",
1520 "Celano, Jeff Eisner, and The Soundelux",
1523 "\"Level Music\" by Sonic Mayhem",
1524 "www.sonicmayhem.com",
1526 "\"Quake II Theme Song\"",
1527 "(C) 1997 Rob Zombie. All Rights",
1530 "Track 10 (\"Climb\") by Jer Sypult",
1532 "Voice of computers by",
1533 "Carly Staehlin-Taylor",
1535 "+THANKS TO ACTIVISION",
1543 "Quake II(tm) (C)1997 Id Software, Inc.",
1544 "All Rights Reserved. Distributed by",
1545 "Activision, Inc. under license.",
1546 "Quake II(tm), the Id Software name,",
1547 "the \"Q II\"(tm) logo and id(tm)",
1548 "logo are trademarks of Id Software,",
1549 "Inc. Activision(R) is a registered",
1550 "trademark of Activision, Inc. All",
1551 "other trademarks and trade names are",
1552 "properties of their respective owners.",
1558 "+QUAKE II MISSION PACK: THE RECKONING",
1560 "+XATRIX ENTERTAINMENT, INC.",
1562 "+DESIGN AND DIRECTION",
1571 "+LEVEL DESIGN / ADDITIONAL GAME DESIGN",
1579 "Michael \"Maxx\" Kaufman",
1581 "+COMPUTER GRAPHICS SUPERVISOR AND",
1582 "+CHARACTER ANIMATION DIRECTION",
1585 "+SENIOR ANIMATOR AND MODELER",
1588 "+CHARACTER ANIMATION AND",
1589 "+MOTION CAPTURE SPECIALIST",
1593 "Claire Praderie-Markham",
1597 "+INTRODUCTION ANIMATION",
1600 "+ADDITIONAL LEVEL DESIGN",
1604 "+3D CHARACTER ANIMATION TOOLS",
1605 "Gerry Tyra, SA Technology",
1607 "+ADDITIONAL EDITOR TOOL PROGRAMMING",
1610 "+ADDITIONAL PROGRAMMING",
1613 "+PRODUCTION COORDINATOR",
1614 "Victoria Sylvester",
1626 "+OUR FRIENDS AT ID SOFTWARE",
1639 "Barrett (Bear) Alexander",
1640 "Dave \"Zoid\" Kirsch",
1645 "+THANKS TO ACTIVISION",
1649 "Henk \"The Original Ripper\" Hartong",
1654 "+AND THE GAME TESTERS",
1670 "+THANKS TO INTERGRAPH COMPUTER SYTEMS",
1673 "Michael T. Nicolaou",
1676 "Quake II Mission Pack: The Reckoning",
1677 "(tm) (C)1998 Id Software, Inc. All",
1678 "Rights Reserved. Developed by Xatrix",
1679 "Entertainment, Inc. for Id Software,",
1680 "Inc. Distributed by Activision Inc.",
1681 "under license. Quake(R) is a",
1682 "registered trademark of Id Software,",
1683 "Inc. Quake II Mission Pack: The",
1684 "Reckoning(tm), Quake II(tm), the Id",
1685 "Software name, the \"Q II\"(tm) logo",
1686 "and id(tm) logo are trademarks of Id",
1687 "Software, Inc. Activision(R) is a",
1688 "registered trademark of Activision,",
1689 "Inc. Xatrix(R) is a registered",
1690 "trademark of Xatrix Entertainment,",
1691 "Inc. All other trademarks and trade",
1692 "names are properties of their",
1693 "respective owners.",
1699 "+QUAKE II MISSION PACK 2: GROUND ZERO",
1701 "+ROGUE ENTERTAINMENT, INC.",
1712 "Cameron Lamprecht",
1726 "+ANIMATION SEQUENCES",
1730 "+ADDITIONAL LEVEL DESIGN",
1738 "+GROUND ZERO THEME",
1744 "Brent \"Hentai\" Dill",
1750 "+OUR FRIENDS AT ID SOFTWARE",
1763 "Barrett (Bear) Alexander",
1764 "Katherine Anna Kang",
1766 "Dave \"Zoid\" Kirsch",
1770 "+THANKS TO ACTIVISION",
1779 "+AND THE GAME TESTERS",
1782 "Dave \"Zoid\" Kirsch",
1783 "Nihilistic Software",
1786 "And Countless Others",
1790 "Quake II Mission Pack 2: Ground Zero",
1791 "(tm) (C)1998 Id Software, Inc. All",
1792 "Rights Reserved. Developed by Rogue",
1793 "Entertainment, Inc. for Id Software,",
1794 "Inc. Distributed by Activision Inc.",
1795 "under license. Quake(R) is a",
1796 "registered trademark of Id Software,",
1797 "Inc. Quake II Mission Pack 2: Ground",
1798 "Zero(tm), Quake II(tm), the Id",
1799 "Software name, the \"Q II\"(tm) logo",
1800 "and id(tm) logo are trademarks of Id",
1801 "Software, Inc. Activision(R) is a",
1802 "registered trademark of Activision,",
1803 "Inc. Rogue(R) is a registered",
1804 "trademark of Rogue Entertainment,",
1805 "Inc. All other trademarks and trade",
1806 "names are properties of their",
1807 "respective owners.",
1821 int j, stringoffset = 0;
1885 int isdeveloper = 0;
1892 for (n = 0; n < 255; n++)
1895 while (*p !=
'\r' && *p !=
'\n')
1918 if (isdeveloper == 1)
1920 else if (isdeveloper == 2)
1962 Cbuf_AddText (
"loading ; killserver ; wait ; newgame\n");
2087 #define MAX_SAVEGAMES 15
2106 f = fopen (
name,
"rb");
2264 #define MAX_LOCAL_SERVERS 8
2273 #define NO_SERVER_STRING "<no server>"
2287 while ( *info ==
' ' )
2344 M_Print( 16 + 16, 120 - 48 + 8,
"Searching for local servers, this" );
2345 M_Print( 16 + 16, 120 - 48 + 16,
"could take up to a minute, so" );
2346 M_Print( 16 + 16, 120 - 48 + 24,
"please be patient." );
2403 for (
i = 0;
i < 8;
i++ )
2413 M_Banner(
"m_banner_join_server" );
2496 char startmap[1024];
2535 else if(
Q_stricmp(startmap,
"mintro") == 0)
2537 else if(
Q_stricmp(startmap,
"fact1") == 0)
2539 else if(
Q_stricmp(startmap,
"power1") == 0)
2541 else if(
Q_stricmp(startmap,
"biggun") == 0)
2543 else if(
Q_stricmp(startmap,
"hangar1") == 0)
2545 else if(
Q_stricmp(startmap,
"city1") == 0)
2547 else if(
Q_stricmp(startmap,
"boss1") == 0)
2567 static const char *dm_coop_names[] =
2575 static const char *dm_coop_names_rogue[] =
2586 char mapsname[1024];
2596 if ( ( fp = fopen( mapsname,
"rb" ) ) == 0 )
2604 length = filelength( fileno( fp ) );
2606 fseek(fp, 0, SEEK_END);
2608 fseek(fp, 0, SEEK_SET);
2610 buffer = malloc( length );
2611 fread(
buffer, length, 1, fp );
2617 while (
i < length )
2640 l = strlen(shortname);
2641 for (
j=0 ;
j<l ;
j++)
2642 shortname[
j] = toupper(shortname[
j]);
2644 Com_sprintf( scratch,
sizeof( scratch ),
"%s\n%s", longname, shortname );
2646 mapnames[
i] = malloc( strlen( scratch ) + 1 );
2979 static const char *yes_no_names[] =
2983 static const char *teamplay_names[] =
2985 "disabled",
"by skin",
"by model", 0
3251 static const char *yes_no_names[] =
3341 #define NUM_ADDRESSBOOK_ENTRIES 9
3397 M_Banner(
"m_banner_addressbook" );
3426 #define MAX_DISPLAYNAME 16
3427 #define MAX_PLAYERMODELS 1024
3441 static int rate_tbl[] = { 2500, 3200, 5000, 10000, 25000, 0 };
3442 static const char *
rate_names[] = {
"28.8 Modem",
"33.6 Modem",
"Single ISDN",
3443 "Dual ISDN/Cable",
"T1/LAN",
"User defined", 0 };
3471 for (
i = 0;
i < n;
i++ )
3487 strcpy( scratch,
skin );
3488 *strrchr( scratch,
'.' ) = 0;
3489 strcat( scratch,
"_i.pcx" );
3491 for (
i = 0;
i < npcxfiles;
i++ )
3493 if ( strcmp( pcxfiles[
i], scratch ) == 0 )
3502 char findname[1024];
3504 int ndirs = 0, npms = 0;
3509 extern char **
FS_ListFiles(
char *,
int *,
unsigned,
unsigned );
3527 if( path ==
NULL ) {
3532 Com_sprintf( findname,
sizeof(findname),
"%s/players/*.*", path );
3548 for (
i = 0;
i < npms;
i++ )
3557 if ( dirnames[
i] == 0 )
3561 strcpy( scratch, dirnames[
i] );
3562 strcat( scratch,
"/tris.md2" );
3565 free( dirnames[
i] );
3573 strcpy( scratch, dirnames[
i] );
3574 strcat( scratch,
"/*.pcx" );
3579 free( dirnames[
i] );
3585 for ( k = 0; k < npcxfiles-1; k++ )
3587 if ( !strstr( pcxnames[k],
"_i.pcx" ) )
3598 skinnames = malloc(
sizeof(
char * ) * ( nskins + 1 ) );
3599 memset( skinnames, 0,
sizeof(
char * ) * ( nskins + 1 ) );
3602 for ( s = 0, k = 0; k < npcxfiles-1; k++ )
3606 if ( !strstr( pcxnames[k],
"_i.pcx" ) )
3610 a = strrchr( pcxnames[k],
'/' );
3611 b = strrchr( pcxnames[k],
'\\' );
3618 strcpy( scratch, c + 1 );
3620 if ( strrchr( scratch,
'.' ) )
3621 *strrchr( scratch,
'.' ) = 0;
3623 skinnames[s] = strdup( scratch );
3634 a = strrchr( dirnames[
i],
'/' );
3635 b = strrchr( dirnames[
i],
'\\' );
3662 if ( strcmp( a->
directory,
"male" ) == 0 )
3664 else if ( strcmp( b->
directory,
"male" ) == 0 )
3667 if ( strcmp( a->
directory,
"female" ) == 0 )
3669 else if ( strcmp( b->
directory,
"female" ) == 0 )
3680 char currentdirectory[1024];
3681 char currentskin[1024];
3684 int currentdirectoryindex = 0;
3685 int currentskinindex = 0;
3689 static const char *handedness[] = {
"right",
"left",
"center", 0 };
3701 if ( strchr( currentdirectory,
'/' ) )
3703 strcpy( currentskin, strchr( currentdirectory,
'/' ) + 1 );
3704 *strchr( currentdirectory,
'/' ) = 0;
3706 else if ( strchr( currentdirectory,
'\\' ) )
3708 strcpy( currentskin, strchr( currentdirectory,
'\\' ) + 1 );
3709 *strchr( currentdirectory,
'\\' ) = 0;
3713 strcpy( currentdirectory,
"male" );
3714 strcpy( currentskin,
"grunt" );
3727 currentdirectoryindex =
i;
3733 currentskinindex =
j;
3840 extern float CalcFov(
float fov_x,
float w,
float h );
3844 memset( &refdef, 0,
sizeof( refdef ) );
3859 memset( &entity, 0,
sizeof( entity ) );
3873 entity.
angles[1] = yaw++;
3890 Com_sprintf( scratch,
sizeof( scratch ),
"/players/%s/%s_i.pcx",
3919 if (
s_pmi[
i].skindisplaynames[
j] )
3920 free(
s_pmi[
i].skindisplaynames[
j] );
3923 free(
s_pmi[
i].skindisplaynames );
3952 void M_Menu_Gallery_f(
void )
3954 extern void Gallery_MenuDraw(
void );
3955 extern const char *Gallery_MenuKey(
int key );
3957 M_PushMenu( Gallery_MenuDraw, Gallery_MenuKey );
struct image_s *(* RegisterSkin)(char *name)
void FS_Read(void *buffer, int len, FILE *f)
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 * keybindings[K_LAST]
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 CDAudio_Play(int track, qboolean looping)
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)
void CDAudio_RandomPlay(void)
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)
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
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)