Merge pull request #48 from petr666/feature/menu-update

More menu updates
This commit is contained in:
Simon 2022-04-05 00:02:29 +01:00 committed by GitHub
commit 239a348c68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 156 additions and 1674 deletions

View file

@ -2594,7 +2594,6 @@ Q3UIOBJ_ = \
$(B)/$(BASEGAME)/ui/ui_team.o \ $(B)/$(BASEGAME)/ui/ui_team.o \
$(B)/$(BASEGAME)/ui/ui_teamorders.o \ $(B)/$(BASEGAME)/ui/ui_teamorders.o \
$(B)/$(BASEGAME)/ui/ui_video.o \ $(B)/$(BASEGAME)/ui/ui_video.o \
$(B)/$(BASEGAME)/ui/ui_vr.o \
$(B)/$(BASEGAME)/ui/ui_controls3.o \ $(B)/$(BASEGAME)/ui/ui_controls3.o \
$(B)/$(BASEGAME)/ui/ui_comfort.o \ $(B)/$(BASEGAME)/ui/ui_comfort.o \
\ \

View file

@ -405,12 +405,6 @@ extern void PlayerSettings_Cache( void );
extern void UI_PreferencesMenu( void ); extern void UI_PreferencesMenu( void );
extern void Preferences_Cache( void ); extern void Preferences_Cache( void );
//
// ui_vr.c
//
extern void UI_VRMenu( void );
extern void VR_Cache( void );
// //
// ui_controls3.c // ui_controls3.c
// //

View file

