fix warnings
This commit is contained in:
@@ -880,7 +880,7 @@ void NoteDataUtil::Wide( NoteData &inout, float fStartBeat, float fEndBeat )
|
||||
inout.ConvertHoldNotesTo4s();
|
||||
|
||||
/* Start on an even beat. */
|
||||
fStartBeat = Quantize( fStartBeat, 2 );
|
||||
fStartBeat = Quantize( fStartBeat, 2.0f );
|
||||
|
||||
const int first_row = BeatToNoteRow( fStartBeat );
|
||||
const int last_row = min( BeatToNoteRow(fEndBeat), inout.GetLastRow() );
|
||||
|
||||
@@ -333,7 +333,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Steps &out, const map<CSt
|
||||
|
||||
// some BMS files seem to have funky alignment, causing us to write gigantic cache files.
|
||||
// Try to correct for this by quantizing.
|
||||
row = int(Quantize( float(row), ROWS_PER_MEASURE/64 ));
|
||||
row = Quantize( row, ROWS_PER_MEASURE/64 );
|
||||
|
||||
BmsTrack bmsTrack;
|
||||
bool bIsHold;
|
||||
|
||||
@@ -156,6 +156,11 @@ inline float Quantize( const float f, const float fRoundInterval )
|
||||
return int( (f + fRoundInterval/2)/fRoundInterval ) * fRoundInterval;
|
||||
}
|
||||
|
||||
inline int Quantize( const int i, const int iRoundInterval )
|
||||
{
|
||||
return int( (i + iRoundInterval/2)/iRoundInterval ) * iRoundInterval;
|
||||
}
|
||||
|
||||
/* return f truncated to the nearest multiple of fTruncInterval */
|
||||
inline float ftruncf( const float f, const float fTruncInterval )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user