Changed TAS to reflect wiki, added Frame Stepping/Advance to the GUI
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4032 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
f8e410e0e6
commit
4d4d37c32c
|
@ -57,7 +57,6 @@ void FrameUpdate() {
|
||||||
g_bFirstKey = !g_bFirstKey;
|
g_bFirstKey = !g_bFirstKey;
|
||||||
|
|
||||||
// Dump/Read all controllers' states for this frame
|
// Dump/Read all controllers' states for this frame
|
||||||
if(g_bPolled) {
|
|
||||||
if(IsRecordingInput())
|
if(IsRecordingInput())
|
||||||
fwrite(g_padStates, sizeof(ControllerState), g_numPads, g_recordfd);
|
fwrite(g_padStates, sizeof(ControllerState), g_numPads, g_recordfd);
|
||||||
else if(IsPlayingInput()) {
|
else if(IsPlayingInput()) {
|
||||||
|
@ -67,7 +66,7 @@ void FrameUpdate() {
|
||||||
if(feof(g_recordfd))
|
if(feof(g_recordfd))
|
||||||
EndPlayInput();
|
EndPlayInput();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
g_bPolled = false;
|
g_bPolled = false;
|
||||||
}
|
}
|
||||||
|
@ -212,8 +211,9 @@ void EndRecordingInput()
|
||||||
DTMHeader header;
|
DTMHeader header;
|
||||||
memset(&header, 0, sizeof(DTMHeader));
|
memset(&header, 0, sizeof(DTMHeader));
|
||||||
|
|
||||||
header.bWii = Core::g_CoreStartupParameter.bWii;
|
header.filetype[0] = 'D'; header.filetype[1] = 'T'; header.filetype[2] = 'M'; header.filetype[3] = 0x1A;
|
||||||
strncpy((char *)header.gameID, Core::g_CoreStartupParameter.GetUniqueID().c_str(), 6);
|
strncpy((char *)header.gameID, Core::g_CoreStartupParameter.GetUniqueID().c_str(), 6);
|
||||||
|
header.bWii = Core::g_CoreStartupParameter.bWii;
|
||||||
header.numControllers = g_numPads;
|
header.numControllers = g_numPads;
|
||||||
|
|
||||||
header.bFromSaveState = false; // TODO: add the case where it's true
|
header.bFromSaveState = false; // TODO: add the case where it's true
|
||||||
|
@ -284,6 +284,11 @@ bool PlayInput(const char *filename)
|
||||||
|
|
||||||
fread(&header, sizeof(DTMHeader), 1, g_recordfd);
|
fread(&header, sizeof(DTMHeader), 1, g_recordfd);
|
||||||
|
|
||||||
|
if(header.filetype[0] != 'D' || header.filetype[1] != 'T' || header.filetype[2] != 'M' || header.filetype[3] != 0x1A) {
|
||||||
|
PanicAlert("Invalid recording file");
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
// Load savestate (and skip to frame data)
|
// Load savestate (and skip to frame data)
|
||||||
if(header.bFromSaveState) {
|
if(header.bFromSaveState) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
|
@ -44,8 +44,10 @@ typedef struct {
|
||||||
} ControllerState; // Total: 58 + 2 = 60 bits per frame
|
} ControllerState; // Total: 58 + 2 = 60 bits per frame
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
bool bWii; // Wii game
|
u8 filetype[4]; // Unique Identifier (always "DTM"0x1A)
|
||||||
|
|
||||||
u8 gameID[6]; // The Game ID
|
u8 gameID[6]; // The Game ID
|
||||||
|
bool bWii; // Wii game
|
||||||
|
|
||||||
u8 numControllers; // The number of connected controllers (1-4)
|
u8 numControllers; // The number of connected controllers (1-4)
|
||||||
|
|
||||||
|
|
|
@ -238,6 +238,7 @@ EVT_MENU(IDM_PLAY, CFrame::OnPlay)
|
||||||
EVT_MENU(IDM_RECORD, CFrame::OnRecord)
|
EVT_MENU(IDM_RECORD, CFrame::OnRecord)
|
||||||
EVT_MENU(IDM_PLAYRECORD, CFrame::OnPlayRecording)
|
EVT_MENU(IDM_PLAYRECORD, CFrame::OnPlayRecording)
|
||||||
EVT_MENU(IDM_STOP, CFrame::OnStop)
|
EVT_MENU(IDM_STOP, CFrame::OnStop)
|
||||||
|
EVT_MENU(IDM_FRAMESTEP, CFrame::OnFrameStep)
|
||||||
EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot)
|
EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot)
|
||||||
EVT_MENU(IDM_CONFIG_MAIN, CFrame::OnConfigMain)
|
EVT_MENU(IDM_CONFIG_MAIN, CFrame::OnConfigMain)
|
||||||
EVT_MENU(IDM_CONFIG_GFX_PLUGIN, CFrame::OnPluginGFX)
|
EVT_MENU(IDM_CONFIG_GFX_PLUGIN, CFrame::OnPluginGFX)
|
||||||
|
|
|
@ -173,6 +173,7 @@ class CFrame : public wxFrame
|
||||||
void OnUndoSaveState(wxCommandEvent& event);
|
void OnUndoSaveState(wxCommandEvent& event);
|
||||||
|
|
||||||
void OnFrameSkip(wxCommandEvent& event);
|
void OnFrameSkip(wxCommandEvent& event);
|
||||||
|
void OnFrameStep(wxCommandEvent& event);
|
||||||
|
|
||||||
void OnConfigMain(wxCommandEvent& event); // Options
|
void OnConfigMain(wxCommandEvent& event); // Options
|
||||||
void OnPluginGFX(wxCommandEvent& event);
|
void OnPluginGFX(wxCommandEvent& event);
|
||||||
|
|
|
@ -136,9 +136,10 @@ void CFrame::CreateMenu()
|
||||||
emulationMenu->AppendSeparator();
|
emulationMenu->AppendSeparator();
|
||||||
emulationMenu->Append(IDM_CHANGEDISC, _T("Change &Disc"));
|
emulationMenu->Append(IDM_CHANGEDISC, _T("Change &Disc"));
|
||||||
|
|
||||||
|
emulationMenu->Append(IDM_FRAMESTEP, _T("&Frame Stepping"), wxEmptyString, wxITEM_CHECK);
|
||||||
|
|
||||||
wxMenu *skippingMenu = new wxMenu;
|
wxMenu *skippingMenu = new wxMenu;
|
||||||
m_pSubMenuFrameSkipping = emulationMenu->AppendSubMenu(skippingMenu, _T("&Frame Skipping"));
|
m_pSubMenuFrameSkipping = emulationMenu->AppendSubMenu(skippingMenu, _T("Frame S&kipping"));
|
||||||
for(int i = 0; i < 10; i++)
|
for(int i = 0; i < 10; i++)
|
||||||
skippingMenu->Append(IDM_FRAMESKIP0 + i, wxString::Format(_T("%i"), i), wxEmptyString, wxITEM_RADIO);
|
skippingMenu->Append(IDM_FRAMESKIP0 + i, wxString::Format(_T("%i"), i), wxEmptyString, wxITEM_RADIO);
|
||||||
|
|
||||||
|
@ -486,6 +487,11 @@ void CFrame::DoOpen(bool Boot)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CFrame::OnFrameStep(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
Frame::SetFrameStepping(event.IsChecked());
|
||||||
|
}
|
||||||
|
|
||||||
void CFrame::OnChangeDisc(wxCommandEvent& WXUNUSED (event))
|
void CFrame::OnChangeDisc(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
DoOpen(false);
|
DoOpen(false);
|
||||||
|
@ -887,6 +893,7 @@ void CFrame::UpdateGUI()
|
||||||
GetMenuBar()->FindItem(IDM_STOP)->Enable(running || paused);
|
GetMenuBar()->FindItem(IDM_STOP)->Enable(running || paused);
|
||||||
GetMenuBar()->FindItem(IDM_RECORD)->Enable(!initialized);
|
GetMenuBar()->FindItem(IDM_RECORD)->Enable(!initialized);
|
||||||
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(!initialized);
|
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(!initialized);
|
||||||
|
GetMenuBar()->FindItem(IDM_FRAMESTEP)->Enable(running || paused);
|
||||||
GetMenuBar()->FindItem(IDM_SCREENSHOT)->Enable(running || paused);
|
GetMenuBar()->FindItem(IDM_SCREENSHOT)->Enable(running || paused);
|
||||||
m_pSubMenuLoad->Enable(initialized);
|
m_pSubMenuLoad->Enable(initialized);
|
||||||
m_pSubMenuSave->Enable(initialized);
|
m_pSubMenuSave->Enable(initialized);
|
||||||
|
|
|
@ -65,6 +65,7 @@ enum
|
||||||
IDM_RECORD,
|
IDM_RECORD,
|
||||||
IDM_PLAYRECORD,
|
IDM_PLAYRECORD,
|
||||||
IDM_STOP,
|
IDM_STOP,
|
||||||
|
IDM_FRAMESTEP,
|
||||||
IDM_SCREENSHOT,
|
IDM_SCREENSHOT,
|
||||||
IDM_BROWSE,
|
IDM_BROWSE,
|
||||||
IDM_DRIVE1,
|
IDM_DRIVE1,
|
||||||
|
|
Loading…
Reference in New Issue