[timing] Caveat #2 fixed.

Caveat #1 won't be until we make Delays their own
segment...and somehow don't screw up the timing.
This commit is contained in:
Jason Felds
2011-07-15 00:14:13 -04:00
parent 01dacd9746
commit 4e7c3282ec
4 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -1560,13 +1560,13 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
case EDIT_BUTTON_CYCLE_SEGMENT_LEFT:
{
int tmp = enum_add2( this->currentCycleSegment, -1 );
wrap( *ConvertValue<int>(&tmp), NUM_TimingSegmentTypes );
wrap( *ConvertValue<int>(&tmp), NUM_TimingSegmentType );
break;
}
case EDIT_BUTTON_CYCLE_SEGMENT_RIGHT:
{
int tmp = enum_add2( this->currentCycleSegment, +1 );
wrap( *ConvertValue<int>(&tmp), NUM_TimingSegmentTypes );
wrap( *ConvertValue<int>(&tmp), NUM_TimingSegmentType );
break; }
case EDIT_BUTTON_SCROLL_SPEED_UP:
case EDIT_BUTTON_SCROLL_SPEED_DOWN:
+4 -4
View File
@@ -16,7 +16,7 @@ TimingData::TimingData(float fOffset) :
TimingData::~TimingData()
{
for (unsigned i = 0; i < NUM_TimingSegmentTypes; i++)
for (unsigned i = 0; i < NUM_TimingSegmentType; i++)
{
this->allTimingSegments[i].clear();
}
@@ -1001,7 +1001,7 @@ void TimingData::ScaleRegion( float fScale, int iStartIndex, int iEndIndex, bool
int newLength = lrintf( fScale * length );
// TODO: Confirm this works as intended.
for (unsigned i = 0; i < NUM_TimingSegmentTypes; i++)
for (unsigned i = 0; i < NUM_TimingSegmentType; i++)
{
vector<TimingSegment *> &segs = this->allTimingSegments[i];
for (unsigned j = 0; j < segs.size(); j++)
@@ -1037,7 +1037,7 @@ void TimingData::ScaleRegion( float fScale, int iStartIndex, int iEndIndex, bool
void TimingData::InsertRows( int iStartRow, int iRowsToAdd )
{
for (unsigned i = 0; i < NUM_TimingSegmentTypes; i++)
for (unsigned i = 0; i < NUM_TimingSegmentType; i++)
{
vector<TimingSegment *> &segs = this->allTimingSegments[i];
for (unsigned j = 0; j < segs.size(); j++)
@@ -1067,7 +1067,7 @@ void TimingData::DeleteRows( int iStartRow, int iRowsToDelete )
/* We're moving rows up. Delete any BPM changes and stops in the region
* being deleted. */
for (unsigned i = 0; i < NUM_TimingSegmentTypes; i++)
for (unsigned i = 0; i < NUM_TimingSegmentType; i++)
{
vector<TimingSegment *> &segs = this->allTimingSegments[i];
for (unsigned j = 0; j < segs.size(); j++)
+2 -2
View File
@@ -781,7 +781,7 @@ public:
*/
bool operator==( const TimingData &other )
{
for (int i = 0; i < NUM_TimingSegmentTypes; i++)
for (int i = 0; i < NUM_TimingSegmentType; i++)
{
COMPARE(allTimingSegments[i].size());
for (unsigned j=0; j < allTimingSegments[i].size(); j++)
@@ -819,7 +819,7 @@ public:
// All of the following vectors must be sorted before gameplay.
vector<TimingSegment *> allTimingSegments[NUM_TimingSegmentTypes];
vector<TimingSegment *> allTimingSegments[NUM_TimingSegmentType];
/**
* @brief The initial offset of a song.
+1 -1
View File
@@ -18,7 +18,7 @@ enum TimingSegmentType
SEGMENT_SPEED,
SEGMENT_SCROLL,
SEGMENT_FAKE,
NUM_TimingSegmentTypes,
NUM_TimingSegmentType,
};
const RString& TimingSegmentTypeToString( TimingSegmentType tst );