Files
itgmania212121/stepmania/src/ScreenEvaluation.cpp
T

1421 lines
41 KiB
C++
Raw Normal View History

2003-02-16 04:01:45 +00:00
#include "global.h"
2002-06-24 22:04:31 +00:00
/*
-----------------------------------------------------------------------------
Class: ScreenEvaluation
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ScreenEvaluation.h"
#include "SongManager.h"
#include "ScreenManager.h"
#include "GameManager.h"
#include "RageUtil.h"
#include "GameConstantsAndTypes.h"
2003-08-03 00:13:55 +00:00
#include "Steps.h"
2002-07-23 01:41:40 +00:00
#include "PrefsManager.h"
2002-06-24 22:04:31 +00:00
#include "RageLog.h"
#include "AnnouncerManager.h"
2002-07-23 01:41:40 +00:00
#include "GameState.h"
#include "GrooveRadar.h"
#include "ThemeManager.h"
2003-07-26 22:53:22 +00:00
#include "RageSounds.h"
#include "ActorUtil.h"
#include "RageTimer.h"
#include "UnlockSystem.h"
2003-07-17 20:10:07 +00:00
#include "Course.h"
2003-11-16 04:45:12 +00:00
#include "LightsManager.h"
#include "ProfileManager.h"
2003-12-18 03:14:39 +00:00
#include "song.h"
#include "StageStats.h"
2004-02-11 22:34:04 +00:00
#include "Grade.h"
#include "CodeDetector.h"
#include "RageDisplay.h"
#include "StepMania.h"
const int NUM_SCORE_DIGITS = 9;
2003-03-28 05:47:42 +00:00
// metrics that are common to all ScreenEvaluation classes
2003-12-21 03:39:05 +00:00
#define BANNER_WIDTH THEME->GetMetricF(m_sName,"BannerWidth")
#define BANNER_HEIGHT THEME->GetMetricF(m_sName,"BannerHeight")
2003-10-27 22:24:33 +00:00
const char* JUDGE_STRING[NUM_JUDGE_LINES] =
{
"Marvelous", "Perfect", "Great", "Good", "Boo", "Miss", "OK", "MaxCombo", "TotalError"
};
2003-12-16 10:04:37 +00:00
const char* STATS_STRING[NUM_STATS_LINES] =
{
"Jumps", "Holds", "Mines", "Hands"
};
2003-12-21 03:39:05 +00:00
#define SPIN_GRADES THEME->GetMetricB(m_sName,"SpinGrades")
#define CHEER_DELAY_SECONDS THEME->GetMetricF(m_sName,"CheerDelaySeconds")
#define BAR_ACTUAL_MAX_COMMAND THEME->GetMetric (m_sName,"BarActualMaxCommand")
2003-03-28 05:47:42 +00:00
// metrics that are specific to classes derived from ScreenEvaluation
#define FAILED_SCREEN THEME->GetMetric (m_sName, "FailedScreen")
2003-04-12 06:16:12 +00:00
#define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen")
#define END_SCREEN THEME->GetMetric (m_sName,"EndScreen")
#define SHOW_BANNER_AREA THEME->GetMetricB(m_sName,"ShowBannerArea")
#define SHOW_GRADE_AREA THEME->GetMetricB(m_sName,"ShowGradeArea")
#define SHOW_POINTS_AREA THEME->GetMetricB(m_sName,"ShowPointsArea")
#define SHOW_BONUS_AREA THEME->GetMetricB(m_sName,"ShowBonusArea")
#define SHOW_SURVIVED_AREA THEME->GetMetricB(m_sName,"ShowSurvivedArea")
#define SHOW_WIN_AREA THEME->GetMetricB(m_sName,"ShowWinArea")
2003-04-12 06:16:12 +00:00
#define SHOW_JUDGMENT( l ) THEME->GetMetricB(m_sName,ssprintf("Show%s",JUDGE_STRING[l]))
2003-12-16 10:04:37 +00:00
#define SHOW_STAT( s ) THEME->GetMetricB(m_sName,ssprintf("Show%s",STATS_STRING[l]))
2003-04-12 06:16:12 +00:00
#define SHOW_SCORE_AREA THEME->GetMetricB(m_sName,"ShowScoreArea")
#define SHOW_TOTAL_SCORE_AREA THEME->GetMetricB(m_sName,"ShowTotalScoreArea")
2003-04-12 06:16:12 +00:00
#define SHOW_TIME_AREA THEME->GetMetricB(m_sName,"ShowTimeArea")
2003-10-23 06:28:17 +00:00
#define SHOW_GRAPH_AREA THEME->GetMetricB(m_sName,"ShowGraphArea")
#define SHOW_COMBO_AREA THEME->GetMetricB(m_sName,"ShowComboArea")
2003-10-31 03:10:31 +00:00
#define SHOW_FULL_COMBO THEME->GetMetricB(m_sName,"ShowFullCombo")
2003-10-23 06:28:17 +00:00
#define GRAPH_START_HEIGHT THEME->GetMetricF(m_sName,"GraphStartHeight")
2003-09-27 23:31:42 +00:00
#define TYPE THEME->GetMetric (m_sName,"Type")
2003-12-11 05:23:40 +00:00
#define PASSED_SOUND_TIME THEME->GetMetricF(m_sName,"PassedSoundTime")
#define FAILED_SOUND_TIME THEME->GetMetricF(m_sName,"FailedSoundTime")
#define NUM_SEQUENCE_SOUNDS THEME->GetMetricI(m_sName,"NumSequenceSounds")
#define SOUNDSEQ_TIME( i ) THEME->GetMetricF(m_sName,ssprintf("SoundSeqTime%d", i+1))
2003-12-16 10:04:37 +00:00
#define SOUNDSEQ_NAME( i ) THEME->GetMetric (m_sName,ssprintf("SoundSeqName%d", i+1))
2004-02-11 22:34:04 +00:00
#define USE_GRADE_SPECIFIC_BG THEME->GetMetricB(m_sName,"UseGradeSpecificBG")
#define USE_STYLE_SPECIFIC_BG THEME->GetMetricB(m_sName,"UseStyleSpecificBG")
2003-03-28 05:47:42 +00:00
static const int NUM_SHOWN_RADAR_CATEGORIES = 5;
2003-03-28 05:47:42 +00:00
const ScreenMessage SM_GoToSelectCourse = ScreenMessage(SM_User+3);
const ScreenMessage SM_GoToEndScreen = ScreenMessage(SM_User+5);
const ScreenMessage SM_PlayCheer = ScreenMessage(SM_User+6);
2002-06-24 22:04:31 +00:00
2003-09-27 23:31:42 +00:00
ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
2002-06-24 22:04:31 +00:00
{
//
// debugging
//
2003-12-20 00:20:21 +00:00
if( PREFSMAN->m_bScreenTestMode )
{
GAMESTATE->m_PlayMode = PLAY_MODE_RAVE;
GAMESTATE->m_CurStyle = STYLE_DANCE_VERSUS;
2003-12-22 01:55:03 +00:00
GAMESTATE->m_bSideIsJoined[PLAYER_1] = true;
GAMESTATE->m_bSideIsJoined[PLAYER_2] = true;
2003-12-20 00:20:21 +00:00
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
GAMESTATE->m_pCurSong = SONGMAN->GetAllSongs()[0];
// GAMESTATE->m_pCurCourse = SONGMAN->m_pCourses[0];
GAMESTATE->m_pCurNotes[PLAYER_1] = GAMESTATE->m_pCurSong->m_apNotes[0];
GAMESTATE->m_pCurNotes[PLAYER_2] = GAMESTATE->m_pCurSong->m_apNotes[0];
GAMESTATE->m_PlayerOptions[PLAYER_1].m_fScrollSpeed = 2;
GAMESTATE->m_PlayerOptions[PLAYER_2].m_fScrollSpeed = 2;
GAMESTATE->m_iCurrentStageIndex = 2;
2003-12-22 01:55:03 +00:00
for( float f = 0; f < 100.0f; f += 1.0f )
2003-12-21 08:55:59 +00:00
{
2003-12-22 01:55:03 +00:00
float fP1 = fmodf(f/100*4+.3f,1);
g_CurStageStats.SetLifeRecord( PLAYER_1, fP1, f );
g_CurStageStats.SetLifeRecord( PLAYER_2, 1-fP1, f );
2003-12-21 08:55:59 +00:00
}
2003-12-22 01:55:03 +00:00
g_CurStageStats.iCurCombo[PLAYER_1] = 0;
2003-12-23 04:44:34 +00:00
g_CurStageStats.UpdateComboList( PLAYER_1, 0, false );
g_CurStageStats.iCurCombo[PLAYER_1] = 1;
2003-12-23 04:44:34 +00:00
g_CurStageStats.UpdateComboList( PLAYER_1, 1, false );
g_CurStageStats.iCurCombo[PLAYER_1] = 50;
2003-12-23 04:44:34 +00:00
g_CurStageStats.UpdateComboList( PLAYER_1, 25, false );
g_CurStageStats.iCurCombo[PLAYER_1] = 250;
2003-12-23 04:44:34 +00:00
g_CurStageStats.UpdateComboList( PLAYER_1, 100, false );
2004-01-22 07:22:45 +00:00
g_CurStageStats.iTapNoteScores[PLAYER_1][TNS_MARVELOUS] = 1;
g_CurStageStats.iTapNoteScores[PLAYER_2][TNS_PERFECT] = 1;
2003-12-26 01:09:04 +00:00
g_vPlayedStageStats.clear();
2003-12-20 00:20:21 +00:00
}
LOG->Trace( "ScreenEvaluation::ScreenEvaluation()" );
2003-11-16 04:45:12 +00:00
LIGHTSMAN->SetLightMode( LIGHTMODE_MENU );
m_bFailed = g_CurStageStats.AllFailed();
ZERO( m_bSavedScreenshot );
2003-04-12 06:16:12 +00:00
m_sName = sClassName;
2003-09-27 23:31:42 +00:00
if( !TYPE.CompareNoCase("stage") )
m_Type = stage;
else if( !TYPE.CompareNoCase("summary") )
m_Type = summary;
else if( !TYPE.CompareNoCase("course") )
m_Type = course;
else
RageException::Throw("Unknown evaluation type \"%s\"", TYPE.c_str() );
2002-06-24 22:04:31 +00:00
//
// Figure out which statistics and songs we're going to display
//
StageStats stageStats;
vector<Song*> vSongsToShow;
switch( m_Type )
2002-06-24 22:04:31 +00:00
{
case summary:
2003-01-27 02:00:38 +00:00
GAMESTATE->GetFinalEvalStatsAndSongs( stageStats, vSongsToShow );
2002-07-28 20:28:37 +00:00
break;
case stage:
case course:
stageStats = g_CurStageStats;
2002-07-23 01:41:40 +00:00
break;
default:
ASSERT(0);
2002-06-24 22:04:31 +00:00
}
2003-10-23 06:28:17 +00:00
2003-09-21 00:17:34 +00:00
LOG->Trace( "total error: %i, %i", stageStats.iTotalError[0], stageStats.iTotalError[1] );
2002-06-24 22:04:31 +00:00
/*
//
// Debugging
//
2002-06-24 22:04:31 +00:00
{
for( int p=0; p<NUM_PLAYERS; p++ ) // foreach line
for( int r=0; r<NUM_RADAR_CATEGORIES; r++ ) // foreach line
{
stageStats.fRadarPossible[p][r] = 0.5f + r/10.0f;
stageStats.fRadarActual[p][r] = 0.5f + r/10.0f;
2002-06-24 22:04:31 +00:00
}
}
*/
2002-06-24 22:04:31 +00:00
2002-07-23 01:41:40 +00:00
//
// Calculate grades
//
2002-06-24 22:04:31 +00:00
Grade grade[NUM_PLAYERS];
int p;
2002-07-23 01:41:40 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
if( GAMESTATE->IsPlayerEnabled(p) )
grade[p] = stageStats.GetGrade( (PlayerNumber)p );
else
2004-01-20 03:32:48 +00:00
grade[p] = GRADE_FAILED;
2003-08-11 12:14:26 +00:00
if (PREFSMAN->m_iScoringType == PrefsManager::SCORING_5TH)
{
int ScoreBonuses[9] = {0, 0, 100, 1000, 10000, 100000, 1000000, 10000000, 10000000};
g_CurStageStats.iBonus[p] += ScoreBonuses[(int)grade[p] ];
stageStats.iBonus[p] += ScoreBonuses[(int)grade[p] ];
2003-08-11 12:14:26 +00:00
}
2002-07-23 01:41:40 +00:00
}
2002-06-24 22:04:31 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
2003-12-18 03:14:39 +00:00
{
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip
2003-12-18 03:14:39 +00:00
switch( m_Type )
{
case stage:
// update unlock data
UNLOCKSYS->UnlockClearStage();
UNLOCKSYS->UnlockAddAP( grade[p] );
UNLOCKSYS->UnlockAddSP( grade[p] );
UNLOCKSYS->UnlockAddDP( (float)stageStats.iActualDancePoints[p] );
2004-01-22 02:39:55 +00:00
// if it's extra stage, update # passed stages
if ( (GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) &&
grade[p] > GRADE_FAILED )
UNLOCKSYS->UnlockClearExtraStage();
break;
case course:
UNLOCKSYS->UnlockAddDP( (float) stageStats.iActualDancePoints[p] );
UNLOCKSYS->UnlockAddAP( (float) stageStats.iSongsPassed[p] );
UNLOCKSYS->UnlockAddSP( (float) stageStats.iSongsPassed[p] );
break;
2003-12-18 03:14:39 +00:00
}
}
2003-12-18 03:43:25 +00:00
//
2002-08-27 16:53:25 +00:00
// update persistent statistics
//
2003-12-18 03:14:39 +00:00
int iPersonalHighScoreIndex[NUM_PLAYERS] = { -1, -1 };
int iMachineHighScoreIndex[NUM_PLAYERS] = { -1, -1 };
RankingCategory rc[NUM_PLAYERS] = { NUM_RANKING_CATEGORIES, NUM_RANKING_CATEGORIES };
2003-12-18 03:43:25 +00:00
CommitScores( stageStats, iPersonalHighScoreIndex, iMachineHighScoreIndex, rc );
2002-06-24 22:04:31 +00:00
m_bTryExtraStage =
GAMESTATE->HasEarnedExtraStage() &&
m_Type==stage;
2003-02-28 04:31:36 +00:00
2003-04-12 06:16:12 +00:00
m_Menu.Load( m_sName );
this->AddChild( &m_Menu );
2004-01-11 07:01:06 +00:00
//
// load pass/fail sound
//
2004-02-11 22:34:04 +00:00
// if(m_Type==stage)
// {
2003-12-11 05:23:40 +00:00
int snd=0;
for(snd=0;snd<NUM_SEQUENCE_SOUNDS;snd++) // grab in any sound sequence the user may want to throw onto this screen
{
EvalSoundSequence temp;
temp.fTime = SOUNDSEQ_TIME(snd);
temp.sSound.Load(THEME->GetPathToS(SOUNDSEQ_NAME(snd),false));
m_SoundSequences.push_back(temp);
}
2004-02-11 22:34:04 +00:00
// }
2004-02-16 00:55:36 +00:00
m_bgOverlay.LoadFromAniDir( THEME->GetPathB(m_sName, "overlay") );
m_bgOverlay.SetZ( -1 ); /* draw on top of everything except transitions */
this->AddChild( &m_bgOverlay );
2003-12-11 05:23:40 +00:00
m_bPassFailTriggered = false; // the sound hasn't been triggered yet
2004-02-14 01:26:21 +00:00
switch( m_Type )
{
2004-02-14 01:26:21 +00:00
case stage:
case course:
if( m_bFailed )
m_sndPassFail.Load( THEME->GetPathS(m_sName, "failed") );
else
m_sndPassFail.Load( THEME->GetPathS(m_sName, "passed") );
2004-02-11 22:34:04 +00:00
m_sndPassFail.Play();
}
2004-01-11 07:01:06 +00:00
2004-02-11 22:34:04 +00:00
m_bgCondBga.Load(m_sName);
// Special Background Stuff
/* if(m_Type == stage)
{
if(USE_GRADE_SPECIFIC_BG || USE_STYLE_SPECIFIC_BG) // put other 'whatever specific' checks here
{
CString bgpath = "ScreenEvaluationStage ";
if(USE_GRADE_SPECIFIC_BG) // individual check for grades
{
int highestgrade=GRADE_NO_DATA;
CString gradename = "";
unsigned pn=0;
for(pn=0;pn<NUM_PLAYERS;pn++)
{
if( GAMESTATE->IsPlayerEnabled( (PlayerNumber)pn ) )
{
int playergrade = stageStats.GetGrade((PlayerNumber)pn);
if(playergrade < highestgrade)
{
highestgrade = playergrade;
gradename = GradeToString((Grade)playergrade);
}
}
}
bgpath += gradename;
}
if(USE_STYLE_SPECIFIC_BG)
{
CString stylename = ssprintf("%d", GAMESTATE->m_CurStyle);
bgpath += stylename;
}
m_bgSpecialBack.LoadFromAniDir( THEME->GetPathToB(bgpath) );
}
}
*/
2004-01-11 07:01:06 +00:00
//
// load other sounds
//
m_soundStart.Load( THEME->GetPathToS("ScreenEvaluation start") );
//
// init banner area
//
2003-03-28 05:47:42 +00:00
if( SHOW_BANNER_AREA )
2002-08-22 09:31:32 +00:00
{
2003-03-28 05:47:42 +00:00
switch( m_Type )
{
2003-03-28 05:47:42 +00:00
case stage:
2002-07-23 01:41:40 +00:00
{
2003-03-28 05:47:42 +00:00
m_LargeBanner.LoadFromSong( GAMESTATE->m_pCurSong );
m_LargeBanner.ScaleToClipped( BANNER_WIDTH, BANNER_HEIGHT );
m_LargeBanner.SetName( "LargeBanner" );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_LargeBanner );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_LargeBanner );
m_sprLargeBannerFrame.Load( THEME->GetPathToG("ScreenEvaluation banner frame") );
2003-12-18 20:17:32 +00:00
m_sprLargeBannerFrame.SetName( "LargeBannerFrame" );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprLargeBannerFrame );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_sprLargeBannerFrame );
m_sprStage.Load( THEME->GetPathToG("ScreenEvaluation stage "+GAMESTATE->GetStageText()) );
m_sprStage.SetName( "Stage" );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprStage );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_sprStage );
for( int p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue; // skip
2003-11-13 00:39:36 +00:00
#ifdef _XBOX
//shorten filenames for FATX
m_DifficultyIcon[p].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation diff icons 1x%d",NUM_DIFFICULTIES)) );
2003-11-13 00:39:36 +00:00
#else
m_DifficultyIcon[p].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation difficulty icons 1x%d",NUM_DIFFICULTIES)) );
2003-11-13 00:39:36 +00:00
#endif
2003-03-28 05:47:42 +00:00
m_DifficultyIcon[p].SetFromNotes( (PlayerNumber)p, GAMESTATE->m_pCurNotes[p] );
m_DifficultyIcon[p].SetName( ssprintf("DifficultyIconP%d",p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_DifficultyIcon[p] );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_DifficultyIcon[p] );
m_textPlayerOptions[p].LoadFromFont( THEME->GetPathToF("Common normal") );
2003-03-28 05:47:42 +00:00
CString sPO = GAMESTATE->m_PlayerOptions[p].GetString();
sPO.Replace( ", ", "\n" );
m_textPlayerOptions[p].SetName( ssprintf("PlayerOptionsP%d",p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_textPlayerOptions[p] );
2003-03-28 05:47:42 +00:00
m_textPlayerOptions[p].SetText( sPO );
this->AddChild( &m_textPlayerOptions[p] );
}
2002-07-23 01:41:40 +00:00
}
2003-03-28 05:47:42 +00:00
break;
case summary:
2002-07-17 19:24:27 +00:00
{
2003-03-28 05:47:42 +00:00
for( unsigned i=0; i<vSongsToShow.size(); i++ )
{
m_SmallBanner[i].LoadFromSong( vSongsToShow[i] );
m_SmallBanner[i].ScaleToClipped( BANNER_WIDTH, BANNER_HEIGHT );
m_SmallBanner[i].SetName( ssprintf("SmallBanner%d",i+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_SmallBanner[i] );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_SmallBanner[i] );
m_sprSmallBannerFrame[i].Load( THEME->GetPathToG("ScreenEvaluation banner frame") );
m_sprSmallBannerFrame[i].SetName( ssprintf("SmallBanner%d",i+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprSmallBannerFrame[i] );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_sprSmallBannerFrame[i] );
}
2002-07-17 19:24:27 +00:00
}
2003-03-28 05:47:42 +00:00
break;
case course:
{
m_LargeBanner.LoadFromCourse( GAMESTATE->m_pCurCourse );
m_LargeBanner.ScaleToClipped( BANNER_WIDTH, BANNER_HEIGHT );
m_LargeBanner.SetName( "LargeBanner" );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_LargeBanner );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_LargeBanner );
m_sprLargeBannerFrame.Load( THEME->GetPathToG("ScreenEvaluation banner frame") );
2003-12-19 22:03:40 +00:00
m_sprLargeBannerFrame.SetName( "LargeBannerFrame" );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprLargeBannerFrame );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_sprLargeBannerFrame );
}
break;
default:
ASSERT(0);
2002-06-24 22:04:31 +00:00
}
}
2002-06-24 22:04:31 +00:00
2003-10-23 06:28:17 +00:00
//
// init graph area
//
if( SHOW_GRAPH_AREA )
{
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue; // skip
2003-12-21 08:55:59 +00:00
m_sprGraphFrame[p].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation graph frame p%d",p+1)) );
m_sprGraphFrame[p].SetName( ssprintf("GraphFrameP%d",p+1) );
SET_XY_AND_ON_COMMAND( m_sprGraphFrame[p] );
this->AddChild( &m_sprGraphFrame[p] );
2003-10-23 06:28:17 +00:00
m_Graph[p].SetName( ssprintf("GraphP%i",p+1) );
m_Graph[p].Load( THEME->GetPathToG(ssprintf("%s graph p%i",m_sName.c_str(), p+1)), GRAPH_START_HEIGHT );
m_Graph[p].LoadFromStageStats( stageStats, (PlayerNumber)p );
SET_XY_AND_ON_COMMAND( m_Graph[p] );
this->AddChild( &m_Graph[p] );
}
}
if( SHOW_COMBO_AREA )
{
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue; // skip
2003-12-28 06:00:27 +00:00
m_Combo[p].SetName( m_sName, ssprintf("ComboP%i",p+1) );
2003-10-23 06:28:17 +00:00
m_Combo[p].Load( ssprintf("ScreenEvaluationStage combo p%i", p+1), stageStats, (PlayerNumber)p );
SET_XY_AND_ON_COMMAND( m_Combo[p] );
this->AddChild( &m_Combo[p] );
}
}
//
// init grade area
//
2003-03-28 05:47:42 +00:00
if( SHOW_GRADE_AREA )
{
2004-01-30 00:36:28 +00:00
// ugly: Touch all possible grade files to make sure they're all present
2004-01-20 03:32:48 +00:00
for( int g=GRADE_TIER_1; g<NUM_GRADES; g++ )
THEME->GetPathToG( "ScreenEvaluation grade "+ GradeToString((Grade)g) );
2003-03-28 05:47:42 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip
m_sprGradeFrame[p].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation grade frame p%d",p+1)) );
m_sprGradeFrame[p].SetName( ssprintf("GradeFrameP%d",p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprGradeFrame[p] );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_sprGradeFrame[p] );
m_Grades[p].Load( THEME->GetPathToG("ScreenEvaluation grades") );
2003-03-31 03:11:31 +00:00
m_Grades[p].SetGrade( (PlayerNumber)p, grade[p] );
m_Grades[p].SetName( ssprintf("GradeP%d",p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_Grades[p] );
2003-03-28 05:47:42 +00:00
if( SPIN_GRADES )
2003-03-31 03:11:31 +00:00
m_Grades[p].Spin();
2003-03-28 05:47:42 +00:00
this->AddChild( &m_Grades[p] );
2004-01-20 03:32:48 +00:00
m_sprGrade[p].Load( THEME->GetPathToG( "ScreenEvaluation grade "+ GradeToString(grade[p]) ) );
m_sprGrade[p]->SetName( ssprintf("GradeP%d",p+1) );
SET_XY_AND_ON_COMMAND( m_sprGrade[p] );
this->AddChild( m_sprGrade[p] );
2003-03-25 21:17:29 +00:00
}
2003-03-28 05:47:42 +00:00
}
//
// init points area
//
if( SHOW_POINTS_AREA )
{
for( p=0; p<NUM_PLAYERS; p++ )
2003-03-25 21:17:29 +00:00
{
2003-10-13 04:43:36 +00:00
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip
m_sprPercentFrame[p].SetName( ssprintf("PercentFrameP%d",p+1) );
2003-10-05 23:00:26 +00:00
m_sprPercentFrame[p].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation percent frame p%d",p+1)) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprPercentFrame[p] );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_sprPercentFrame[p] );
/* Use "ScreenEvaluation Percent" for the [metric set], but position and
2003-10-05 00:33:05 +00:00
* tween it with "PercentP1X", etc. */
m_Percent[p].SetName( "ScreenEvaluation Percent" );
2003-10-05 00:33:05 +00:00
m_Percent[p].Load( (PlayerNumber) p );
2003-12-21 03:39:05 +00:00
m_Percent[p].SetXY( THEME->GetMetricF(m_sName, ssprintf("PercentP%dX",p+1)),
THEME->GetMetricF(m_sName,ssprintf("PercentP%dY",p+1)) );
m_Percent[p].Command( THEME->GetMetric(m_sName,ssprintf("PercentP%dOnCommand",p+1)) );
2003-10-05 00:33:05 +00:00
this->AddChild( &m_Percent[p] );
2003-03-25 21:17:29 +00:00
}
}
//
// init bonus area
//
2003-03-28 05:47:42 +00:00
if( SHOW_BONUS_AREA )
{
2003-03-28 05:47:42 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip
m_sprBonusFrame[p].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation bonus frame p%d",p+1)) );
m_sprBonusFrame[p].SetName( ssprintf("BonusFrameP%d",p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprBonusFrame[p] );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_sprBonusFrame[p] );
for( int r=0; r<NUM_SHOWN_RADAR_CATEGORIES; r++ ) // foreach line
2003-03-28 05:47:42 +00:00
{
2003-07-04 20:15:15 +00:00
m_sprPossibleBar[p][r].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation bar possible p%d",p+1)) );
2003-03-28 05:47:42 +00:00
m_sprPossibleBar[p][r].SetWidth( m_sprPossibleBar[p][r].GetUnzoomedWidth() * stageStats.fRadarPossible[p][r] );
m_sprPossibleBar[p][r].SetName( ssprintf("BarPossible%dP%d",r+1,p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprPossibleBar[p][r] );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_sprPossibleBar[p][r] );
2003-07-04 20:15:15 +00:00
m_sprActualBar[p][r].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation bar actual p%d",p+1)) );
// should be out of the possible bar, not actual (whatever value that is at)
m_sprActualBar[p][r].SetWidth( m_sprPossibleBar[p][r].GetUnzoomedWidth() * stageStats.fRadarActual[p][r] );
float value = (float)100 * m_sprActualBar[p][r].GetUnzoomedWidth() / m_sprPossibleBar[p][r].GetUnzoomedWidth();
LOG->Trace("Radar bar %d of 5 - %f percent", r, value);
m_sprActualBar[p][r].SetName( ssprintf("BarActual%dP%d",r+1,p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprActualBar[p][r] );
// .99999 is fairly close to 1.00, so we use that
if( stageStats.fRadarActual[p][r] > 0.99999f )
2003-03-28 05:47:42 +00:00
m_sprActualBar[p][r].Command( BAR_ACTUAL_MAX_COMMAND );
this->AddChild( &m_sprActualBar[p][r] );
}
2002-06-24 22:04:31 +00:00
}
2003-03-28 05:47:42 +00:00
}
2003-03-28 05:47:42 +00:00
//
// init survived area
//
if( SHOW_SURVIVED_AREA )
{
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip
m_sprSurvivedFrame[p].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation survived frame p%d",p+1)) );
m_sprSurvivedFrame[p].SetName( ssprintf("SurvivedFrameP%d",p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprSurvivedFrame[p] );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_sprSurvivedFrame[p] );
m_textSurvivedNumber[p].LoadFromNumbers( THEME->GetPathToN("ScreenEvaluation stage") );
2003-03-28 05:47:42 +00:00
m_textSurvivedNumber[p].EnableShadow( false );
// curewater: edited the "# stages cleared" text so it deducts one if you failed.
// Should be accurate, but I'm not sure if its "standard" that (bool)true = 1. (assumption)
m_textSurvivedNumber[p].SetText( ssprintf("%02d", stageStats.iSongsPlayed[p] - (int)stageStats.bFailed[p]) );
m_textSurvivedNumber[p].SetName( ssprintf("SurvivedNumberP%d",p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_textSurvivedNumber[p] );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_textSurvivedNumber[p] );
}
2002-06-24 22:04:31 +00:00
}
2003-03-28 05:47:42 +00:00
//
// init win area
//
if( SHOW_WIN_AREA )
{
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip
m_sprWinFrame[p].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation win frame p%d",p+1)) );
m_sprWinFrame[p].SetName( ssprintf("WinFrameP%d",p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprWinFrame[p] );
this->AddChild( &m_sprWinFrame[p] );
m_sprWin[p].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation win p%d 1x3",p+1)) );
m_sprWin[p].StopAnimating();
int iFrame = GAMESTATE->GetStageResult( (PlayerNumber)p );
m_sprWin[p].SetState( iFrame );
m_sprWin[p].SetName( ssprintf("WinP%d",p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprWin[p] );
this->AddChild( &m_sprWin[p] );
}
}
//
2003-03-28 05:47:42 +00:00
// init judgment area
//
2003-02-14 06:53:13 +00:00
int l;
for( l=0; l<NUM_JUDGE_LINES; l++ )
{
if( l == 0 && !GAMESTATE->ShowMarvelous() )
2003-04-11 00:12:07 +00:00
continue; // skip
2003-03-28 05:47:42 +00:00
if( SHOW_JUDGMENT(l) )
{
2003-10-27 22:24:33 +00:00
m_sprJudgeLabels[l].Load( THEME->GetPathToG( "ScreenEvaluation judge labels" ) );
2003-03-28 05:47:42 +00:00
m_sprJudgeLabels[l].StopAnimating();
m_sprJudgeLabels[l].SetState( l );
m_sprJudgeLabels[l].SetName( ssprintf("%sLabel",JUDGE_STRING[l]) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprJudgeLabels[l] );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_sprJudgeLabels[l] );
2003-03-28 05:47:42 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip
m_textJudgeNumbers[l][p].LoadFromNumbers( THEME->GetPathToN("ScreenEvaluation judge") );
2003-03-28 05:47:42 +00:00
m_textJudgeNumbers[l][p].EnableShadow( false );
m_textJudgeNumbers[l][p].SetDiffuse( PlayerToColor(p) );
m_textJudgeNumbers[l][p].SetName( ssprintf("%sNumberP%d",JUDGE_STRING[l],p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_textJudgeNumbers[l][p] );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_textJudgeNumbers[l][p] );
int iValue;
switch( l )
{
case 0: iValue = stageStats.iTapNoteScores[p][TNS_MARVELOUS]; break;
case 1: iValue = stageStats.iTapNoteScores[p][TNS_PERFECT]; break;
case 2: iValue = stageStats.iTapNoteScores[p][TNS_GREAT]; break;
case 3: iValue = stageStats.iTapNoteScores[p][TNS_GOOD]; break;
case 4: iValue = stageStats.iTapNoteScores[p][TNS_BOO]; break;
case 5: iValue = stageStats.iTapNoteScores[p][TNS_MISS]; break;
case 6: iValue = stageStats.iHoldNoteScores[p][HNS_OK]; break;
2003-03-28 05:47:42 +00:00
case 7: iValue = stageStats.iMaxCombo[p]; break;
2003-10-27 22:24:33 +00:00
case 8: iValue = stageStats.iTotalError[p]; break;
default: iValue = 0; ASSERT(0);
2003-03-28 05:47:42 +00:00
}
m_textJudgeNumbers[l][p].SetText( ssprintf("%4d",iValue) );
}
}
}
2003-12-16 10:04:37 +00:00
for( l=0; l<NUM_STATS_LINES; l++ )
{
if( !SHOW_STAT(l) )
continue;
m_sprStatsLabel[l].Load( THEME->GetPathToG( ssprintf("ScreenEvaluation label %s", STATS_STRING[l]) ) );
m_sprStatsLabel[l]->StopAnimating();
m_sprStatsLabel[l]->SetName( ssprintf("%sLabel",STATS_STRING[l]) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprStatsLabel[l] );
2003-12-16 10:04:37 +00:00
this->AddChild( m_sprStatsLabel[l] );
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip
m_textStatsText[l][p].LoadFromFont( THEME->GetPathToF("ScreenEvaluation stats") );
m_textStatsText[l][p].SetDiffuse( PlayerToColor(p) );
m_textStatsText[l][p].SetName( ssprintf("%sTextP%d",STATS_STRING[l],p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_textStatsText[l][p] );
2003-12-16 10:04:37 +00:00
this->AddChild( &m_textStatsText[l][p] );
const int indeces[NUM_STATS_LINES] =
{
RADAR_NUM_JUMPS, RADAR_NUM_HOLDS, RADAR_NUM_MINES, RADAR_NUM_HANDS
};
const int ind = indeces[l];
const int iActual = (int) roundf(stageStats.fRadarActual[p][ind]);
const int iPossible = (int) roundf(stageStats.fRadarPossible[p][ind]);
m_textStatsText[l][p].SetText( ssprintf("%i/%i",iActual, iPossible) );
}
}
//
// init score area
//
2003-03-28 05:47:42 +00:00
if( SHOW_SCORE_AREA )
{
2003-12-21 08:55:59 +00:00
m_sprScoreLabel.Load( THEME->GetPathToG("ScreenEvaluation score label") );
m_sprScoreLabel.SetName( "ScoreLabel" );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprScoreLabel );
this->AddChild( &m_sprScoreLabel );
2003-03-28 05:47:42 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip
m_textScore[p].LoadFromNumbers( THEME->GetPathToN("ScreenEvaluation score") );
m_textScore[p].EnableShadow( false );
m_textScore[p].SetDiffuse( PlayerToColor(p) );
m_textScore[p].SetName( ssprintf("ScoreNumberP%d",p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_textScore[p] );
2003-06-18 20:08:39 +00:00
m_textScore[p].SetText( ssprintf("%*.0i", NUM_SCORE_DIGITS, stageStats.iScore[p]) );
this->AddChild( &m_textScore[p] );
2003-03-28 05:47:42 +00:00
}
}
if( SHOW_TOTAL_SCORE_AREA )
{
2003-12-21 04:19:51 +00:00
m_sprTotalScoreLabel.Load( THEME->GetPathToG("ScreenEvaluation totalscore label") );
m_sprTotalScoreLabel.SetName( "TotalScoreLabel" );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprTotalScoreLabel );
this->AddChild( &m_sprTotalScoreLabel );
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip
int iTotalScore=0;
for( unsigned i=0; i<g_vPlayedStageStats.size(); i++ )
iTotalScore += g_vPlayedStageStats[i].iScore[p];
//iTotalScore += stageStats.iScore[p];
m_textTotalScore[p].LoadFromNumbers( THEME->GetPathToN("ScreenEvaluation totalscore") );
m_textTotalScore[p].EnableShadow( false );
m_textTotalScore[p].SetDiffuse( PlayerToColor(p) );
m_textTotalScore[p].SetName( ssprintf("TotalScoreNumberP%d",p+1) );
m_textTotalScore[p].SetText( ssprintf("%*.0i", NUM_SCORE_DIGITS+2, iTotalScore) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_textTotalScore[p] );
this->AddChild( &m_textTotalScore[p] );
}
}
2003-03-28 05:47:42 +00:00
//
// init time area
//
if( SHOW_TIME_AREA )
{
2003-12-21 04:19:51 +00:00
m_sprTimeLabel.Load( THEME->GetPathToG("ScreenEvaluation time label") );
m_sprTimeLabel.SetName( "TimeLabel" );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprTimeLabel );
2003-03-28 05:47:42 +00:00
this->AddChild( &m_sprTimeLabel );
2003-03-28 05:47:42 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
2003-03-28 05:47:42 +00:00
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip
2003-12-21 04:19:51 +00:00
m_textTime[p].LoadFromNumbers( THEME->GetPathToN("ScreenEvaluation time") );
m_textTime[p].EnableShadow( false );
m_textTime[p].SetDiffuse( PlayerToColor(p) );
2003-12-21 04:19:51 +00:00
m_textTime[p].SetName( ssprintf("TimeNumberP%d",p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_textTime[p] );
m_textTime[p].SetText( SecondsToTime(stageStats.fAliveSeconds[p]) );
this->AddChild( &m_textTime[p] );
}
2003-03-28 05:47:42 +00:00
}
2003-03-28 05:47:42 +00:00
//
// init extra area
//
for( p=0; p<NUM_PLAYERS; p++ )
{
2003-10-19 21:38:11 +00:00
if( iMachineHighScoreIndex[p] != -1 )
{
2003-12-21 04:19:51 +00:00
m_sprMachineRecord[p].Load( THEME->GetPathToG("ScreenEvaluation machine record") );
m_sprMachineRecord[p].SetName( ssprintf("MachineRecordP%d",p+1) );
2003-10-19 21:38:11 +00:00
m_sprMachineRecord[p].SetState( iMachineHighScoreIndex[p] );
m_sprMachineRecord[p].StopAnimating();
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprMachineRecord[p] );
2003-10-19 21:38:11 +00:00
this->AddChild( &m_sprMachineRecord[p] );
}
if( iPersonalHighScoreIndex[p] != -1 )
{
m_sprPersonalRecord[p].Load( THEME->GetPathToG("ScreenEvaluation personal record") );
2003-12-21 04:19:51 +00:00
m_sprPersonalRecord[p].SetName( ssprintf("PersonalRecordP%d",p+1) );
2003-10-19 21:38:11 +00:00
m_sprPersonalRecord[p].SetState( iPersonalHighScoreIndex[p] );
m_sprPersonalRecord[p].StopAnimating();
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprPersonalRecord[p] );
2003-10-19 21:38:11 +00:00
this->AddChild( &m_sprPersonalRecord[p] );
}
2003-10-31 03:10:31 +00:00
if( SHOW_FULL_COMBO && stageStats.FullCombo( (PlayerNumber) p ) )
{
2003-12-22 01:55:03 +00:00
LOG->Trace( "Full combo for P%i", p+1 );
2003-10-31 03:10:31 +00:00
m_FullCombo[p].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation full combo P%i",p+1)) );
2003-10-31 03:53:12 +00:00
m_FullCombo[p]->SetName( ssprintf("FullComboP%d",p+1) );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_FullCombo[p] );
2003-10-31 03:10:31 +00:00
this->AddChild( m_FullCombo[p] );
}
}
2003-10-19 21:38:11 +00:00
bool bOneHasNewTopRecord = false;
for( p=0; p<NUM_PLAYERS; p++ )
2003-10-19 23:12:51 +00:00
if( GAMESTATE->IsPlayerEnabled(p) && (iMachineHighScoreIndex[p] != -1 || iPersonalHighScoreIndex[p] != -1) )
2003-10-19 21:38:11 +00:00
bOneHasNewTopRecord = true;
2004-01-22 02:39:55 +00:00
Grade best_grade = GRADE_NO_DATA;
for( p=0; p<NUM_PLAYERS; p++ )
best_grade = min( best_grade, grade[p] );
2002-06-24 22:04:31 +00:00
2003-10-17 08:03:46 +00:00
if( PREFSMAN->m_bAllowExtraStage && m_bTryExtraStage )
2002-06-24 22:04:31 +00:00
{
m_sprTryExtraStage.Load( THEME->GetPathToG(GAMESTATE->IsExtraStage()?"ScreenEvaluation try extra2":"ScreenEvaluation try extra1") );
m_sprTryExtraStage.SetName( "TryExtraStage" );
2003-12-21 03:39:05 +00:00
SET_XY_AND_ON_COMMAND( m_sprTryExtraStage );
this->AddChild( &m_sprTryExtraStage );
2002-06-24 22:04:31 +00:00
if( GAMESTATE->IsExtraStage() )
2003-07-26 22:53:22 +00:00
SOUND->PlayOnce( THEME->GetPathToS("ScreenEvaluation try extra2") );
else
2003-07-26 22:53:22 +00:00
SOUND->PlayOnce( THEME->GetPathToS("ScreenEvaluation try extra1") );
2002-06-24 22:04:31 +00:00
}
2003-10-19 21:38:11 +00:00
else if( bOneHasNewTopRecord && ANNOUNCER->HasSoundsFor("evaluation new record") )
{
2003-07-26 22:53:22 +00:00
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation new record") );
}
2002-06-24 22:04:31 +00:00
else
2003-03-28 05:47:42 +00:00
{
switch( m_Type )
2002-06-24 22:04:31 +00:00
{
case stage:
2003-05-13 13:35:32 +00:00
switch( GAMESTATE->m_PlayMode )
{
2003-08-19 04:27:50 +00:00
case PLAY_MODE_BATTLE:
2003-05-13 13:35:32 +00:00
{
2003-06-30 18:08:27 +00:00
bool bWon = GAMESTATE->GetStageResult(GAMESTATE->m_MasterPlayerNumber) == RESULT_WIN;
2003-05-13 13:35:32 +00:00
if( bWon )
2003-07-26 22:53:22 +00:00
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation win") );
2003-05-13 13:35:32 +00:00
else
2003-07-26 22:53:22 +00:00
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation lose") );
2003-05-13 13:35:32 +00:00
}
break;
default:
2004-01-20 07:09:44 +00:00
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation "+GradeToString(best_grade)) );
2003-05-13 13:35:32 +00:00
break;
}
2002-07-23 01:41:40 +00:00
break;
case course:
case summary:
2004-01-20 07:09:44 +00:00
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation final "+GradeToOldString(best_grade)) );
2002-07-23 01:41:40 +00:00
break;
2002-06-24 22:04:31 +00:00
default:
2002-07-23 01:41:40 +00:00
ASSERT(0);
2002-06-24 22:04:31 +00:00
}
}
2004-01-20 07:09:44 +00:00
switch( best_grade )
2002-10-18 19:01:32 +00:00
{
2004-01-20 03:32:48 +00:00
case GRADE_TIER_1:
case GRADE_TIER_2:
case GRADE_TIER_3:
this->PostScreenMessage( SM_PlayCheer, CHEER_DELAY_SECONDS );
2002-10-18 19:01:32 +00:00
break;
}
2003-11-24 03:28:40 +00:00
this->SortByZ();
2002-08-27 16:53:25 +00:00
2003-12-11 05:23:40 +00:00
2003-07-26 22:53:22 +00:00
SOUND->PlayMusic( THEME->GetPathToS("ScreenEvaluation music") );
m_timerSoundSequences.SetZero(); // zero the sound sequence timer
m_timerSoundSequences.Touch(); // set the timer going :]
m_fScreenCreateTime = RageTimer::GetTimeSinceStart();
2002-06-24 22:04:31 +00:00
}
2003-12-18 03:43:25 +00:00
void ScreenEvaluation::CommitScores( const StageStats &stageStats, int iPersonalHighScoreIndex[NUM_PLAYERS], int iMachineHighScoreIndex[NUM_PLAYERS], RankingCategory rc[NUM_PLAYERS] )
{
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_BATTLE:
case PLAY_MODE_RAVE:
return; /* don't save scores in battle */
}
// don't save scores if the player chose not to
if( !GAMESTATE->m_SongOptions.m_bSaveScore )
return;
2003-12-18 04:37:52 +00:00
int p;
for( p=0; p<NUM_PLAYERS; p++ )
2003-12-18 03:43:25 +00:00
{
if( !GAMESTATE->IsHumanPlayer(p) )
continue;
// whether or not to save scores when the stage was failed
// depends on if this is a course or not ... it's handled
// below in the switch
2004-02-09 06:26:13 +00:00
HighScore hs;
hs.grade = stageStats.GetGrade( (PlayerNumber)p );
hs.iScore = stageStats.iScore[p];
hs.fPercentDP = stageStats.GetPercentDancePoints( (PlayerNumber)p );
2004-02-10 09:42:01 +00:00
hs.fSurviveSeconds = stageStats.fAliveSeconds[p];
hs.sModifiers = GAMESTATE->m_PlayerOptions[p].GetString();
2004-02-09 06:26:13 +00:00
StepsType nt = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
2003-12-18 03:43:25 +00:00
switch( m_Type )
{
case stage:
{
// don't save scores for a failed song
2003-12-25 07:27:23 +00:00
if( stageStats.bFailed[p] )
continue;
2003-12-18 03:43:25 +00:00
ASSERT( GAMESTATE->m_pCurNotes[p] );
if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForHighScore )
2004-02-09 06:26:13 +00:00
PROFILEMAN->AddStepsHighScore( GAMESTATE->m_pCurNotes[p], (PlayerNumber)p, hs, iPersonalHighScoreIndex[p], iMachineHighScoreIndex[p] );
2003-12-18 03:43:25 +00:00
}
break;
case summary:
{
2003-12-25 07:27:23 +00:00
// don't save scores if any stage was failed
if( stageStats.bFailed[p] )
continue;
2003-12-18 03:43:25 +00:00
float fAverageMeter = stageStats.iMeter[p] / (float)PREFSMAN->m_iNumArcadeStages;
rc[p] = AverageMeterToRankingCategory( fAverageMeter );
if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForHighScore )
2004-02-09 06:26:13 +00:00
PROFILEMAN->AddCategoryHighScore( nt, rc[p], (PlayerNumber)p, hs, iPersonalHighScoreIndex[p], iMachineHighScoreIndex[p] );
2004-02-10 09:42:01 +00:00
// TRICKY: Increment play count here, and not on ScreenGameplay like the others.
PROFILEMAN->IncrementCategoryPlayCount( nt, rc[p], (PlayerNumber)p );
2003-12-18 03:43:25 +00:00
}
break;
case course:
{
Course* pCourse = GAMESTATE->m_pCurCourse;
if( pCourse )
{
2003-12-25 07:27:23 +00:00
// don't save scores for a failed Nonstop
2003-12-18 03:43:25 +00:00
// DO save scores for a failed Oni/Endless
2003-12-25 07:27:23 +00:00
if( stageStats.bFailed[p] && pCourse->IsNonstop() )
continue;
2003-12-18 03:43:25 +00:00
if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForHighScore )
2004-02-09 06:26:13 +00:00
PROFILEMAN->AddCourseHighScore( pCourse, nt, (PlayerNumber)p, hs, iPersonalHighScoreIndex[p], iMachineHighScoreIndex[p] );
2003-12-18 03:43:25 +00:00
}
}
break;
default:
ASSERT(0);
}
}
// If both players get a machine high score, a player whose score is added later
// may bump the players who were added earlier. Adjust for this.
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsHumanPlayer(p) )
continue; // skip
if( iMachineHighScoreIndex[p] == -1 ) // no record
continue; // skip
/* If we aren't saving scores on fail, it'll be handled above; m_bFailed is only
* meaningful in stage and course eval. */
// if( m_bFailed ) // both players failed
// continue; // skip
2003-12-18 03:43:25 +00:00
for( int p2=0; p2<p; p2++ )
{
if( !GAMESTATE->IsHumanPlayer(p2) )
continue; // skip
if( iMachineHighScoreIndex[p2] == -1 ) // no record
continue; // skip
bool bPlayedSameSteps;
switch( m_Type )
{
case stage:
bPlayedSameSteps = GAMESTATE->m_pCurNotes[p]==GAMESTATE->m_pCurNotes[p2];
break;
case summary:
bPlayedSameSteps = rc[p] == rc[p2];
break;
case course:
bPlayedSameSteps = true;
break;
}
if( iMachineHighScoreIndex[p] >= iMachineHighScoreIndex[p2] )
{
iMachineHighScoreIndex[p2]++;
if( iMachineHighScoreIndex[p2] >= NUM_RANKING_LINES )
iMachineHighScoreIndex[p2] = -1;
}
}
}
}
2002-06-24 22:04:31 +00:00
void ScreenEvaluation::TweenOffScreen()
{
int p;
2002-06-24 22:04:31 +00:00
2003-03-28 05:47:42 +00:00
// large banner area
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_LargeBanner );
OFF_COMMAND( m_sprLargeBannerFrame );
OFF_COMMAND( m_sprStage );
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_DifficultyIcon[p] );
OFF_COMMAND( m_textPlayerOptions[p] );
}
2003-03-28 05:47:42 +00:00
// small banner area
2003-07-31 20:34:01 +00:00
for( int i=0; i<MAX_SONGS_TO_SHOW; i++ )
2003-03-28 05:47:42 +00:00
{
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_SmallBanner[i] );
OFF_COMMAND( m_sprSmallBannerFrame[i] );
2003-03-28 05:47:42 +00:00
}
// grade area
2004-01-30 00:36:28 +00:00
if( SHOW_GRADE_AREA )
2002-06-24 22:04:31 +00:00
{
2004-01-30 00:36:28 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
OFF_COMMAND( m_sprGradeFrame[p] );
OFF_COMMAND( m_Grades[p] );
OFF_COMMAND( m_sprGrade[p] );
}
2003-03-28 05:47:42 +00:00
}
2003-10-23 06:28:17 +00:00
if( SHOW_GRAPH_AREA )
{
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue; // skip
2003-12-21 08:55:59 +00:00
OFF_COMMAND( m_sprGraphFrame[p] );
2003-10-23 06:28:17 +00:00
OFF_COMMAND( m_Graph[p] );
}
}
if( SHOW_COMBO_AREA )
{
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue; // skip
OFF_COMMAND( m_Combo[p] );
}
}
2003-03-28 05:47:42 +00:00
// points area
2003-10-07 02:13:48 +00:00
if( SHOW_POINTS_AREA )
2003-03-28 05:47:42 +00:00
{
2003-10-07 02:13:48 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
2003-10-13 04:43:36 +00:00
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_sprPercentFrame[p] );
m_Percent[p].Command( THEME->GetMetric(m_sName,ssprintf("PercentP%dOffCommand",p+1)) );
2003-10-07 02:13:48 +00:00
m_Percent[p].TweenOffScreen();
}
2002-06-24 22:04:31 +00:00
}
// bonus area
2003-10-07 02:13:48 +00:00
if( SHOW_BONUS_AREA )
2002-06-24 22:04:31 +00:00
{
2003-10-07 02:13:48 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
2002-08-22 09:31:32 +00:00
{
2003-10-07 02:13:48 +00:00
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_sprBonusFrame[p] );
for( int r=0; r<NUM_SHOWN_RADAR_CATEGORIES; r++ ) // foreach line
2003-10-07 02:13:48 +00:00
{
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_sprPossibleBar[p][r] );
OFF_COMMAND( m_sprActualBar[p][r] );
2003-10-07 02:13:48 +00:00
}
2002-08-22 09:31:32 +00:00
}
2003-03-28 05:47:42 +00:00
}
// survived area
2003-10-07 02:13:48 +00:00
if( SHOW_SURVIVED_AREA )
2003-03-28 05:47:42 +00:00
{
2003-10-07 02:13:48 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_sprSurvivedFrame[p] );
OFF_COMMAND( m_textSurvivedNumber[p] );
2003-10-07 02:13:48 +00:00
}
}
2003-10-07 02:13:48 +00:00
// win area
2003-10-07 02:13:48 +00:00
if( SHOW_WIN_AREA )
{
2003-10-07 02:13:48 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_sprWinFrame[p] );
OFF_COMMAND( m_sprWin[p] );
2003-10-07 02:13:48 +00:00
}
}
2003-10-07 02:13:48 +00:00
// judgement area
int l;
for( l=0; l<NUM_JUDGE_LINES; l++ )
{
2003-10-07 02:13:48 +00:00
if( !SHOW_JUDGMENT(l) )
continue;
2003-10-07 02:13:48 +00:00
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_sprJudgeLabels[l] );
2003-10-07 02:13:48 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_textJudgeNumbers[l][p] );
2003-10-07 02:13:48 +00:00
}
}
2002-09-15 23:41:26 +00:00
2003-12-16 10:04:37 +00:00
// stats area
for( l=0; l<NUM_STATS_LINES; l++ )
{
if( !SHOW_STAT(l) )
continue;
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_sprStatsLabel[l] );
2003-12-16 10:04:37 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_textStatsText[l][p] );
2003-12-16 10:04:37 +00:00
}
}
// score area
2003-10-07 02:13:48 +00:00
if( SHOW_SCORE_AREA )
{
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_sprScoreLabel );
2003-10-07 02:13:48 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_textScore[p] );
2003-10-07 02:13:48 +00:00
}
}
2003-03-28 05:47:42 +00:00
// total score area
if( SHOW_TOTAL_SCORE_AREA )
{
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_sprTotalScoreLabel );
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_textTotalScore[p] );
}
}
2003-03-28 05:47:42 +00:00
// time area
2003-10-07 02:13:48 +00:00
if( SHOW_TIME_AREA )
{
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_sprTimeLabel );
2003-10-07 02:13:48 +00:00
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_textTime[p] );
2003-10-07 02:13:48 +00:00
}
}
2003-03-28 05:47:42 +00:00
// extra area
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_sprMachineRecord[p] );
OFF_COMMAND( m_sprPersonalRecord[p] );
2003-10-31 03:53:12 +00:00
if( m_FullCombo[p].IsLoaded() )
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_FullCombo[p] );
}
2003-12-21 03:39:05 +00:00
OFF_COMMAND( m_sprTryExtraStage );
2002-06-24 22:04:31 +00:00
}
void ScreenEvaluation::Update( float fDeltaTime )
{
Screen::Update( fDeltaTime );
2004-02-11 22:34:04 +00:00
m_bgCondBga.Update(fDeltaTime);
if(m_bFailed && (m_Type==stage||m_Type==course))
{
2003-12-11 05:23:40 +00:00
if( m_timerSoundSequences.Ago() > FAILED_SOUND_TIME && !m_bPassFailTriggered )
{
if(!m_sndPassFail.IsPlaying()) m_sndPassFail.Play();
m_bPassFailTriggered = true;
}
}
2004-02-11 22:34:04 +00:00
else if (m_Type==stage||m_Type==course) // STAGE/NONSTOP eval AND passed
2003-12-11 05:23:40 +00:00
{
if( m_timerSoundSequences.Ago() > PASSED_SOUND_TIME && !m_bPassFailTriggered )
{
if(!m_sndPassFail.IsPlaying()) m_sndPassFail.Play();
m_bPassFailTriggered = true;
}
}
2004-02-11 22:34:04 +00:00
// if(m_Type == stage) // stage eval ... pass / fail / whatever
// {
2003-12-11 05:37:35 +00:00
for( unsigned snd=0; snd<m_SoundSequences.size(); snd++ )
2003-12-11 05:23:40 +00:00
{
if(m_SoundSequences[snd].fTime != -1) // already played? skip...
{
if(m_timerSoundSequences.Ago() > m_SoundSequences[snd].fTime )
{
m_SoundSequences[snd].fTime = -1; // -1 indicates already started playing
m_SoundSequences[snd].sSound.Play();
}
}
}
2004-02-11 22:34:04 +00:00
// }
// if(USE_GRADE_SPECIFIC_BG)
// m_bgSpecialBack.Update(fDeltaTime);
2003-12-11 05:23:40 +00:00
2003-08-11 12:14:26 +00:00
for( int p=0; p<NUM_PLAYERS; p++)
{
if (g_CurStageStats.iBonus[p] == 0)
2003-08-11 12:14:26 +00:00
continue;
2003-08-14 19:46:22 +00:00
if (GAMESTATE->IsCourseMode())
continue;
2003-08-11 12:14:26 +00:00
// wait a few seconds before adding bonus
if ( RageTimer::GetTimeSinceStart() - m_fScreenCreateTime < 1.5f)
2003-08-11 12:14:26 +00:00
continue;
int increment = g_CurStageStats.iBonus[p]/10;
if (increment < 1)
increment = min(1024, g_CurStageStats.iBonus[p]);
2003-08-11 12:14:26 +00:00
g_CurStageStats.iBonus[p] -= increment;
g_CurStageStats.iScore[p] += increment;
2003-08-11 12:14:26 +00:00
2003-10-07 02:13:48 +00:00
if( SHOW_SCORE_AREA )
m_textScore[p].SetText( ssprintf("%*.0i", NUM_SCORE_DIGITS, g_CurStageStats.iScore[p]) );
2003-08-11 12:14:26 +00:00
}
2002-06-24 22:04:31 +00:00
}
void ScreenEvaluation::DrawPrimitives()
{
m_Menu.DrawBottomLayer();
2004-02-11 22:34:04 +00:00
m_bgCondBga.DrawPrimitives();
// draw the failed background here if the player(s) failed
2004-02-11 22:34:04 +00:00
// draw any special backgrounds if the player failed.
// if(USE_GRADE_SPECIFIC_BG)
// m_bgSpecialBack.Draw();
2002-06-24 22:04:31 +00:00
Screen::DrawPrimitives();
2002-06-24 22:04:31 +00:00
m_Menu.DrawTopLayer();
}
void ScreenEvaluation::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
2002-09-06 00:33:51 +00:00
// LOG->Trace( "ScreenEvaluation::Input()" );
2002-06-24 22:04:31 +00:00
2003-03-09 00:55:49 +00:00
if( m_Menu.IsTransitioning() )
2002-06-24 22:04:31 +00:00
return;
if( GameI.IsValid() )
{
PlayerNumber pn = GAMESTATE->GetCurrentStyleDef()->ControllerToPlayerNumber( GameI.controller );
if( CodeDetector::EnteredCode(GameI.controller, CodeDetector::CODE_SAVE_SCREENSHOT) )
{
if( !m_bSavedScreenshot[pn] && // only allow one screenshot
PROFILEMAN->IsUsingProfile(pn) )
{
/* XXX: What's the difference between this and StyleI.player? */
/* StyleI won't be valid if it's a menu button that's pressed.
* There's got to be a better way of doing this. -Chris */
2004-02-16 05:35:06 +00:00
CString sDir = PROFILEMAN->GetProfileDir((ProfileSlot)pn) + "Screenshots/";
2004-02-14 20:47:50 +00:00
SaveScreenshot( sDir, true, true );
m_bSavedScreenshot[pn] = true;
return; // handled
}
}
}
2002-06-24 22:04:31 +00:00
Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
}
void ScreenEvaluation::HandleScreenMessage( const ScreenMessage SM )
{
switch( SM )
{
case SM_MenuTimer:
2004-01-12 23:18:38 +00:00
EndScreen();
2002-06-24 22:04:31 +00:00
break;
2003-03-28 05:47:42 +00:00
case SM_GoToNextScreen:
if(m_bFailed && !PREFSMAN->m_bEventMode && !(GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2()) && GAMESTATE->m_PlayMode == PLAY_MODE_ARCADE) // if failed and not in event mode go to gameover screen
SCREENMAN->SetNewScreen( FAILED_SCREEN );
else
SCREENMAN->SetNewScreen( NEXT_SCREEN );
2003-12-11 05:23:40 +00:00
if( m_sndPassFail.IsPlaying() ) m_sndPassFail.Stop();
2002-06-27 17:49:10 +00:00
break;
2002-08-01 05:11:11 +00:00
case SM_GoToSelectCourse:
SCREENMAN->SetNewScreen( "ScreenSelectCourse" );
2002-08-01 05:11:11 +00:00
break;
2003-03-28 05:47:42 +00:00
case SM_GoToEndScreen:
if(m_bFailed && !PREFSMAN->m_bEventMode && !(GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2()) && GAMESTATE->m_PlayMode == PLAY_MODE_ARCADE) // if failed and not in event mode go to gameover screen
SCREENMAN->SetNewScreen( FAILED_SCREEN );
else
SCREENMAN->SetNewScreen( END_SCREEN );
2002-06-27 17:49:10 +00:00
break;
2002-10-18 19:01:32 +00:00
case SM_PlayCheer:
2003-07-26 22:53:22 +00:00
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation cheer") );
2002-10-18 19:01:32 +00:00
break;
2002-06-24 22:04:31 +00:00
}
}
2002-12-21 10:04:25 +00:00
void ScreenEvaluation::MenuLeft( PlayerNumber pn )
{
// What is the purpose of this? I keep my feet on the pads and
// was wondering why the grades weren't spinning. -Chris
2003-01-24 22:21:48 +00:00
// To be able to see the grade without having to wait for it to
// stop spinning. (I was hitting left repeatedly and wondering
// why it kept spinning ...)
//m_Grades[pn].SettleQuickly();
2002-12-21 10:04:25 +00:00
}
void ScreenEvaluation::MenuRight( PlayerNumber pn )
{
// What is the purpose of this? I keep my feet on the pads and
// was wondering why the grades weren't spinning. -Chris
//m_Grades[pn].SettleQuickly();
2002-12-21 10:04:25 +00:00
}
void ScreenEvaluation::MenuBack( PlayerNumber pn )
2002-06-24 22:04:31 +00:00
{
MenuStart( pn );
2002-06-24 22:04:31 +00:00
}
void ScreenEvaluation::MenuStart( PlayerNumber pn )
2004-01-12 23:18:38 +00:00
{
m_soundStart.Play();
EndScreen();
}
void ScreenEvaluation::EndScreen()
2002-06-24 22:04:31 +00:00
{
TweenOffScreen();
for( int p=0; p<NUM_PLAYERS; p++ )
m_Grades[p].SettleImmediately();
GAMESTATE->m_iRoundSeed = rand();
2003-04-19 19:05:25 +00:00
if( PREFSMAN->m_bEventMode )
2002-06-29 11:59:09 +00:00
{
if( GAMESTATE->IsCourseMode() )
m_Menu.StartTransitioning( SM_GoToSelectCourse );
else
m_Menu.StartTransitioning( SM_GoToNextScreen );
2002-06-29 11:59:09 +00:00
}
2002-08-01 05:11:11 +00:00
else // not event mode
2002-06-27 17:49:10 +00:00
{
switch( m_Type )
{
case stage:
if( m_bTryExtraStage )
{
2003-03-28 05:47:42 +00:00
m_Menu.StartTransitioning( SM_GoToNextScreen );
}
else if( GAMESTATE->IsFinalStage() || GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
{
/* Tween the screen out, but leave the MenuElements where they are.
* Play the "swoosh" sound manually (would normally be played by the ME
* tween out). */
TweenOffScreen();
m_Menu.StartTransitioning( SM_GoToEndScreen );
}
else
{
2003-03-28 05:47:42 +00:00
m_Menu.StartTransitioning( SM_GoToNextScreen );
}
break;
case summary:
2003-03-28 05:47:42 +00:00
m_Menu.StartTransitioning( SM_GoToEndScreen );
break;
case course:
2003-03-28 05:47:42 +00:00
m_Menu.StartTransitioning( SM_GoToEndScreen );
break;
}
2002-06-27 17:49:10 +00:00
}
2002-06-24 22:04:31 +00:00
}