diff options
author | Andrei Prykhodko | 2018-07-21 19:40:12 +0300 |
---|---|---|
committer | Andrei Prykhodko | 2018-07-21 19:40:12 +0300 |
commit | cd87d769327dfb760460be471d7ffda63e339685 (patch) | |
tree | 91c389c38edd16a593a3f10c3c47db0ceaeaafa5 /engines/pink/objects/sequences | |
parent | cb3945cf4ffc9fc9eb3b834dafae43d57afe19ea (diff) | |
download | scummvm-rg350-cd87d769327dfb760460be471d7ffda63e339685.tar.gz scummvm-rg350-cd87d769327dfb760460be471d7ffda63e339685.tar.bz2 scummvm-rg350-cd87d769327dfb760460be471d7ffda63e339685.zip |
PINK: added more debug output, removed unneeded
Diffstat (limited to 'engines/pink/objects/sequences')
-rw-r--r-- | engines/pink/objects/sequences/sequence.cpp | 4 | ||||
-rw-r--r-- | engines/pink/objects/sequences/sequence_context.cpp | 4 | ||||
-rw-r--r-- | engines/pink/objects/sequences/sequencer.cpp | 13 |
3 files changed, 11 insertions, 10 deletions
diff --git a/engines/pink/objects/sequences/sequence.cpp b/engines/pink/objects/sequences/sequence.cpp index 9afeb8b48f..44bfbf9c63 100644 --- a/engines/pink/objects/sequences/sequence.cpp +++ b/engines/pink/objects/sequences/sequence.cpp @@ -61,7 +61,7 @@ void Sequence::start(bool loadingSave) { uint nextItemIndex = _context->getNextItemIndex(); if (nextItemIndex >= _items.size() || !_items[nextItemIndex]->execute(_context->getSegment(), this, loadingSave)) { - debugC(6, kPinkDebugGeneral, "Sequence %s ended", _name.c_str()); + debugC(6, kPinkDebugScripts, "Sequence %s ended", _name.c_str()); end(); return; } @@ -79,7 +79,7 @@ void Sequence::start(bool loadingSave) { void Sequence::update() { if (!_context->getActor()->isPlaying()) { - debugC(6, kPinkDebugGeneral, "Sequence step ended"); + debugC(6, kPinkDebugScripts, "SubSequence of %s Sequence ended", _name.c_str()); start(0); } } diff --git a/engines/pink/objects/sequences/sequence_context.cpp b/engines/pink/objects/sequences/sequence_context.cpp index 1de5ac3d1d..ff7d4e8dab 100644 --- a/engines/pink/objects/sequences/sequence_context.cpp +++ b/engines/pink/objects/sequences/sequence_context.cpp @@ -47,7 +47,7 @@ SequenceContext::SequenceContext(Sequence *sequence) { sequence->setContext(this); Common::Array<SequenceItem *> &items = sequence->getItems(); - debugC(6, kPinkDebugGeneral, "SequenceContext for %s", _sequence->getName().c_str()); + debug(kPinkDebugScripts, "SequenceContext for %s", _sequence->getName().c_str()); for (uint i = 0; i < items.size(); ++i) { bool found = 0; @@ -58,7 +58,7 @@ SequenceContext::SequenceContext(Sequence *sequence) } } if (!found) { - debug("%s", items[i]->getActor().c_str()); + debug(kPinkDebugScripts, "%s", items[i]->getActor().c_str()); _states.push_back(SequenceActorState(items[i]->getActor())); } } diff --git a/engines/pink/objects/sequences/sequencer.cpp b/engines/pink/objects/sequences/sequencer.cpp index 43f0239f03..8885fdc213 100644 --- a/engines/pink/objects/sequences/sequencer.cpp +++ b/engines/pink/objects/sequences/sequencer.cpp @@ -68,31 +68,32 @@ void Sequencer::authorSequence(Sequence *sequence, bool loadingSave) { if (sequence) { SequenceContext *context = new SequenceContext(sequence); - SequenceContext *confilct; while((confilct = findConfilictingContextWith(context)) != nullptr) confilct->getSequence()->forceEnd(); _context = context; sequence->init(loadingSave); + debugC(5, kPinkDebugScripts, "Main Sequence %s started", sequence->getName().c_str()); } } -void Sequencer::authorParallelSequence(Sequence *seqeunce, bool loadingSave) { - if (_context && _context->getSequence() == seqeunce) +void Sequencer::authorParallelSequence(Sequence *sequence, bool loadingSave) { + if (_context && _context->getSequence() == sequence) return; for (uint i = 0; i < _parrallelContexts.size(); ++i) { - if (_parrallelContexts[i]->getSequence() == seqeunce) + if (_parrallelContexts[i]->getSequence() == sequence) return; } const Common::String leadName = _page->getLeadActor()->getName(); - SequenceContext *context = new SequenceContext(seqeunce); + SequenceContext *context = new SequenceContext(sequence); if (!context->findState(leadName) && !findConfilictingContextWith(context)) { _parrallelContexts.push_back(context); - seqeunce->init(loadingSave); + sequence->init(loadingSave); + debugC(6, kPinkDebugScripts, "Parallel Sequence %s started", sequence->getName().c_str()); } else delete context; } |