From 43819f68c6032e2e0c9c3f27c582456921f83605 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 5 Jun 2003 19:27:30 +0000 Subject: [PATCH] Fix writing #SELECTABLE. Add missing semicolons to #DISPLAYBPM. --- stepmania/src/NotesWriterSM.cpp | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/stepmania/src/NotesWriterSM.cpp b/stepmania/src/NotesWriterSM.cpp index 06d78c3e4e..34e77e7591 100644 --- a/stepmania/src/NotesWriterSM.cpp +++ b/stepmania/src/NotesWriterSM.cpp @@ -25,23 +25,6 @@ void NotesWriterSM::WriteGlobalTags(FILE *fp, const Song &out) fprintf( fp, "#SAMPLESTART:%.3f;\n", out.m_fMusicSampleStartSeconds ); fprintf( fp, "#SAMPLELENGTH:%.3f;\n", out.m_fMusicSampleLengthSeconds ); fprintf( fp, "#SELECTABLE:" ); - switch( out.m_DisplayBPMType ) - { - case Song::DISPLAY_ACTUAL: - // write nothing - break; - case Song::DISPLAY_SPECIFIED: - if( out.m_fDisplayBPMMin == out.m_fDisplayBPMMax ) - fprintf( fp, "#DISPLAYBPM:%.3f", out.m_fDisplayBPMMin ); - else - fprintf( fp, "#DISPLAYBPM:%.3f,%.3f", out.m_fDisplayBPMMin, out.m_fDisplayBPMMax ); - break; - case Song::DISPLAY_RANDOM: - fprintf( fp, "#DISPLAYBPM:*" ); - break; - } - - switch(out.m_SelectionDisplay) { default: ASSERT(0); /* fallthrough */ case Song::SHOW_ALWAYS: @@ -53,6 +36,23 @@ void NotesWriterSM::WriteGlobalTags(FILE *fp, const Song &out) } fprintf( fp, ";\n" ); + switch( out.m_DisplayBPMType ) + { + case Song::DISPLAY_ACTUAL: + // write nothing + break; + case Song::DISPLAY_SPECIFIED: + if( out.m_fDisplayBPMMin == out.m_fDisplayBPMMax ) + fprintf( fp, "#DISPLAYBPM:%.3f;", out.m_fDisplayBPMMin ); + else + fprintf( fp, "#DISPLAYBPM:%.3f,%.3f;", out.m_fDisplayBPMMin, out.m_fDisplayBPMMax ); + break; + case Song::DISPLAY_RANDOM: + fprintf( fp, "#DISPLAYBPM:*;" ); + break; + } + + fprintf( fp, "#BPMS:" ); unsigned i; for( i=0; i