experimental: save NoteData to XML for recording played games

This commit is contained in:
Chris Danford
2005-11-22 21:18:45 +00:00
parent 90ad56522c
commit 1ad58b4631
6 changed files with 114 additions and 0 deletions
+18
View File
@@ -50,6 +50,7 @@
#include "DifficultyMeter.h"
#include "PlayerScoreList.h"
#include "InputEventPlus.h"
#include "XmlFile.h"
//
// Defines
@@ -2533,6 +2534,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
{
SongFinished();
StageFinished( false );
//SaveRecordedResults();
}
else if( SM == SM_GainFocus )
{
@@ -2686,6 +2688,22 @@ Song *ScreenGameplay::GetNextCourseSong() const
return m_apSongsQueue[iPlaySongIndex];
}
void ScreenGameplay::SaveRecordedResults()
{
FOREACH_HumanPlayer( pn )
{
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
{
XNode *p = pi->m_pPlayer->m_NoteData.CreateNode();
DISP_OPT opt;
p->SaveToFile( "Save/LastSongRecording.xml", opt );
SAFE_DELETE( p );
return;
}
}
}
// lua start
#include "LuaBinding.h"