From: fgsfds Date: Tue, 3 Mar 2020 23:30:31 +0000 (+0300) Subject: add r_interp to video settings menu X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=82fc44046c22d1b60695f3b1f7abfb48f18bea48;p=d2df-sdl.git add r_interp to video settings menu --- diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 0231bc8..ca0bea8 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -7224,7 +7224,6 @@ end; procedure SystemCommands(P: SSArray); var cmd: string; - a: Integer; begin cmd := LowerCase(P[0]); case cmd of diff --git a/src/game/g_language.pas b/src/game/g_language.pas index 5a24323..dc216c9 100644 --- a/src/game/g_language.pas +++ b/src/game/g_language.pas @@ -275,6 +275,7 @@ type I_MENU_VIDEO_VSYNC, I_MENU_VIDEO_FILTER_SKY, I_MENU_VIDEO_LEGACY_COMPATIBLE, + I_MENU_VIDEO_INTERPOLATION, I_MENU_VIDEO_NEED_RESTART, I_MENU_RESOLUTION_SELECT, @@ -1142,8 +1143,10 @@ const 'Ôèëüòðàöèÿ íåáà:'), ('MENU VIDEO LEGACY COMPATIBLE', 'Force compatibility with NPOT textures:', 'Ýìóëÿöèÿ NPOT-òåêñòóð:'), - ('MENU VIDEO NEED RESTART', 'Video settings will be changed after game restart.', - 'Äàííûå íàñòðîéêè âèäåî âñòóïÿò â ñèëó ïîñëå ïåðåçàïóñêà èãðû.'), + ('MENU VIDEO INTERPOLATION', 'Motion interpolation:', + 'Èíòåðïîëÿöèÿ äâèæåíèÿ:'), + ('MENU VIDEO NEED RESTART', 'Some video settings will be changed after game restart.', + 'Íåêîòîðûå íàñòðîéêè âèäåî âñòóïÿò â ñèëó ïîñëå ïåðåçàïóñêà èãðû.'), ('MENU RESOLUTION SELECT', 'SET VIDEO MODE', 'ÓÑÒÀÍÎÂÊÀ ÂÈÄÅÎÐÅÆÈÌÀ'), diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index d409cc6..c56d6e8 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -124,6 +124,7 @@ begin gTextureFilter := TGUISwitch(menu.GetControl('swTextureFilter')).ItemIndex = 0; glNPOTOverride := not (TGUISwitch(menu.GetControl('swLegacyNPOT')).ItemIndex = 0); + gLerpActors := TGUISwitch(menu.GetControl('swInterp')).ItemIndex = 0; menu := TGUIMenu(g_GUI_GetWindow('OptionsSoundMenu').GetControl('mOptionsSoundMenu')); @@ -400,6 +401,9 @@ begin with TGUISwitch(menu.GetControl('swLegacyNPOT')) do if not glNPOTOverride then ItemIndex := 0 else ItemIndex := 1; + with TGUISwitch(menu.GetControl('swInterp')) do + if gLerpActors then ItemIndex := 0 else ItemIndex := 1; + menu := TGUIMenu(g_GUI_GetWindow('OptionsSoundMenu').GetControl('mOptionsSoundMenu')); TGUIScroll(menu.GetControl('scSoundLevel')).Value := Round(gSoundLevel/16); @@ -2642,6 +2646,12 @@ begin AddItem(_lc[I_MENU_YES]); AddItem(_lc[I_MENU_NO]); end; + with AddSwitch(_lc[I_MENU_VIDEO_INTERPOLATION]) do + begin + Name := 'swInterp'; + AddItem(_lc[I_MENU_YES]); + AddItem(_lc[I_MENU_NO]); + end; with AddSwitch(_lc[I_MENU_VIDEO_LEGACY_COMPATIBLE]) do begin Name := 'swLegacyNPOT';