ScummVM API documentation
globals_nebular.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 MADS_GLOBALS_NEBULAR_H
23 #define MADS_GLOBALS_NEBULAR_H
24 
25 #include "common/scummsys.h"
26 #include "common/array.h"
27 #include "mads/game.h"
28 #include "mads/resources.h"
29 
30 namespace MADS {
31 
32 namespace Nebular {
33 
34 enum GlobalId {
35  kSexOfRex = 0,
36  kOldSexOfRex = 1,
37  kWalkerTiming = 2,
38 // kWalkerTiming0 = 3,
39  kTalkInanimateCount = 4,
40  kCopyProtectFailed = 5,
41 
42  /* Section #1 variables */
43  kNeedToStandUp = 10,
44  kTurkeyExploded = 11,
45  kMedicineCabinetOpen = 12,
46  kMedicineCabinetVirgin = 13,
47  kWatchedViewScreen = 14,
48  kHoovicAlive = 15,
49  kHoovicSated = 16,
50  kHoovicFishEaten = 17,
51  kWaterInAPuddle = 18,
52  kFishIn105 = 19,
53  kFishIn107 = 20,
54  kFishIn108 = 21,
55  kRandomNumber = 29,
56 
57  /* Section #2 variables */
58  kCurtainOpen = 30,
59  kLadderBroken = 31,
60  kBone202Status = 32,
61  kMeteorologistStatus = 33,
62  kRhotundaStatus = 34,
63  kLeavesStatus = 35,
64  kMonkeyStatus = 36,
65  kMeteorologistEverSeen = 37,
66  kMeteorologistWatch = 38,
67  kTeleporterCommand = 39,
68 
69  kTeleporterDestination = 40,
70  kTeleporterUnderstood = 41,
71  kConv205 = 42,
72  kChickenPermitted = 43,
73  kTwinklesStatus = 44,
74  kTwinklesApproached = 45,
75  kConvTwinkles1 = 46,
76  kConvTwinkles2 = 47,
77  kConvTwinkles3 = 48,
78  kConvTwinkles5 = 49,
79 
80  kConvTwinkles6 = 50,
81  kConvTwinkles7 = 51,
82  kConvTwinkles8 = 52,
83  kBlowgunStatus = 53,
84 
85  /* Section #3 Variables */
86  kAfterHavoc = 60,
87  kHaveYourStuff = 61,
88  kRightView320 = 62,
89  kConvBuddy1 = 63,
90  kConvBuddy2 = 64,
91  kMetBuddyBeast = 65,
92  kKnowsBuddyBeast = 66,
93  kConvSlache1 = 67,
94  kConvSlache2 = 68,
95  kConvSlache3 = 69,
96 
97  kRexHasMetSlache = 70,
98  kConvIntern = 71,
99  kHasSeenProfPyro = 72,
100  kKickedIn391Grate = 73,
101 
102  /* Section #4 Variables */
103  kArmoryDoorOpen = 80,
104  kStorageDoorOpen = 81,
105  kNextIngredient = 82,
106  kIngredientList = 83,
107  kIngredientList1 = 84,
108  kIngredientList2 = 85,
109  kIngredientList3 = 86,
110  kIngredientQuantity = 87,
111  kIngredientQuantity1 = 88,
112  kIngredientQuantity2 = 89,
113 
114  kIngredientQuantity3 = 90,
115  kconvPyro_1 = 91,
116  kconvPyro_2 = 92,
117  kconvPyro_3 = 93,
118  kconvPyro_4 = 94,
119  kBadFirstIngredient = 95,
120  kConvBartender1 = 96,
121  kConvBartender2 = 97,
122  kConvBartender3 = 98,
123  kConvBartender4 = 99,
124 
125  kHasPurchased = 100,
126  kBeenThruHelgaScene = 101,
127  kHasSaidBinocs = 102,
128  kHasSaidTimer = 103,
129  kBottleDisplayed = 104,
130  kHasBeenScanned = 105,
131  kSomeoneHasExploded = 106,
132 
133  /* Section #5 Variables */
134  kBoatRaised = 110,
135  kCarStatus = 111,
136  kCityFlooded = 112,
137  kLaserOn = 113,
138  kLaserHoleIsThere = 114,
139  kCarIsGone = 115,
140  kRegisterOpen = 116,
141  kSafeStatus = 117,
142  kDogStatus = 118,
143  kLineStatus = 119,
144 
145  kHoverCarLocation = 120,
146  kHoverCarDestination = 121,
147 
148  /* Section #6 Variables */
149  kConvHermit1 = 130,
150  kConvHermit2 = 131,
151  kHasTalkedToHermit = 132,
152  kHermitWantsBatteries = 133,
153  kHandsetCellStatus = 134,
154  kBeenInVideoStore = 135,
155  kDurafailRecharged = 136,
156  kPenlightCellStatus = 137,
157  kTimebombStatus = 138,
158  kCheckDaemonTimebomb = 140,
159 
160  kResurrectRoom = 141,
161 
162  /* Section #6 Time-Bomb Variables */
163  kTimebombClock = 142,
164 // kTimebombClock0 = 143,
165  kTimebombTimer = 144,
166 // kTimebombTimer0 = 145,
167  kWarnedFloodCity = 146,
168 
169  /* Section #7 Variables */
170  kBottleStatus = 150,
171  kMonsterAlive = 151,
172  kConvBottleFillNode = 152,
173  kBoatStatus = 153,
174 
175  /* Section #8 Variables */
176  kAntigravClock = 160,
177 // kAntigravClock0 = 161,
178  kAntigravTiming = 162,
179 // kAntigravTiming0 = 163,
180  kWindowFixed = 164,
181  kInSpace = 165,
182  kReturnFromCut = 166,
183  kBeamIsUp = 167,
184  kForceBeamDown = 168,
185  kCameFromCut = 169,
186 
187  kCutX = 170,
188  kCutY = 171,
189  kCutFacing = 172,
190  kDontRepeat = 173,
191  kHoppyDead = 174,
192  kHasWatchedAntigrav = 175,
193  kRemoteSequenceRan = 176,
194  kRemoteOnGround = 177,
195  kFromCockpit = 178,
196  kExitShip = 179,
197 
198  kBetweenRooms = 180,
199  kTopButtonPushed = 181,
200  kTargetModInstalled = 182,
201  kShieldModInstalled = 183,
202  kUpBecauseOfRemote = 184,
203 
204  kTeleporterRoom = 190,
205  kTeleporterCode = 200
206 };
207 
208 // Enums used for specific individual globals
209 // Section #1
210 // Rex's sex/swimming state
211 enum { REX_MALE = 0, REX_MALE_SWIMMER = 1, REX_FEMALE = 2 };
212 
213 // Section #2
214 // State of Meteorologist in the outpost
215 enum { METEOROLOGIST_ABSENT = 0, METEOROLOGIST_PRESENT = 1, METEOROLOGIST_GONE = 2 };
216 
217 // State of watching the Meteorologist
218 enum { METEOROLOGIST_NORMAL = 0, METEOROLOGIST_GROUND = 1, METEOROLOGIST_TOWER = 2 };
219 
220 // The fat bouncy lady that can squish you on the plains
221 enum { RHOTUNDA_HUNGRY = 0, RHOTUNDA_STUCK = 1, RHOTUNDA_GONE = 2 };
222 
223 // Flags for the bones you can take
224 enum { BONE_202_LEFT_GONE = 1, BONE_202_RIGHT_GONE = 2 };
225 
226 // Leaves used to cover the trap
227 enum { LEAVES_ON_GROUND = 0, LEAVES_WITH_PLAYER = 1, LEAVES_ON_TRAP = 2 };
228 
229 // Monkey ambush state
230 enum { MONKEY_AMBUSH_READY = 0, MONKEY_HAS_BINOCULARS = 1, MONKEY_IS_GONE = 2 };
231 
232 // Teleporter status flags
233 enum {
234  TELEPORTER_NONE = 0, TELEPORTER_BEAM_IN = 1, TELEPORTER_BEAM_OUT = 2,
235  TELEPORTER_STEP_OUT = 3, TELEPORTER_WRONG = 4
236 };
237 
238 // Twinkles status
239 enum { TWINKLES_AT_HOME = 0, TWINKLES_GONE = 1 };
240 
241 // Section #4
242 // Status of the explosives
243 enum { EXPLOSIVES_INSIDE = 3 };
244 
245 // Section #5
246 // Dog status (room 602, outside Abdul's garage)
247 enum { DOG_PRESENT = 1, DOG_LEFT = 2, DOG_GONE = 3, DOG_DEAD = 4 };
248 
249 // Dog status (room 608, inside Abdul's garage)
250 enum { CAR_UP = 0, CAR_SQUASHES_DOG = 1, CAR_SQUASHES_DOG_AGAIN = 2, CAR_DOWN = 3, CAR_DOWN_ON_SQUASHED_DOG = 4 };
251 
252 enum { SAFE_CLOSED = 0, SAFE_OPENED = 1, SAFE_CLOSED_WITH_HOLE = 2, SAFE_OPENED_WITH_HOLE = 3 };
253 
254 enum { LINE_NOT_DROPPED = 1, LINE_DROPPED = 2, LINE_TIED = 3, LINE_NOW_UNTIED = 4 };
255 
256 // Section #6
257 enum {
258  NO_CELLS = 0, // Handset doesn't contain any cells
259  CHARGED_DURAFAIL = 1, // Handset has charged durafail cells
260  UNCHARGED_DURAFAIL = 2, // Handset has uncharged durafail cells */
261  PHONE_CELLS = 3, // Handset has already charged phone cells
262  FIRST_TIME_PHONE_CELLS = 4, // First time phone cells are in the handset
263  FIRST_TIME_UNCHARGED_DURAFAIL = 5, // First time uncharged cells are in penlight
264  FIRST_TIME_CHARGED_DURAFAIL = 6 // First time charged cells are in penlight
265 };
266 
267 // Time bomb status
268 enum {
269  TIMEBOMB_DEACTIVATED = 0, TIMEBOMB_ACTIVATED = 1,
270  TIMEBOMB_BLOW_UP = 2, TIMEBOMB_DEAD = 3
271 };
272 
273 /* Section #7 */
274 // Status of the bottle
275 enum {
276  BOTTLE_EMPTY = 0, BOTTLE_ONE_QUARTER_FULL = 1, BOTTLE_HALF_FULL = 2,
277  BOTTLE_THREE_QUARTERS_FULL = 3, BOTTLE_FULL = 4
278 };
279 
280 // Status of the boat
281 enum {
282  BOAT_UNFLOODED = 0, BOAT_ADRIFT = 1, BOAT_TIED_FLOATING = 2,
283  BOAT_TIED = 3, BOAT_GONE = 4
284 };
285 
286 
287 /* Miscellaneous defines */
288 #define TELEPORTER_COUNT 10 // Total number of teleporters
289 #define TELEPORTER_WORK_COUNT 6 // Total number that actually work
290 
291 
292 class NebularGlobals : public Globals {
293 public:
294  SynchronizedList _spriteIndexes;
295  SynchronizedList _sequenceIndexes;
296 
297  int _timebombClock, _timebombTimer;
298 public:
302  NebularGlobals();
303 
307  virtual void synchronize(Common::Serializer &s);
308 };
309 
310 } // End of namespace Nebular
311 
312 } // End of namespace MADS
313 
314 #endif /* MADS_GLOBALS_NEBULAR_H */
virtual void synchronize(Common::Serializer &s)
Definition: resources.h:78
Definition: serializer.h:79
Definition: globals_nebular.h:292
Definition: globals.h:32
Definition: action.h:28