From 583a9690fd6e7b4acf5570dc674b0471920e2342 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 9 Sep 2002 02:33:57 +0000 Subject: [PATCH] Don't write empty tags. --- stepmania/src/NotesWriterDWI.cpp | 49 +++++++++++++++++++------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/stepmania/src/NotesWriterDWI.cpp b/stepmania/src/NotesWriterDWI.cpp index b85b93e9df..16133517be 100644 --- a/stepmania/src/NotesWriterDWI.cpp +++ b/stepmania/src/NotesWriterDWI.cpp @@ -180,32 +180,41 @@ bool NotesWriterDWI::Write( CString sPath, const Song &out ) if( fp == NULL ) throw RageException( "Error opening song file '%s' for writing.", sPath ); - fprintf( fp, "#TITLE:%s;\n", out.GetFullTitle() ); - fprintf( fp, "#ARTIST:%s;\n", out.m_sArtist ); + if(out.GetFullTitle().GetLength() != 0) + fprintf( fp, "#TITLE:%s;\n", out.GetFullTitle() ); + if(out.m_sArtist.GetLength() != 0) + fprintf( fp, "#ARTIST:%s;\n", out.m_sArtist ); ASSERT( out.m_BPMSegments[0].m_fStartBeat == 0 ); fprintf( fp, "#BPM:%.2f;\n", out.m_BPMSegments[0].m_fBPM ); fprintf( fp, "#GAP:%d;\n", -roundf( out.m_fBeat0OffsetInSeconds*1000 ) ); - fprintf( fp, "#FREEZE:" ); - for( int i=0; i 1) + { + fprintf( fp, "#CHANGEBPM:" ); + for( int i=1; im_NotesType == NOTES_TYPE_DANCE_COUPLE_1) { c[out.m_apNotes[i]->m_DifficultyClass][0] = out.m_apNotes[i];