Subversion Repositories eduke32

Rev

Rev 4623 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4623 Rev 4624
Line 79... Line 79...
79
    rotatesprite_fs(160<<16,19<<16,65536L,0,MENUBAR,16,0,10);
79
    rotatesprite_fs(160<<16,19<<16,65536L,0,MENUBAR,16,0,10);
80
}
80
}
81
81
82
static void M_DrawTopBarCaption(const char *caption)
82
static void M_DrawTopBarCaption(const char *caption)
83
{
83
{
-
 
84
    char *s = Bstrdup(caption), p = Bstrlen(caption)-1;
-
 
85
    if (s[p] == ':') s[p] = 0;
84
    menutext(160,24,0,0,caption);
86
    menutext(160,24,0,0,s);
-
 
87
    Bfree(s);
85
}
88
}
86
89
87
extern int32_t g_quitDeadline;
90
extern int32_t g_quitDeadline;
88
91
89
92
Line 333... Line 336...
333
336
334
resolution_t resolution[MAXVALIDMODES];
337
resolution_t resolution[MAXVALIDMODES];
335
338
336
static char *MEOSN_VIDEOSETUP_RESOLUTION[MAXVALIDMODES];
339
static char *MEOSN_VIDEOSETUP_RESOLUTION[MAXVALIDMODES];
337
static MenuOptionSet_t MEOS_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTIONSETDYN( 0x0, MEOSN_VIDEOSETUP_RESOLUTION, NULL, 0 );
340
static MenuOptionSet_t MEOS_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTIONSETDYN( 0x0, MEOSN_VIDEOSETUP_RESOLUTION, NULL, 0 );
338
static MenuOption_t MEO_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTION( &MF_Redfont, &MEOS_VIDEOSETUP_RESOLUTION, &newresolution );
341
static MenuOption_t MEO_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_VIDEOSETUP_RESOLUTION, &newresolution );
339
static MenuEntry_t ME_VIDEOSETUP_RESOLUTION = MAKE_MENUENTRY( &MF_Redfont, "Resolution:", Option, &MEO_VIDEOSETUP_RESOLUTION );
342
static MenuEntry_t ME_VIDEOSETUP_RESOLUTION = MAKE_MENUENTRY( &MF_Redfont, "Resolution:", Option, &MEO_VIDEOSETUP_RESOLUTION );
340
343
341
#ifdef USE_OPENGL
344
#ifdef USE_OPENGL
342
#ifdef POLYMER
345
#ifdef POLYMER
343
static char *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "Polymost.f", "Polymer", };
346
static char *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "Polymost.f", "Polymer", };
Line 351... Line 354...
351
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, };
354
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, };
352
#endif
355
#endif
353
356
354
static MenuOptionSet_t MEOS_VIDEOSETUP_RENDERER = MAKE_MENUOPTIONSET( 0x2, MEOSN_VIDEOSETUP_RENDERER, MEOSV_VIDEOSETUP_RENDERER );
357
static MenuOptionSet_t MEOS_VIDEOSETUP_RENDERER = MAKE_MENUOPTIONSET( 0x2, MEOSN_VIDEOSETUP_RENDERER, MEOSV_VIDEOSETUP_RENDERER );
355
358
356
static MenuOption_t MEO_VIDEOSETUP_RENDERER = MAKE_MENUOPTION( &MF_Redfont, &MEOS_VIDEOSETUP_RENDERER, &newrendermode );
359
static MenuOption_t MEO_VIDEOSETUP_RENDERER = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_VIDEOSETUP_RENDERER, &newrendermode );
357
static MenuEntry_t ME_VIDEOSETUP_RENDERER = MAKE_MENUENTRY( &MF_Redfont, "Renderer:", Option, &MEO_VIDEOSETUP_RENDERER );
360
static MenuEntry_t ME_VIDEOSETUP_RENDERER = MAKE_MENUENTRY( &MF_Redfont, "Renderer:", Option, &MEO_VIDEOSETUP_RENDERER );
358
static MenuOption_t MEO_VIDEOSETUP_FULLSCREEN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &newfullscreen );
361
static MenuOption_t MEO_VIDEOSETUP_FULLSCREEN = MAKE_MENUOPTION( &MF_RedfontRt, &MEOS_NoYes, &newfullscreen );
359
static MenuEntry_t ME_VIDEOSETUP_FULLSCREEN = MAKE_MENUENTRY( &MF_Redfont, "Fullscreen:", Option, &MEO_VIDEOSETUP_FULLSCREEN );
362
static MenuEntry_t ME_VIDEOSETUP_FULLSCREEN = MAKE_MENUENTRY( &MF_Redfont, "Fullscreen:", Option, &MEO_VIDEOSETUP_FULLSCREEN );
360
static MenuEntry_t ME_VIDEOSETUP_APPLY = MAKE_MENUENTRY( &MF_Redfont, "Apply Changes", Link, &MEO_NULL );
363
static MenuEntry_t ME_VIDEOSETUP_APPLY = MAKE_MENUENTRY( &MF_Redfont, "Apply Changes", Link, &MEO_NULL );
361
364
362
365
363
static MenuLink_t MEO_DISPLAYSETUP_COLORCORR =  { MENU_COLCORR, };
366
static MenuLink_t MEO_DISPLAYSETUP_COLORCORR =  { MENU_COLCORR, };
Line 388... Line 391...
388
static MenuOption_t MEO_DISPLAYSETUP_TEXFILTER = MAKE_MENUOPTION( &MF_Redfont, &MEOS_DISPLAYSETUP_TEXFILTER, &menufiltermode );
391
static MenuOption_t MEO_DISPLAYSETUP_TEXFILTER = MAKE_MENUOPTION( &MF_Redfont, &MEOS_DISPLAYSETUP_TEXFILTER, &menufiltermode );
389
static MenuEntry_t ME_DISPLAYSETUP_TEXFILTER = MAKE_MENUENTRY( &MF_Redfont, "Texture Mode:", Option, &MEO_DISPLAYSETUP_TEXFILTER );
392
static MenuEntry_t ME_DISPLAYSETUP_TEXFILTER = MAKE_MENUENTRY( &MF_Redfont, "Texture Mode:", Option, &MEO_DISPLAYSETUP_TEXFILTER );
390
393
391
static char *MEOSN_DISPLAYSETUP_ANISOTROPY[] = { "None", "2x", "4x", "8x", "16x", };
394
static char *MEOSN_DISPLAYSETUP_ANISOTROPY[] = { "None", "2x", "4x", "8x", "16x", };
392
static int32_t MEOSV_DISPLAYSETUP_ANISOTROPY[] = { 0, 2, 4, 8, 16, };
395
static int32_t MEOSV_DISPLAYSETUP_ANISOTROPY[] = { 0, 2, 4, 8, 16, };
393
static MenuOptionSet_t MEOS_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTIONSET(0x2, MEOSN_DISPLAYSETUP_ANISOTROPY, MEOSV_DISPLAYSETUP_ANISOTROPY);
396
static MenuOptionSet_t MEOS_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTIONSET(0x0, MEOSN_DISPLAYSETUP_ANISOTROPY, MEOSV_DISPLAYSETUP_ANISOTROPY);
394
static MenuOption_t MEO_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_ANISOTROPY, &glanisotropy);
397
static MenuOption_t MEO_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_ANISOTROPY, &glanisotropy);
395
static MenuEntry_t ME_DISPLAYSETUP_ANISOTROPY = MAKE_MENUENTRY(&MF_Redfont, "Anisotropy:", Option, &MEO_DISPLAYSETUP_ANISOTROPY);
398
static MenuEntry_t ME_DISPLAYSETUP_ANISOTROPY = MAKE_MENUENTRY(&MF_Redfont, "Anisotropy:", Option, &MEO_DISPLAYSETUP_ANISOTROPY);
396
static char *MEOSN_DISPLAYSETUP_VSYNC[] = { "NVIDIA", "Off", "On", };
399
static char *MEOSN_DISPLAYSETUP_VSYNC[] = { "NVIDIA", "Off", "On", };
397
static int32_t MEOSV_DISPLAYSETUP_VSYNC[] = { -1, 0, 1, };
400
static int32_t MEOSV_DISPLAYSETUP_VSYNC[] = { -1, 0, 1, };
398
static MenuOptionSet_t MEOS_DISPLAYSETUP_VSYNC = MAKE_MENUOPTIONSET(0x2, MEOSN_DISPLAYSETUP_VSYNC, MEOSV_DISPLAYSETUP_VSYNC);
401
static MenuOptionSet_t MEOS_DISPLAYSETUP_VSYNC = MAKE_MENUOPTIONSET(0x2, MEOSN_DISPLAYSETUP_VSYNC, MEOSV_DISPLAYSETUP_VSYNC);
Line 1043... Line 1046...
1043
static MenuGroup_t MG_OPTIONS = MAKE_MENUGROUP( MEL_OPTIONS, &MP_TOP_OPTIONS );
1046
static MenuGroup_t MG_OPTIONS = MAKE_MENUGROUP( MEL_OPTIONS, &MP_TOP_OPTIONS );
1044
static MenuGroup_t *MGL_OPTIONS[] = {
1047
static MenuGroup_t *MGL_OPTIONS[] = {
1045
    &MG_OPTIONS,
1048
    &MG_OPTIONS,
1046
};
1049
};
1047
1050
1048
static MenuGroup_t MG_VIDEOSETUP1 = MAKE_MENUGROUP( MEL_VIDEOSETUP1, &MP_VIDEOSETUP );
1051
static MenuGroup_t MG_VIDEOSETUP1 = MAKE_MENUGROUP( MEL_VIDEOSETUP1, &MP_BIGOPTIONSRT );
1049
static MenuGroup_t MG_VIDEOSETUP_APPLY = MAKE_MENUGROUP( MEL_VIDEOSETUP_APPLY, &MP_VIDEOSETUP_APPLY );
1052
static MenuGroup_t MG_VIDEOSETUP_APPLY = MAKE_MENUGROUP( MEL_VIDEOSETUP_APPLY, &MP_VIDEOSETUP_APPLY );
1050
static MenuGroup_t *MGL_VIDEOSETUP[] = {
1053
static MenuGroup_t *MGL_VIDEOSETUP[] = {
1051
    &MG_VIDEOSETUP1,
1054
    &MG_VIDEOSETUP1,
1052
    &MG_VIDEOSETUP_APPLY,
1055
    &MG_VIDEOSETUP_APPLY,
1053
};
1056
};
Line 3962... Line 3965...
3962
                if (menu->title != NoTitle)
