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
+3 -3
View File
@@ -673,7 +673,7 @@ void NoteField::DrawBGChangeText( const float fBeat, const RString sNewBGName )
m_textMeasureNumber.Draw();
}
CacheNoteStat GetNumNotesFromBeginning( const PlayerState *pPlayerState, float beat )
static CacheNoteStat GetNumNotesFromBeginning( const PlayerState *pPlayerState, float beat )
{
// XXX: I realized that I have copied and pasted my binary search code 3 times already.
// how can we abstract this?
@@ -700,7 +700,7 @@ CacheNoteStat GetNumNotesFromBeginning( const PlayerState *pPlayerState, float b
return dummy;
}
int GetNumNotesRange( const PlayerState* pPlayerState, float fLow, float fHigh )
static int GetNumNotesRange( const PlayerState* pPlayerState, float fLow, float fHigh )
{
CacheNoteStat low = GetNumNotesFromBeginning( pPlayerState, fLow );
CacheNoteStat high = GetNumNotesFromBeginning( pPlayerState, fHigh );
@@ -720,7 +720,7 @@ float FindFirstDisplayedBeat( const PlayerState* pPlayerState, int iDrawDistance
}
const int NUM_ITERATIONS = 24;
const int MAX_NOTES_AFTER = 32;
const int MAX_NOTES_AFTER = 64;
float fFirstBeatToDraw = fLow;