TAS GC Recording/Playing with GUI! Yay! (Bonus: Lag Counter)

Works with frameskipping/throttling and so forth. 
Only one bug: Every subsequent play plays the same, regardless of framerate, frameskipping and throttling. The only problem is that the recording and the plays act differently, with analog sticks ONLY.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4028 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
XTra.KrazzY
2009-08-21 19:55:03 +00:00
parent fb507ce676
commit 1612c6a2b8
7 changed files with 163 additions and 26 deletions

View File

@ -236,6 +236,7 @@ EVT_MENU(IDM_HELPABOUT, CFrame::OnHelp)
EVT_MENU(wxID_REFRESH, CFrame::OnRefresh)
EVT_MENU(IDM_PLAY, CFrame::OnPlay)
EVT_MENU(IDM_RECORD, CFrame::OnRecord)
EVT_MENU(IDM_PLAYRECORD, CFrame::OnPlayRecording)
EVT_MENU(IDM_STOP, CFrame::OnStop)
EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot)
EVT_MENU(IDM_CONFIG_MAIN, CFrame::OnConfigMain)

View File

@ -159,6 +159,7 @@ class CFrame : public wxFrame
void OnPlay(wxCommandEvent& event); // Emulation
void OnRecord(wxCommandEvent& event);
void OnPlayRecording(wxCommandEvent& event);
void OnChangeDisc(wxCommandEvent& event);
void OnStop(wxCommandEvent& event);
void OnScreenshot(wxCommandEvent& event);

View File

@ -129,9 +129,13 @@ void CFrame::CreateMenu()
// Emulation menu
wxMenu* emulationMenu = new wxMenu;
emulationMenu->Append(IDM_PLAY, _T("&Play\tF10"));
emulationMenu->Append(IDM_RECORD, _T("&Start Recording"));
emulationMenu->Append(IDM_CHANGEDISC, _T("Change &Disc"));
emulationMenu->Append(IDM_STOP, _T("&Stop"));
emulationMenu->AppendSeparator();
emulationMenu->Append(IDM_RECORD, _T("Start &Recording..."));
emulationMenu->Append(IDM_PLAYRECORD, _T("P&lay Recording..."));
emulationMenu->AppendSeparator();
emulationMenu->Append(IDM_CHANGEDISC, _T("Change &Disc"));
wxMenu *skippingMenu = new wxMenu;
m_pSubMenuFrameSkipping = emulationMenu->AppendSubMenu(skippingMenu, _T("&Frame Skipping"));
@ -505,8 +509,29 @@ void CFrame::OnRecord(wxCommandEvent& WXUNUSED (event))
return;
// TODO: Take controller settings from Gamecube Configuration menu
Frame::BeginRecordingInput(path.mb_str(), 1);
BootGame();
if(Frame::BeginRecordingInput(path.mb_str(), 1))
BootGame();
}
void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event))
{
wxString path = wxFileSelector(
_T("Select The Recording File"),
wxEmptyString, wxEmptyString, wxEmptyString,
wxString::Format
(
_T("Dolphin TAS Movies (*.dtm)|*.dtm|All files (%s)|%s"),
wxFileSelectorDefaultWildcardStr,
wxFileSelectorDefaultWildcardStr
),
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this);
if(path.IsEmpty())
return;
if(Frame::PlayInput(path.mb_str()))
BootGame();
}
void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
@ -858,7 +883,8 @@ void CFrame::UpdateGUI()
// Emulation
GetMenuBar()->FindItem(IDM_STOP)->Enable(running || paused);
GetMenuBar()->FindItem(IDM_RECORD)->Enable(!running && !paused);
GetMenuBar()->FindItem(IDM_RECORD)->Enable(!initialized);
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(!initialized);
GetMenuBar()->FindItem(IDM_SCREENSHOT)->Enable(running || paused);
m_pSubMenuLoad->Enable(initialized);
m_pSubMenuSave->Enable(initialized);

View File

@ -63,6 +63,7 @@ enum
IDM_FRAMESKIP9,
IDM_PLAY,
IDM_RECORD,
IDM_PLAYRECORD,
IDM_STOP,
IDM_SCREENSHOT,
IDM_BROWSE,