diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index f058e0c46f..dd971a0070 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -1041,6 +1041,7 @@ void ProfileManager::SaveStatsWebPageToDir( CString sDir, MemoryCard mc ) PRINT_LINK( "Statistics", "#Statistics" ); PRINT_LINK( "Popularity Lists", "#Popularity Lists" ); PRINT_LINK( "Difficulty Table", "#Difficulty Table" ); + PRINT_LINK( "High Scores Table", "#High Scores Table" ); PRINT_LINK( "Song/Steps List", "#Song/Steps List" ); PRINT_LINK( "Bookkeeping", "#Bookkeeping" ); PRINT_DIV_END; @@ -1170,10 +1171,78 @@ void ProfileManager::SaveStatsWebPageToDir( CString sDir, MemoryCard mc ) PRINT_SECTION_END; } + // + // Print High score tables + // + { + SortSongPointerArrayByGroupAndTitle( vpSongs ); + + PRINT_SECTION_START( "High Scores Table" ); + for( unsigned s=0; sNotesTypeToString(st).c_str() ); + f.PutLine( "\n" ); + + // table header row + f.Write( "" ); + for( unsigned k=0; k%s", Capitalize(DifficultyToString(d).Left(3)).c_str()) ); + } + f.PutLine( "" ); + + // table body rows + for( i=0; i" ); + + f.Write( ssprintf("", + (unsigned)pSong, // use pointer value as the hash + pSong->GetFullDisplayTitle().c_str()) ); + + for( Difficulty dc=(Difficulty)0; dcGetStepsByDifficulty( st, dc, false ); + if( pSteps ) + { + CString sHighScore; + if( !pSteps->m_MemCardDatas[mc].vHighScores.empty() ) + { + sHighScore += pSteps->m_MemCardDatas[mc].vHighScores[0].sName; + sHighScore += "
"; + sHighScore += GradeToString( pSteps->m_MemCardDatas[mc].vHighScores[0].grade ); + sHighScore += "
"; + sHighScore += ssprintf("%d",pSteps->m_MemCardDatas[mc].vHighScores[0].iScore); + } + f.PutLine( ssprintf("
", + (unsigned)pSteps, // use pointer value as the hash + sHighScore.c_str()) ); + } + else + { + f.PutLine( "" ); + } + } + + f.Write( "" ); + } + + f.PutLine( "
 
%s

%s

 
\n" ); + PRINT_DIV_END; + } + PRINT_SECTION_END; + } + // // Print Difficulty tables // - LOG->Trace( "Writing difficulty tables ..." ); { SortSongPointerArrayByGroupAndTitle( vpSongs ); @@ -1211,11 +1280,15 @@ void ProfileManager::SaveStatsWebPageToDir( CString sDir, MemoryCard mc ) { Steps* pSteps = pSong->GetStepsByDifficulty( st, dc, false ); if( pSteps ) + { f.PutLine( ssprintf("

%d

", (unsigned)pSteps, // use pointer value as the hash pSteps->GetMeter()) ); + } else + { f.PutLine( " " ); + } } f.Write( "" );