ScummVM API documentation
sequence_context.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_SEQUENCE_CONTEXT_H
23
#define PINK_SEQUENCE_CONTEXT_H
24
25
#include "common/array.h"
26
27
namespace
Pink
{
28
29
class
Sequence;
30
class
Sequencer;
31
32
struct
SequenceActorState
{
33
SequenceActorState
(
const
Common::String
&actor)
34
: actorName(actor), _segment(0) {}
35
36
void
execute(uint segment,
Sequence
*sequence,
bool
loadingSave)
const
;
37
38
Common::String
actorName;
39
Common::String
defaultActionName;
40
uint _segment;
41
};
42
43
class
Actor
;
44
45
class
SequenceContext
{
46
public
:
47
SequenceContext
(
Sequence
*sequence);
48
49
void
execute(uint nextItemIndex,
bool
loadingSave);
50
51
bool
isConflictingWith(
SequenceContext
*context);
52
53
void
clearDefaultActions();
54
55
SequenceActorState
*findState(
const
Common::String
&actor);
56
57
Sequence
*getSequence()
const
{
return
_sequence; }
58
Actor
*getActor()
const
{
return
_actor; }
59
uint getNextItemIndex()
const
{
return
_nextItemIndex; }
60
uint getSegment()
const
{
return
_segment; }
61
62
void
setActor(
Actor
*actor) { _actor = actor; }
63
void
setNextItemIndex(uint index) { _nextItemIndex = index; }
64
65
private
:
66
Sequence
*_sequence;
67
Actor
*_actor;
68
Common::Array<SequenceActorState>
_states;
69
uint _nextItemIndex;
70
uint _segment;
71
};
72
73
}
74
75
#endif
Common::String
Definition:
str.h:59
Pink::SequenceContext
Definition:
sequence_context.h:45
Common::Array
Definition:
array.h:52
Pink
Definition:
archive.h:35
Pink::Actor
Definition:
actor.h:39
Pink::Sequence
Definition:
sequence.h:34
Pink::SequenceActorState
Definition:
sequence_context.h:32
engines
pink
objects
sequences
sequence_context.h
Generated on Sat Aug 31 2024 09:15:55 for ScummVM API documentation by
1.8.13