game_shared: voice_status: do not strupr on non-Windows platforms, fix -Wparentheses

This commit is contained in:
Alibek Omarov 2023-09-09 03:14:24 +03:00
parent 978d5f94a2
commit 37da1d1707

View File

@ -88,7 +88,9 @@ void ForEachBannedPlayer(char id[16])
id[8], id[9], id[10], id[11],
id[12], id[13], id[14], id[15]
);
#ifdef _WIN32
strupr(str);
#endif
gEngfuncs.pfnConsolePrint(str);
}
@ -194,7 +196,7 @@ int CVoiceStatus::Init(
pLabel->m_pBackground = new Label("");
if(pLabel->m_pLabel = new Label(""))
if((pLabel->m_pLabel = new Label("")))
{
pLabel->m_pLabel->setFont( Scheme::sf_primary2 );
pLabel->m_pLabel->setTextAlignment( Label::a_east );
@ -202,7 +204,7 @@ int CVoiceStatus::Init(
pLabel->m_pLabel->setParent( pLabel->m_pBackground );
}
if( pLabel->m_pIcon = new ImagePanel( NULL ) )
if(( pLabel->m_pIcon = new ImagePanel( NULL ) ))
{
pLabel->m_pIcon->setParent( pLabel->m_pBackground );
}
@ -229,12 +231,12 @@ int CVoiceStatus::VidInit()
FreeBitmaps();
if( m_pLocalBitmap = vgui_LoadTGA("gfx/vgui/icntlk_pl.tga") )
if(( m_pLocalBitmap = vgui_LoadTGA("gfx/vgui/icntlk_pl.tga") ))
{
m_pLocalBitmap->setColor(Color(255,255,255,1)); // Give just a tiny bit of translucency so software draws correctly.
}
if( m_pAckBitmap = vgui_LoadTGA("gfx/vgui/icntlk_sv.tga") )
if(( m_pAckBitmap = vgui_LoadTGA("gfx/vgui/icntlk_sv.tga") ))
{
m_pAckBitmap->setColor(Color(255,255,255,1)); // Give just a tiny bit of translucency so software draws correctly.
}
@ -243,25 +245,25 @@ int CVoiceStatus::VidInit()
m_pLocalLabel->setVisible( false );
if( m_pSpeakerLabelIcon = vgui_LoadTGANoInvertAlpha("gfx/vgui/speaker4.tga" ) )
if(( m_pSpeakerLabelIcon = vgui_LoadTGANoInvertAlpha("gfx/vgui/speaker4.tga" ) ))
m_pSpeakerLabelIcon->setColor( Color(255,255,255,1) ); // Give just a tiny bit of translucency so software draws correctly.
if (m_pScoreboardNeverSpoken = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_speaker1.tga"))
if((m_pScoreboardNeverSpoken = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_speaker1.tga")))
m_pScoreboardNeverSpoken->setColor(Color(255,255,255,1)); // Give just a tiny bit of translucency so software draws correctly.
if(m_pScoreboardNotSpeaking = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_speaker2.tga"))
if((m_pScoreboardNotSpeaking = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_speaker2.tga")))
m_pScoreboardNotSpeaking->setColor(Color(255,255,255,1)); // Give just a tiny bit of translucency so software draws correctly.
if(m_pScoreboardSpeaking = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_speaker3.tga"))
if((m_pScoreboardSpeaking = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_speaker3.tga")))
m_pScoreboardSpeaking->setColor(Color(255,255,255,1)); // Give just a tiny bit of translucency so software draws correctly.
if(m_pScoreboardSpeaking2 = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_speaker4.tga"))
if((m_pScoreboardSpeaking2 = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_speaker4.tga")))
m_pScoreboardSpeaking2->setColor(Color(255,255,255,1)); // Give just a tiny bit of translucency so software draws correctly.
if(m_pScoreboardSquelch = vgui_LoadTGA("gfx/vgui/icntlk_squelch.tga"))
if((m_pScoreboardSquelch = vgui_LoadTGA("gfx/vgui/icntlk_squelch.tga")))
m_pScoreboardSquelch->setColor(Color(255,255,255,1)); // Give just a tiny bit of translucency so software draws correctly.
if(m_pScoreboardBanned = vgui_LoadTGA("gfx/vgui/640_voiceblocked.tga"))
if((m_pScoreboardBanned = vgui_LoadTGA("gfx/vgui/640_voiceblocked.tga")))
m_pScoreboardBanned->setColor(Color(255,255,255,1)); // Give just a tiny bit of translucency so software draws correctly.
// Figure out the voice head model height.
@ -404,7 +406,7 @@ void CVoiceStatus::UpdateSpeakerStatus(int entindex, qboolean bTalking)
// If we don't have a label for this guy yet, then create one.
if(!pLabel)
{
if(pLabel = GetFreeVoiceLabel())
if((pLabel = GetFreeVoiceLabel()))
{
// Get the name from the engine.
hud_player_info_t info;