diff --git a/stepmania/src/Notes.cpp b/stepmania/src/Notes.cpp index f101fc8128..bbb4e8294e 100644 --- a/stepmania/src/Notes.cpp +++ b/stepmania/src/Notes.cpp @@ -142,10 +142,13 @@ void Notes::TidyUpData() void Notes::Decompress() const { - if(notes) return; - - if(parent) + if(notes) { + return; // already decompressed + } + else if(parent) + { + // get autogen notes NoteData pdata; parent->GetNoteData(&pdata); @@ -158,13 +161,18 @@ void Notes::Decompress() const return; } + else if(!notes_comp) + { + return; /* there is no data */ + } + else + { + // load from compressed + notes = new NoteData; + notes->SetNumTracks( GameManager::NotesTypeToNumTracks(m_NotesType) ); - if(!notes_comp) return; /* no data is no data */ - - notes = new NoteData; - notes->SetNumTracks( GameManager::NotesTypeToNumTracks(m_NotesType) ); - - NoteDataUtil::LoadFromSMNoteDataString(*notes, *notes_comp); + NoteDataUtil::LoadFromSMNoteDataString(*notes, *notes_comp); + } } void Notes::Compress() const @@ -186,21 +194,17 @@ void Notes::DeAutogen() if(!parent) return; /* OK */ + Decompress(); // fills in notes with sliding window transform + m_iMeter = Real()->m_iMeter; m_sDescription = Real()->m_sDescription; m_Difficulty = Real()->m_Difficulty; for(int i = 0; i < NUM_RADAR_CATEGORIES; ++i) m_fRadarValues[i] = Real()->m_fRadarValues[i]; - - delete notes; - notes = NULL; - - if(!notes_comp) - notes_comp = new CString; - - *notes_comp = parent->GetSMNoteData(); parent = NULL; + + Compress(); } void Notes::AutogenFrom( Notes *parent_, NotesType ntTo ) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 6ff51e9de6..b29d9bd392 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -435,12 +435,12 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) m_Toasty.Load( THEME->GetPathTo("BGAnimations","ScreenGameplay toasty") ); this->AddChild( &m_Toasty ); - m_Back.Load( THEME->GetPathTo("BGAnimations","Common back") ); - this->AddChild( &m_Back ); - m_In.Load( THEME->GetPathTo("BGAnimations","ScreenGameplay in") ); this->AddChild( &m_In ); + m_Back.Load( THEME->GetPathTo("BGAnimations","Common back") ); + this->AddChild( &m_Back ); + if( GAMESTATE->IsExtraStage() ) // only load if we're going to use it { diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index 3cb7d11573..fda3b63ffd 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -123,8 +123,8 @@ protected: TransitionBGAnimation m_Failed; TransitionBGAnimation m_Extra; TransitionBGAnimation m_Toasty; // easter egg - TransitionBGAnimation m_Back; TransitionBGAnimation m_In; + TransitionBGAnimation m_Back; BitmapText m_textSurviveTime; // only shown in extra stage BitmapText m_StageName; diff --git a/stepmania/src/ScreenMiniMenu.cpp b/stepmania/src/ScreenMiniMenu.cpp index 6974940b35..c1badb7e55 100644 --- a/stepmania/src/ScreenMiniMenu.cpp +++ b/stepmania/src/ScreenMiniMenu.cpp @@ -123,7 +123,7 @@ ScreenMiniMenu::ScreenMiniMenu( MiniMenuDefinition* pDef, ScreenMessage SM_SendO m_textAnswer[k].SetX( fAnswerX ); } - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu prompt") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","ScreenMiniMenu music") ); } void ScreenMiniMenu::Update( float fDeltaTime ) @@ -229,7 +229,7 @@ void ScreenMiniMenu::BeforeLineChanged() m_textAnswer[m_iCurLine].SetEffectNone(); m_textLabel[m_iCurLine].SetZoom( ZOOM_NOT_SELECTED ); m_textAnswer[m_iCurLine].SetZoom( ZOOM_NOT_SELECTED ); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","mini menu row") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","ScreenMiniMenu row") ); } void ScreenMiniMenu::AfterLineChanged() @@ -242,7 +242,7 @@ void ScreenMiniMenu::AfterLineChanged() void ScreenMiniMenu::AfterAnswerChanged() { - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","mini menu row") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","ScreenMiniMenu row") ); int iAnswerInRow = m_iCurAnswers[m_iCurLine]; CString sAnswerText = m_Def.lines[m_iCurLine].szOptionsText[iAnswerInRow]; m_textAnswer[m_iCurLine].SetText( sAnswerText );