X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_menu.pas;h=d720619bed89ae2a073e34c8481e968ed1a6e871;hb=dea4e2426106ed2b46c3799c7b34a358a4c303aa;hp=2c3f85153e2ec850f69fade3f52fdda927f0272d;hpb=4fd8798646bcb768e925ba667b0c4790e99e1e71;p=d2df-sdl.git diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index 2c3f851..d720619 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -111,10 +111,14 @@ var begin menu := TGUIMenu(g_GUI_GetWindow('OptionsVideoMenu').GetControl('mOptionsVideoMenu')); - if TGUISwitch(menu.GetControl('swBPP')).ItemIndex = 0 then - gBPP := 16 - else - gBPP := 32; + case TGUISwitch(menu.GetControl('swBPP')).ItemIndex of + 0: gBPP := 8; + 1: gBPP := 15; + 2: gBPP := 16; + 3: gBPP := 24; + 4: gBPP := 32; + else gBPP := 32 + end; ovs := gVSync; gVSync := TGUISwitch(menu.GetControl('swVSync')).ItemIndex = 0; @@ -330,10 +334,14 @@ begin menu := TGUIMenu(g_GUI_GetWindow('OptionsVideoMenu').GetControl('mOptionsVideoMenu')); with TGUISwitch(menu.GetControl('swBPP')) do - if gBPP = 16 then - ItemIndex := 0 - else - ItemIndex := 1; + case gBPP of + 8: ItemIndex := 0; + 15: ItemIndex := 1; + 16: ItemIndex := 2; + 24: ItemIndex := 3; + 32: ItemIndex := 4; + else ItemIndex := 4 + end; with TGUISwitch(menu.GetControl('swTextureFilter')) do if gTextureFilter then ItemIndex := 0 else ItemIndex := 1; @@ -512,7 +520,7 @@ begin with TGUISwitch(menu.GetControl('swChatBubble')) do ItemIndex := gChatBubble; - + with TGUISwitch(menu.GetControl('swPlayerIndicator')) do if gPlayerIndicator then ItemIndex := 0 else ItemIndex := 1; @@ -951,10 +959,12 @@ begin g_Texture_CreateWADEx('FONT_STD', GameWAD+':FONTS\'+texture); config := TConfig.CreateMem(cfgdata, cfglen); - cwdt := Min(Max(config.ReadInt('FontMap', 'CharWidth', 0), 0), 255); - chgt := Min(Max(config.ReadInt('FontMap', 'CharHeight', 0), 0), 255); + cwdt := Min(Max(config.ReadInt('FontMap', 'CharWidth', 1), 1), 255); + chgt := Min(Max(config.ReadInt('FontMap', 'CharHeight', 1), 1), 255); spc := Min(Max(config.ReadInt('FontMap', 'Kerning', 0), -128), 127); + e_LogWritefln('LoadStdFont cwdt=%s chgt=%s spc=%s', [cwdt, chgt, spc]); + if g_Texture_Get('FONT_STD', ID) then e_TextureFontBuild(ID, FontID, cwdt, chgt, spc); @@ -2369,7 +2379,7 @@ begin Sort := True; Dirs := True; - FileMask := '*.wad|*.pk3|*.zip'; + FileMask := '*.wad|*.pk3|*.zip|*.dfz'; SetBase(MapsDir+'megawads/'); end; @@ -2424,7 +2434,7 @@ begin Sort := True; Dirs := True; - FileMask := '*.wad|*.pk3|*.zip'; + FileMask := '*.wad|*.pk3|*.zip|*.dfz'; SetBase(MapsDir); end; with AddList(_lc[I_MENU_MAP_RESOURCE], 12, 4) do @@ -2511,7 +2521,10 @@ begin with AddSwitch(_lc[I_MENU_VIDEO_BPP]) do begin Name := 'swBPP'; + AddItem('8'); + AddItem('15'); AddItem('16'); + AddItem('24'); AddItem('32'); end; with AddSwitch(_lc[I_MENU_VIDEO_VSYNC]) do