mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #7250 from Robyt3/Cleanup-Background-Foreground-Names
Rename variables containing `ForeGround` and `BackGround`
This commit is contained in:
commit
bca21dc640
|
@ -199,7 +199,7 @@ void CMapSounds::OnRender()
|
||||||
if(Voice.m_pSource->m_PosEnv >= 0)
|
if(Voice.m_pSource->m_PosEnv >= 0)
|
||||||
{
|
{
|
||||||
ColorRGBA Channels;
|
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;
|
OffsetX = Channels.r;
|
||||||
OffsetY = Channels.g;
|
OffsetY = Channels.g;
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ void CMapSounds::OnRender()
|
||||||
if(Voice.m_pSource->m_SoundEnv >= 0)
|
if(Voice.m_pSource->m_SoundEnv >= 0)
|
||||||
{
|
{
|
||||||
ColorRGBA Channels;
|
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);
|
float Volume = clamp(Channels.r, 0.0f, 1.0f);
|
||||||
|
|
||||||
Sound()->SetVoiceVolume(Voice.m_Voice, Volume);
|
Sound()->SetVoiceVolume(Voice.m_Voice, Volume);
|
||||||
|
|
|
@ -89,8 +89,8 @@ void CMenus::HandleDemoSeeking(float PositionToSeek, float TimeToSeek)
|
||||||
else
|
else
|
||||||
DemoPlayer()->SeekPercent(PositionToSeek);
|
DemoPlayer()->SeekPercent(PositionToSeek);
|
||||||
m_pClient->m_SuppressEvents = false;
|
m_pClient->m_SuppressEvents = false;
|
||||||
m_pClient->m_MapLayersBackGround.EnvelopeUpdate();
|
m_pClient->m_MapLayersBackground.EnvelopeUpdate();
|
||||||
m_pClient->m_MapLayersForeGround.EnvelopeUpdate();
|
m_pClient->m_MapLayersForeground.EnvelopeUpdate();
|
||||||
if(!DemoPlayer()->BaseInfo()->m_Paused && PositionToSeek == 1.0f)
|
if(!DemoPlayer()->BaseInfo()->m_Paused && PositionToSeek == 1.0f)
|
||||||
DemoPlayer()->Pause();
|
DemoPlayer()->Pause();
|
||||||
}
|
}
|
||||||
|
@ -102,8 +102,8 @@ void CMenus::DemoSeekTick(IDemoPlayer::ETickOffset TickOffset)
|
||||||
DemoPlayer()->SeekTick(TickOffset);
|
DemoPlayer()->SeekTick(TickOffset);
|
||||||
m_pClient->m_SuppressEvents = false;
|
m_pClient->m_SuppressEvents = false;
|
||||||
DemoPlayer()->Pause();
|
DemoPlayer()->Pause();
|
||||||
m_pClient->m_MapLayersBackGround.EnvelopeUpdate();
|
m_pClient->m_MapLayersBackground.EnvelopeUpdate();
|
||||||
m_pClient->m_MapLayersForeGround.EnvelopeUpdate();
|
m_pClient->m_MapLayersForeground.EnvelopeUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenus::RenderDemoPlayer(CUIRect MainView)
|
void CMenus::RenderDemoPlayer(CUIRect MainView)
|
||||||
|
|
|
@ -3127,8 +3127,8 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
|
||||||
static CButtonContainer s_BackgroundEntitiesReloadButton;
|
static CButtonContainer s_BackgroundEntitiesReloadButton;
|
||||||
if(DoButton_Menu(&s_BackgroundEntitiesReloadButton, Localize("Reload"), 0, &Button))
|
if(DoButton_Menu(&s_BackgroundEntitiesReloadButton, Localize("Reload"), 0, &Button))
|
||||||
{
|
{
|
||||||
if(str_comp(g_Config.m_ClBackgroundEntities, m_pClient->m_BackGround.MapName()) != 0)
|
if(str_comp(g_Config.m_ClBackgroundEntities, m_pClient->m_Background.MapName()) != 0)
|
||||||
m_pClient->m_BackGround.LoadBackground();
|
m_pClient->m_Background.LoadBackground();
|
||||||
}
|
}
|
||||||
|
|
||||||
Background.HSplitTop(20.0f, &Button, &Background);
|
Background.HSplitTop(20.0f, &Button, &Background);
|
||||||
|
@ -3140,7 +3140,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
|
||||||
g_Config.m_ClBackgroundEntities[0] = '\0';
|
g_Config.m_ClBackgroundEntities[0] = '\0';
|
||||||
else
|
else
|
||||||
str_copy(g_Config.m_ClBackgroundEntities, CURRENT_MAP);
|
str_copy(g_Config.m_ClBackgroundEntities, CURRENT_MAP);
|
||||||
m_pClient->m_BackGround.LoadBackground();
|
m_pClient->m_Background.LoadBackground();
|
||||||
}
|
}
|
||||||
|
|
||||||
Background.HSplitTop(20.0f, &Button, &Background);
|
Background.HSplitTop(20.0f, &Button, &Background);
|
||||||
|
|
|
@ -118,13 +118,13 @@ void CGameClient::OnConsoleInit()
|
||||||
&m_Particles, // doesn't render anything, just updates all the particles
|
&m_Particles, // doesn't render anything, just updates all the particles
|
||||||
&m_RaceDemo,
|
&m_RaceDemo,
|
||||||
&m_MapSounds,
|
&m_MapSounds,
|
||||||
&m_BackGround, // render instead of m_MapLayersBackGround when g_Config.m_ClOverlayEntities == 100
|
&m_Background, // render instead of m_MapLayersBackground when g_Config.m_ClOverlayEntities == 100
|
||||||
&m_MapLayersBackGround, // first to render
|
&m_MapLayersBackground, // first to render
|
||||||
&m_Particles.m_RenderTrail,
|
&m_Particles.m_RenderTrail,
|
||||||
&m_Items,
|
&m_Items,
|
||||||
&m_Players,
|
&m_Players,
|
||||||
&m_Ghost,
|
&m_Ghost,
|
||||||
&m_MapLayersForeGround,
|
&m_MapLayersForeground,
|
||||||
&m_Particles.m_RenderExplosions,
|
&m_Particles.m_RenderExplosions,
|
||||||
&m_NamePlates,
|
&m_NamePlates,
|
||||||
&m_Particles.m_RenderExtra,
|
&m_Particles.m_RenderExtra,
|
||||||
|
|
|
@ -141,9 +141,9 @@ public:
|
||||||
CItems m_Items;
|
CItems m_Items;
|
||||||
CMapImages m_MapImages;
|
CMapImages m_MapImages;
|
||||||
|
|
||||||
CMapLayers m_MapLayersBackGround = CMapLayers{CMapLayers::TYPE_BACKGROUND};
|
CMapLayers m_MapLayersBackground = CMapLayers{CMapLayers::TYPE_BACKGROUND};
|
||||||
CMapLayers m_MapLayersForeGround = CMapLayers{CMapLayers::TYPE_FOREGROUND};
|
CMapLayers m_MapLayersForeground = CMapLayers{CMapLayers::TYPE_FOREGROUND};
|
||||||
CBackground m_BackGround;
|
CBackground m_Background;
|
||||||
CMenuBackground m_MenuBackground;
|
CMenuBackground m_MenuBackground;
|
||||||
|
|
||||||
CMapSounds m_MapSounds;
|
CMapSounds m_MapSounds;
|
||||||
|
|
Loading…
Reference in a new issue