From 1f112d3c2574d8c564a50fa52c6f3a6bcb774a4e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 7 Sep 2002 10:43:16 +0000 Subject: [PATCH] more of the same --- stepmania/src/GameDef.cpp | 3 +-- stepmania/src/RandomSample.cpp | 21 ++++++++++----------- stepmania/src/ScreenGameplay.cpp | 4 ++-- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/stepmania/src/GameDef.cpp b/stepmania/src/GameDef.cpp index 32e281d228..52b615eab4 100644 --- a/stepmania/src/GameDef.cpp +++ b/stepmania/src/GameDef.cpp @@ -61,7 +61,6 @@ CString GameDef::GetPathToGraphic( const CString sSkinName, const CString sButto ASSERT(0); throw RageException( "The game button graphic '%s%s %s' is missing.", sSkinDir, sButtonName, sGraphicSuffix ); - return ""; } void GameDef::GetTapTweenColors( const CString sSkinName, const CString sButtonName, CArray &aTapColorsOut ) const @@ -192,7 +191,7 @@ MenuInput GameDef::GameInputToMenuInput( GameInput GameI ) const pn = GAMESTATE->m_MasterPlayerNumber; break; default: - ASSERT(0); // invalid m_StyleType + ASSERT(0); return MenuInput(); // invalid m_StyleType }; for( int i=0; iTrace( "WARNING: Tried to play a RandomSample that has 0 sounds loaded." ); + return; } - else - { - int iIndexToPlay; - for( int i=0; i<5; i++ ) - { - iIndexToPlay = rand() % m_pSamples.GetSize(); - if( iIndexToPlay != m_iIndexLastPlayed ) - break; - } - m_pSamples[iIndexToPlay]->Play(); - m_iIndexLastPlayed = iIndexToPlay; + int iIndexToPlay = 0; + for( int i=0; i<5; i++ ) + { + iIndexToPlay = rand() % m_pSamples.GetSize(); + if( iIndexToPlay != m_iIndexLastPlayed ) + break; } + + m_pSamples[iIndexToPlay]->Play(); + m_iIndexLastPlayed = iIndexToPlay; } void RandomSample::Pause() diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 8b4885ea56..ee26fd0d58 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -812,7 +812,7 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ { case DIK_F9: fOffsetDelta = -0.025f; break; case DIK_F10: fOffsetDelta = +0.025f; break; - default: ASSERT(0); + default: ASSERT(0); return; } if( type == IET_FAST_REPEAT ) fOffsetDelta *= 10; @@ -838,7 +838,7 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ { case DIK_F11: fOffsetDelta = -0.02f; break; case DIK_F12: fOffsetDelta = +0.02f; break; - default: ASSERT(0); + default: ASSERT(0); return; } if( type == IET_FAST_REPEAT ) fOffsetDelta *= 10;