MCPcopy Create free account
hub / github.com/clementgallet/libTAS / save

Method save

src/program/SaveState.cpp:94–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94int SaveState::save(Context* context, const MovieFile& m)
95{
96 /* Save the movie file */
97 movie->copyFrom(m);
98
99 /* Send the savestate index */
100 sendMessage(MSGN_SAVESTATE_INDEX);
101 sendData(&id, sizeof(int));
102
103 /* Send the savestate path */
104 sendMessage(MSGN_SAVESTATE_PATH);
105 sendString(path);
106
107 sendMessage(MSGN_SAVESTATE);
108
109 /* Checking that saving succeeded */
110 int message = receiveMessage();
111
112 /* Set framecount */
113 if (message == MSGB_SAVING_SUCCEEDED) {
114 framecount = context->framecount;
115 }
116
117 return message;
118}
119
120int SaveState::load(Context* context, const MovieFile& m, bool branch, bool inputEditor, int common_relative_id, uint64_t common_relative_framecount)
121{

Callers

nothing calls this directly

Calls 5

sendMessageFunction · 0.85
sendDataFunction · 0.85
sendStringFunction · 0.85
receiveMessageFunction · 0.85
copyFromMethod · 0.45

Tested by

no test coverage detected