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 SUPERNOVA_STATE_H
23 #define SUPERNOVA_STATE_H
24 
25 #include "common/error.h"
26 #include "common/events.h"
27 #include "common/rect.h"
28 #include "common/keyboard.h"
29 #include "supernova/supernova1/rooms.h"
30 #include "supernova/room.h"
31 #include "supernova/sound.h"
32 #include "supernova/game-manager.h"
33 
34 namespace Supernova {
35 
36 class GameManager;
37 
38 class GameState {
39  public:
40  int32 _timeSleep;
41  int32 _timeAlarm;
42  int32 _eventTime;
43  EventFunction _eventCallback;
44  int32 _arrivalDaysLeft;
45  int32 _shipEnergyDaysLeft;
46  int32 _landingModuleEnergyDaysLeft;
47  uint16 _greatFlag;
48  int16 _timeRobot;
49  int16 _money;
50  byte _coins;
51  byte _shoes;
52  byte _origin;
53  byte _destination;
54  byte _language;
55  bool _corridorSearch;
56  bool _alarmOn;
57  bool _terminalStripConnected;
58  bool _terminalStripWire;
59  bool _cableConnected;
60  bool _powerOff;
61  bool _dream;
62  bool _nameSeen[4];
63  bool _playerHidden;
64 };
65 
66 class GameManager1: public GameManager {
67 public:
68  GameManager1(SupernovaEngine *vm, Sound *sound);
69  ~GameManager1() override;
70 
71  GameState _state;
72 
73  void updateEvents() override;
74  void executeRoom() override;
75  bool serialize(Common::WriteStream *out) override;
76  bool deserialize(Common::ReadStream *in, int version) override;
77 
78  void initState() override;
79  void initRooms() override;
80  void destroyRooms() override;
81  bool canSaveGameStateCurrently() override;
82  bool genericInteract(Action verb, Object &obj1, Object &obj2) override;
83  bool isHelmetOff();
84  void great(uint number);
85  bool airless();
86  void shock();
87  void turnOff();
88  void turnOn();
89  void roomBrightness() override;
90  void openLocker(const Room *room, Object *obj, Object *lock, int section);
91  void closeLocker(const Room *room, Object *obj, Object *lock, int section);
92  void drawMapExits() override;
93  void handleInput() override;
94  void handleTime() override;
95  void loadTime() override;
96  void saveTime() override;
97  void shot(int a, int b);
98  void takeMoney(int amount) override;
99  void search(int time);
100  void startSearch();
101  void guardNoticed();
102  void busted(int i);
103  void corridorOnEntrance();
104  void telomat(int number);
105  void novaScroll();
106  void supernovaEvent();
107  void guardReturnedEvent();
108  void walk(int a);
109  void guardWalkEvent();
110  void taxiEvent();
111  void searchStartEvent();
112  void guardShot();
113  void guard3Shot();
114  void alarm();
115  void alarmSound();
116 
117 private:
118  int _prevImgId;
119 };
120 
121 }
122 
123 #endif // SUPERNOVA_STATE_H
Definition: supernova.h:61
Definition: game-manager.h:101
Definition: stream.h:77
Definition: console.h:27
Definition: room.h:39
Definition: sound.h:85
Definition: state.h:38
Definition: state.h:66
Definition: stream.h:385
Definition: msn_def.h:210