Speed Segments Satisfied.
This commit is contained in:
@@ -119,136 +119,6 @@ struct StopSegment
|
||||
bool operator>=( const StopSegment &other ) const { return !operator<(other); }
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Identifies when the arrow scroll changes.
|
||||
*
|
||||
* SpeedSegments take a Player's scrolling BPM (Step's BPM * speed mod),
|
||||
* and then multiplies it with the percentage value. No matter the player's
|
||||
* speed mod, the ratio will be the same. Unlike forced attacks, these
|
||||
* cannot be turned off at a set time: reset it by setting the precentage
|
||||
* back to 1.
|
||||
*
|
||||
* These were inspired by the Pump It Up series. */
|
||||
struct SpeedSegment
|
||||
{
|
||||
/** @brief Sets up the SpeedSegment with default values. */
|
||||
SpeedSegment(): m_iStartRow(0),
|
||||
m_fPercent(1), m_fWait(0), m_usMode(0) {}
|
||||
|
||||
/**
|
||||
* @brief Sets up the SpeedSegment with specified values.
|
||||
* @param i The row this activates.
|
||||
* @param p The percentage to use. */
|
||||
SpeedSegment(int i, float p): m_iStartRow(i),
|
||||
m_fPercent(p), m_fWait(0), m_usMode(0) {}
|
||||
|
||||
/**
|
||||
* @brief Sets up the SpeedSegment with specified values.
|
||||
* @param r The beat this activates.
|
||||
* @param p The percentage to use. */
|
||||
SpeedSegment(float r, float p): m_iStartRow(BeatToNoteRow(r)),
|
||||
m_fPercent(p), m_fWait(0), m_usMode(0) {}
|
||||
|
||||
/**
|
||||
* @brief Sets up the SpeedSegment with specified values.
|
||||
* @param i The row this activates.
|
||||
* @param p The percentage to use.
|
||||
* @param w The number of beats to wait. */
|
||||
SpeedSegment(int i, float p, float w): m_iStartRow(i),
|
||||
m_fPercent(p), m_fWait(w), m_usMode(0) {}
|
||||
|
||||
/**
|
||||
* @brief Sets up the SpeedSegment with specified values.
|
||||
* @param r The beat this activates.
|
||||
* @param p The percentage to use.
|
||||
* @param w The number of beats to wait. */
|
||||
SpeedSegment(float r, float p, float w): m_iStartRow(BeatToNoteRow(r)),
|
||||
m_fPercent(p), m_fWait(w), m_usMode(0) {}
|
||||
|
||||
/**
|
||||
* @brief Sets up the SpeedSegment with specified values.
|
||||
* @param i The row this activates.
|
||||
* @param p The percentage to use.
|
||||
* @param w The number of beats/seconds to wait.
|
||||
* @param k The mode used for the wait variable. */
|
||||
SpeedSegment(int i, float p, float w, unsigned short k): m_iStartRow(i),
|
||||
m_fPercent(p), m_fWait(w), m_usMode(k) {}
|
||||
|
||||
/**
|
||||
* @brief Sets up the SpeedSegment with specified values.
|
||||
* @param r The beat this activates.
|
||||
* @param p The percentage to use.
|
||||
* @param w The number of beats/seconds to wait.
|
||||
* @param k The mode used for the wait variable.*/
|
||||
SpeedSegment(float r, float p, float w, unsigned short k): m_iStartRow(BeatToNoteRow(r)),
|
||||
m_fPercent(p), m_fWait(w), m_usMode(k) {}
|
||||
|
||||
/** @brief The row in which the ComboSegment activates. */
|
||||
int m_iStartRow;
|
||||
/** @brief The percentage to use when multiplying the Player's BPM. */
|
||||
float m_fPercent;
|
||||
/**
|
||||
* @brief The number of beats or seconds to wait for the change to take place.
|
||||
*
|
||||
* A value of 0 means this is immediate. */
|
||||
float m_fWait;
|
||||
/**
|
||||
* @brief The mode that this segment uses for the math.
|
||||
*
|
||||
* 0: beats
|
||||
* 1: seconds
|
||||
* other
|
||||
*/
|
||||
unsigned short m_usMode;
|
||||
|
||||
/**
|
||||
* @brief Compares two SpeedSegments to see if they are equal to each other.
|
||||
* @param other the other SpeedSegment to compare to.
|
||||
* @return the equality of the two segments.
|
||||
*/
|
||||
bool operator==( const SpeedSegment &other ) const
|
||||
{
|
||||
COMPARE( m_iStartRow );
|
||||
COMPARE( m_fPercent );
|
||||
COMPARE( m_usMode );
|
||||
COMPARE( m_fWait );
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* @brief Compares two SpeedSegments to see if they are not equal to each other.
|
||||
* @param other the other SpeedSegment to compare to.
|
||||
* @return the inequality of the two segments.
|
||||
*/
|
||||
bool operator!=( const SpeedSegment &other ) const { return !operator==(other); }
|
||||
/**
|
||||
* @brief Compares two SpeedSegments to see if one is less than the other.
|
||||
* @param other the other SpeedSegment to compare to.
|
||||
* @return the truth/falsehood of if the first is less than the second.
|
||||
*/
|
||||
bool operator<( const SpeedSegment &other ) const { return m_iStartRow < other.m_iStartRow; }
|
||||
/**
|
||||
* @brief Compares two SpeedSegments to see if one is less than or equal to the other.
|
||||
* @param other the other SpeedSegment to compare to.
|
||||
* @return the truth/falsehood of if the first is less or equal to than the second.
|
||||
*/
|
||||
bool operator<=( const SpeedSegment &other ) const
|
||||
{
|
||||
return ( operator<(other) || operator==(other) );
|
||||
}
|
||||
/**
|
||||
* @brief Compares two SpeedSegments to see if one is greater than the other.
|
||||
* @param other the other SpeedSegment to compare to.
|
||||
* @return the truth/falsehood of if the first is greater than the second.
|
||||
*/
|
||||
bool operator>( const SpeedSegment &other ) const { return !operator<=(other); }
|
||||
/**
|
||||
* @brief Compares two SpeedSegments to see if one is greater than or equal to the other.
|
||||
* @param other the other SpeedSegment to compare to.
|
||||
* @return the truth/falsehood of if the first is greater than or equal to the second.
|
||||
*/
|
||||
bool operator>=( const SpeedSegment &other ) const { return !operator<(other); }
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Identifies when the chart scroll changes.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user