ScummVM API documentation
gamestate.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_GAMESTATE_H
26 #define PEGASUS_GAMESTATE_H
27 
28 #include "common/singleton.h"
29 #include "common/util.h"
30 
31 #include "pegasus/types.h"
32 #include "pegasus/util.h"
33 #include "pegasus/items/item.h"
34 
35 namespace Common {
36  class Error;
37  class ReadStream;
38  class WriteStream;
39 }
40 
41 namespace Pegasus {
42 
43 // The only things saved in here are things which get written out to a saved game file...
44 
45 enum {
46  kGlobalWalkthroughFlag,
47  kGlobalShieldOnFlag,
48  kGlobalEasterEggFlag,
49  kGlobalBeenToWSCFlag,
50  kGlobalBeenToMarsFlag,
51  kGlobalBeenToNoradFlag,
52  kGlobalWSCFinishedFlag,
53  kGlobalMarsFinishedFlag,
54  kGlobalNoradFinishedFlag,
55  kNumGlobalFlags
56 };
57 
58 enum {
59  kScoringSawINNFlag,
60  kScoringTookShowerFlag,
61  kScoringFixedHairFlag,
62  kScoringGotKeyCardFlag,
63  kScoringReadPaperFlag,
64  kScoringLookThroughTelescopeFlag,
65  kScoringSawCaldoriaKioskFlag,
66  kScoringGoToTSAFlag,
67  kScoringEnterTSAFlag,
68  kScoringSawBust1Flag,
69  kScoringSawBust2Flag,
70  kScoringSawBust3Flag,
71  kScoringSawBust4Flag,
72  kScoringSawBust5Flag,
73  kScoringSawBust6Flag,
74  kScoringSawTheoryFlag,
75  kScoringSawBackgroundFlag,
76  kScoringSawProcedureFlag,
77  kScoringGotJourneymanKeyFlag,
78  kScoringGotPegasusBiochipFlag,
79  kScoringGotBiosuitFlag,
80  kScoringGoToPrehistoricFlag,
81  kScoringPutLogInReaderFlag,
82  kScoringSawCaldoriaNormalFlag,
83  kScoringSawCaldoriaAlteredFlag,
84  kScoringSawNoradNormalFlag,
85  kScoringSawNoradAlteredFlag,
86  kScoringSawMarsNormalFlag,
87  kScoringSawMarsAlteredFlag,
88  kScoringSawWSCNormalFlag,
89  kScoringSawWSCAlteredFlag,
90  kScoringWentToReadyRoom2Flag,
91  kScoringWentAfterSinclairFlag,
92  kScoringUsedCardBombFlag,
93  kScoringShieldedCardBombFlag,
94  kScoringStunnedSinclairFlag,
95  kScoringDisarmedNukeFlag,
96 
97  kScoringThrewBreakerFlag,
98  kScoringExtendedBridgeFlag,
99  kScoringGotHistoricalLogFlag,
100  kScoringFinishedPrehistoricFlag,
101 
102  kScoringThrownByRobotFlag,
103  kScoringGotMarsCardFlag,
104  kScoringSawMarsKioskFlag,
105  kScoringSawTransportMapFlag,
106  kScoringGotCrowBarFlag,
107  kScoringTurnedOnTransportFlag,
108  kScoringGotOxygenMaskFlag,
109  kScoringAvoidedRobotFlag,
110  kScoringActivatedPlatformFlag,
111  kScoringUsedLiquidNitrogenFlag,
112  kScoringUsedCrowBarFlag,
113  kScoringFoundCardBombFlag,
114  kScoringDisarmedCardBombFlag,
115  kScoringGotCardBombFlag,
116  kScoringThreadedMazeFlag,
117  kScoringThreadedGearRoomFlag,
118  kScoringEnteredShuttleFlag,
119  kScoringEnteredLaunchTubeFlag,
120  kScoringStoppedRobotsShuttleFlag,
121  kScoringGotMarsOpMemChipFlag,
122  kScoringFinishedMarsFlag,
123 
124  kScoringSawSecurityMonitorFlag,
125  kScoringFilledOxygenCanisterFlag,
126  kScoringFilledArgonCanisterFlag,
127  kScoringSawUnconsciousOperatorFlag,
128  kScoringWentThroughPressureDoorFlag,
129  kScoringPreppedSubFlag,
130  kScoringEnteredSubFlag,
131  kScoringExitedSubFlag,
132  kScoringSawRobotAt54NorthFlag,
133  kScoringPlayedWithClawFlag,
134  kScoringUsedRetinalChipFlag,
135  kScoringFinishedGlobeGameFlag,
136  kScoringStoppedNoradRobotFlag,
137  kScoringGotNoradOpMemChipFlag,
138  kScoringFinishedNoradFlag,
139 
140  kScoringRemovedDartFlag,
141  kScoringAnalyzedDartFlag,
142  kScoringBuiltAntidoteFlag,
143  kScoringGotSinclairKeyFlag,
144  kScoringGotArgonCanisterFlag,
145  kScoringGotNitrogenCanisterFlag,
146  kScoringPlayedWithMessagesFlag,
147  kScoringSawMorphExperimentFlag,
148  kScoringEnteredSinclairOfficeFlag,
149  kScoringSawBrochureFlag,
150  kScoringSawSinclairEntry1Flag,
151  kScoringSawSinclairEntry2Flag,
152  kScoringSawSinclairEntry3Flag,
153  kScoringSawWSCDirectoryFlag,
154  kScoringUsedCrowBarInWSCFlag,
155  kScoringFinishedPlasmaDodgeFlag,
156  kScoringOpenedCatwalkFlag,
157  kScoringStoppedWSCRobotFlag,
158  kScoringGotWSCOpMemChipFlag,
159  kScoringFinishedWSCFlag,
160 
161  kScoringMarsGandhiFlag,
162  kScoringNoradGandhiFlag,
163  kScoringWSCGandhiFlag,
164 
165  kNumScoringFlags
166 };
167 
168 enum {
169  kCaldoriaSeenPullbackFlag,
170  kCaldoriaMadeOJFlag,
171  kCaldoriaWokenUpFlag,
172  kCaldoriaDidRecalibrationFlag,
173  kCaldoriaSeenSinclairInElevatorFlag,
174  kCaldoriaINNAnnouncingFlag,
175  kCaldoriaSeenINNFlag,
176  kCaldoriaSeenMessagesFlag,
177  kCaldoriaSinclairShotFlag,
178  kCaldoriaBombDisarmedFlag,
179  kCaldoriaRoofDoorOpenFlag,
180  kCaldoriaDoneHygieneFlag,
181  kCaldoriaSawVoiceAnalysisFlag,
182  kCaldoriaDoorBombedFlag,
183  kCaldoriaGunAimedFlag,
184  kNumCaldoriaFlags
185 };
186 
187 enum {
188  kCaldoriaNoFuseRunning,
189  kCaldoriaDoorBombFuseRunning,
190  kCaldoriaSinclairFuseRunning
191 };
192 
193 enum {
194  kTSAIDedAtDoorFlag,
195  kTSA0BZoomedInFlag,
196  kTSAFrontDoorUnlockedOutsideFlag,
197  kTSAFrontDoorUnlockedInsideFlag,
198  kTSASeenRobotGreetingFlag,
199  kTSASeenTheoryFlag,
200  kTSASeenBackgroundFlag,
201  kTSASeenProcedureFlag,
202  kTSASeenAgent3AtDoorFlag,
203  kTSACommandCenterLockedFlag,
204  kTSASeenCaldoriaNormalFlag,
205  kTSASeenCaldoriaAlteredFlag,
206  kTSASeenNoradNormalFlag,
207  kTSASeenNoradAlteredFlag,
208  kTSASeenMarsNormalFlag,
209  kTSASeenMarsAlteredFlag,
210  kTSASeenWSCNormalFlag,
211  kTSASeenWSCAlteredFlag,
212  kTSABiosuitOnFlag,
213  kNumTSAFlags
214 };
215 
216 enum {
217  kPrehistoricTriedToExtendBridgeFlag,
218  kPrehistoricSeenTimeStreamFlag,
219  kPrehistoricSeenFlyer1Flag,
220  kPrehistoricSeenFlyer2Flag,
221  kPrehistoricSeenBridgeZoomFlag,
222  kPrehistoricBreakerThrownFlag,
223  kNumPrehistoricFlags
224 };
225 
226 enum {
227  kNoradSeenTimeStreamFlag,
228  kNoradGassedFlag,
229  kNoradFillingStationOnFlag,
230  kNoradN22MessagePlayedFlag,
231  kNoradArrivedFromSubFlag,
232  kNoradWaitingForLaserFlag,
233  kNoradRetScanGoodFlag,
234  kNoradPlayedGlobeGameFlag,
235  kNoradBeatRobotWithClawFlag,
236  kNoradBeatRobotWithDoorFlag,
237  kNumNoradFlags
238 };
239 
240 enum {
241  kMarsSeenTimeStreamFlag,
242  kMarsHeardUpperPodMessageFlag,
243  kMarsRobotThrownPlayerFlag,
244  kMarsHeardCheckInMessageFlag,
245  kMarsPodAtUpperPlatformFlag,
246  kMarsSeenThermalScanFlag,
247  kMarsArrivedBelowFlag,
248  kMarsSeenRobotAtReactorFlag,
249  kMarsAvoidedReactorRobotFlag,
250  kMarsInAirlockFlag,
251  kMarsAirlockOpenFlag,
252  kMarsMaskOnFillerFlag,
253  kMarsLockFrozenFlag,
254  kMarsLockBrokenFlag,
255  kMarsMazeDoorPair1Flag,
256  kMarsMazeDoorPair2Flag,
257  kMarsMazeDoorPair3Flag,
258  kMarsSawRobotLeaveFlag,
259  kMarsSecurityDownFlag,
260  kMarsHitRobotWithCannonFlag,
261  kMarsReadyForShuttleTransportFlag,
262  kMarsFinishedCanyonChaseFlag,
263  kMarsThreadedMazeFlag,
264  kNumMarsFlags
265 };
266 
267 enum {
268  kWSCSeenTimeStreamFlag,
269  kWSCPoisonedFlag,
270  kWSCAnsweredAboutDartFlag,
271  kWSCRemovedDartFlag,
272  kWSCAnalyzerOnFlag,
273  kWSCDartInAnalyzerFlag,
274  kWSCAnalyzedDartFlag,
275  kWSCSawMorphFlag,
276  kWSCDesignedAntidoteFlag,
277  kWSCPickedUpAntidoteFlag,
278  kWSCOfficeMessagesOpenFlag,
279  kWSCSeenNerdFlag,
280  kWSCHeardPage1Flag,
281  kWSCHeardPage2Flag,
282  kWSCHeardCheckInFlag,
283  kWSCDidPlasmaDodgeFlag,
284  kWSCSeenSinclairLectureFlag,
285  kWSCBeenAtWSC93Flag,
286  kWSCCatwalkDarkFlag,
287  kWSCRobotDeadFlag,
288  kWSCRobotGoneFlag,
289  kNumWSCFlags
290 };
291 
292 class GameStateManager : public Common::Singleton<GameStateManager> {
293 public:
294  GameStateManager() { resetGameState(); }
295 
296  // Base game state
297  Common::Error writeGameState(Common::WriteStream *stream);
298  Common::Error readGameState(Common::ReadStream *stream);
299 
300  void resetGameState();
301 
302  void getCurrentLocation(NeighborhoodID &neighborhood, RoomID &room, DirectionConstant &direction);
303  void setCurrentLocation(const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction);
304 
305  NeighborhoodID getCurrentNeighborhood();
306  void setCurrentNeighborhood(const NeighborhoodID neighborhood);
307  RoomID getCurrentRoom();
308  void setCurrentRoom(const RoomID room);
309  DirectionConstant getCurrentDirection();
310  void setCurrentDirection(const DirectionConstant direction);
311 
312  RoomViewID getCurrentRoomAndView();
313 
314  void getNextLocation(NeighborhoodID &neighborhood, RoomID &room, DirectionConstant &direction);
315  void setNextLocation(const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction);
316 
317  NeighborhoodID getNextNeighborhood();
318  void setNextNeighborhood(const NeighborhoodID neighborhood);
319  RoomID getNextRoom();
320  void setNextRoom(const RoomID room);
321  DirectionConstant getNextDirection();
322  void setNextDirection(const DirectionConstant direction);
323 
324  void getLastLocation(NeighborhoodID &neighborhood, RoomID &room, DirectionConstant &direction);
325  void setLastLocation(const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction);
326 
327  NeighborhoodID getLastNeighborhood();
328  void setLastNeighborhood(const NeighborhoodID neighborhood);
329  RoomID getLastRoom();
330  void setLastRoom(const RoomID room);
331  DirectionConstant getLastDirection();
332  void setLastDirection(const DirectionConstant direction);
333 
334  RoomViewID getLastRoomAndView();
335 
336  void getOpenDoorLocation(RoomID &room, DirectionConstant &direction);
337  void setOpenDoorLocation(const RoomID room, const DirectionConstant direction);
338  RoomID getOpenDoorRoom();
339  void setOpenDoorRoom(const RoomID room);
340  DirectionConstant getOpenDoorDirection();
341  void setOpenDoorDirection(const DirectionConstant direction);
342 
343  RoomViewID getDoorOpenRoomAndView();
344 
345  bool isCurrentDoorOpen();
346 
347  // Pegasus Prime
348 
349  // Scoring...
350  // Scoring "Set" functions.
351  // Caldoria/TSA scoring
352  void setScoringSawINN(const bool = true);
353  void setScoringTookShower(const bool = true);
354  void setScoringFixedHair(const bool = true);
355  void setScoringGotKeyCard(const bool = true);
356  void setScoringReadPaper(const bool = true);
357  void setScoringLookThroughTelescope(const bool = true);
358  void setScoringSawCaldoriaKiosk(const bool = true);
359  void setScoringGoToTSA(const bool = true);
360  void setScoringEnterTSA(const bool = true);
361  void setScoringSawBust1(const bool = true);
362  void setScoringSawBust2(const bool = true);
363  void setScoringSawBust3(const bool = true);
364  void setScoringSawBust4(const bool = true);
365  void setScoringSawBust5(const bool = true);
366  void setScoringSawBust6(const bool = true);
367  void setScoringSawTheory(const bool = true);
368  void setScoringSawBackground(const bool = true);
369  void setScoringSawProcedure(const bool = true);
370  void setScoringGotJourneymanKey(const bool = true);
371  void setScoringGotPegasusBiochip(const bool = true);
372  void setScoringGotBiosuit(const bool = true);
373  void setScoringGoToPrehistoric(const bool = true);
374  void setScoringPutLogInReader(const bool = true);
375  void setScoringSawCaldoriaNormal(const bool = true);
376  void setScoringSawCaldoriaAltered(const bool = true);
377  void setScoringSawNoradNormal(const bool = true);
378  void setScoringSawNoradAltered(const bool = true);
379  void setScoringSawMarsNormal(const bool = true);
380  void setScoringSawMarsAltered(const bool = true);
381  void setScoringSawWSCNormal(const bool = true);
382  void setScoringSawWSCAltered(const bool = true);
383  void setScoringWentToReadyRoom2(const bool = true);
384  void setScoringWentAfterSinclair(const bool = true);
385  void setScoringUsedCardBomb(const bool = true);
386  void setScoringShieldedCardBomb(const bool = true);
387  void setScoringStunnedSinclair(const bool = true);
388  void setScoringDisarmedNuke(const bool = true);
389 
390  // Prehistoric scoring
391  void setScoringThrewBreaker(const bool = true);
392  void setScoringExtendedBridge(const bool = true);
393  void setScoringGotHistoricalLog(const bool = true);
394  void setScoringFinishedPrehistoric(const bool = true);
395 
396  // Mars scoring
397  void setScoringThrownByRobot(const bool = true);
398  void setScoringGotMarsCard(const bool = true);
399  void setScoringSawMarsKiosk(const bool = true);
400  void setScoringSawTransportMap(const bool = true);
401  void setScoringGotCrowBar(const bool = true);
402  void setScoringTurnedOnTransport(const bool = true);
403  void setScoringGotOxygenMask(const bool = true);
404  void setScoringAvoidedRobot(const bool = true);
405  void setScoringActivatedPlatform(const bool = true);
406  void setScoringUsedLiquidNitrogen(const bool = true);
407  void setScoringUsedCrowBar(const bool = true);
408  void setScoringFoundCardBomb(const bool = true);
409  void setScoringDisarmedCardBomb(const bool = true);
410  void setScoringGotCardBomb(const bool = true);
411  void setScoringThreadedMaze(const bool = true);
412  void setScoringThreadedGearRoom(const bool = true);
413  void setScoringEnteredShuttle(const bool = true);
414  void setScoringEnteredLaunchTube(const bool = true);
415  void setScoringStoppedRobotsShuttle(const bool = true);
416  void setScoringGotMarsOpMemChip(const bool = true);
417  void setScoringFinishedMars(const bool = true);
418 
419  // Norad scoring
420  void setScoringSawSecurityMonitor(const bool = true);
421  void setScoringFilledOxygenCanister(const bool = true);
422  void setScoringFilledArgonCanister(const bool = true);
423  void setScoringSawUnconsciousOperator(const bool = true);
424  void setScoringWentThroughPressureDoor(const bool = true);
425  void setScoringPreppedSub(const bool = true);
426  void setScoringEnteredSub(const bool = true);
427  void setScoringExitedSub(const bool = true);
428  void setScoringSawRobotAt54North(const bool = true);
429  void setScoringPlayedWithClaw(const bool = true);
430  void setScoringUsedRetinalChip(const bool = true);
431  void setScoringFinishedGlobeGame(const bool = true);
432  void setScoringStoppedNoradRobot(const bool = true);
433  void setScoringGotNoradOpMemChip(const bool = true);
434  void setScoringFinishedNorad(const bool = true);
435 
436  // WSC scoring
437  void setScoringRemovedDart(const bool = true);
438  void setScoringAnalyzedDart(const bool = true);
439  void setScoringBuiltAntidote(const bool = true);
440  void setScoringGotSinclairKey(const bool = true);
441  void setScoringGotArgonCanister(const bool = true);
442  void setScoringGotNitrogenCanister(const bool = true);
443  void setScoringPlayedWithMessages(const bool = true);
444  void setScoringSawMorphExperiment(const bool = true);
445  void setScoringEnteredSinclairOffice(const bool = true);
446  void setScoringSawBrochure(const bool = true);
447  void setScoringSawSinclairEntry1(const bool = true);
448  void setScoringSawSinclairEntry2(const bool = true);
449  void setScoringSawSinclairEntry3(const bool = true);
450  void setScoringSawWSCDirectory(const bool = true);
451  void setScoringUsedCrowBarInWSC(const bool = true);
452  void setScoringFinishedPlasmaDodge(const bool = true);
453  void setScoringOpenedCatwalk(const bool = true);
454  void setScoringStoppedWSCRobot(const bool = true);
455  void setScoringGotWSCOpMemChip(const bool = true);
456  void setScoringFinishedWSC(const bool = true);
457 
458  // Gandhi scoring
459  void setScoringMarsGandhi(const bool = true);
460  void setScoringNoradGandhi(const bool = true);
461  void setScoringWSCGandhi(const bool = true);
462 
463  // Scoring "Get" functions.
464  bool getScoringSawINN();
465  bool getScoringTookShower();
466  bool getScoringFixedHair();
467  bool getScoringGotKeyCard();
468  bool getScoringReadPaper();
469  bool getScoringLookThroughTelescope();
470  bool getScoringSawCaldoriaKiosk();
471  bool getScoringGoToTSA();
472  bool getScoringEnterTSA();
473  bool getScoringSawBust1();
474  bool getScoringSawBust2();
475  bool getScoringSawBust3();
476  bool getScoringSawBust4();
477  bool getScoringSawBust5();
478  bool getScoringSawBust6();
479  bool getScoringSawTheory();
480  bool getScoringSawBackground();
481  bool getScoringSawProcedure();
482  bool getScoringGotJourneymanKey();
483  bool getScoringGotPegasusBiochip();
484  bool getScoringGotBiosuit();
485  bool getScoringGoToPrehistoric();
486  bool getScoringPutLogInReader();
487  bool getScoringSawCaldoriaNormal();
488  bool getScoringSawCaldoriaAltered();
489  bool getScoringSawNoradNormal();
490  bool getScoringSawNoradAltered();
491  bool getScoringSawMarsNormal();
492  bool getScoringSawMarsAltered();
493  bool getScoringSawWSCNormal();
494  bool getScoringSawWSCAltered();
495  bool getScoringWentToReadyRoom2();
496  bool getScoringWentAfterSinclair();
497  bool getScoringUsedCardBomb();
498  bool getScoringShieldedCardBomb();
499  bool getScoringStunnedSinclair();
500  bool getScoringDisarmedNuke();
501  bool getScoringThrewBreaker();
502  bool getScoringExtendedBridge();
503  bool getScoringGotHistoricalLog();
504  bool getScoringFinishedPrehistoric();
505  bool getScoringThrownByRobot();
506  bool getScoringGotMarsCard();
507  bool getScoringSawMarsKiosk();
508  bool getScoringSawTransportMap();
509  bool getScoringGotCrowBar();
510  bool getScoringTurnedOnTransport();
511  bool getScoringGotOxygenMask();
512  bool getScoringAvoidedRobot();
513  bool getScoringActivatedPlatform();
514  bool getScoringUsedLiquidNitrogen();
515  bool getScoringUsedCrowBar();
516  bool getScoringFoundCardBomb();
517  bool getScoringDisarmedCardBomb();
518  bool getScoringGotCardBomb();
519  bool getScoringThreadedMaze();
520  bool getScoringThreadedGearRoom();
521  bool getScoringEnteredShuttle();
522  bool getScoringEnteredLaunchTube();
523  bool getScoringStoppedRobotsShuttle();
524  bool getScoringGotMarsOpMemChip();
525  bool getScoringFinishedMars();
526  bool getScoringSawSecurityMonitor();
527  bool getScoringFilledOxygenCanister();
528  bool getScoringFilledArgonCanister();
529  bool getScoringSawUnconsciousOperator();
530  bool getScoringWentThroughPressureDoor();
531  bool getScoringPreppedSub();
532  bool getScoringEnteredSub();
533  bool getScoringExitedSub();
534  bool getScoringSawRobotAt54North();
535  bool getScoringPlayedWithClaw();
536  bool getScoringUsedRetinalChip();
537  bool getScoringFinishedGlobeGame();
538  bool getScoringStoppedNoradRobot();
539  bool getScoringGotNoradOpMemChip();
540  bool getScoringFinishedNorad();
541  bool getScoringRemovedDart();
542  bool getScoringAnalyzedDart();
543  bool getScoringBuiltAntidote();
544  bool getScoringGotSinclairKey();
545  bool getScoringGotArgonCanister();
546  bool getScoringGotNitrogenCanister();
547  bool getScoringPlayedWithMessages();
548  bool getScoringSawMorphExperiment();
549  bool getScoringEnteredSinclairOffice();
550  bool getScoringSawBrochure();
551  bool getScoringSawSinclairEntry1();
552  bool getScoringSawSinclairEntry2();
553  bool getScoringSawSinclairEntry3();
554  bool getScoringSawWSCDirectory();
555  bool getScoringUsedCrowBarInWSC();
556  bool getScoringFinishedPlasmaDodge();
557  bool getScoringOpenedCatwalk();
558  bool getScoringStoppedWSCRobot();
559  bool getScoringGotWSCOpMemChip();
560  bool getScoringFinishedWSC();
561  bool getScoringMarsGandhi();
562  bool getScoringNoradGandhi();
563  bool getScoringWSCGandhi();
564 
565  GameScoreType getCaldoriaTSAScore();
566  GameScoreType getPrehistoricScore();
567  GameScoreType getMarsScore();
568  GameScoreType getNoradScore();
569  GameScoreType getWSCScore();
570  GameScoreType getGandhiScore();
571  GameScoreType getTotalScore();
572 
573  void writeCaldoriaState(Common::WriteStream *stream);
574  void readCaldoriaState(Common::ReadStream *stream);
575  void resetCaldoriaState();
576 
577  void writeTSAState(Common::WriteStream *stream);
578  void readTSAState(Common::ReadStream *stream);
579  void resetTSAState();
580 
581  void writePrehistoricState(Common::WriteStream *stream);
582  void readPrehistoricState(Common::ReadStream *stream);
583  void resetPrehistoricState();
584 
585  void writeNoradState(Common::WriteStream *stream);
586  void readNoradState(Common::ReadStream *stream);
587  void resetNoradState();
588 
589  void writeMarsState(Common::WriteStream *stream);
590  void readMarsState(Common::ReadStream *stream);
591  void resetMarsState();
592 
593  void writeWSCState(Common::WriteStream *stream);
594  void readWSCState(Common::ReadStream *stream);
595  void resetWSCState();
596 
597  // Globals.
598  void setWalkthroughMode(bool);
599  bool getWalkthroughMode();
600  void setShieldOn(bool);
601  bool getShieldOn();
602  void setEasterEgg(bool);
603  bool getEasterEgg();
604  void setBeenToWSC(bool value);
605  bool getBeenToWSC();
606  void setBeenToMars(bool value);
607  bool getBeenToMars();
608  void setBeenToNorad(bool value);
609  bool getBeenToNorad();
610  void setWSCFinished(bool);
611  bool getWSCFinished();
612  void setMarsFinished(bool);
613  bool getMarsFinished();
614  void setNoradFinished(bool);
615  bool getNoradFinished();
616  bool allTimeZonesFinished();
617  void setTakenItemID(ItemID, bool);
618  bool isTakenItemID(ItemID);
619  void setTakenItem(Item *, bool);
620  bool isTakenItem(Item *);
621 
622  // Caldoria
623  void setCaldoriaFuseTimeLimit(const TimeValue);
624  TimeValue getCaldoriaFuseTimeLimit();
625  void setCaldoriaSeenPullback(bool);
626  bool getCaldoriaSeenPullback();
627  void setCaldoriaMadeOJ(bool);
628  bool getCaldoriaMadeOJ();
629  void setCaldoriaWokenUp(bool);
630  bool getCaldoriaWokenUp();
631  void setCaldoriaDidRecalibration(bool);
632  bool getCaldoriaDidRecalibration();
633  void setCaldoriaSeenSinclairInElevator(bool);
634  bool getCaldoriaSeenSinclairInElevator();
635  void setCaldoriaINNAnnouncing(bool);
636  bool getCaldoriaINNAnnouncing();
637  void setCaldoriaSeenINN(bool);
638  bool getCaldoriaSeenINN();
639  void setCaldoriaSeenMessages(bool);
640  bool getCaldoriaSeenMessages();
641  void setCaldoriaSinclairShot(bool);
642  bool getCaldoriaSinclairShot();
643  void setCaldoriaBombDisarmed(bool);
644  bool getCaldoriaBombDisarmed();
645  void setCaldoriaRoofDoorOpen(bool);
646  bool getCaldoriaRoofDoorOpen();
647  void setCaldoriaDoneHygiene(bool);
648  bool getCaldoriaDoneHygiene();
649  void setCaldoriaSawVoiceAnalysis(bool);
650  bool getCaldoriaSawVoiceAnalysis();
651  void setCaldoriaDoorBombed(bool);
652  bool getCaldoriaDoorBombed();
653  void setCaldoriaGunAimed(bool);
654  bool getCaldoriaGunAimed();
655 
656  // TSA
657  void setRipTimerTime(TimeValue);
658  TimeValue getRipTimerTime();
659  void setTSAFuseTimeLimit(TimeValue);
660  TimeValue getTSAFuseTimeLimit();
661  void setT0BMonitorMode(byte);
662  byte getT0BMonitorMode();
663  void setTSAState(byte);
664  byte getTSAState();
665  void setT0BMonitorStart(TimeValue);
666  TimeValue getT0BMonitorStart();
667  void setTSAIDedAtDoor(bool);
668  bool getTSAIDedAtDoor();
669  void setTSA0BZoomedIn(bool);
670  bool getTSA0BZoomedIn();
671  void setTSAFrontDoorUnlockedOutside(bool);
672  bool getTSAFrontDoorUnlockedOutside();
673  void setTSAFrontDoorUnlockedInside(bool);
674  bool getTSAFrontDoorUnlockedInside();
675  void setTSASeenRobotGreeting(bool);
676  bool getTSASeenRobotGreeting();
677  void setTSASeenTheory(bool);
678  bool getTSASeenTheory();
679  void setTSASeenBackground(bool);
680  bool getTSASeenBackground();
681  void setTSASeenProcedure(bool);
682  bool getTSASeenProcedure();
683  void setTSASeenAgent3AtDoor(bool);
684  bool getTSASeenAgent3AtDoor();
685  void setTSACommandCenterLocked(bool);
686  bool getTSACommandCenterLocked();
687  void setTSASeenCaldoriaNormal(bool);
688  bool getTSASeenCaldoriaNormal();
689  void setTSASeenCaldoriaAltered(bool);
690  bool getTSASeenCaldoriaAltered();
691  void setTSASeenNoradNormal(bool);
692  bool getTSASeenNoradNormal();
693  void setTSASeenNoradAltered(bool);
694  bool getTSASeenNoradAltered();
695  void setTSASeenMarsNormal(bool);
696  bool getTSASeenMarsNormal();
697  void setTSASeenMarsAltered(bool);
698  bool getTSASeenMarsAltered();
699  void setTSASeenWSCNormal(bool);
700  bool getTSASeenWSCNormal();
701  void setTSASeenWSCAltered(bool);
702  bool getTSASeenWSCAltered();
703  void setTSABiosuitOn(bool);
704  bool getTSABiosuitOn();
705 
706  // Prehistoric
707  void setPrehistoricTriedToExtendBridge(bool);
708  bool getPrehistoricTriedToExtendBridge();
709  void setPrehistoricSeenTimeStream(bool);
710  bool getPrehistoricSeenTimeStream();
711  void setPrehistoricSeenFlyer1(bool);
712  bool getPrehistoricSeenFlyer1();
713  void setPrehistoricSeenFlyer2(bool);
714  bool getPrehistoricSeenFlyer2();
715  void setPrehistoricSeenBridgeZoom(bool);
716  bool getPrehistoricSeenBridgeZoom();
717  void setPrehistoricBreakerThrown(bool);
718  bool getPrehistoricBreakerThrown();
719 
720  // Norad
721  void setNoradSeenTimeStream(bool);
722  bool getNoradSeenTimeStream();
723  void setNoradGassed(bool);
724  bool getNoradGassed();
725  void setNoradFillingStationOn(bool);
726  bool getNoradFillingStationOn();
727  void setNoradN22MessagePlayed(bool);
728  bool getNoradN22MessagePlayed();
729  void setNoradPlayedGlobeGame(bool);
730  bool getNoradPlayedGlobeGame();
731  void setNoradBeatRobotWithClaw(bool);
732  bool getNoradBeatRobotWithClaw();
733  void setNoradBeatRobotWithDoor(bool);
734  bool getNoradBeatRobotWithDoor();
735  void setNoradRetScanGood(bool);
736  bool getNoradRetScanGood();
737  void setNoradWaitingForLaser(bool);
738  bool getNoradWaitingForLaser();
739  void setNoradSubRoomPressure(uint16);
740  uint16 getNoradSubRoomPressure();
741  void setNoradSubPrepState(NoradSubPrepState);
742  NoradSubPrepState getNoradSubPrepState();
743  void setNoradArrivedFromSub(bool);
744  bool getNoradArrivedFromSub();
745 
746  // Mars
747  void setMarsSeenTimeStream(bool);
748  bool getMarsSeenTimeStream();
749  void setMarsHeardUpperPodMessage(bool);
750  bool getMarsHeardUpperPodMessage();
751  void setMarsRobotThrownPlayer(bool);
752  bool getMarsRobotThrownPlayer();
753  void setMarsHeardCheckInMessage(bool);
754  bool getMarsHeardCheckInMessage();
755  void setMarsPodAtUpperPlatform(bool);
756  bool getMarsPodAtUpperPlatform();
757  void setMarsSeenThermalScan(bool);
758  bool getMarsSeenThermalScan();
759  void setMarsArrivedBelow(bool);
760  bool getMarsArrivedBelow();
761  void setMarsSeenRobotAtReactor(bool);
762  bool getMarsSeenRobotAtReactor();
763  void setMarsAvoidedReactorRobot(bool);
764  bool getMarsAvoidedReactorRobot();
765  void setMarsInAirlock(bool);
766  bool getMarsInAirlock();
767  void setMarsAirlockOpen(bool);
768  bool getMarsAirlockOpen();
769  void setMarsMaskOnFiller(bool);
770  bool getMarsMaskOnFiller();
771  void setMarsLockFrozen(bool);
772  bool getMarsLockFrozen();
773  void setMarsLockBroken(bool);
774  bool getMarsLockBroken();
775  void setMarsMazeDoorPair1(bool);
776  bool getMarsMazeDoorPair1();
777  void setMarsMazeDoorPair2(bool);
778  bool getMarsMazeDoorPair2();
779  void setMarsMazeDoorPair3(bool);
780  bool getMarsMazeDoorPair3();
781  void setMarsSawRobotLeave(bool);
782  bool getMarsSawRobotLeave();
783  void setMarsSecurityDown(bool);
784  bool getMarsSecurityDown();
785  void setMarsFinishedCanyonChase(bool);
786  bool getMarsFinishedCanyonChase();
787  void setMarsThreadedMaze(bool);
788  bool getMarsThreadedMaze();
789  void setMarsHitRobotWithCannon(bool);
790  bool getMarsHitRobotWithCannon();
791  void setMarsReadyForShuttleTransport(bool);
792  bool getMarsReadyForShuttleTransport();
793 
794  // WSC
795  void setWSCSeenTimeStream(bool);
796  bool getWSCSeenTimeStream();
797  void setWSCPoisoned(bool);
798  bool getWSCPoisoned();
799  void setWSCAnsweredAboutDart(bool);
800  bool getWSCAnsweredAboutDart();
801  void setWSCRemovedDart(bool);
802  bool getWSCRemovedDart();
803  void setWSCAnalyzerOn(bool);
804  bool getWSCAnalyzerOn();
805  void setWSCDartInAnalyzer(bool);
806  bool getWSCDartInAnalyzer();
807  void setWSCAnalyzedDart(bool);
808  bool getWSCAnalyzedDart();
809  void setWSCSawMorph(bool);
810  bool getWSCSawMorph();
811  void setWSCDesignedAntidote(bool);
812  bool getWSCDesignedAntidote();
813  void setWSCPickedUpAntidote(bool);
814  bool getWSCPickedUpAntidote();
815  void setWSCOfficeMessagesOpen(bool);
816  bool getWSCOfficeMessagesOpen();
817  void setWSCSeenNerd(bool);
818  bool getWSCSeenNerd();
819  void setWSCHeardPage1(bool);
820  bool getWSCHeardPage1();
821  void setWSCHeardPage2(bool);
822  bool getWSCHeardPage2();
823  void setWSCHeardCheckIn(bool);
824  bool getWSCHeardCheckIn();
825  void setWSCDidPlasmaDodge(bool);
826  bool getWSCDidPlasmaDodge();
827  void setWSCSeenSinclairLecture(bool);
828  bool getWSCSeenSinclairLecture();
829  void setWSCBeenAtWSC93(bool);
830  bool getWSCBeenAtWSC93();
831  void setWSCCatwalkDark(bool);
832  bool getWSCCatwalkDark();
833  void setWSCRobotDead(bool);
834  bool getWSCRobotDead();
835  void setWSCRobotGone(bool);
836  bool getWSCRobotGone();
837 
838 protected:
839  friend class Common::Singleton<SingletonBaseType>;
840 
841 private:
842  // Base
843  NeighborhoodID _currentNeighborhood;
844  RoomID _currentRoom;
845  DirectionConstant _currentDirection;
846  NeighborhoodID _nexNeighborhoodID;
847  RoomID _nextRoomID;
848  DirectionConstant _nextDirection;
849  NeighborhoodID _lastNeighborhood;
850  RoomID _lastRoom;
851  DirectionConstant _lastDirection;
852  RoomID _openDoorRoom;
853  DirectionConstant _openDoorDirection;
854 
855  // Pegasus Prime
858  FlagsArray<uint32, kNumItems> _itemTakenFlags;
859 
861  TimeValue _caldoriaFuseTimeLimit;
862 
863  TimeValue _TSARipTimerTime;
864  TimeValue _TSAFuseTimeLimit;
865  byte _TSAState;
866  byte _T0BMonitorMode;
867  TimeValue _T0BMonitorStart;
869 
870  FlagsArray<byte, kNumPrehistoricFlags> _prehistoricFlags;
871 
873  uint16 _noradSubRoomPressure;
874  NoradSubPrepState _noradSubPrepState;
875 
877 
879 };
880 
881 } // End of namespace Pegasus
882 
883 #define GameState (::Pegasus::GameStateManager::instance())
884 
885 #endif
Definition: stream.h:77
Definition: error.h:84
Definition: gamestate.h:292
Definition: item.h:294
Definition: algorithm.h:29
Definition: stream.h:385
Definition: ai_action.h:33
Definition: singleton.h:42