diff --git a/.hgignore b/.hgignore index 0b3bfcf250..3382b3a54d 100644 --- a/.hgignore +++ b/.hgignore @@ -37,6 +37,7 @@ src/libtomcrypt/Release-* src/libtommath/build-* src/libtommath/Release-* src/*.old +src/.deps ver.cpp lib*_link.a Data/UserPrefs diff --git a/src/ArrowEffects.cpp b/src/ArrowEffects.cpp index 9bd4271627..61c9dc0db5 100644 --- a/src/ArrowEffects.cpp +++ b/src/ArrowEffects.cpp @@ -445,7 +445,7 @@ float ArrowEffects::GetXPos( const PlayerState* pPlayerState, int iColNum, float { // find the middle, and split based on iColNum // it's unknown if this will work for routine. - const int iMiddleColumn = floor(pStyle->m_iColsPerPlayer/2.0f); + const int iMiddleColumn = static_cast(floor(pStyle->m_iColsPerPlayer/2.0f)); if( iColNum > iMiddleColumn-1 ) fPixelOffsetFromCenter += fEffects[PlayerOptions::EFFECT_XMODE]*-(fYOffset); else diff --git a/src/CourseUtil.cpp b/src/CourseUtil.cpp index 38278bc31f..23a74dbe23 100644 --- a/src/CourseUtil.cpp +++ b/src/CourseUtil.cpp @@ -464,7 +464,7 @@ void EditCourseUtil::PrepareForPlay() PROFILEMAN->GetProfile(ProfileSlot_Player1)->m_GoalType = GoalType_Time; Course *pCourse = GAMESTATE->m_pCurCourse; - PROFILEMAN->GetProfile(ProfileSlot_Player1)->m_iGoalSeconds = pCourse->m_fGoalSeconds; + PROFILEMAN->GetProfile(ProfileSlot_Player1)->m_iGoalSeconds = static_cast(pCourse->m_fGoalSeconds); } void EditCourseUtil::GetAllEditCourses( vector &vpCoursesOut ) diff --git a/src/OptionsCursor.cpp b/src/OptionsCursor.cpp index 8fb7497a06..3b7740076b 100644 --- a/src/OptionsCursor.cpp +++ b/src/OptionsCursor.cpp @@ -53,12 +53,12 @@ void OptionsCursor::Load( const RString &sMetricsGroup, bool bLoadCanGos ) } #undef LOAD_SPR - m_iOriginalLeftX = m_sprLeft->GetX(); - m_iOriginalRightX = m_sprRight->GetX(); + m_iOriginalLeftX = static_cast(m_sprLeft->GetX()); + m_iOriginalRightX = static_cast(m_sprRight->GetX()); if( bLoadCanGos ) { - m_iOriginalCanGoLeftX = m_sprCanGoLeft->GetX(); - m_iOriginalCanGoRightX = m_sprCanGoRight->GetX(); + m_iOriginalCanGoLeftX = static_cast(m_sprCanGoLeft->GetX()); + m_iOriginalCanGoRightX = static_cast(m_sprCanGoRight->GetX()); } SetCanGo( false, false ); diff --git a/src/Player.cpp b/src/Player.cpp index cc2d2fafa2..47a70ce28d 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -3193,7 +3193,7 @@ void Player::SetCombo( int iCombo, int iMisses ) if( GAMESTATE->IsCourseMode() ) { int iSongIndexStartColoring = GAMESTATE->m_pCurCourse->GetEstimatedNumStages(); - iSongIndexStartColoring = floor(iSongIndexStartColoring*PERCENT_UNTIL_COLOR_COMBO); + iSongIndexStartColoring = static_cast(floor(iSongIndexStartColoring*PERCENT_UNTIL_COLOR_COMBO)); bPastBeginning = GAMESTATE->GetCourseSongIndex() >= iSongIndexStartColoring; } else diff --git a/src/RageDisplay.cpp b/src/RageDisplay.cpp index c027ebddb6..a3ba6bd2c8 100644 --- a/src/RageDisplay.cpp +++ b/src/RageDisplay.cpp @@ -760,7 +760,7 @@ bool RageDisplay::SaveScreenshot( RString sPath, GraphicsFileFormat format ) int iHeight = 480; // This used to be lrintf. However, lrintf causes odd resolutions like // 639x480 (4:3) and 853x480 (16:9). ceilf gives correct values. -aj - int iWidth = ceilf( iHeight * GetActualVideoModeParams().fDisplayAspectRatio ); + int iWidth = static_cast(ceilf( iHeight * GetActualVideoModeParams().fDisplayAspectRatio )); timer.Touch(); RageSurfaceUtils::Zoom( surface, iWidth, iHeight ); // LOG->Trace( "%ix%i -> %ix%i (%.3f) in %f seconds", surface->w, surface->h, iWidth, iHeight, GetActualVideoModeParams().fDisplayAspectRatio, timer.GetDeltaTime() ); diff --git a/src/ScoreKeeperNormal.cpp b/src/ScoreKeeperNormal.cpp index 109587ac00..aff049768e 100644 --- a/src/ScoreKeeperNormal.cpp +++ b/src/ScoreKeeperNormal.cpp @@ -488,7 +488,7 @@ void ScoreKeeperNormal::AddScoreInternal( TapNoteScore score ) p += m_CustomComboBonusValue; } - p += m_pPlayerStageStats->m_iCurCombo * m_CustomComboMultiplier; + p += static_cast(m_pPlayerStageStats->m_iCurCombo * m_CustomComboMultiplier); if( m_iNumNotesHitThisRow == 2 ) p = (int)(p * m_DoubleNoteMultiplier); diff --git a/src/ScreenOptionsEditCourse.cpp b/src/ScreenOptionsEditCourse.cpp index 82ee683d89..f454540799 100644 --- a/src/ScreenOptionsEditCourse.cpp +++ b/src/ScreenOptionsEditCourse.cpp @@ -261,7 +261,7 @@ void ScreenOptionsEditCourse::ImportOptions( int iRow, const vectorm_pCurCourse->m_fGoalSeconds/60) ); + row.SetOneSharedSelectionIfPresent( MakeMinutesString(static_cast(GAMESTATE->m_pCurCourse->m_fGoalSeconds)/60) ); break; default: { diff --git a/src/ScrollBar.cpp b/src/ScrollBar.cpp index 67e95a878a..da25c145df 100644 --- a/src/ScrollBar.cpp +++ b/src/ScrollBar.cpp @@ -46,7 +46,7 @@ void ScrollBar::SetPercentage( float fCenterPercent, float fSizePercent ) { wrap( fCenterPercent, 1.0f ); - const int iBarContentHeight = m_sprMiddle->GetZoomedHeight(); + const int iBarContentHeight = static_cast(m_sprMiddle->GetZoomedHeight()); ASSERT( iBarContentHeight != 0 ); /* Set tick thumb */ diff --git a/src/StepMania.cpp b/src/StepMania.cpp index 8c92f28ec2..8b5830d7cb 100644 --- a/src/StepMania.cpp +++ b/src/StepMania.cpp @@ -103,7 +103,7 @@ void StepMania::GetPreferredVideoModeParams( VideoModeParams ¶msOut ) { //float fRatio = PREFSMAN->m_iDisplayWidth / PREFSMAN->m_iDisplayHeight; //iWidth = PREFSMAN->m_iDisplayHeight * fRatio; - iWidth = ceilf(PREFSMAN->m_iDisplayHeight * PREFSMAN->m_fDisplayAspectRatio); + iWidth = static_cast(ceilf(PREFSMAN->m_iDisplayHeight * PREFSMAN->m_fDisplayAspectRatio)); } // todo: allow for PRODUCT_ID + "-" + CommonMetrics::WINDOW_TITLE as @@ -917,7 +917,7 @@ static void WriteLogHeader() #endif // this code should only be enabled in distributed builds - //LOG->Info("sm-ssc is Copyright ©2009 the spinal shark collective, all rights reserved. Commercial use of this binary is prohibited by law and will be prosecuted to the fullest extent of the law."); + //LOG->Info("sm-ssc is Copyright �2009 the spinal shark collective, all rights reserved. Commercial use of this binary is prohibited by law and will be prosecuted to the fullest extent of the law."); // end limited code time_t cur_time; diff --git a/src/StreamDisplay.cpp b/src/StreamDisplay.cpp index 185028e209..c972e5832b 100644 --- a/src/StreamDisplay.cpp +++ b/src/StreamDisplay.cpp @@ -31,7 +31,7 @@ void StreamDisplay::Load( const RString &_sMetricsGroup ) m_transformPill.SetFromReference( THEME->GetMetricR(sMetricsGroup,"PillTransformFunction") ); float fTextureCoordScaleX = THEME->GetMetricF(sMetricsGroup,"TextureCoordScaleX"); - int iNumPills = THEME->GetMetricF(sMetricsGroup,"NumPills"); + int iNumPills = static_cast(THEME->GetMetricF(sMetricsGroup,"NumPills")); m_bAlwaysBounce = THEME->GetMetricB(sMetricsGroup,"AlwaysBounceNormalBar"); FOREACH_ENUM( StreamType, st ) diff --git a/src/TimingData.cpp b/src/TimingData.cpp index 3e03b64351..02abd33c7e 100644 --- a/src/TimingData.cpp +++ b/src/TimingData.cpp @@ -569,11 +569,11 @@ float TimingData::GetElapsedTimeFromBeatNoOffset( float fBeat ) const int iRow = BeatToNoteRow(fBeat); for( unsigned j=0; j=) - * A Pump delay acts differently. [aj: how?] (>) + /* A traditional stop has the beat happening before the stop. (>=) + * A Pump delay acts differently: the pause is before the beat. (>) */ - if( m_StopSegments[j].m_iStartRow >= iRow && !m_StopSegments[j].m_bDelay || - m_StopSegments[j].m_iStartRow > iRow && m_StopSegments[j].m_bDelay ) + if( ( m_StopSegments[j].m_iStartRow >= iRow && !m_StopSegments[j].m_bDelay ) || + ( m_StopSegments[j].m_iStartRow > iRow && m_StopSegments[j].m_bDelay ) ) break; fElapsedTime += m_StopSegments[j].m_fStopSeconds; } diff --git a/src/TimingData.h b/src/TimingData.h index afbe71d3e1..4ae8c8b50c 100644 --- a/src/TimingData.h +++ b/src/TimingData.h @@ -174,7 +174,7 @@ struct StopSegment { return ( m_iStartRow < other.m_iStartRow ) || ( m_iStartRow == other.m_iStartRow && - ( m_bDelay && !other.m_bDelay || m_fStopSeconds < other.m_fStopSeconds )); + ( ( m_bDelay && !other.m_bDelay ) || m_fStopSeconds < other.m_fStopSeconds )); } /** * @brief Compares two StopSegments to see if one is less than or equal to the other.