Add Miss Combo support in #COMBOS tag.

This commit is contained in:
Jason Felds
2011-07-09 02:28:15 -04:00
parent 222587f388
commit 08d5f8f722
17 changed files with 190 additions and 43 deletions
+26 -2
View File
@@ -344,7 +344,8 @@ struct ComboSegment : public TimingSegment<ComboSegment>
ComboSegment(const ComboSegment &other) :
TimingSegment<ComboSegment>(other),
combo(other.GetCombo()) {};
combo(other.GetCombo()),
missCombo(other.GetMissCombo()) {};
/**
* @brief Creates a Combo Segment with the specified values.
@@ -354,18 +355,39 @@ struct ComboSegment : public TimingSegment<ComboSegment>
template <typename StartType>
ComboSegment( StartType s, int t ):
TimingSegment<ComboSegment>(max((StartType)0, s)),
combo(max(0,t)) {}
combo(max(0,t)), missCombo(max(0,t)) {}
/**
* @brief Creates a Combo Segment with the specified values.
* @param s the starting row / beat of this segment.
* @param t the amount the combo increases on a succesful hit.
* @param m the amount the miss combo increases on missing.
*/
template <typename StartType>
ComboSegment(StartType s, int t, int m):
TimingSegment<ComboSegment>(max((StartType)0, s)),
combo(max(0,t)), missCombo(max(0,m)) {}
/**
* @brief Get the combo in this ComboSegment.
* @return the combo. */
int GetCombo() const;
/**
* @brief Get the miss combo in this ComboSegment.
* @return the miss combo. */
int GetMissCombo() const;
/**
* @brief Set the combo in this ComboSegment.
* @param i the combo. */
void SetCombo(const int i);
/**
* @brief Set the miss combo in this ComboSegment.
* @param i the miss combo. */
void SetMissCombo(const int i);
/**
* @brief Compares two ComboSegments to see if one is less than the other.
* @param other the other ComboSegment to compare to.
@@ -377,6 +399,8 @@ private:
* @brief The amount the combo increases at this point.
*/
int combo;
/** @brief The amount of miss combos given at this point. */
int missCombo;
};