escape # in first keysound entry, fixed ADPCM reader and make PMS load more correctly.

- [NoteField] fix build warnings, and change the maximum number of displayed notes
  after the receptor to 64.
- [Player] fix build warnings.
- [NotesLoaderSSC, NotesWriterSSC] The MSD file reader seems to treat # that comes
  directly after : as new tag, and as many PMS and BMS files has keysounds which filename
  starts with #, so it looks like this: #KEYSOUNDS:#bgm.wav,01.wav,02.wav,..
  The MSD parser will see it as 2 different tags. So I added a backslash in front of the
  # sign if it's at the start when saving and remove it when loading.
- [RageSoundReader_WAV] ADPCM now works very well and doesn't return error when
  end of file is reached anymore.
- [Steps] Use BMS loader when loading the note data.
This commit is contained in:
Thai Pangsakulyanont
2011-11-11 18:40:34 +07:00
parent a4c7355c78
commit 248504f275
6 changed files with 21 additions and 15 deletions
+6
View File
@@ -303,6 +303,12 @@ static void WriteGlobalTags( RageFile &f, const Song &out )
f.Write( "#KEYSOUNDS:" );
for( unsigned i=0; i<out.m_vsKeysoundFile.size(); i++ )
{
// some keysound files has the first sound that starts with #,
// which makes MsdFile fail parsing the whole declaration.
// in this case, add a backslash at the front
// (#KEYSOUNDS:\#bgm.wav,01.wav,02.wav,..) and handle that on load.
if( i == 0 && out.m_vsKeysoundFile[i].size() > 0 && out.m_vsKeysoundFile[i][0] == '#' )
f.Write("\\");
f.Write( out.m_vsKeysoundFile[i] );
if( i != out.m_vsKeysoundFile.size()-1 )
f.Write( "," );