1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
|
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* Additional copyright for this file:
* Copyright (C) 1995-1997 Presto Studios, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef PEGASUS_CONSTANTS_H
#define PEGASUS_CONSTANTS_H
#include "common/endian.h"
#include "common/rect.h"
#include "pegasus/types.h"
namespace Pegasus {
// TODO: Organize these
static const GameID kGameIDNothing = -1;
static const ActorID kNoActorID = kGameIDNothing;
static const ActorID kPlayerID = 0;
static const ItemID kNoItemID = kGameIDNothing;
static const RoomID kNoRoomID = kGameIDNothing;
static const ExtraID kNoExtraID = 0xFFFFFFFF;
static const NeighborhoodID kNoNeighborhoodID = kGameIDNothing;
static const AlternateID kNoAlternateID = 0;
static const GameMenuCommand kMenuCmdNoCommand = 0;
static const HotSpotActivationID kActivateHotSpotAlways = 0;
static const HotSpotActivationID kActivateHotSpotNever = -1;
static const ItemState kNoItemState = -1;
static const DirectionConstant kNoDirection = 0xFF;
static const DirectionConstant kNorth = 0;
static const DirectionConstant kSouth = 1;
static const DirectionConstant kEast = 2;
static const DirectionConstant kWest = 3;
static const TurnDirection kNoTurn = 0xFF;
static const TurnDirection kTurnLeft = 0;
static const TurnDirection kTurnRight = 1;
static const TurnDirection kTurnUp = 2;
static const TurnDirection kTurnDown = 3;
static const TurnDirection kMaxTurns = 4;
static const GameMode kNoMode = -1;
static const GameMode kModeNavigation = 0;
static const GameMode kLastGameShellMode = kModeNavigation;
static const CanMoveForwardReason kCanMoveForward = 0;
static const CanMoveForwardReason kCantMoveBlocked = kCanMoveForward + 1;
static const CanMoveForwardReason kCantMoveDoorClosed = kCantMoveBlocked + 1;
static const CanMoveForwardReason kCantMoveDoorLocked = kCantMoveDoorClosed + 1;
static const CanMoveForwardReason kCantMoveLastReason = kCantMoveDoorLocked;
static const CanTurnReason kCanTurn = 0;
static const CanTurnReason kCantTurnNoTurn = kCanTurn + 1;
static const CanTurnReason kCantTurnLastReason = kCantTurnNoTurn;
static const CanOpenDoorReason kCanOpenDoor = 0;
static const CanOpenDoorReason kCantOpenNoDoor = kCanOpenDoor + 1;
static const CanOpenDoorReason kCantOpenLocked = kCantOpenNoDoor + 1;
static const CanOpenDoorReason kCantOpenAlreadyOpen = kCantOpenLocked + 1;
static const CanOpenDoorReason kCantOpenLastReason = kCantOpenAlreadyOpen;
static const DisplayElementID kNoDisplayElement = -1;
static const DisplayElementID kHighestReservedElementID = -2;
static const DisplayElementID kCursorID = kHighestReservedElementID;
static const DisplayElementID kLoadScreenID = kCursorID - 1;
static const DisplayOrder kMinAvailableOrder = 0;
static const DisplayOrder kMaxAvailableOrder = 999998;
static const DisplayOrder kLoadScreenOrder = 900000;
static const DisplayOrder kCursorOrder = 1000000;
static const HotSpotID kNoHotSpotID = -1;
static const HotSpotFlags kNoHotSpotFlags = 0;
static const HotSpotFlags kAllHotSpotFlags = ~kNoHotSpotFlags;
static const NotificationFlags kNoNotificationFlags = 0;
static const DisplayElementID kCurrentDragSpriteID = 1000;
static const TimeScale kDefaultTimeScale = 600;
// Ticks per second.
static const TimeScale kOneTickPerSecond = 1;
static const TimeScale kTwoTicksPerSecond = 2;
static const TimeScale kFifteenTicksPerSecond = 15;
static const TimeScale kThirtyTicksPerSecond = 30;
static const TimeScale kSixtyTicksPerSecond = 60;
static const TimeScale kMovieTicksPerSecond = 600;
// These times are in seconds.
static const TimeValue kOneSecond = 1;
static const TimeValue kTwoSeconds = 2;
static const TimeValue kThreeSeconds = 3;
static const TimeValue kFourSeconds = 4;
static const TimeValue kFiveSeconds = 5;
static const TimeValue kSixSeconds = 6;
static const TimeValue kSevenSeconds = 7;
static const TimeValue kEightSeconds = 8;
static const TimeValue kNineSeconds = 9;
static const TimeValue kTenSeconds = 10;
static const TimeValue kElevenSeconds = 11;
static const TimeValue kTwelveSeconds = 12;
static const TimeValue kThirteenSeconds = 13;
static const TimeValue kFourteenSeconds = 14;
static const TimeValue kFifteenSeconds = 15;
static const TimeValue kSixteenSeconds = 16;
static const TimeValue kSeventeenSeconds = 17;
static const TimeValue kEighteenSeconds = 18;
static const TimeValue kNineteenSeconds = 19;
static const TimeValue kTwentySeconds = 20;
static const TimeValue kThirtySeconds = 30;
static const TimeValue kFortySeconds = 40;
static const TimeValue kFiftySeconds = 50;
static const TimeValue kSixtySeconds = 60;
static const TimeValue kOneMinute = 60;
static const TimeValue kTwoMinutes = kOneMinute * 2;
static const TimeValue kThreeMinutes = kOneMinute * 3;
static const TimeValue kFourMinutes = kOneMinute * 4;
static const TimeValue kFiveMinutes = kOneMinute * 5;
static const TimeValue kSixMinutes = kOneMinute * 6;
static const TimeValue kSevenMinutes = kOneMinute * 7;
static const TimeValue kEightMinutes = kOneMinute * 8;
static const TimeValue kNineMinutes = kOneMinute * 9;
static const TimeValue kTenMinutes = kOneMinute * 10;
static const TimeValue kElevenMinutes = kOneMinute * 11;
static const TimeValue kTwelveMinutes = kOneMinute * 12;
static const TimeValue kThirteenMinutes = kOneMinute * 13;
static const TimeValue kFourteenMinutes = kOneMinute * 14;
static const TimeValue kFifteenMinutes = kOneMinute * 15;
static const TimeValue kSixteenMinutes = kOneMinute * 16;
static const TimeValue kSeventeenMinutes = kOneMinute * 17;
static const TimeValue kEighteenMinutes = kOneMinute * 18;
static const TimeValue kNineteenMinutes = kOneMinute * 19;
static const TimeValue kTwentyMinutes = kOneMinute * 20;
static const TimeValue kThirtyMinutes = kOneMinute * 30;
static const TimeValue kFortyMinutes = kOneMinute * 40;
static const TimeValue kFiftyMinutes = kOneMinute * 50;
static const TimeValue kOneHour = kOneMinute * 60;
static const TimeValue kTwoHours = kOneHour * 2;
// Common times.
static const TimeValue kHalfSecondPerTwoTicks = kTwoTicksPerSecond / 2;
static const TimeValue kHalfSecondPerThirtyTicks = kThirtyTicksPerSecond / 2;
static const TimeValue kHalfSecondPerSixtyTicks = kSixtyTicksPerSecond / 2;
static const TimeValue kOneSecondPerTwoTicks = kTwoTicksPerSecond;
static const TimeValue kOneSecondPerThirtyTicks = kThirtyTicksPerSecond;
static const TimeValue kOneSecondPerSixtyTicks = kSixtyTicksPerSecond;
static const TimeValue kOneMinutePerFifteenTicks = kOneMinute * kFifteenTicksPerSecond;
static const TimeValue kFiveMinutesPerFifteenTicks = kFiveMinutes * kFifteenTicksPerSecond;
static const TimeValue kTenMinutesPerFifteenTicks = kTenMinutes * kFifteenTicksPerSecond;
static const TimeValue kOneMinutePerThirtyTicks = kOneMinute * kThirtyTicksPerSecond;
static const TimeValue kFiveMinutesPerThirtyTicks = kFiveMinutes * kThirtyTicksPerSecond;
static const TimeValue kTenMinutesPerThirtyTicks = kTenMinutes * kThirtyTicksPerSecond;
static const TimeValue kOneMinutePerSixtyTicks = kOneMinute * kSixtyTicksPerSecond;
static const TimeValue kFiveMinutesPerSixtyTicks = kFiveMinutes * kSixtyTicksPerSecond;
static const TimeValue kTenMinutesPerSixtyTicks = kTenMinutes * kSixtyTicksPerSecond;
// Time in seconds you can hang around Caldoria without going to work...
static const TimeValue kLateWarning2TimeLimit = kFiveMinutes;
static const TimeValue kLateWarning3TimeLimit = kTenMinutes;
static const TimeValue kSinclairShootsTimeLimit = kThreeMinutes;
static const TimeValue kCardBombCountDownTime = kTwelveSeconds;
static const TimeValue kOxyMaskFullTime = kThirtyMinutes;
static const TimeValue kTSAUncreatedTimeLimit = kFiveMinutes;
static const TimeValue kRipTimeLimit = kTenMinutesPerFifteenTicks;
static const TimeScale kRipTimeScale = kFifteenTicksPerSecond;
static const TimeValue kIntroTimeOut = kThirtySeconds;
static const TimeValue kMarsRobotPatienceLimit = kFifteenSeconds;
static const TimeValue kLockFreezeTimeLmit = kFifteenSeconds;
static const TimeValue kSpaceChaseTimeLimit = kTenMinutes;
static const TimeValue kVacuumSurvivalTimeLimit = kThirtySeconds;
static const TimeValue kColorMatchingTimeLimit = kFourMinutes;
static const TimeScale kJunkTimeScale = kFifteenTicksPerSecond;
static const TimeValue kJunkDropBaseTime = kFiveSeconds;
static const TimeValue kJunkDropSlopTime = kThreeSeconds;
static const TimeValue kJunkTravelTime = kTenSeconds * kJunkTimeScale;
static const TimeValue kCollisionReboundTime = kOneSecond * kJunkTimeScale;
static const TimeValue kWeaponReboundTime = kTwoSeconds * kJunkTimeScale;
static const TimeValue kGawkAtRobotTime = kTenSeconds;
static const TimeValue kGawkAtRobotTime2 = kThirteenSeconds;
static const TimeValue kPlasmaImpactTime = kTwoSeconds;
static const TimeValue kNoradAirMaskTimeLimit = kOneMinute + kFifteenSeconds;
static const NotificationID kNeighborhoodNotificationID = 1;
static const NotificationID kLastNeighborhoodNotificationID = kNeighborhoodNotificationID;
static const NotificationFlags kNeighborhoodMovieCompletedFlag = 1;
static const NotificationFlags kMoveForwardCompletedFlag = kNeighborhoodMovieCompletedFlag << 1;
static const NotificationFlags kStrideCompletedFlag = kMoveForwardCompletedFlag << 1;
static const NotificationFlags kTurnCompletedFlag = kStrideCompletedFlag << 1;
static const NotificationFlags kSpotCompletedFlag = kTurnCompletedFlag << 1;
static const NotificationFlags kDoorOpenCompletedFlag = kSpotCompletedFlag << 1;
static const NotificationFlags kExtraCompletedFlag = kDoorOpenCompletedFlag << 1;
static const NotificationFlags kSpotSoundCompletedFlag = kExtraCompletedFlag << 1;
static const NotificationFlags kDelayCompletedFlag = kSpotSoundCompletedFlag << 1;
static const NotificationFlags kActionRequestCompletedFlag = kDelayCompletedFlag << 1;
static const NotificationFlags kDeathExtraCompletedFlag = kActionRequestCompletedFlag << 1;
static const NotificationFlags kLastNeighborhoodNotificationFlag = kDeathExtraCompletedFlag;
static const NotificationFlags kNeighborhoodFlags = kNeighborhoodMovieCompletedFlag |
kMoveForwardCompletedFlag |
kStrideCompletedFlag |
kTurnCompletedFlag |
kSpotCompletedFlag |
kDoorOpenCompletedFlag |
kExtraCompletedFlag |
kSpotSoundCompletedFlag |
kDelayCompletedFlag |
kActionRequestCompletedFlag |
kDeathExtraCompletedFlag;
static const uint32 kPegasusPrimeCreator = MKTAG('J', 'P', 'P', 'P');
static const uint32 kPegasusPrimeContinueType = MKTAG('P', 'P', 'C', 'T');
static const uint32 kPegasusPrimeDisk1GameType = MKTAG('P', 'P', 'G', '1');
static const uint32 kPegasusPrimeDisk2GameType = MKTAG('P', 'P', 'G', '2');
static const uint32 kPegasusPrimeDisk3GameType = MKTAG('P', 'P', 'G', '3');
static const uint32 kPegasusPrimeDisk4GameType = MKTAG('P', 'P', 'G', '4');
// We only support one of the save versions; the rest are from betas
// and we are not supporting them.
static const uint32 kPegasusPrimeVersion = 0x00009019;
static const char kNormalSave = 0;
static const char kContinueSave = 1;
// Display IDs.
static const DisplayElementID kNavMovieID = 1;
static const DisplayElementID kTurnPushID = 2;
static const DisplayElementID kMaxGameShellDisplayID = kTurnPushID;
// Display ordering.
static const DisplayOrder kNavLayer = 10000;
static const DisplayOrder kNavMovieOrder = kNavLayer;
static const DisplayOrder kTurnPushOrder = kNavMovieOrder + 1;
/////////////////////////////////////////////
//
// Display IDs.
static const DisplayElementID kScreenDimmerID = kMaxGameShellDisplayID + 1;
static const DisplayElementID kInterface1ID = kScreenDimmerID + 1;
static const DisplayElementID kInterface2ID = kInterface1ID + 1;
static const DisplayElementID kInterface3ID = kInterface2ID + 1;
static const DisplayElementID kInterface4ID = kInterface3ID + 1;
static const DisplayElementID kDateID = kInterface4ID + 1;
static const DisplayElementID kCompassID = kDateID + 1;
static const DisplayElementID kInventoryPushID = kCompassID + 1;
static const DisplayElementID kInventoryLidID = kInventoryPushID + 1;
static const DisplayElementID kBiochipPushID = kInventoryLidID + 1;
static const DisplayElementID kBiochipLidID = kBiochipPushID + 1;
static const DisplayElementID kEnergyBarID = kBiochipLidID + 1;
static const DisplayElementID kWarningLightID = kEnergyBarID + 1;
static const DisplayElementID kAILeftAreaID = kWarningLightID + 1;
static const DisplayElementID kAIMiddleAreaID = kAILeftAreaID + 1;
static const DisplayElementID kAIRightAreaID = kAIMiddleAreaID + 1;
static const DisplayElementID kAIMovieID = kAIRightAreaID + 1;
static const DisplayElementID kInventoryDropHighlightID = kAIMovieID + 1;
static const DisplayElementID kBiochipDropHighlightID = kInventoryDropHighlightID + 1;
static const DisplayElementID kDraggingSpriteID = 1000;
static const DisplayElementID kCroppedMovieID = 2000;
static const DisplayElementID kNeighborhoodDisplayID = 3000;
static const DisplayElementID kItemPictureBaseID = 5000;
static const CoordType kNavAreaLeft = 64;
static const CoordType kNavAreaTop = 64;
static const CoordType kBackground1Left = 0;
static const CoordType kBackground1Top = 64;
static const CoordType kBackground2Left = 0;
static const CoordType kBackground2Top = 0;
static const CoordType kBackground3Left = 576;
static const CoordType kBackground3Top = 64;
static const CoordType kBackground4Left = 0;
static const CoordType kBackground4Top = 320;
static const CoordType kOverviewControllerLeft = 540;
static const CoordType kOverviewControllerTop = 348;
static const CoordType kSwapLeft = 194;
static const CoordType kSwapTop = 116;
static const CoordType kSwapHiliteLeft = 200;
static const CoordType kSwapHiliteTop = 206;
static const CoordType kDateLeft = 136;
static const CoordType kDateTop = 44;
static const CoordType kCompassLeft = 222;
static const CoordType kCompassTop = 42;
static const CoordType kCompassWidth = 92;
static const CoordType kInventoryPushLeft = 74;
static const CoordType kInventoryPushTop = 92;
static const CoordType kInventoryLidLeft = 74;
static const CoordType kInventoryLidTop = 316;
static const CoordType kBiochipPushLeft = 362;
static const CoordType kBiochipPushTop = 192;
static const CoordType kBiochipLidLeft = 362;
static const CoordType kBiochipLidTop = 316;
static const CoordType kInventoryDropLeft = 0;
static const CoordType kInventoryDropTop = 320;
static const CoordType kInventoryDropRight = 232;
static const CoordType kInventoryDropBottom = 480;
static const CoordType kBiochipDropLeft = 302;
static const CoordType kBiochipDropTop = 320;
static const CoordType kBiochipDropRight = 640;
static const CoordType kBiochipDropBottom = 480;
static const CoordType kFinalMessageLeft = kInventoryPushLeft + 1;
static const CoordType kFinalMessageTop = kInventoryPushTop + 24;
/////////////////////////////////////////////
//
// Notifications.
static const NotificationID kJMPDCShellNotificationID = kLastNeighborhoodNotificationID + 1;
static const NotificationID kInterfaceNotificationID = kJMPDCShellNotificationID + 1;
static const NotificationID kAINotificationID = kInterfaceNotificationID + 1;
static const NotificationID kNoradNotificationID = kAINotificationID + 1;
static const NotificationID kNoradECRNotificationID = kNoradNotificationID + 1;
static const NotificationID kNoradFillingStationNotificationID = kNoradECRNotificationID + 1;
static const NotificationID kNoradPressureNotificationID = kNoradFillingStationNotificationID + 1;
static const NotificationID kNoradUtilityNotificationID = kNoradPressureNotificationID + 1;
static const NotificationID kNoradElevatorNotificationID = kNoradUtilityNotificationID + 1;
static const NotificationID kNoradSubPlatformNotificationID = kNoradElevatorNotificationID + 1;
static const NotificationID kSubControlNotificationID = kNoradSubPlatformNotificationID + 1;
static const NotificationID kNoradGreenBallNotificationID = kSubControlNotificationID + 1;
static const NotificationID kNoradGlobeNotificationID = kNoradGreenBallNotificationID + 1;
static const NotificationID kCaldoriaVidPhoneNotificationID = kNoradGlobeNotificationID + 1;
static const NotificationID kCaldoriaMessagesNotificationID = kCaldoriaVidPhoneNotificationID + 1;
static const NotificationID kCaldoriaBombTimerNotificationID = kCaldoriaMessagesNotificationID + 1;
// Sent to the shell by fShellNotification.
static const NotificationFlags kGameStartingFlag = 1;
static const NotificationFlags kNeedNewJumpFlag = kGameStartingFlag << 1;
static const NotificationFlags kPlayerDiedFlag = kNeedNewJumpFlag << 1;
static const NotificationFlags kJMPShellNotificationFlags = kGameStartingFlag |
kNeedNewJumpFlag |
kPlayerDiedFlag;
// Sent to the interface.
static const NotificationFlags kInventoryLidOpenFlag = 1;
static const NotificationFlags kInventoryLidClosedFlag = kInventoryLidOpenFlag << 1;
static const NotificationFlags kInventoryDrawerUpFlag = kInventoryLidClosedFlag << 1;
static const NotificationFlags kInventoryDrawerDownFlag = kInventoryDrawerUpFlag << 1;
static const NotificationFlags kBiochipLidOpenFlag = kInventoryDrawerDownFlag << 1;
static const NotificationFlags kBiochipLidClosedFlag = kBiochipLidOpenFlag << 1;
static const NotificationFlags kBiochipDrawerUpFlag = kBiochipLidClosedFlag << 1;
static const NotificationFlags kBiochipDrawerDownFlag = kBiochipDrawerUpFlag << 1;
static const NotificationFlags kInterfaceNotificationFlags = kInventoryLidOpenFlag |
kInventoryLidClosedFlag |
kInventoryDrawerUpFlag |
kInventoryDrawerDownFlag |
kBiochipLidOpenFlag |
kBiochipLidClosedFlag |
kBiochipDrawerUpFlag |
kBiochipDrawerDownFlag;
// Hot spots.
// Neighborhood hot spots.
static const HotSpotID kFirstNeighborhoodSpotID = 5000;
// kShellSpotFlag is a flag which marks all hot spots which belong to the shell, like
// the current item and current biochip spots.
static const HotSpotFlags kShellSpotFlag = 1;
// kNeighborhoodSpotFlag is a flag which marks all hot spots which belong to a
// neighborhood, like buttons on walls and so on.
static const HotSpotFlags kNeighborhoodSpotFlag = kShellSpotFlag << 1;
// kZoomInSpotFlag is a flag which marks all hot spots which indicate a zoom.
static const HotSpotFlags kZoomInSpotFlag = kNeighborhoodSpotFlag << 1;
// kZoomOutSpotFlag is a flag which marks all hot spots which indicate a zoom.
static const HotSpotFlags kZoomOutSpotFlag = kZoomInSpotFlag << 1;
static const HotSpotFlags kClickSpotFlag = kZoomOutSpotFlag << 1;
static const HotSpotFlags kPlayExtraSpotFlag = kClickSpotFlag << 1;
static const HotSpotFlags kPickUpItemSpotFlag = kPlayExtraSpotFlag << 1;
static const HotSpotFlags kDropItemSpotFlag = kPickUpItemSpotFlag << 1;
static const HotSpotFlags kOpenDoorSpotFlag = kDropItemSpotFlag << 1;
static const HotSpotFlags kZoomSpotFlags = kZoomInSpotFlag | kZoomOutSpotFlag;
static const HotSpotFlags kHighestGameShellSpotFlag = kOpenDoorSpotFlag;
/////////////////////////////////////////////
//
// Hot spots.
// Shell hot spots.
// The shell reserves all hot spot IDs from 0 to 999
static const HotSpotID kCurrentItemSpotID = 0;
static const HotSpotID kCurrentBiochipSpotID = kCurrentItemSpotID + 1;
static const HotSpotID kInventoryDropSpotID = kCurrentBiochipSpotID + 1;
static const HotSpotID kBiochipDropSpotID = kInventoryDropSpotID + 1;
static const HotSpotID kInfoReturnSpotID = kBiochipDropSpotID + 1;
static const HotSpotID kAIHint1SpotID = kInfoReturnSpotID + 1;
static const HotSpotID kAIHint2SpotID = kAIHint1SpotID + 1;
static const HotSpotID kAIHint3SpotID = kAIHint2SpotID + 1;
static const HotSpotID kAISolveSpotID = kAIHint3SpotID + 1;
static const HotSpotID kAIBriefingSpotID = kAISolveSpotID + 1;
static const HotSpotID kAIScanSpotID = kAIBriefingSpotID + 1;
static const HotSpotID kPegasusRecallSpotID = kAIScanSpotID + 1;
static const HotSpotID kAriesSpotID = kPegasusRecallSpotID + 1;
static const HotSpotID kMercurySpotID = kAriesSpotID + 1;
static const HotSpotID kPoseidonSpotID = kMercurySpotID + 1;
static const HotSpotID kAirMaskToggleSpotID = kPoseidonSpotID + 1;
static const HotSpotID kShuttleEnergySpotID = kAirMaskToggleSpotID + 1;
static const HotSpotID kShuttleGravitonSpotID = kShuttleEnergySpotID + 1;
static const HotSpotID kShuttleTractorSpotID = kShuttleGravitonSpotID + 1;
static const HotSpotID kShuttleViewSpotID = kShuttleTractorSpotID + 1;
static const HotSpotID kShuttleTransportSpotID = kShuttleViewSpotID + 1;
// Most of these are obsolete:
// kInventoryDropSpotFlag is a flag which marks hot spots which are valid drop spots
// for inventory items.
// static const HotSpotFlags kInventoryDropSpotFlag = kHighestGameShellSpotFlag << 1;
// kBiochipDropSpotFlag is a flag which marks hot spots which are valid drop spots
// for biochips.
// static const HotSpotFlags kBiochipDropSpotFlag = kInventoryDropSpotFlag << 1;
// kInventorySpotFlag is a flag which marks hot spots which indicate inventory items
// in the environment.
// static const HotSpotFlags kInventorySpotFlag = kBiochipDropSpotFlag << 1;
// kBiochipSpotFlag is a flag which marks hot spots which indicate biochips
// in the environment.
static const HotSpotFlags kPickUpBiochipSpotFlag = kHighestGameShellSpotFlag << 1;
static const HotSpotFlags kDropBiochipSpotFlag = kPickUpBiochipSpotFlag << 1;
static const HotSpotFlags kInfoReturnSpotFlag = kDropBiochipSpotFlag << 1;
// Biochip and inventory hot spot flags...
static const HotSpotFlags kAIBiochipSpotFlag = kInfoReturnSpotFlag << 1;
static const HotSpotFlags kPegasusBiochipSpotFlag = kAIBiochipSpotFlag << 1;
static const HotSpotFlags kOpticalBiochipSpotFlag = kPegasusBiochipSpotFlag << 1;
static const HotSpotFlags kAirMaskSpotFlag = kOpticalBiochipSpotFlag << 1;
static const HotSpotFlags kJMPClickingSpotFlags = kClickSpotFlag |
kPlayExtraSpotFlag |
kOpenDoorSpotFlag |
kInfoReturnSpotFlag |
kAIBiochipSpotFlag |
kPegasusBiochipSpotFlag |
kOpticalBiochipSpotFlag |
kAirMaskSpotFlag;
static const int32 kMainMenuID = 1;
static const int32 kPauseMenuID = 2;
static const int32 kCreditsMenuID = 3;
static const int32 kDeathMenuID = 4;
/////////////////////////////////////////////
//
// Menu commands.
static const GameMenuCommand kMenuCmdOverview = kMenuCmdNoCommand + 1;
static const GameMenuCommand kMenuCmdStartAdventure = kMenuCmdOverview + 1;
static const GameMenuCommand kMenuCmdStartWalkthrough = kMenuCmdStartAdventure + 1;
static const GameMenuCommand kMenuCmdRestore = kMenuCmdStartWalkthrough + 1;
static const GameMenuCommand kMenuCmdCredits = kMenuCmdRestore + 1;
static const GameMenuCommand kMenuCmdQuit = kMenuCmdCredits + 1;
static const GameMenuCommand kMenuCmdDeathContinue = kMenuCmdQuit + 1;
static const GameMenuCommand kMenuCmdDeathQuitDemo = kMenuCmdDeathContinue + 1;
static const GameMenuCommand kMenuCmdDeathMainMenuDemo = kMenuCmdDeathQuitDemo + 1;
static const GameMenuCommand kMenuCmdDeathRestore = kMenuCmdDeathMainMenuDemo + 1;
static const GameMenuCommand kMenuCmdDeathMainMenu = kMenuCmdDeathRestore + 1;
static const GameMenuCommand kMenuCmdPauseSave = kMenuCmdDeathMainMenu + 1;
static const GameMenuCommand kMenuCmdPauseContinue = kMenuCmdPauseSave + 1;
static const GameMenuCommand kMenuCmdPauseRestore = kMenuCmdPauseContinue + 1;
static const GameMenuCommand kMenuCmdPauseQuit = kMenuCmdPauseRestore + 1;
static const GameMenuCommand kMenuCmdCreditsMainMenu = kMenuCmdPauseQuit + 1;
static const GameMenuCommand kMenuCmdCancelRestart = kMenuCmdCreditsMainMenu + 1;
static const GameMenuCommand kMenuCmdEjectRestart = kMenuCmdCancelRestart + 1;
static const TimeValue kMenuButtonHiliteTime = 20;
static const TimeScale kMenuButtonHiliteScale = kSixtyTicksPerSecond;
// PICT resources:
// Warning light PICTs:
static const ResIDType kLightOffID = 128;
static const ResIDType kLightYellowID = 129;
static const ResIDType kLightOrangeID = 130;
static const ResIDType kLightRedID = 131;
// Date PICTs:
static const ResIDType kDatePrehistoricID = 138;
static const ResIDType kDate2112ID = 139;
static const ResIDType kDate2185ID = 140;
static const ResIDType kDate2310ID = 141;
static const ResIDType kDate2318ID = 142;
/////////////////////////////////////////////
//
// Display Order
static const DisplayOrder kCroppedMovieLayer = 11000;
static const DisplayOrder kMonitorLayer = 12000;
static const DisplayOrder kDragSpriteLayer = 15000;
static const DisplayOrder kDragSpriteOrder = kDragSpriteLayer;
static const DisplayOrder kInterfaceLayer = 20000;
static const DisplayOrder kBackground1Order = kInterfaceLayer;
static const DisplayOrder kBackground2Order = kBackground1Order + 1;
static const DisplayOrder kBackground3Order = kBackground2Order + 1;
static const DisplayOrder kBackground4Order = kBackground3Order + 1;
static const DisplayOrder kDateOrder = kBackground4Order + 1;
static const DisplayOrder kCompassOrder = kDateOrder + 1;
static const DisplayOrder kEnergyBarOrder = kCompassOrder + 1;
static const DisplayOrder kEnergyLightOrder = kEnergyBarOrder + 1;
static const DisplayOrder kAILayer = 22000;
static const DisplayOrder kAILeftAreaOrder = kAILayer;
static const DisplayOrder kAIMiddleAreaOrder = kAILeftAreaOrder + 1;
static const DisplayOrder kAIRightAreaOrder = kAIMiddleAreaOrder + 1;
static const DisplayOrder kAIMovieOrder = kAIRightAreaOrder + 1;
static const DisplayOrder kHilitesLayer = 23000;
static const DisplayOrder kInventoryHiliteOrder = kHilitesLayer;
static const DisplayOrder kBiochipHiliteOrder = kInventoryHiliteOrder + 1;
static const DisplayOrder kPanelsLayer = 25000;
static const DisplayOrder kInventoryPushOrder = kPanelsLayer;
static const DisplayOrder kInventoryLidOrder = kInventoryPushOrder + 1;
static const DisplayOrder kBiochipPushOrder = kInventoryLidOrder + 1;
static const DisplayOrder kBiochipLidOrder = kBiochipPushOrder + 1;
static const DisplayOrder kFinalMessageOrder = kBiochipLidOrder + 1;
static const DisplayOrder kInfoLayer = 26000;
static const DisplayOrder kInfoBackgroundOrder = kInfoLayer;
static const DisplayOrder kInfoSpinOrder = kInfoBackgroundOrder + 1;
static const DisplayOrder kScreenDimmerOrder = 30000;
static const DisplayOrder kPauseScreenLayer = 31000;
static const DisplayOrder kPauseMenuOrder = kPauseScreenLayer;
static const DisplayOrder kSaveGameOrder = kPauseMenuOrder + 1;
static const DisplayOrder kContinueOrder = kSaveGameOrder + 1;
static const DisplayOrder kRestoreOrder = kContinueOrder + 1;
static const DisplayOrder kSoundFXOrder = kRestoreOrder + 1;
static const DisplayOrder kAmbienceOrder = kSoundFXOrder + 1;
static const DisplayOrder kWalkthruOrder = kAmbienceOrder + 1;
static const DisplayOrder kQuitToMainMenuOrder = kWalkthruOrder + 1;
static const DisplayOrder kPauseLargeHiliteOrder = kQuitToMainMenuOrder + 1;
static const DisplayOrder kPauseSmallHiliteOrder = kPauseLargeHiliteOrder + 1;
/////////////////////////////////////////////
//
// Death reasons.
enum {
// Caldoria
kDeathUncreatedInCaldoria = 1,
kDeathCardBomb,
kDeathShotBySinclair,
kDeathSinclairShotDelegate,
kDeathNuclearExplosion,
// TSA
kDeathUncreatedInTSA,
kDeathShotByTSARobots,
// Prehistoric
kDeathFallOffCliff,
kDeathEatenByDinosaur,
kDeathStranded,
// Norad
kDeathGassedInNorad,
kDeathArrestedInNorad,
kDeathWokeUpNorad,
kDeathSubDestroyed, // Unused
kDeathRobotThroughNoradDoor,
kDeathRobotSubControlRoom,
// Mars
kDeathWrongShuttleLock,
kDeathArrestedInMars,
kDeathRunOverByPod,
kDeathDidntGetOutOfWay,
kDeathReactorBurn,
kDeathDidntFindMarsBomb,
kDeathDidntDisarmMarsBomb,
kDeathNoMaskInMaze,
kDeathNoAirInMaze,
kDeathGroundByMazebot,
kDeathMissedOreBucket,
kDeathDidntLeaveBucket,
kDeathRanIntoCanyonWall, // Unused
kDeathRanIntoSpaceJunk,
// WSC
kDeathDidntStopPoison,
kDeathArrestedInWSC,
kDeathHitByPlasma,
kDeathShotOnCatwalk,
// Winning
kPlayerWonGame
};
static const CoordType kAILeftAreaLeft = 76;
static const CoordType kAILeftAreaTop = 334;
static const CoordType kAILeftAreaWidth = 96;
static const CoordType kAILeftAreaHeight = 96;
static const CoordType kAIMiddleAreaLeft = 172;
static const CoordType kAIMiddleAreaTop = 334;
static const CoordType kAIMiddleAreaWidth = 192;
static const CoordType kAIMiddleAreaHeight = 96;
static const CoordType kAIRightAreaLeft = 364;
static const CoordType kAIRightAreaTop = 334;
static const CoordType kAIRightAreaWidth = 96;
static const CoordType kAIRightAreaHeight = 96;
enum {
kTSAPlayerNotArrived, // initial state, must be zero
kTSAPlayerForcedReview, // Player must watch TBP before rip occurs.
kTSAPlayerDetectedRip, // Player finished TBP, rip alarm just went off.
kTSAPlayerNeedsHistoricalLog, // Player is instructed to get historical log
kTSAPlayerGotHistoricalLog,
kTSAPlayerInstalledHistoricalLog,
kTSABossSawHistoricalLog,
kRobotsAtCommandCenter,
kRobotsAtFrontDoor,
kRobotsAtReadyRoom,
kPlayerLockedInPegasus,
kPlayerOnWayToPrehistoric,
kPlayerWentToPrehistoric,
kPlayerOnWayToNorad,
kPlayerOnWayToMars,
kPlayerOnWayToWSC,
kPlayerFinishedWithTSA
};
/////////////////////////////////////////////
//
// Mode static constants.
static const GameMode kModeInventoryPick = kLastGameShellMode + 1;
static const GameMode kModeBiochipPick = kModeInventoryPick + 1;
static const GameMode kModeInfoScreen = kModeBiochipPick + 1;
} // End of namespace Pegasus
#endif
|