PINK: Added findSequence method to Sequencer

This commit is contained in:
whitertandrek 2018-03-18 22:39:37 +02:00 committed by Eugene Sandulenko
parent c87a392e16
commit fed63e22ec
2 changed files with 9 additions and 0 deletions

View File

@ -23,6 +23,7 @@
#include <common/debug.h>
#include "sequencer.h"
#include "sequence.h"
#include "engines/pink/archive.h"
namespace Pink {
@ -39,4 +40,11 @@ void Sequencer::deserialize(Archive &archive) {
}
Sequence *Sequencer::findSequence(const Common::String &name) {
return *Common::find_if(_sequences.begin(), _sequences.end(), [&name]
(Sequence* sequence) {
return name == sequence->getName();
});
}
} // End of namespace Pink

View File

@ -37,6 +37,7 @@ public:
Sequencer(GamePage *page);
virtual void deserialize(Archive &archive);
Sequence* findSequence(const Common::String &name);
private:
//context