finish high score work

This commit is contained in:
Chris Danford
2003-10-20 01:34:01 +00:00
parent 0a1ccf810d
commit f18c5f4c63
3 changed files with 28 additions and 21 deletions
+5 -3
View File
@@ -2393,7 +2393,9 @@ CategoryX=517
CategoryY=32
CategoryWidth=222
BannerX=517
BannerY=32
BannerY=44
BannerWidth=220
BannerHeight=58
TypeX=520
TypeY=60
LineSpacingX=0
@@ -2416,8 +2418,8 @@ PercentStartY=140
PercentColSpacingX=110
PercentColSpacingY=0
SecondsPerPage=5
ShowCategories=1
ShowAllSongs=0
ShowCategories=0
ShowAllSongs=1
CoursesToShow=Courses/DDRMAX/NaokiStandard.crs,Courses/DDRMAX/ParanoiaBrothers.crs,Courses/Samples/PlayersBest1-4.crs
NotesTypesToHide=dance-couple,dance-solo,pump-halfdouble
TextColor1=0.6,0.6,1,1
+5
View File
@@ -28,6 +28,8 @@
#define CATEGORY_WIDTH THEME->GetMetricF("ScreenRanking","CategoryWidth")
#define BANNER_X THEME->GetMetricF("ScreenRanking","BannerX")
#define BANNER_Y THEME->GetMetricF("ScreenRanking","BannerY")
#define BANNER_WIDTH THEME->GetMetricF("ScreenRanking","BannerWidth")
#define BANNER_HEIGHT THEME->GetMetricF("ScreenRanking","BannerHeight")
#define TYPE_X THEME->GetMetricF("ScreenRanking","TypeX")
#define TYPE_Y THEME->GetMetricF("ScreenRanking","TypeY")
#define LINE_SPACING_X THEME->GetMetricF("ScreenRanking","LineSpacingX")
@@ -411,6 +413,7 @@ void ScreenRanking::SetPage( PageToShow pts )
m_sprCategory.SetDiffuseAlpha(0);
m_banner.LoadFromSong( pts.pSong );
m_banner.ScaleToClipped( BANNER_WIDTH, BANNER_HEIGHT );
m_banner.SetDiffuseAlpha(1);
m_textCategory.SetZoom(1);
@@ -462,6 +465,7 @@ void ScreenRanking::SetPage( PageToShow pts )
void ScreenRanking::TweenPageOnScreen()
{
m_sprCategory.FadeOn(0,"bounce right",0.5f);
m_banner.FadeOn(0,"bounce right",0.5f);
m_sprType.FadeOn(0.1f,"bounce right",0.5f);
m_textCategory.FadeOn(0,"bounce right",0.5f);
@@ -483,6 +487,7 @@ void ScreenRanking::TweenPageOnScreen()
void ScreenRanking::TweenPageOffScreen()
{
m_sprCategory.FadeOff(0,"fade",0.25f);
m_banner.FadeOff(0,"fade",0.25f);
m_sprType.FadeOff(0.1f,"fade",0.25f);
m_textCategory.FadeOff(0.1f,"fade",0.25f);
+18 -18
View File
@@ -39,9 +39,9 @@ SongManager* SONGMAN = NULL; // global and accessable from anywhere in our progr
const CString CATEGORY_RANKING_FILE = BASE_PATH "Data" SLASH "CategoryRanking.dat";
const CString MACHINE_STEPS_MEM_CARD_DATA = BASE_PATH "Data" SLASH "MachineStepsMemCardData.dat";
const CString MACHINE_COURSE_MEM_CARD_DATA = BASE_PATH "Data" SLASH "MachineCourseMemCardData.dat";
const int CATEGORY_RANKING_VERSION = 2;
const int STEPS_MEM_CARD_DATA_VERSION = 5;
const int COURSE_MEM_CARD_DATA_VERSION = 3;
const int CATEGORY_RANKING_VERSION = 3;
const int STEPS_MEM_CARD_DATA_VERSION = 7;
const int COURSE_MEM_CARD_DATA_VERSION = 4;
#define NUM_GROUP_COLORS THEME->GetMetricI("SongManager","NumGroupColors")
@@ -430,6 +430,10 @@ void SongManager::ReadStepsMemCardDataFromFile( CString fn, int mc )
for( int l=0; l<NUM_RANKING_LINES; l++ )
{
CString sName;
if( !FileRead(f, sName) )
WARN_AND_RETURN;
Grade grade;
if( !FileRead(f, (int&)grade) )
WARN_AND_RETURN;
@@ -439,10 +443,6 @@ void SongManager::ReadStepsMemCardDataFromFile( CString fn, int mc )
if( !FileRead(f, iScore) )
WARN_AND_RETURN;
CString sName;
if( !FileRead(f, sName) )
WARN_AND_RETURN;
float fPercentDP;
if( !FileRead(f, fPercentDP) )
WARN_AND_RETURN;
@@ -479,14 +479,14 @@ void SongManager::ReadCategoryRankingsFromFile( CString fn )
m_CategoryDatas[st][rc].vHighScores.resize(NUM_RANKING_LINES);
for( int l=0; l<NUM_RANKING_LINES; l++ )
{
int iScore;
if( !FileRead(f, iScore) )
WARN_AND_RETURN;
CString sName;
if( !FileRead(f, sName) )
WARN_AND_RETURN;
m_CategoryDatas[st][rc].vHighScores[l].iScore = iScore;
int iScore;
if( !FileRead(f, iScore) )
WARN_AND_RETURN;
m_CategoryDatas[st][rc].vHighScores[l].sName = sName;
m_CategoryDatas[st][rc].vHighScores[l].iScore = iScore;
}
}
}
@@ -533,6 +533,10 @@ void SongManager::ReadCourseMemCardDataFromFile( CString fn, int mc )
for( int l=0; l<NUM_RANKING_LINES; l++ )
{
CString sName;
if( !FileRead(f, sName) )
WARN_AND_RETURN;
int iScore;
if( !FileRead(f, iScore) )
WARN_AND_RETURN;
@@ -541,15 +545,11 @@ void SongManager::ReadCourseMemCardDataFromFile( CString fn, int mc )
if( !FileRead(f, fSurviveTime) )
WARN_AND_RETURN;
CString sName;
if( !FileRead(f, sName) )
WARN_AND_RETURN;
if( pCourse )
{
pCourse->m_MemCardDatas[st][mc].vHighScores[l].sName = sName;
pCourse->m_MemCardDatas[st][mc].vHighScores[l].iScore = iScore;
pCourse->m_MemCardDatas[st][mc].vHighScores[l].fSurviveTime = fSurviveTime;
pCourse->m_MemCardDatas[st][mc].vHighScores[l].sName = sName;
}
}
}
@@ -654,8 +654,8 @@ void SongManager::SaveCategoryRankingsToFile( CString fn )
m_CategoryDatas[st][rc].vHighScores.resize(NUM_RANKING_LINES);
for( int l=0; l<NUM_RANKING_LINES; l++ )
{
FileWrite( f, m_CategoryDatas[st][rc].vHighScores[l].iScore );
FileWrite( f, m_CategoryDatas[st][rc].vHighScores[l].sName );
FileWrite( f, m_CategoryDatas[st][rc].vHighScores[l].iScore );
}
}
}
@@ -689,9 +689,9 @@ void SongManager::SaveCourseMemCardDataToFile( CString fn, int mc )
pCourse->m_MemCardDatas[st][mc].vHighScores.resize(NUM_RANKING_LINES);
for( int l=0; l<NUM_RANKING_LINES; l++ )
{
FileWrite( f, pCourse->m_MemCardDatas[st][mc].vHighScores[l].sName );
FileWrite( f, pCourse->m_MemCardDatas[st][mc].vHighScores[l].iScore );
FileWrite( f, pCourse->m_MemCardDatas[st][mc].vHighScores[l].fSurviveTime );
FileWrite( f, pCourse->m_MemCardDatas[st][mc].vHighScores[l].sName );
}
}
}