diff --git a/engines/pink/objects/sequences/sequencer.cpp b/engines/pink/objects/sequences/sequencer.cpp index 4a7c1c07683..6475edce938 100644 --- a/engines/pink/objects/sequences/sequencer.cpp +++ b/engines/pink/objects/sequences/sequencer.cpp @@ -44,8 +44,8 @@ Sequencer::~Sequencer() { delete _timers[i]; } delete _context; - for (uint i = 0; i < _parrallelContexts.size(); ++i) { - delete _parrallelContexts[i]; + for (uint i = 0; i < _parallelContexts.size(); ++i) { + delete _parallelContexts[i]; } } @@ -82,8 +82,8 @@ 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() == sequence) + for (uint i = 0; i < _parallelContexts.size(); ++i) { + if (_parallelContexts[i]->getSequence() == sequence) return; } @@ -91,7 +91,7 @@ void Sequencer::authorParallelSequence(Sequence *sequence, bool loadingSave) { SequenceContext *context = new SequenceContext(sequence); if (!context->findState(leadName) && !findConflictingContextWith(context)) { - _parrallelContexts.push_back(context); + _parallelContexts.push_back(context); sequence->init(loadingSave); debugC(6, kPinkDebugScripts, "Parallel Sequence %s started", sequence->getName().c_str()); } else @@ -113,8 +113,8 @@ void Sequencer::update() { if (_context) _context->getSequence()->update(); - for (uint i = 0; i < _parrallelContexts.size(); ++i) { - _parrallelContexts[i]->getSequence()->update(); + for (uint i = 0; i < _parallelContexts.size(); ++i) { + _parallelContexts[i]->getSequence()->update(); } uint time = _page->getGame()->getTotalPlayTime(); @@ -133,10 +133,10 @@ void Sequencer::removeContext(SequenceContext *context) { return; } - for (uint i = 0; i < _parrallelContexts.size(); ++i) { - if (context == _parrallelContexts[i]) { - delete _parrallelContexts[i]; - _parrallelContexts.remove_at(i); + for (uint i = 0; i < _parallelContexts.size(); ++i) { + if (context == _parallelContexts[i]) { + delete _parallelContexts[i]; + _parallelContexts.remove_at(i); break; } } @@ -183,9 +183,9 @@ void Sequencer::saveState(Archive &archive) { sequenceName = _context->getSequence()->getName(); archive.writeString(sequenceName); - archive.writeWORD(_parrallelContexts.size()); - for (uint i = 0; i < _parrallelContexts.size(); ++i) { - archive.writeString(_parrallelContexts[i]->getSequence()->getName()); + archive.writeWORD(_parallelContexts.size()); + for (uint i = 0; i < _parallelContexts.size(); ++i) { + archive.writeString(_parallelContexts[i]->getSequence()->getName()); } } @@ -193,9 +193,9 @@ SequenceContext *Sequencer::findConflictingContextWith(SequenceContext *context) if (_context && _context->isConflictingWith(context)) { return _context; } - for (uint i = 0; i < _parrallelContexts.size(); ++i) { - if (_parrallelContexts[i]->isConflictingWith(context)) - return _parrallelContexts[i]; + for (uint i = 0; i < _parallelContexts.size(); ++i) { + if (_parallelContexts[i]->isConflictingWith(context)) + return _parallelContexts[i]; } return nullptr; } @@ -205,8 +205,8 @@ SequenceActorState *Sequencer::findState(const Common::String &name) { if (_context && (state = _context->findState(name))) return state; - for (uint i = 0; i < _parrallelContexts.size(); ++i) { - state = _parrallelContexts[i]->findState(name); + for (uint i = 0; i < _parallelContexts.size(); ++i) { + state = _parallelContexts[i]->findState(name); if (state) break; } diff --git a/engines/pink/objects/sequences/sequencer.h b/engines/pink/objects/sequences/sequencer.h index a90faa3b85b..22ea59ef3ae 100644 --- a/engines/pink/objects/sequences/sequencer.h +++ b/engines/pink/objects/sequences/sequencer.h @@ -69,7 +69,7 @@ public: private: SequenceContext *_context; GamePage *_page; - Common::Array _parrallelContexts; + Common::Array _parallelContexts; Array _sequences; Array _timers; uint _time;