From: Patrick McIlroy Date: Tue, 11 Nov 2008 05:58:08 +0000 (+0000) Subject: git-svn-id: https://openitg.svn.sourceforge.net/svnroot/openitg@542 83fadc84-e282... X-Git-Url: http://cameron1729.xyz/?a=commitdiff_plain;h=0392c906d180f542f7b82eced608fc9a8c08ab26;p=openitg.git git-svn-id: https://openitg.svn.sourceforge.net/svnroot/openitg@542 83fadc84-e282-4d84-a09a-c4228d6ae7e5 --- diff --git a/src/Combo.cpp b/src/Combo.cpp index d9a1eba1..ffd76645 100755 --- a/src/Combo.cpp +++ b/src/Combo.cpp @@ -6,6 +6,7 @@ #include "song.h" #include "Command.h" #include "PlayerState.h" +#include "RageLog.h" Combo::Combo() { @@ -128,21 +129,41 @@ void Combo::SetCombo( int iCombo, int iMisses ) { if( m_pPlayerStageStats->FullComboOfScore(TNS_MARVELOUS) ) { + if ( !m_pPlayerStageStats->bFlag_FFC ) + { + m_pPlayerStageStats->fFullFantasticComboBegin = GAMESTATE->m_fMusicSeconds; + m_pPlayerStageStats->bFlag_FFC = true; + } sprLabel->RunCommands( FULL_COMBO_MARVELOUSES_COMMAND ); m_textNumber.RunCommands( FULL_COMBO_MARVELOUSES_COMMAND ); } else if( bPastMidpoint && m_pPlayerStageStats->FullComboOfScore(TNS_PERFECT) ) { + if ( !m_pPlayerStageStats->bFlag_FEC ) + { + m_pPlayerStageStats->fFullExcellentComboBegin = GAMESTATE->m_fMusicSeconds; + m_pPlayerStageStats->bFlag_FEC = true; + } sprLabel->RunCommands( FULL_COMBO_PERFECTS_COMMAND ); m_textNumber.RunCommands( FULL_COMBO_PERFECTS_COMMAND ); } else if( bPastMidpoint && m_pPlayerStageStats->FullComboOfScore(TNS_GREAT) ) { + if ( !m_pPlayerStageStats->bFlag_FGC ) + { + m_pPlayerStageStats->fFullGreatComboBegin = GAMESTATE->m_fMusicSeconds; + m_pPlayerStageStats->bFlag_FGC = true; + } sprLabel->RunCommands( FULL_COMBO_GREATS_COMMAND ); m_textNumber.RunCommands( FULL_COMBO_GREATS_COMMAND ); } else { + if ( !m_pPlayerStageStats->bFlag_PulsateEnd ) + { + m_pPlayerStageStats->fPulsatingComboEnd = GAMESTATE->m_fMusicSeconds; + m_pPlayerStageStats->bFlag_PulsateEnd = true; + } sprLabel->RunCommands( FULL_COMBO_BROKEN_COMMAND ); m_textNumber.RunCommands( FULL_COMBO_BROKEN_COMMAND ); } diff --git a/src/GraphDisplay.cpp b/src/GraphDisplay.cpp index 6fbaa8f9..d2fd18a3 100755 --- a/src/GraphDisplay.cpp +++ b/src/GraphDisplay.cpp @@ -7,12 +7,17 @@ #include "StageStats.h" #include "Foreach.h" #include "song.h" +#include "RageLog.h" //#define DIVIDE_LINE_WIDTH THEME->GetMetricI(m_sName,"TexturedBottomHalf") GraphDisplay::GraphDisplay() { m_pTexture = NULL; + + m_iFFCPoint = -1; + m_iFECPoint = -1; + m_iFGCPoint = -1; } @@ -62,6 +67,26 @@ void GraphDisplay::LoadFromStageStats( const StageStats &ss, const PlayerStageSt CLAMP( m_DestValues[i], 0.f, 1.f ); UpdateVerts(); + LOG->Debug( "pss.bFlag_FFC (%s): %f", pss.bFlag_FFC ? "true":"false", pss.fFullFantasticComboBegin ); + LOG->Debug( "pss.bFlag_FEC (%s): %f", pss.bFlag_FEC ? "true":"false", pss.fFullExcellentComboBegin ); + LOG->Debug( "pss.bFlag_FGC (%s): %f", pss.bFlag_FGC ? "true":"false", pss.fFullGreatComboBegin ); + LOG->Debug( "pss.bFlag_PulsateEnd (%s): %f", pss.bFlag_PulsateEnd ? "true":"false", pss.fPulsatingComboEnd ); + + if ( pss.bFlag_FFC && pss.fFullFantasticComboBegin > -1.0f ) + m_iFFCPoint = ( pss.fFullFantasticComboBegin * VALUE_RESOLUTION ) / fTotalStepSeconds; + if ( pss.bFlag_FEC && pss.fFullExcellentComboBegin > -1.0f ) + m_iFECPoint = ( pss.fFullExcellentComboBegin * VALUE_RESOLUTION ) / fTotalStepSeconds; + if ( pss.bFlag_FGC && pss.fFullGreatComboBegin > -1.0f ) + m_iFGCPoint = ( pss.fFullGreatComboBegin * VALUE_RESOLUTION ) / fTotalStepSeconds; + if ( pss.bFlag_PulsateEnd ) + m_iPulseStopPoint = ( pss.fPulsatingComboEnd * VALUE_RESOLUTION ) / fTotalStepSeconds; + else + m_iPulseStopPoint = VALUE_RESOLUTION - 1; + + LOG->Debug( "m_iFFCPoint: %d", m_iFFCPoint ); + LOG->Debug( "m_iFECPoint: %d", m_iFECPoint ); + LOG->Debug( "m_iFGCPoint: %d", m_iFGCPoint ); + LOG->Debug( "m_iPulseStopPoint: %d", m_iPulseStopPoint ); // // Show song boundaries @@ -136,6 +161,24 @@ void GraphDisplay::UpdateVerts() for( int i = 0; i < 4*NumSlices; ++i ) m_Slices[i].c = RageColor(1,1,1,1); + // TODO: Theme --infamouspat + // these values were taken from the official ITG2 theme + if ( m_iFFCPoint > -1 ) + { + for( int i = m_iFFCPoint; i < 4*m_iPulseStopPoint; ++i ) + m_Slices[i].c = RageColor(.580f,.922f,.996f,1); + } + if ( m_iFECPoint > -1 ) + { + for( int i = m_iFECPoint; i < 4*m_iPulseStopPoint; ++i ) + m_Slices[i].c = RageColor(.992f,.835f,.6f,1); + } + if ( m_iFGCPoint > -1 ) + { + for( int i = m_iFGCPoint; i < 4*m_iPulseStopPoint; ++i ) + m_Slices[i].c = RageColor(.04f,1.0f,.06f,1); + } + for( int i = 0; i < NumSlices; ++i ) { const float Left = SCALE( float(i), 0.0f, float(NumSlices), m_quadVertices.left, m_quadVertices.right ); diff --git a/src/GraphDisplay.h b/src/GraphDisplay.h index 96cf80c5..81fdda81 100755 --- a/src/GraphDisplay.h +++ b/src/GraphDisplay.h @@ -36,6 +36,12 @@ private: vector m_vpSongBoundaries; AutoActor m_sprJustBarely; + + // OpenITG: resolution points for colorized FFC/FEC graph + int m_iFFCPoint; + int m_iFECPoint; + int m_iFGCPoint; + int m_iPulseStopPoint; }; #endif diff --git a/src/PlayerStageStats.cpp b/src/PlayerStageStats.cpp index 7b21255b..b65310bb 100755 --- a/src/PlayerStageStats.cpp +++ b/src/PlayerStageStats.cpp @@ -23,6 +23,17 @@ void PlayerStageStats::Init() bFailed = false; bFailedEarlier = false; bGaveUp = false; + + bFlag_FFC = false; + bFlag_FEC = false; + bFlag_FGC = false; + bFlag_PulsateEnd = false; + + fFullFantasticComboBegin = -1.0f; + fFullExcellentComboBegin = -1.0f; + fFullGreatComboBegin = -1.0f; + fPulsatingComboEnd = -1.0f; + iPossibleDancePoints = iCurPossibleDancePoints = iActualDancePoints = 0; iPossibleGradePoints = 0; iCurCombo = iMaxCombo = iCurMissCombo = iScore = iBonus = iMaxScore = iCurMaxScore = 0; @@ -56,6 +67,18 @@ void PlayerStageStats::AddStats( const PlayerStageStats& other ) iCurPossibleDancePoints += other.iCurPossibleDancePoints; iPossibleGradePoints += other.iPossibleGradePoints; +/* + bFlag_FFC |= other.bFlag_FFC; + bFlag_FEC |= other.bFlag_FEC; + bFlag_FGC |= other.bFlag_FGC; + bFlag_PulsateEnd |= other.bFlag_PulsateEnd; + + fFullFantasticComboBegin = other.fFullFantasticComboBegin; + fFullExcellentComboBegin = other.fFullExcellentComboBegin; + fFullGreatComboBegin = other.fFullGreatComboBegin; + fPulsatingComboEnd = other.fPulsatingComboEnd; +*/ + for( int t=0; tDebug("P%d: fFullFantasticComboBegin: %f", (int)(p+1), stageStats.m_player[p].fFullFantasticComboBegin); + LOG->Debug("P%d: fFullExcellentComboBegin: %f", (int)(p+1), stageStats.m_player[p].fFullExcellentComboBegin); + LOG->Debug("P%d: fFullGreatComboBegin: %f", (int)(p+1), stageStats.m_player[p].fFullGreatComboBegin); + LOG->Debug("P%d: fPulsatingComboEnd: %f", (int)(p+1), stageStats.m_player[p].fPulsatingComboEnd); + m_sprGraphFrame[p].Load( THEME->GetPathG(m_sName,ssprintf("graph frame p%d",p+1)) ); m_sprGraphFrame[p]->SetName( ssprintf("GraphFrameP%d",p+1) ); SET_XY_AND_ON_COMMAND( m_sprGraphFrame[p] );