Spacing cleanup.

This commit is contained in:
Steve Checkoway
2006-06-16 22:09:39 +00:00
parent 935df3cb0b
commit d8824e36a4
2 changed files with 23 additions and 21 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ NoteType GetNoteType( int row )
else if( row % (ROWS_PER_MEASURE/32) == 0) return NOTE_TYPE_32ND; else if( row % (ROWS_PER_MEASURE/32) == 0) return NOTE_TYPE_32ND;
else if( row % (ROWS_PER_MEASURE/48) == 0) return NOTE_TYPE_48TH; else if( row % (ROWS_PER_MEASURE/48) == 0) return NOTE_TYPE_48TH;
else if( row % (ROWS_PER_MEASURE/64) == 0) return NOTE_TYPE_64TH; else if( row % (ROWS_PER_MEASURE/64) == 0) return NOTE_TYPE_64TH;
else return NOTE_TYPE_INVALID; else return NOTE_TYPE_INVALID;
}; };
NoteType BeatToNoteType( float fBeat ) NoteType BeatToNoteType( float fBeat )
+22 -20
View File
@@ -63,7 +63,8 @@ struct HoldNoteResult
struct TapNote struct TapNote
{ {
enum Type { enum Type
{
empty, // no note here empty, // no note here
tap, tap,
hold_head, // graded like a TAP_TAP if hold_head, // graded like a TAP_TAP if
@@ -78,30 +79,31 @@ struct TapNote
hold_head_roll, hold_head_roll,
SubType_invalid SubType_invalid
} subType; // only used if type == hold_head } subType; // only used if type == hold_head
enum Source { enum Source
{
original, // part of the original NoteData original, // part of the original NoteData
addition, // additional note added by a transform addition, // additional note added by a transform
removed, // Removed taps, e.g. in Little - play keysounds here as if removed, // Removed taps, e.g. in Little - play keysounds here as if
// judged W2, but don't bother rendering or judging this // judged W2, but don't bother rendering or judging this
// step. Also used for when we implement auto-scratch, // step. Also used for when we implement auto-scratch,
// and for if/when we do a "reduce" modifier that cancels out // and for if/when we do a "reduce" modifier that cancels out
// all but N keys on a line [useful for beat->dance autogen, too]. // all but N keys on a line [useful for beat->dance autogen, too].
// Removed hold body (...why?) - acts as follows: // Removed hold body (...why?) - acts as follows:
// 1 - if we're using a sustained-sound gametype [Keyboardmania], and // 1 - if we're using a sustained-sound gametype [Keyboardmania], and
// we've already hit the start of the sound (?? we put Holds Off on?) // we've already hit the start of the sound (?? we put Holds Off on?)
// then this is triggered automatically to keep the sound going // then this is triggered automatically to keep the sound going
// 2 - if we're NOT [anything else], we ignore this. // 2 - if we're NOT [anything else], we ignore this.
// Equivalent to all 4s aside from the first one. // Equivalent to all 4s aside from the first one.
} source; } source;
// Only valid if type == attack. // Only valid if type == attack.
RString sAttackModifiers; RString sAttackModifiers;
float fAttackDurationSeconds; float fAttackDurationSeconds;
bool bKeysound; // true if this note plays a keysound when hit bool bKeysound; // true if this note plays a keysound when hit
int iKeysoundIndex; // index into Song's vector of keysound files. int iKeysoundIndex; // index into Song's vector of keysound files.
// Only valid if bKeysound. // Only valid if bKeysound.
/* hold_head only: */ /* hold_head only: */
int iDuration; int iDuration;
@@ -152,12 +154,12 @@ struct TapNote
} }
}; };
extern TapNote TAP_EMPTY; // '0' extern TapNote TAP_EMPTY; // '0'
extern TapNote TAP_ORIGINAL_TAP; // '1' extern TapNote TAP_ORIGINAL_TAP; // '1'
extern TapNote TAP_ORIGINAL_HOLD_HEAD; // '2' extern TapNote TAP_ORIGINAL_HOLD_HEAD; // '2'
extern TapNote TAP_ORIGINAL_ROLL_HEAD; // '4' extern TapNote TAP_ORIGINAL_ROLL_HEAD; // '4'
extern TapNote TAP_ORIGINAL_MINE; // 'M' extern TapNote TAP_ORIGINAL_MINE; // 'M'
extern TapNote TAP_ORIGINAL_ATTACK; // 'A' extern TapNote TAP_ORIGINAL_ATTACK; // 'A'
extern TapNote TAP_ORIGINAL_AUTO_KEYSOUND; // 'K' extern TapNote TAP_ORIGINAL_AUTO_KEYSOUND; // 'K'
extern TapNote TAP_ADDITION_TAP; extern TapNote TAP_ADDITION_TAP;
extern TapNote TAP_ADDITION_MINE; extern TapNote TAP_ADDITION_MINE;
@@ -214,9 +216,9 @@ inline int BeatToNoteRow( float fBeatNum )
return integer + lrintf(fraction * ROWS_PER_BEAT); return integer + lrintf(fraction * ROWS_PER_BEAT);
} }
*/ */
inline int BeatToNoteRow( float fBeatNum ) { return lrintf( fBeatNum * ROWS_PER_BEAT ); } // round inline int BeatToNoteRow( float fBeatNum ) { return lrintf( fBeatNum * ROWS_PER_BEAT ); } // round
inline int BeatToNoteRowNotRounded( float fBeatNum ) { return (int)( fBeatNum * ROWS_PER_BEAT ); } inline int BeatToNoteRowNotRounded( float fBeatNum ) { return (int)( fBeatNum * ROWS_PER_BEAT ); }
inline float NoteRowToBeat( int iRow ) { return iRow / (float)ROWS_PER_BEAT; } inline float NoteRowToBeat( int iRow ) { return iRow / (float)ROWS_PER_BEAT; }
#endif #endif