ScummVM API documentation
stoneship.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 MYST_SCRIPTS_STONESHIP_H
23 #define MYST_SCRIPTS_STONESHIP_H
24 
25 #include "common/scummsys.h"
26 #include "common/util.h"
27 #include "mohawk/myst_scripts.h"
28 
29 namespace Mohawk {
30 
31 struct MystScriptEntry;
32 
33 namespace MystStacks {
34 
35 #define DECLARE_OPCODE(x) void x(uint16 var, const ArgumentsArray &args)
36 
37 class Stoneship : public MystScriptParser {
38 public:
39  explicit Stoneship(MohawkEngine_Myst *vm);
40  ~Stoneship() override;
41 
42  void disablePersistentScripts() override;
43  void runPersistentScripts() override;
44 
45 private:
46  void setupOpcodes();
47  uint16 getVar(uint16 var) override;
48  void toggleVar(uint16 var) override;
49  bool setVarValue(uint16 var, uint16 value) override;
50 
51  uint16 getMap() override { return 9933; }
52 
53  DECLARE_OPCODE(o_pumpTurnOff);
54  DECLARE_OPCODE(o_brotherDoorOpen);
55  DECLARE_OPCODE(o_cabinBookMovie);
56  DECLARE_OPCODE(o_drawerOpenSirius);
57  DECLARE_OPCODE(o_drawerClose);
58  DECLARE_OPCODE(o_telescopeStart);
59  DECLARE_OPCODE(o_telescopeMove);
60  DECLARE_OPCODE(o_telescopeStop);
61  DECLARE_OPCODE(o_generatorStart);
62  DECLARE_OPCODE(o_generatorStop);
63  DECLARE_OPCODE(o_drawerOpenAchenar);
64  DECLARE_OPCODE(o_hologramPlayback);
65  DECLARE_OPCODE(o_hologramSelectionStart);
66  DECLARE_OPCODE(o_hologramSelectionMove);
67  DECLARE_OPCODE(o_hologramSelectionStop);
68  DECLARE_OPCODE(o_compassButton);
69  DECLARE_OPCODE(o_chestValveVideos);
70  DECLARE_OPCODE(o_chestDropKey);
71  DECLARE_OPCODE(o_trapLockOpen);
72  DECLARE_OPCODE(o_sideDoorsMovies);
73  DECLARE_OPCODE(o_cloudOrbEnter);
74  DECLARE_OPCODE(o_cloudOrbLeave);
75  DECLARE_OPCODE(o_drawerCloseOpened);
76 
77  DECLARE_OPCODE(o_hologramDisplay_init);
78  DECLARE_OPCODE(o_hologramSelection_init);
79  DECLARE_OPCODE(o_battery_init);
80  DECLARE_OPCODE(o_tunnelEnter_init);
81  DECLARE_OPCODE(o_batteryGauge_init);
82  DECLARE_OPCODE(o_tunnel_init);
83  DECLARE_OPCODE(o_tunnelLeave_init);
84  DECLARE_OPCODE(o_chest_init);
85  DECLARE_OPCODE(o_telescope_init);
86  DECLARE_OPCODE(o_achenarDrawers_init);
87  DECLARE_OPCODE(o_cloudOrb_init);
88 
89  void chargeBattery_run();
90  void batteryDeplete_run();
91 
93 
94  bool _batteryCharging;
95  bool _batteryDepleting;
96  uint32 _batteryNextTime;
97 
98  bool _batteryGaugeRunning;
99  uint16 _batteryLastCharge; // 92
100  MystAreaImageSwitch *_batteryGauge; // 96
101  void batteryGaugeUpdate();
102  void batteryGauge_run();
103 
104  uint16 _cabinMystBookPresent; // 64
105 
106  uint16 _siriusDrawerDrugsOpen; // 72
107 
108  uint16 _brotherDoorOpen; // 76
109 
110  uint16 _chestDrawersOpen; // 78
111  uint16 _chestAchenarBottomDrawerClosed; // 144
112  void drawerClose(uint16 drawer);
113 
114  uint16 _hologramTurnedOn; // 80
115  MystAreaVideo *_hologramDisplay; // 84
116  MystAreaVideo *_hologramSelection; // 88
117  uint16 _hologramDisplayPos;
118 
119  bool _tunnelRunning;
120  uint32 _tunnelNextTime;
121  uint16 _tunnelAlarmSound; // 100
122  uint16 _tunnelImagesCount; // 22
123  uint16 _tunnelImages[2]; // 32
124  void tunnel_run();
125 
126  uint16 _telescopePosition; // 112
127  uint16 _telescopePanorama;
128  uint16 _telescopeOldMouse;
129  uint16 _telescopeLighthouseOff; // 130
130  uint16 _telescopeLighthouseOn; // 128
131  bool _telescopeLighthouseState; // 124
132  bool _telescopeRunning;
133  uint32 _telescopeNexTime;
134  void telescope_run();
135  void telescopeLighthouseDraw();
136 
137  MystAreaVideo *_cloudOrbMovie; // 136
138  uint16 _cloudOrbSound; // 140
139  uint16 _cloudOrbStopSound; // 142
140 
141  uint16 batteryRemainingCharge();
142 };
143 
144 } // End of namespace MystStacks
145 }
146 
147 #undef DECLARE_OPCODE
148 
149 #endif
Definition: myst_areas.h:107
Definition: stoneship.h:37
Definition: myst_state.h:324
Definition: myst_scripts.h:60
Definition: myst.h:129
Definition: myst_areas.h:154
Definition: bitmap.h:32