From 426d3967446d906a9612ae09e6748d3dad26c60f Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 5 Oct 2004 14:08:15 +0000 Subject: [PATCH] added COMMANDLINEOPTION comments for every commandline option, these will be listed in the readme git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4594 d7cf8633-e32d-0410-b094-e92efae38249 --- cd_bsd.c | 1 + cd_linux.c | 1 + cd_shared.c | 1 + cl_particles.c | 1 + common.c | 18 ++++++++++++++++++ console.c | 1 + fs.c | 2 ++ host.c | 4 ++++ menu.c | 2 ++ netconn.c | 2 ++ palette.c | 3 +++ snd_alsa.c | 5 +++++ snd_dma.c | 2 ++ snd_ogg.c | 1 + snd_oss.c | 4 ++++ snd_sdl.c | 1 + snd_win.c | 7 ++++++- sys_shared.c | 1 + sys_win.c | 3 +++ vid_glx.c | 4 ++++ vid_sdl.c | 1 + vid_shared.c | 20 ++++++++++++++++++++ vid_wgl.c | 8 ++++++++ 23 files changed, 92 insertions(+), 1 deletion(-) diff --git a/cd_bsd.c b/cd_bsd.c index 5f4aa2b2..eaf26669 100644 --- a/cd_bsd.c +++ b/cd_bsd.c @@ -243,6 +243,7 @@ void CDAudio_SysInit (void) { int i; +// COMMANDLINEOPTION: -cddev chooses which CD drive to use (bsd and Linux only) if ((i = COM_CheckParm("-cddev")) != 0 && i < com_argc - 1) strlcpy(cd_dev, com_argv[i + 1], sizeof(cd_dev)); } diff --git a/cd_linux.c b/cd_linux.c index 9d4b4476..c086eb81 100644 --- a/cd_linux.c +++ b/cd_linux.c @@ -228,6 +228,7 @@ void CDAudio_SysInit (void) { int i; +// COMMANDLINEOPTION: -cddev chooses which CD drive to use (bsd and Linux only) if ((i = COM_CheckParm("-cddev")) != 0 && i < com_argc - 1) strlcpy(cd_dev, com_argv[i + 1], sizeof(cd_dev)); } diff --git a/cd_shared.c b/cd_shared.c index 4923ebbe..3f8b0d27 100644 --- a/cd_shared.c +++ b/cd_shared.c @@ -351,6 +351,7 @@ int CDAudio_Init (void) if (cls.state == ca_dedicated) return -1; +// COMMANDLINEOPTION: -nocdaudio disables CD audio support if (COM_CheckParm("-nocdaudio") || COM_CheckParm("-safe")) return -1; diff --git a/cl_particles.c b/cl_particles.c index c185062e..33bf8685 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -327,6 +327,7 @@ void CL_Particles_Init (void) { int i; +// COMMANDLINEOPTION: -particles changes maximum number of particles at once, default 32768 i = COM_CheckParm ("-particles"); if (i && i < com_argc - 1) diff --git a/common.c b/common.c index 3351fd88..b357905e 100644 --- a/common.c +++ b/common.c @@ -828,40 +828,58 @@ static const gamemode_info_t gamemode_info [] = {// prog_name cmdline gamename gamedirname gamescreenshotname // GAME_NORMAL +// COMMANDLINEOPTION: -quake runs the game Quake (default) { "", "-quake", "DarkPlaces-Quake", "", "dp" }, // GAME_HIPNOTIC +// COMMANDLINEOPTION: -hipnotic runs Quake mission pack 1: The Scourge of Armagon { "hipnotic", "-hipnotic", "Darkplaces-Hipnotic", "hipnotic", "dp" }, // GAME_ROGUE +// COMMANDLINEOPTION: -rogue runs Quake mission pack 2: The Dissolution of Eternity { "rogue", "-rogue", "Darkplaces-Rogue", "rogue", "dp" }, // GAME_NEHAHRA +// COMMANDLINEOPTION: -nehahra runs The Seal of Nehahra movie and game { "nehahra", "-nehahra", "DarkPlaces-Nehahra", "nehahra", "dp" }, // GAME_NEXUIZ +// COMMANDLINEOPTION: -nexuiz runs the multiplayer game Nexuiz { "nexuiz", "-nexuiz", "Nexuiz", "data", "nexuiz" }, // GAME_TRANSFUSION +// COMMANDLINEOPTION: -transfusion runs Transfusion (the recreation of Blood in Quake) { "transfusion", "-transfusion", "Transfusion", "basetf", "transfusion" }, // GAME_GOODVSBAD2 +// COMMANDLINEOPTION: -goodvsbad2 runs the psychadelic RTS FPS game Good Vs Bad 2 { "gvb2", "-goodvsbad2", "GoodVs.Bad2", "rts", "gvb2" }, // GAME_TEU +// COMMANDLINEOPTION: -teu runs The Evil Unleashed (this option is obsolete as they are not using darkplaces) { "teu", "-teu", "TheEvilUnleashed", "baseteu", "teu" }, // GAME_BATTLEMECH +// COMMANDLINEOPTION: -battlemech runs the multiplayer topdown deathmatch game BattleMech { "battlemech", "-battlemech", "Battlemech", "base", "battlemech" }, // GAME_ZYMOTIC +// COMMANDLINEOPTION: -zymotic runs the singleplayer game Zymotic { "zymotic", "-zymotic", "Zymotic", "data", "zymotic" }, // GAME_FNIGGIUM +// COMMANDLINEOPTION: -fniggium runs the post apocalyptic melee RPG Fniggium { "fniggium", "-fniggium", "Fniggium", "data", "fniggium" }, // GAME_SETHERAL +// COMMANDLINEOPTION: -setheral runs the multiplayer game Setheral { "setheral", "-setheral", "Setheral", "data", "setheral" }, // GAME_SOM +// COMMANDLINEOPTION: -som runs the multiplayer game Son Of Man { "som", "-som", "Son of Man", "sonofman", "som" }, // GAME_TENEBRAE +// COMMANDLINEOPTION: -tenebrae runs the graphics test mod known as Tenebrae (some features not implemented) { "tenebrae", "-tenebrae", "DarkPlaces-Tenebrae", "tenebrae", "dp" }, // GAME_NEOTERIC +// COMMANDLINEOPTION: -neoteric runs the game Neoteric { "neoteric", "-neoteric", "Neoteric", "neobase", "neo" }, // GAME_OPENQUARTZ +// COMMANDLINEOPTION: -openquartz runs the game OpenQuartz, a standalone GPL replacement of the quake content { "openquartz", "-openquartz", "OpenQuartz", "id1", "openquartz"}, // GAME_PRYDON +// COMMANDLINEOPTION: -prydon runs the topdown point and click action-RPG Prydon Gate { "prydon", "-prydon", "PrydonGate", "prydon", "prydon"}, // GAME_NETHERWORLD +// COMMANDLINEOPTION: -netherworld runs the game Netherworld: Dark Masters { "netherworld", "-netherworld", "Dark Masters", "netherworld", "nw"}, }; diff --git a/console.c b/console.c index 92e5d22b..33639379 100644 --- a/console.c +++ b/console.c @@ -124,6 +124,7 @@ void Log_Init (void) Cvar_RegisterVariable (&log_sync); // support for the classic Quake option +// COMMANDLINEOPTION: -condebug logs console messages to qconsole.log with sync on (so it keeps every message up to a crash), see also log_file and log_sync if (COM_CheckParm ("-condebug") != 0) { Cvar_SetQuick (&log_file, "qconsole.log"); diff --git a/fs.c b/fs.c index d5072995..089fb3dc 100644 --- a/fs.c +++ b/fs.c @@ -902,6 +902,7 @@ void FS_Init (void) // -basedir // Overrides the system supplied base directory (under GAMENAME) +// COMMANDLINEOPTION: -basedir chooses what base directory the game data is in, inside this there should be a data directory for the game (for example id1) i = COM_CheckParm ("-basedir"); if (i && i < com_argc-1) { @@ -913,6 +914,7 @@ void FS_Init (void) // -path [] ... // Fully specifies the exact search path, overriding the generated one +// COMMANDLINEOPTION: -path specifies the full search path manually, overriding the generated one, example: -path c:\quake\id1 c:\quake\pak0.pak c:\quake\pak1.pak (not recommended) i = COM_CheckParm ("-path"); if (i) { diff --git a/host.c b/host.c index 27df77f3..5e65a002 100644 --- a/host.c +++ b/host.c @@ -161,6 +161,8 @@ void Host_ServerOptions (void) // general default numplayers = 8; +// COMMANDLINEOPTION: -dedicated [playerlimit] starts a dedicated server (with a command console), default playerlimit is 8 +// COMMANDLINEOPTION: -listen [playerlimit] starts a multiplayer server with graphical client, like singleplayer but other players can connect, default playerlimit is 8 if (cl_available) { // client exists, check what mode the user wants @@ -840,6 +842,7 @@ void Host_Init (void) srand(time(NULL)); // FIXME: this is evil, but possibly temporary +// COMMANDLINEOPTION: -developer enables warnings and other notices (RECOMMENDED for mod developers) if (COM_CheckParm("-developer")) { forcedeveloper = true; @@ -903,6 +906,7 @@ void Host_Init (void) Cbuf_InsertText("exec quake.rc\n"); // check for special benchmark mode +// COMMANDLINEOPTION: -benchmark runs a timedemo and quits, results of any timedemo can be found in gamedir/benchmark.log (for example id1/benchmark.log) i = COM_CheckParm("-benchmark"); if (i && i + 1 < com_argc) Cbuf_InsertText(va("timedemo %s\n", com_argv[i + 1])); diff --git a/menu.c b/menu.c index 8c4b901a..0c50e8de 100644 --- a/menu.c +++ b/menu.c @@ -4327,10 +4327,12 @@ void MR_Init_Commands(void) void MR_Init(void) { // use -forceqmenu to use always the normal quake menu (it sets forceqmenu to 1) +// COMMANDLINEOPTION: -forceqmenu disables menu.dat (same as +forceqmenu 1) if(COM_CheckParm("-forceqmenu")) Cvar_SetValueQuick(&forceqmenu,1); // use -useqmenu for debugging proposes, cause it starts // the normal quake menu only the first time +// COMMANDLINEOPTION: -useqmenu causes the first time you open the menu to use the quake menu, then reverts to menu.dat (if forceqmenu is 0) if(COM_CheckParm("-useqmenu")) MR_SetRouting (TRUE); else diff --git a/netconn.c b/netconn.c index be111a9f..703395d1 100755 --- a/netconn.c +++ b/netconn.c @@ -1611,6 +1611,7 @@ void NetConn_Init(void) Cvar_RegisterVariable(&sv_heartbeatperiod); for (i = 0;sv_masters[i].name;i++) Cvar_RegisterVariable(&sv_masters[i]); +// COMMANDLINEOPTION: -ip sets the ip address of this machine for purposes of networking (default 0.0.0.0 also known as INADDR_ANY), use only if you have multiple network adapters and need to choose one specifically. if ((i = COM_CheckParm("-ip")) && i + 1 < com_argc) { if (LHNETADDRESS_FromString(&tempaddress, com_argv[i + 1], 0) == 1) @@ -1621,6 +1622,7 @@ void NetConn_Init(void) else Con_Printf("-ip option used, but unable to parse the address \"%s\"\n", com_argv[i + 1]); } +// COMMANDLINEOPTION: -port sets the port to use for a server (default 26000, the same port as QUAKE itself), useful if you host multiple servers on your machine if (((i = COM_CheckParm("-port")) || (i = COM_CheckParm("-ipport")) || (i = COM_CheckParm("-udpport"))) && i + 1 < com_argc) { i = atoi(com_argv[i + 1]); diff --git a/palette.c b/palette.c index 3e1bd563..88eb7b60 100644 --- a/palette.c +++ b/palette.c @@ -197,12 +197,15 @@ void Palette_Init(void) gamma = 1; scale = 1; base = 0; +// COMMANDLINEOPTION: -texgamma sets the quake palette gamma, allowing you to make quake textures brighter/darker, not recommended i = COM_CheckParm("-texgamma"); if (i) gamma = atof(com_argv[i + 1]); +// COMMANDLINEOPTION: -texcontrast sets the quake palette contrast, allowing you to make quake textures brighter/darker, not recommended i = COM_CheckParm("-texcontrast"); if (i) scale = atof(com_argv[i + 1]); +// COMMANDLINEOPTION: -texbrightness sets the quake palette brightness (brightness of black), allowing you to make quake textures brighter/darker, not recommended i = COM_CheckParm("-texbrightness"); if (i) base = atof(com_argv[i + 1]); diff --git a/snd_alsa.c b/snd_alsa.c index 709d8314..0aa87528 100644 --- a/snd_alsa.c +++ b/snd_alsa.c @@ -49,11 +49,13 @@ qboolean SNDDMA_Init (void) snd_pcm_hw_params_alloca (&hw); snd_pcm_sw_params_alloca (&sw); +// COMMANDLINEOPTION: -sndpcm selects which pcm device to us, default is "default" (ALSA sound driver only) if ((i=COM_CheckParm("-sndpcm"))!=0) pcmname=com_argv[i+1]; if (!pcmname) pcmname = "default"; +// COMMANDLINEOPTION: -sndbits sets sound precision to 8 or 16 bit (email me if you want others added) if ((i=COM_CheckParm("-sndbits")) != 0) { bps = atoi(com_argv[i+1]); @@ -64,6 +66,7 @@ qboolean SNDDMA_Init (void) } } +// COMMANDLINEOPTION: -sndspeed chooses 44100 hz, 22100 hz, or 11025 hz sound output rate if ((i=COM_CheckParm("-sndspeed")) != 0) { rate = atoi(com_argv[i+1]); @@ -74,8 +77,10 @@ qboolean SNDDMA_Init (void) } } +// COMMANDLINEOPTION: -sndmono sets sound output to mono if ((i=COM_CheckParm("-sndmono")) != 0) stereo=0; +// COMMANDLINEOPTION: -sndstereo sets sound output to stereo if ((i=COM_CheckParm("-sndstereo")) != 0) stereo=1; diff --git a/snd_dma.c b/snd_dma.c index 5825fc62..03fa4950 100644 --- a/snd_dma.c +++ b/snd_dma.c @@ -212,11 +212,13 @@ void S_Init(void) Cvar_RegisterVariable(&bgmvolume); Cvar_RegisterVariable(&snd_staticvolume); +// COMMANDLINEOPTION: -nosound disables sound (including CD audio) if (COM_CheckParm("-nosound") || COM_CheckParm("-safe")) return; snd_mempool = Mem_AllocPool("sound", 0, NULL); +// COMMANDLINEOPTION: -simsound runs sound mixing but with no output if (COM_CheckParm("-simsound")) fakedma = true; diff --git a/snd_ogg.c b/snd_ogg.c index 989903fe..d6f19207 100644 --- a/snd_ogg.c +++ b/snd_ogg.c @@ -298,6 +298,7 @@ qboolean OGG_OpenLibrary (void) if (vf_dll) return true; +// COMMANDLINEOPTION: -novorbis disables ogg vorbis sound support if (COM_CheckParm("-novorbis")) return false; diff --git a/snd_oss.c b/snd_oss.c index d06e4780..ef07d0df 100644 --- a/snd_oss.c +++ b/snd_oss.c @@ -96,6 +96,7 @@ qboolean SNDDMA_Init(void) s = getenv("QUAKE_SOUND_SAMPLEBITS"); if (s) shm->format.width = atoi(s) / 8; +// COMMANDLINEOPTION: -sndbits chooses 8 bit or 16 bit sound output else if ((i = COM_CheckParm("-sndbits")) != 0) shm->format.width = atoi(com_argv[i+1]) / 8; @@ -111,6 +112,7 @@ qboolean SNDDMA_Init(void) s = getenv("QUAKE_SOUND_SPEED"); if (s) shm->format.speed = atoi(s); +// COMMANDLINEOPTION: -sndspeed chooses 44100 hz, 22100 hz, or 11025 hz sound output rate else if ((i = COM_CheckParm("-sndspeed")) != 0) shm->format.speed = atoi(com_argv[i+1]); else @@ -125,8 +127,10 @@ qboolean SNDDMA_Init(void) s = getenv("QUAKE_SOUND_CHANNELS"); if (s) shm->format.channels = atoi(s); +// COMMANDLINEOPTION: -sndmono sets sound output to mono else if ((i = COM_CheckParm("-sndmono")) != 0) shm->format.channels = 1; +// COMMANDLINEOPTION: -sndstereo sets sound output to stereo else if ((i = COM_CheckParm("-sndstereo")) != 0) shm->format.channels = 2; else diff --git a/snd_sdl.c b/snd_sdl.c index 45b359ac..b673dfa9 100644 --- a/snd_sdl.c +++ b/snd_sdl.c @@ -96,6 +96,7 @@ qboolean SNDDMA_Init(void) shm->format.channels = 2; //stereo shm->format.width = 2; +// COMMANDLINEOPTION: -sndspeed chooses 44100 hz, 22100 hz, or 11025 hz sound output rate i = COM_CheckParm( "-sndspeed" ); if( i && i != ( com_argc - 1 ) ) shm->format.speed = atoi( com_argv[ i+1 ] ); diff --git a/snd_win.c b/snd_win.c index 0fec464b..eebbe61e 100644 --- a/snd_win.c +++ b/snd_win.c @@ -196,7 +196,8 @@ sndinitstat SNDDMA_InitDirect (void) memset((void *)shm, 0, sizeof(*shm)); shm->format.channels = 2; shm->format.width = 2; - i = COM_CheckParm ("-sndspeed"); // LordHavoc: -sndspeed option +// COMMANDLINEOPTION: -sndspeed chooses 44100 hz, 22100 hz, or 11025 hz sound output rate + i = COM_CheckParm ("-sndspeed"); if (i && i != (com_argc - 1)) shm->format.speed = atoi(com_argv[i+1]); else @@ -282,6 +283,7 @@ sndinitstat SNDDMA_InitDirect (void) dsbcaps.dwSize = sizeof(dsbcaps); primary_format_set = false; +// COMMANDLINEOPTION: -snoforceformat uses the format that DirectSound returns, rather than forcing it (DirectSound sound driver) if (!COM_CheckParm ("-snoforceformat")) { if (DS_OK == pDS->lpVtbl->CreateSoundBuffer(pDS, &dsbuf, &pDSPBuf, NULL)) @@ -303,6 +305,7 @@ sndinitstat SNDDMA_InitDirect (void) } } +// COMMANDLINEOPTION: -primarysound locks the sound hardware for exclusive use (DirectSound sound driver) if (!primary_format_set || !COM_CheckParm ("-primarysound")) { // create the secondary buffer we'll actually work with @@ -428,6 +431,7 @@ qboolean SNDDMA_InitWav (void) memset((void *)shm, 0, sizeof(*shm)); shm->format.channels = 2; shm->format.width = 2; +// COMMANDLINEOPTION: -sndspeed chooses 44100 hz, 22100 hz, or 11025 hz sound output rate i = COM_CheckParm ("-sndspeed"); // LordHavoc: -sndspeed option if (i && i != (com_argc - 1)) shm->format.speed = atoi(com_argv[i+1]); @@ -554,6 +558,7 @@ qboolean SNDDMA_Init(void) { sndinitstat stat; +// COMMANDLINEOPTION: -wavonly uses wave sound instead of DirectSound (wave sound driver) if (COM_CheckParm ("-wavonly")) wavonly = true; diff --git a/sys_shared.c b/sys_shared.c index dfd9a7a3..37c48306 100644 --- a/sys_shared.c +++ b/sys_shared.c @@ -123,6 +123,7 @@ void Sys_Shared_EarlyInit(void) #endif snprintf (engineversion, sizeof (engineversion), "%s %s %s", gamename, os, buildstring); +// COMMANDLINEOPTION: -nostdout disables text output to the terminal the game was launched from if (COM_CheckParm("-nostdout")) sys_nostdout = 1; else diff --git a/sys_win.c b/sys_win.c index e261d04d..d5298cc2 100644 --- a/sys_win.c +++ b/sys_win.c @@ -404,18 +404,21 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin houtput = GetStdHandle (STD_OUTPUT_HANDLE); // give QHOST a chance to hook into the console +// COMMANDLINEOPTION: -HFILE is used by QHOST to hook into the windows dedicated server console window if ((t = COM_CheckParm ("-HFILE")) > 0) { if (t < com_argc) hFile = (HANDLE)atoi (com_argv[t+1]); } +// COMMANDLINEOPTION: -HPARENT is used by QHOST to hook into the windows dedicated server console window if ((t = COM_CheckParm ("-HPARENT")) > 0) { if (t < com_argc) heventParent = (HANDLE)atoi (com_argv[t+1]); } +// COMMANDLINEOPTION: -HCHILD is used by QHOST to hook into the windows dedicated server console window if ((t = COM_CheckParm ("-HCHILD")) > 0) { if (t < com_argc) diff --git a/vid_glx.c b/vid_glx.c index c08247c0..4a95aa1f 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -653,6 +653,7 @@ void VID_Init(void) Cvar_RegisterVariable (&vid_dga_mouseaccel); #endif InitSig(); // trap evil signals +// COMMANDLINEOPTION: -nomouse disables mouse support (see also vid_mouse cvar) if (COM_CheckParm ("-nomouse") || COM_CheckParm("-safe")) mouse_avail = false; } @@ -690,6 +691,7 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp) #else drivername = "libGL.so.1"; #endif +// COMMANDLINEOPTION: -gl_driver selects a GL driver library, default is libGL.so.1 (Linux/BSD) or opengl32.dll (windows) or /usr/X11R6/lib/libGL.1.dylib (MacOSX), if you don't know what this is for, you don't need it i = COM_CheckParm("-gl_driver"); if (i && i < com_argc - 1) drivername = com_argv[i + 1]; @@ -846,7 +848,9 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp) gl_videosyncavailable = false; +// COMMANDLINEOPTION: -nogetprocaddress disables GLX_ARB_get_proc_address (not required, more formal method of getting extension functions) GL_CheckExtension("GLX_ARB_get_proc_address", getprocaddressfuncs, "-nogetprocaddress", false); +// COMMANDLINEOPTION: -novideosync disables GLX_SGI_video_sync (required for video sync control on GLX) gl_videosyncavailable = GL_CheckExtension("GLX_SGI_video_sync", videosyncfuncs, "-novideosync", false); usingmouse = false; diff --git a/vid_sdl.c b/vid_sdl.c index b4765400..4749302a 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -386,6 +386,7 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp) drivername = "libGL.so.1"; #endif +// COMMANDLINEOPTION: -gl_driver selects a GL driver library, default is libGL.so.1 (Linux/BSD) or opengl32.dll (windows) or /usr/X11R6/lib/libGL.1.dylib (MacOSX), if you don't know what this is for, you don't need it i = COM_CheckParm("-gl_driver"); if (i && i < com_argc - 1) drivername = com_argv[i + 1]; diff --git a/vid_shared.c b/vid_shared.c index 8da4fcca..38750d35 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -630,33 +630,48 @@ void VID_CheckExtensions(void) Con_DPrint("Checking OpenGL extensions...\n"); +// COMMANDLINEOPTION: -nodrawrangeelements disables GL_EXT_draw_range_elements (renders faster) if (!GL_CheckExtension("glDrawRangeElements", drawrangeelementsfuncs, "-nodrawrangeelements", true)) GL_CheckExtension("GL_EXT_draw_range_elements", drawrangeelementsextfuncs, "-nodrawrangeelements", false); +// COMMANDLINEOPTION: -nomtex disables GL_ARB_multitexture (required for faster map rendering) if (GL_CheckExtension("GL_ARB_multitexture", multitexturefuncs, "-nomtex", false)) { qglGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_textureunits); +// COMMANDLINEOPTION: -nocombine disables GL_ARB_texture_env_combine or GL_EXT_texture_env_combine (required for bumpmapping and faster map rendering) gl_combine_extension = GL_CheckExtension("GL_ARB_texture_env_combine", NULL, "-nocombine", false) || GL_CheckExtension("GL_EXT_texture_env_combine", NULL, "-nocombine", false); +// COMMANDLINEOPTION: -nodot3 disables GL_ARB_texture_env_dot3 (required for bumpmapping) if (gl_combine_extension) gl_dot3arb = GL_CheckExtension("GL_ARB_texture_env_dot3", NULL, "-nodot3", false); } +// COMMANDLINEOPTION: -notexture3d disables GL_EXT_texture3D (required for spherical lights, otherwise they render as a column) gl_texture3d = GL_CheckExtension("GL_EXT_texture3D", texture3dextfuncs, "-notexture3d", false); +// COMMANDLINEOPTION: -nocubemap disables GL_ARB_texture_cube_map (required for bumpmapping) gl_texturecubemap = GL_CheckExtension("GL_ARB_texture_cube_map", NULL, "-nocubemap", false); +// COMMANDLINEOPTION: -nocva disables GL_EXT_compiled_vertex_array (renders faster) gl_supportslockarrays = GL_CheckExtension("GL_EXT_compiled_vertex_array", compiledvertexarrayfuncs, "-nocva", false); +// COMMANDLINEOPTION: -noedgeclamp disables GL_EXT_texture_edge_clamp or GL_SGIS_texture_edge_clamp (recommended, some cards do not support the other texture clamp method) gl_support_clamptoedge = GL_CheckExtension("GL_EXT_texture_edge_clamp", NULL, "-noedgeclamp", false) || GL_CheckExtension("GL_SGIS_texture_edge_clamp", NULL, "-noedgeclamp", false); +// COMMANDLINEOPTION: -noanisotropy disables GL_EXT_texture_filter_anisotropic (allows higher quality texturing) if ((gl_support_anisotropy = GL_CheckExtension("GL_EXT_texture_filter_anisotropic", NULL, "-noanisotropy", false))) qglGetIntegerv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &gl_max_anisotropy); +// COMMANDLINEOPTION: -notextureshader disables GL_NV_texture_shader (required for the Geforce3 water shader, NVIDIA only) gl_textureshader = GL_CheckExtension("GL_NV_texture_shader", NULL, "-notextureshader", false); +// COMMANDLINEOPTION: -nostenciltwoside disables GL_EXT_stencil_two_side (accelerates shadow rendering) gl_support_stenciltwoside = GL_CheckExtension("GL_EXT_stencil_two_side", stenciltwosidefuncs, "-nostenciltwoside", false); // we don't care if it's an extension or not, they are identical functions, so keep it simple in the rendering code if (qglDrawRangeElements == NULL) qglDrawRangeElements = qglDrawRangeElementsEXT; +// COMMANDLINEOPTION: -noshaderobjects disables GL_ARB_shader_objects (required for vertex shader and fragment shader) +// COMMANDLINEOPTION: -noshadinglanguage100 disables GL_ARB_shading_language_100 (required for vertex shader and fragment shader) +// COMMANDLINEOPTION: -novertexshader disables GL_ARB_vertex_shader (currently unused, allows vertex shader effects) +// COMMANDLINEOPTION: -nofragmentshader disables GL_ARB_fragment_shader (currently unused, allows pixel shader effects) if ((gl_support_shader_objects = GL_CheckExtension("GL_ARB_shader_objects", shaderobjectsfuncs, "-noshaderobjects", false))) if ((gl_support_shading_language_100 = GL_CheckExtension("GL_ARB_shading_language_100", NULL, "-noshadinglanguage100", false))) if ((gl_support_vertex_shader = GL_CheckExtension("GL_ARB_vertex_shader", vertexshaderfuncs, "-novertexshader", false))) @@ -1018,14 +1033,18 @@ void VID_Open(void) { // interpret command-line parameters vid_commandlinecheck = false; +// COMMANDLINEOPTION: -window performs +vid_fullscreen 0 if (COM_CheckParm("-window") || COM_CheckParm("-safe")) Cvar_SetValueQuick(&vid_fullscreen, false); +// COMMANDLINEOPTION: -fullscreen performs +vid_fullscreen 1 if (COM_CheckParm("-fullscreen")) Cvar_SetValueQuick(&vid_fullscreen, true); width = 0; height = 0; +// COMMANDLINEOPTION: -width performs +vid_width and also +vid_height if only -width is specified (example: -width 1024 sets 1024x768 mode) if ((i = COM_CheckParm("-width")) != 0) width = atoi(com_argv[i+1]); +// COMMANDLINEOPTION: -height performs +vid_height and also +vid_width if only -height is specified (example: -height 768 sets 1024x768 mode) if ((i = COM_CheckParm("-height")) != 0) height = atoi(com_argv[i+1]); if (width == 0) @@ -1036,6 +1055,7 @@ void VID_Open(void) Cvar_SetValueQuick(&vid_width, width); if (height) Cvar_SetValueQuick(&vid_height, height); +// COMMANDLINEOPTION: -bpp performs +vid_bitsperpixel (example -bpp 32 or -bpp 16) if ((i = COM_CheckParm("-bpp")) != 0) Cvar_SetQuick(&vid_bitsperpixel, com_argv[i+1]); } diff --git a/vid_wgl.c b/vid_wgl.c index 5b5cfd8b..7b64cd0e 100644 --- a/vid_wgl.c +++ b/vid_wgl.c @@ -811,6 +811,7 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp) } gldrivername = "opengl32.dll"; +// COMMANDLINEOPTION: -gl_driver selects a GL driver library, default is libGL.so.1 (Linux/BSD) or opengl32.dll (windows) or /usr/X11R6/lib/libGL.1.dylib (MacOSX), if you don't know what this is for, you don't need it i = COM_CheckParm("-gl_driver"); if (i && i < com_argc - 1) gldrivername = com_argv[i + 1]; @@ -991,6 +992,7 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp) if (qwglGetExtensionsStringARB) gl_platformextensions = qwglGetExtensionsStringARB(hdc); +// COMMANDLINEOPTION: -novideosync disables WGL_EXT_swap_control (required for video sync control on WGL) gl_videosyncavailable = GL_CheckExtension("WGL_EXT_swap_control", wglswapintervalfuncs, "-novideosync", false); ReleaseDC(mainwindow, hdc); @@ -1264,11 +1266,13 @@ IN_StartupMouse */ void IN_StartupMouse (void) { +// COMMANDLINEOPTION: -nomouse disables mouse support (see also vid_mouse cvar) if (COM_CheckParm ("-nomouse") || COM_CheckParm("-safe")) return; mouseinitialized = true; +// COMMANDLINEOPTION: -dinput uses DirectInput for mouse/joystick input, may be more precise or responsive, but probably not (windows only) if (COM_CheckParm ("-dinput")) { dinput = IN_InitDInput (); @@ -1289,15 +1293,18 @@ void IN_StartupMouse (void) if (mouseparmsvalid) { +// COMMANDLINEOPTION: -noforcemspd disables setting of mouse speed (ignored with -dinput, windows only) if ( COM_CheckParm ("-noforcemspd") ) newmouseparms[2] = originalmouseparms[2]; +// COMMANDLINEOPTION: -noforcemaccel disables setting of mouse acceleration (ignored with -dinput, windows only) if ( COM_CheckParm ("-noforcemaccel") ) { newmouseparms[0] = originalmouseparms[0]; newmouseparms[1] = originalmouseparms[1]; } +// COMMANDLINEOPTION: -noforcemparms disables setting of mouse parameters (ignored with -dinput, windows only) if ( COM_CheckParm ("-noforcemparms") ) { newmouseparms[0] = originalmouseparms[0]; @@ -1531,6 +1538,7 @@ void IN_StartupJoystick (void) joy_avail = false; // abort startup if user requests no joystick +// COMMANDLINEOPTION: -nojoy disables joystick support, may be a small speed increase if (COM_CheckParm ("-nojoy") || COM_CheckParm("-safe")) return; -- 2.39.2