remove unused
This commit is contained in:
@@ -7,7 +7,6 @@
|
|||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "ProfileManager.h"
|
#include "ProfileManager.h"
|
||||||
#include "Profile.h"
|
#include "Profile.h"
|
||||||
#include "SongManager.h"
|
|
||||||
#include "Course.h"
|
#include "Course.h"
|
||||||
#include "Style.h"
|
#include "Style.h"
|
||||||
#include "Command.h"
|
#include "Command.h"
|
||||||
@@ -36,25 +35,12 @@ static const Content_t g_Contents[NUM_PANE_CONTENTS] =
|
|||||||
{ "SongRolls", PANE_SONG_DIFFICULTY, NEED_NOTES },
|
{ "SongRolls", PANE_SONG_DIFFICULTY, NEED_NOTES },
|
||||||
{ "SongMines", PANE_SONG_DIFFICULTY, NEED_NOTES },
|
{ "SongMines", PANE_SONG_DIFFICULTY, NEED_NOTES },
|
||||||
{ "SongHands", PANE_SONG_DIFFICULTY, NEED_NOTES },
|
{ "SongHands", PANE_SONG_DIFFICULTY, NEED_NOTES },
|
||||||
{ "DifficultyStream", NUM_PANES, NEED_NOTES }, // hide
|
|
||||||
{ "DifficultyChaos", NUM_PANES, NEED_NOTES },
|
|
||||||
{ "DifficultyFreeze", NUM_PANES, NEED_NOTES },
|
|
||||||
{ "DifficultyAir", NUM_PANES, NEED_NOTES },
|
|
||||||
{ "DifficultyVoltage", NUM_PANES, NEED_NOTES },
|
|
||||||
{ "MachineHighScore", PANE_SONG_DIFFICULTY, NEED_NOTES },
|
{ "MachineHighScore", PANE_SONG_DIFFICULTY, NEED_NOTES },
|
||||||
{ "MachineNumPlays", NUM_PANES, NEED_NOTES },
|
|
||||||
{ "MachineRank", NUM_PANES, NEED_NOTES },
|
|
||||||
{ "MachineHighName", PANE_SONG_DIFFICULTY, NEED_NOTES },
|
{ "MachineHighName", PANE_SONG_DIFFICULTY, NEED_NOTES },
|
||||||
{ "ProfileHighScore", PANE_SONG_DIFFICULTY, NEED_NOTES|NEED_PROFILE },
|
{ "ProfileHighScore", PANE_SONG_DIFFICULTY, NEED_NOTES|NEED_PROFILE },
|
||||||
{ "ProfileNumPlays", NUM_PANES, NEED_NOTES|NEED_PROFILE },
|
|
||||||
{ "ProfileRank", NUM_PANES, NEED_NOTES|NEED_PROFILE },
|
|
||||||
{ "CourseMachineHighScore", PANE_COURSE_MACHINE_SCORES, NEED_COURSE },
|
{ "CourseMachineHighScore", PANE_COURSE_MACHINE_SCORES, NEED_COURSE },
|
||||||
{ "CourseMachineNumPlays", NUM_PANES, NEED_COURSE },
|
|
||||||
{ "CourseMachineRank", NUM_PANES, NEED_COURSE },
|
|
||||||
{ "CourseMachineHighName", PANE_COURSE_MACHINE_SCORES, NEED_COURSE },
|
{ "CourseMachineHighName", PANE_COURSE_MACHINE_SCORES, NEED_COURSE },
|
||||||
{ "CourseProfileHighScore", PANE_COURSE_MACHINE_SCORES, NEED_COURSE|NEED_PROFILE },
|
{ "CourseProfileHighScore", PANE_COURSE_MACHINE_SCORES, NEED_COURSE|NEED_PROFILE },
|
||||||
{ "CourseProfileNumPlays", NUM_PANES, NEED_COURSE|NEED_PROFILE },
|
|
||||||
{ "CourseProfileRank", NUM_PANES, NEED_COURSE|NEED_PROFILE },
|
|
||||||
{ "CourseNumSteps", PANE_COURSE_MACHINE_SCORES, NEED_COURSE },
|
{ "CourseNumSteps", PANE_COURSE_MACHINE_SCORES, NEED_COURSE },
|
||||||
{ "CourseJumps", PANE_COURSE_MACHINE_SCORES, NEED_COURSE },
|
{ "CourseJumps", PANE_COURSE_MACHINE_SCORES, NEED_COURSE },
|
||||||
{ "CourseHolds", PANE_COURSE_MACHINE_SCORES, NEED_COURSE },
|
{ "CourseHolds", PANE_COURSE_MACHINE_SCORES, NEED_COURSE },
|
||||||
@@ -63,16 +49,6 @@ static const Content_t g_Contents[NUM_PANE_CONTENTS] =
|
|||||||
{ "CourseRolls", PANE_COURSE_MACHINE_SCORES, NEED_COURSE }
|
{ "CourseRolls", PANE_COURSE_MACHINE_SCORES, NEED_COURSE }
|
||||||
};
|
};
|
||||||
|
|
||||||
static ProfileSlot PlayerMemCard( PlayerNumber pn )
|
|
||||||
{
|
|
||||||
switch( pn )
|
|
||||||
{
|
|
||||||
case PLAYER_1: return PROFILE_SLOT_PLAYER_1;
|
|
||||||
case PLAYER_2: return PROFILE_SLOT_PLAYER_2;
|
|
||||||
default: ASSERT(0); return PROFILE_SLOT_MACHINE;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
PaneDisplay::PaneDisplay()
|
PaneDisplay::PaneDisplay()
|
||||||
{
|
{
|
||||||
m_CurPane = PANE_INVALID;
|
m_CurPane = PANE_INVALID;
|
||||||
@@ -149,8 +125,6 @@ void PaneDisplay::Load( const CString &sType, PlayerNumber pn )
|
|||||||
|
|
||||||
for( unsigned i = 0; i < NUM_PANE_CONTENTS; ++i )
|
for( unsigned i = 0; i < NUM_PANE_CONTENTS; ++i )
|
||||||
{
|
{
|
||||||
if( g_Contents[i].type == NUM_PANES )
|
|
||||||
continue; /* skip, disabled */
|
|
||||||
COMMAND( m_textContents[i], "LoseFocus" );
|
COMMAND( m_textContents[i], "LoseFocus" );
|
||||||
COMMAND( m_Labels[i], "LoseFocus" );
|
COMMAND( m_Labels[i], "LoseFocus" );
|
||||||
m_textContents[i].FinishTweening();
|
m_textContents[i].FinishTweening();
|
||||||
@@ -161,11 +135,6 @@ void PaneDisplay::Load( const CString &sType, PlayerNumber pn )
|
|||||||
SetFocus( GetPane() );
|
SetFocus( GetPane() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void PaneDisplay::Update( float fDeltaTime )
|
|
||||||
{
|
|
||||||
ActorFrame::Update( fDeltaTime );
|
|
||||||
}
|
|
||||||
|
|
||||||
void PaneDisplay::SetContent( PaneContents c )
|
void PaneDisplay::SetContent( PaneContents c )
|
||||||
{
|
{
|
||||||
CString str = "?"; // fill this in
|
CString str = "?"; // fill this in
|
||||||
@@ -210,17 +179,9 @@ void PaneDisplay::SetContent( PaneContents c )
|
|||||||
case SONG_MINES: val = rv[RADAR_NUM_MINES]; break;
|
case SONG_MINES: val = rv[RADAR_NUM_MINES]; break;
|
||||||
case COURSE_HANDS:
|
case COURSE_HANDS:
|
||||||
case SONG_HANDS: val = rv[RADAR_NUM_HANDS]; break;
|
case SONG_HANDS: val = rv[RADAR_NUM_HANDS]; break;
|
||||||
case SONG_DIFFICULTY_RADAR_STREAM: val = rv[RADAR_STREAM]; break;
|
|
||||||
case SONG_DIFFICULTY_RADAR_VOLTAGE: val = rv[RADAR_VOLTAGE]; break;
|
|
||||||
case SONG_DIFFICULTY_RADAR_AIR: val = rv[RADAR_AIR]; break;
|
|
||||||
case SONG_DIFFICULTY_RADAR_FREEZE: val = rv[RADAR_FREEZE]; break;
|
|
||||||
case SONG_DIFFICULTY_RADAR_CHAOS: val = rv[RADAR_CHAOS]; break;
|
|
||||||
case SONG_PROFILE_HIGH_SCORE:
|
case SONG_PROFILE_HIGH_SCORE:
|
||||||
val = PROFILEMAN->GetProfile(m_PlayerNumber)->GetStepsHighScoreList(pSong,pSteps).GetTopScore().fPercentDP;
|
val = PROFILEMAN->GetProfile(m_PlayerNumber)->GetStepsHighScoreList(pSong,pSteps).GetTopScore().fPercentDP;
|
||||||
break;
|
break;
|
||||||
case SONG_PROFILE_NUM_PLAYS:
|
|
||||||
val = (float) PROFILEMAN->GetProfile(m_PlayerNumber)->GetStepsNumTimesPlayed(pSong,pSteps);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SONG_MACHINE_HIGH_NAME: /* set val for color */
|
case SONG_MACHINE_HIGH_NAME: /* set val for color */
|
||||||
case SONG_MACHINE_HIGH_SCORE:
|
case SONG_MACHINE_HIGH_SCORE:
|
||||||
@@ -228,74 +189,19 @@ void PaneDisplay::SetContent( PaneContents c )
|
|||||||
val = PROFILEMAN->GetMachineProfile()->GetStepsHighScoreList(pSong,pSteps).GetTopScore().fPercentDP;
|
val = PROFILEMAN->GetMachineProfile()->GetStepsHighScoreList(pSong,pSteps).GetTopScore().fPercentDP;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SONG_MACHINE_RANK:
|
|
||||||
{
|
|
||||||
const vector<Song*> best = SONGMAN->GetBestSongs( PROFILE_SLOT_MACHINE );
|
|
||||||
val = (float) FindIndex( best.begin(), best.end(), pSong );
|
|
||||||
val += 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case SONG_PROFILE_RANK:
|
|
||||||
{
|
|
||||||
const vector<Song*> best = SONGMAN->GetBestSongs( PlayerMemCard(m_PlayerNumber) );
|
|
||||||
val = (float) FindIndex( best.begin(), best.end(), pSong );
|
|
||||||
val += 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case COURSE_MACHINE_HIGH_NAME: /* set val for color */
|
case COURSE_MACHINE_HIGH_NAME: /* set val for color */
|
||||||
case COURSE_MACHINE_HIGH_SCORE:
|
case COURSE_MACHINE_HIGH_SCORE:
|
||||||
val = PROFILEMAN->GetMachineProfile()->GetCourseHighScoreList(pCourse,pTrail).GetTopScore().fPercentDP;
|
val = PROFILEMAN->GetMachineProfile()->GetCourseHighScoreList(pCourse,pTrail).GetTopScore().fPercentDP;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COURSE_MACHINE_NUM_PLAYS:
|
|
||||||
val = (float) PROFILEMAN->GetMachineProfile()->GetCourseNumTimesPlayed( pCourse );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case COURSE_MACHINE_RANK:
|
|
||||||
{
|
|
||||||
CourseType ct = PlayModeToCourseType( GAMESTATE->m_PlayMode );
|
|
||||||
const vector<Course*> best = SONGMAN->GetBestCourses( ct, PROFILE_SLOT_MACHINE );
|
|
||||||
val = (float) FindIndex( best.begin(), best.end(), pCourse );
|
|
||||||
val += 1;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case COURSE_PROFILE_HIGH_SCORE:
|
case COURSE_PROFILE_HIGH_SCORE:
|
||||||
val = PROFILEMAN->GetProfile(m_PlayerNumber)->GetCourseHighScoreList(pCourse,pTrail).GetTopScore().fPercentDP;
|
val = PROFILEMAN->GetProfile(m_PlayerNumber)->GetCourseHighScoreList(pCourse,pTrail).GetTopScore().fPercentDP;
|
||||||
break;
|
break;
|
||||||
case COURSE_PROFILE_NUM_PLAYS:
|
|
||||||
val = (float) PROFILEMAN->GetProfile(m_PlayerNumber)->GetCourseNumTimesPlayed( pCourse );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case COURSE_PROFILE_RANK:
|
|
||||||
{
|
|
||||||
CourseType ct = PlayModeToCourseType( GAMESTATE->m_PlayMode );
|
|
||||||
const vector<Course*> best = SONGMAN->GetBestCourses( ct, PlayerMemCard(m_PlayerNumber) );
|
|
||||||
val = (float) FindIndex( best.begin(), best.end(), pCourse );
|
|
||||||
val += 1;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if( val == RADAR_VAL_UNKNOWN )
|
if( val == RADAR_VAL_UNKNOWN )
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
/* Scale, round, clamp, etc. for floats: */
|
|
||||||
switch( c )
|
|
||||||
{
|
|
||||||
case SONG_DIFFICULTY_RADAR_STREAM:
|
|
||||||
case SONG_DIFFICULTY_RADAR_VOLTAGE:
|
|
||||||
case SONG_DIFFICULTY_RADAR_AIR:
|
|
||||||
case SONG_DIFFICULTY_RADAR_FREEZE:
|
|
||||||
case SONG_DIFFICULTY_RADAR_CHAOS:
|
|
||||||
val = roundf( SCALE( val, 0, 1, 0, 10 ) );
|
|
||||||
val = clamp( val, 0, 10 );
|
|
||||||
str = ssprintf( "%.0f", val );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( c )
|
switch( c )
|
||||||
{
|
{
|
||||||
case SONG_MACHINE_HIGH_NAME:
|
case SONG_MACHINE_HIGH_NAME:
|
||||||
@@ -347,14 +253,6 @@ void PaneDisplay::SetContent( PaneContents c )
|
|||||||
case COURSE_ROLLS:
|
case COURSE_ROLLS:
|
||||||
case COURSE_MINES:
|
case COURSE_MINES:
|
||||||
case COURSE_HANDS:
|
case COURSE_HANDS:
|
||||||
case SONG_MACHINE_NUM_PLAYS:
|
|
||||||
case COURSE_MACHINE_NUM_PLAYS:
|
|
||||||
case SONG_PROFILE_NUM_PLAYS:
|
|
||||||
case COURSE_PROFILE_NUM_PLAYS:
|
|
||||||
case SONG_MACHINE_RANK:
|
|
||||||
case COURSE_MACHINE_RANK:
|
|
||||||
case SONG_PROFILE_RANK:
|
|
||||||
case COURSE_PROFILE_RANK:
|
|
||||||
str = ssprintf( "%.0f", val );
|
str = ssprintf( "%.0f", val );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -411,9 +309,6 @@ void PaneDisplay::SetFocus( PaneTypes NewPane )
|
|||||||
|
|
||||||
for( unsigned i = 0; i < NUM_PANE_CONTENTS; ++i )
|
for( unsigned i = 0; i < NUM_PANE_CONTENTS; ++i )
|
||||||
{
|
{
|
||||||
if( g_Contents[i].type == NUM_PANES )
|
|
||||||
continue; /* skip, disabled */
|
|
||||||
|
|
||||||
if( g_Contents[i].type == m_CurPane )
|
if( g_Contents[i].type == m_CurPane )
|
||||||
{
|
{
|
||||||
COMMAND( m_textContents[i], "LoseFocus" );
|
COMMAND( m_textContents[i], "LoseFocus" );
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
#include "ActorFrame.h"
|
#include "ActorFrame.h"
|
||||||
#include "ActorCommands.h"
|
#include "ActorCommands.h"
|
||||||
#include "Sprite.h"
|
|
||||||
#include "PlayerNumber.h"
|
#include "PlayerNumber.h"
|
||||||
#include "BitmapText.h"
|
#include "BitmapText.h"
|
||||||
#include "AutoActor.h"
|
#include "AutoActor.h"
|
||||||
@@ -30,25 +29,12 @@ enum PaneContents
|
|||||||
SONG_ROLLS,
|
SONG_ROLLS,
|
||||||
SONG_MINES,
|
SONG_MINES,
|
||||||
SONG_HANDS,
|
SONG_HANDS,
|
||||||
SONG_DIFFICULTY_RADAR_STREAM,
|
|
||||||
SONG_DIFFICULTY_RADAR_CHAOS,
|
|
||||||
SONG_DIFFICULTY_RADAR_FREEZE,
|
|
||||||
SONG_DIFFICULTY_RADAR_AIR,
|
|
||||||
SONG_DIFFICULTY_RADAR_VOLTAGE,
|
|
||||||
SONG_MACHINE_HIGH_SCORE,
|
SONG_MACHINE_HIGH_SCORE,
|
||||||
SONG_MACHINE_NUM_PLAYS,
|
|
||||||
SONG_MACHINE_RANK,
|
|
||||||
SONG_MACHINE_HIGH_NAME,
|
SONG_MACHINE_HIGH_NAME,
|
||||||
SONG_PROFILE_HIGH_SCORE,
|
SONG_PROFILE_HIGH_SCORE,
|
||||||
SONG_PROFILE_NUM_PLAYS,
|
|
||||||
SONG_PROFILE_RANK,
|
|
||||||
COURSE_MACHINE_HIGH_SCORE,
|
COURSE_MACHINE_HIGH_SCORE,
|
||||||
COURSE_MACHINE_NUM_PLAYS,
|
|
||||||
COURSE_MACHINE_RANK,
|
|
||||||
COURSE_MACHINE_HIGH_NAME,
|
COURSE_MACHINE_HIGH_NAME,
|
||||||
COURSE_PROFILE_HIGH_SCORE,
|
COURSE_PROFILE_HIGH_SCORE,
|
||||||
COURSE_PROFILE_NUM_PLAYS,
|
|
||||||
COURSE_PROFILE_RANK,
|
|
||||||
COURSE_NUM_STEPS,
|
COURSE_NUM_STEPS,
|
||||||
COURSE_JUMPS,
|
COURSE_JUMPS,
|
||||||
COURSE_HOLDS,
|
COURSE_HOLDS,
|
||||||
@@ -67,8 +53,6 @@ public:
|
|||||||
void Load( const CString &sClass, PlayerNumber pn );
|
void Load( const CString &sClass, PlayerNumber pn );
|
||||||
void SetFromGameState( SortOrder so );
|
void SetFromGameState( SortOrder so );
|
||||||
|
|
||||||
void Update( float fDeltaTime );
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetFocus( PaneTypes NewPane );
|
void SetFocus( PaneTypes NewPane );
|
||||||
PaneTypes GetPane() const;
|
PaneTypes GetPane() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user