DEADSOFTWARE

put "{$MODE ...}" directive in each source file; removed trailing spaces, and convert...
[d2df-sdl.git] / src / game / g_options.pas
index f6ffc77ee61f09caa8d911249fe063b7198389c8..b308b04304e9d013507137caee35eb35ccb0791f 100644 (file)
@@ -1,3 +1,4 @@
+{$MODE DELPHI}
 unit g_options;
 
 interface
@@ -92,6 +93,10 @@ var
   gnWeaponStay: Boolean       = False;
   gnMonsters: Boolean         = False;
   gnBotsVS: String            = 'Everybody';
+  gsSDLSampleRate: Integer    = 44100;
+  gsSDLBufferSize: Integer    = 2048;
+  gSFSDebug: Boolean          = False;
+  gSFSFastMode: Boolean       = False;
 
 implementation
 
@@ -242,6 +247,8 @@ begin
   gMuteWhenInactive := config.ReadBool('Sound', 'MuteInactive', False);
   gAnnouncer := Min(Max(config.ReadInt('Sound', 'Announcer', ANNOUNCE_MEPLUS), ANNOUNCE_NONE), ANNOUNCE_ALL);
   gSoundEffectsDF := config.ReadBool('Sound', 'SoundEffectsDF', True);
+  gsSDLSampleRate := Min(Max(config.ReadInt('Sound', 'SDLSampleRate', 44100), 11025), 96000);
+  gsSDLBufferSize := Min(Max(config.ReadInt('Sound', 'SDLBufferSize', 2048), 64), 16384);
 
   with gGameControls.GameControls do
   begin
@@ -327,6 +334,8 @@ begin
   gShowMessages := config.ReadBool('Game', 'Messages', True);
   gRevertPlayers := config.ReadBool('Game', 'RevertPlayers', False);
   gChatBubble := Min(Max(config.ReadInt('Game', 'ChatBubble', 4), 0), 4);
+  gSFSDebug := config.ReadBool('Game', 'SFSDebug', False);
+  gSFSFastMode := config.ReadBool('Game', 'SFSFastMode', False);
 
 // Ãåéìïëåé â ñâîåé èãðå
   gcMap := config.ReadStr('GameplayCustom', 'Map', '');
@@ -451,6 +460,8 @@ begin
   config.WriteBool('Sound', 'MuteInactive', gMuteWhenInactive);
   config.WriteInt('Sound', 'Announcer', gAnnouncer);
   config.WriteBool('Sound', 'SoundEffectsDF', gSoundEffectsDF);
+  config.WriteInt('Sound', 'SDLSampleRate', gsSDLSampleRate);
+  config.WriteInt('Sound', 'SDLBufferSize', gsSDLBufferSize);
 
   with config, gGameControls.GameControls do
   begin
@@ -526,6 +537,8 @@ begin
   config.WriteBool('Game', 'Messages', gShowMessages);
   config.WriteBool('Game', 'RevertPlayers', gRevertPlayers);
   config.WriteInt('Game', 'ChatBubble', gChatBubble);
+  config.WriteBool('Game', 'SFSDebug', gSFSDebug);
+  config.WriteBool('Game', 'SFSFastMode', gSFSFastMode);
 
   config.WriteStr ('GameplayCustom', 'Map', gcMap);
   config.WriteStr ('GameplayCustom', 'GameMode', gcGameMode);