ScummVM API documentation
pressuretracker.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-1997 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_PRESSURETRACKER_H
26 #define PEGASUS_NEIGHBORHOOD_NORAD_PRESSURETRACKER_H
27 
28 #include "pegasus/input.h"
29 
30 namespace Pegasus {
31 
32 // This class assumes that the globe movie is built at 15 frames per second with a
33 // time scale of 600, yielding 40 time unit per frame.
34 
35 enum PressureTrackDirection {
36  kTrackPressureUp,
37  kTrackPressureDown
38 };
39 
40 static const int kPressureDoorTrackInterval = 45;
41 
42 class PressureDoor;
43 class Sprite;
44 
45 class PressureTracker : public Tracker {
46 public:
48  ~PressureTracker() override {}
49 
50  void setTrackParameters(const Hotspot *, Sprite *);
51  void continueTracking(const Input &) override;
52  void startTracking(const Input &) override;
53  void stopTracking(const Input &) override;
54  void activateHotspots() override;
55  bool stopTrackingInput(const Input &) override;
56 
57 protected:
58  void trackPressure();
59 
60  PressureDoor *_pressureDoor;
61  const Hotspot *_trackSpot;
62  Sprite *_trackButton;
63  long _trackTime;
64 };
65 
66 } // End of namespace Pegasus
67 
68 #endif
Definition: pressuretracker.h:45
Definition: elements.h:168
Definition: hotspot.h:85
Definition: pressuredoor.h:37
Definition: input.h:466
Definition: input.h:322
Definition: ai_action.h:33