ScummVM API documentation
state.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  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef SUPERNOVA2_STATE_H
23 #define SUPERNOVA2_STATE_H
24 
25 #include "common/events.h"
26 #include "common/rect.h"
27 #include "common/keyboard.h"
28 #include "supernova/room.h"
29 #include "supernova/supernova2/rooms.h"
30 #include "supernova/sound.h"
31 #include "supernova/game-manager.h"
32 
33 namespace Supernova {
34 
36  int _e;
37  int _s;
38  int _z;
39  int _r;
40  int _a;
41 };
42 
43 struct GameState2 {
44  int16 _money;
45  int32 _startTime;
46  bool _addressKnown;
47  Room *_previousRoom;
48  bool _poleMagnet;
49  char _admission;
50  bool _tipsy;
51  bool _dark;
52  char _elevatorE;
53  char _elevatorNumber;
54  bool _toMuseum;
55  EventFunction _eventCallback;
56  uint32 _eventTime;
57  int16 _pyraE;
58  char _pyraS;
59  char _pyraZ;
60  int16 _pyraDirection;
61  int16 _puzzleTab[15];
62  bool _alarmCracked;
63  bool _alarmOn;
64  bool _haste;
65  byte _pressureCounter;
66  bool _sirenOn;
67  byte _taxiPossibility;
68 };
69 
70 class GameManager2: public GameManager{
71 public:
72  GameManager2(SupernovaEngine *vm, Sound *sound);
73  ~GameManager2() override;
74 
75  GameState2 _state;
76 
77  void updateEvents() override;
78  void executeRoom() override;
79  bool serialize(Common::WriteStream *out) override;
80  bool deserialize(Common::ReadStream *in, int version) override;
81 
82  byte _dials[6];
83 
84  //state
85  unsigned char _puzzleField[16];
86  bool _mapOn;
87  bool _steps;
88  bool _cracking;
89  bool _alarmBefore;
90  RoomId _securityTab[10];
91  int _restTime;
92 
93  void initState() override;
94  void initRooms() override;
95  void destroyRooms() override;
96  bool canSaveGameStateCurrently() override;
97  bool genericInteract(Action verb, Object &obj1, Object &obj2) override;
98  void roomBrightness() override {}
99  void drawMapExits() override;
100  void handleInput() override;
101  void handleTime() override;
102  void loadTime() override {}
103  void saveTime() override {}
104  void takeMoney(int amount) override;
105  void taxi();
106  void leaveTaxi();
107  void taxiUnknownDestination();
108  void taxiPayment(int price, int destination);
109  void playerTakeOut();
110  void sober();
111  void playCD();
112  bool talk(int mod1, int mod2, int rest, MessagePosition pos, int id);
113  bool talkRest(int mod1, int mod2, int rest);
114  void pyramidEnd();
115  void passageConstruction();
116  byte wall(int s, int z, int direction, int stepsForward, int stepsRight);
117  bool move(Action verb, Object &obj);
118  void compass();
119  void puzzleConstruction();
120  void drawClock();
121  void caught();
122  void caught2();
123  void alarm();
124  void crack(int time);
125  bool crackDoor(int time);
126  void museumDoorInteract(Action verb, Object &obj1, Object &obj2);
127  void securityEntrance();
128  void pressureAlarmCount();
129  void pressureAlarmEntrance();
130 };
131 
132 }
133 
134 #endif // SUPERNOVA2_STATE_H
Definition: supernova.h:61
Definition: game-manager.h:101
Definition: state.h:43
Definition: state.h:35
Definition: stream.h:77
Definition: console.h:27
Definition: room.h:39
Definition: sound.h:85
Definition: state.h:70
Out move(In first, In last, Out dst)
Definition: algorithm.h:109
Definition: stream.h:385
Definition: msn_def.h:210