Handle the background changes.
This commit is contained in:
+6
-6
@@ -517,10 +517,10 @@ void BackgroundImpl::LoadFromSong( const Song* pSong )
|
|||||||
int iSize = min( (int)g_iNumBackgrounds, (int)vsNames.size() );
|
int iSize = min( (int)g_iNumBackgrounds, (int)vsNames.size() );
|
||||||
vsNames.resize( iSize );
|
vsNames.resize( iSize );
|
||||||
|
|
||||||
FOREACH_CONST( RString, vsNames, s )
|
for (RString const &s : vsNames)
|
||||||
{
|
{
|
||||||
BackgroundDef bd;
|
BackgroundDef bd;
|
||||||
bd.m_sFile1 = *s;
|
bd.m_sFile1 = s;
|
||||||
m_RandomBGAnimations.push_back( bd );
|
m_RandomBGAnimations.push_back( bd );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -549,9 +549,9 @@ void BackgroundImpl::LoadFromSong( const Song* pSong )
|
|||||||
Layer &layer = m_Layer[i];
|
Layer &layer = m_Layer[i];
|
||||||
|
|
||||||
// Load all song-specified backgrounds
|
// Load all song-specified backgrounds
|
||||||
FOREACH_CONST( BackgroundChange, pSong->GetBackgroundChanges(i), bgc )
|
for (BackgroundChange const &bgc : pSong->GetBackgroundChanges(i))
|
||||||
{
|
{
|
||||||
BackgroundChange change = *bgc;
|
BackgroundChange change = bgc;
|
||||||
BackgroundDef &bd = change.m_def;
|
BackgroundDef &bd = change.m_def;
|
||||||
|
|
||||||
bool bIsAlreadyLoaded = layer.m_BGAnimations.find(bd) != layer.m_BGAnimations.end();
|
bool bIsAlreadyLoaded = layer.m_BGAnimations.find(bd) != layer.m_BGAnimations.end();
|
||||||
@@ -620,9 +620,9 @@ void BackgroundImpl::LoadFromSong( const Song* pSong )
|
|||||||
FOREACH_BackgroundLayer( i )
|
FOREACH_BackgroundLayer( i )
|
||||||
{
|
{
|
||||||
Layer &layer = m_Layer[i];
|
Layer &layer = m_Layer[i];
|
||||||
FOREACH_CONST( BackgroundChange, layer.m_aBGChanges, bgc )
|
for (BackgroundChange const &bgc : layer.m_aBGChanges)
|
||||||
{
|
{
|
||||||
const BackgroundDef &bd = bgc->m_def;
|
const BackgroundDef &bd = bgc.m_def;
|
||||||
if( bd == m_StaticBackgroundDef )
|
if( bd == m_StaticBackgroundDef )
|
||||||
{
|
{
|
||||||
bStaticBackgroundUsed = true;
|
bStaticBackgroundUsed = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user