fix broken autogen in ScreenEditMenu

This commit is contained in:
Chris Danford
2003-03-13 01:26:50 +00:00
parent 767894800b
commit d91d043fa9
4 changed files with 28 additions and 24 deletions
+21 -17
View File
@@ -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 )
+3 -3
View File
@@ -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
{
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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 );