ScummVM API documentation
chase.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_CHASE_H
26 #define PEGASUS_CHASE_H
27 
28 #include "pegasus/hotspot.h"
29 #include "pegasus/interaction.h"
30 #include "pegasus/notification.h"
31 #include "pegasus/neighborhood/neighborhood.h"
32 
33 namespace Pegasus {
34 
35 // Notification constants.
36 
37 static const NotificationFlags kChaseEnteredBranchZone = 1;
38 static const NotificationFlags kChaseExitedBranchZone = kChaseEnteredBranchZone << 1;
39 static const NotificationFlags kChaseFinished = kChaseExitedBranchZone << 1;
40 
41 // Time to choose a direction.
42 
43 static const TimeValue kDecisionTime = 600 * 2;
44 
46 public:
47  ChaseInteraction(const InteractionID, Neighborhood *, NotificationID, NotificationManager *);
48  virtual ~ChaseInteraction() {}
49 
50  virtual void handleInput(const Input &, const Hotspot *);
51 
52 protected:
53 
54  virtual void openInteraction();
55  virtual void initInteraction() {}
56  virtual void closeInteraction();
57 
58  virtual void receiveNotification(Notification *, const NotificationFlags);
59 
60  virtual void setUpBranch() {}
61  virtual void branchLeft() {}
62  virtual void branchRight() {}
63  virtual void dontBranch() {}
64 
65  virtual void showControlsHint();
66  virtual void hideControlsHint();
67 
68  Notification _chaseNotification;
69 
70  Notification *_neighborhoodNotification;
71 
72  Picture _steerPict;
73 
74 private:
75 
76  bool _directionNeeded;
77  TurnDirection _turnDirection;
78 };
79 
80 } // End of namespace Pegasus
81 
82 #endif
Definition: neighborhood.h:111
Definition: chase.h:45
Definition: hotspot.h:85
Definition: input.h:322
Definition: notification.h:53
Definition: interaction.h:37
Definition: notification.h:103
Definition: notification.h:83
Definition: ai_action.h:33
Definition: surface.h:125