From: Joseph Stalin Date: Sat, 14 Sep 2019 09:39:17 +0000 (+0500) Subject: Updated indicator options X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=24f025e51e5faa8c8f28f6ec6614335a5977303a;p=d2df-sdl.git Updated indicator options --- diff --git a/src/game/g_game.pas b/src/game/g_game.pas index b89b037..3f328d4 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -3666,13 +3666,19 @@ begin renderMapInternal(-c, -d, true); - if (gGameSettings.GameMode <> GM_SINGLE) and gPlayerIndicator then - if gPlayers[i] <> nil then - for i := 0 to High(gPlayers) do - if gPlayers[i] = p then gPlayers[i].DrawIndicator(_RGB(255, 255, 255)) - else if (gPlayers[i].Team = p.Team) and (gPlayers[i].Team <> TEAM_NONE) - then - gPlayers[i].DrawIndicator(gPlayers[i].GetColor); + if (gGameSettings.GameMode <> GM_SINGLE) and (gPlayerIndicator > 0) then + case gPlayerIndicator of + 1: + p.DrawIndicator(_RGB(255, 255, 255)); + + 2: + for i := 0 to High(gPlayers) do + if gPlayers[i] <> nil then + if gPlayers[i] = p then p.DrawIndicator(_RGB(255, 255, 255)) + else if (gPlayers[i].Team = p.Team) and (gPlayers[i].Team <> TEAM_NONE) + then + gPlayers[i].DrawIndicator(gPlayers[i].GetColor); + end; if p.FSpectator then e_TextureFontPrintEx(p.GameX + PLAYER_RECT_CX - 4, diff --git a/src/game/g_language.pas b/src/game/g_language.pas index 06769e1..cccffd6 100644 --- a/src/game/g_language.pas +++ b/src/game/g_language.pas @@ -253,12 +253,15 @@ type I_MENU_GAME_MESSAGES, I_MENU_GAME_REVERT_PLAYERS, I_MENU_GAME_CHAT_BUBBLE, - I_MENU_GAME_PLAYER_INDICATOR, I_MENU_GAME_CHAT_TYPE_NONE, I_MENU_GAME_CHAT_TYPE_SIMPLE, I_MENU_GAME_CHAT_TYPE_ADV, I_MENU_GAME_CHAT_TYPE_COLOR, I_MENU_GAME_CHAT_TYPE_TEXTURE, + I_MENU_GAME_PLAYER_INDICATOR, + I_MENU_GAME_INDICATOR_NONE, + I_MENU_GAME_INDICATOR_OWN, + I_MENU_GAME_INDICATOR_ALL, I_MENU_GAME_SCALE_FACTOR, I_MENU_VIDEO_RESOLUTION, @@ -1085,8 +1088,6 @@ const 'Âòîðîé èãðîê ñâåðõó:'), ('MENU GAME CHAT BUBBLE', 'Chat bubbles:', 'Èêîíêà ÷àòà:'), - ('MENU GAME PLAYER INDICATOR', 'Player indicator:', - 'Èíäèêàòîð èãðîêà:'), ('MENU GAME CHAT TYPE NONE', 'None', 'Íåò'), ('MENU GAME CHAT TYPE SIMPLE', 'Simple', @@ -1097,6 +1098,14 @@ const 'Öâåòíàÿ'), ('MENU GAME CHAT TYPE TEXTURE', 'Textured', 'Òåêñòóðà'), + ('MENU GAME PLAYER INDICATOR', 'Player indicator:', + 'Èíäèêàòîð èãðîêà:'), + ('MENU GAME INDICATOR TYPE NONE', 'None', + 'Íåò'), + ('MENU GAME INDICATOR TYPE OWN', 'Own', + 'Ñâîé'), + ('MENU GAME INDICATOR TYPE ALL', 'Own + Teammates', + 'Ñâîé + Ñîþçíèêè'), ('MENU GAME SCALE FACTOR', 'Scale:', 'Ìàñøòàá:'), diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index 4b6e6f2..3a6f0e7 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -160,7 +160,7 @@ begin gShowMessages := TGUISwitch(menu.GetControl('swMessages')).ItemIndex = 0; gRevertPlayers := TGUISwitch(menu.GetControl('swRevertPlayers')).ItemIndex = 0; gChatBubble := TGUISwitch(menu.GetControl('swChatBubble')).ItemIndex; - gPlayerIndicator := TGUISwitch(menu.GetControl('swPlayerIndicator')).ItemIndex = 0; + gPlayerIndicator := TGUISwitch(menu.GetControl('swPlayerIndicator')).ItemIndex; if TGUIScroll(menu.GetControl('scScaleFactor')).Value <> TempScale then begin TempScale := TGUIScroll(menu.GetControl('scScaleFactor')).Value; @@ -569,7 +569,7 @@ begin ItemIndex := gChatBubble; with TGUISwitch(menu.GetControl('swPlayerIndicator')) do - if gPlayerIndicator then ItemIndex := 0 else ItemIndex := 1; + ItemIndex := gPlayerIndicator; TempScale := Round(g_dbg_scale - 1); TGUIScroll(menu.GetControl('scScaleFactor')).Value := TempScale; @@ -2780,8 +2780,9 @@ begin with AddSwitch(_lc[I_MENU_GAME_PLAYER_INDICATOR]) do begin Name := 'swPlayerIndicator'; - AddItem(_lc[I_MENU_YES]); - AddItem(_lc[I_MENU_NO]); + AddItem(_lc[I_MENU_GAME_INDICATOR_NONE]); + AddItem(_lc[I_MENU_GAME_INDICATOR_OWN]); + AddItem(_lc[I_MENU_GAME_INDICATOR_ALL]); end; with AddScroll(_lc[I_MENU_GAME_SCALE_FACTOR]) do begin diff --git a/src/game/g_options.pas b/src/game/g_options.pas index 4ca52bb..697656b 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -226,7 +226,7 @@ begin gShowMessages := True; gRevertPlayers := False; gChatBubble := 4; - gPlayerIndicator := True; + gPlayerIndicator := 1; gSFSDebug := False; gSFSFastMode := False; e_FastScreenshots := True; @@ -419,7 +419,7 @@ begin ReadBoolean(gShowMessages, 'Messages'); ReadBoolean(gRevertPlayers, 'RevertPlayers'); ReadInteger(gChatBubble, 'ChatBubble', 0, 4); - ReadBoolean(gPlayerIndicator, 'PlayerIndicator'); + ReadInteger(gPlayerIndicator, 'PlayerIndicator', 0, 2); ReadBoolean(gSFSDebug, 'SFSDebug'); wadoptDebug := gSFSDebug; ReadBoolean(gSFSFastMode, 'SFSFastMode'); wadoptFast := gSFSFastMode; ReadBoolean(e_FastScreenshots, 'FastScreenshots'); @@ -593,7 +593,7 @@ begin config.WriteBool('Game', 'Messages', gShowMessages); config.WriteBool('Game', 'RevertPlayers', gRevertPlayers); config.WriteInt('Game', 'ChatBubble', gChatBubble); - config.WriteBool('Game', 'PlayerIndicator', gPlayerIndicator); + config.WriteInt('Game', 'PlayerIndicator', gPlayerIndicator); config.WriteBool('Game', 'SFSDebug', gSFSDebug); config.WriteBool('Game', 'SFSFastMode', gSFSFastMode); config.WriteBool('Game', 'FastScreenshots', e_FastScreenshots); diff --git a/src/game/g_player.pas b/src/game/g_player.pas index 181d7da..d6914b1 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -555,7 +555,7 @@ var gFly: Boolean = False; gAimLine: Boolean = False; gChatBubble: Byte = 0; - gPlayerIndicator: Boolean = True; + gPlayerIndicator: Byte = 1; gNumBots: Word = 0; gLMSPID1: Word = 0; gLMSPID2: Word = 0; @@ -2348,7 +2348,7 @@ begin e_Colors := c; end; end; - //e_TextureFontPrint(indX, indY, FName, gStdFont); // Shows player name overhead + //e_TextureFontPrintEx(indX, indY, FName, gStdFont, 0, 0, 255, 1.0, true); // Shows player name overhead end; procedure TPlayer.DrawBubble();