mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 01:59:52 -06:00
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:
@ -57,18 +57,17 @@ void FrameUpdate() {
|
||||
g_bFirstKey = !g_bFirstKey;
|
||||
|
||||
// Dump/Read all controllers' states for this frame
|
||||
if(g_bPolled) {
|
||||
if(IsRecordingInput())
|
||||
fwrite(g_padStates, sizeof(ControllerState), g_numPads, g_recordfd);
|
||||
else if(IsPlayingInput()) {
|
||||
fread(g_padStates, sizeof(ControllerState), g_numPads, g_recordfd);
|
||||
if(IsRecordingInput())
|
||||
fwrite(g_padStates, sizeof(ControllerState), g_numPads, g_recordfd);
|
||||
else if(IsPlayingInput()) {
|
||||
fread(g_padStates, sizeof(ControllerState), g_numPads, g_recordfd);
|
||||
|
||||
// End of recording
|
||||
if(feof(g_recordfd))
|
||||
EndPlayInput();
|
||||
}
|
||||
// End of recording
|
||||
if(feof(g_recordfd))
|
||||
EndPlayInput();
|
||||
}
|
||||
|
||||
|
||||
g_bPolled = false;
|
||||
}
|
||||
|
||||
@ -212,8 +211,9 @@ void EndRecordingInput()
|
||||
DTMHeader header;
|
||||
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);
|
||||
header.bWii = Core::g_CoreStartupParameter.bWii;
|
||||
header.numControllers = g_numPads;
|
||||
|
||||
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);
|
||||
|
||||
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)
|
||||
if(header.bFromSaveState) {
|
||||
// TODO
|
||||
|
@ -44,8 +44,10 @@ typedef struct {
|
||||
} ControllerState; // Total: 58 + 2 = 60 bits per frame
|
||||
|
||||
typedef struct {
|
||||
bool bWii; // Wii game
|
||||
u8 gameID[6]; // The Game ID
|
||||
u8 filetype[4]; // Unique Identifier (always "DTM"0x1A)
|
||||
|
||||
u8 gameID[6]; // The Game ID
|
||||
bool bWii; // Wii game
|
||||
|
||||
u8 numControllers; // The number of connected controllers (1-4)
|
||||
|
||||
|
Reference in New Issue
Block a user