ScummVM API documentation
canyonchase.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_MARS_CANYONCHASE_H
26 #define PEGASUS_NEIGHBORHOOD_MARS_CANYONCHASE_H
27 
28 #include "pegasus/chase.h"
29 #include "pegasus/fader.h"
30 #include "pegasus/movie.h"
31 #include "pegasus/sound.h"
32 
33 namespace Pegasus {
34 
35 class CanyonChase;
36 class Mars;
37 
38 enum MusicTimerCode {
39  kCanyonRanIntoWall,
40  kCanyonExited,
41  kCanyonFaded
42 };
43 
45  CanyonChase *canyonChase;
46  MusicTimerCode theEvent;
47 
48  void fire();
49 };
50 
51 class CanyonChase : public ChaseInteraction {
52 friend class Mars;
53 friend struct MusicTimerEvent;
54 public:
55 
57  virtual ~CanyonChase() {}
58 
59  void setSoundFXLevel(const uint16);
60  void setAmbienceLevel(const uint16);
61 
62 protected:
63 
64  void startCanyonMusicLoop();
65  void stopCanyonMusicLoop(const long);
66 
67  void openInteraction();
68  void initInteraction();
69  void closeInteraction();
70 
71  void receiveNotification(Notification *, const NotificationFlags);
72 
73  void setUpBranch();
74  void branchLeft();
75  void branchRight();
76  void dontBranch();
77 
78  void showControlsHint();
79  void hideControlsHint();
80 
81  void switchTo(Movie &, NotificationCallBack &);
82  void startMusicTimer(TimeValue, TimeScale, MusicTimerCode);
83  void musicTimerExpired(MusicTimerEvent &);
84  void doGenoChase();
85 
86  Movie _canyonMovie1;
87  Movie _canyonMovie2;
88  Movie _deathMovie;
89  Movie _genoMovie;
90  NotificationCallBack _canyon1CallBack;
91  NotificationCallBack _canyon2CallBack;
92  NotificationCallBack _deathCallBack;
93  NotificationCallBack _genoCallBack;
94  Sound _musicLoop;
95  SoundFader _musicFader;
96  FuseFunction _musicFuse;
97 
98  MusicTimerEvent _musicEvent;
99 
100  Movie *_currentMovie;
101  NotificationCallBack *_currentCallBack;
102  short _canyonState;
103 };
104 
105 } // End of namespace Pegasus
106 
107 #endif
Definition: neighborhood.h:111
Definition: movie.h:40
Definition: chase.h:45
Definition: mars.h:71
Definition: canyonchase.h:44
Definition: timers.h:239
Definition: fader.h:109
Definition: notification.h:53
Definition: timers.h:191
Definition: sound.h:50
Definition: ai_action.h:33
Definition: canyonchase.h:51