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 );
|
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(
|
char cShow = NotesToDWIChar(
|
||||||
cNoteCol1!='0'&&cNoteCol1!='2',
|
cNoteCol1 != TAP_EMPTY && cNoteCol1!=TAP_HOLD_HEAD,
|
||||||
cNoteCol2!='0'&&cNoteCol2!='2',
|
cNoteCol2 != TAP_EMPTY && cNoteCol2!=TAP_HOLD_HEAD,
|
||||||
cNoteCol3!='0'&&cNoteCol3!='2',
|
cNoteCol3 != TAP_EMPTY && cNoteCol3!=TAP_HOLD_HEAD,
|
||||||
cNoteCol4!='0'&&cNoteCol4!='2',
|
cNoteCol4 != TAP_EMPTY && cNoteCol4!=TAP_HOLD_HEAD,
|
||||||
cNoteCol5!='0'&&cNoteCol5!='2',
|
cNoteCol5 != TAP_EMPTY && cNoteCol5!=TAP_HOLD_HEAD,
|
||||||
cNoteCol6!='0'&&cNoteCol6!='2' );
|
cNoteCol6 != TAP_EMPTY && cNoteCol6!=TAP_HOLD_HEAD );
|
||||||
char cHold = NotesToDWIChar( cNoteCol1=='2', cNoteCol2=='2', cNoteCol3=='2', cNoteCol4=='2', cNoteCol5=='2', cNoteCol6=='2' );
|
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' )
|
if( cHold != '0' )
|
||||||
return ssprintf( "%c!%c", cShow, cHold );
|
return ssprintf( "%c!%c", cShow, cHold );
|
||||||
@@ -68,9 +73,9 @@ CString NotesWriterDWI::NotesToDWIString( char cNoteCol1, char cNoteCol2, char c
|
|||||||
return ssprintf( "%c", cShow );
|
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 )
|
void NotesWriterDWI::WriteDWINotesField( FILE* fp, const Notes &out, int start )
|
||||||
|
|||||||
@@ -3,11 +3,13 @@
|
|||||||
|
|
||||||
#include "Song.h"
|
#include "Song.h"
|
||||||
#include "Notes.h"
|
#include "Notes.h"
|
||||||
|
#include "NoteTypes.h"
|
||||||
|
|
||||||
class NotesWriterDWI {
|
class NotesWriterDWI {
|
||||||
char NotesToDWIChar( bool bCol1, bool bCol2, bool bCol3, bool bCol4, bool bCol5, bool bCol6 );
|
char NotesToDWIChar( bool bCol1, bool bCol2, bool bCol3, bool bCol4, bool bCol5, bool bCol6 );
|
||||||
char NotesToDWIChar( bool bCol1, bool bCol2, bool bCol3, bool bCol4 );
|
char NotesToDWIChar( bool bCol1, bool bCol2, bool bCol3, bool bCol4 );
|
||||||
CString NotesToDWIString( char cNoteCol1, char cNoteCol2, char cNoteCol3, char cNoteCol4, char cNoteCol5, char cNoteCol6 );
|
CString NotesToDWIString( TapNote cNoteCol1, TapNote cNoteCol2, TapNote cNoteCol3, TapNote cNoteCol4, TapNote cNoteCol5, TapNote cNoteCol6 );
|
||||||
|
CString NotesToDWIString( TapNote cNoteCol1, TapNote cNoteCol2, TapNote cNoteCol3, TapNote cNoteCol4 );
|
||||||
CString NotesToDWIString( char cNoteCol1, char cNoteCol2, char cNoteCol3, char cNoteCol4 );
|
CString NotesToDWIString( char cNoteCol1, char cNoteCol2, char cNoteCol3, char cNoteCol4 );
|
||||||
void WriteDWINotesField( FILE* fp, const Notes &out, int start );
|
void WriteDWINotesField( FILE* fp, const Notes &out, int start );
|
||||||
bool WriteDWINotesTag( FILE* fp, const Notes &out );
|
bool WriteDWINotesTag( FILE* fp, const Notes &out );
|
||||||
|
|||||||
Reference in New Issue
Block a user