X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_options.pas;h=fd68a7af5a2bf4996b5036de065ef597bedff1fc;hb=6b2e9c834e5911e3c0787a9fe51326b4a1e21e0d;hp=f6ffc77ee61f09caa8d911249fe063b7198389c8;hpb=b93d2d75ccf3cdfb28b1f143d29a0e451ac08735;p=d2df-sdl.git diff --git a/src/game/g_options.pas b/src/game/g_options.pas index f6ffc77..fd68a7a 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -1,3 +1,19 @@ +(* Copyright (C) DooM 2D:Forever Developers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + *) +{$MODE DELPHI} unit g_options; interface @@ -92,13 +108,17 @@ var gnWeaponStay: Boolean = False; gnMonsters: Boolean = False; gnBotsVS: String = 'Everybody'; + gsSDLSampleRate: Integer = 44100; + gsSDLBufferSize: Integer = 2048; + gSFSDebug: Boolean = False; + gSFSFastMode: Boolean = False; implementation uses 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_textures, - g_items, GL, GLExt; + g_items, GL, GLExt, wadreader, e_graphics; procedure g_Options_SetDefault(); var @@ -242,6 +262,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 +349,11 @@ 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); + wadoptDebug := gSFSDebug; + gSFSFastMode := config.ReadBool('Game', 'SFSFastMode', False); + wadoptFast := gSFSFastMode; + e_FastScreenshots := config.ReadBool('Game', 'FastScreenshots', True); // Ãåéìïëåé â ñâîåé èãðå gcMap := config.ReadStr('GameplayCustom', 'Map', ''); @@ -451,6 +478,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 +555,9 @@ 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.WriteBool('Game', 'FastScreenshots', e_FastScreenshots); config.WriteStr ('GameplayCustom', 'Map', gcMap); config.WriteStr ('GameplayCustom', 'GameMode', gcGameMode);