added support for some bindlist.lst file giving available menu binds, to make it a little easier to change those.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4650 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2014-05-07 20:25:08 +00:00
parent d8704bb5e0
commit 88994352f8
1 changed files with 17 additions and 5 deletions

View File

@ -3,6 +3,7 @@
#include "quakedef.h" #include "quakedef.h"
#include "winquake.h" #include "winquake.h"
extern qboolean forcesaveprompt; extern qboolean forcesaveprompt;
extern cvar_t pr_debugger;
menu_t *M_Options_Title(int *y, int infosize) menu_t *M_Options_Title(int *y, int infosize)
{ {
@ -110,6 +111,10 @@ void M_Menu_Options_f (void)
#endif #endif
#ifndef MINIMAL #ifndef MINIMAL
MB_CONSOLECMD("Particle Options", "menu_particles\n", "Set particle effect options."), MB_CONSOLECMD("Particle Options", "menu_particles\n", "Set particle effect options."),
#endif
#ifdef TEXTEDITOR
//this option is a bit strange in q2.
MB_CHECKBOXCVAR("QC Debugger", pr_debugger, 0),
#endif #endif
// removed downloads (is this still appropriate?) // removed downloads (is this still appropriate?)
// removed teamplay // removed teamplay
@ -660,7 +665,7 @@ void M_Menu_Preset_f (void)
MB_TEXT("^Ue080^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue082", false), MB_TEXT("^Ue080^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue081^Ue082", false),
MB_CONSOLECMD("286 (untextured)", "fps_preset 286;menupop\n", "Lacks textures, particles, pretty much everything."), MB_CONSOLECMD("286 (untextured)", "fps_preset 286;menupop\n", "Lacks textures, particles, pretty much everything."),
MB_CONSOLECMD("fast (deathmatch)", "fps_preset fast;menupop\n", "Fullscreen effects off to give consistant framerates"), MB_CONSOLECMD("fast (deathmatch)", "fps_preset fast;menupop\n", "Fullscreen effects off to give consistant framerates"),
MB_CONSOLECMD("normal (faithful)", "fps_preset normal;menupop\n", "This is for Quake purists!"), MB_CONSOLECMD("normal (faithful)", "fps_preset normal;menupop\n", "This is for purists!"),
MB_CONSOLECMD("nice (dynamic)", "fps_preset nice;menupop\n", "For people who like nice things, but still want to actually play"), MB_CONSOLECMD("nice (dynamic)", "fps_preset nice;menupop\n", "For people who like nice things, but still want to actually play"),
MB_CONSOLECMD("realtime (all on)", "fps_preset realtime;menupop\n", "For people who value pretty over fast/smooth. Not viable for deathmatch."), MB_CONSOLECMD("realtime (all on)", "fps_preset realtime;menupop\n", "For people who value pretty over fast/smooth. Not viable for deathmatch."),
MB_END() MB_END()
@ -674,6 +679,7 @@ void M_Menu_Preset_f (void)
void FPS_Preset_f (void) void FPS_Preset_f (void)
{ {
char *presetfname;
char *arg = Cmd_Argv(1); char *arg = Cmd_Argv(1);
int i; int i;
@ -683,6 +689,15 @@ void FPS_Preset_f (void)
return; return;
} }
presetfname = va("configs/preset_%s.cfg", arg);
if (COM_FCheckExists(presetfname))
{
char buffer[MAX_OSPATH];
COM_QuotedString(presetfname, buffer, sizeof(buffer));
Cbuf_AddText(va("\nexec %s\n", buffer), RESTRICT_LOCAL);
return;
}
for (i = 0; i < PRESET_NUM; i++) for (i = 0; i < PRESET_NUM; i++)
{ {
if (!stricmp(presetname[i], arg)) if (!stricmp(presetname[i], arg))
@ -1381,9 +1396,6 @@ void M_Menu_Singleplayer_Cheats_Quake (void)
extern cvar_t sv_gravity, sv_cheats, sv_maxspeed, skill; extern cvar_t sv_gravity, sv_cheats, sv_maxspeed, skill;
extern cvar_t host_mapname; extern cvar_t host_mapname;
#endif #endif
#ifdef TEXTEDITOR
extern cvar_t debugger;
#endif
int y; int y;
menu_t *menu = M_Options_Title(&y, sizeof(*info)); menu_t *menu = M_Options_Title(&y, sizeof(*info));
info = menu->data; info = menu->data;
@ -1410,7 +1422,7 @@ void M_Menu_Singleplayer_Cheats_Quake (void)
MC_AddCheckBox(menu, 16, 170, y, "Cheats", &sv_cheats,0); y+=8; MC_AddCheckBox(menu, 16, 170, y, "Cheats", &sv_cheats,0); y+=8;
#endif #endif
#ifdef TEXTEDITOR #ifdef TEXTEDITOR
MC_AddCheckBox(menu, 16, 170, y, "Debugger", &debugger, 0); y+=8; MC_AddCheckBox(menu, 16, 170, y, "Debugger", &pr_debugger, 0); y+=8;
#endif #endif
MC_AddConsoleCommand(menu, 16, 170, y, " Toggle Godmode", "god\n"); y+=8; MC_AddConsoleCommand(menu, 16, 170, y, " Toggle Godmode", "god\n"); y+=8;
MC_AddConsoleCommand(menu, 16, 170, y, " Toggle Flymode", "fly\n"); y+=8; MC_AddConsoleCommand(menu, 16, 170, y, " Toggle Flymode", "fly\n"); y+=8;