3965
                if (menu->title != NoTitle)
3963
                    M_DrawTopBar();
3966
                    M_DrawTopBar();
3964
3967
3965
                if (currentry->type == Option)
3968
                if (currentry->type == Option)
3966
                {
3969
                {
-
 
3970
                    if (currentry->name)
-
 
3971
                        M_DrawTopBarCaption(currentry->name);
-
 
3972
3967
                    M_PreMenuOptionListDraw(/*currgroup,*/ currentry);
3973
                    M_PreMenuOptionListDraw(/*currgroup,*/ currentry);
3968
3974
3969
                    M_RunMenu_MenuOptionList((MenuOption_t*)currentry->entry);
3975
                    M_RunMenu_MenuOptionList((MenuOption_t*)currentry->entry);
3970
                }
3976
                }
3971
                else if (currentry->type == Custom2Col)
3977
                else if (currentry->type == Custom2Col)
3972
                {
3978
                {
3973
                    M_PreMenuCustom2ColScreenDraw(currgroup, currentry);
3979
                    M_PreMenuCustom2ColScreenDraw(currgroup, currentry);
3974
                }
3980
                }
3975
            }
3981
            }
3976
3982
3977
            if (menu->title != NoTitle)
3983
            if ((currentry->type != Option || state != 2) && menu->title != NoTitle)
3978
                M_DrawTopBarCaption(menu->title);
3984
                M_DrawTopBarCaption(menu->title);
3979
3985
3980
            break;
3986
            break;
3981
        }
3987
        }
3982
    }
3988
    }