From 0cac950d90b4782f41148608f37c33591cc73c99 Mon Sep 17 00:00:00 2001 From: Andrew Livy Date: Thu, 7 Nov 2002 19:42:39 +0000 Subject: [PATCH] Para Theme Update, New ScreenGamePlay element: MAXCOMBO (Currently I set the metric so only PARA sees this one) it gets the maxcombo from m_Combo which is inside the class Player which is inside ScreenGameplay. Lots of passing variables around but it works. Perhaps the maxcombo should become global? --- stepmania/Themes/default/metrics.ini | 3 +++ stepmania/src/Player.cpp | 8 +++++++- stepmania/src/Player.h | 2 +- stepmania/src/ScreenGameplay.cpp | 10 ++++++++++ stepmania/src/ScreenGameplay.h | 3 ++- 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 281b1f3e66..cd87f9dc70 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -289,6 +289,9 @@ BPMZoom=0.0 StagenameX=999 StagenameY=999 StagenameZoom=0.0 +MAXCOMBOX=999 +MAXCOMBOY=999 +MAXCOMBOZoom=0.0 LifeFrameX=320 LifeFrameY=36 LifeFrameExtraY=442 diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 55dd0fe443..7201163c2b 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -24,7 +24,7 @@ #include "ScoreKeeperMAX2.h" #include "RageLog.h" #include "RageMath.h" - +#include "Combo.h" #define JUDGE_PERFECT_ZOOM_X THEME->GetMetricF("Player","JudgePerfectZoomX") #define JUDGE_PERFECT_ZOOM_Y THEME->GetMetricF("Player","JudgePerfectZoomY") @@ -100,6 +100,12 @@ Player::Player() } +int Player::GetPlayersMaxCombo() +{ + return( m_Combo.GetMaxCombo() ); +} + + Player::~Player() { delete m_ScoreKeeper; diff --git a/stepmania/src/Player.h b/stepmania/src/Player.h index db85684b5f..23a6c108b2 100644 --- a/stepmania/src/Player.h +++ b/stepmania/src/Player.h @@ -47,7 +47,7 @@ public: void Load( PlayerNumber player_no, NoteData* pNoteData, LifeMeter* pLM, ScoreDisplay* pScore ); void CrossedRow( int iNoteRow ); void Step( int col ); - + int GetPlayersMaxCombo(); void FadeToFail(); diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 2cd3bce6ea..37211bdc50 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -32,6 +32,9 @@ // Defines // +#define MAXCOMBO_X THEME->GetMetricF("ScreenGameplay","MAXCOMBOX") +#define MAXCOMBO_Y THEME->GetMetricF("ScreenGameplay","MAXCOMBOY") +#define MAXCOMBO_ZOOM THEME->GetMetricF("ScreenGameplay","MAXCOMBOZoom") #define BPM_X THEME->GetMetricF("ScreenGameplay","BPMX") #define BPM_Y THEME->GetMetricF("ScreenGameplay","BPMY") #define BPM_ZOOM THEME->GetMetricF("ScreenGameplay","BPMZoom") @@ -282,6 +285,12 @@ ScreenGameplay::ScreenGameplay() m_StageName.SetText( GAMESTATE->m_pCurSong->m_sMainTitle ); this->AddChild( &m_StageName ); + m_MaxCombo.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") ); + m_MaxCombo.SetXY( MAXCOMBO_X, MAXCOMBO_Y ); + m_MaxCombo.SetZoom( MAXCOMBO_ZOOM ); + m_MaxCombo.SetText( ssprintf("%d", m_Player[GAMESTATE->m_MasterPlayerNumber].GetPlayersMaxCombo()) ); /* MAKE THIS WORK FOR BOTH PLAYERS! */ + this->AddChild( &m_MaxCombo ); + for( p=0; pIsPlayerEnabled(PlayerNumber(p)) ) @@ -703,6 +712,7 @@ void ScreenGameplay::Update( float fDeltaTime ) GAMESTATE->m_fSongBeat = fSongBeat; GAMESTATE->m_fCurBPS = fBPS; GAMESTATE->m_bFreeze = bFreeze; + m_MaxCombo.SetText( ssprintf("%d", m_Player[GAMESTATE->m_MasterPlayerNumber].GetPlayersMaxCombo()) ); /* MAKE THIS WORK FOR BOTH PLAYERS! */ // printf( "m_fSongBeat = %f\n", GAMESTATE->m_fSongBeat ); diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index 0563d17484..cbc4892a8a 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -99,7 +99,8 @@ private: BitmapText m_textDebug; BitmapText m_textAutoPlay; // shows whether AutoPlay is on. - + + BitmapText m_MaxCombo; TransitionFadeWipe m_Fade; TransitionStarWipe m_StarWipe;