@ -41,22 +41,18 @@ GAME OPTIONS MENU
#define ID_CROSSHAIR 127 #define ID_CROSSHAIR 127
#define ID_SIMPLEITEMS 128 #define ID_SIMPLEITEMS 128
#define ID_HIGHQUALITYSKY 129 #define ID_EJECTINGBRASS 129
#define ID_EJECTINGBRASS 130 #define ID_WALLMARKS 130
#define ID_WALLMARKS 131 #define ID_IDENTIFYTARGET 131
#define ID_DYNAMICLIGHTS 132 #define ID_FORCEMODEL 132
#define ID_IDENTIFYTARGET 133 #define ID_DRAWTEAMOVERLAY 133
#define ID_SYNCEVERYFRAME 134 #define ID_LASERSIGHT 134
#define ID_FORCEMODEL 135 #define ID_DRAWHUD 135
#define ID_DRAWTEAMOVERLAY 136 #define ID_HOLSTER2D 136
#define ID_ALLOWDOWNLOAD 137 #define ID_GORE 137
#define ID_LASERSIGHT 138 #define ID_SHOWINHAND 138
#define ID_DRAWHUD 139 #define ID_SELECTORWITHHUD 139
#define ID_HOLSTER2D 140 #define ID_BACK 140
#define ID_GORE 141
#define ID_SHOWINHAND 142
#define ID_SELECTORWITHHUD 143
#define ID_BACK 144
#define NUM_CROSSHAIRS 10 #define NUM_CROSSHAIRS 10
#define NUM_GORE 4 #define NUM_GORE 4
@ -74,14 +70,10 @@ typedef struct {
menuradiobutton_s simpleitems; menuradiobutton_s simpleitems;
menuradiobutton_s brass; menuradiobutton_s brass;
menuradiobutton_s wallmarks; menuradiobutton_s wallmarks;
menuradiobutton_s dynamiclights;
menuradiobutton_s identifytarget; menuradiobutton_s identifytarget;
menuradiobutton_s highqualitysky;
menuradiobutton_s synceveryframe;
menuradiobutton_s forcemodel; menuradiobutton_s forcemodel;
menulist_s drawteamoverlay; menulist_s drawteamoverlay;
menulist_s drawhud; menulist_s drawhud;
menuradiobutton_s allowdownload;
menuradiobutton_s holster2d; menuradiobutton_s holster2d;
menulist_s gore; menulist_s gore;
menuradiobutton_s showinhand; menuradiobutton_s showinhand;
@ -95,18 +87,18 @@ static preferences_t s_preferences;
static const char *hud_names[] = static const char *hud_names[] =
{ {
"off", "Off",
"floating", "Floating",
"static (performance)", "Simple",
NULL NULL
}; };
static const char *teamoverlay_names[] = static const char *teamoverlay_names[] =
{ {
"off", "Off",
"upper right", "Upper Right",
"lower right", "Lower Right",
"lower left", "Lower Left",
NULL NULL
}; };
@ -126,13 +118,9 @@ static void Preferences_SetMenuItems( void ) {
s_preferences.brass.curvalue = trap_Cvar_VariableValue( "cg_brassTime" ) != 0; s_preferences.brass.curvalue = trap_Cvar_VariableValue( "cg_brassTime" ) != 0;
s_preferences.wallmarks.curvalue = trap_Cvar_VariableValue( "cg_marks" ) != 0; s_preferences.wallmarks.curvalue = trap_Cvar_VariableValue( "cg_marks" ) != 0;
s_preferences.identifytarget.curvalue = trap_Cvar_VariableValue( "cg_drawCrosshairNames" ) != 0; s_preferences.identifytarget.curvalue = trap_Cvar_VariableValue( "cg_drawCrosshairNames" ) != 0;
// s_preferences.dynamiclights.curvalue = trap_Cvar_VariableValue( "r_dynamiclight" ) != 0;
s_preferences.highqualitysky.curvalue = trap_Cvar_VariableValue ( "r_fastsky" ) == 0;
// s_preferences.synceveryframe.curvalue = trap_Cvar_VariableValue( "r_finish" ) != 0;
s_preferences.forcemodel.curvalue = trap_Cvar_VariableValue( "cg_forcemodel" ) != 0; s_preferences.forcemodel.curvalue = trap_Cvar_VariableValue( "cg_forcemodel" ) != 0;
s_preferences.drawteamoverlay.curvalue = Com_Clamp( 0, 3, trap_Cvar_VariableValue( "cg_drawTeamOverlay" ) ); s_preferences.drawteamoverlay.curvalue = Com_Clamp( 0, 3, trap_Cvar_VariableValue( "cg_drawTeamOverlay" ) );
s_preferences.drawhud.curvalue = trap_Cvar_VariableValue( "vr_hudDrawStatus" ); s_preferences.drawhud.curvalue = trap_Cvar_VariableValue( "vr_hudDrawStatus" );
// s_preferences.allowdownload.curvalue = trap_Cvar_VariableValue( "cl_allowDownload" ) != 0;
s_preferences.holster2d.curvalue = trap_Cvar_VariableValue( "cg_weaponSelectorSimple2DIcons" ) != 0; s_preferences.holster2d.curvalue = trap_Cvar_VariableValue( "cg_weaponSelectorSimple2DIcons" ) != 0;
s_preferences.gore.curvalue = trap_Cvar_VariableValue( "vr_goreLevel" ); s_preferences.gore.curvalue = trap_Cvar_VariableValue( "vr_goreLevel" );
s_preferences.showinhand.curvalue = trap_Cvar_VariableValue( "vr_showItemInHand" ) != 0; s_preferences.showinhand.curvalue = trap_Cvar_VariableValue( "vr_showItemInHand" ) != 0;
@ -154,10 +142,6 @@ static void Preferences_Event( void* ptr, int notification ) {
trap_Cvar_SetValue( "cg_simpleItems", s_preferences.simpleitems.curvalue ); trap_Cvar_SetValue( "cg_simpleItems", s_preferences.simpleitems.curvalue );
break; break;
case ID_HIGHQUALITYSKY:
trap_Cvar_SetValue( "r_fastsky", !s_preferences.highqualitysky.curvalue );
break;
case ID_EJECTINGBRASS: case ID_EJECTINGBRASS:
if ( s_preferences.brass.curvalue ) if ( s_preferences.brass.curvalue )
trap_Cvar_Reset( "cg_brassTime" ); trap_Cvar_Reset( "cg_brassTime" );
@ -169,18 +153,10 @@ static void Preferences_Event( void* ptr, int notification ) {
trap_Cvar_SetValue( "cg_marks", s_preferences.wallmarks.curvalue ); trap_Cvar_SetValue( "cg_marks", s_preferences.wallmarks.curvalue );
break; break;
case ID_DYNAMICLIGHTS:
trap_Cvar_SetValue( "r_dynamiclight", s_preferences.dynamiclights.curvalue );
break;
case ID_IDENTIFYTARGET: case ID_IDENTIFYTARGET:
trap_Cvar_SetValue( "cg_drawCrosshairNames", s_preferences.identifytarget.curvalue ); trap_Cvar_SetValue( "cg_drawCrosshairNames", s_preferences.identifytarget.curvalue );
break; break;
case ID_SYNCEVERYFRAME:
trap_Cvar_SetValue( "r_finish", s_preferences.synceveryframe.curvalue );
break;
case ID_FORCEMODEL: case ID_FORCEMODEL:
trap_Cvar_SetValue( "cg_forcemodel", s_preferences.forcemodel.curvalue ); trap_Cvar_SetValue( "cg_forcemodel", s_preferences.forcemodel.curvalue );
break; break;
@ -189,11 +165,6 @@ static void Preferences_Event( void* ptr, int notification ) {
trap_Cvar_SetValue( "cg_drawTeamOverlay", s_preferences.drawteamoverlay.curvalue ); trap_Cvar_SetValue( "cg_drawTeamOverlay", s_preferences.drawteamoverlay.curvalue );
break; break;
case ID_ALLOWDOWNLOAD:
trap_Cvar_SetValue( "cl_allowDownload", s_preferences.allowdownload.curvalue );
trap_Cvar_SetValue( "sv_allowDownload", s_preferences.allowdownload.curvalue );
break;
case ID_LASERSIGHT: case ID_LASERSIGHT:
trap_Cvar_SetValue( "vr_lasersight", s_preferences.lasersight.curvalue); trap_Cvar_SetValue( "vr_lasersight", s_preferences.lasersight.curvalue);
break; break;
@ -330,7 +301,7 @@ static void Preferences_MenuInit( void ) {
s_preferences.framer.width = 256; s_preferences.framer.width = 256;
s_preferences.framer.height = 334; s_preferences.framer.height = 334;
y = 92; y = 110;
s_preferences.crosshair.generic.type = MTYPE_SPINCONTROL; s_preferences.crosshair.generic.type = MTYPE_SPINCONTROL;
s_preferences.crosshair.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT|QMF_NODEFAULTINIT|QMF_OWNERDRAW; s_preferences.crosshair.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT|QMF_NODEFAULTINIT|QMF_OWNERDRAW;
s_preferences.crosshair.generic.x = PREFERENCES_X_POS; s_preferences.crosshair.generic.x = PREFERENCES_X_POS;
@ -399,15 +370,6 @@ static void Preferences_MenuInit( void ) {
s_preferences.brass.generic.x = PREFERENCES_X_POS; s_preferences.brass.generic.x = PREFERENCES_X_POS;
s_preferences.brass.generic.y = y; s_preferences.brass.generic.y = y;
// y += BIGCHAR_HEIGHT+2;
// s_preferences.dynamiclights.generic.type = MTYPE_RADIOBUTTON;
// s_preferences.dynamiclights.generic.name = "Dynamic Lights:";
// s_preferences.dynamiclights.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_preferences.dynamiclights.generic.callback = Preferences_Event;
// s_preferences.dynamiclights.generic.id = ID_DYNAMICLIGHTS;
// s_preferences.dynamiclights.generic.x = PREFERENCES_X_POS;
// s_preferences.dynamiclights.generic.y = y;
y += BIGCHAR_HEIGHT+2; y += BIGCHAR_HEIGHT+2;
s_preferences.identifytarget.generic.type = MTYPE_RADIOBUTTON; s_preferences.identifytarget.generic.type = MTYPE_RADIOBUTTON;
s_preferences.identifytarget.generic.name = "Identify Target:"; s_preferences.identifytarget.generic.name = "Identify Target:";
@ -417,24 +379,6 @@ static void Preferences_MenuInit( void ) {
s_preferences.identifytarget.generic.x = PREFERENCES_X_POS; s_preferences.identifytarget.generic.x = PREFERENCES_X_POS;
s_preferences.identifytarget.generic.y = y; s_preferences.identifytarget.generic.y = y;
y += BIGCHAR_HEIGHT+2;
s_preferences.highqualitysky.generic.type = MTYPE_RADIOBUTTON;
s_preferences.highqualitysky.generic.name = "High Quality Sky:";
s_preferences.highqualitysky.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_preferences.highqualitysky.generic.callback = Preferences_Event;
s_preferences.highqualitysky.generic.id = ID_HIGHQUALITYSKY;
s_preferences.highqualitysky.generic.x = PREFERENCES_X_POS;
s_preferences.highqualitysky.generic.y = y;
// y += BIGCHAR_HEIGHT+2;
// s_preferences.synceveryframe.generic.type = MTYPE_RADIOBUTTON;
// s_preferences.synceveryframe.generic.name = "Sync Every Frame:";
// s_preferences.synceveryframe.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_preferences.synceveryframe.generic.callback = Preferences_Event;
// s_preferences.synceveryframe.generic.id = ID_SYNCEVERYFRAME;
// s_preferences.synceveryframe.generic.x = PREFERENCES_X_POS;
// s_preferences.synceveryframe.generic.y = y;
y += BIGCHAR_HEIGHT+2; y += BIGCHAR_HEIGHT+2;
s_preferences.forcemodel.generic.type = MTYPE_RADIOBUTTON; s_preferences.forcemodel.generic.type = MTYPE_RADIOBUTTON;
s_preferences.forcemodel.generic.name = "Force Player Models:"; s_preferences.forcemodel.generic.name = "Force Player Models:";
@ -473,15 +417,6 @@ static void Preferences_MenuInit( void ) {
s_preferences.selectorwithhud.generic.x = PREFERENCES_X_POS; s_preferences.selectorwithhud.generic.x = PREFERENCES_X_POS;
s_preferences.selectorwithhud.generic.y = y; s_preferences.selectorwithhud.generic.y = y;
// y += BIGCHAR_HEIGHT+2;
// s_preferences.allowdownload.generic.type = MTYPE_RADIOBUTTON;
// s_preferences.allowdownload.generic.name = "Automatic Downloading:";
// s_preferences.allowdownload.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_preferences.allowdownload.generic.callback = Preferences_Event;
// s_preferences.allowdownload.generic.id = ID_ALLOWDOWNLOAD;
// s_preferences.allowdownload.generic.x = PREFERENCES_X_POS;
// s_preferences.allowdownload.generic.y = y;
y += BIGCHAR_HEIGHT+16; y += BIGCHAR_HEIGHT+16;
s_preferences.gore.generic.type = MTYPE_SPINCONTROL; s_preferences.gore.generic.type = MTYPE_SPINCONTROL;
s_preferences.gore.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_preferences.gore.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
@ -513,15 +448,11 @@ static void Preferences_MenuInit( void ) {
Menu_AddItem( &s_preferences.menu, &s_preferences.simpleitems ); Menu_AddItem( &s_preferences.menu, &s_preferences.simpleitems );
Menu_AddItem( &s_preferences.menu, &s_preferences.wallmarks ); Menu_AddItem( &s_preferences.menu, &s_preferences.wallmarks );
Menu_AddItem( &s_preferences.menu, &s_preferences.brass ); Menu_AddItem( &s_preferences.menu, &s_preferences.brass );
// Menu_AddItem( &s_preferences.menu, &s_preferences.dynamiclights );
Menu_AddItem( &s_preferences.menu, &s_preferences.identifytarget ); Menu_AddItem( &s_preferences.menu, &s_preferences.identifytarget );
Menu_AddItem( &s_preferences.menu, &s_preferences.highqualitysky );
// Menu_AddItem( &s_preferences.menu, &s_preferences.synceveryframe );
Menu_AddItem( &s_preferences.menu, &s_preferences.forcemodel ); Menu_AddItem( &s_preferences.menu, &s_preferences.forcemodel );
Menu_AddItem( &s_preferences.menu, &s_preferences.drawteamoverlay ); Menu_AddItem( &s_preferences.menu, &s_preferences.drawteamoverlay );
Menu_AddItem( &s_preferences.menu, &s_preferences.drawhud ); Menu_AddItem( &s_preferences.menu, &s_preferences.drawhud );
Menu_AddItem( &s_preferences.menu, &s_preferences.holster2d ); Menu_AddItem( &s_preferences.menu, &s_preferences.holster2d );
// Menu_AddItem( &s_preferences.menu, &s_preferences.allowdownload );
Menu_AddItem( &s_preferences.menu, &s_preferences.gore ); Menu_AddItem( &s_preferences.menu, &s_preferences.gore );
Menu_AddItem( &s_preferences.menu, &s_preferences.showinhand ); Menu_AddItem( &s_preferences.menu, &s_preferences.showinhand );
Menu_AddItem( &s_preferences.menu, &s_preferences.selectorwithhud ); Menu_AddItem( &s_preferences.menu, &s_preferences.selectorwithhud );

View file

@ -44,12 +44,11 @@ SETUP MENU
#define ID_COMFORT 12 #define ID_COMFORT 12
#define ID_GAME 13 #define ID_GAME 13
#define ID_SYSTEMCONFIG 14 #define ID_SYSTEMCONFIG 14
#define ID_VR 15 #define ID_CDKEY 15
#define ID_CDKEY 16 #define ID_LOAD 16
#define ID_LOAD 17 #define ID_SAVE 17
#define ID_SAVE 18 #define ID_DEFAULTS 18
#define ID_DEFAULTS 19 #define ID_BACK 19
#define ID_BACK 20
typedef struct { typedef struct {
@ -63,7 +62,6 @@ typedef struct {
menutext_s comfort; menutext_s comfort;
menutext_s game; menutext_s game;
menutext_s setupsystem; menutext_s setupsystem;
// menutext_s vr;
// menutext_s cdkey; // menutext_s cdkey;
// menutext_s load; // menutext_s load;
// menutext_s save; // menutext_s save;
@ -131,10 +129,6 @@ static void UI_SetupMenu_Event( void *ptr, int event ) {
UI_GraphicsOptionsMenu(); UI_GraphicsOptionsMenu();
break; break;
// case ID_VR:
// UI_VRMenu();
// break;
// case ID_CDKEY: // case ID_CDKEY:
// UI_CDKeyMenu(); // UI_CDKeyMenu();
// break; // break;

View file

@ -239,21 +239,16 @@ GRAPHICS OPTIONS MENU
#define GRAPHICSOPTIONS_ACCEPT1 "menu/art/accept_1" #define GRAPHICSOPTIONS_ACCEPT1 "menu/art/accept_1"
#define ID_BACK2 101 #define ID_BACK2 101
#define ID_FULLSCREEN 102 #define ID_DRIVERINFO 102
#define ID_LIST 103 #define ID_GRAPHICS 103
#define ID_MODE 104 #define ID_SOUND 104
#define ID_DRIVERINFO 105 #define ID_NETWORK 105
#define ID_GRAPHICS 106 #define ID_REFRESHRATE 106
#define ID_DISPLAY 107 #define ID_RAILGUN 107
#define ID_SOUND 108 #define ID_SHADOWS 108
#define ID_NETWORK 109 #define ID_PLAYERSHADOW 109
#define ID_RATIO 110 #define ID_GAMMA 110
#define ID_REFRESHRATE 111 #define ID_HIGHQUALITYSKY 111
#define ID_DYNAMICLIGHTS 112
#define ID_RAILGUN 113
#define ID_SHADOWS 114
#define ID_PLAYERSHADOW 115
#define ID_GAMMA 116
#define NUM_REFRESHRATE 4 #define NUM_REFRESHRATE 4
#define NUM_SHADOWS 3 #define NUM_SHADOWS 3
@ -271,25 +266,16 @@ typedef struct {
menutext_s sound; menutext_s sound;
menutext_s network; menutext_s network;
menulist_s list;
menulist_s ratio;
menulist_s mode;
menulist_s driver;
menuslider_s tq; menuslider_s tq;
menulist_s fs;
menulist_s lighting; menulist_s lighting;
menulist_s allow_extensions;
menulist_s texturebits;
menulist_s colordepth;
menulist_s geometry; menulist_s geometry;
menulist_s filter;
menutext_s driverinfo; menutext_s driverinfo;
menulist_s refreshrate; menulist_s refreshrate;
menuradiobutton_s dynamiclights;
menulist_s railgun; menulist_s railgun;
menulist_s shadows; menulist_s shadows;
menulist_s playershadow; menulist_s playershadow;
menuslider_s gamma; menuslider_s gamma;
menuradiobutton_s highqualitysky;
menubitmap_s apply; menubitmap_s apply;
menubitmap_s back; menubitmap_s back;
@ -297,192 +283,19 @@ typedef struct {
typedef struct typedef struct
{ {
int mode;
qboolean fullscreen;
int tq; int tq;
int lighting; int lighting;
int colordepth;
int texturebits;
int geometry; int geometry;
int filter;
int driver;
qboolean extensions;
int refreshrate; int refreshrate;
qboolean dynamiclights;
int railgun; int railgun;
int shadows; int shadows;
int playershadow; int playershadow;
float gamma; float gamma;
int highqualitysky;
} InitialVideoOptions_s; } InitialVideoOptions_s;
static InitialVideoOptions_s s_ivo; static InitialVideoOptions_s s_ivo;
static graphicsoptions_t s_graphicsoptions; static graphicsoptions_t s_graphicsoptions;
static InitialVideoOptions_s s_ivo_templates[] =
{
{
6, qtrue, 3, 0, 2, 2, 2, 1, 0, qtrue
},
{
4, qtrue, 2, 0, 2, 2, 1, 1, 0, qtrue // JDC: this was tq 3
},
{
3, qtrue, 2, 0, 0, 0, 1, 0, 0, qtrue
},
{
2, qtrue, 1, 0, 1, 0, 0, 0, 0, qtrue
},
{
2, qtrue, 1, 1, 1, 0, 0, 0, 0, qtrue
},
{
3, qtrue, 1, 0, 0, 0, 1, 0, 0, qtrue
}
};
#define NUM_IVO_TEMPLATES ( ARRAY_LEN( s_ivo_templates ) )
static const char *builtinResolutions[ ] =
{
"320x240",
"400x300",
"512x384",
"640x480",
"800x600",
"960x720",
"1024x768",
"1152x864",
"1280x1024",
"1600x1200",
"2048x1536",
"856x480",
NULL
};
static const char *knownRatios[ ][2] =
{
{ "1.25:1", "5:4" },
{ "1.33:1", "4:3" },
{ "1.50:1", "3:2" },
{ "1.56:1", "14:9" },
{ "1.60:1", "16:10" },
{ "1.67:1", "5:3" },
{ "1.78:1", "16:9" },
{ NULL , NULL }
};
#define MAX_RESOLUTIONS 32
static const char* ratios[ MAX_RESOLUTIONS ];
static char ratioBuf[ MAX_RESOLUTIONS ][ 8 ];
static int ratioToRes[ MAX_RESOLUTIONS ];
static int resToRatio[ MAX_RESOLUTIONS ];
static char resbuf[ MAX_STRING_CHARS ];
static const char* detectedResolutions[ MAX_RESOLUTIONS ];
static char currentResolution[ 20 ];
static const char** resolutions = builtinResolutions;
static qboolean resolutionsDetected = qfalse;
/*
=================
GraphicsOptions_FindBuiltinResolution
=================
*/
// static int GraphicsOptions_FindBuiltinResolution( int mode )
// {
// int i;
//
// if( !resolutionsDetected )
// return mode;
//
// if( mode < 0 )
// return -1;
//
// for( i = 0; builtinResolutions[ i ]; i++ )
// {
// if( !Q_stricmp( builtinResolutions[ i ], detectedResolutions[ mode ] ) )
// return i;
// }
//
// return -1;
// }
/*
=================
GraphicsOptions_FindDetectedResolution
=================
*/
// static int GraphicsOptions_FindDetectedResolution( int mode )
// {
// int i;
//
// if( !resolutionsDetected )
// return mode;
//
// if( mode < 0 )
// return -1;
//
// for( i = 0; detectedResolutions[ i ]; i++ )
// {
// if( !Q_stricmp( builtinResolutions[ mode ], detectedResolutions[ i ] ) )
// return i;
// }
//
// return -1;
// }
/*
=================
GraphicsOptions_GetAspectRatios
=================
*/
// static void GraphicsOptions_GetAspectRatios( void )
// {
// int i, r;
//
// // build ratio list from resolutions
// for( r = 0; resolutions[r]; r++ )
// {
// int w, h;
// char *x;
// char str[ sizeof(ratioBuf[0]) ];
//
// // calculate resolution's aspect ratio
// x = strchr( resolutions[r], 'x' ) + 1;
// Q_strncpyz( str, resolutions[r], x-resolutions[r] );
// w = atoi( str );
// h = atoi( x );
// Com_sprintf( str, sizeof(str), "%.2f:1", (float)w / (float)h );
//
// // rename common ratios ("1.33:1" -> "4:3")
// for( i = 0; knownRatios[i][0]; i++ ) {
// if( !Q_stricmp( str, knownRatios[i][0] ) ) {
// Q_strncpyz( str, knownRatios[i][1], sizeof( str ) );
// break;
// }
// }
//
// // add ratio to list if it is new
// // establish res/ratio relationship
// for( i = 0; ratioBuf[i][0]; i++ )
// {
// if( !Q_stricmp( str, ratioBuf[i] ) )
// break;
// }
// if( !ratioBuf[i][0] )
// {
// Q_strncpyz( ratioBuf[i], str, sizeof(ratioBuf[i]) );
// ratioToRes[i] = r;
// }
//
// ratios[r] = ratioBuf[r];
// resToRatio[r] = i;
// }
//
// ratios[r] = NULL;
// }
/* /*
================= =================
@ -491,105 +304,17 @@ GraphicsOptions_GetInitialVideo
*/ */
static void GraphicsOptions_GetInitialVideo( void ) static void GraphicsOptions_GetInitialVideo( void )
{ {
// s_ivo.colordepth = s_graphicsoptions.colordepth.curvalue;
// s_ivo.driver = s_graphicsoptions.driver.curvalue;
// s_ivo.mode = s_graphicsoptions.mode.curvalue;
// s_ivo.fullscreen = s_graphicsoptions.fs.curvalue;
// s_ivo.extensions = s_graphicsoptions.allow_extensions.curvalue;
s_ivo.tq = s_graphicsoptions.tq.curvalue; s_ivo.tq = s_graphicsoptions.tq.curvalue;
s_ivo.lighting = s_graphicsoptions.lighting.curvalue; s_ivo.lighting = s_graphicsoptions.lighting.curvalue;
s_ivo.geometry = s_graphicsoptions.geometry.curvalue; s_ivo.geometry = s_graphicsoptions.geometry.curvalue;
// s_ivo.filter = s_graphicsoptions.filter.curvalue;
// s_ivo.texturebits = s_graphicsoptions.texturebits.curvalue;
s_ivo.refreshrate = s_graphicsoptions.refreshrate.curvalue; s_ivo.refreshrate = s_graphicsoptions.refreshrate.curvalue;
s_ivo.dynamiclights = s_graphicsoptions.dynamiclights.curvalue;
s_ivo.railgun = s_graphicsoptions.railgun.curvalue; s_ivo.railgun = s_graphicsoptions.railgun.curvalue;
s_ivo.shadows = s_graphicsoptions.refreshrate.curvalue; s_ivo.shadows = s_graphicsoptions.refreshrate.curvalue;
s_ivo.playershadow = s_graphicsoptions.playershadow.curvalue; s_ivo.playershadow = s_graphicsoptions.playershadow.curvalue;
s_ivo.gamma = s_graphicsoptions.gamma.curvalue; s_ivo.gamma = s_graphicsoptions.gamma.curvalue;
s_ivo.highqualitysky = s_graphicsoptions.highqualitysky.curvalue;
} }
/*
=================
GraphicsOptions_GetResolutions
=================
*/
// static void GraphicsOptions_GetResolutions( void )
// {
// trap_Cvar_VariableStringBuffer("r_availableModes", resbuf, sizeof(resbuf));
// if(*resbuf)
// {
// char* s = resbuf;
// unsigned int i = 0;
// while( s && i < ARRAY_LEN(detectedResolutions)-1 )
// {
// detectedResolutions[i++] = s;
// s = strchr(s, ' ');
// if( s )
// *s++ = '\0';
// }
// detectedResolutions[ i ] = NULL;
//
// // add custom resolution if not in mode list
// if ( i < ARRAY_LEN(detectedResolutions)-1 )
// {
// Com_sprintf( currentResolution, sizeof ( currentResolution ), "%dx%d", uis.glconfig.vidWidth, uis.glconfig.vidHeight );
//
// for( i = 0; detectedResolutions[ i ]; i++ )
// {
// if ( strcmp( detectedResolutions[ i ], currentResolution ) == 0 )
// break;
// }
//
// if ( detectedResolutions[ i ] == NULL )
// {
// detectedResolutions[ i++ ] = currentResolution;
// detectedResolutions[ i ] = NULL;
// }
// }
//
// resolutions = detectedResolutions;
// resolutionsDetected = qtrue;
// }
// }
/*
=================
GraphicsOptions_CheckConfig
=================
*/
// static void GraphicsOptions_CheckConfig( void )
// {
// int i;
//
// for ( i = 0; i < NUM_IVO_TEMPLATES-1; i++ )
// {
// if ( s_ivo_templates[i].colordepth != s_graphicsoptions.colordepth.curvalue )
// continue;
// if ( s_ivo_templates[i].driver != s_graphicsoptions.driver.curvalue )
// continue;
// if ( GraphicsOptions_FindDetectedResolution(s_ivo_templates[i].mode) != s_graphicsoptions.mode.curvalue )
// continue;
// if ( s_ivo_templates[i].fullscreen != s_graphicsoptions.fs.curvalue )
// continue;
// if ( s_ivo_templates[i].tq != s_graphicsoptions.tq.curvalue )
// continue;
// if ( s_ivo_templates[i].lighting != s_graphicsoptions.lighting.curvalue )
// continue;
// if ( s_ivo_templates[i].geometry != s_graphicsoptions.geometry.curvalue )
// continue;
// if ( s_ivo_templates[i].filter != s_graphicsoptions.filter.curvalue )
// continue;
// if ( s_ivo_templates[i].texturebits != s_graphicsoptions.texturebits.curvalue )
// continue;
// s_graphicsoptions.list.curvalue = i;
// return;
// }
//
// // return 'Custom' ivo template
// s_graphicsoptions.list.curvalue = NUM_IVO_TEMPLATES - 1;
// }
/* /*
================= =================
GraphicsOptions_UpdateMenuItems GraphicsOptions_UpdateMenuItems
@ -597,49 +322,8 @@ GraphicsOptions_UpdateMenuItems
*/ */
static void GraphicsOptions_UpdateMenuItems( void ) static void GraphicsOptions_UpdateMenuItems( void )
{ {
// if ( s_graphicsoptions.driver.curvalue == 1 )
// {
// s_graphicsoptions.fs.curvalue = 1;
// s_graphicsoptions.fs.generic.flags |= QMF_GRAYED;
// s_graphicsoptions.colordepth.curvalue = 1;
// }
// else
// {
// s_graphicsoptions.fs.generic.flags &= ~QMF_GRAYED;
// }
// if ( s_graphicsoptions.fs.curvalue == 0 || s_graphicsoptions.driver.curvalue == 1 )
// {
// s_graphicsoptions.colordepth.curvalue = 0;
// s_graphicsoptions.colordepth.generic.flags |= QMF_GRAYED;
// }
// else
// {
// s_graphicsoptions.colordepth.generic.flags &= ~QMF_GRAYED;
// }
// if ( s_graphicsoptions.allow_extensions.curvalue == 0 )
// {
// if ( s_graphicsoptions.texturebits.curvalue == 0 )
// {
// s_graphicsoptions.texturebits.curvalue = 1;
// }
// }
s_graphicsoptions.apply.generic.flags |= QMF_HIDDEN|QMF_INACTIVE; s_graphicsoptions.apply.generic.flags |= QMF_HIDDEN|QMF_INACTIVE;
// if ( s_ivo.mode != s_graphicsoptions.mode.curvalue )
// {
// s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE);
// }
// if ( s_ivo.fullscreen != s_graphicsoptions.fs.curvalue )
// {
// s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE);
// }
// if ( s_ivo.extensions != s_graphicsoptions.allow_extensions.curvalue )
// {
// s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE);
// }
if ( s_ivo.tq != s_graphicsoptions.tq.curvalue ) if ( s_ivo.tq != s_graphicsoptions.tq.curvalue )
{ {
s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE);
@ -648,32 +332,14 @@ static void GraphicsOptions_UpdateMenuItems( void )
{ {
s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE);
} }
// if ( s_ivo.colordepth != s_graphicsoptions.colordepth.curvalue )
// {
// s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE);
// }
// if ( s_ivo.driver != s_graphicsoptions.driver.curvalue )
// {
// s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE);
// }
// if ( s_ivo.texturebits != s_graphicsoptions.texturebits.curvalue )
// {
// s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE);
// }
if ( s_ivo.geometry != s_graphicsoptions.geometry.curvalue ) if ( s_ivo.geometry != s_graphicsoptions.geometry.curvalue )
{ {
s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE);
} }
// if ( s_ivo.filter != s_graphicsoptions.filter.curvalue )
// {
// s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE);
// }
if ( s_ivo.gamma != s_graphicsoptions.gamma.curvalue ) if ( s_ivo.gamma != s_graphicsoptions.gamma.curvalue )
{ {
s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE); s_graphicsoptions.apply.generic.flags &= ~(QMF_HIDDEN|QMF_INACTIVE);
} }
// GraphicsOptions_CheckConfig();
} }
/* /*
@ -686,68 +352,7 @@ static void GraphicsOptions_ApplyChanges( void *unused, int notification )
if (notification != QM_ACTIVATED) if (notification != QM_ACTIVATED)
return; return;
switch ( s_graphicsoptions.texturebits.curvalue )
{
case 0:
trap_Cvar_SetValue( "r_texturebits", 0 );
break;
case 1:
trap_Cvar_SetValue( "r_texturebits", 16 );
break;
case 2:
trap_Cvar_SetValue( "r_texturebits", 32 );
break;
}
trap_Cvar_SetValue( "r_picmip", 3 - s_graphicsoptions.tq.curvalue ); trap_Cvar_SetValue( "r_picmip", 3 - s_graphicsoptions.tq.curvalue );
// trap_Cvar_SetValue( "r_allowExtensions", s_graphicsoptions.allow_extensions.curvalue );
// if( resolutionsDetected )
// {
// // search for builtin mode that matches the detected mode
// int mode;
// if ( s_graphicsoptions.mode.curvalue == -1
// || s_graphicsoptions.mode.curvalue >= ARRAY_LEN( detectedResolutions ) )
// s_graphicsoptions.mode.curvalue = 0;
//
// mode = GraphicsOptions_FindBuiltinResolution( s_graphicsoptions.mode.curvalue );
// if( mode == -1 )
// {
// char w[ 16 ], h[ 16 ];
// Q_strncpyz( w, detectedResolutions[ s_graphicsoptions.mode.curvalue ], sizeof( w ) );
// *strchr( w, 'x' ) = 0;
// Q_strncpyz( h,
// strchr( detectedResolutions[ s_graphicsoptions.mode.curvalue ], 'x' ) + 1, sizeof( h ) );
// trap_Cvar_Set( "r_customwidth", w );
// trap_Cvar_Set( "r_customheight", h );
// }
//
// trap_Cvar_SetValue( "r_mode", mode );
// }
// else
// trap_Cvar_SetValue( "r_mode", s_graphicsoptions.mode.curvalue );
// trap_Cvar_SetValue( "r_fullscreen", s_graphicsoptions.fs.curvalue );
switch ( s_graphicsoptions.colordepth.curvalue )
{
case 0:
trap_Cvar_SetValue( "r_colorbits", 0 );
trap_Cvar_SetValue( "r_depthbits", 0 );
trap_Cvar_Reset( "r_stencilbits" );
break;
case 1:
trap_Cvar_SetValue( "r_colorbits", 16 );
trap_Cvar_SetValue( "r_depthbits", 16 );
trap_Cvar_SetValue( "r_stencilbits", 0 );
break;
case 2:
trap_Cvar_SetValue( "r_colorbits", 32 );
trap_Cvar_SetValue( "r_depthbits", 24 );
trap_Cvar_SetValue( "r_stencilbits", 8 );
break;
}
trap_Cvar_SetValue( "r_vertexLight", s_graphicsoptions.lighting.curvalue ); trap_Cvar_SetValue( "r_vertexLight", s_graphicsoptions.lighting.curvalue );
if ( s_graphicsoptions.geometry.curvalue == 2 ) if ( s_graphicsoptions.geometry.curvalue == 2 )
@ -766,15 +371,6 @@ static void GraphicsOptions_ApplyChanges( void *unused, int notification )
trap_Cvar_SetValue( "r_subdivisions", 80 ); trap_Cvar_SetValue( "r_subdivisions", 80 );
} }
if ( s_graphicsoptions.filter.curvalue )
{
trap_Cvar_Set( "r_textureMode", "GL_LINEAR_MIPMAP_LINEAR" );
}
else
{
trap_Cvar_Set( "r_textureMode", "GL_LINEAR_MIPMAP_NEAREST" );
}
trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart\n" ); trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart\n" );
} }
@ -784,30 +380,11 @@ GraphicsOptions_Event
================= =================
*/ */
static void GraphicsOptions_Event( void* ptr, int event ) { static void GraphicsOptions_Event( void* ptr, int event ) {
InitialVideoOptions_s *ivo;
if( event != QM_ACTIVATED ) { if( event != QM_ACTIVATED ) {
return; return;
} }
switch( ((menucommon_s*)ptr)->id ) { switch( ((menucommon_s*)ptr)->id ) {
case ID_RATIO:
s_graphicsoptions.mode.curvalue =
ratioToRes[ s_graphicsoptions.ratio.curvalue ];
// fall through to apply mode constraints
case ID_MODE:
// clamp 3dfx video modes
if ( s_graphicsoptions.driver.curvalue == 1 )
{
if ( s_graphicsoptions.mode.curvalue < 2 )
s_graphicsoptions.mode.curvalue = 2;
else if ( s_graphicsoptions.mode.curvalue > 6 )
s_graphicsoptions.mode.curvalue = 6;
}
s_graphicsoptions.ratio.curvalue =
resToRatio[ s_graphicsoptions.mode.curvalue ];
break;
case ID_REFRESHRATE: { case ID_REFRESHRATE: {
int refresh; int refresh;
@ -829,10 +406,6 @@ static void GraphicsOptions_Event( void* ptr, int event ) {
} }
break; break;
case ID_DYNAMICLIGHTS:
trap_Cvar_SetValue( "r_dynamiclight", s_graphicsoptions.dynamiclights.curvalue );
break;
case ID_RAILGUN: case ID_RAILGUN:
trap_Cvar_SetValue( "cg_oldRail", s_graphicsoptions.railgun.curvalue ); trap_Cvar_SetValue( "cg_oldRail", s_graphicsoptions.railgun.curvalue );
break; break;
@ -875,21 +448,9 @@ static void GraphicsOptions_Event( void* ptr, int event ) {
trap_Cvar_SetValue( "r_gamma", s_graphicsoptions.gamma.curvalue ); trap_Cvar_SetValue( "r_gamma", s_graphicsoptions.gamma.curvalue );
break; break;
// case ID_LIST: case ID_HIGHQUALITYSKY:
// ivo = &s_ivo_templates[s_graphicsoptions.list.curvalue]; trap_Cvar_SetValue( "r_fastsky", !s_graphicsoptions.highqualitysky.curvalue );
// break;
// s_graphicsoptions.mode.curvalue = GraphicsOptions_FindDetectedResolution(ivo->mode);
// s_graphicsoptions.ratio.curvalue =
// resToRatio[ s_graphicsoptions.mode.curvalue ];
// s_graphicsoptions.tq.curvalue = ivo->tq;
// s_graphicsoptions.lighting.curvalue = ivo->lighting;
// s_graphicsoptions.colordepth.curvalue = ivo->colordepth;
// s_graphicsoptions.texturebits.curvalue = ivo->texturebits;
// s_graphicsoptions.geometry.curvalue = ivo->geometry;
// s_graphicsoptions.filter.curvalue = ivo->filter;
// s_graphicsoptions.fs.curvalue = ivo->fullscreen;
// s_graphicsoptions.refreshrate.curvalue = ivo->refreshrate;
// break;
case ID_DRIVERINFO: case ID_DRIVERINFO:
UI_DriverInfo_Menu(); UI_DriverInfo_Menu();
@ -902,11 +463,6 @@ static void GraphicsOptions_Event( void* ptr, int event ) {
case ID_GRAPHICS: case ID_GRAPHICS:
break; break;
// case ID_DISPLAY:
// UI_PopMenu();
// UI_DisplayOptionsMenu();
// break;
case ID_SOUND: case ID_SOUND:
UI_PopMenu(); UI_PopMenu();
UI_SoundOptionsMenu(); UI_SoundOptionsMenu();
@ -953,40 +509,6 @@ GraphicsOptions_SetMenuItems
*/ */
static void GraphicsOptions_SetMenuItems( void ) static void GraphicsOptions_SetMenuItems( void )
{ {
// s_graphicsoptions.mode.curvalue =
// GraphicsOptions_FindDetectedResolution( trap_Cvar_VariableValue( "r_mode" ) );
//
// if ( s_graphicsoptions.mode.curvalue < 0 )
// {
// if( resolutionsDetected )
// {
// int i;
// char buf[MAX_STRING_CHARS];
// trap_Cvar_VariableStringBuffer("r_customwidth", buf, sizeof(buf)-2);
// buf[strlen(buf)+1] = 0;
// buf[strlen(buf)] = 'x';
// trap_Cvar_VariableStringBuffer("r_customheight", buf+strlen(buf), sizeof(buf)-strlen(buf));
//
// for(i = 0; detectedResolutions[i]; ++i)
// {
// if(!Q_stricmp(buf, detectedResolutions[i]))
// {
// s_graphicsoptions.mode.curvalue = i;
// break;
// }
// }
// if ( s_graphicsoptions.mode.curvalue < 0 )
// s_graphicsoptions.mode.curvalue = 0;
// }
// else
// {
// s_graphicsoptions.mode.curvalue = 3;
// }
// }
// s_graphicsoptions.ratio.curvalue =
// resToRatio[ s_graphicsoptions.mode.curvalue ];
// s_graphicsoptions.fs.curvalue = trap_Cvar_VariableValue("r_fullscreen");
// s_graphicsoptions.allow_extensions.curvalue = trap_Cvar_VariableValue("r_allowExtensions");
s_graphicsoptions.tq.curvalue = 3-trap_Cvar_VariableValue( "r_picmip"); s_graphicsoptions.tq.curvalue = 3-trap_Cvar_VariableValue( "r_picmip");
if ( s_graphicsoptions.tq.curvalue < 0 ) if ( s_graphicsoptions.tq.curvalue < 0 )
{ {
@ -997,30 +519,6 @@ static void GraphicsOptions_SetMenuItems( void )
s_graphicsoptions.tq.curvalue = 3; s_graphicsoptions.tq.curvalue = 3;
} }
s_graphicsoptions.lighting.curvalue = trap_Cvar_VariableValue( "r_vertexLight" ) != 0;
switch ( ( int ) trap_Cvar_VariableValue( "r_texturebits" ) )
{
default:
case 0:
s_graphicsoptions.texturebits.curvalue = 0;
break;
case 16:
s_graphicsoptions.texturebits.curvalue = 1;
break;
case 32:
s_graphicsoptions.texturebits.curvalue = 2;
break;
}
if ( !Q_stricmp( UI_Cvar_VariableString( "r_textureMode" ), "GL_LINEAR_MIPMAP_NEAREST" ) )
{
s_graphicsoptions.filter.curvalue = 0;
}
else
{
s_graphicsoptions.filter.curvalue = 1;
}
int lodbias = trap_Cvar_VariableValue( "r_lodBias" ); int lodbias = trap_Cvar_VariableValue( "r_lodBias" );
if (lodbias == -1) { if (lodbias == -1) {
s_graphicsoptions.geometry.curvalue = 2; s_graphicsoptions.geometry.curvalue = 2;
@ -1030,29 +528,6 @@ static void GraphicsOptions_SetMenuItems( void )
s_graphicsoptions.geometry.curvalue = 0; s_graphicsoptions.geometry.curvalue = 0;
} }
switch ( ( int ) trap_Cvar_VariableValue( "r_colorbits" ) )
{
default:
case 0:
s_graphicsoptions.colordepth.curvalue = 0;
break;
case 16:
s_graphicsoptions.colordepth.curvalue = 1;
break;
case 32:
s_graphicsoptions.colordepth.curvalue = 2;
break;
}
// if ( s_graphicsoptions.fs.curvalue == 0 )
// {
// s_graphicsoptions.colordepth.curvalue = 0;
//}
//if ( s_graphicsoptions.driver.curvalue == 1 )
//{
// s_graphicsoptions.colordepth.curvalue = 1;
// }
switch ( (int) trap_Cvar_VariableValue( "vr_refreshrate" ) ) switch ( (int) trap_Cvar_VariableValue( "vr_refreshrate" ) )
{ {
case 60: case 60:
@ -1095,9 +570,10 @@ static void GraphicsOptions_SetMenuItems( void )
break; break;
} }
s_graphicsoptions.dynamiclights.curvalue = trap_Cvar_VariableValue( "r_dynamiclight" ) != 0; s_graphicsoptions.lighting.curvalue = trap_Cvar_VariableValue( "r_vertexLight" ) != 0;
s_graphicsoptions.railgun.curvalue = trap_Cvar_VariableValue( "cg_oldRail" ); s_graphicsoptions.railgun.curvalue = trap_Cvar_VariableValue( "cg_oldRail" );
s_graphicsoptions.gamma.curvalue = trap_Cvar_VariableValue( "r_gamma" ); s_graphicsoptions.gamma.curvalue = trap_Cvar_VariableValue( "r_gamma" );
s_graphicsoptions.highqualitysky.curvalue = trap_Cvar_VariableValue( "r_fastsky" ) == 0;
} }
/* /*
@ -1107,53 +583,14 @@ GraphicsOptions_MenuInit
*/ */
void GraphicsOptions_MenuInit( void ) void GraphicsOptions_MenuInit( void )
{ {
/* static const char *s_driver_names[] =
{
"Default",
"Voodoo",
NULL
};
*/
static const char *tq_names[] =
{
"Default",
"16 bit",
"32 bit",
NULL
};
static const char *s_graphics_options_names[] =
{
"Very High Quality",
"High Quality",
"Normal",
"Fast",
"Fastest",
"Custom",
NULL
};
static const char *lighting_names[] = static const char *lighting_names[] =
{ {
"Lightmap", "Lightmap (High)",
"Vertex", "Vertex (Low)",
NULL NULL
}; };
static const char *colordepth_names[] =
{
"Default",
"16 bit",
"32 bit",
NULL
};
static const char *filter_names[] =
{
"Bilinear",
"Trilinear",
NULL
};
static const char *quality_names[] = static const char *quality_names[] =
{ {
"Low", "Low",
@ -1161,13 +598,7 @@ void GraphicsOptions_MenuInit( void )
"High", "High",
NULL NULL
}; };
/* static const char *enabled_names[] =
{
"Off",
"On",
NULL
};
*/
static const char *s_refreshrate[] = static const char *s_refreshrate[] =
{ {
"60", "60",
@ -1176,6 +607,7 @@ void GraphicsOptions_MenuInit( void )
"90", "90",
NULL NULL
}; };
static const char *s_shadows[] = static const char *s_shadows[] =
{ {
"None", "None",
@ -1183,10 +615,11 @@ void GraphicsOptions_MenuInit( void )
"High", "High",
NULL NULL
}; };
static const char *s_railgun[] = static const char *s_railgun[] =
{ {
"High", "Q2 Style",
"Low", "Q3 Style",
NULL NULL
}; };
@ -1194,9 +627,6 @@ void GraphicsOptions_MenuInit( void )
// zero set all our globals // zero set all our globals
memset( &s_graphicsoptions, 0 ,sizeof(graphicsoptions_t) ); memset( &s_graphicsoptions, 0 ,sizeof(graphicsoptions_t) );
//GraphicsOptions_GetResolutions();
//GraphicsOptions_GetAspectRatios();
GraphicsOptions_Cache(); GraphicsOptions_Cache();
@ -1237,16 +667,6 @@ void GraphicsOptions_MenuInit( void )
s_graphicsoptions.graphics.style = UI_RIGHT; s_graphicsoptions.graphics.style = UI_RIGHT;
s_graphicsoptions.graphics.color = color_red; s_graphicsoptions.graphics.color = color_red;
// s_graphicsoptions.display.generic.type = MTYPE_PTEXT;
// s_graphicsoptions.display.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
// s_graphicsoptions.display.generic.id = ID_DISPLAY;
// s_graphicsoptions.display.generic.callback = GraphicsOptions_Event;
// s_graphicsoptions.display.generic.x = 216;
// s_graphicsoptions.display.generic.y = 240 - PROP_HEIGHT;
// s_graphicsoptions.display.string = "DISPLAY";
// s_graphicsoptions.display.style = UI_RIGHT;
// s_graphicsoptions.display.color = color_red;
s_graphicsoptions.sound.generic.type = MTYPE_PTEXT; s_graphicsoptions.sound.generic.type = MTYPE_PTEXT;
s_graphicsoptions.sound.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS; s_graphicsoptions.sound.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
s_graphicsoptions.sound.generic.id = ID_SOUND; s_graphicsoptions.sound.generic.id = ID_SOUND;
@ -1268,54 +688,6 @@ void GraphicsOptions_MenuInit( void )
s_graphicsoptions.network.color = color_red; s_graphicsoptions.network.color = color_red;
y = 254 - 5 * (BIGCHAR_HEIGHT + 2); y = 254 - 5 * (BIGCHAR_HEIGHT + 2);
// s_graphicsoptions.list.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.list.generic.name = "Graphics Settings:";
// s_graphicsoptions.list.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.list.generic.x = 400;
// s_graphicsoptions.list.generic.y = y;
// s_graphicsoptions.list.generic.callback = GraphicsOptions_Event;
// s_graphicsoptions.list.generic.id = ID_LIST;
// s_graphicsoptions.list.itemnames = s_graphics_options_names;
// y += 2 * ( BIGCHAR_HEIGHT + 2 );
// s_graphicsoptions.driver.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.driver.generic.name = "GL Driver:";
// s_graphicsoptions.driver.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.driver.generic.x = 400;
// s_graphicsoptions.driver.generic.y = y;
// s_graphicsoptions.driver.itemnames = s_driver_names;
// s_graphicsoptions.driver.curvalue = (uis.glconfig.driverType == GLDRV_VOODOO);
// y += BIGCHAR_HEIGHT+2;
// // references/modifies "r_allowExtensions"
// s_graphicsoptions.allow_extensions.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.allow_extensions.generic.name = "GL Extensions:";
// s_graphicsoptions.allow_extensions.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.allow_extensions.generic.x = 400;
// s_graphicsoptions.allow_extensions.generic.y = y;
// s_graphicsoptions.allow_extensions.itemnames = enabled_names;
// y += BIGCHAR_HEIGHT+2;
// s_graphicsoptions.ratio.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.ratio.generic.name = "Aspect Ratio:";
// s_graphicsoptions.ratio.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.ratio.generic.x = 400;
// s_graphicsoptions.ratio.generic.y = y;
// s_graphicsoptions.ratio.itemnames = ratios;
// s_graphicsoptions.ratio.generic.callback = GraphicsOptions_Event;
// s_graphicsoptions.ratio.generic.id = ID_RATIO;
// y += BIGCHAR_HEIGHT+2;
// // references/modifies "r_mode"
// s_graphicsoptions.mode.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.mode.generic.name = "Resolution:";
// s_graphicsoptions.mode.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.mode.generic.x = 400;
// s_graphicsoptions.mode.generic.y = y;
// s_graphicsoptions.mode.itemnames = resolutions;
// s_graphicsoptions.mode.generic.callback = GraphicsOptions_Event;
// s_graphicsoptions.mode.generic.id = ID_MODE;
// y += BIGCHAR_HEIGHT+2;
// references "vr_refreshrate" // references "vr_refreshrate"
s_graphicsoptions.refreshrate.generic.type = MTYPE_SPINCONTROL; s_graphicsoptions.refreshrate.generic.type = MTYPE_SPINCONTROL;
@ -1353,24 +725,6 @@ void GraphicsOptions_MenuInit( void )
s_graphicsoptions.railgun.numitems = NUM_RAILGUN; s_graphicsoptions.railgun.numitems = NUM_RAILGUN;
y += BIGCHAR_HEIGHT+2; y += BIGCHAR_HEIGHT+2;
// // references "r_colorbits"
// s_graphicsoptions.colordepth.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.colordepth.generic.name = "Color Depth:";
// s_graphicsoptions.colordepth.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.colordepth.generic.x = 400;
// s_graphicsoptions.colordepth.generic.y = y;
// s_graphicsoptions.colordepth.itemnames = colordepth_names;
// y += BIGCHAR_HEIGHT+2;
// // references/modifies "r_fullscreen"
// s_graphicsoptions.fs.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.fs.generic.name = "Fullscreen:";
// s_graphicsoptions.fs.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.fs.generic.x = 400;
// s_graphicsoptions.fs.generic.y = y;
// s_graphicsoptions.fs.itemnames = enabled_names;
// y += BIGCHAR_HEIGHT+2;
// references/modifies "r_vertexLight" // references/modifies "r_vertexLight"
s_graphicsoptions.lighting.generic.type = MTYPE_SPINCONTROL; s_graphicsoptions.lighting.generic.type = MTYPE_SPINCONTROL;
s_graphicsoptions.lighting.generic.name = "Lighting:"; s_graphicsoptions.lighting.generic.name = "Lighting:";
@ -1380,16 +734,6 @@ void GraphicsOptions_MenuInit( void )
s_graphicsoptions.lighting.itemnames = lighting_names; s_graphicsoptions.lighting.itemnames = lighting_names;
y += BIGCHAR_HEIGHT+2; y += BIGCHAR_HEIGHT+2;
// references/modifies "r_dynamiclight"
s_graphicsoptions.dynamiclights.generic.type = MTYPE_RADIOBUTTON;
s_graphicsoptions.dynamiclights.generic.name = "Dynamic Lights:";
s_graphicsoptions.dynamiclights.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_graphicsoptions.dynamiclights.generic.x = 400;
s_graphicsoptions.dynamiclights.generic.y = y;
s_graphicsoptions.dynamiclights.generic.callback = GraphicsOptions_Event;
s_graphicsoptions.dynamiclights.generic.id = ID_DYNAMICLIGHTS;
y += BIGCHAR_HEIGHT+2;
// references "cg_shadows" // references "cg_shadows"
s_graphicsoptions.shadows.generic.type = MTYPE_SPINCONTROL; s_graphicsoptions.shadows.generic.type = MTYPE_SPINCONTROL;
s_graphicsoptions.shadows.generic.name = "Opponent Shadows:"; s_graphicsoptions.shadows.generic.name = "Opponent Shadows:";
@ -1432,26 +776,18 @@ void GraphicsOptions_MenuInit( void )
s_graphicsoptions.tq.minvalue = 0; s_graphicsoptions.tq.minvalue = 0;
s_graphicsoptions.tq.maxvalue = 3; s_graphicsoptions.tq.maxvalue = 3;
s_graphicsoptions.tq.generic.callback = GraphicsOptions_TQEvent; s_graphicsoptions.tq.generic.callback = GraphicsOptions_TQEvent;
y += BIGCHAR_HEIGHT+2;
// references/modifies "r_fastsky"
s_graphicsoptions.highqualitysky.generic.type = MTYPE_RADIOBUTTON;
s_graphicsoptions.highqualitysky.generic.name = "High Quality Sky:";
s_graphicsoptions.highqualitysky.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_graphicsoptions.highqualitysky.generic.x = 400;
s_graphicsoptions.highqualitysky.generic.y = y;
s_graphicsoptions.highqualitysky.generic.callback = GraphicsOptions_Event;
s_graphicsoptions.highqualitysky.generic.id = ID_HIGHQUALITYSKY;
y += 2*BIGCHAR_HEIGHT; y += 2*BIGCHAR_HEIGHT;
// // references/modifies "r_textureBits"
// s_graphicsoptions.texturebits.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.texturebits.generic.name = "Texture Quality:";
// s_graphicsoptions.texturebits.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.texturebits.generic.x = 400;
// s_graphicsoptions.texturebits.generic.y = y;
// s_graphicsoptions.texturebits.itemnames = tq_names;
// y += BIGCHAR_HEIGHT+2;
// // references/modifies "r_textureMode"
// s_graphicsoptions.filter.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.filter.generic.name = "Texture Filter:";
// s_graphicsoptions.filter.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.filter.generic.x = 400;
// s_graphicsoptions.filter.generic.y = y;
// s_graphicsoptions.filter.itemnames = filter_names;
// y += 2*BIGCHAR_HEIGHT;
s_graphicsoptions.driverinfo.generic.type = MTYPE_PTEXT; s_graphicsoptions.driverinfo.generic.type = MTYPE_PTEXT;
s_graphicsoptions.driverinfo.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS; s_graphicsoptions.driverinfo.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
s_graphicsoptions.driverinfo.generic.callback = GraphicsOptions_Event; s_graphicsoptions.driverinfo.generic.callback = GraphicsOptions_Event;
@ -1488,28 +824,18 @@ void GraphicsOptions_MenuInit( void )
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.framer ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.framer );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.graphics ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.graphics );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.display );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.sound ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.sound );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.network ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.network );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.list );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.driver );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.allow_extensions );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.ratio );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.mode );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.refreshrate ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.refreshrate );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.railgun ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.railgun );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.gamma ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.gamma );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.colordepth );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.fs );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.lighting ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.lighting );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.dynamiclights );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.shadows ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.shadows );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.playershadow ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.playershadow );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.geometry ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.geometry );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.tq ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.tq );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.texturebits ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.highqualitysky );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.filter );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.driverinfo ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.driverinfo );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.back ); Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.back );
@ -1517,12 +843,6 @@ void GraphicsOptions_MenuInit( void )
GraphicsOptions_SetMenuItems(); GraphicsOptions_SetMenuItems();
GraphicsOptions_GetInitialVideo(); GraphicsOptions_GetInitialVideo();
if ( uis.glconfig.driverType == GLDRV_ICD &&
uis.glconfig.hardwareType == GLHW_3DFX_2D3D )
{
s_graphicsoptions.driver.generic.flags |= QMF_HIDDEN|QMF_INACTIVE;
}
} }

