fix up DWI writer, leave notes for things to fix soon

This commit is contained in:
Matt Denham
2003-11-04 08:44:26 +00:00
parent 02a6a82bd6
commit 6a4a16e5a6
3 changed files with 18 additions and 9 deletions
+2
View File
@@ -148,6 +148,8 @@ bool CodeDetector::EnteredNextSort( GameController controller )
#define TOGGLE(v,a,b) if(v!=a) v=a; else v=b;
#define FLOAT_TOGGLE(v) if(v!=1.f) v=1.f; else v=0.f;
// XXX: Read the metrics file instead!
// Using this can give us unlisted scroll speeds on the Options screen.
#define INCREMENT_SCROLL_SPEED(s) (s==0.5f) ? s=0.75f : (s==0.75f) ? s=1.0f : (s==1.0f) ? s=1.5f : (s==1.5f) ? s=2.0f : (s==2.0f) ? s=3.0f : (s==3.0f) ? s=4.0f : (s==4.0f) ? s=5.0f : (s==5.0f) ? s=8.0f : s=0.5f;
#define DECREMENT_SCROLL_SPEED(s) (s==0.75f) ? s=0.5f : (s==1.0f) ? s=0.75f : (s==1.5f) ? s=1.0f : (s==2.0f) ? s=1.5f : (s==3.0f) ? s=2.0f : (s==4.0f) ? s=3.0f : (s==5.0f) ? s=4.0f : (s==8.0f) ? s=4.0f : s=8.0f;
+13 -9
View File
@@ -206,18 +206,20 @@ void NotesWriterDWI::WriteDWINotesField( FILE* fp, const Steps &out, int start )
fCurrentIncrementer = 1.0/16 * BEATS_PER_MEASURE;
break;
case NOTE_TYPE_32ND:
/* XXX: This is valid for 64ths, too, but we don't
* have NOTE_TYPE_64TH, so we'll write 64ths as
* 192nds. */
case NOTE_TYPE_64TH:
fprintf( fp, "{" );
fCurrentIncrementer = 1.0/64 * BEATS_PER_MEASURE;
break;
case NOTE_TYPE_48TH:
case NOTE_TYPE_INVALID:
// since, for whatever reason, the only way to do
// 48ths is through a block of 192nds...
fprintf( fp, "`" );
fCurrentIncrementer = 1.0/192 * BEATS_PER_MEASURE;
break;
default:
ASSERT(0);
// fall though
case NOTE_TYPE_INVALID:
fprintf( fp, "`" );
fCurrentIncrementer = 1.0/192 * BEATS_PER_MEASURE;
}
double fFirstBeatInMeasure = m * BEATS_PER_MEASURE;
@@ -281,14 +283,16 @@ void NotesWriterDWI::WriteDWINotesField( FILE* fp, const Steps &out, int start )
fprintf( fp, ")" );
break;
case NOTE_TYPE_32ND:
case NOTE_TYPE_64TH:
fprintf( fp, "}" );
break;
case NOTE_TYPE_48TH:
case NOTE_TYPE_INVALID:
fprintf( fp, "'" );
break;
default:
ASSERT(0);
// fall though
case NOTE_TYPE_INVALID:
fprintf( fp, "'" );
break;
}
fprintf( fp, "\n" );
}
+3
View File
@@ -508,6 +508,9 @@ void ScreenEdit::UpdateTextInfo()
}
CString sText;
// MD 11/03/03 - check Editor.ini for a few of these
// entries used: CurBeatPlaces, CurSecPlaces, OffsetPlaces,
// PreviewStartPlaces, PreviewLengthPlaces
sText += ssprintf( "Current Beat:\n %.2f\n", GAMESTATE->m_fSongBeat );
sText += ssprintf( "Current Second:\n %.2f\n", m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) );
sText += ssprintf( "Snap to:\n %s\n", sNoteType.c_str() );