Fixed wrong score numbers on ScreenGameplay and ScreenEvaluation
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
*/
|
||||
|
||||
#include <map>
|
||||
using namespace std;
|
||||
|
||||
class IniFile
|
||||
{
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "ThemeManager.h"
|
||||
#include "RageSoundManager.h"
|
||||
|
||||
const int NUM_SCORE_DIGITS = 9;
|
||||
|
||||
// metrics that are common to all ScreenEvaluation classes
|
||||
#define BANNER_WIDTH THEME->GetMetricF("ScreenEvaluation","BannerWidth")
|
||||
#define BANNER_HEIGHT THEME->GetMetricF("ScreenEvaluation","BannerHeight")
|
||||
@@ -104,7 +106,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type )
|
||||
//
|
||||
// debugging
|
||||
//
|
||||
GAMESTATE->m_PlayMode = PLAY_MODE_NONSTOP;
|
||||
/* GAMESTATE->m_PlayMode = PLAY_MODE_NONSTOP;
|
||||
GAMESTATE->m_CurStyle = STYLE_DANCE_VERSUS;
|
||||
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
||||
GAMESTATE->m_pCurSong = SONGMAN->GetAllSongs()[0];
|
||||
@@ -116,7 +118,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type )
|
||||
GAMESTATE->m_PlayerOptions[PLAYER_1].m_fScrollSpeed = 2;
|
||||
GAMESTATE->m_PlayerOptions[PLAYER_2].m_fScrollSpeed = 2;
|
||||
GAMESTATE->m_iCurrentStageIndex = 2;
|
||||
|
||||
*/
|
||||
|
||||
LOG->Trace( "ScreenEvaluation::ScreenEvaluation()" );
|
||||
|
||||
@@ -144,6 +146,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type )
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
/*
|
||||
//
|
||||
// Debugging
|
||||
//
|
||||
@@ -155,6 +158,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type )
|
||||
stageStats.fRadarActual[p][r] = 0.5f + r/10.0f;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//
|
||||
// Calculate grades
|
||||
@@ -481,7 +485,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type )
|
||||
case 5: iValue = stageStats.iTapNoteScores[p][TNS_MISS]; break;
|
||||
case 6: iValue = stageStats.iTapNoteScores[p][HNS_OK]; break;
|
||||
case 7: iValue = stageStats.iMaxCombo[p]; break;
|
||||
default: ASSERT(0);
|
||||
default: iValue = 0; ASSERT(0);
|
||||
}
|
||||
m_textJudgeNumbers[l][p].SetText( ssprintf("%4d",iValue) );
|
||||
}
|
||||
@@ -508,10 +512,13 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type )
|
||||
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
|
||||
continue; // skip
|
||||
|
||||
m_ScoreDisplay[p].Init( (PlayerNumber)p );
|
||||
m_ScoreDisplay[p].Command( SCORE_NUMBER_ON_COMMAND(p) );
|
||||
m_ScoreDisplay[p].SetScore( stageStats.fScore[p] );
|
||||
this->AddChild( &m_ScoreDisplay[p] );
|
||||
m_textScore[p].LoadFromNumbers( THEME->GetPathTo("Numbers","ScreenEvaluation score numbers") );
|
||||
m_textScore[p].EnableShadow( false );
|
||||
m_textScore[p].SetDiffuse( PlayerToColor(p) );
|
||||
m_textScore[p].Command( SCORE_NUMBER_ON_COMMAND(p) );
|
||||
m_textScore[p].SetText( ssprintf("%*.0f", NUM_SCORE_DIGITS, stageStats.fScore[p]) );
|
||||
|
||||
this->AddChild( &m_textScore[p] );
|
||||
|
||||
}
|
||||
}
|
||||
@@ -532,10 +539,12 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type )
|
||||
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
|
||||
continue; // skip
|
||||
|
||||
m_TimeDisplay[p].Init( (PlayerNumber)p );
|
||||
m_TimeDisplay[p].Command( TIME_NUMBER_ON_COMMAND(p) );
|
||||
m_TimeDisplay[p].SetText( SecondsToTime(stageStats.fAliveSeconds[p]) );
|
||||
this->AddChild( &m_TimeDisplay[p] );
|
||||
m_textTime[p].LoadFromNumbers( THEME->GetPathTo("Numbers","ScreenEvaluation score numbers") );
|
||||
m_textTime[p].EnableShadow( false );
|
||||
m_textTime[p].SetDiffuse( PlayerToColor(p) );
|
||||
m_textTime[p].Command( TIME_NUMBER_ON_COMMAND(p) );
|
||||
m_textTime[p].SetText( SecondsToTime(stageStats.fAliveSeconds[p]) );
|
||||
this->AddChild( &m_textTime[p] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -670,12 +679,12 @@ void ScreenEvaluation::TweenOffScreen()
|
||||
// score area
|
||||
m_sprScoreLabel.Command( SCORE_LABEL_OFF_COMMAND );
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
m_ScoreDisplay[p].Command( SCORE_NUMBER_OFF_COMMAND(p) );
|
||||
m_textScore[p].Command( SCORE_NUMBER_OFF_COMMAND(p) );
|
||||
|
||||
// time area
|
||||
m_sprTimeLabel.Command( TIME_LABEL_OFF_COMMAND );
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
m_TimeDisplay[p].Command( TIME_NUMBER_OFF_COMMAND(p) );
|
||||
m_textTime[p].Command( TIME_NUMBER_OFF_COMMAND(p) );
|
||||
|
||||
// extra area
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
|
||||
@@ -83,11 +83,11 @@ protected:
|
||||
|
||||
// score area
|
||||
Sprite m_sprScoreLabel;
|
||||
ScoreDisplayNormal m_ScoreDisplay[NUM_PLAYERS];
|
||||
BitmapText m_textScore[NUM_PLAYERS];
|
||||
|
||||
// time area
|
||||
Sprite m_sprTimeLabel;
|
||||
ScoreDisplayNormal m_TimeDisplay[NUM_PLAYERS];
|
||||
BitmapText m_textTime[NUM_PLAYERS];
|
||||
|
||||
// extra area
|
||||
Sprite m_sprNewRecord[NUM_PLAYERS];
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "ThemeManager.h"
|
||||
#include "Notes.h"
|
||||
|
||||
const int NUM_SCORE_DIGITS = 9;
|
||||
|
||||
#define BANNER_FRAME_ON_COMMAND THEME->GetMetric ("ScreenSelectMusic","BannerFrameOnCommand")
|
||||
#define BANNER_FRAME_OFF_COMMAND THEME->GetMetric ("ScreenSelectMusic","BannerFrameOffCommand")
|
||||
@@ -153,8 +154,10 @@ ScreenSelectMusic::ScreenSelectMusic()
|
||||
m_sprHighScoreFrame[p].SetState( p );
|
||||
this->AddChild( &m_sprHighScoreFrame[p] );
|
||||
|
||||
m_HighScore[p].SetDiffuse( PlayerToColor(p) );
|
||||
this->AddChild( &m_HighScore[p] );
|
||||
m_textHighScore[p].LoadFromNumbers( THEME->GetPathTo("Numbers","ScreenSelectMusic score numbers") );
|
||||
m_textHighScore[p].EnableShadow( false );
|
||||
m_textHighScore[p].SetDiffuse( PlayerToColor(p) );
|
||||
this->AddChild( &m_textHighScore[p] );
|
||||
}
|
||||
|
||||
m_MusicSortDisplay.Set( GAMESTATE->m_SongSortOrder );
|
||||
@@ -209,50 +212,6 @@ void ScreenSelectMusic::DrawPrimitives()
|
||||
|
||||
void ScreenSelectMusic::TweenOnScreen()
|
||||
{
|
||||
/*
|
||||
int p;
|
||||
|
||||
m_sprBannerFrame.Command( 0, "bounce left", TWEEN_TIME );
|
||||
m_Banner.FadeOn( 0, "bounce left", TWEEN_TIME );
|
||||
m_BPMDisplay.FadeOn( 0, "bounce left", TWEEN_TIME );
|
||||
m_sprStage.FadeOn( 0, "bounce left", TWEEN_TIME );
|
||||
m_sprCDTitle.FadeOn( 0, "bounce left", TWEEN_TIME );
|
||||
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
m_sprDifficultyFrame[p].FadeOn( 0, "fade", TWEEN_TIME );
|
||||
m_sprMeterFrame[p].FadeOn( 0, "fade", TWEEN_TIME );
|
||||
}
|
||||
|
||||
m_GrooveRadar.TweenOnScreen();
|
||||
|
||||
m_textSongOptions.FadeOn( 0, "fade", TWEEN_TIME );
|
||||
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
m_OptionIconRow[p].FadeOn( 0, "foldy", TWEEN_TIME );
|
||||
// fOriginalZoomY = m_textPlayerOptions[p].GetZoomY();
|
||||
// m_textPlayerOptions[p].BeginTweening( TWEEN_TIME );
|
||||
// m_textPlayerOptions[p].SetTweenZoomY( fOriginalZoomY );
|
||||
|
||||
m_DifficultyIcon[p].FadeOn( 0, "foldy", TWEEN_TIME );
|
||||
m_AutoGenIcon[p].FadeOn( 0, "foldy", TWEEN_TIME );
|
||||
|
||||
m_DifficultyMeter[p].FadeOn( 0, "foldy", TWEEN_TIME );
|
||||
}
|
||||
|
||||
m_MusicSortDisplay.FadeOn( 0, "fade", TWEEN_TIME );
|
||||
|
||||
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
m_sprHighScoreFrame[p].FadeOn( 0, SCORE_CONNECTED_TO_MUSIC_WHEEL?"accelerate right":"accelerate left", TWEEN_TIME );
|
||||
m_HighScore[p].FadeOn( 0, SCORE_CONNECTED_TO_MUSIC_WHEEL?"accelerate right":"accelerate left", TWEEN_TIME );
|
||||
}
|
||||
|
||||
m_MusicWheel.TweenOnScreen();
|
||||
*/
|
||||
|
||||
m_sprBannerFrame.Command( BANNER_FRAME_ON_COMMAND );
|
||||
m_Banner.Command( BANNER_ON_COMMAND );
|
||||
m_BPMDisplay.Command( BPM_ON_COMMAND );
|
||||
@@ -274,7 +233,7 @@ void ScreenSelectMusic::TweenOnScreen()
|
||||
m_AutoGenIcon[p].Command( AUTOGEN_ICON_ON_COMMAND(p) );
|
||||
m_DifficultyMeter[p].Command( METER_ON_COMMAND(p) );
|
||||
m_sprHighScoreFrame[p].Command( SCORE_FRAME_ON_COMMAND(p) );
|
||||
m_HighScore[p].Command( SCORE_ON_COMMAND(p) );
|
||||
m_textHighScore[p].Command( SCORE_ON_COMMAND(p) );
|
||||
}
|
||||
|
||||
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
||||
@@ -304,7 +263,7 @@ void ScreenSelectMusic::TweenOffScreen()
|
||||
m_AutoGenIcon[p].Command( AUTOGEN_ICON_OFF_COMMAND(p) );
|
||||
m_DifficultyMeter[p].Command( METER_OFF_COMMAND(p) );
|
||||
m_sprHighScoreFrame[p].Command( SCORE_FRAME_OFF_COMMAND(p) );
|
||||
m_HighScore[p].Command( SCORE_OFF_COMMAND(p) );
|
||||
m_textHighScore[p].Command( SCORE_OFF_COMMAND(p) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,7 +276,7 @@ void ScreenSelectMusic::TweenScoreOnAndOffAfterChangeSort()
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
apActorsInScore.push_back( &m_sprHighScoreFrame[p] );
|
||||
apActorsInScore.push_back( &m_HighScore[p] );
|
||||
apActorsInScore.push_back( &m_textHighScore[p] );
|
||||
}
|
||||
for( unsigned i=0; i<apActorsInScore.size(); i++ )
|
||||
{
|
||||
@@ -753,7 +712,7 @@ void ScreenSelectMusic::AfterNotesChange( PlayerNumber pn )
|
||||
Notes* m_pNotes = GAMESTATE->m_pCurNotes[pn];
|
||||
|
||||
if( m_pNotes && SONGMAN->IsUsingMemoryCard(pn) )
|
||||
m_HighScore[pn].SetScore( m_pNotes->m_MemCardScores[pn].fScore );
|
||||
m_textHighScore[pn].SetText( ssprintf("%*.0f", NUM_SCORE_DIGITS, m_pNotes->m_MemCardScores[pn].fScore) );
|
||||
|
||||
m_DifficultyIcon[pn].SetFromNotes( pn, pNotes );
|
||||
if( pNotes && pNotes->IsAutogen() )
|
||||
|
||||
@@ -74,7 +74,7 @@ protected:
|
||||
DifficultyMeter m_DifficultyMeter[NUM_PLAYERS];
|
||||
MusicSortDisplay m_MusicSortDisplay;
|
||||
Sprite m_sprHighScoreFrame[NUM_PLAYERS];
|
||||
ScoreDisplayNormal m_HighScore[NUM_PLAYERS];
|
||||
BitmapText m_textHighScore[NUM_PLAYERS];
|
||||
MusicWheel m_MusicWheel;
|
||||
Sprite m_sprMarathonBalloon;
|
||||
Sprite m_sprLongBalloon;
|
||||
|
||||
Reference in New Issue
Block a user