From 23971b9c42535df9656f33c8044927511e04eed0 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 29 Sep 2002 18:56:54 +0000 Subject: [PATCH] Fixed LifeMeterBar artifacts in MAX2 and EZ2. Fixed handling of "ez2-single-hard" NotesType. --- stepmania/src/GameManager.cpp | 5 +++++ stepmania/src/LifeMeterBar.cpp | 8 ++++---- stepmania/src/NoteData.cpp | 6 +++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index 67a4ea1861..67769d0c17 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -1333,6 +1333,11 @@ int GameManager::NotesTypeToNumTracks( NotesType nt ) NotesType GameManager::StringToNotesType( CString sNotesType ) { sNotesType.MakeLower(); + + // HACK! We elminitated "ez2-single-hard", but we should still handle it. + if( sNotesType == "ez2-single-hard" ) + sNotesType = "ez2-single"; + for( int i=0; iIsPlayerEnabled(m_PlayerNumber) ) { - - - DrawMask( m_fPercent ); + DrawMask( m_fPercent ); // this is the "right endcap" to the life const float fChamberWidthInPercent = 1.0f/g_iNumChambers; float fPercentBetweenStrips = 1.0f/g_iNumStrips; + // round this so that the chamber overflows align if( g_iNumChambers > 10 ) fPercentBetweenStrips = froundf( fPercentBetweenStrips, fChamberWidthInPercent ); float fPercentOffset = fmodf( GAMESTATE->m_fSongBeat/4+1000, fPercentBetweenStrips ); ASSERT( fPercentOffset >= 0 && fPercentOffset <= fPercentBetweenStrips ); - for( float f=fPercentOffset+1; f>=fPercentOffset; f-=fPercentBetweenStrips ) + for( float f=fPercentOffset+1; f>=0; f-=fPercentBetweenStrips ) { DrawMask( f ); DrawStrip( f ); @@ -219,6 +218,7 @@ public: m_quadMask.StretchTo( &rect ); m_quadMask.Draw(); + } }; diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index c74c950e03..2755e0090d 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -83,10 +83,10 @@ void NoteData::LoadFromSMNoteDataString( CString sSMNoteData ) const float fBeat = (m + fPercentIntoMeasure) * BEATS_PER_MEASURE; const int iIndex = BeatToNoteRow( fBeat ); - if( m_iNumTracks != sMeasureLine.GetLength() ) - throw RageException( "Actual number of note columns (%d) is different from the NotesType (%d).", m_iNumTracks, sMeasureLine.GetLength() ); +// if( m_iNumTracks != sMeasureLine.GetLength() ) +// throw RageException( "Actual number of note columns (%d) is different from the NotesType (%d).", m_iNumTracks, sMeasureLine.GetLength() ); - for( int c=0; c