ScummVM API documentation
subchase.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  * Additional copyright for this file:
8  * Copyright (C) 1995-2013 Presto Studios, Inc.
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14 
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19 
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  *
23  */
24 
25 #ifndef PEGASUS_NEIGHBORHOOD_NORAD_ALPHA_SUBCHASE_H
26 #define PEGASUS_NEIGHBORHOOD_NORAD_ALPHA_SUBCHASE_H
27 
28 #include "pegasus/chase.h"
29 #include "pegasus/movie.h"
30 
31 namespace Pegasus {
32 
33 class NoradAlpha;
34 class SubChase;
35 
36 enum HintTimerCode {
37  kStartedHint,
38  kEndedHint
39 };
40 
42  SubChase *subChase;
43  HintTimerCode theEvent;
44 
45  void fire();
46 };
47 
48 enum BlinkTimerCode {
49  kEnteredBlinkState,
50  kExitedBlinkState
51 };
52 
54  SubChase *subChase;
55  BlinkTimerCode theEvent;
56 
57  void fire();
58 };
59 
60 class SubChase : public ChaseInteraction {
61 friend class NoradAlpha;
62 friend struct HintTimerEvent;
63 friend struct BlinkTimerEvent;
64 public:
65 
67  virtual ~SubChase() {}
68 
69  void setSoundFXLevel(const uint16);
70 
71  void handleInput(const Input &, const Hotspot *);
72 
73 protected:
74 
75  void openInteraction();
76  void initInteraction();
77  void closeInteraction();
78 
79  void receiveNotification(Notification *, const NotificationFlags);
80 
81  void startBranching();
82  void setUpBranch();
83  void branchLeft();
84  void branchRight();
85  void dontBranch();
86 
87  void startHintTimer(TimeValue, TimeScale, HintTimerCode);
88  void hintTimerExpired(HintTimerEvent &);
89 
90  void startBlinkTimer(TimeValue, TimeScale, BlinkTimerCode);
91  void blinkTimerExpired(BlinkTimerEvent &);
92 
93  Movie _subMovie;
94  NotificationCallBack _subCallBack;
95  Picture _hintPict;
96  Picture _blinkPict;
97  FuseFunction _hintFuse;
98  FuseFunction _blinkFuse;
99 
100  HintTimerEvent _hintEvent;
101  BlinkTimerEvent _blinkEvent;
102 
103  short _subState;
104 
105  bool _canSteerSub;
106 };
107 
108 } // End of namespace Pegasus
109 
110 #endif
Definition: neighborhood.h:111
Definition: subchase.h:60
Definition: noradalpha.h:35
Definition: movie.h:40
Definition: chase.h:45
Definition: timers.h:239
Definition: hotspot.h:85
Definition: subchase.h:41
Definition: input.h:322
Definition: notification.h:53
Definition: timers.h:191
Definition: ai_action.h:33
Definition: surface.h:125