ScummVM API documentation
sequencer.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef PINK_SEQUENCER_H
23#define PINK_SEQUENCER_H
24
25#include "pink/objects/object.h"
26
27namespace Pink {
28
29class Sequence;
30class SequenceContext;
31class GamePage;
32class SeqTimer;
33
34struct SequenceActorState;
35
36class Sequencer : public Object {
37public:
38 Sequencer(GamePage *page);
39 ~Sequencer() override;
40
41 void toConsole() const override;
42 void deserialize(Archive &archive) override;
43
44public:
45 void loadState(Archive &archive);
46 void saveState(Archive &archive);
47
48 bool isPlaying() { return _context != nullptr; }
49 bool isSkipping() { return _isSkipping; }
50 void update();
51
52 void authorSequence(Sequence *sequence, bool loadingSave);
53 void authorParallelSequence(Sequence *sequence, bool loadingSave);
54
55 void skipSubSequence();
56 void restartSequence();
57 void skipSequence();
58
59 void removeContext(SequenceContext *context);
60
61 SequenceContext *findConflictingContextWith(SequenceContext *context);
62
63 Sequence *findSequence(const Common::String &name);
64 SequenceActorState *findState(const Common::String &name);
65
66 GamePage *getPage() const { return _page; }
67
68private:
69 SequenceContext *_context;
70 GamePage *_page;
71 Common::Array<SequenceContext *> _parallelContexts;
72 Array<Sequence *> _sequences;
73 Array<SeqTimer *> _timers;
74 uint _time;
75 bool _isSkipping;
76};
77
78} // End of namespace Pink
79
80#endif
Definition: array.h:52
Definition: str.h:59
Definition: archive.h:39
Definition: utils.h:30
Definition: game_page.h:34
Definition: object.h:31
Definition: sequence_context.h:45
Definition: sequence.h:34
Definition: sequencer.h:36
Definition: sequence_context.h:32