remove more magic constants
This commit is contained in:
@@ -51,16 +51,21 @@ char NotesWriterDWI::NotesToDWIChar( bool bCol1, bool bCol2, bool bCol3, bool bC
|
||||
return NotesToDWIChar( bCol1, 0, bCol2, bCol3, 0, bCol4 );
|
||||
}
|
||||
|
||||
CString NotesWriterDWI::NotesToDWIString( char cNoteCol1, char cNoteCol2, char cNoteCol3, char cNoteCol4, char cNoteCol5, char cNoteCol6 )
|
||||
CString NotesWriterDWI::NotesToDWIString( TapNote cNoteCol1, TapNote cNoteCol2, TapNote cNoteCol3, TapNote cNoteCol4, TapNote cNoteCol5, TapNote cNoteCol6 )
|
||||
{
|
||||
char cShow = NotesToDWIChar(
|
||||
cNoteCol1!='0'&&cNoteCol1!='2',
|
||||
cNoteCol2!='0'&&cNoteCol2!='2',
|
||||
cNoteCol3!='0'&&cNoteCol3!='2',
|
||||
cNoteCol4!='0'&&cNoteCol4!='2',
|
||||
cNoteCol5!='0'&&cNoteCol5!='2',
|
||||
cNoteCol6!='0'&&cNoteCol6!='2' );
|
||||
char cHold = NotesToDWIChar( cNoteCol1=='2', cNoteCol2=='2', cNoteCol3=='2', cNoteCol4=='2', cNoteCol5=='2', cNoteCol6=='2' );
|
||||
cNoteCol1 != TAP_EMPTY && cNoteCol1!=TAP_HOLD_HEAD,
|
||||
cNoteCol2 != TAP_EMPTY && cNoteCol2!=TAP_HOLD_HEAD,
|
||||
cNoteCol3 != TAP_EMPTY && cNoteCol3!=TAP_HOLD_HEAD,
|
||||
cNoteCol4 != TAP_EMPTY && cNoteCol4!=TAP_HOLD_HEAD,
|
||||
cNoteCol5 != TAP_EMPTY && cNoteCol5!=TAP_HOLD_HEAD,
|
||||
cNoteCol6 != TAP_EMPTY && cNoteCol6!=TAP_HOLD_HEAD );
|
||||
char cHold = NotesToDWIChar( cNoteCol1==TAP_HOLD_HEAD,
|
||||
cNoteCol2==TAP_HOLD_HEAD,
|
||||
cNoteCol3==TAP_HOLD_HEAD,
|
||||
cNoteCol4==TAP_HOLD_HEAD,
|
||||
cNoteCol5==TAP_HOLD_HEAD,
|
||||
cNoteCol6==TAP_HOLD_HEAD );
|
||||
|
||||
if( cHold != '0' )
|
||||
return ssprintf( "%c!%c", cShow, cHold );
|
||||
@@ -68,9 +73,9 @@ CString NotesWriterDWI::NotesToDWIString( char cNoteCol1, char cNoteCol2, char c
|
||||
return ssprintf( "%c", cShow );
|
||||
}
|
||||
|
||||
CString NotesWriterDWI::NotesToDWIString( char cNoteCol1, char cNoteCol2, char cNoteCol3, char cNoteCol4 )
|
||||
CString NotesWriterDWI::NotesToDWIString( TapNote cNoteCol1, TapNote cNoteCol2, TapNote cNoteCol3, TapNote cNoteCol4 )
|
||||
{
|
||||
return NotesToDWIString( cNoteCol1, '0', cNoteCol2, cNoteCol3, '0', cNoteCol4 );
|
||||
return NotesToDWIString( cNoteCol1, TAP_EMPTY, cNoteCol2, cNoteCol3, TAP_EMPTY, cNoteCol4 );
|
||||
}
|
||||
|
||||
void NotesWriterDWI::WriteDWINotesField( FILE* fp, const Notes &out, int start )
|
||||
|
||||
Reference in New Issue
Block a user