From dbbf11f7ecfa6e486e1a70f35fcf066dd9a689af Mon Sep 17 00:00:00 2001 From: puzl Date: Sun, 16 Apr 2006 14:43:01 +0000 Subject: [PATCH] o Updated scoreboard weapon icons o Added cl_iconr, cl_icong, cl_iconb to control scoreboard icon colour for testing ( to be removed before release ) o Fixed compile issue with textmessage change. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@394 67975925-1194-0748-b3d5-c16f83f1a3a1 --- releases/3.2.0/gfx/vgui/640_scoreboardgl.tga | Bin 2092 -> 2092 bytes releases/3.2.0/gfx/vgui/640_scoreboardhmg.tga | Bin 2092 -> 2092 bytes releases/3.2.0/gfx/vgui/640_scoreboardlmg.tga | Bin 2092 -> 2092 bytes releases/3.2.0/gfx/vgui/640_scoreboardsg.tga | Bin 2092 -> 2092 bytes releases/3.2.0/source/cl_dll/hud.cpp | 4 ++++ releases/3.2.0/source/cl_dll/text_message.cpp | 2 +- .../3.2.0/source/cl_dll/vgui_ScorePanel.cpp | 15 +++++++++++---- 7 files changed, 16 insertions(+), 5 deletions(-) diff --git a/releases/3.2.0/gfx/vgui/640_scoreboardgl.tga b/releases/3.2.0/gfx/vgui/640_scoreboardgl.tga index 4b030a48d8d8bfe6122b484059ff8397a7586c5d..ee26ec4cf9e429bea2fe191c73a0bf6977092384 100644 GIT binary patch literal 2092 zcmeH|&r4!a6vw|=*i@S-h%BRoqM{s)iY)p?q7#~q;fy+k7D3T3l!$5(6+yHpA_PGY z+JqaIZF8ZE77?^_*Q&pw?VI;K!;^+-K#E~DBV68l_uY5S_k6zRUI87np9vpf`k+23 z|Hn@T)z#HXTU#4Anwpw0G&BUO)r$K1dX$xwDLS1_#^2zj*Xxy@o*qn0Ou%R~qN1Wg z;pp%0$Mp0x3cPgPZwQd3i-R905XpuYF$YG`P{z`y{gfm&Y1;{537sO0wf ze6ZW?Xl-ppXJ;n{2M2}G%F2rR$=iF0`dN2xZ!g;0+l99lucMtS8wMZSO1!TP;kFNTMQF*7rR)zwuT9v;Hs zaA0?L7uVOZ1=@t=vQGTlNnbbai!MZEX$NY!>`hW5M_Nd>-fL=i)E<(o^#Acs!#2>gq~zE-x=j zoUySn;Xu}m$=a!pJ;EzB)003T0GG=p9AmKD|>`zWhwdTOQ~yLi}&7hwy&=b{2zHO b_CK0a(*oc80cX(l)#dy0>HBAw$7#V2KV1wE literal 2092 zcmeHH%T6Lu6f98zMNvc%6&0WOVpL2-W55S6+B!gl0Z~CsSdl;?Brc3WSN?#X;WrRg z{8vxcNt)=4#D$wlW=L)>ea}7T)Tyd&zyST{MnBwU?MeN={(cTjCX+fgHU=(-!$A?> z>DJcPCeH?gK{XnUYEMrO_+P)rxW0JC*xR^%uhs5yxv;ghg^7s?l*?s|j*e#NL#b54@bECKR;$|4(b25K zxp_W5J`Qrme&mbiHk(awEi5cxXlO{{t@{0bzOu3+y?1wav9Ym%!^1-a0s*|fzG7}} z4g&)Nq7C&K85xm&tkK=wEu4`P&M-4GBlw6#iwSOGU0ht0d~!x^d3SPh5>r!ClEa;A zdU_fc7Z*sU)3~|0!Q`b^IC&XyC+r>Yu)7RIhE-x=j zUB*{eSFyRdDLQX&Z_AwIo3-ZW=Vhm^`FtM5ViDPFR!iPk4TQ#>>l# zc&M|pQ~2ksm2kp< W4*X1{B55V5#ADvfcjZUq8-4*e^u`MS diff --git a/releases/3.2.0/gfx/vgui/640_scoreboardhmg.tga b/releases/3.2.0/gfx/vgui/640_scoreboardhmg.tga index 4b030a48d8d8bfe6122b484059ff8397a7586c5d..8d8ba9e8f0a95ee204ac41dbbc97a2946df991c2 100644 GIT binary patch literal 2092 zcmeHGJ!>LB5Ph6r4n({vr5HpM1To+j*r|nzm8ghHL{J11 z5CjXg@efEKq_wa}ZDnI=bLS41;tDU-ag7Vh?9R@-ee-q}_=NW%!WW1>A9g=a^Q6JC z9^mu&xV*e%P4mC{1m$uWa=HAUa5y_V`w&;F)xvJKgTvvlSj^{hyuQ9dC=@~>kwBx- zAQTGW@$nIvOa=;t0(WK2_VyO}d>++mmFl{bs2o_x(_lk94>!g9I9Xf#5%+a=D2CivUm zVLgKL^K)j7#<9A6J|9gM$c9uZrFT}TRHW;{bu|BUcGBiZ4;ea}7T)Tyd&zyST{MnBwU?MeN={(cTjCX+fgHU=(-!$A?> z>DJcPCeH?gK{XnUYEMrO_+P)rxW0JC*xR^%uhs5yxv;ghg^7s?l*?s|j*e#NL#b54@bECKR;$|4(b25K zxp_W5J`Qrme&mbiHk(awEi5cxXlO{{t@{0bzOu3+y?1wav9Ym%!^1-a0s*|fzG7}} z4g&)Nq7C&K85xm&tkK=wEu4`P&M-4GBlw6#iwSOGU0ht0d~!x^d3SPh5>r!ClEa;A zdU_fc7Z*sU)3~|0!Q`b^IC&XyC+r>Yu)7RIhE-x=j zUB*{eSFyRdDLQX&Z_AwIo3-ZW=Vhm^`FtM5ViDPFR!iPk4TQ#>>l# zc&M|pQ~2ksm2kp< W4*X1{B55V5#ADvfcjZUq8-4*e^u`MS diff --git a/releases/3.2.0/gfx/vgui/640_scoreboardlmg.tga b/releases/3.2.0/gfx/vgui/640_scoreboardlmg.tga index 4b030a48d8d8bfe6122b484059ff8397a7586c5d..1945d8e7c8e926518f100fbbb9f976817460c0ef 100644 GIT binary patch literal 2092 zcmeHHIY?ts6g|c*#x2ApxW~j@5{;sW;)0N9a7<(}iKBrin%G$>fRwVPOH(;4AXi>2xrg%}C{t zmX@Y)s(437M+gRkNN^gwS0`DD#}ii?ZEb8^nh%TuzlvXu1n^khtxcVS^6 zs;jGEGMQvnR8&Yzhr=OH0vQYjTwPsZXlO|I5ucpn@i@DO`@d(sEY_xk!8&(F`;*x11S{=R6ycmo3il3RCo zH>Reh#ItjAbC{o>$N2a-{C+=%hlfS)^73-=RDuI`cXtKz;o$+%XcWuK%UE1o#OmrQ z4h{~$ebs-|UDcmw+uPfM?{qpbI5;R8Y;JA}7iyZHpD()d|B>(kn147N7JlpN>!_-# zLRVLp=t17pinZF>+7fK`2Qld>-t%}o7#katz1P=Q;Z41kmX^@p-;bM{8(dsmNPSp8 zdaJCgOuW$1(IGxzEmu}nc;_!artT5fXf#SL><#J{2m~-YJB!iLQP9(=_fyyO7XK}r z>?P(;pO6E4BlYfQYsQ(Fn2_(hUa#~ay`^fFk&*EshtJ}EpCxObkOKJi)93KJye^O1 L`rGOH;jrNyEYbPD literal 2092 zcmeHH%T6Lu6f98zMNvc%6&0WOVpL2-W55S6+B!gl0Z~CsSdl;?Brc3WSN?#X;WrRg z{8vxcNt)=4#D$wlW=L)>ea}7T)Tyd&zyST{MnBwU?MeN={(cTjCX+fgHU=(-!$A?> z>DJcPCeH?gK{XnUYEMrO_+P)rxW0JC*xR^%uhs5yxv;ghg^7s?l*?s|j*e#NL#b54@bECKR;$|4(b25K zxp_W5J`Qrme&mbiHk(awEi5cxXlO{{t@{0bzOu3+y?1wav9Ym%!^1-a0s*|fzG7}} z4g&)Nq7C&K85xm&tkK=wEu4`P&M-4GBlw6#iwSOGU0ht0d~!x^d3SPh5>r!ClEa;A zdU_fc7Z*sU)3~|0!Q`b^IC&XyC+r>Yu)7RIhE-x=j zUB*{eSFyRdDLQX&Z_AwIo3-ZW=Vhm^`FtM5ViDPFR!iPk4TQ#>>l# zc&M|pQ~2ksm2kp< W4*X1{B55V5#ADvfcjZUq8-4*e^u`MS diff --git a/releases/3.2.0/gfx/vgui/640_scoreboardsg.tga b/releases/3.2.0/gfx/vgui/640_scoreboardsg.tga index 4b030a48d8d8bfe6122b484059ff8397a7586c5d..d01bc43a4187cc6f3731197a7bdb86c31b2b8392 100644 GIT binary patch literal 2092 zcmeHGTZ^et7=9dbOi^-3#yAyn$f49+jFKV6rfu8YkX*PRDdk3rL~17f#7wz#>snKa zA0QX_Dc^Wk?HX;fuXfX}Jzu@8Z>{yLcRkPZz6;>v*LMpgZYAd#_Z9z^2STBcGZ+jA zg+h?YWS?Fi9*@VRQYmCI83cntYM4*wAdyJ8TrP)1B7rj>NTpIvAQ1d@9%8Zh!<_Yc z9mQf1UauGT_xF&?3xml3Oem7!HS^dJqSZ zNW_^;CL9h2>~=exPA43XN4Q)r3F3tH3Zbg){jpd9IRn(5!~_e^)KRs;11-CZaY;Pd&A z&*w3p&l!&Hd3t(6xm;#A(m{8SKXjJxq+hGmGH+;4qtU=_w=*xvPvWE3>!DVw*-881 z;_*JHf8Nip{ZlQeZZzK9+@R5D!0B}2d=_rEn`u?4RKMk+cXch_*V<(b{v$umQh^`e T^AA6hxn$;>rx;JB9=v!10)q$( literal 2092 zcmeHH%T6Lu6f98zMNvc%6&0WOVpL2-W55S6+B!gl0Z~CsSdl;?Brc3WSN?#X;WrRg z{8vxcNt)=4#D$wlW=L)>ea}7T)Tyd&zyST{MnBwU?MeN={(cTjCX+fgHU=(-!$A?> z>DJcPCeH?gK{XnUYEMrO_+P)rxW0JC*xR^%uhs5yxv;ghg^7s?l*?s|j*e#NL#b54@bECKR;$|4(b25K zxp_W5J`Qrme&mbiHk(awEi5cxXlO{{t@{0bzOu3+y?1wav9Ym%!^1-a0s*|fzG7}} z4g&)Nq7C&K85xm&tkK=wEu4`P&M-4GBlw6#iwSOGU0ht0d~!x^d3SPh5>r!ClEa;A zdU_fc7Z*sU)3~|0!Q`b^IC&XyC+r>Yu)7RIhE-x=j zUB*{eSFyRdDLQX&Z_AwIo3-ZW=Vhm^`FtM5ViDPFR!iPk4TQ#>>l# zc&M|pQ~2ksm2kp< W4*X1{B55V5#ADvfcjZUq8-4*e^u`MS diff --git a/releases/3.2.0/source/cl_dll/hud.cpp b/releases/3.2.0/source/cl_dll/hud.cpp index 0056a7c4..4fc6d238 100644 --- a/releases/3.2.0/source/cl_dll/hud.cpp +++ b/releases/3.2.0/source/cl_dll/hud.cpp @@ -210,6 +210,10 @@ void CHud :: Init( void ) CVAR_CREATE( kvLabelMaps, "1", FCVAR_ARCHIVE); CVAR_CREATE( kvGammaRamp, "1", FCVAR_ARCHIVE); + CVAR_CREATE( "cl_iconr", "0", FCVAR_ARCHIVE); + CVAR_CREATE( "cl_icong", "149", FCVAR_ARCHIVE); + CVAR_CREATE( "cl_iconb", "221", FCVAR_ARCHIVE); + m_pSpriteList = NULL; // Clear any old HUD list diff --git a/releases/3.2.0/source/cl_dll/text_message.cpp b/releases/3.2.0/source/cl_dll/text_message.cpp index a1832ee9..5502b0a6 100644 --- a/releases/3.2.0/source/cl_dll/text_message.cpp +++ b/releases/3.2.0/source/cl_dll/text_message.cpp @@ -178,7 +178,7 @@ int CHudTextMessage::MsgFunc_TextMsg( const char *pszName, int iSize, void *pbuf } // Ensure that message[0] does not contain exessive %'s, max 4x%s, all other %'s removed. - int lastpos = 0; int pos; int count = 0; + size_t lastpos = 0; size_t pos; int count = 0; while(true) { pos = message[0].find("%", lastpos); diff --git a/releases/3.2.0/source/cl_dll/vgui_ScorePanel.cpp b/releases/3.2.0/source/cl_dll/vgui_ScorePanel.cpp index 4f74b590..b140d651 100644 --- a/releases/3.2.0/source/cl_dll/vgui_ScorePanel.cpp +++ b/releases/3.2.0/source/cl_dll/vgui_ScorePanel.cpp @@ -1224,26 +1224,33 @@ void ScorePanel::FillGrid() if(!theIsForEnemy && theExtraPlayerInfo->teamnumber != TEAM_IND && theExtraPlayerInfo->teamnumber != TEAM_SPECT ) { if ( gHUD.GetIsMarine() && !gHUD.GetIsCombatMode() ) { + int r=CVAR_GET_FLOAT("cl_iconr"); + int g=CVAR_GET_FLOAT("cl_icong"); + int b=CVAR_GET_FLOAT("cl_iconb"); + r=max(min(255, r), 0); + g=max(min(255, g), 0); + b=max(min(255, b), 0); + switch(theExtraPlayerInfo->extra) { case AVH_WEAPON_HMG: pLabel->setFgColorAsImageColor(false); pLabel->setImage(m_pHMG); - m_pHMG->setColor(BuildColor(248, 252, 0, gHUD.GetGammaSlope())); + m_pHMG->setColor(BuildColor(r, g, b, gHUD.GetGammaSlope())); break; case AVH_WEAPON_MG: pLabel->setFgColorAsImageColor(false); pLabel->setImage(m_pLMG); - m_pLMG->setColor(BuildColor(208, 16, 190, gHUD.GetGammaSlope())); + m_pLMG->setColor(BuildColor(r, g, b, gHUD.GetGammaSlope())); break; case AVH_WEAPON_SONIC: pLabel->setFgColorAsImageColor(false); pLabel->setImage(m_pSG); - m_pSG->setColor(BuildColor(117, 214, 241, gHUD.GetGammaSlope())); + m_pSG->setColor(BuildColor(r, g, b, gHUD.GetGammaSlope())); break; case AVH_WEAPON_GRENADE_GUN: pLabel->setFgColorAsImageColor(false); pLabel->setImage(m_pGL); - m_pGL->setColor(BuildColor(255, 69, 9, gHUD.GetGammaSlope())); + m_pGL->setColor(BuildColor(r, g, b, gHUD.GetGammaSlope())); break; default: break;