PINK: add saving and loading state of sequencer

This commit is contained in:
whiterandrek 2018-05-25 17:43:42 +03:00 committed by Eugene Sandulenko
parent 147904f53a
commit 0b4c0b2bee
2 changed files with 15 additions and 1 deletions

View File

@ -127,4 +127,17 @@ SequenceActorState *Sequencer::findSequenceActorState(const Common::String &name
return nullptr;
}
void Sequencer::loadState(Archive &archive) {
Sequence *sequence = findSequence(archive.readString());
authorSequence(sequence, 1);
}
void Sequencer::saveState(Archive &archive) {
Common::String sequenceName;
if (_context)
sequenceName = _context->_sequence->getName();
archive.writeString(sequenceName);
// add pokus specific
}
} // End of namespace Pink

View File

@ -54,7 +54,8 @@ public:
void restartSequence();
void skipToLastSubSequence();
void loadState(Archive &archive);
void saveState(Archive &archive);
public:
void updateTimers();