ScummVM API documentation
pressuredoor.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_PRESSUREDOOR_H
26 #define PEGASUS_NEIGHBORHOOD_NORAD_PRESSUREDOOR_H
27 
28 #include "pegasus/interaction.h"
29 #include "pegasus/movie.h"
30 #include "pegasus/notification.h"
31 #include "pegasus/neighborhood/norad/pressuretracker.h"
32 
33 namespace Pegasus {
34 
35 static const short kNormalSubRoomPressure = 2;
36 
38 public:
39  PressureDoor(Neighborhood *, bool isUpperDoor, const HotSpotID, const HotSpotID,
40  const HotSpotID, TimeValue pressureSoundIn, TimeValue pressureSoundOut,
41  TimeValue equalizeSoundIn, TimeValue equalizeSoundOut);
42  ~PressureDoor() override {}
43 
44  void incrementPressure(const HotSpotID);
45  void stopChangingPressure();
46 
47  void playAgainstRobot();
48 
49  bool canSolve() override;
50  void doSolve() override;
51 
52 protected:
53  void openInteraction() override;
54  void initInteraction() override;
55  void closeInteraction() override;
56 
57  void activateHotspots() override;
58  void clickInHotspot(const Input &, const Hotspot *) override;
59 
60  void receiveNotification(Notification *, const NotificationFlags) override;
61 
62  Movie _levelsMovie;
63  TimeScale _levelsScale;
64  Movie _typeMovie;
65  TimeScale _typeScale;
66  Sprite _upButton;
67  Sprite _downButton;
68  Notification _pressureNotification;
69  NotificationCallBack _pressureCallBack;
70  Notification *_neighborhoodNotification;
71  int _gameState;
72  HotSpotID _upHotspotID;
73  HotSpotID _downHotspotID;
74  HotSpotID _outHotspotID;
75  PressureTracker _doorTracker;
76  TimeValue _pressureSoundIn;
77  TimeValue _pressureSoundOut;
78  TimeValue _equalizeSoundIn;
79  TimeValue _equalizeSoundOut;
80  bool _isUpperDoor;
81 
82  bool _playingAgainstRobot, _typePunched;
83  int _robotState, _punchCount;
84  TimeBase _utilityTimer;
85  Notification _utilityNotification;
86  NotificationCallBack _utilityCallBack;
87  TimeValue _punchInTime;
88 };
89 
90 } // End of namespace Pegasus
91 
92 #endif
Definition: neighborhood.h:111
Definition: movie.h:40
Definition: pressuretracker.h:45
Definition: elements.h:168
Definition: hotspot.h:85
Definition: pressuredoor.h:37
Definition: timers.h:63
Definition: input.h:322
Definition: notification.h:53
Definition: interaction.h:37
Definition: timers.h:191
Definition: notification.h:83
Definition: ai_action.h:33