add edit flag

This commit is contained in:
Chris Danford
2004-02-07 05:57:19 +00:00
parent 8e2033f005
commit 36ffb71851
2 changed files with 18 additions and 6 deletions
+14 -4
View File
@@ -34,7 +34,9 @@ Steps::Steps()
* I have a feeling that it's the right thing to do but that
* it'd trip obscure asserts all over the place, so I'll wait
* until after b6 to do this. -glenn */
m_StepsType = STEPS_TYPE_DANCE_SINGLE;
/* Yep, it should be STEPS_TYPE_INVALID. -Chris */
m_StepsType = STEPS_TYPE_INVALID;
m_bIsAnEdit = false;
m_Difficulty = DIFFICULTY_INVALID;
m_iMeter = 0;
for(int i = 0; i < NUM_RADAR_CATEGORIES; ++i)
@@ -170,8 +172,9 @@ void Steps::TidyUpData()
}*/
}
if( m_sDescription.empty() )
m_sDescription = Capitalize( DifficultyToString(m_Difficulty) );
// Don't put garbage in the desciption.
// if( m_sDescription.empty() )
// m_sDescription = Capitalize( DifficultyToString(m_Difficulty) );
}
void Steps::Decompress() const
@@ -230,9 +233,10 @@ void Steps::DeAutogen()
Decompress(); // fills in notes with sliding window transform
m_iMeter = Real()->m_iMeter;
m_bIsAnEdit = Real()->m_bIsAnEdit;
m_sDescription = Real()->m_sDescription;
m_Difficulty = Real()->m_Difficulty;
m_iMeter = Real()->m_iMeter;
for(int i = 0; i < NUM_RADAR_CATEGORIES; ++i)
m_fRadarValues[i] = Real()->m_fRadarValues[i];
@@ -283,6 +287,12 @@ bool Steps::IsAutogen() const
return parent != NULL;
}
void Steps::SetIsAnEdit(bool b)
{
DeAutogen();
m_bIsAnEdit = b;
}
void Steps::SetDescription(CString desc)
{
DeAutogen();
+4 -2
View File
@@ -38,6 +38,7 @@ public:
int GetMeter() const { return Real()->m_iMeter; }
const float *GetRadarValues() const { return Real()->m_fRadarValues; }
void SetIsAnEdit(bool b);
void SetDescription(CString desc);
void SetDifficulty(Difficulty d);
void SetMeter(int meter);
@@ -124,9 +125,10 @@ protected:
const Steps *Real() const;
/* These values are pulled from the autogen source first, if there is one. */
CString m_sDescription; // This text is displayed next to the number of feet when a song is selected
bool m_bIsAnEdit; // true if this was loaded from a memory card
CString m_sDescription; // Step author, edit name, or something meaningful
Difficulty m_Difficulty; // difficulty classification
int m_iMeter; // difficulty rating from 1-10
int m_iMeter; // difficulty rating from MIN_METER to MAX_METER
float m_fRadarValues[NUM_RADAR_CATEGORIES]; // between 0.0-1.2 starting from 12-o'clock rotating clockwise
};