X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fgame%2Fg_options.pas;h=3d2fed9b9cf7b2c04d3cb5b6e02aed017616a05d;hb=4ac477a64781436f4518e96009c3eef29979290b;hp=3d67ec0bdc9a953a28fc792e03c950eea7315328;hpb=e1c1f7de2d4d90cedb74704518844133b936ff97;p=d2df-sdl.git diff --git a/src/game/g_options.pas b/src/game/g_options.pas index 3d67ec0..3d2fed9 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -134,9 +134,14 @@ var implementation uses +{$IFDEF USE_NANOGL} + nanoGL, +{$ELSE} + GL, GLExt, +{$ENDIF} e_log, e_input, g_window, g_sound, g_gfx, g_player, Math, g_map, g_net, g_netmaster, SysUtils, CONFIG, g_game, g_main, e_texture, - g_items, GL, GLExt, wadreader, e_graphics; + g_items, wadreader, e_graphics, g_touch; procedure g_Options_SetDefault(); var @@ -161,6 +166,9 @@ begin gDrawBackGround := True; gShowMessages := True; gRevertPlayers := False; + g_dbg_scale := 1.0; + g_touch_size := 1.0; + g_touch_fire := True; for i := 0 to e_MaxJoys-1 do e_JoystickDeadzones[i] := 8192; @@ -185,21 +193,24 @@ begin KeyPrevWeapon := 71; KeyOpen := 54; KeyStrafe := 0; - for i := 0 to High(KeyWeapon) do + for i := 0 to 9 do + KeyWeapon[i] := 30 + i; + KeyWeapon[10] := 45; + for i := 10 to High(KeyWeapon) do KeyWeapon[i] := 0; - KeyRight2 := 0; - KeyLeft2 := 0; - KeyUp2 := 0; - KeyDown2 := 0; - KeyFire2 := 0; - KeyJump2 := 0; - KeyNextWeapon2 := 0; - KeyPrevWeapon2 := 0; - KeyOpen2 := 0; - KeyStrafe2 := 0; + KeyRight2 := VK_RIGHT; + KeyLeft2 := VK_LEFT; + KeyUp2 := VK_UP; + KeyDown2 := VK_DOWN; + KeyFire2 := VK_FIRE; + KeyJump2 := VK_JUMP; + KeyNextWeapon2 := VK_NEXT; + KeyPrevWeapon2 := VK_PREV; + KeyOpen2 := VK_OPEN; + KeyStrafe2 := VK_STRAFE; for i := 0 to High(KeyWeapon2) do - KeyWeapon2[i] := 0; + KeyWeapon2[i] := VK_0 + i; end; with gGameControls.P2Control do @@ -411,6 +422,9 @@ begin for i := 0 to e_MaxJoys-1 do e_JoystickDeadzones[i] := config.ReadInt('Joysticks', 'Deadzone' + IntToStr(i), 8192); + g_touch_size := Max(config.ReadInt('Touch', 'Size', 10) / 10, 0.1); + g_touch_fire := config.ReadBool('Touch', 'Fire', True); + g_GFX_SetMax(Min(config.ReadInt('Game', 'MaxParticles', 1000), 50000)); g_Shells_SetMax(Min(config.ReadInt('Game', 'MaxShells', 300), 600)); g_Gibs_SetMax(Min(config.ReadInt('Game', 'MaxGibs', 150), 500)); @@ -441,6 +455,7 @@ begin 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', ''); @@ -650,6 +665,9 @@ begin for i := 0 to e_MaxJoys-1 do config.WriteInt('Joysticks', 'Deadzone' + IntToStr(i), e_JoystickDeadzones[i]); + config.WriteInt('Touch', 'Size', Round(g_touch_size * 10)); + config.WriteBool('Touch', 'Fire', g_touch_fire); + with config do case gGibsCount of 0: config.WriteInt('Game', 'GibsCount', 0); @@ -678,6 +696,7 @@ begin 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);