X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_options.pas;h=37aac9da3d198269795ff608afd161a840d84d41;hb=d7d166dc3cd287276202e862746208892c4cc89f;hp=416f3b3c1411eb514ea33f1228b6845b957ca134;hpb=1fce622b701683e52c37f44e82ecd56da6cef7e3;p=d2df-sdl.git diff --git a/src/game/g_options.pas b/src/game/g_options.pas index 416f3b3..37aac9d 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . *) -{$MODE DELPHI} +{$INCLUDE ../shared/a_modes.inc} unit g_options; interface @@ -71,6 +71,8 @@ procedure g_Options_Write_Gameplay_Net(FileName: String); procedure g_Options_Write_Net_Server(FileName: String); procedure g_Options_Write_Net_Client(FileName: String); +const DF_Default_Megawad_Start = 'megawads/DOOM2D.WAD:\MAP01'; + var gGameControls: TControls; gScreenWidth: Word = 800; @@ -126,12 +128,14 @@ var gsSDLBufferSize: Integer = 2048; gSFSDebug: Boolean = False; gSFSFastMode: Boolean = False; + gDefaultMegawadStart: AnsiString = DF_Default_Megawad_Start; + gBerserkAutoswitch: Boolean = True; 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_map, g_net, g_netmaster, SysUtils, CONFIG, g_game, g_main, e_texture, g_items, GL, GLExt, wadreader, e_graphics; procedure g_Options_SetDefault(); @@ -257,11 +261,11 @@ var i: Integer; begin gAskLanguage := True; - e_WriteLog('Reading config', MSG_NOTIFY); + e_WriteLog('Reading config', TMsgType.Notify); if not FileExists(FileName) then begin - e_WriteLog('Config file '+FileName+' not found', MSG_WARNING); + e_WriteLog('Config file '+FileName+' not found', TMsgType.Warning); g_Options_SetDefault(); // Default video options: @@ -432,6 +436,8 @@ begin gSFSFastMode := config.ReadBool('Game', 'SFSFastMode', False); wadoptFast := gSFSFastMode; e_FastScreenshots := config.ReadBool('Game', 'FastScreenshots', True); + gDefaultMegawadStart := config.ReadStr('Game', 'DefaultMegawadStart', 'megawads/DOOM2D.WAD:\MAP01'); + gBerserkAutoswitch := config.ReadBool('Game', 'BerserkAutoswitch', False); // Ãåéìïëåé â ñâîåé èãðå gcMap := config.ReadStr('GameplayCustom', 'Map', ''); @@ -523,10 +529,7 @@ begin config.Free(); - if gTextureFilter then - TEXTUREFILTER := GL_LINEAR - else - TEXTUREFILTER := GL_NEAREST; + //if gTextureFilter then TEXTUREFILTER := GL_LINEAR else TEXTUREFILTER := GL_NEAREST; end; procedure g_Options_Write(FileName: String); @@ -534,7 +537,7 @@ var config: TConfig; i: Integer; begin - e_WriteLog('Writing config', MSG_NOTIFY); + e_WriteLog('Writing config', TMsgType.Notify); config := TConfig.CreateFile(FileName); @@ -668,6 +671,8 @@ begin config.WriteBool('Game', 'SFSDebug', gSFSDebug); config.WriteBool('Game', 'SFSFastMode', gSFSFastMode); config.WriteBool('Game', 'FastScreenshots', e_FastScreenshots); + config.WriteStr('Game', 'DefaultMegawadStart', gDefaultMegawadStart); + config.WriteBool('Game', 'BerserkAutoswitch', gBerserkAutoswitch); config.WriteStr ('GameplayCustom', 'Map', gcMap); config.WriteStr ('GameplayCustom', 'GameMode', gcGameMode); @@ -721,7 +726,7 @@ procedure g_Options_Write_Language(FileName: String); var config: TConfig; begin - e_WriteLog('Writing language config', MSG_NOTIFY); + e_WriteLog('Writing language config', TMsgType.Notify); config := TConfig.CreateFile(FileName); config.WriteStr('Game', 'Language', gLanguage); @@ -734,7 +739,7 @@ var config: TConfig; sW, sH: Integer; begin - e_WriteLog('Writing resolution to config', MSG_NOTIFY); + e_WriteLog('Writing resolution to config', TMsgType.Notify); config := TConfig.CreateFile(FileName); @@ -764,7 +769,7 @@ procedure g_Options_Write_Gameplay_Custom(FileName: String); var config: TConfig; begin - e_WriteLog('Writing custom gameplay config', MSG_NOTIFY); + e_WriteLog('Writing custom gameplay config', TMsgType.Notify); config := TConfig.CreateFile(FileName); @@ -788,7 +793,7 @@ procedure g_Options_Write_Gameplay_Net(FileName: String); var config: TConfig; begin - e_WriteLog('Writing network gameplay config', MSG_NOTIFY); + e_WriteLog('Writing network gameplay config', TMsgType.Notify); config := TConfig.CreateFile(FileName); @@ -812,7 +817,7 @@ procedure g_Options_Write_Net_Server(FileName: String); var config: TConfig; begin - e_WriteLog('Writing server config', MSG_NOTIFY); + e_WriteLog('Writing server config', TMsgType.Notify); config := TConfig.CreateFile(FileName); @@ -830,7 +835,7 @@ procedure g_Options_Write_Net_Client(FileName: String); var config: TConfig; begin - e_WriteLog('Writing client config', MSG_NOTIFY); + e_WriteLog('Writing client config', TMsgType.Notify); config := TConfig.CreateFile(FileName);