diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 4f3c9035f5..fa824ab539 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -27,6 +27,7 @@ #include "GameState.h" #include "RageTextureManager.h" #include "SongManager.h" +#include "Course.h" Actor* LoadFromActorFile( CString sIniPath, CString sLayer ) @@ -109,6 +110,21 @@ Actor* LoadFromActorFile( CString sIniPath, CString sLayer ) pActor = MakeActor( sFile ); TEXTUREMAN->EnableOddDimensionWarning(); } + else if( sFile.CompareNoCase("coursebanner")==0 ) + { + Course *pCourse = GAMESTATE->m_pCurCourse; + if( pCourse == NULL ) + pCourse = SONGMAN->GetRandomCourse(); + + if( pCourse && pCourse->HasBanner() ) + sFile = pCourse->m_sBannerPath; + else + sFile = THEME->GetPathToG("Common fallback banner"); + + TEXTUREMAN->DisableOddDimensionWarning(); + pActor = MakeActor( sFile ); + TEXTUREMAN->EnableOddDimensionWarning(); + } else if( IsAFile(sDir+sFile) || IsADirectory(sDir+sFile) ) { // If we know this is an exact match, don't bother with the