aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects/sequences
diff options
context:
space:
mode:
authorwhiterandrek2018-06-20 14:26:31 +0300
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commit3143cc3f29948af537fe12605a2d2d227c307e1d (patch)
tree7fa84dc0059d67b30439e15aab119536679786ef /engines/pink/objects/sequences
parent3134b2d2308ee122dc23869392133cb560195cb3 (diff)
downloadscummvm-rg350-3143cc3f29948af537fe12605a2d2d227c307e1d.tar.gz
scummvm-rg350-3143cc3f29948af537fe12605a2d2d227c307e1d.tar.bz2
scummvm-rg350-3143cc3f29948af537fe12605a2d2d227c307e1d.zip
PINK: add saving/loading of parallel contexts
Diffstat (limited to 'engines/pink/objects/sequences')
-rw-r--r--engines/pink/objects/sequences/sequencer.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/engines/pink/objects/sequences/sequencer.cpp b/engines/pink/objects/sequences/sequencer.cpp
index 9ba10aa449..a92ed54531 100644
--- a/engines/pink/objects/sequences/sequencer.cpp
+++ b/engines/pink/objects/sequences/sequencer.cpp
@@ -159,6 +159,12 @@ void Sequencer::skipSequence() {
void Sequencer::loadState(Archive &archive) {
Sequence *sequence = findSequence(archive.readString());
authorSequence(sequence, 1);
+
+ uint size = archive.readWORD();
+ for (uint i = 0; i < size; ++i) {
+ sequence = findSequence(archive.readString());
+ authorParallelSequence(sequence, 1);
+ }
}
void Sequencer::saveState(Archive &archive) {
@@ -166,7 +172,11 @@ void Sequencer::saveState(Archive &archive) {
if (_context)
sequenceName = _context->getSequence()->getName();
archive.writeString(sequenceName);
- // add pokus specific
+
+ archive.writeWORD(_parrallelContexts.size());
+ for (uint i = 0; i < _parrallelContexts.size(); ++i) {
+ archive.writeString(_parrallelContexts[i]->getSequence()->getName());
+ }
}
SequenceContext *Sequencer::findConfilictingContextWith(SequenceContext *context) {