summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b19b82b)
raw | patch | inline | side by side (parent: b19b82b)
author | Joseph Stalin <granminigun@gmail.com> | |
Thu, 20 Dec 2018 21:15:36 +0000 (02:15 +0500) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Fri, 21 Dec 2018 14:10:33 +0000 (16:10 +0200) |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index f92af351077aaa34fee47dc16dbb0d6eb9a1056f..503e6169bf74bfeb339535e47caa7b58f29abdf8 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
g_Texture_CreateWADEx('TEXTURE_PLAYER_BLUEFLAG_D', GameWAD+':TEXTURES\FLAGHUD_B_DROP');
g_Texture_CreateWADEx('TEXTURE_PLAYER_TALKBUBBLE', GameWAD+':TEXTURES\TALKBUBBLE');
g_Texture_CreateWADEx('TEXTURE_PLAYER_INVULPENTA', GameWAD+':TEXTURES\PENTA');
+ g_Texture_CreateWADEx('TEXTURE_PLAYER_INDICATOR', GameWAD+':TEXTURES\PLRIND');
hasPBarGfx := true;
if not g_Texture_CreateWADEx('UI_GFX_PBAR_LEFT', GameWAD+':TEXTURES\LLEFT') then hasPBarGfx := false;
renderMapInternal(-c, -d, true);
+ if (gGameSettings.GameMode <> GM_SINGLE) and gPlayerIndicator then
+ p.DrawIndicator();
if p.FSpectator then
e_TextureFontPrintEx(p.GameX + PLAYER_RECT_CX - 4,
p.GameY + PLAYER_RECT_CY - 4,
index 8cadba100245e60df8406e561fb307f11f4f188e..f595199639281b78bca8b04fc629fb4fbb13fff0 100644 (file)
--- a/src/game/g_language.pas
+++ b/src/game/g_language.pas
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,
'Âòîðîé èãðîê ñâåðõó:'),
('MENU GAME CHAT BUBBLE', 'Chat bubbles:',
'Èêîíêà ÷àòà:'),
+ ('MENU GAME PLAYER INDICATOR', 'Player indicator:',
+ 'Èíäèêàòîð èãðîêà:'),
('MENU GAME CHAT TYPE NONE', 'None',
'Íåò'),
('MENU GAME CHAT TYPE SIMPLE', 'Simple',
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index 23fbf2e947c3f77ac7a455db154a71b120ad6c97..2c3f85153e2ec850f69fade3f52fdda927f0272d 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
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;
g_dbg_scale := TGUIScroll(menu.GetControl('scScaleFactor')).Value + 1;
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsMenu').GetControl('mOptionsControlsMenu'));
with TGUISwitch(menu.GetControl('swChatBubble')) do
ItemIndex := gChatBubble;
+
+ with TGUISwitch(menu.GetControl('swPlayerIndicator')) do
+ if gPlayerIndicator then ItemIndex := 0 else ItemIndex := 1;
TGUIScroll(menu.GetControl('scScaleFactor')).Value := Round(g_dbg_scale - 1);
AddItem(_lc[I_MENU_GAME_CHAT_TYPE_COLOR]);
AddItem(_lc[I_MENU_GAME_CHAT_TYPE_TEXTURE]);
end;
+ with AddSwitch(_lc[I_MENU_GAME_PLAYER_INDICATOR]) do
+ begin
+ Name := 'swPlayerIndicator';
+ AddItem(_lc[I_MENU_YES]);
+ AddItem(_lc[I_MENU_NO]);
+ end;
with AddScroll(_lc[I_MENU_GAME_SCALE_FACTOR]) do
begin
Name := 'scScaleFactor';
diff --git a/src/game/g_options.pas b/src/game/g_options.pas
index cc9a71400bc4a4a7cf159a0392e171f0c8c4cae8..1f3bd4881e0f9f7e5d4e8d5032d5c11bb6695caf 100644 (file)
--- a/src/game/g_options.pas
+++ b/src/game/g_options.pas
gShowMessages := True;
gRevertPlayers := False;
gChatBubble := 4;
+ gPlayerIndicator := True;
gSFSDebug := False;
gSFSFastMode := False;
e_FastScreenshots := True;
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');
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);
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 189d241aae564c6fcd0489e9c0f7f8e4a2105509..6abe742c440bf746e51626c3a49bd428a604d799 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
procedure DrawPickup();
procedure DrawRulez();
procedure DrawAim();
+ procedure DrawIndicator();
procedure DrawBubble();
procedure DrawGUI();
procedure Update(); virtual;
gFly: Boolean = False;
gAimLine: Boolean = False;
gChatBubble: Byte = 0;
+ gPlayerIndicator: Boolean = True;
gNumBots: Word = 0;
gLMSPID1: Word = 0;
gLMSPID2: Word = 0;
inherited;
end;
+procedure TPlayer.DrawIndicator();
+var
+ indX, indY: Integer;
+ indW, indH: Word;
+ ID: DWORD;
+begin
+ if FAlive then
+ begin
+ indX := FObj.X+FObj.Rect.X;
+ indY := FObj.Y - 12;
+ if g_Texture_Get('TEXTURE_PLAYER_INDICATOR', ID) then
+ begin
+ e_GetTextureSize(ID, @indW, @indH);
+ e_Draw(ID, indX + indW div 2, indY, 0, True, False);
+ end;
+ end;
+ //e_TextureFontPrint(indX, indY, FName, gStdFont); // Shows player name overhead
+end;
+
procedure TPlayer.DrawBubble();
var
bubX, bubY: Integer;