fix broken autogen in ScreenEditMenu
This commit is contained in:
+18
-14
@@ -142,10 +142,13 @@ void Notes::TidyUpData()
|
|||||||
|
|
||||||
void Notes::Decompress() const
|
void Notes::Decompress() const
|
||||||
{
|
{
|
||||||
if(notes) return;
|
if(notes)
|
||||||
|
|
||||||
if(parent)
|
|
||||||
{
|
{
|
||||||
|
return; // already decompressed
|
||||||
|
}
|
||||||
|
else if(parent)
|
||||||
|
{
|
||||||
|
// get autogen notes
|
||||||
NoteData pdata;
|
NoteData pdata;
|
||||||
parent->GetNoteData(&pdata);
|
parent->GetNoteData(&pdata);
|
||||||
|
|
||||||
@@ -158,14 +161,19 @@ void Notes::Decompress() const
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if(!notes_comp)
|
||||||
if(!notes_comp) return; /* no data is no data */
|
{
|
||||||
|
return; /* there is no data */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// load from compressed
|
||||||
notes = new NoteData;
|
notes = new NoteData;
|
||||||
notes->SetNumTracks( GameManager::NotesTypeToNumTracks(m_NotesType) );
|
notes->SetNumTracks( GameManager::NotesTypeToNumTracks(m_NotesType) );
|
||||||
|
|
||||||
NoteDataUtil::LoadFromSMNoteDataString(*notes, *notes_comp);
|
NoteDataUtil::LoadFromSMNoteDataString(*notes, *notes_comp);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Notes::Compress() const
|
void Notes::Compress() const
|
||||||
{
|
{
|
||||||
@@ -186,21 +194,17 @@ void Notes::DeAutogen()
|
|||||||
if(!parent)
|
if(!parent)
|
||||||
return; /* OK */
|
return; /* OK */
|
||||||
|
|
||||||
|
Decompress(); // fills in notes with sliding window transform
|
||||||
|
|
||||||
m_iMeter = Real()->m_iMeter;
|
m_iMeter = Real()->m_iMeter;
|
||||||
m_sDescription = Real()->m_sDescription;
|
m_sDescription = Real()->m_sDescription;
|
||||||
m_Difficulty = Real()->m_Difficulty;
|
m_Difficulty = Real()->m_Difficulty;
|
||||||
for(int i = 0; i < NUM_RADAR_CATEGORIES; ++i)
|
for(int i = 0; i < NUM_RADAR_CATEGORIES; ++i)
|
||||||
m_fRadarValues[i] = Real()->m_fRadarValues[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;
|
parent = NULL;
|
||||||
|
|
||||||
|
Compress();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Notes::AutogenFrom( Notes *parent_, NotesType ntTo )
|
void Notes::AutogenFrom( Notes *parent_, NotesType ntTo )
|
||||||
|
|||||||
@@ -435,12 +435,12 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration )
|
|||||||
m_Toasty.Load( THEME->GetPathTo("BGAnimations","ScreenGameplay toasty") );
|
m_Toasty.Load( THEME->GetPathTo("BGAnimations","ScreenGameplay toasty") );
|
||||||
this->AddChild( &m_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") );
|
m_In.Load( THEME->GetPathTo("BGAnimations","ScreenGameplay in") );
|
||||||
this->AddChild( &m_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
|
if( GAMESTATE->IsExtraStage() ) // only load if we're going to use it
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -123,8 +123,8 @@ protected:
|
|||||||
TransitionBGAnimation m_Failed;
|
TransitionBGAnimation m_Failed;
|
||||||
TransitionBGAnimation m_Extra;
|
TransitionBGAnimation m_Extra;
|
||||||
TransitionBGAnimation m_Toasty; // easter egg
|
TransitionBGAnimation m_Toasty; // easter egg
|
||||||
TransitionBGAnimation m_Back;
|
|
||||||
TransitionBGAnimation m_In;
|
TransitionBGAnimation m_In;
|
||||||
|
TransitionBGAnimation m_Back;
|
||||||
|
|
||||||
BitmapText m_textSurviveTime; // only shown in extra stage
|
BitmapText m_textSurviveTime; // only shown in extra stage
|
||||||
BitmapText m_StageName;
|
BitmapText m_StageName;
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ ScreenMiniMenu::ScreenMiniMenu( MiniMenuDefinition* pDef, ScreenMessage SM_SendO
|
|||||||
m_textAnswer[k].SetX( fAnswerX );
|
m_textAnswer[k].SetX( fAnswerX );
|
||||||
}
|
}
|
||||||
|
|
||||||
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu prompt") );
|
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","ScreenMiniMenu music") );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenMiniMenu::Update( float fDeltaTime )
|
void ScreenMiniMenu::Update( float fDeltaTime )
|
||||||
@@ -229,7 +229,7 @@ void ScreenMiniMenu::BeforeLineChanged()
|
|||||||
m_textAnswer[m_iCurLine].SetEffectNone();
|
m_textAnswer[m_iCurLine].SetEffectNone();
|
||||||
m_textLabel[m_iCurLine].SetZoom( ZOOM_NOT_SELECTED );
|
m_textLabel[m_iCurLine].SetZoom( ZOOM_NOT_SELECTED );
|
||||||
m_textAnswer[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()
|
void ScreenMiniMenu::AfterLineChanged()
|
||||||
@@ -242,7 +242,7 @@ void ScreenMiniMenu::AfterLineChanged()
|
|||||||
|
|
||||||
void ScreenMiniMenu::AfterAnswerChanged()
|
void ScreenMiniMenu::AfterAnswerChanged()
|
||||||
{
|
{
|
||||||
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","mini menu row") );
|
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","ScreenMiniMenu row") );
|
||||||
int iAnswerInRow = m_iCurAnswers[m_iCurLine];
|
int iAnswerInRow = m_iCurAnswers[m_iCurLine];
|
||||||
CString sAnswerText = m_Def.lines[m_iCurLine].szOptionsText[iAnswerInRow];
|
CString sAnswerText = m_Def.lines[m_iCurLine].szOptionsText[iAnswerInRow];
|
||||||
m_textAnswer[m_iCurLine].SetText( sAnswerText );
|
m_textAnswer[m_iCurLine].SetText( sAnswerText );
|
||||||
|
|||||||
Reference in New Issue
Block a user