void VID_MenuDraw( void ) { qpic_t *p; char *ptr; int i, j, column, row, dup; char temp[100]; p = Draw_CachePic ("gfx/vidmodes.lmp"); M_DrawPic ( (320-p->width)/2, 4, p); M_Print (4*8, 36 + MAX_COLUMN_SIZE * 8 + 8, "Video mode switching unavailable"); M_Print (9*8, 36 + MAX_COLUMN_SIZE * 8 + 8*6, "Press any key..."); }
/* ================ VID_MenuDraw ================ */ static void VID_MenuDraw (void) { int i, y; qpic_t *p; const char *title; y = 4; // plaque p = Draw_CachePic ("gfx/qplaque.lmp"); M_DrawTransPic (16, y, p); //p = Draw_CachePic ("gfx/vidmodes.lmp"); p = Draw_CachePic ("gfx/p_option.lmp"); M_DrawPic ( (320-p->width)/2, y, p); y += 28; // title title = "Video Options"; M_PrintWhite ((320-8*strlen(title))/2, y, title); y += 16; // options for (i = 0; i < VIDEO_OPTIONS_ITEMS; i++) { switch (i) { case VID_OPT_MODE: M_Print (16, y, " Video mode"); M_Print (184, y, va("%ix%i", (int)vid_width.value, (int)vid_height.value)); break; case VID_OPT_BPP: M_Print (16, y, " Color depth"); M_Print (184, y, va("%i", (int)vid_bpp.value)); break; case VID_OPT_FULLSCREEN: M_Print (16, y, " Fullscreen"); M_DrawCheckbox (184, y, (int)vid_fullscreen.value); break; case VID_OPT_VSYNC: M_Print (16, y, " Vertical sync"); if (gl_swap_control) M_DrawCheckbox (184, y, (int)vid_vsync.value); else M_Print (184, y, "N/A"); break; case VID_OPT_TEST: y += 8; //separate the test and apply items M_Print (16, y, " Test changes"); break; case VID_OPT_APPLY: M_Print (16, y, " Apply changes"); break; } if (video_options_cursor == i) M_DrawCharacter (168, y, 12+((int)(realtime*4)&1)); y += 8; } }
/* ================ VID_MenuDraw ================ */ void VID_MenuDraw (void) { qpic_t *p; char *ptr; int nummodes, i, j, column, row, dup; char temp[100]; vid_wmodes = 0; nummodes = VID_NumModes (); p = Draw_CachePic ("gfx/vidmodes.lmp"); M_DrawPic ( (320-p->width)/2, 4, p); for (i=0 ; i<nummodes ; i++) { if (vid_wmodes < MAX_MODEDESCS) { if (i != 1) { ptr = VID_GetModeDescription (i); if (ptr) { dup = 0; for (j=0 ; j<vid_wmodes ; j++) { if (!strcmp (modedescs[j].desc, ptr)) { if (modedescs[j].modenum != 0) { modedescs[j].modenum = i; dup = 1; if (i == vid_modenum) modedescs[j].iscur = 1; } else { dup = 1; } break; } } if (!dup) { modedescs[vid_wmodes].modenum = i; modedescs[vid_wmodes].desc = ptr; modedescs[vid_wmodes].iscur = 0; if (i == vid_modenum) modedescs[vid_wmodes].iscur = 1; vid_wmodes++; } } } } } vid_column_size = (vid_wmodes + 2) / 3; column = 16; row = 36; for (i=0 ; i<vid_wmodes ; i++) { if (modedescs[i].iscur) M_PrintWhite (column, row, modedescs[i].desc); else M_Print (column, row, modedescs[i].desc); row += 8; if ((i % vid_column_size) == (vid_column_size - 1)) { column += 13*8; row = 36; } } // line cursor if (vid_testingmode) { sprintf (temp, "TESTING %s", modedescs[vid_line].desc); M_Print (13*8, 36 + MAX_COLUMN_SIZE * 8 + 8*4, temp); M_Print (9*8, 36 + MAX_COLUMN_SIZE * 8 + 8*6, "Please wait 5 seconds..."); } else { M_Print (9*8, 36 + MAX_COLUMN_SIZE * 8 + 8, "Press Enter to set mode"); M_Print (6*8, 36 + MAX_COLUMN_SIZE * 8 + 8*3, "T to test mode for 5 seconds"); ptr = VID_GetModeDescription (vid_modenum); sprintf (temp, "D to make %s the default", ptr); M_Print (6*8, 36 + MAX_COLUMN_SIZE * 8 + 8*5, temp); ptr = VID_GetModeDescription ((int)_vid_default_mode->value); if (ptr) { sprintf (temp, "Current default is %s", ptr); M_Print (7*8, 36 + MAX_COLUMN_SIZE * 8 + 8*6, temp); } M_Print (15*8, 36 + MAX_COLUMN_SIZE * 8 + 8*8, "Esc to exit"); row = 36 + (vid_line % vid_column_size) * 8; column = 8 + (vid_line / vid_column_size) * 13*8; M_DrawCharacter (column, row, 12+((int)(realtime*4)&1)); } }
static void VR_MenuDraw (void) { int i, y; qpic_t *p; const char *title; y = 4; // plaque p = Draw_CachePic ("gfx/qplaque.lmp"); M_DrawTransPic (16, y, p); // customize header p = Draw_CachePic ("gfx/ttl_cstm.lmp"); M_DrawPic ( (320-p->width)/2, y, p); y += 28; // title title = "VR/HMD OPTIONS"; M_PrintWhite ((320-8*strlen(title))/2, y, title); y += 16; for ( i = 0; i < VR_OPTION_MAX; i++ ) { switch ( i ) { case VR_OPTION_ENABLED: M_Print( 16, y, " VR Enabled" ); VR_MenuPrintOptionValue( 220, y, i ); break; case VR_OPTION_PERFHUD: M_Print( 16, y, " Debug HMD" ); VR_MenuPrintOptionValue( 220, y, i ); break; case VR_OPTION_AIMMODE: y += 4; // separation M_Print( 16, y, " Aim Mode" ); VR_MenuPrintOptionValue( 220, y, i ); break; case VR_OPTION_DEADZONE: M_Print( 16, y, " Deadzone" ); VR_MenuPrintOptionValue( 220, y, i ); break; case VR_OPTION_CROSSHAIR: M_Print( 16, y, " Crosshair" ); VR_MenuPrintOptionValue( 220, y, i ); break; case VR_OPTION_CROSSHAIR_DEPTH: M_Print( 16, y, " Crosshair Depth" ); VR_MenuPrintOptionValue( 220, y, i ); break; case VR_OPTION_CROSSHAIR_SIZE: M_Print( 16, y, " Crosshair Size" ); VR_MenuPrintOptionValue( 220, y, i ); break; case VR_OPTION_CROSSHAIR_ALPHA: M_Print( 16, y, " Crosshair Alpha" ); VR_MenuPrintOptionValue( 220, y, i ); break; default: break; } // draw the blinking cursor if ( vr_options_cursor == i ) { M_DrawCharacter( 200, y, 12 + ((int)(realtime*4)&1) ); } y += 8; } }