ScummVM API documentation
subcontrolroom.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_SUBCONTROLROOM_H
26 #define PEGASUS_NEIGHBORHOOD_NORAD_SUBCONTROLROOM_H
27 
28 #include "pegasus/interaction.h"
29 #include "pegasus/notification.h"
30 
31 namespace Pegasus {
32 
33 static const uint32 kClawAtA = 0;
34 static const uint32 kClawAtB = 1;
35 static const uint32 kClawAtC = 2;
36 static const uint32 kClawAtD = 3;
37 
38 static const int kNumClawButtons = 7;
39 
40 class Norad;
41 
43 public:
45  ~SubControlRoom() override {}
46 
47  void playAgainstRobot();
48 
49  void setSoundFXLevel(const uint16) override;
50 
51  bool canSolve() override;
52  void doSolve() override;
53 
54 protected:
55  void openInteraction() override;
56  void initInteraction() override;
57  void closeInteraction() override;
58 
59  void activateHotspots() override;
60  void clickInHotspot(const Input &, const Hotspot *) override;
61 
62  void receiveNotification(Notification *, const NotificationFlags) override;
63 
64  void robotKillsPlayer(const uint32, Neighborhood *);
65  InputBits getInputFilter() override;
66 
67  int findActionIndex(HotSpotID);
68  void dispatchClawAction(const int);
69  void performActionImmediately(const int, const uint32, Neighborhood *);
70 
71  void hideEverything();
72  void showButtons();
73  void hideButtons();
74 
75  void updateGreenBall();
76  void moveGreenBallToA();
77  void moveGreenBallToB();
78  void moveGreenBallToC();
79  void moveGreenBallToD();
80 
81  void setControlMonitorToTime(const TimeValue, const int, const bool);
82  void playControlMonitorSection(const TimeValue, const TimeValue, const NotificationFlags,
83  const int, const bool);
84 
85  void updateClawMonitor();
86  void setClawMonitorToTime(const TimeValue);
87  void playClawMonitorSection(const TimeValue, const TimeValue, const NotificationFlags,
88  const int, const bool);
89 
90  Movie _subControlMovie;
91  TimeScale _subControlScale;
92  Notification _subControlNotification;
93  NotificationCallBack _subControlCallBack;
94  Movie _clawMonitorMovie;
95  NotificationCallBack _clawMonitorCallBack;
96  int _gameState;
97  uint32 _clawStartPosition;
98  uint32 _clawPosition;
99  uint32 _clawNextPosition;
100  const uint32 *_clawExtraIDs;
101 
102  int _currentAction;
103  int _nextAction;
104 
105  Sprite *_buttons[kNumClawButtons];
106  Sprite _pinchButton;
107  Sprite _downButton;
108  Sprite _rightButton;
109  Sprite _leftButton;
110  Sprite _upButton;
111  Sprite _ccwButton;
112  Sprite _cwButton;
113 
114  Sprite _greenBall;
115  TimeBase _greenBallTimer;
116  Notification _greenBallNotification;
117  NotificationCallBack _greenBallCallBack;
118 
119  HotSpotID _outSpotID;
120  HotSpotID _prepSpotID;
121  HotSpotID _clawControlSpotID;
122  HotSpotID _clawButtonSpotIDs[kNumClawButtons];
123 
124  Notification *_neighborhoodNotification;
125 
126  bool _playingAgainstRobot;
127  int _robotState;
128 };
129 
130 } // End of namespace Pegasus
131 
132 #endif
Definition: neighborhood.h:111
Definition: movie.h:40
Definition: elements.h:168
Definition: hotspot.h:85
Definition: timers.h:63
Definition: input.h:322
Definition: subcontrolroom.h:42
Definition: notification.h:53
Definition: interaction.h:37
Definition: timers.h:191
Definition: notification.h:83
Definition: ai_action.h:33