Merge pull request #7250 from Robyt3/Cleanup-Background-Foreground-Names

Rename variables containing `ForeGround` and `BackGround`
This commit is contained in:
Dennis Felsing 2023-09-24 18:38:15 +00:00 committed by GitHub
commit bca21dc640
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 15 deletions

View file

@ -199,7 +199,7 @@ void CMapSounds::OnRender()
if(Voice.m_pSource->m_PosEnv >= 0)
{
ColorRGBA Channels;
CMapLayers::EnvelopeEval(Voice.m_pSource->m_PosEnvOffset, Voice.m_pSource->m_PosEnv, Channels, &m_pClient->m_MapLayersBackGround);
CMapLayers::EnvelopeEval(Voice.m_pSource->m_PosEnvOffset, Voice.m_pSource->m_PosEnv, Channels, &m_pClient->m_MapLayersBackground);
OffsetX = Channels.r;
OffsetY = Channels.g;
}
@ -218,7 +218,7 @@ void CMapSounds::OnRender()
if(Voice.m_pSource->m_SoundEnv >= 0)
{
ColorRGBA Channels;
CMapLayers::EnvelopeEval(Voice.m_pSource->m_SoundEnvOffset, Voice.m_pSource->m_SoundEnv, Channels, &m_pClient->m_MapLayersBackGround);
CMapLayers::EnvelopeEval(Voice.m_pSource->m_SoundEnvOffset, Voice.m_pSource->m_SoundEnv, Channels, &m_pClient->m_MapLayersBackground);
float Volume = clamp(Channels.r, 0.0f, 1.0f);
Sound()->SetVoiceVolume(Voice.m_Voice, Volume);

View file

@ -89,8 +89,8 @@ void CMenus::HandleDemoSeeking(float PositionToSeek, float TimeToSeek)
else
DemoPlayer()->SeekPercent(PositionToSeek);
m_pClient->m_SuppressEvents = false;
m_pClient->m_MapLayersBackGround.EnvelopeUpdate();
m_pClient->m_MapLayersForeGround.EnvelopeUpdate();
m_pClient->m_MapLayersBackground.EnvelopeUpdate();
m_pClient->m_MapLayersForeground.EnvelopeUpdate();
if(!DemoPlayer()->BaseInfo()->m_Paused && PositionToSeek == 1.0f)
DemoPlayer()->Pause();
}
@ -102,8 +102,8 @@ void CMenus::DemoSeekTick(IDemoPlayer::ETickOffset TickOffset)
DemoPlayer()->SeekTick(TickOffset);
m_pClient->m_SuppressEvents = false;
DemoPlayer()->Pause();
m_pClient->m_MapLayersBackGround.EnvelopeUpdate();
m_pClient->m_MapLayersForeGround.EnvelopeUpdate();
m_pClient->m_MapLayersBackground.EnvelopeUpdate();
m_pClient->m_MapLayersForeground.EnvelopeUpdate();
}
void CMenus::RenderDemoPlayer(CUIRect MainView)

View file

@ -3127,8 +3127,8 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
static CButtonContainer s_BackgroundEntitiesReloadButton;
if(DoButton_Menu(&s_BackgroundEntitiesReloadButton, Localize("Reload"), 0, &Button))
{
if(str_comp(g_Config.m_ClBackgroundEntities, m_pClient->m_BackGround.MapName()) != 0)
m_pClient->m_BackGround.LoadBackground();
if(str_comp(g_Config.m_ClBackgroundEntities, m_pClient->m_Background.MapName()) != 0)
m_pClient->m_Background.LoadBackground();
}
Background.HSplitTop(20.0f, &Button, &Background);
@ -3140,7 +3140,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
g_Config.m_ClBackgroundEntities[0] = '\0';
else
str_copy(g_Config.m_ClBackgroundEntities, CURRENT_MAP);
m_pClient->m_BackGround.LoadBackground();
m_pClient->m_Background.LoadBackground();
}
Background.HSplitTop(20.0f, &Button, &Background);

View file

@ -118,13 +118,13 @@ void CGameClient::OnConsoleInit()
&m_Particles, // doesn't render anything, just updates all the particles
&m_RaceDemo,
&m_MapSounds,
&m_BackGround, // render instead of m_MapLayersBackGround when g_Config.m_ClOverlayEntities == 100
&m_MapLayersBackGround, // first to render
&m_Background, // render instead of m_MapLayersBackground when g_Config.m_ClOverlayEntities == 100
&m_MapLayersBackground, // first to render
&m_Particles.m_RenderTrail,
&m_Items,
&m_Players,
&m_Ghost,
&m_MapLayersForeGround,
&m_MapLayersForeground,
&m_Particles.m_RenderExplosions,
&m_NamePlates,
&m_Particles.m_RenderExtra,

View file

@ -141,9 +141,9 @@ public:
CItems m_Items;
CMapImages m_MapImages;
CMapLayers m_MapLayersBackGround = CMapLayers{CMapLayers::TYPE_BACKGROUND};
CMapLayers m_MapLayersForeGround = CMapLayers{CMapLayers::TYPE_FOREGROUND};
CBackground m_BackGround;
CMapLayers m_MapLayersBackground = CMapLayers{CMapLayers::TYPE_BACKGROUND};
CMapLayers m_MapLayersForeground = CMapLayers{CMapLayers::TYPE_FOREGROUND};
CBackground m_Background;
CMenuBackground m_MenuBackground;
CMapSounds m_MapSounds;