View file

@ -1,605 +0,0 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
Quake III Arena source code is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
//
/*
=======================================================================
VR OPTIONS MENU
=======================================================================
*/
#include "ui_local.h"
#define ART_FRAMEL "menu/art/frame2_l"
#define ART_FRAMER "menu/art/frame1_r"
#define ART_BACK0 "menu/art/back_0"
#define ART_BACK1 "menu/art/back_1"
#define VR_X_POS 360
#define ID_HUDDEPTH 127
#define ID_RIGHTHANDED 128
#define ID_AUTOSWITCH 129
#define ID_SNAPTURN 130
#define ID_DIRECTIONMODE 131
#define ID_REFRESHRATE 133
#define ID_WEAPONPITCH 134
#define ID_HEIGHTADJUST 135
#define ID_TWOHANDED 136
#define ID_SCOPE 137
#define ID_DRAWHUD 138
#define ID_ROLLHIT 139
#define ID_HUDYOFFSET 140
#define ID_SENDROLL 141
#define ID_LASERSIGHT 142
#define ID_GORE 143
#define ID_HAPTICINTENSITY 144
#define ID_HOLSTER2D 145
#define ID_BODYSCALE 146
#define ID_BACK 147
#define NUM_HUDDEPTH 6
#define NUM_DIRECTIONMODE 2
#define NUM_REFRESHRATE 4
#define NUM_GORE 4
typedef struct {
menuframework_s menu;
menutext_s banner;
menubitmap_s framel;
menubitmap_s framer;
menuradiobutton_s drawhud;
menulist_s huddepth;
menuradiobutton_s righthanded;
menuradiobutton_s autoswitch;
menulist_s snapturn;
menulist_s directionmode;
menulist_s refreshrate;
menuslider_s weaponpitch;
menuslider_s heightadjust;
menuradiobutton_s twohanded;
menuradiobutton_s scope;
menuradiobutton_s rollhit;
menuslider_s hudyoffset;
menuradiobutton_s sendroll;
menuradiobutton_s lasersight;
menuslider_s hapticintensity;
menuradiobutton_s holster2d;
menuslider_s bodyscale;
menulist_s gore;
menubitmap_s back;
} VR_t;
static VR_t s_VR;
static void VR_SetMenuItems( void ) {
s_VR.drawhud.curvalue = (int)trap_Cvar_VariableValue( "vr_hudDrawStatus" ) % 2;
s_VR.huddepth.curvalue = (int)trap_Cvar_VariableValue( "vr_hudDepth" ) % NUM_HUDDEPTH;
s_VR.righthanded.curvalue = trap_Cvar_VariableValue( "vr_righthanded" ) != 0;
s_VR.autoswitch.curvalue = trap_Cvar_VariableValue( "cg_autoswitch" ) != 0;
s_VR.snapturn.curvalue = (int)trap_Cvar_VariableValue( "vr_snapturn" ) / 45;
s_VR.directionmode.curvalue = (int)trap_Cvar_VariableValue( "vr_directionMode" ) % NUM_DIRECTIONMODE;
int refresh = (int)trap_Cvar_VariableValue( "vr_refreshrate" );
switch (refresh)
{
case 60:
s_VR.refreshrate.curvalue = 0;
break;
case 72:
s_VR.refreshrate.curvalue = 1;
break;
case 80:
s_VR.refreshrate.curvalue = 2;
break;
case 90:
s_VR.refreshrate.curvalue = 3;
break;
}
s_VR.weaponpitch.curvalue = trap_Cvar_VariableValue( "vr_weaponPitch" ) + 25;
s_VR.heightadjust.curvalue = trap_Cvar_VariableValue( "vr_heightAdjust" );
s_VR.twohanded.curvalue = trap_Cvar_VariableValue( "vr_twoHandedWeapons" ) != 0;
s_VR.scope.curvalue = trap_Cvar_VariableValue( "vr_weaponScope" ) != 0;
s_VR.rollhit.curvalue = trap_Cvar_VariableValue( "vr_rollWhenHit" ) != 0;
s_VR.hudyoffset.curvalue = trap_Cvar_VariableValue( "vr_hudYOffset" ) + 200;
s_VR.sendroll.curvalue = trap_Cvar_VariableValue( "vr_sendRollToServer" ) != 0;
s_VR.lasersight.curvalue = trap_Cvar_VariableValue( "vr_lasersight" ) != 0;
s_VR.hapticintensity.curvalue = trap_Cvar_VariableValue( "vr_hapticIntensity" );
s_VR.holster2d.curvalue = trap_Cvar_VariableValue( "cg_weaponSelectorSimple2DIcons" ) != 0;
s_VR.bodyscale.curvalue = trap_Cvar_VariableValue( "cg_firstPersonBodyScale" );
//GORE
{
int level = trap_Cvar_VariableValue( "com_blood" ) +
trap_Cvar_VariableValue( "cg_gibs" ) +
trap_Cvar_VariableValue( "cg_megagibs" );
s_VR.gore.curvalue = level % NUM_GORE;
}
}
static void VR_Event( void* ptr, int notification ) {
if( notification != QM_ACTIVATED ) {
return;
}
switch( ((menucommon_s*)ptr)->id ) {
case ID_HUDDEPTH:
trap_Cvar_SetValue( "vr_hudDepth", s_VR.huddepth.curvalue );
break;
case ID_RIGHTHANDED:
trap_Cvar_SetValue( "vr_righthanded", s_VR.righthanded.curvalue );
break;
case ID_AUTOSWITCH:
trap_Cvar_SetValue( "cg_autoswitch", s_VR.autoswitch.curvalue );
break;
case ID_SNAPTURN:
trap_Cvar_SetValue( "vr_snapturn", s_VR.snapturn.curvalue * 45 );
break;
case ID_DIRECTIONMODE:
trap_Cvar_SetValue( "vr_directionMode", s_VR.directionmode.curvalue );
break;
case ID_REFRESHRATE: {
int refresh;
switch (s_VR.refreshrate.curvalue) {
case 0:
refresh = 60;
break;
case 1:
refresh = 72;
break;
case 2:
refresh = 80;
break;
case 3:
refresh = 90;
break;
}
trap_Cvar_SetValue("vr_refreshrate", refresh);
}
break;
case ID_WEAPONPITCH:
trap_Cvar_SetValue( "vr_weaponPitch", s_VR.weaponpitch.curvalue - 25 );
break;
case ID_HEIGHTADJUST:
trap_Cvar_SetValue( "vr_heightAdjust", s_VR.heightadjust.curvalue );
break;
case ID_TWOHANDED:
trap_Cvar_SetValue( "vr_twoHandedWeapons", s_VR.twohanded.curvalue );
break;
case ID_SCOPE:
trap_Cvar_SetValue( "vr_weaponScope", s_VR.scope.curvalue );
break;
case ID_DRAWHUD:
trap_Cvar_SetValue( "vr_hudDrawStatus", s_VR.drawhud.curvalue );
break;
case ID_ROLLHIT:
trap_Cvar_SetValue( "vr_rollWhenHit", s_VR.rollhit.curvalue );
break;
case ID_HUDYOFFSET:
trap_Cvar_SetValue( "vr_hudYOffset", s_VR.hudyoffset.curvalue - 200);
break;
case ID_SENDROLL:
trap_Cvar_SetValue( "vr_sendRollToServer", s_VR.sendroll.curvalue);
break;
case ID_LASERSIGHT:
trap_Cvar_SetValue( "vr_lasersight", s_VR.lasersight.curvalue);
break;
case ID_HAPTICINTENSITY:
trap_Cvar_SetValue( "vr_hapticIntensity", s_VR.hapticintensity.curvalue);
break;
case ID_HOLSTER2D:
trap_Cvar_SetValue( "cg_weaponSelectorSimple2DIcons", s_VR.holster2d.curvalue);
break;
case ID_BODYSCALE:
trap_Cvar_SetValue( "cg_firstPersonBodyScale", s_VR.bodyscale.curvalue);
break;
case ID_GORE: {
switch ((int)s_VR.gore.curvalue) {
case 0:
trap_Cvar_SetValue( "com_blood", 0);
trap_Cvar_SetValue( "cg_gibs", 0);
trap_Cvar_SetValue( "cg_megagibs", 0);
break;
case 1:
trap_Cvar_SetValue( "com_blood", 1);
trap_Cvar_SetValue( "cg_gibs", 0);
trap_Cvar_SetValue( "cg_megagibs", 0);
break;
case 2:
trap_Cvar_SetValue( "com_blood", 1);
trap_Cvar_SetValue( "cg_gibs", 1);
trap_Cvar_SetValue( "cg_megagibs", 0);
break;
case 3:
trap_Cvar_SetValue( "com_blood", 1);
trap_Cvar_SetValue( "cg_gibs", 1);
trap_Cvar_SetValue( "cg_megagibs", 1);
break;
}
}
break;
case ID_BACK:
UI_PopMenu();
break;
}
}
static void VR_MenuInit( void ) {
int y;
static const char *s_hud_depths[] =
{
"Very Close",
"Close",
"Middle",
"Further",
"Far",
"Distant",
NULL
};
static const char *s_snapturn[] =
{
"Smooth Turning",
"45 Degrees",
"90 Degrees",
NULL
};
static const char *s_directionmode[] =
{
"HMD (Default)",
"Off-hand Controller",
NULL
};
static const char *s_refreshrate[] =
{
"60",
"72 (Default)",
"80",
"90",
NULL
};
static const char *s_gore[] =
{
"None",
"Blood Only",
"Blood & Gibs (Default)",
"Extra Gore (Performance Hit)",
NULL
};
memset( &s_VR, 0 ,sizeof(VR_t) );
VR_Cache();
s_VR.menu.wrapAround = qtrue;
s_VR.menu.fullscreen = qtrue;
s_VR.banner.generic.type = MTYPE_BTEXT;
s_VR.banner.generic.x = 320;
s_VR.banner.generic.y = 16;
s_VR.banner.string = "GAME OPTIONS";
s_VR.banner.color = color_white;
s_VR.banner.style = UI_CENTER;
s_VR.framel.generic.type = MTYPE_BITMAP;
s_VR.framel.generic.name = ART_FRAMEL;
s_VR.framel.generic.flags = QMF_INACTIVE;
s_VR.framel.generic.x = 0;
s_VR.framel.generic.y = 78;
s_VR.framel.width = 256;
s_VR.framel.height = 329;
s_VR.framer.generic.type = MTYPE_BITMAP;
s_VR.framer.generic.name = ART_FRAMER;
s_VR.framer.generic.flags = QMF_INACTIVE;
s_VR.framer.generic.x = 376;
s_VR.framer.generic.y = 76;
s_VR.framer.width = 256;
s_VR.framer.height = 334;
y = 84;
s_VR.drawhud.generic.type = MTYPE_RADIOBUTTON;
s_VR.drawhud.generic.name = "Draw HUD:";
s_VR.drawhud.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.drawhud.generic.callback = VR_Event;
s_VR.drawhud.generic.id = ID_DRAWHUD;
s_VR.drawhud.generic.x = VR_X_POS;
s_VR.drawhud.generic.y = y;
y += BIGCHAR_HEIGHT;
s_VR.huddepth.generic.type = MTYPE_SPINCONTROL;
s_VR.huddepth.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.huddepth.generic.x = VR_X_POS;
s_VR.huddepth.generic.y = y;
s_VR.huddepth.generic.name = "HUD Depth:";
s_VR.huddepth.generic.callback = VR_Event;
s_VR.huddepth.generic.id = ID_HUDDEPTH;
s_VR.huddepth.itemnames = s_hud_depths;
s_VR.huddepth.numitems = NUM_HUDDEPTH;
y += BIGCHAR_HEIGHT;
s_VR.righthanded.generic.type = MTYPE_RADIOBUTTON;
s_VR.righthanded.generic.name = "Right-Handed:";
s_VR.righthanded.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.righthanded.generic.callback = VR_Event;
s_VR.righthanded.generic.id = ID_RIGHTHANDED;
s_VR.righthanded.generic.x = VR_X_POS;
s_VR.righthanded.generic.y = y;
y += BIGCHAR_HEIGHT;
s_VR.autoswitch.generic.type = MTYPE_RADIOBUTTON;
s_VR.autoswitch.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.autoswitch.generic.name = "Autoswitch Weapons:";
s_VR.autoswitch.generic.id = ID_AUTOSWITCH;
s_VR.autoswitch.generic.callback = VR_Event;
s_VR.autoswitch.generic.x = VR_X_POS;
s_VR.autoswitch.generic.y = y;
y += BIGCHAR_HEIGHT;
s_VR.snapturn.generic.type = MTYPE_SPINCONTROL;
s_VR.snapturn.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.snapturn.generic.x = VR_X_POS;
s_VR.snapturn.generic.y = y;
s_VR.snapturn.generic.name = "Turning Mode:";
s_VR.snapturn.generic.callback = VR_Event;
s_VR.snapturn.generic.id = ID_SNAPTURN;
s_VR.snapturn.itemnames = s_snapturn;
s_VR.snapturn.numitems = 3;
y += BIGCHAR_HEIGHT;
s_VR.directionmode.generic.type = MTYPE_SPINCONTROL;
s_VR.directionmode.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.directionmode.generic.x = VR_X_POS;
s_VR.directionmode.generic.y = y;
s_VR.directionmode.generic.name = "Direction Mode:";
s_VR.directionmode.generic.callback = VR_Event;
s_VR.directionmode.generic.id = ID_DIRECTIONMODE;
s_VR.directionmode.itemnames = s_directionmode;
s_VR.directionmode.numitems = NUM_DIRECTIONMODE;
y += BIGCHAR_HEIGHT;
s_VR.refreshrate.generic.type = MTYPE_SPINCONTROL;
s_VR.refreshrate.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.refreshrate.generic.x = VR_X_POS;
s_VR.refreshrate.generic.y = y;
s_VR.refreshrate.generic.name = "Refresh Rate:";
s_VR.refreshrate.generic.callback = VR_Event;
s_VR.refreshrate.generic.id = ID_REFRESHRATE;
s_VR.refreshrate.itemnames = s_refreshrate;
s_VR.refreshrate.numitems = NUM_REFRESHRATE;
y += BIGCHAR_HEIGHT;
s_VR.weaponpitch.generic.type = MTYPE_SLIDER;
s_VR.weaponpitch.generic.x = VR_X_POS;
s_VR.weaponpitch.generic.y = y;
s_VR.weaponpitch.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.weaponpitch.generic.name = "Weapon Pitch:";
s_VR.weaponpitch.generic.id = ID_WEAPONPITCH;
s_VR.weaponpitch.generic.callback = VR_Event;
s_VR.weaponpitch.minvalue = 0;
s_VR.weaponpitch.maxvalue = 30;
y += BIGCHAR_HEIGHT;
s_VR.heightadjust.generic.type = MTYPE_SLIDER;
s_VR.heightadjust.generic.x = VR_X_POS;
s_VR.heightadjust.generic.y = y;
s_VR.heightadjust.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.heightadjust.generic.name = "Height Adjust:";
s_VR.heightadjust.generic.id = ID_HEIGHTADJUST;
s_VR.heightadjust.generic.callback = VR_Event;
s_VR.heightadjust.minvalue = 0.0f;
s_VR.heightadjust.maxvalue = 1.0f;
y += BIGCHAR_HEIGHT;
s_VR.twohanded.generic.type = MTYPE_RADIOBUTTON;
s_VR.twohanded.generic.name = "Two-Handed Weapons:";
s_VR.twohanded.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.twohanded.generic.callback = VR_Event;
s_VR.twohanded.generic.id = ID_TWOHANDED;
s_VR.twohanded.generic.x = VR_X_POS;
s_VR.twohanded.generic.y = y;
y += BIGCHAR_HEIGHT;
s_VR.scope.generic.type = MTYPE_RADIOBUTTON;
s_VR.scope.generic.name = "Railgun Scope:";
s_VR.scope.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.scope.generic.callback = VR_Event;
s_VR.scope.generic.id = ID_SCOPE;
s_VR.scope.generic.x = VR_X_POS;
s_VR.scope.generic.y = y;
y += BIGCHAR_HEIGHT;
s_VR.rollhit.generic.type = MTYPE_RADIOBUTTON;
s_VR.rollhit.generic.name = "Roll when hit:";
s_VR.rollhit.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.rollhit.generic.callback = VR_Event;
s_VR.rollhit.generic.id = ID_ROLLHIT;
s_VR.rollhit.generic.x = VR_X_POS;
s_VR.rollhit.generic.y = y;
y += BIGCHAR_HEIGHT;
s_VR.hudyoffset.generic.type = MTYPE_SLIDER;
s_VR.hudyoffset.generic.x = VR_X_POS;
s_VR.hudyoffset.generic.y = y;
s_VR.hudyoffset.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.hudyoffset.generic.name = "HUD Y Offset:";
s_VR.hudyoffset.generic.id = ID_HUDYOFFSET;
s_VR.hudyoffset.generic.callback = VR_Event;
s_VR.hudyoffset.minvalue = 0;
s_VR.hudyoffset.maxvalue = 400;
y += BIGCHAR_HEIGHT;
s_VR.sendroll.generic.type = MTYPE_RADIOBUTTON;
s_VR.sendroll.generic.name = "Send Roll Angle to Server:";
s_VR.sendroll.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.sendroll.generic.callback = VR_Event;
s_VR.sendroll.generic.id = ID_SENDROLL;
s_VR.sendroll.generic.x = VR_X_POS;
s_VR.sendroll.generic.y = y;
y += BIGCHAR_HEIGHT;
s_VR.lasersight.generic.type = MTYPE_RADIOBUTTON;
s_VR.lasersight.generic.name = "Laser Sight:";
s_VR.lasersight.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.lasersight.generic.callback = VR_Event;
s_VR.lasersight.generic.id = ID_LASERSIGHT;
s_VR.lasersight.generic.x = VR_X_POS;
s_VR.lasersight.generic.y = y;
y += BIGCHAR_HEIGHT;
s_VR.hapticintensity.generic.type = MTYPE_SLIDER;
s_VR.hapticintensity.generic.x = VR_X_POS;
s_VR.hapticintensity.generic.y = y;
s_VR.hapticintensity.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.hapticintensity.generic.name = "Haptic Intensity:";
s_VR.hapticintensity.generic.id = ID_HAPTICINTENSITY;
s_VR.hapticintensity.generic.callback = VR_Event;
s_VR.hapticintensity.minvalue = 0;
s_VR.hapticintensity.maxvalue = 1.0;
y += BIGCHAR_HEIGHT;
s_VR.holster2d.generic.type = MTYPE_RADIOBUTTON;
s_VR.holster2d.generic.name = "Simple Icons on Weapon Selector:";
s_VR.holster2d.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.holster2d.generic.callback = VR_Event;
s_VR.holster2d.generic.id = ID_HOLSTER2D;
s_VR.holster2d.generic.x = VR_X_POS;
s_VR.holster2d.generic.y = y;
y += BIGCHAR_HEIGHT;
s_VR.bodyscale.generic.type = MTYPE_SLIDER;
s_VR.bodyscale.generic.name = "1st-Person Body Scale:";
s_VR.bodyscale.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.bodyscale.generic.callback = VR_Event;
s_VR.bodyscale.generic.id = ID_BODYSCALE;
s_VR.bodyscale.generic.x = VR_X_POS;
s_VR.bodyscale.generic.y = y;
s_VR.bodyscale.minvalue = 0.0f;
s_VR.bodyscale.maxvalue = 1.0f;
y += BIGCHAR_HEIGHT + 10;
s_VR.gore.generic.type = MTYPE_SPINCONTROL;
s_VR.gore.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_VR.gore.generic.x = VR_X_POS - 120;
s_VR.gore.generic.y = y;
s_VR.gore.generic.name = "Gore:";
s_VR.gore.generic.callback = VR_Event;
s_VR.gore.generic.id = ID_GORE;
s_VR.gore.itemnames = s_gore;
s_VR.gore.numitems = NUM_GORE;
s_VR.back.generic.type = MTYPE_BITMAP;
s_VR.back.generic.name = ART_BACK0;
s_VR.back.generic.flags = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS;
s_VR.back.generic.callback = VR_Event;
s_VR.back.generic.id = ID_BACK;
s_VR.back.generic.x = 0;
s_VR.back.generic.y = 480-64;
s_VR.back.width = 128;
s_VR.back.height = 64;
s_VR.back.focuspic = ART_BACK1;
Menu_AddItem( &s_VR.menu, &s_VR.banner );
Menu_AddItem( &s_VR.menu, &s_VR.framel );
Menu_AddItem( &s_VR.menu, &s_VR.framer );
Menu_AddItem( &s_VR.menu, &s_VR.huddepth );
Menu_AddItem( &s_VR.menu, &s_VR.righthanded );
Menu_AddItem( &s_VR.menu, &s_VR.autoswitch );
Menu_AddItem( &s_VR.menu, &s_VR.snapturn );
Menu_AddItem( &s_VR.menu, &s_VR.directionmode );
Menu_AddItem( &s_VR.menu, &s_VR.refreshrate );
Menu_AddItem( &s_VR.menu, &s_VR.weaponpitch );
Menu_AddItem( &s_VR.menu, &s_VR.heightadjust );
Menu_AddItem( &s_VR.menu, &s_VR.twohanded );
Menu_AddItem( &s_VR.menu, &s_VR.scope );
Menu_AddItem( &s_VR.menu, &s_VR.rollhit );
Menu_AddItem( &s_VR.menu, &s_VR.hudyoffset );
Menu_AddItem( &s_VR.menu, &s_VR.sendroll );
Menu_AddItem( &s_VR.menu, &s_VR.lasersight );
Menu_AddItem( &s_VR.menu, &s_VR.holster2d );
Menu_AddItem( &s_VR.menu, &s_VR.hapticintensity );
Menu_AddItem( &s_VR.menu, &s_VR.bodyscale );
Menu_AddItem( &s_VR.menu, &s_VR.gore );
Menu_AddItem( &s_VR.menu, &s_VR.back );
VR_SetMenuItems();
}
/*
===============
VR_Cache
===============
*/
void VR_Cache( void ) {
trap_R_RegisterShaderNoMip( ART_FRAMEL );
trap_R_RegisterShaderNoMip( ART_FRAMER );
trap_R_RegisterShaderNoMip( ART_BACK0 );
trap_R_RegisterShaderNoMip( ART_BACK1 );
}
/*
===============
UI_VRMenu
===============
*/
void UI_VRMenu( void ) {
VR_MenuInit();
UI_PushMenu( &s_VR.menu );
}

