Simplify.

This commit is contained in:
Steve Checkoway
2006-08-21 13:11:45 +00:00
parent f4d1b8aaa2
commit 9b415eb365
+7 -9
View File
@@ -2791,23 +2791,20 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
m_CurrentAction = c; m_CurrentAction = c;
// copy edit into current Steps // copy edit into current Steps
Song* pSong = GAMESTATE->m_pCurSong; m_pSteps->SetNoteData( m_NoteDataEdit );
Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
ASSERT( pSteps );
pSteps->SetNoteData( m_NoteDataEdit );
pSteps->CalculateRadarValues( pSong->m_fMusicLengthSeconds );
switch( EDIT_MODE.GetValue() ) switch( EDIT_MODE.GetValue() )
{ {
DEFAULT_FAIL( EDIT_MODE.GetValue() ); DEFAULT_FAIL( EDIT_MODE.GetValue() );
case EditMode_Home: case EditMode_Home:
{ {
ASSERT( pSteps->IsAnEdit() ); ASSERT( m_pSteps->IsAnEdit() );
NotesWriterSM w; NotesWriterSM w;
RString sError; RString sError;
if( !w.WriteEditFileToMachine(pSong,pSteps,sError) )
m_pSteps->CalculateRadarValues( m_pSong->m_fMusicLengthSeconds );
if( !w.WriteEditFileToMachine(m_pSong, m_pSteps, sError) )
{ {
ScreenPrompt::Prompt( SM_None, sError ); ScreenPrompt::Prompt( SM_None, sError );
break; break;
@@ -2836,7 +2833,8 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
break; break;
case EditMode_Full: case EditMode_Full:
{ {
pSong->Save(); // This will recalculate radar values.
m_pSong->Save();
SCREENMAN->ZeroNextUpdate(); SCREENMAN->ZeroNextUpdate();
HandleScreenMessage( SM_SaveSuccessful ); HandleScreenMessage( SM_SaveSuccessful );