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
+5 -1
View File
@@ -432,7 +432,11 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
else if( sValueName=="KEYSOUNDS" )
{
split( sParams[1], ",", out.m_vsKeysoundFile );
RString keysounds = sParams[1];
if( keysounds.length() >= 2 && keysounds.substr(0, 2) == "\\#" )
keysounds = keysounds.substr(1);
split( keysounds, ",", out.m_vsKeysoundFile );
fprintf(stderr, "%s : %d\n", sPath.c_str(), out.m_vsKeysoundFile.size());
}
// Attacks loaded from file