mirror of https://github.com/stella-emu/stella.git
parent
7b56497963
commit
2ed25f50b6
|
@ -717,6 +717,12 @@
|
|||
<td>F9</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Save all states</td>
|
||||
<td>Alt + F9</td>
|
||||
<td>Cmd + F9</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Change current state slot</td>
|
||||
<td>F10</td>
|
||||
|
@ -729,6 +735,12 @@
|
|||
<td>F11</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Load all states</td>
|
||||
<td>Alt + F11</td>
|
||||
<td>Cmd + F1</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Save PNG snapshot</td>
|
||||
<td>F12</td>
|
||||
|
@ -1819,6 +1831,8 @@
|
|||
<tr><td>'Rewind One' button</td><td>Navigates back by one state</td></tr>
|
||||
<tr><td>'Unwind One' button</td><td>Navigates forward by one state</td></tr>
|
||||
<tr><td>'Unwind All' button</td><td>Navigates forward to the end of the timeline</td></tr>
|
||||
<tr><td>'Save All' button</td><td>Saves all states to disk</td></tr>
|
||||
<tr><td>'Load All' button</td><td>Loades all states from disk</td></tr>
|
||||
<tr><td>Navigation info</td><td>Informs about the interval of the user's last
|
||||
Time Machine navigation. The interval can vary if the timeline is compressed.</td></tr>
|
||||
<tr><td>Total time</td><td>Shows the total time covered by the save states
|
||||
|
|
|
@ -237,7 +237,10 @@ string RewindManager::saveAllStates()
|
|||
if (!out)
|
||||
return "Can't save to all states file";
|
||||
|
||||
int numStates = rewindStates(1000) + 1;
|
||||
uInt32 curIdx = getCurrentIdx();
|
||||
rewindStates(1000);
|
||||
uInt32 numStates = uInt32(cyclesList().size());
|
||||
|
||||
// Save header
|
||||
buf.str("");
|
||||
out.putString(STATE_HEADER);
|
||||
|
@ -245,7 +248,7 @@ string RewindManager::saveAllStates()
|
|||
out.putInt(myStateSize);
|
||||
|
||||
unique_ptr<uInt8[]> buffer = make_unique<uInt8[]>(myStateSize);
|
||||
for (int i = 0; i < numStates; i++)
|
||||
for (uInt32 i = 0; i < numStates; i++)
|
||||
{
|
||||
RewindState& state = myStateList.current();
|
||||
Serializer& s = state.data;
|
||||
|
@ -260,6 +263,8 @@ string RewindManager::saveAllStates()
|
|||
if (i < numStates)
|
||||
unwindStates(1);
|
||||
}
|
||||
// restore old state position
|
||||
rewindStates(numStates - curIdx);
|
||||
|
||||
buf.str("");
|
||||
buf << "Saved " << numStates << " states";
|
||||
|
@ -287,7 +292,7 @@ string RewindManager::loadAllStates()
|
|||
return "Can't load from all states file";
|
||||
|
||||
clear();
|
||||
int numStates;
|
||||
uInt32 numStates;
|
||||
|
||||
// Load header
|
||||
buf.str("");
|
||||
|
@ -298,7 +303,7 @@ string RewindManager::loadAllStates()
|
|||
myStateSize = in.getInt();
|
||||
|
||||
unique_ptr<uInt8[]> buffer = make_unique<uInt8[]>(myStateSize);
|
||||
for (int i = 0; i < numStates; i++)
|
||||
for (uInt32 i = 0; i < numStates; i++)
|
||||
{
|
||||
if (myStateList.full())
|
||||
compressStates();
|
||||
|
|
Loading…
Reference in New Issue