okay I'm not done with the commits yet but mercurial is not making it easy for me

to commit just a subsection of files so I have to dump everything in here. :|
This commit is contained in:
AJ Kelly
2010-03-09 03:36:44 -06:00
parent 8ba30b523c
commit 31c69f1d9c
17 changed files with 168 additions and 49 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ void GhostArrowRow::DrawPrimitives()
void GhostArrowRow::DidTapNote( int iCol, TapNoteScore tns, bool bBright )
{
ASSERT( iCol >= 0 && iCol < (int) m_Ghost.size() );
ASSERT_M( iCol >= 0 && iCol < (int) m_Ghost.size(), ssprintf("assert(iCol %i >= 0 && iCol %i < (int)m_Ghost.size() %i) failed",iCol,iCol,(int)m_Ghost.size()) );
Message msg("ColumnJudgment");
msg.SetParam( "TapNoteScore", tns );
+6 -6
View File
@@ -653,7 +653,7 @@ void NoteData::LoadTransformed( const NoteData& in, int iNewNumTracks, const int
for( int t=0; t<GetNumTracks(); t++ )
{
const int iOriginalTrack = iOriginalTrackToTakeFrom[t];
ASSERT_M( iOriginalTrack < in.GetNumTracks(), ssprintf("from %i >= %i (to %i)",
ASSERT_M( iOriginalTrack < in.GetNumTracks(), ssprintf("from OriginalTrack %i >= %i (#tracks) (taking from %i)",
iOriginalTrack, in.GetNumTracks(), iOriginalTrackToTakeFrom[t]));
if( iOriginalTrack == -1 )
@@ -672,19 +672,19 @@ void NoteData::MoveTapNoteTrack( int dest, int src )
void NoteData::SetTapNote( int track, int row, const TapNote& t )
{
DEBUG_ASSERT( track>=0 && track<GetNumTracks() );
if( row < 0 )
return;
// There's no point in inserting empty notes into the map.
// Any blank space in the map is defined to be empty.
// If we're trying to insert an empty at a spot where
// another note already exists, then we're really deleting
// from the map.
// If we're trying to insert an empty at a spot where another note
// already exists, then we're really deleting from the map.
if( t == TAP_EMPTY )
{
TrackMap &trackMap = m_TapNotes[track];
// remove the element at this position (if any). This will return either 0 or 1.
// remove the element at this position (if any).
// This will return either 0 or 1.
trackMap.erase( row );
}
else
+3 -4
View File
@@ -1694,7 +1694,7 @@ void MakeLower( wchar_t *p, size_t iLen )
float StringToFloat( const RString &sString )
{
float ret = strtof( sString, NULL );
if( !isfinite(ret) )
ret = 0.0f;
return ret;
@@ -1703,12 +1703,11 @@ float StringToFloat( const RString &sString )
bool StringToFloat( const RString &sString, float &fOut )
{
char *endPtr;
fOut = strtof( sString, &endPtr );
return sString.size() && *endPtr == '\0' && isfinite( fOut );
}
const wchar_t INVALID_CHAR = 0xFFFD; /* U+FFFD REPLACEMENT CHARACTER */
wstring RStringToWstring( const RString &s )
+3 -6
View File
@@ -145,8 +145,7 @@ private:
TO m_ToValue;
};
/*
* Safely temporarily convert between types. For example,
/* Safely temporarily convert between types. For example,
*
* float f = 10.5;
* *ConvertValue<int>(&f) = 12;
@@ -157,8 +156,7 @@ ConvertValueHelper<TO, FROM> ConvertValue( FROM *pValue )
return ConvertValueHelper<TO, FROM>( pValue );
}
/*
* Safely add an integer to an enum.
/* Safely add an integer to an enum.
*
* This is illegal:
*
@@ -192,8 +190,7 @@ static inline T enum_cycle( T val, int iMax, int iAmt = 1 )
}
/*
* We only have unsigned swaps; byte swapping a signed value doesn't make sense.
/* We only have unsigned swaps; byte swapping a signed value doesn't make sense.
*
* Platform-specific, optimized versions are defined in arch_setup, with the names
* ArchSwap32, ArchSwap24, and ArchSwap16; we define them to their real names here,
+2 -6
View File
@@ -487,21 +487,17 @@ void Song::TidyUpData()
/* Some DWIs have lengths in ms when they meant seconds, eg. #SAMPLELENGTH:10;.
* If the sample length is way too short, change it. */
// oh also this means that if you try to have a sample length longer than
// 30 seconds, it doesn't mean shit. -aj
// oh also this means that if you try to have a sample length longer
// than 30 seconds, it won't work. -aj
if( m_fMusicSampleLengthSeconds < 3 || m_fMusicSampleLengthSeconds > 30 )
m_fMusicSampleLengthSeconds = DEFAULT_MUSIC_SAMPLE_LENGTH;
//
// Here's the problem: We have a directory full of images. We want to determine which
// image is the banner, which is the background, and which is the CDTitle.
//
CHECKPOINT_M( "Looking for images..." );
//
// First, check the file name for hints.
//
if( !HasBanner() )
{
/* If a nonexistant banner file is specified, and we can't find a replacement,