Fix ScreenGameply + course problems
Put Toasty underneath Players so it doesn't cover up arrows Add support for BackgroundChange to a static graphic in the song dir
This commit is contained in:
@@ -113,12 +113,19 @@ BGAnimation *Background::CreateSongBGA(const Song *pSong, CString sBGName) const
|
|||||||
pTempBGA->LoadFromAniDir( asFiles[0] );
|
pTempBGA->LoadFromAniDir( asFiles[0] );
|
||||||
return pTempBGA;
|
return pTempBGA;
|
||||||
}
|
}
|
||||||
// Look for BG movies in the song dir
|
// Look for BG movies or static graphics in the song dir
|
||||||
GetDirListing( pSong->GetSongDir()+sBGName, asFiles, false, true );
|
GetDirListing( pSong->GetSongDir()+sBGName, asFiles, false, true );
|
||||||
if( !asFiles.empty() )
|
if( !asFiles.empty() )
|
||||||
{
|
{
|
||||||
pTempBGA = new BGAnimation;
|
pTempBGA = new BGAnimation;
|
||||||
|
CString sThrowAway, sExt;
|
||||||
|
splitrelpath( asFiles[0], sThrowAway, sThrowAway, sExt );
|
||||||
|
if( sExt.CompareNoCase("avi")==0 ||
|
||||||
|
sExt.CompareNoCase("mpg")==0 ||
|
||||||
|
sExt.CompareNoCase("mpeg")==0 )
|
||||||
pTempBGA->LoadFromMovie( asFiles[0], true, true );
|
pTempBGA->LoadFromMovie( asFiles[0], true, true );
|
||||||
|
else
|
||||||
|
pTempBGA->LoadFromStaticGraphic( asFiles[0] );
|
||||||
return pTempBGA;
|
return pTempBGA;
|
||||||
}
|
}
|
||||||
// Look for movies in the RandomMovies dir
|
// Look for movies in the RandomMovies dir
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ Menu g_BGChange
|
|||||||
MenuRow( "Add Change to random", true ),
|
MenuRow( "Add Change to random", true ),
|
||||||
MenuRow( "Add Change to song BGAnimation", true ),
|
MenuRow( "Add Change to song BGAnimation", true ),
|
||||||
MenuRow( "Add Change to song Movie", true ),
|
MenuRow( "Add Change to song Movie", true ),
|
||||||
|
MenuRow( "Add Change to song Still", true ),
|
||||||
MenuRow( "Add Change to global Random Movie", true ),
|
MenuRow( "Add Change to global Random Movie", true ),
|
||||||
MenuRow( "Add Change to global BGAnimation", true ),
|
MenuRow( "Add Change to global BGAnimation", true ),
|
||||||
MenuRow( "Add Change to global Visualization", true ),
|
MenuRow( "Add Change to global Visualization", true ),
|
||||||
@@ -1252,6 +1253,12 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, int* iAnswers )
|
|||||||
GetDirListing( m_pSong->GetSongDir()+"*.mpg", g_BGChange.rows[add_song_movie].choices, false );
|
GetDirListing( m_pSong->GetSongDir()+"*.mpg", g_BGChange.rows[add_song_movie].choices, false );
|
||||||
GetDirListing( m_pSong->GetSongDir()+"*.mpeg", g_BGChange.rows[add_song_movie].choices, false );
|
GetDirListing( m_pSong->GetSongDir()+"*.mpeg", g_BGChange.rows[add_song_movie].choices, false );
|
||||||
|
|
||||||
|
g_BGChange.rows[add_song_still].choices.clear();
|
||||||
|
GetDirListing( m_pSong->GetSongDir()+"*.png", g_BGChange.rows[add_song_still].choices, false );
|
||||||
|
GetDirListing( m_pSong->GetSongDir()+"*.jpg", g_BGChange.rows[add_song_still].choices, false );
|
||||||
|
GetDirListing( m_pSong->GetSongDir()+"*.gif", g_BGChange.rows[add_song_still].choices, false );
|
||||||
|
GetDirListing( m_pSong->GetSongDir()+"*.bmp", g_BGChange.rows[add_song_still].choices, false );
|
||||||
|
|
||||||
g_BGChange.rows[add_global_random_movie].choices.clear();
|
g_BGChange.rows[add_global_random_movie].choices.clear();
|
||||||
GetDirListing( RANDOMMOVIES_DIR+"*.avi", g_BGChange.rows[add_global_random_movie].choices, false );
|
GetDirListing( RANDOMMOVIES_DIR+"*.avi", g_BGChange.rows[add_global_random_movie].choices, false );
|
||||||
GetDirListing( RANDOMMOVIES_DIR+"*.mpg", g_BGChange.rows[add_global_random_movie].choices, false );
|
GetDirListing( RANDOMMOVIES_DIR+"*.mpg", g_BGChange.rows[add_global_random_movie].choices, false );
|
||||||
@@ -1277,6 +1284,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, int* iAnswers )
|
|||||||
g_BGChange.rows[add_random].enabled = true;
|
g_BGChange.rows[add_random].enabled = true;
|
||||||
g_BGChange.rows[add_song_bganimation].enabled = g_BGChange.rows[add_song_bganimation].choices.size() > 0;
|
g_BGChange.rows[add_song_bganimation].enabled = g_BGChange.rows[add_song_bganimation].choices.size() > 0;
|
||||||
g_BGChange.rows[add_song_movie].enabled = g_BGChange.rows[add_song_movie].choices.size() > 0;
|
g_BGChange.rows[add_song_movie].enabled = g_BGChange.rows[add_song_movie].choices.size() > 0;
|
||||||
|
g_BGChange.rows[add_song_still].enabled = g_BGChange.rows[add_song_still].choices.size() > 0;
|
||||||
g_BGChange.rows[add_global_random_movie].enabled = g_BGChange.rows[add_global_random_movie].choices.size() > 0;
|
g_BGChange.rows[add_global_random_movie].enabled = g_BGChange.rows[add_global_random_movie].choices.size() > 0;
|
||||||
g_BGChange.rows[add_global_bganimation].enabled = g_BGChange.rows[add_global_bganimation].choices.size() > 0;
|
g_BGChange.rows[add_global_bganimation].enabled = g_BGChange.rows[add_global_bganimation].choices.size() > 0;
|
||||||
g_BGChange.rows[add_global_visualization].enabled = g_BGChange.rows[add_global_visualization].choices.size() > 0;
|
g_BGChange.rows[add_global_visualization].enabled = g_BGChange.rows[add_global_visualization].choices.size() > 0;
|
||||||
@@ -1543,6 +1551,7 @@ void ScreenEdit::HandleBGChangeChoice( BGChangeChoice c, int* iAnswers )
|
|||||||
break;
|
break;
|
||||||
case add_song_bganimation:
|
case add_song_bganimation:
|
||||||
case add_song_movie:
|
case add_song_movie:
|
||||||
|
case add_song_still:
|
||||||
case add_global_random_movie:
|
case add_global_random_movie:
|
||||||
case add_global_bganimation:
|
case add_global_bganimation:
|
||||||
case add_global_visualization:
|
case add_global_visualization:
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ public:
|
|||||||
add_random,
|
add_random,
|
||||||
add_song_bganimation,
|
add_song_bganimation,
|
||||||
add_song_movie,
|
add_song_movie,
|
||||||
|
add_song_still,
|
||||||
add_global_random_movie,
|
add_global_random_movie,
|
||||||
add_global_bganimation,
|
add_global_bganimation,
|
||||||
add_global_visualization,
|
add_global_visualization,
|
||||||
|
|||||||
@@ -217,6 +217,12 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay")
|
|||||||
m_Background.SetDiffuse( RageColor(0.4f,0.4f,0.4f,1) );
|
m_Background.SetDiffuse( RageColor(0.4f,0.4f,0.4f,1) );
|
||||||
this->AddChild( &m_Background );
|
this->AddChild( &m_Background );
|
||||||
|
|
||||||
|
if( !bDemonstration ) // only load if we're going to use it
|
||||||
|
{
|
||||||
|
m_Toasty.Load( THEME->GetPathToB("ScreenGameplay toasty") );
|
||||||
|
this->AddChild( &m_Toasty );
|
||||||
|
}
|
||||||
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
if( !GAMESTATE->IsPlayerEnabled(PlayerNumber(p)) )
|
if( !GAMESTATE->IsPlayerEnabled(PlayerNumber(p)) )
|
||||||
@@ -293,6 +299,10 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay")
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
m_sprStage.SetName( ssprintf("Stage%s",bExtra?"Extra":"") );
|
||||||
|
SET_XY( m_sprStage );
|
||||||
|
|
||||||
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
m_textCourseSongNumber[p].LoadFromNumbers( THEME->GetPathToN("ScreenGameplay song num") );
|
m_textCourseSongNumber[p].LoadFromNumbers( THEME->GetPathToN("ScreenGameplay song num") );
|
||||||
@@ -309,8 +319,6 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay")
|
|||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
m_sprStage.Load( THEME->GetPathToG("ScreenGameplay stage "+GAMESTATE->GetStageText()) );
|
m_sprStage.Load( THEME->GetPathToG("ScreenGameplay stage "+GAMESTATE->GetStageText()) );
|
||||||
m_sprStage.SetName( ssprintf("Stage%s",bExtra?"Extra":"") );
|
|
||||||
SET_XY( m_sprStage );
|
|
||||||
this->AddChild( &m_sprStage );
|
this->AddChild( &m_sprStage );
|
||||||
break;
|
break;
|
||||||
case PLAY_MODE_NONSTOP:
|
case PLAY_MODE_NONSTOP:
|
||||||
@@ -462,9 +470,6 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay")
|
|||||||
m_Extra.Load( THEME->GetPathToB("ScreenGameplay extra2") );
|
m_Extra.Load( THEME->GetPathToB("ScreenGameplay extra2") );
|
||||||
this->AddChild( &m_Extra );
|
this->AddChild( &m_Extra );
|
||||||
|
|
||||||
m_Toasty.Load( THEME->GetPathToB("ScreenGameplay toasty") );
|
|
||||||
this->AddChild( &m_Toasty );
|
|
||||||
|
|
||||||
m_In.Load( THEME->GetPathToB("ScreenGameplay in") );
|
m_In.Load( THEME->GetPathToB("ScreenGameplay in") );
|
||||||
this->AddChild( &m_In );
|
this->AddChild( &m_In );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user