s/RAGE_ASSERT/ASSERT/
This commit is contained in:
@@ -237,9 +237,9 @@ void UtilCommand( Actor& actor, CString sClassName, CString sCommandName )
|
|||||||
{
|
{
|
||||||
if( actor.GetID().empty() )
|
if( actor.GetID().empty() )
|
||||||
return;
|
return;
|
||||||
} else {
|
} else
|
||||||
RAGE_ASSERT_M( !actor.GetID().empty(), ssprintf("!actor.GetID().empty() ('%s', '%s')", sClassName.c_str(), sCommandName.c_str()) );
|
ASSERT_M( !actor.GetID().empty(), ssprintf("!actor.GetID().empty() ('%s', '%s')",
|
||||||
}
|
sClassName.c_str(), sCommandName.c_str()) );
|
||||||
|
|
||||||
actor.Command( THEME->GetMetric(sClassName,actor.GetID()+sCommandName+"Command") );
|
actor.Command( THEME->GetMetric(sClassName,actor.GetID()+sCommandName+"Command") );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ void Attack::GetAttackBeats( const Song *song, PlayerNumber pn, float &fStartBea
|
|||||||
GAMESTATE->GetUndisplayedBeats( pn, fSecsRemaining, fStartBeat, fEndBeat );
|
GAMESTATE->GetUndisplayedBeats( pn, fSecsRemaining, fStartBeat, fEndBeat );
|
||||||
}
|
}
|
||||||
|
|
||||||
RAGE_ASSERT_M( fEndBeat >= fStartBeat, ssprintf("%f >= %f", fEndBeat, fStartBeat) );
|
ASSERT_M( fEndBeat >= fStartBeat, ssprintf("%f >= %f", fEndBeat, fStartBeat) );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Attack::operator== ( const Attack &rhs ) const
|
bool Attack::operator== ( const Attack &rhs ) const
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ void AddLayersFromAniDir( CString sAniDir, vector<Actor*> &layersAddTo, bool Gen
|
|||||||
if( sAniDir.Right(1) != "/" )
|
if( sAniDir.Right(1) != "/" )
|
||||||
sAniDir += "/";
|
sAniDir += "/";
|
||||||
|
|
||||||
RAGE_ASSERT_M( IsADirectory(sAniDir), sAniDir + " isn't a directory" );
|
ASSERT_M( IsADirectory(sAniDir), sAniDir + " isn't a directory" );
|
||||||
|
|
||||||
CString sPathToIni = sAniDir + "BGAnimation.ini";
|
CString sPathToIni = sAniDir + "BGAnimation.ini";
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ void BGAnimation::LoadFromAniDir( CString sAniDir )
|
|||||||
if( sAniDir.Right(1) != "/" )
|
if( sAniDir.Right(1) != "/" )
|
||||||
sAniDir += "/";
|
sAniDir += "/";
|
||||||
|
|
||||||
RAGE_ASSERT_M( IsADirectory(sAniDir), sAniDir + " isn't a directory" );
|
ASSERT_M( IsADirectory(sAniDir), sAniDir + " isn't a directory" );
|
||||||
|
|
||||||
CString sPathToIni = sAniDir + "BGAnimation.ini";
|
CString sPathToIni = sAniDir + "BGAnimation.ini";
|
||||||
|
|
||||||
|
|||||||
@@ -227,12 +227,12 @@ void CheckStageStats( const StageStats &ss, int p )
|
|||||||
if( ss.pSong )
|
if( ss.pSong )
|
||||||
CHECKPOINT_M( ss.pSong->GetFullTranslitTitle() );
|
CHECKPOINT_M( ss.pSong->GetFullTranslitTitle() );
|
||||||
ASSERT( ss.pSteps[p] );
|
ASSERT( ss.pSteps[p] );
|
||||||
RAGE_ASSERT_M( ss.playMode < NUM_PLAY_MODES, ssprintf("playmode %i", ss.playMode) );
|
ASSERT_M( ss.playMode < NUM_PLAY_MODES, ssprintf("playmode %i", ss.playMode) );
|
||||||
RAGE_ASSERT_M( ss.style < NUM_STYLES, ssprintf("style %i", ss.style) );
|
ASSERT_M( ss.style < NUM_STYLES, ssprintf("style %i", ss.style) );
|
||||||
RAGE_ASSERT_M( ss.pSteps[p]->GetDifficulty() < NUM_DIFFICULTIES, ssprintf("difficulty %i", ss.pSteps[p]->GetDifficulty()) );
|
ASSERT_M( ss.pSteps[p]->GetDifficulty() < NUM_DIFFICULTIES, ssprintf("difficulty %i", ss.pSteps[p]->GetDifficulty()) );
|
||||||
/* Meter values can exceed MAX_METER; MAX_METER is just the highest meter value we
|
/* Meter values can exceed MAX_METER; MAX_METER is just the highest meter value we
|
||||||
* display/track. */
|
* display/track. */
|
||||||
// RAGE_ASSERT_M( ss.iMeter[p] < MAX_METER+1, ssprintf("%i", ss.iMeter[p]) );
|
// ASSERT_M( ss.iMeter[p] < MAX_METER+1, ssprintf("%i", ss.iMeter[p]) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameState::PlayersFinalized()
|
void GameState::PlayersFinalized()
|
||||||
@@ -552,7 +552,7 @@ void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &ti
|
|||||||
else
|
else
|
||||||
m_LastBeatUpdate.Touch();
|
m_LastBeatUpdate.Touch();
|
||||||
timing.GetBeatAndBPSFromElapsedTime( fPositionSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze );
|
timing.GetBeatAndBPSFromElapsedTime( fPositionSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze );
|
||||||
RAGE_ASSERT_M( m_fSongBeat > -2000, ssprintf("%f %f", m_fSongBeat, fPositionSeconds) );
|
ASSERT_M( m_fSongBeat > -2000, ssprintf("%f %f", m_fSongBeat, fPositionSeconds) );
|
||||||
|
|
||||||
m_fMusicSeconds = fPositionSeconds;
|
m_fMusicSeconds = fPositionSeconds;
|
||||||
// LOG->Trace( "m_fMusicSeconds = %f, m_fSongBeat = %f, m_fCurBPS = %f, m_bFreeze = %f", m_fMusicSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze );
|
// LOG->Trace( "m_fMusicSeconds = %f, m_fSongBeat = %f, m_fCurBPS = %f, m_bFreeze = %f", m_fMusicSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze );
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ try {
|
|||||||
Lua::RegisterFunctions( L );
|
Lua::RegisterFunctions( L );
|
||||||
|
|
||||||
LoadFromString( L, "return " + str );
|
LoadFromString( L, "return " + str );
|
||||||
RAGE_ASSERT_M( lua_gettop(L) == 1, ssprintf("%i", lua_gettop(L)) );
|
ASSERT_M( lua_gettop(L) == 1, ssprintf("%i", lua_gettop(L)) );
|
||||||
|
|
||||||
int ret = lua_pcall(L, 0, 1, 0);
|
int ret = lua_pcall(L, 0, 1, 0);
|
||||||
if( ret )
|
if( ret )
|
||||||
@@ -151,7 +151,7 @@ try {
|
|||||||
RageException::Throw( "Runtime error running \"%s\": %s", str.c_str(), err.c_str() );
|
RageException::Throw( "Runtime error running \"%s\": %s", str.c_str(), err.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
RAGE_ASSERT_M( lua_gettop(L) == 1, ssprintf("%i", lua_gettop(L)) );
|
ASSERT_M( lua_gettop(L) == 1, ssprintf("%i", lua_gettop(L)) );
|
||||||
|
|
||||||
/* Don't accept a function as a return value; if you really want to use a function
|
/* Don't accept a function as a return value; if you really want to use a function
|
||||||
* as a boolean, convert it before returning. */
|
* as a boolean, convert it before returning. */
|
||||||
|
|||||||
@@ -745,7 +745,7 @@ void NoteData::LoadTransformed( const NoteData* pOriginal, int iNewNumTracks, co
|
|||||||
for( int t=0; t<m_iNumTracks; t++ )
|
for( int t=0; t<m_iNumTracks; t++ )
|
||||||
{
|
{
|
||||||
const int iOriginalTrack = iOriginalTrackToTakeFrom[t];
|
const int iOriginalTrack = iOriginalTrackToTakeFrom[t];
|
||||||
RAGE_ASSERT_M( iOriginalTrack < Original.m_iNumTracks, ssprintf("from %i >= %i (to %i)",
|
ASSERT_M( iOriginalTrack < Original.m_iNumTracks, ssprintf("from %i >= %i (to %i)",
|
||||||
iOriginalTrack, Original.m_iNumTracks, iOriginalTrackToTakeFrom[t]));
|
iOriginalTrack, Original.m_iNumTracks, iOriginalTrackToTakeFrom[t]));
|
||||||
|
|
||||||
if( iOriginalTrack == -1 )
|
if( iOriginalTrack == -1 )
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ void NoteField::RefreshBeatToNoteSkin()
|
|||||||
display = m_NoteDisplays.find( Skin );
|
display = m_NoteDisplays.find( Skin );
|
||||||
}
|
}
|
||||||
|
|
||||||
RAGE_ASSERT_M( display != m_NoteDisplays.end(), ssprintf("Couldn't find %s", Skin.c_str()) );
|
ASSERT_M( display != m_NoteDisplays.end(), ssprintf("Couldn't find %s", Skin.c_str()) );
|
||||||
|
|
||||||
NoteDisplayCols *cols = display->second;
|
NoteDisplayCols *cols = display->second;
|
||||||
m_BeatToNoteDisplays[Beat] = cols;
|
m_BeatToNoteDisplays[Beat] = cols;
|
||||||
@@ -343,9 +343,9 @@ NoteField::NoteDisplayCols *NoteField::SearchForBeat( float Beat )
|
|||||||
// Again with Beat = -9806 and GAMESTATE->m_fMusicSeconds = -3017.22
|
// Again with Beat = -9806 and GAMESTATE->m_fMusicSeconds = -3017.22
|
||||||
// Again in the middle of Remember December in Hardcore Galore:
|
// Again in the middle of Remember December in Hardcore Galore:
|
||||||
// Beat = -9373.56 and GAMESTATE->m_fMusicSeconds = -2923.48
|
// Beat = -9373.56 and GAMESTATE->m_fMusicSeconds = -2923.48
|
||||||
RAGE_ASSERT_M( it != m_BeatToNoteDisplays.begin(), ssprintf("%f",Beat) );
|
ASSERT_M( it != m_BeatToNoteDisplays.begin(), ssprintf("%f",Beat) );
|
||||||
--it;
|
--it;
|
||||||
RAGE_ASSERT_M( it != m_BeatToNoteDisplays.end(), ssprintf("%f",Beat) );
|
ASSERT_M( it != m_BeatToNoteDisplays.end(), ssprintf("%f",Beat) );
|
||||||
|
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
@@ -557,7 +557,7 @@ void NoteField::DrawPrimitives()
|
|||||||
if( bIsActive )
|
if( bIsActive )
|
||||||
SearchForSongBeat()->m_GhostArrowRow.SetHoldIsActive( hn.iTrack );
|
SearchForSongBeat()->m_GhostArrowRow.SetHoldIsActive( hn.iTrack );
|
||||||
|
|
||||||
RAGE_ASSERT_M( NoteRowToBeat(hn.iStartRow) > -2000, ssprintf("%i %i %i", hn.iStartRow, hn.iEndRow, hn.iTrack) );
|
ASSERT_M( NoteRowToBeat(hn.iStartRow) > -2000, ssprintf("%i %i %i", hn.iStartRow, hn.iEndRow, hn.iTrack) );
|
||||||
SearchForBeat( CurDisplay, NextDisplay, NoteRowToBeat(hn.iStartRow) );
|
SearchForBeat( CurDisplay, NextDisplay, NoteRowToBeat(hn.iStartRow) );
|
||||||
|
|
||||||
bool bIsInSelectionRange = false;
|
bool bIsInSelectionRange = false;
|
||||||
@@ -616,7 +616,7 @@ void NoteField::DrawPrimitives()
|
|||||||
bool bIsMine = (tn == TAP_MINE);
|
bool bIsMine = (tn == TAP_MINE);
|
||||||
bool bIsAttack = IsTapAttack(tn);
|
bool bIsAttack = IsTapAttack(tn);
|
||||||
|
|
||||||
RAGE_ASSERT_M( NoteRowToBeat(i) > -2000, ssprintf("%i %i %i, %f %f", i, iLastIndexToDraw, iFirstIndexToDraw, GAMESTATE->m_fSongBeat, GAMESTATE->m_fMusicSeconds) );
|
ASSERT_M( NoteRowToBeat(i) > -2000, ssprintf("%i %i %i, %f %f", i, iLastIndexToDraw, iFirstIndexToDraw, GAMESTATE->m_fSongBeat, GAMESTATE->m_fMusicSeconds) );
|
||||||
SearchForBeat( CurDisplay, NextDisplay, NoteRowToBeat(i) );
|
SearchForBeat( CurDisplay, NextDisplay, NoteRowToBeat(i) );
|
||||||
NoteDisplayCols *nd = CurDisplay->second;
|
NoteDisplayCols *nd = CurDisplay->second;
|
||||||
if( bIsAttack )
|
if( bIsAttack )
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ void NotesWriterDWI::WriteDWINotesField( RageFile &f, const Steps &out, int star
|
|||||||
fCurrentIncrementer = 1.0/192 * BEATS_PER_MEASURE;
|
fCurrentIncrementer = 1.0/192 * BEATS_PER_MEASURE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
RAGE_ASSERT_M(0, ssprintf("nt = %d",nt) );
|
ASSERT_M(0, ssprintf("nt = %d",nt) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ void RageFileManager::MountInitialFilesystems()
|
|||||||
CStringArray parts;
|
CStringArray parts;
|
||||||
split( DirOfExecutable, "/", parts );
|
split( DirOfExecutable, "/", parts );
|
||||||
CHECKPOINT_M( ssprintf( "... %i parts", parts.size()) );
|
CHECKPOINT_M( ssprintf( "... %i parts", parts.size()) );
|
||||||
RAGE_ASSERT_M( parts.size() > 1, ssprintf("Strange DirOfExecutable: %s", DirOfExecutable.c_str()) );
|
ASSERT_M( parts.size() > 1, ssprintf("Strange DirOfExecutable: %s", DirOfExecutable.c_str()) );
|
||||||
CString Dir = join( "/", parts.begin(), parts.end()-1 );
|
CString Dir = join( "/", parts.begin(), parts.end()-1 );
|
||||||
RageFileManager::Mount( "dir", Dir, "" );
|
RageFileManager::Mount( "dir", Dir, "" );
|
||||||
#else
|
#else
|
||||||
@@ -495,7 +495,7 @@ void AddReference( const RageFileObj *obj, RageFileDriver *driver )
|
|||||||
/* map::insert returns an iterator (which we discard) and a bool, indicating whether
|
/* map::insert returns an iterator (which we discard) and a bool, indicating whether
|
||||||
* this is a new entry. This should always be new. */
|
* this is a new entry. This should always be new. */
|
||||||
const pair< FileReferences::iterator, bool > ret = g_Refs.insert( ref );
|
const pair< FileReferences::iterator, bool > ret = g_Refs.insert( ref );
|
||||||
RAGE_ASSERT_M( ret.second, ssprintf( "RemoveReference: Duplicate reference (%s)", obj->GetDisplayPath().c_str() ) );
|
ASSERT_M( ret.second, ssprintf( "RemoveReference: Duplicate reference (%s)", obj->GetDisplayPath().c_str() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveReference( const RageFileObj *obj )
|
void RemoveReference( const RageFileObj *obj )
|
||||||
@@ -503,7 +503,7 @@ void RemoveReference( const RageFileObj *obj )
|
|||||||
LockMut( *g_Mutex );
|
LockMut( *g_Mutex );
|
||||||
|
|
||||||
FileReferences::iterator it = g_Refs.find( obj );
|
FileReferences::iterator it = g_Refs.find( obj );
|
||||||
RAGE_ASSERT_M( it != g_Refs.end(), ssprintf( "RemoveReference: Missing reference (%s)", obj->GetDisplayPath().c_str() ) );
|
ASSERT_M( it != g_Refs.end(), ssprintf( "RemoveReference: Missing reference (%s)", obj->GetDisplayPath().c_str() ) );
|
||||||
g_Refs.erase( it );
|
g_Refs.erase( it );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -574,7 +574,7 @@ RageFileObj *RageFileManager::CopyFileObj( const RageFileObj *cpy, RageFile &p )
|
|||||||
LockMut( *g_Mutex );
|
LockMut( *g_Mutex );
|
||||||
|
|
||||||
FileReferences::const_iterator it = g_Refs.find( cpy );
|
FileReferences::const_iterator it = g_Refs.find( cpy );
|
||||||
RAGE_ASSERT_M( it != g_Refs.end(), ssprintf( "RemoveReference: Missing reference (%s)", cpy->GetDisplayPath().c_str() ) );
|
ASSERT_M( it != g_Refs.end(), ssprintf( "RemoveReference: Missing reference (%s)", cpy->GetDisplayPath().c_str() ) );
|
||||||
|
|
||||||
RageFileObj *ret = cpy->Copy( p );
|
RageFileObj *ret = cpy->Copy( p );
|
||||||
|
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ void AdjustBalance( int16_t *buffer, int frames, float fBalance )
|
|||||||
swap( fLeftFactors[1], fRightFactors[1] );
|
swap( fLeftFactors[1], fRightFactors[1] );
|
||||||
}
|
}
|
||||||
|
|
||||||
RAGE_ASSERT_M( channels == 2, ssprintf("%i", channels) );
|
ASSERT_M( channels == 2, ssprintf("%i", channels) );
|
||||||
for( int samp = 0; samp < frames; ++samp )
|
for( int samp = 0; samp < frames; ++samp )
|
||||||
{
|
{
|
||||||
int16_t l = int16_t(buffer[0]*fLeftFactors[0] + buffer[1]*fLeftFactors[1]);
|
int16_t l = int16_t(buffer[0]*fLeftFactors[0] + buffer[1]*fLeftFactors[1]);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ int RandomGen::operator() ( int maximum )
|
|||||||
|
|
||||||
void fapproach( float& val, float other_val, float to_move )
|
void fapproach( float& val, float other_val, float to_move )
|
||||||
{
|
{
|
||||||
RAGE_ASSERT_M( to_move >= 0, ssprintf("to_move: %f", to_move) );
|
ASSERT_M( to_move >= 0, ssprintf("to_move: %f", to_move) );
|
||||||
if( val == other_val )
|
if( val == other_val )
|
||||||
return;
|
return;
|
||||||
float fDelta = other_val - val;
|
float fDelta = other_val - val;
|
||||||
|
|||||||
@@ -154,8 +154,8 @@ bool FilenameDB::ResolvePath(CString &path)
|
|||||||
fs = GetFileSet( ret );
|
fs = GetFileSet( ret );
|
||||||
|
|
||||||
CString p = path.substr( begin, size );
|
CString p = path.substr( begin, size );
|
||||||
RAGE_ASSERT_M( p.size() != 1 || p[0] != '.', path ); // no .
|
ASSERT_M( p.size() != 1 || p[0] != '.', path ); // no .
|
||||||
RAGE_ASSERT_M( p.size() != 2 || p[0] != '.' || p[1] != '.', path ); // no ..
|
ASSERT_M( p.size() != 2 || p[0] != '.' || p[1] != '.', path ); // no ..
|
||||||
set<File>::iterator it = fs->files.find( File(p) );
|
set<File>::iterator it = fs->files.find( File(p) );
|
||||||
|
|
||||||
/* If there were no matches, the path isn't found. */
|
/* If there were no matches, the path isn't found. */
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ ScreenMiniMenu::ScreenMiniMenu( Menu* pDef, ScreenMessage SM_SendOnOK, ScreenMes
|
|||||||
m_textAnswer[i].GetUnzoomedWidth() * ZOOM_SELECTED );
|
m_textAnswer[i].GetUnzoomedWidth() * ZOOM_SELECTED );
|
||||||
}
|
}
|
||||||
|
|
||||||
RAGE_ASSERT_M( line.choices.empty() || line.defaultChoice < (int) line.choices.size(),
|
ASSERT_M( line.choices.empty() || line.defaultChoice < (int) line.choices.size(),
|
||||||
ssprintf("%i, %i", line.defaultChoice, (int) line.choices.size()) );
|
ssprintf("%i, %i", line.defaultChoice, (int) line.choices.size()) );
|
||||||
CString sText = line.choices.empty() ? "" : line.choices[line.defaultChoice];
|
CString sText = line.choices.empty() ? "" : line.choices[line.defaultChoice];
|
||||||
m_textAnswer[i].SetText( sText );
|
m_textAnswer[i].SetText( sText );
|
||||||
|
|||||||
@@ -552,7 +552,7 @@ CString ScreenOptions::GetExplanationTitle( int iRow ) const
|
|||||||
|
|
||||||
BitmapText &ScreenOptions::GetTextItemForRow( PlayerNumber pn, int iRow, int iChoiceOnRow )
|
BitmapText &ScreenOptions::GetTextItemForRow( PlayerNumber pn, int iRow, int iChoiceOnRow )
|
||||||
{
|
{
|
||||||
RAGE_ASSERT_M( iRow < (int)m_Rows.size(), ssprintf("%i < %i", iRow, (int)m_Rows.size() ) );
|
ASSERT_M( iRow < (int)m_Rows.size(), ssprintf("%i < %i", iRow, (int)m_Rows.size() ) );
|
||||||
Row &row = *m_Rows[iRow];
|
Row &row = *m_Rows[iRow];
|
||||||
if( row.Type == Row::ROW_EXIT )
|
if( row.Type == Row::ROW_EXIT )
|
||||||
return *row.m_textItems[0];
|
return *row.m_textItems[0];
|
||||||
@@ -569,7 +569,7 @@ BitmapText &ScreenOptions::GetTextItemForRow( PlayerNumber pn, int iRow, int iCh
|
|||||||
else
|
else
|
||||||
index = iChoiceOnRow;
|
index = iChoiceOnRow;
|
||||||
|
|
||||||
RAGE_ASSERT_M( index < (int)row.m_textItems.size(), ssprintf("%i < %i", index, (int)row.m_textItems.size() ) );
|
ASSERT_M( index < (int)row.m_textItems.size(), ssprintf("%i < %i", index, (int)row.m_textItems.size() ) );
|
||||||
return *row.m_textItems[index];
|
return *row.m_textItems[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -723,7 +723,7 @@ void ScreenOptions::PositionCursors()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
const int iRow = m_iCurrentRow[pn];
|
const int iRow = m_iCurrentRow[pn];
|
||||||
RAGE_ASSERT_M( iRow < (int)m_Rows.size(), ssprintf("%i < %i", iRow, (int)m_Rows.size() ) );
|
ASSERT_M( iRow < (int)m_Rows.size(), ssprintf("%i < %i", iRow, (int)m_Rows.size() ) );
|
||||||
Row &Row = *m_Rows[iRow];
|
Row &Row = *m_Rows[iRow];
|
||||||
|
|
||||||
OptionsCursor &highlight = m_Highlight[pn];
|
OptionsCursor &highlight = m_Highlight[pn];
|
||||||
@@ -741,7 +741,7 @@ void ScreenOptions::TweenCursor( PlayerNumber pn )
|
|||||||
{
|
{
|
||||||
// Set the position of the highlight showing the current option the user is changing.
|
// Set the position of the highlight showing the current option the user is changing.
|
||||||
const int iRow = m_iCurrentRow[pn];
|
const int iRow = m_iCurrentRow[pn];
|
||||||
RAGE_ASSERT_M( iRow < (int)m_Rows.size(), ssprintf("%i < %i", iRow, (int)m_Rows.size() ) );
|
ASSERT_M( iRow < (int)m_Rows.size(), ssprintf("%i < %i", iRow, (int)m_Rows.size() ) );
|
||||||
|
|
||||||
const Row &Row = *m_Rows[iRow];
|
const Row &Row = *m_Rows[iRow];
|
||||||
const int iChoiceWithFocus = Row.m_iChoiceWithFocus[pn];
|
const int iChoiceWithFocus = Row.m_iChoiceWithFocus[pn];
|
||||||
|
|||||||
@@ -361,7 +361,7 @@ RageColor SongManager::GetGroupColor( const CString &sGroupName )
|
|||||||
if( m_sGroupNames[i] == sGroupName )
|
if( m_sGroupNames[i] == sGroupName )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
RAGE_ASSERT_M( i != m_sGroupNames.size(), sGroupName ); // this is not a valid group
|
ASSERT_M( i != m_sGroupNames.size(), sGroupName ); // this is not a valid group
|
||||||
|
|
||||||
return g_vGroupColors[i%g_vGroupColors.size()];
|
return g_vGroupColors[i%g_vGroupColors.size()];
|
||||||
}
|
}
|
||||||
@@ -778,7 +778,7 @@ void SongManager::GetExtraStageInfo( bool bExtra2, const StyleDef *sd,
|
|||||||
sGroup = GAMESTATE->m_pCurSong->m_sGroupName;
|
sGroup = GAMESTATE->m_pCurSong->m_sGroupName;
|
||||||
}
|
}
|
||||||
|
|
||||||
RAGE_ASSERT_M( sGroup != "", ssprintf("%p '%s' '%s'",
|
ASSERT_M( sGroup != "", ssprintf("%p '%s' '%s'",
|
||||||
GAMESTATE->m_pCurSong,
|
GAMESTATE->m_pCurSong,
|
||||||
GAMESTATE->m_pCurSong? GAMESTATE->m_pCurSong->GetSongDir().c_str():"",
|
GAMESTATE->m_pCurSong? GAMESTATE->m_pCurSong->GetSongDir().c_str():"",
|
||||||
GAMESTATE->m_pCurSong? GAMESTATE->m_pCurSong->m_sGroupName.c_str():"") );
|
GAMESTATE->m_pCurSong? GAMESTATE->m_pCurSong->m_sGroupName.c_str():"") );
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ float StageStats::GetPercentDancePoints( PlayerNumber pn ) const
|
|||||||
return 1; // correct for rounding error
|
return 1; // correct for rounding error
|
||||||
|
|
||||||
/* This can happen in battle, with transform attacks. */
|
/* This can happen in battle, with transform attacks. */
|
||||||
//RAGE_ASSERT_M( iActualDancePoints[pn] <= iPossibleDancePoints[pn], ssprintf("%i/%i", iActualDancePoints[pn], iPossibleDancePoints[pn]) );
|
//ASSERT_M( iActualDancePoints[pn] <= iPossibleDancePoints[pn], ssprintf("%i/%i", iActualDancePoints[pn], iPossibleDancePoints[pn]) );
|
||||||
|
|
||||||
float fPercentDancePoints = iActualDancePoints[pn] / (float)iPossibleDancePoints[pn];
|
float fPercentDancePoints = iActualDancePoints[pn] / (float)iPossibleDancePoints[pn];
|
||||||
|
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ int FFMpeg_Helper::DecodePacket()
|
|||||||
|
|
||||||
void MovieTexture_FFMpeg::ConvertFrame()
|
void MovieTexture_FFMpeg::ConvertFrame()
|
||||||
{
|
{
|
||||||
RAGE_ASSERT_M( m_ImageWaiting == FRAME_DECODED, ssprintf("%i", m_ImageWaiting ) );
|
ASSERT_M( m_ImageWaiting == FRAME_DECODED, ssprintf("%i", m_ImageWaiting ) );
|
||||||
|
|
||||||
avcodec::AVPicture pict;
|
avcodec::AVPicture pict;
|
||||||
pict.data[0] = (unsigned char *)m_img->pixels;
|
pict.data[0] = (unsigned char *)m_img->pixels;
|
||||||
@@ -733,7 +733,7 @@ void MovieTexture_FFMpeg::UpdateTimer()
|
|||||||
* (due to pause, EOF, etc). If true is returned, we'll be in FRAME_DECODED. */
|
* (due to pause, EOF, etc). If true is returned, we'll be in FRAME_DECODED. */
|
||||||
bool MovieTexture_FFMpeg::DecodeFrame()
|
bool MovieTexture_FFMpeg::DecodeFrame()
|
||||||
{
|
{
|
||||||
RAGE_ASSERT_M( m_ImageWaiting == FRAME_NONE, ssprintf("%i", m_ImageWaiting) );
|
ASSERT_M( m_ImageWaiting == FRAME_NONE, ssprintf("%i", m_ImageWaiting) );
|
||||||
|
|
||||||
if( m_State != PLAYING )
|
if( m_State != PLAYING )
|
||||||
return false;
|
return false;
|
||||||
@@ -785,7 +785,7 @@ bool MovieTexture_FFMpeg::DecodeFrame()
|
|||||||
*/
|
*/
|
||||||
float MovieTexture_FFMpeg::CheckFrameTime()
|
float MovieTexture_FFMpeg::CheckFrameTime()
|
||||||
{
|
{
|
||||||
RAGE_ASSERT_M( m_ImageWaiting == FRAME_DECODED, ssprintf("%i", m_ImageWaiting) );
|
ASSERT_M( m_ImageWaiting == FRAME_DECODED, ssprintf("%i", m_ImageWaiting) );
|
||||||
|
|
||||||
const float Offset = decoder->GetTimestamp() - m_Clock;
|
const float Offset = decoder->GetTimestamp() - m_Clock;
|
||||||
|
|
||||||
@@ -835,7 +835,7 @@ float MovieTexture_FFMpeg::CheckFrameTime()
|
|||||||
|
|
||||||
void MovieTexture_FFMpeg::DiscardFrame()
|
void MovieTexture_FFMpeg::DiscardFrame()
|
||||||
{
|
{
|
||||||
RAGE_ASSERT_M( m_ImageWaiting == FRAME_DECODED, ssprintf("%i", m_ImageWaiting) );
|
ASSERT_M( m_ImageWaiting == FRAME_DECODED, ssprintf("%i", m_ImageWaiting) );
|
||||||
m_ImageWaiting = FRAME_NONE;
|
m_ImageWaiting = FRAME_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ bool Alsa9Buf::SetHWParams()
|
|||||||
err = dsnd_pcm_hw_free( pcm );
|
err = dsnd_pcm_hw_free( pcm );
|
||||||
ALSA_ASSERT("dsnd_pcm_hw_free");
|
ALSA_ASSERT("dsnd_pcm_hw_free");
|
||||||
}
|
}
|
||||||
// RAGE_ASSERT_M( dsnd_pcm_state(pcm) == SND_PCM_STATE_OPEN, ssprintf("(%s)", dsnd_pcm_state_name(dsnd_pcm_state(pcm))) );
|
// ASSERT_M( dsnd_pcm_state(pcm) == SND_PCM_STATE_OPEN, ssprintf("(%s)", dsnd_pcm_state_name(dsnd_pcm_state(pcm))) );
|
||||||
|
|
||||||
/* allocate the hardware parameters structure */
|
/* allocate the hardware parameters structure */
|
||||||
snd_pcm_hw_params_t *hwparams;
|
snd_pcm_hw_params_t *hwparams;
|
||||||
|
|||||||
@@ -509,7 +509,7 @@ void DSoundBuf::Stop()
|
|||||||
/* This isn't true on some broken cards. */
|
/* This isn't true on some broken cards. */
|
||||||
// DWORD play, write;
|
// DWORD play, write;
|
||||||
// buf->GetCurrentPosition( &play, &write );
|
// buf->GetCurrentPosition( &play, &write );
|
||||||
// RAGE_ASSERT_M( play == 0 && write == 0, ssprintf("%i, %i", play, write) );
|
// ASSERT_M( play == 0 && write == 0, ssprintf("%i, %i", play, write) );
|
||||||
|
|
||||||
playing = false;
|
playing = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ static int g_TotalAheadCount = 0;
|
|||||||
|
|
||||||
void RageSound_Generic_Software::Mix( int16_t *buf, int frames, int64_t frameno, int64_t current_frameno )
|
void RageSound_Generic_Software::Mix( int16_t *buf, int frames, int64_t frameno, int64_t current_frameno )
|
||||||
{
|
{
|
||||||
RAGE_ASSERT_M( m_DecodeThread.IsCreated(), "RageSound_Generic_Software::StartDecodeThread() was never called" );
|
ASSERT_M( m_DecodeThread.IsCreated(), "RageSound_Generic_Software::StartDecodeThread() was never called" );
|
||||||
|
|
||||||
if( frameno - current_frameno + frames > 0 )
|
if( frameno - current_frameno + frames > 0 )
|
||||||
{
|
{
|
||||||
@@ -214,7 +214,7 @@ bool RageSound_Generic_Software::GetDataForSound( sound &s )
|
|||||||
s.buffer.get_write_pointers( p, psize );
|
s.buffer.get_write_pointers( p, psize );
|
||||||
|
|
||||||
/* If we have no open buffer slot, we have a buffer overflow. */
|
/* If we have no open buffer slot, we have a buffer overflow. */
|
||||||
RAGE_ASSERT_M( psize[0] > 0, ssprintf("%i", (int)s.frames_buffered()) );
|
ASSERT_M( psize[0] > 0, ssprintf("%i", (int)s.frames_buffered()) );
|
||||||
|
|
||||||
sound_block *b = p[0];
|
sound_block *b = p[0];
|
||||||
bool eof = !s.snd->GetDataToPlay( b->buf, ARRAYSIZE(b->buf)/channels, b->position, b->frames_in_buffer );
|
bool eof = !s.snd->GetDataToPlay( b->buf, ARRAYSIZE(b->buf)/channels, b->position, b->frames_in_buffer );
|
||||||
|
|||||||
Reference in New Issue
Block a user