ScummVM API documentation
fulltsa.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_TSA_FULLTSA_H
26 #define PEGASUS_NEIGHBORHOOD_TSA_FULLTSA_H
27 
28 #include "pegasus/neighborhood/neighborhood.h"
29 
30 namespace Pegasus {
31 
32 class RipTimer : public IdlerAnimation {
33 public:
34  RipTimer(const DisplayElementID id) : IdlerAnimation(id) {}
35  ~RipTimer() override {}
36 
37  void initImage();
38  void releaseImage();
39 
40  void draw(const Common::Rect &) override;
41 
42 protected:
43  void timeChanged(const TimeValue) override;
44 
45  CoordType _middle;
46  Surface _timerImage;
47 };
48 
49 // Room IDs.
50 
51 static const RoomID kTSA00 = 0;
52 static const RoomID kTSA22Red = 28;
53 static const RoomID kTSA37 = 42;
54 
55 class FullTSA : public Neighborhood {
56 public:
58  ~FullTSA() override {}
59 
60  void init() override;
61 
62  void start() override;
63 
64  uint16 getDateResID() const override;
65 
66  void flushGameState() override;
67 
68  void checkContinuePoint(const RoomID, const DirectionConstant) override;
69 
70  void setSoundFXLevel(const uint16) override;
71  void setAmbienceLevel(const uint16) override;
72 
73  bool canSolve() override;
74  void doSolve() override;
75 
76  void updateCursor(const Common::Point, const Hotspot *) override;
77 
78 protected:
79  enum {
80  kTSAPrivateLogReaderOpenFlag,
81  kTSAPrivateKeyVaultOpenFlag,
82  kTSAPrivateChipVaultOpenFlag,
83  kTSAPrivatePlayingLeftComparisonFlag,
84  kTSAPrivatePlayingRightComparisonFlag,
85  kTSAPrivateSeenRobotWarningFlag,
86  kNumTSAPrivateFlags
87  };
88 
89  Common::Path getBriefingMovie() override;
90  Common::Path getEnvScanMovie() override;
91  uint getNumHints() override;
92  Common::Path getHintMovie(uint) override;
93  void loadAmbientLoops() override;
94  void clickInHotspot(const Input &, const Hotspot *) override;
95 
96  int16 getStaticCompassAngle(const RoomID, const DirectionConstant) override;
97  void activateOneHotspot(HotspotInfoTable::Entry &, Hotspot *spot) override;
98  void activateHotspots() override;
99  void getExitCompassMove(const ExitTable::Entry &, FaderMoveSpec &) override;
100  void dropItemIntoRoom(Item *, Hotspot *) override;
101  void downButton(const Input &) override;
102  void startDoorOpenMovie(const TimeValue, const TimeValue) override;
103  TimeValue getViewTime(const RoomID, const DirectionConstant) override;
104  void showViewFrame(TimeValue) override;
105  void findSpotEntry(const RoomID, const DirectionConstant, SpotFlags, SpotTable::Entry &) override;
106  void turnTo(const DirectionConstant) override;
107  CanMoveForwardReason canMoveForward(ExitTable::Entry &) override;
108  void moveForward() override;
109  CanOpenDoorReason canOpenDoor(DoorTable::Entry &) override;
110  void bumpIntoWall() override;
111  void initializeTBPMonitor(const int, const ExtraID);
112  void playTBPMonitor();
113  void getExtraCompassMove(const ExtraTable::Entry &, FaderMoveSpec &) override;
114  Hotspot *getItemScreenSpot(Item *, DisplayElement *) override;
115  void openDoor() override;
116  void doorOpened() override;
117  void turnRight() override;
118  void turnLeft() override;
119  void closeDoorOffScreen(const RoomID, const DirectionConstant) override;
120  void startExtraSequence(const ExtraID, const NotificationFlags, const InputBits) override;
121  void playExtraMovie(const ExtraTable::Entry &, const NotificationFlags, const InputBits interruptionInput) override;
122  void startTurnPush(const TurnDirection, const TimeValue, const DirectionConstant) override;
123  void handleInput(const Input &, const Hotspot *) override;
124  void arriveAtTSA25Red();
125  void startUpComparisonMonitor();
126  void shutDownComparisonMonitor();
127  void initializeComparisonMonitor(const int, const ExtraID);
128  void playLeftComparison();
129  void playRightComparison();
130  void startRobotGame();
131  void setOffRipAlarm();
132  uint getHistoricalLogIndex();
133  void startUpRobotMonitor();
134  void shutDownRobotMonitor();
135  void pickedUpItem(Item *item) override;
136  void arriveFromPrehistoric();
137 
138  void arriveFromNorad();
139  void arriveFromMars();
140  void arriveFromWSC();
141 
142  InputBits getInputFilter() override;
143  void arriveAt(const RoomID, const DirectionConstant) override;
144  void initializePegasusButtons(bool);
145  void releaseSprites();
146  void showMainJumpMenu();
147  void arriveAtTSA37();
148  void receiveNotification(Notification *, const NotificationFlags) override;
149  void checkRobotLocations(const RoomID, const DirectionConstant);
150  void getExtraEntry(const uint32, ExtraTable::Entry &) override;
151 
152  Movie _extraMovie;
153  NotificationCallBack _extraMovieCallBack;
154  Movie _blankMovie;
155 
156  Sound _entranceMusic;
157  SoundFader _entranceFader;
158  bool _playedSolvedMusicCue;
159  Sound _solvedMusicCue;
160 
161  Sprite _sprite1, _sprite2, _sprite3;
162  FuseFunction _utilityFuse;
163  RipTimer _ripTimer;
164 
166 
167  Common::Path getNavMovieName() override;
168  Common::Path getSoundSpotsName() override;
169 
170  void dieUncreatedInTSA();
171 };
172 
173 } // End of namespace Pegasus
174 
175 #endif
Definition: neighborhood.h:111
Definition: door.h:60
Definition: movie.h:40
Definition: fader.h:35
Definition: timers.h:239
Definition: rect.h:144
Definition: path.h:52
Definition: elements.h:168
Definition: hotspot.h:85
Definition: item.h:294
Definition: spot.h:66
Definition: input.h:322
Definition: fader.h:109
Definition: exit.h:49
Definition: rect.h:45
Definition: fulltsa.h:55
Definition: notification.h:53
Definition: elements.h:43
Definition: timers.h:191
Definition: fulltsa.h:32
Definition: pegasus.h:70
Definition: surface.h:50
Definition: hotspotinfo.h:49
Definition: elements.h:117
Definition: extra.h:49
Definition: sound.h:50
Definition: input.h:410
Definition: ai_action.h:33