View file

@ -3262,6 +3262,15 @@ static void UI_Update(const char *name) {
trap_Cvar_SetValue( "cg_megagibs", 1); trap_Cvar_SetValue( "cg_megagibs", 1);
break; break;
} }
} else if (Q_stricmp(name, "vr_hudDrawStatus") == 0) {
switch (val) {
case 2:
trap_Cvar_SetValue("cg_draw3dIcons", 0);
break;
default:
trap_Cvar_SetValue("cg_draw3dIcons", 1);
break;
}
} }
} }

View file

@ -164,7 +164,7 @@ itemDef {
group grpOptions group grpOptions
text "Crosshair:" text "Crosshair:"
ownerdraw UI_CROSSHAIR ownerdraw UI_CROSSHAIR
rect 193 20 20 17 rect 193 32 20 17
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 0 textalignx 0
textaligny 17 textaligny 17
@ -179,7 +179,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Laser Sight:" text "Laser Sight:"
cvar "vr_lasersight" cvar "vr_lasersight"
rect 50 37 200 20 rect 50 49 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -193,7 +193,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Simple Items (World):" text "Simple Items (World):"
cvar "cg_simpleItems" cvar "cg_simpleItems"
rect 50 54 200 20 rect 50 66 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -208,7 +208,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Simple Items (Weapon Wheel):" text "Simple Items (Weapon Wheel):"
cvar "cg_weaponSelectorSimple2DIcons" cvar "cg_weaponSelectorSimple2DIcons"
rect 50 71 200 20 rect 50 83 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -223,7 +223,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Show Item In Hand:" text "Show Item In Hand:"
cvar "vr_showItemInHand" cvar "vr_showItemInHand"
rect 50 88 200 20 rect 50 100 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -238,7 +238,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Marks On Walls:" text "Marks On Walls:"
cvar "cg_marks" cvar "cg_marks"
rect 50 105 200 20 rect 50 117 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -253,7 +253,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Show Floating Scores:" text "Show Floating Scores:"
cvar "cg_scorePlums" cvar "cg_scorePlums"
rect 50 122 200 20 rect 50 134 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -269,7 +269,7 @@ itemDef {
type ITEM_TYPE_MULTI type ITEM_TYPE_MULTI
cvar "cg_brassTime" cvar "cg_brassTime"
cvarFloatList { "High" 2500 "Med" 1250 "Off" 0 } cvarFloatList { "High" 2500 "Med" 1250 "Off" 0 }
rect 50 139 200 20 rect 50 151 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -284,22 +284,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Identify Target:" text "Identify Target:"
cvar "cg_drawCrosshairNames" cvar "cg_drawCrosshairNames"
rect 50 156 200 20 rect 50 168 200 20
textalign ITEM_ALIGN_RIGHT
textalignx 143
textaligny 17
textscale .25
forecolor 1 1 1 1
visible 1
}
itemDef {
name options
group grpOptions
type ITEM_TYPE_YESNO
text "Low Quality Sky:"
cvar "r_fastsky"
rect 50 173 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -314,7 +299,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Force Player Models:" text "Force Player Models:"
cvar "cg_forceModel" cvar "cg_forceModel"
rect 50 190 200 20 rect 50 185 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -328,7 +313,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Draw Team Overlay:" text "Draw Team Overlay:"
cvar "cg_drawTeamOverlay" cvar "cg_drawTeamOverlay"
rect 50 207 200 20 rect 50 202 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -342,7 +327,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Show Time:" text "Show Time:"
cvar "cg_drawTimer" cvar "cg_drawTimer"
rect 50 224 200 20 rect 50 219 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -356,7 +341,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Taunts Off:" text "Taunts Off:"
cvar "cg_noTaunt" cvar "cg_noTaunt"
rect 50 241 200 20 rect 50 236 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -370,7 +355,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "In Game Video:" text "In Game Video:"
cvar "r_inGameVideo" cvar "r_inGameVideo"
rect 50 258 200 20 rect 50 253 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -385,7 +370,7 @@ itemDef {
text "HUD Type:" text "HUD Type:"
cvar "cg_hudfiles" cvar "cg_hudfiles"
cvarStrList { Normal "ui/hud.txt" Small "ui/hud2.txt" } cvarStrList { Normal "ui/hud.txt" Small "ui/hud2.txt" }
rect 50 275 200 20 rect 50 270 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -397,16 +382,18 @@ itemDef {
itemDef { itemDef {
name options name options
group grpOptions group grpOptions
type ITEM_TYPE_YESNO type ITEM_TYPE_MULTI
text "Draw HUD:" text "HUD Mode:"
cvar "cg_drawStatus" cvar "vr_hudDrawStatus"
rect 50 292 200 20 cvarFloatList { "Off" 0 "Floating" 1 "Simple" 2 }
rect 50 287 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
textscale .25 textscale .25
forecolor 1 1 1 1 forecolor 1 1 1 1
visible 1 visible 1
action { uiScript update "vr_hudDrawStatus" }
} }
itemDef { itemDef {
@ -415,7 +402,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Draw HUD On Weapon Wheel:" text "Draw HUD On Weapon Wheel:"
cvar "vr_weaponSelectorWithHud" cvar "vr_weaponSelectorWithHud"
rect 50 309 200 20 rect 50 304 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 143 textalignx 143
textaligny 17 textaligny 17
@ -431,7 +418,7 @@ itemDef {
type ITEM_TYPE_MULTI type ITEM_TYPE_MULTI
cvar "vr_goreLevel" cvar "vr_goreLevel"
cvarFloatList { "None" 0 "Blood Only" 1 "Blood & Gibs (Default)" 2 "Extra Gore (Performance Hit)" 3 } cvarFloatList { "None" 0 "Blood Only" 1 "Blood & Gibs (Default)" 2 "Extra Gore (Performance Hit)" 3 }
rect 50 339 200 20 rect 50 334 200 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 80 textalignx 80
textaligny 17 textaligny 17

View file

@ -178,23 +178,6 @@ itemDef {
mouseExit { setitemcolor ctr_graphics backcolor .37 .1 .1 1 } mouseExit { setitemcolor ctr_graphics backcolor .37 .1 .1 1 }
} }
// itemDef {
// name graphics
// group grpSystem
// type ITEM_TYPE_MULTI
// text "Quality:"
// cvar "ui_glCustom"
// cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 }
// rect 0 50 256 20
// textalign ITEM_ALIGN_RIGHT
// textalignx 133
// textaligny 17
// textscale .25
// forecolor 1 1 1 1
// visible 0
// action { uiScript update "ui_glCustom" }
// }
itemDef { itemDef {
name graphics name graphics
group grpSystem group grpSystem
@ -210,23 +193,6 @@ itemDef {
forecolor 1 1 1 1 forecolor 1 1 1 1
visible 0 visible 0
} }
// itemDef {
// name graphics
// group grpSystem
// type ITEM_TYPE_MULTI
// text "Color Depth:"
// cvar "r_colorbits"
// cvarFloatList { "Desktop Default" 0 "16-bit" 16 "32-bit" 32 }
// rect 0 90 256 20
// textalign ITEM_ALIGN_RIGHT
// textalignx 133
// textaligny 17
// textscale .25
// forecolor 1 1 1 1
// visible 0
// action { uiScript glCustom ; uiScript update "r_colorbits" }
// }
itemDef { itemDef {
name graphics name graphics
@ -249,7 +215,7 @@ itemDef {
type ITEM_TYPE_MULTI type ITEM_TYPE_MULTI
text "Railgun Effect:" text "Railgun Effect:"
cvar "cg_oldRail" cvar "cg_oldRail"
cvarFloatList { "High" 0 "Low" 1 } cvarFloatList { "Q2 Style" 0 "Q3 Style" 1 }
rect 0 90 256 20 rect 0 90 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 133 textalignx 133
@ -265,7 +231,7 @@ itemDef {
type ITEM_TYPE_MULTI type ITEM_TYPE_MULTI
text "Lighting:" text "Lighting:"
cvar "r_vertexlight" cvar "r_vertexlight"
cvarFloatList { "Light Map (high)" 0 "Vertex (low)" 1 } cvarFloatList { "Lightmap (High)" 0 "Vertex (Low)" 1 }
rect 0 110 256 20 rect 0 110 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 133 textalignx 133
@ -276,21 +242,6 @@ itemDef {
action { uiScript glCustom } action { uiScript glCustom }
} }
itemDef {
name graphics
group grpSystem
type ITEM_TYPE_YESNO
text "Dynamic Lights:"
cvar "r_dynamiclight"
rect 0 130 256 20
textalign ITEM_ALIGN_RIGHT
textalignx 133
textaligny 17
textscale .25
forecolor 1 1 1 1
visible 0
}
itemDef { itemDef {
name graphics name graphics
group grpSystem group grpSystem
@ -298,7 +249,7 @@ itemDef {
text "Opponent Shadows:" text "Opponent Shadows:"
cvar "cg_shadows" cvar "cg_shadows"
cvarFloatList { "None" 0 "Low" 1 "High" 3 } cvarFloatList { "None" 0 "Low" 1 "High" 3 }
rect 0 150 306 20 rect 0 130 306 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 133 textalignx 133
textaligny 17 textaligny 17
@ -314,7 +265,7 @@ itemDef {
text "Player Shadow:" text "Player Shadow:"
cvar "cg_playerShadow" cvar "cg_playerShadow"
cvarFloatList { "None" 0 "Low" 1 "High" 3 } cvarFloatList { "None" 0 "Low" 1 "High" 3 }
rect 0 170 306 20 rect 0 150 306 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 133 textalignx 133
textaligny 17 textaligny 17
@ -330,7 +281,7 @@ itemDef {
text "Geometric Detail:" text "Geometric Detail:"
cvar "r_lodbias" cvar "r_lodbias"
cvarFloatList { "High" -1 "Medium" 1 "Low" 2 } cvarFloatList { "High" -1 "Medium" 1 "Low" 2 }
rect 0 190 256 20 rect 0 170 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 133 textalignx 133
textaligny 17 textaligny 17
@ -347,7 +298,7 @@ itemDef {
text "Texture Detail:" text "Texture Detail:"
cvar "r_picmip" cvar "r_picmip"
cvarFloatList { "Low" 2 "Normal" 1 "High" 0 } cvarFloatList { "Low" 2 "Normal" 1 "High" 0 }
rect 0 210 256 20 rect 0 190 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 133 textalignx 133
textaligny 17 textaligny 17
@ -357,55 +308,37 @@ itemDef {
action { uiScript glCustom } action { uiScript glCustom }
} }
// itemDef {
// name graphics
// group grpSystem
// type ITEM_TYPE_MULTI
// text "Texture Quality:"
// cvar "r_texturebits"
// cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 }
// rect 0 210 256 20
// textalign ITEM_ALIGN_RIGHT
// textalignx 133
// textaligny 17
// textscale .25
// forecolor 1 1 1 1
// visible 0
// }
// itemDef {
// name graphics
// group grpSystem
// type ITEM_TYPE_MULTI
// text "Texture Filter:"
// cvar "r_texturemode"
// cvarStrList { "Bilinear", "GL_LINEAR_MIPMAP_NEAREST", "Trilinear", "GL_LINEAR_MIPMAP_LINEAR" }
// rect 0 230 256 20
// textalign ITEM_ALIGN_RIGHT
// textalignx 133
// textaligny 17
// textscale .25
// forecolor 1 1 1 1
// visible 0
// action { uiScript glCustom }
// }
itemDef { itemDef {
name graphics name graphics
group grpSystem group grpSystem
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Compress Textures:" text "Compress Textures:"
cvar "r_ext_compressed_textures" cvar "r_ext_compressed_textures"
rect 0 210 256 20
textalign ITEM_ALIGN_RIGHT
textalignx 133
textaligny 17
textscale .25
forecolor 1 1 1 1
visible 0
action { uiScript glCustom }
}
itemDef {
name graphics
group grpSystem
type ITEM_TYPE_YESNO
text "Low Quality Sky:"
cvar "r_fastsky"
rect 0 230 256 20 rect 0 230 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 133 textalignx 133
textaligny 17 textaligny 17
textscale .25 textscale .25
forecolor 1 1 1 1 forecolor 1 1 1 1
visible 0 visible 0
action { uiScript glCustom } action { uiScript glCustom }
} }
//here //here

View file

@ -38,7 +38,7 @@ itemDef {
name options name options
group grpOptions group grpOptions
text "Crosshair:" text "Crosshair:"
rect 227 15 20 20 rect 227 35 20 20
ownerdraw UI_CROSSHAIR ownerdraw UI_CROSSHAIR
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 0 textalignx 0
@ -54,7 +54,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Laser Sight:" text "Laser Sight:"
cvar "vr_lasersight" cvar "vr_lasersight"
rect 99 35 256 20 rect 99 55 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
textaligny 20 textaligny 20
@ -69,7 +69,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Simple Items (World):" text "Simple Items (World):"
cvar "cg_simpleItems" cvar "cg_simpleItems"
rect 99 55 256 20 rect 99 75 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
textaligny 20 textaligny 20
@ -84,7 +84,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Simple Items (Weapon Wheel):" text "Simple Items (Weapon Wheel):"
cvar "cg_weaponSelectorSimple2DIcons" cvar "cg_weaponSelectorSimple2DIcons"
rect 99 75 256 20 rect 99 95 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
textaligny 20 textaligny 20
@ -99,7 +99,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Show Item In Hand:" text "Show Item In Hand:"
cvar "vr_showItemInHand" cvar "vr_showItemInHand"
rect 99 95 256 20 rect 99 115 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
textaligny 20 textaligny 20
@ -114,7 +114,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Marks On Walls:" text "Marks On Walls:"
cvar "cg_marks" cvar "cg_marks"
rect 99 115 256 20 rect 99 135 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
textaligny 20 textaligny 20
@ -129,7 +129,7 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Show Floating Scores:" text "Show Floating Scores:"
cvar "cg_scorePlums" cvar "cg_scorePlums"
rect 99 135 256 20 rect 99 155 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
textaligny 20 textaligny 20
@ -145,7 +145,7 @@ itemDef {
type ITEM_TYPE_MULTI type ITEM_TYPE_MULTI
cvar "cg_brassTime" cvar "cg_brassTime"
cvarFloatList { "High" 2500 "Med" 1250 "Off" 0 } cvarFloatList { "High" 2500 "Med" 1250 "Off" 0 }
rect 99 155 256 20 rect 99 175 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
textaligny 20 textaligny 20
@ -160,21 +160,6 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Identify Target:" text "Identify Target:"
cvar "cg_drawCrosshairNames" cvar "cg_drawCrosshairNames"
rect 99 175 256 20
textalign ITEM_ALIGN_RIGHT
textalignx 128
textaligny 20
textscale .3
forecolor 1 1 1 1
visible 1
}
itemDef {
name options
group grpOptions
type ITEM_TYPE_YESNO
text "Low Quality Sky:"
cvar "r_fastsky"
rect 99 195 256 20 rect 99 195 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
@ -278,9 +263,10 @@ itemDef {
itemDef { itemDef {
name options name options
group grpOptions group grpOptions
type ITEM_TYPE_YESNO type ITEM_TYPE_MULTI
text "Draw HUD:" text "HUD Mode:"
cvar "cg_drawStatus" cvar "vr_hudDrawStatus"
cvarFloatList { "Off" 0 "Floating" 1 "Simple" 2 }
rect 99 335 256 20 rect 99 335 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
@ -288,6 +274,7 @@ itemDef {
textscale .3 textscale .3
forecolor 1 1 1 1 forecolor 1 1 1 1
visible 1 visible 1
action { uiScript update "vr_hudDrawStatus" }
} }
itemDef { itemDef {

View file

@ -81,24 +81,6 @@ itemDef {
decoration decoration
} }
// itemDef {
// name graphics
// group grpSystem
// text "Quality:"
// type ITEM_TYPE_MULTI
// cvar "ui_glCustom"
// cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 }
// rect 99 42 256 20
// textalign ITEM_ALIGN_RIGHT
// textalignx 128
// textaligny 20
// textscale .333
// forecolor 1 1 1 1
// visible 0
// action { uiScript update "ui_glCustom" }
// }
itemDef { itemDef {
name graphics name graphics
group grpSystem group grpSystem
@ -115,23 +97,6 @@ itemDef {
visible 0 visible 0
} }
// itemDef {
// name graphics
// group grpSystem
// type ITEM_TYPE_MULTI
// text "Color Depth:"
// cvar "r_colorbits"
// cvarFloatList { "Desktop Default" 0 "16-bit" 16 "32-bit" 32 }
// rect 99 92 256 20
// textalign ITEM_ALIGN_RIGHT
// textalignx 128
// textaligny 20
// textscale .333
// forecolor 1 1 1 1
// visible 0
// action { uiScript glCustom ; uiScript update "r_colorbits" }
// }
itemDef { itemDef {
name graphics name graphics
group grpSystem group grpSystem
@ -153,7 +118,7 @@ itemDef {
type ITEM_TYPE_MULTI type ITEM_TYPE_MULTI
text "Railgun Effect:" text "Railgun Effect:"
cvar "cg_oldRail" cvar "cg_oldRail"
cvarFloatList { "High" 0 "Low" 1 } cvarFloatList { "Q2 Style" 0 "Q3 Style" 1 }
rect 99 92 256 20 rect 99 92 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
@ -169,7 +134,7 @@ itemDef {
type ITEM_TYPE_MULTI type ITEM_TYPE_MULTI
text "Lighting:" text "Lighting:"
cvar "r_vertexlight" cvar "r_vertexlight"
cvarFloatList { "Light Map (high)" 0 "Vertex (low)" 1 } cvarFloatList { "Lightmap (High)" 0 "Vertex (Low)" 1 }
rect 99 117 256 20 rect 99 117 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
@ -180,21 +145,6 @@ itemDef {
action { uiScript glCustom } action { uiScript glCustom }
} }
itemDef {
name graphics
group grpSystem
type ITEM_TYPE_YESNO
text "Dynamic Lights:"
cvar "r_dynamiclight"
rect 99 142 256 20
textalign ITEM_ALIGN_RIGHT
textalignx 128
textaligny 20
textscale .333
forecolor 1 1 1 1
visible 1
}
itemDef { itemDef {
name graphics name graphics
group grpSystem group grpSystem
@ -202,7 +152,7 @@ itemDef {
text "Opponent Shadows:" text "Opponent Shadows:"
cvar "cg_shadows" cvar "cg_shadows"
cvarFloatList { "None" 0 "Low" 1 "High" 3 } cvarFloatList { "None" 0 "Low" 1 "High" 3 }
rect 99 167 256 20 rect 99 142 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
textaligny 20 textaligny 20
@ -218,7 +168,7 @@ itemDef {
text "Player Shadow:" text "Player Shadow:"
cvar "cg_playerShadow" cvar "cg_playerShadow"
cvarFloatList { "None" 0 "Low" 1 "High" 3 } cvarFloatList { "None" 0 "Low" 1 "High" 3 }
rect 99 192 256 20 rect 99 167 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
textaligny 20 textaligny 20
@ -234,7 +184,7 @@ itemDef {
text "Geometric Detail:" text "Geometric Detail:"
cvar "r_lodbias" cvar "r_lodbias"
cvarFloatList { "High" -1 "Medium" 1 "Low" 2 } cvarFloatList { "High" -1 "Medium" 1 "Low" 2 }
rect 99 217 256 20 rect 99 192 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
textaligny 20 textaligny 20
@ -251,7 +201,7 @@ itemDef {
text "Texture Detail:" text "Texture Detail:"
cvar "r_picmip" cvar "r_picmip"
cvarFloatList { "Low" 2 "Normal" 1 "High" 0 } cvarFloatList { "Low" 2 "Normal" 1 "High" 0 }
rect 99 242 256 20 rect 99 217 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
textaligny 20 textaligny 20
@ -260,39 +210,6 @@ itemDef {
visible 0 visible 0
action { uiScript glCustom } action { uiScript glCustom }
} }
// itemDef {
// name graphics
// group grpSystem
// type ITEM_TYPE_MULTI
// text "Texture Quality:"
// cvar "r_texturebits"
// cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 }
// rect 99 242 256 20
// textalign ITEM_ALIGN_RIGHT
// textalignx 128
// textaligny 20
// textscale .333
// forecolor 1 1 1 1
// visible 0
// }
// itemDef {
// name graphics
// group grpSystem
// type ITEM_TYPE_MULTI
// text "Texture Filter:"
// cvar "r_texturemode"
// cvarStrList { "Bilinear", "GL_LINEAR_MIPMAP_NEAREST", "Trilinear", "GL_LINEAR_MIPMAP_LINEAR" }
// rect 99 267 256 20
// textalign ITEM_ALIGN_RIGHT
// textalignx 128
// textaligny 20
// textscale .333
// forecolor 1 1 1 1
// visible 0
// action { uiScript glCustom }
// }
itemDef { itemDef {
name graphics name graphics
@ -300,15 +217,31 @@ itemDef {
type ITEM_TYPE_YESNO type ITEM_TYPE_YESNO
text "Compress Textures:" text "Compress Textures:"
cvar "r_ext_compressed_textures" cvar "r_ext_compressed_textures"
rect 99 242 256 20
textalign ITEM_ALIGN_RIGHT
textalignx 128
textaligny 20
textscale .333
forecolor 1 1 1 1
visible 0
action { uiScript glCustom }
}
itemDef {
name graphics
group grpSystem
type ITEM_TYPE_YESNO
text "Low Quality Sky:"
cvar "r_fastsky"
rect 99 267 256 20 rect 99 267 256 20
textalign ITEM_ALIGN_RIGHT textalign ITEM_ALIGN_RIGHT
textalignx 128 textalignx 128
textaligny 20 textaligny 20
textscale .333 textscale .333
forecolor 1 1 1 1 forecolor 1 1 1 1
visible 0 visible 0
action { uiScript glCustom } action { uiScript glCustom }
} }
itemDef { itemDef {
name graphics name graphics