fix broken autogen in ScreenEditMenu
This commit is contained in:
+21
-17
@@ -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 )
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user