summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 54b1109)
raw | patch | inline | side by side (parent: 54b1109)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Tue, 27 Feb 2018 17:25:02 +0000 (20:25 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sat, 17 Mar 2018 00:04:27 +0000 (02:04 +0200) |
src/game/g_language.pas | patch | blob | history | |
src/game/g_main.pas | patch | blob | history | |
src/game/g_menu.pas | patch | blob | history | |
src/game/g_options.pas | patch | blob | history |
index 72508cfc1500bad2d26c377af3013879559ecc8a..f325846ba8e51bba6ceb4f836a4729feac8e7ca3 100644 (file)
--- a/src/game/g_language.pas
+++ b/src/game/g_language.pas
I_MENU_GAME_CHAT_TYPE_ADV,
I_MENU_GAME_CHAT_TYPE_COLOR,
I_MENU_GAME_CHAT_TYPE_TEXTURE,
+ I_MENU_GAME_SCALE_FACTOR,
I_MENU_VIDEO_RESOLUTION,
I_MENU_VIDEO_BPP,
'Öâåòíàÿ'),
('MENU GAME CHAT TYPE TEXTURE', 'Textured',
'Òåêñòóðà'),
+ ('MENU GAME SCALE FACTOR', 'Scale:',
+ 'Ìàñøòàá:'),
('MENU VIDEO RESOLUTION', 'Set video mode',
'Óñòàíîâêà âèäåîðåæèìà'),
diff --git a/src/game/g_main.pas b/src/game/g_main.pas
index 07d2f48007b52a75ccd1c7b3befae8dac45b1708..960eb9eeafaccd3325d119a7a042c03b5cfd796f 100644 (file)
--- a/src/game/g_main.pas
+++ b/src/game/g_main.pas
sdlflags := SDL_INIT_JOYSTICK or SDL_INIT_TIMER or SDL_INIT_VIDEO;
{$ENDIF}
{$ENDIF}
+
+ SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, '0');
+
if SDL_Init(sdlflags) < 0 then
raise Exception.Create('SDL: Init failed: ' + SDL_GetError());
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index fca66beba93f4e99812a0570f864adb2b66ff58a..3056950af666495842af15a008ba3f4cc2ac211c 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
gShowMessages := TGUISwitch(menu.GetControl('swMessages')).ItemIndex = 0;
gRevertPlayers := TGUISwitch(menu.GetControl('swRevertPlayers')).ItemIndex = 0;
gChatBubble := TGUISwitch(menu.GetControl('swChatBubble')).ItemIndex;
+ g_dbg_scale := TGUIScroll(menu.GetControl('swScaleFactor')).Value + 1;
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsMenu').GetControl('mOptionsControlsMenu'));
with TGUISwitch(menu.GetControl('swChatBubble')) do
ItemIndex := gChatBubble;
+ TGUIScroll(menu.GetControl('swScaleFactor')).Value := Round(g_dbg_scale - 1);
+
menu := TGUIMenu(g_GUI_GetWindow('OptionsPlayersP1Menu').GetControl('mOptionsPlayersP1Menu'));
TGUIListBox(menu.GetControl('lsP1Model')).SelectItem(gPlayer1Settings.Model);
);
end;
+procedure ProcChangeGameSettings(Sender: TGUIControl);
+var
+ menu: TGUIMenu;
+begin
+ menu := TGUIMenu(g_GUI_GetWindow('OptionsGameMenu').GetControl('mOptionsGameMenu'));
+ g_dbg_scale := TGUIScroll(menu.GetControl('swScaleFactor')).Value + 1;
+end;
+
procedure ProcOptionsPlayersMIMenu();
var
s, a: string;
AddItem(_lc[I_MENU_GAME_CHAT_TYPE_COLOR]);
AddItem(_lc[I_MENU_GAME_CHAT_TYPE_TEXTURE]);
end;
+ with AddScroll(_lc[I_MENU_GAME_SCALE_FACTOR]) do
+ begin
+ Name := 'swScaleFactor';
+ Max := 10;
+ OnChange := ProcChangeGameSettings;
+ end;
ReAlign();
end;
Menu.DefControl := 'mOptionsGameMenu';
diff --git a/src/game/g_options.pas b/src/game/g_options.pas
index b3b2f5a3234ca3fdf5bb5b518cf3b97a1dfe7345..a1397a80e949d2b70bfb89ad91b13b4c4db316b6 100644 (file)
--- a/src/game/g_options.pas
+++ b/src/game/g_options.pas
gDrawBackGround := True;
gShowMessages := True;
gRevertPlayers := False;
+ g_dbg_scale := 1.0;
for i := 0 to e_MaxJoys-1 do
e_JoystickDeadzones[i] := 8192;
e_FastScreenshots := config.ReadBool('Game', 'FastScreenshots', True);
gDefaultMegawadStart := config.ReadStr('Game', 'DefaultMegawadStart', DF_Default_Megawad_Start);
gBerserkAutoswitch := config.ReadBool('Game', 'BerserkAutoswitching', True);
+ g_dbg_scale := Max(config.ReadInt('Game', 'Scale', 1), 1);
// Ãåéìïëåé â ñâîåé èãðå
gcMap := config.ReadStr('GameplayCustom', 'Map', '');
config.WriteBool('Game', 'FastScreenshots', e_FastScreenshots);
config.WriteStr('Game', 'DefaultMegawadStart', gDefaultMegawadStart);
config.WriteBool('Game', 'BerserkAutoswitching', gBerserkAutoswitch);
+ config.WriteInt('Game', 'Scale', Round(g_dbg_scale));
config.WriteStr ('GameplayCustom', 'Map', gcMap);
config.WriteStr ('GameplayCustom', 'GameMode', gcGameMode);