X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_options.pas;h=1f3bd4881e0f9f7e5d4e8d5032d5c11bb6695caf;hb=4fd8798646bcb768e925ba667b0c4790e99e1e71;hp=506fc186424753429b21151925830bb1a0b6376d;hpb=055a225d4c2a18e9aff2f0e682cf89048d1efefe;p=d2df-sdl.git diff --git a/src/game/g_options.pas b/src/game/g_options.pas index 506fc18..1f3bd48 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -148,8 +148,12 @@ uses begin ASSERT(n >= 1); Result := GetUserName; - if Result = '' then Result := 'Player' + IntToStr(machine MOD 10000); - if n > 1 then Result := Copy(Result, 1, 10) + (' ' + IntToStr(n)) + if Result = '' then + Result := 'Player' + IntToStr(machine MOD 10000); + if n = 1 then + Result := Copy(Result, 1, 12) + ' ' + else + Result := Copy(Result, 1, 10) + ' ' + IntToStr(n) end; procedure g_Options_SetDefaultVideo; @@ -353,6 +357,7 @@ begin gShowMessages := True; gRevertPlayers := False; gChatBubble := 4; + gPlayerIndicator := True; gSFSDebug := False; gSFSFastMode := False; e_FastScreenshots := True; @@ -632,6 +637,7 @@ begin ReadBoolean(gShowMessages, 'Messages'); ReadBoolean(gRevertPlayers, 'RevertPlayers'); ReadInteger(gChatBubble, 'ChatBubble', 0, 4); + ReadBoolean(gPlayerIndicator, 'PlayerIndicator'); ReadBoolean(gSFSDebug, 'SFSDebug'); wadoptDebug := gSFSDebug; ReadBoolean(gSFSFastMode, 'SFSFastMode'); wadoptFast := gSFSFastMode; ReadBoolean(e_FastScreenshots, 'FastScreenshots'); @@ -870,6 +876,7 @@ begin config.WriteBool('Game', 'Messages', gShowMessages); config.WriteBool('Game', 'RevertPlayers', gRevertPlayers); config.WriteInt('Game', 'ChatBubble', gChatBubble); + config.WriteBool('Game', 'PlayerIndicator', gPlayerIndicator); config.WriteBool('Game', 'SFSDebug', gSFSDebug); config.WriteBool('Game', 'SFSFastMode', gSFSFastMode); config.WriteBool('Game', 'FastScreenshots', e_FastScreenshots); @@ -966,6 +973,9 @@ begin config.WriteBool('Video', 'Fullscreen', gFullscreen); config.WriteBool('Video', 'Maximized', gWinMaximized); + config.WriteStr('Player1', 'Name', gPlayer1Settings.Name); + config.WriteStr('Player2', 'Name', gPlayer2Settings.Name); + config.SaveFile(FileName); config.Free(); end;