X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_options.pas;h=c70af6d73b516d5de6c97bcee57749185afaf4f3;hb=83dba8e8957923e6a8f6541d7935345a59cf5bde;hp=574a28beeaae652ca11f4076aa674d2de57585c4;hpb=88ce644db1b40111bdb380f4357fa59bdb5173be;p=d2df-sdl.git diff --git a/src/game/g_options.pas b/src/game/g_options.pas index 574a28b..c70af6d 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_options; interface @@ -52,6 +53,7 @@ var gFullscreen: Boolean = False; gWinMaximized: Boolean = False; gVSync: Boolean = False; + glLegacyNPOT: Boolean = False; gTextureFilter: Boolean = True; gNoSound: Boolean = False; gSoundLevel: Byte = 75; @@ -91,13 +93,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; procedure g_Options_SetDefault(); var @@ -121,7 +127,7 @@ begin gDrawBackGround := True; gShowMessages := True; gRevertPlayers := False; - + for i := 0 to e_MaxJoys-1 do e_JoystickDeadzones[i] := 8192; @@ -207,7 +213,7 @@ begin gBPP := 32; gVSync := False; gTextureFilter := True; - fUseMipmaps := False; + glLegacyNPOT := False; Exit; end; @@ -232,7 +238,7 @@ begin gFreq := config.ReadInt('Video', 'Freq', 0); gVSync := config.ReadBool('Video', 'VSync', True); gTextureFilter := config.ReadBool('Video', 'TextureFilter', True); - fUseMipmaps := config.ReadBool('Video', 'LegacyCompatible', False); + glLegacyNPOT := config.ReadBool('Video', 'LegacyCompatible', False); gNoSound := config.ReadBool('Sound', 'NoSound', False); gSoundLevel := Min(config.ReadInt('Sound', 'SoundLevel', 75), 255); @@ -241,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 @@ -299,7 +307,7 @@ begin if (Team < TEAM_RED) or (Team > TEAM_BLUE) then Team := TEAM_RED; end; - + for i := 0 to e_MaxJoys-1 do e_JoystickDeadzones[i] := config.ReadInt('Joysticks', 'Deadzone' + IntToStr(i), 8192); @@ -326,6 +334,10 @@ 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; // Ãåéìïëåé â ñâîåé èãðå gcMap := config.ReadStr('GameplayCustom', 'Map', ''); @@ -441,7 +453,7 @@ begin config.WriteInt('Video', 'BPP', gBPP); config.WriteBool('Video', 'VSync', gVSync); config.WriteBool('Video', 'TextureFilter', gTextureFilter); - config.WriteBool('Video', 'LegacyCompatible', fUseMipmaps); + config.WriteBool('Video', 'LegacyCompatible', glLegacyNPOT); config.WriteBool('Sound', 'NoSound', gNoSound); config.WriteInt('Sound', 'SoundLevel', gSoundLevel); @@ -450,6 +462,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 @@ -498,7 +512,7 @@ begin WriteInt('Player2', 'blue', Color.B); WriteInt('Player2', 'team', Team); end; - + for i := 0 to e_MaxJoys-1 do config.WriteInt('Joysticks', 'Deadzone' + IntToStr(i), e_JoystickDeadzones[i]); @@ -525,6 +539,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);