ScummVM API documentation
defs.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 #include "cryo/cryolib.h"
23 
24 #ifndef CRYO_DEFS_H
25 #define CRYO_DEFS_H
26 
27 namespace Cryo {
28 
29 #define getElem(array, idx) \
30  ( (char *)(array) + READ_LE_UINT16((idx) * 2 + (char *)(array)) )
31 
33 
34 #define FONT_HEIGHT 9
35 
36 /*
37 Glossary
38  room - a single game world's screen. referenced by 16-bit number 0xAALL, where AA - area# and LL - location#
39  area - geographic area - Mo, Chamaar, etc
40  location - coordinates of particular room in an area. usually in form of 0xXY, where X - map row, Y - map column
41  character - an unique character (human or dino.) Has their own voice/dialog lines
42  person - instance of a character. Usually tied to specific room, but some may travel with you
43  party - a group of characters that travel with you
44  object - inventory item
45  icon - clickable rectangle with some action tied to it
46  dialog - a set of of dialog lines for character. further divided by categories and each entry may have associated
47  condition to be validated
48  global - game-wide storage area. must be preserved when saving/loading
49  phase - current story progress. Incremented by 1 for minor events, by 0x10 for major advancements
50 */
51 
52 enum Phases {
53  phNewGame = 0
54 };
55 
56 namespace Areas {
57 enum Areas {
58  arMo = 1,
59  arTausCave,
60  arChamaar,
61  arUluru,
62  arKoto,
63  arTamara,
64  arCantura,
65  arShandovra,
66  arNarimsCave,
67  arEmbalmersCave,
68  arWhiteArch,
69  arMoorkusLair
70 };
71 }
72 
73 #define MKRM(a,l) (((a) << 8) | (l))
74 
75 enum OBJECT {
76  OBJ_0,
77  OBJ_1,
78  OBJ_2,
79  OBJ_3,
80  OBJ_4,
81  OBJ_PRISME, // 5
82  OBJ_6,
83  OBJ_7,
84  OBJ_OEUF, // 8
85  OBJ_9,
86  OBJ_10,
87  OBJ_CHAMPB, // 11
88  OBJ_CHAMPM, // 12
89  OBJ_COUTEAU, // 13
90  OBJ_NIDV, // 14
91  OBJ_NIDO, // 15
92  OBJ_OR, // 16
93  OBJ_17,
94  OBJ_18,
95  OBJ_SOLEIL, // 19
96  OBJ_CORNE, // 20
97  OBJ_21,
98  OBJ_22,
99  OBJ_23,
100  OBJ_24,
101  OBJ_25,
102  OBJ_26,
103  OBJ_27,
104  OBJ_28,
105  OBJ_29,
106  OBJ_30,
107  OBJ_31,
108  OBJ_32,
109  OBJ_33,
110  OBJ_34,
111  OBJ_35,
112  OBJ_36, // 36 is 1st plaque, 6 total
113  OBJ_37,
114  OBJ_PLAQUE, // 38
115  OBJ_39,
116  OBJ_40,
117  OBJ_41
118 };
119 
120 namespace Objects {
121 enum Objects {
122  obNone,
123  obWayStone,
124  obShell,
125  obTalisman,
126  obTooth,
127  obPrism, // 5
128  obFlute,
129  obApple,
130  obEgg, // 8
131  obRoot,
132  obUnused10,
133  obShroom, // 11
134  obBadShroom, // 12
135  obKnife, // 13
136  obNest, // 14
137  obFullNest, // 15
138  obGold, // 16
139  obMoonStone,
140  obBag,
141  obSunStone, // 19
142  obHorn, // 20
143  obSword,
144 
145  obMaskOfDeath,
146  obMaskOfBonding,
147  obMaskOfBirth,
148 
149  obEyeInTheStorm, // 25
150  obSkyHammer,
151  obFireInTheClouds,
152  obWithinAndWithout,
153  obEyeInTheCyclone,
154  obRiverThatWinds,
155 
156  obTrumpet, // 31
157  obUnused32,
158  obDrum,
159  obUnused34,
160  obUnused35,
161  obRing,
162 
163  obTablet1, // 37 is 1st plaque, 6 total
164  obTablet2,
165  obTablet3, // 39
166  obTablet4,
167  obTablet5,
168  obTablet6
169 };
170 }
171 
172 enum PERSO {
173  PER_KING = 0,
174  PER_DINA, // 0x12
175  PER_TAU, // 0x24
176  PER_MONK, // 0x36
177  PER_JABBER, // 0x48
178  PER_ELOI, // 0x5A
179  PER_MUNGO, // 0x6C
180  PER_EVE, // 0x7E
181  PER_SHAZIA, // 0x90
182  PER_MAMMI, // 0xA2
183  PER_MAMMI_1, // 0xB4
184  PER_MAMMI_2, // 0xC6
185  PER_MAMMI_3, // 0xD8
186  PER_MAMMI_4, // 0xEA
187  PER_MAMMI_5, // 0xFC
188  PER_MAMMI_6, // 0x10E
189  PER_BAMBOO, // 0x120
190  PER_KABUKA, // 0x132
191  PER_GUARDS, // 0x144
192  PER_UNKN_156, // 0x156
193  PER_FISHER, // 0x168
194  PER_MORKUS, // 0x17A
195  PER_UNKN_18C, // 0x18C
196  PER_UNKN_19E, // 0x19E
197  PER_UNKN_1B0, // 0x1B0
198  PER_UNKN_1C2, // 0x1C2
199  PER_UNKN_1D4, // 0x1D4
200  PER_UNKN_1E6, // 0x1E6
201  PER_UNKN_1F8, // 0x1F8
202  PER_UNKN_20A, // 0x20A
203  PER_UNKN_21C, // 0x21C
204  PER_UNKN_22E, // 0x22E
205  PER_UNKN_240, // 0x240
206  PER_UNKN_252, // 0x252
207  PER_UNKN_264, // 0x264
208  PER_UNKN_276, // 0x276
209  PER_UNKN_288, // 0x288
210  PER_UNKN_29A, // 0x29A
211  PER_UNKN_2AC, // 0x2AC
212  PER_UNKN_2BE, // 0x2BE
213  PER_UNKN_2D0, // 0x2D0
214  PER_UNKN_2E2, // 0x2E2
215  PER_UNKN_2F4, // 0x2F4
216  PER_UNKN_306, // 0x306
217  PER_UNKN_318, // 0x318
218  PER_UNKN_32A, // 0x32A
219  PER_UNKN_33C, // 0x33C
220  PER_UNKN_34E, // 0x34E
221  PER_UNKN_360, // 0x360
222  PER_UNKN_372, // 0x372
223  PER_UNKN_384, // 0x384
224  PER_UNKN_396, // 0x396
225  PER_UNKN_3A8, // 0x3A8
226  PER_UNKN_3BA, // 0x3BA
227  PER_UNKN_3CC, // 0x3CC
228  PER_UNKN_3DE, // 0x3DE
229  PER_UNKN_3F0, // 0x3F0
230  PER_UNKN_402 // 0x402
231 };
232 
233 namespace PersonId {
234 enum PersonId {
235  pidGregor = 0, // The King
236  pidDina, // Pink dino
237  pidTau, // Late grandpa
238  pidMonk, // Old wizard
239  pidJabber, // Executioner
240  pidEloi, // Evergreen ptero
241  pidMungo, // Dina's husband
242  pidEve, // Blonde girl
243  pidShazia, // Big boobs sis
244  pidLeadersBegin, // 9
245  pidChongOfChamaar = pidLeadersBegin, // Dogface
246  pidKommalaOfKoto, // Clones
247  pidUlanOfUlele, // Shaman
248  pidCabukaOfCantura, // Stone people
249  pidMarindaOfEmbalmers, // Gods
250  pidFuggOfTamara, // Boar-like
251  pidThugg, // Bodyguard
252  pidNarrator, // 16, Old Eloi, also BGM
253  pidNarrim, // Sea snake
254  pidMorkus, // Vicious tyran
255  pidDinosaur, // different species of friendly dino
256  pidEnemy // different species of enemy dino
257 };
258 }
259 
260 // person in room mask bits
261 namespace PersonMask {
262 enum PersonMask {
263  pmGregor = 1,
264  pmDina = 2,
265  pmTau = 4,
266  pmMonk = 8,
267  pmJabber = 0x10,
268  pmEloi = 0x20,
269  pmMungo = 0x40,
270  pmEve = 0x80,
271  pmShazia = 0x100,
272  pmLeader = 0x200, // valley tribe leader
273  pmThugg = 0x400,
274  pmQuest = 0x800, // special quest person
275  pmDino = 0x1000,
276  pmEnemy = 0x2000,
277  pmMorkus = 0x4000
278 };
279 }
280 
281 namespace PersonFlags {
282 enum PersonFlags {
283  pfType0 = 0,
284  pftTyrann,
285  pfType2,
286  pfType3,
287  pfType4,
288  pfType5,
289  pfType6,
290  pfType7,
291  pfType8,
292  pftMosasaurus,
293  pftTriceraptor,
294  pftVelociraptor,
295  pfType12,
296  pfType13,
297  pfType14,
298  pfType15,
299  pfTypeMask = 0xF,
300  pf10 = 0x10,
301  pf20 = 0x20,
302  pfInParty = 0x40,
303  pf80 = 0x80
304 };
305 }
306 
307 #include "common/pack-start.h"
308 
309 struct perso_t {
310  uint16 _roomNum; // room this person currently in
311  uint16 _actionId; // TODO: checkme
312  uint16 _partyMask; // party bit mask
313  byte _id; // character
314  byte _flags; // flags and kind
315  byte _roomBankId;// index in _personRoomBankTable for specific room banks
316  byte _spriteBank; // sprite bank
317  uint16 _items; // inventory
318  uint16 _powers; // obj of power bitmask
319  byte _targetLoc; // For party member this is mini sprite index
320  byte _lastLoc; // For party member this is mini sprite x offset
321  byte _speed; // num ticks per step
322  byte _steps; // current ticks
323 
324  void clear() {
325  _roomNum = _actionId = _partyMask = 0;
326  _id = _flags = _roomBankId = _spriteBank = 0;
327  _items = _powers = 0;
328  _targetLoc = _lastLoc = _speed = _steps = 0;
329  }
330 };
331 
332 namespace ObjectFlags {
333 enum ObjectFlags {
334  ofFlag1 = 1,
335  ofInHands = 2 // Currently holding this object in hands
336 };
337 }
338 
339 #define MAX_OBJECTS 42
340 struct object_t {
341  byte _id;
342  byte _flags;
343  int _locations; // index in _objectLocations
344  uint16 _itemMask;
345  uint16 _powerMask; // object of power bitmask
346  int16 _count;
347 
348  void clear() {
349  _id = _flags = 0;
350  _locations = 0;
351  _itemMask = _powerMask = 0;
352  _count = 0;
353  }
354 };
355 
356 namespace DialogFlags {
357 enum DialogFlags {
358  df20 = 0x20,
359  dfRepeatable = 0x40,
360  dfSpoken = 0x80
361 };
362 }
363 
364 namespace DialogType {
365 enum DialogType {
366  dtTalk = 0,
367  dtDinoAction,
368  dtDinoItem,
369  dtItem,
370  dtEvent,
371  dtInspect,
372  dtHint
373 };
374 }
375 
376 struct Dialog {
377  int8 _flags; // 0-3 - action index, 4 - highest bit of contidion index, rest is DialogFlags
378  int8 _condNumLow; // condition index low bits
379  int8 _textCondHiMask; // 0-1 text index hi bits, 2-5 - perso mask num, 6-7 condition index hi bits
380  int8 _textNumLow; // text line index low bits
381 };
382 
383 struct tape_t {
384  int16 _textNum;
385  perso_t *_perso;
386  int16 _party;
387  int16 _roomNum;
388  int16 _backgroundBankNum;
389  Dialog *_dialog;
390 };
391 
392 struct Follower { // Characters on Mirror screen
393  int8 _id; // character
394  int8 _spriteNum; // sprite number
395  int16 sx;
396  int16 sy;
397  int16 ex;
398  int16 ey;
399  int16 _spriteBank;
400  int16 ff_C;
401  int16 ff_E;
402 };
403 
404 struct Icon {
405  int16 sx;
406  int16 sy;
407  int16 ex;
408  int16 ey;
409  uint16 _cursorId; // & 0x8000 - inactive/hidden
410  uint32 _actionId;
411  uint32 _objectId;
412 };
413 
414 struct Goto {
415  byte _areaNum; // target area
416  byte _curAreaNum; // current area
417  byte _enterVideoNum;
418  byte _travelTime; // time to skip while in travel
419  byte _arriveVideoNum;
420 };
421 
422 namespace RoomFlags {
423 enum RoomFlags {
424  rf01 = 1,
425  rf02 = 2,
426  rf04 = 4,
427  rf08 = 8,
428  rfPanable = 0x10,
429  rfHasCitadel = 0x20,
430  rf40 = 0x40,
431  rf80 = 0x80
432 };
433 }
434 
435 struct Room {
436  byte _id;
437  byte _exits[4]; //TODO: signed?
438  byte _flags;
439  uint16 _bank;
440  uint16 _party;
441  byte _level; // Citadel level
442  byte _video;
443  byte _location;
444  byte _backgroundBankNum; // bg/mirror image number (relative)
445 };
446 
447 namespace AreaFlags {
448 enum AreaFlags {
449  afFlag1 = 1,
450  afFlag2 = 2,
451  afFlag4 = 4,
452  afFlag8 = 8,
453  afGaveGold = 0x10,
454  afFlag20 = 0x20,
455 
456  HasTriceraptors = 0x100,
457  HasVelociraptors = 0x200,
458  HasTyrann = 0x400,
459 
460  TyrannSighted = 0x4000,
461  afFlag8000 = 0x8000
462 };
463 }
464 
465 namespace AreaType {
466 enum AreaType {
467  atCitadel = 1,
468  atValley = 2,
469  atCave = 3
470 };
471 }
472 
473 struct Area {
474  byte _num;
475  byte _type;
476  uint16 _flags;
477  uint16 _firstRoomIdx;
478  byte _citadelLevel;
479  byte _placeNum;
480  Room *_citadelRoomPtr;
481  int16 _visitCount;
482 
483  void clear() {
484  _num = _type = 0;
485  _flags = _firstRoomIdx = 0;
486  _citadelLevel = _placeNum = 0;
487  _citadelRoomPtr = nullptr;
488  _visitCount = 0;
489  }
490 };
491 
492 namespace ValleyNews {
493 enum ValleyNews {
494  vnAreaMask = 0xF,
495 
496  vnTriceraptorsIn = 0x10,
497  vnVelociraptorsIn = 0x20,
498  vnTyrannIn = 0x30,
499  vnTyrannLost = 0x40,
500  vnCitadelLost = 0x50,
501  vnVelociraptorsLost = 0x60,
502 
503  vnFree = 0,
504  vnHidden = 0x80,
505  vnEnd = 0xFF
506 };
507 }
508 
509 namespace DisplayFlags {
510 enum DisplayFlags {
511  dfFlag1 = 1,
512  dfFlag2 = 2,
513  dfMirror = 4,
514  dfPerson = 8,
515  dfFrescoes = 0x10,
516  dfPanable = 0x20,
517  dfFlag40 = 0x40,
518  dfFlag80 = 0x80
519 };
520 }
521 
522 namespace DrawFlags {
523 enum DrawFlags {
524  drDrawInventory = 1,
525  drDrawFlag2 = 2,
526  drDrawTopScreen = 4,
527  drDrawFlag8 = 8,
528  drDrawMenu = 0x10,
529  drDrawFlag20 = 0x20
530 };
531 }
532 
533 namespace MenuFlags {
534 enum MenuFlags {
535  mfFlag1 = 1,
536  mfFlag2 = 2,
537  mfFlag4 = 4,
538  mfFlag8 = 8,
539  mfFlag10 = 0x10
540 };
541 }
542 
543 namespace MusicType {
544 enum MusicType { //TODO: same as DialogType?
545  mtDontChange = 0,
546  mtNormal = 1,
547  mt2 = 2,
548  mtEvent = 4,
549  mtFF = 0xFF
550 };
551 }
552 
553 namespace EventType {
554 enum EventType {
555  etEvent1 = 1,
556  etEvent2 = 2,
557  etEvent3 = 3,
558  etEvent4 = 4,
559  etEvent5 = 5,
560  etEvent6 = 6,
561  etEvent7 = 7,
562  etEvent8 = 8,
563  etEvent9 = 9,
564  etEventB = 11,
565  etEventC = 12,
566  etEventD = 13,
567  etEventE = 14,
568  etEventF = 15,
569  etEvent10 = 16,
570  etEvent12 = 18,
571  etGotoArea = 0x80 // + area id
572 };
573 }
574 
575 namespace GameFlags {
576 enum GameFlags {
577  gfNone = 0,
578  gfMummyOpened = 1,
579  gfFlag2 = 2,
580  gfFlag4 = 4,
581  gfFlag8 = 8,
582  gfFlag10 = 0x10,
583  gfFlag20 = 0x20,
584  gfFlag40 = 0x40,
585  gfFlag80 = 0x80,
586  gfFlag100 = 0x100,
587  gfFlag200 = 0x200,
588  gfFlag400 = 0x400,
589  gfPrismAndMonk = 0x800,
590  gfFlag1000 = 0x1000,
591  gfFlag2000 = 0x2000,
592  gfFlag4000 = 0x4000,
593  gfFlag8000 = 0x8000
594 };
595 }
596 
597 struct global_t {
598  byte _areaNum;
599  byte _areaVisitCount;
600  byte _menuItemIdLo;
601  byte _menuItemIdHi; //TODO: pad?
602  uint16 _randomNumber; //TODO: this is randomized in pc ver and used by some conds. always zero on mac
603  uint16 _gameTime;
604  uint16 _gameDays;
605  uint16 _chrono;
606  uint16 _eloiDepartureDay;
607  uint16 _roomNum; // current room number
608  uint16 _newRoomNum; // target room number selected on world map
609  uint16 _phaseNum;
610  uint16 _metPersonsMask1;
611  uint16 _party;
612  uint16 _partyOutside;
613  uint16 _metPersonsMask2;
614  uint16 _var1C; //TODO: write-only?
615  uint16 _phaseActionsCount;
616  uint16 _curAreaFlags;
617  uint16 _curItemsMask;
618  uint16 _curPowersMask;
619  uint16 _curPersoItems;
620  uint16 _curCharacterPowers;
621  uint16 _wonItemsMask;
622  uint16 _wonPowersMask;
623  uint16 _stepsToFindAppleFast;
624  uint16 _stepsToFindAppleNormal;
625  uint16 _roomPersoItems; //TODO: write-only?
626  uint16 _roomCharacterPowers; //TODO: write-only?
627  uint16 _gameFlags;
628  uint16 _curVideoNum;
629  uint16 _morkusSpyVideoNum1; //TODO: pad?
630  uint16 _morkusSpyVideoNum2; //TODO: pad?
631  uint16 _morkusSpyVideoNum3; //TODO: pad?
632  uint16 _morkusSpyVideoNum4; //TODO: pad?
633  byte _newMusicType;
634  byte _var43;
635  byte _videoSubtitleIndex;
636  byte _partyInstruments; // &1 - Bell for Monk, &2 - Drum for Thugg
637  byte _monkGotRing;
638  byte _chronoFlag;
639  byte _curRoomFlags;
640  byte _endGameFlag;
641  byte _lastInfo;
642  bool _autoDialog;
643  byte _worldTyranSighted;
644  byte _var4D;
645  byte _var4E;
646  byte _worldGaveGold;
647  byte _worldHasTriceraptors;
648  byte _worldHasVelociraptors;
649  byte _worldHasTyran;
650  byte _var53;
651  byte _var54; //CHEKME: Used?
652  byte _var55; //TODO: pad?
653  byte _gameHours;
654  byte _textToken1;
655  byte _textToken2; //TODO: pad?
656  byte _eloiHaveNews;
657  byte _dialogFlags;
658  byte _curAreaType;
659  byte _curCitadelLevel;
660  byte _newLocation;
661  byte _prevLocation;
662  byte _curPersoFlags;
663  byte _var60;
664  byte _eventType;
665  byte _var62; //TODO: pad?
666  byte _curObjectId;
667  byte _curObjectFlags;
668  byte _var65; //TODO: pad?
669  byte _roomCharacterType;
670  byte _roomCharacterFlags;
671  byte _narratorSequence;
672  byte _var69;
673  byte _var6A;
674  byte _frescoNumber;
675  byte _var6C; //TODO: pad?
676  byte _var6D; //TODO: pad?
677  byte _labyrinthDirections;
678  byte _labyrinthRoom;
679  Dialog *_dialogPtr;
680  tape_t *_tapePtr;
681  Dialog *_nextDialogPtr;
682  Dialog *_narratorDialogPtr;
683  Dialog *_lastDialogPtr;
684  Icon *_nextRoomIcon;
685  byte *_sentenceBufferPtr;
686  Room *_roomPtr;
687  Area *_areaPtr;
688  Area *_lastAreaPtr;
689  Area *_curAreaPtr;
690  Room *_citaAreaFirstRoom;
691  perso_t *_characterPtr;
692  perso_t *_roomCharacterPtr;
693  byte _lastInfoIdx;
694  byte _nextInfoIdx;
695  byte *_persoSpritePtr;
696  byte *_persoSpritePtr2;
697  byte *_curCharacterAnimPtr;
698  byte *_varC2; //TODO: image desc arr
699  int16 _iconsIndex;
700  int16 _curObjectCursor; // TODO: useless?
701  int16 _varCA;
702  int16 _varCC; //TODO: unused/pad
703  int16 _characterImageBank; //TODO: unsigned?
704  uint16 _roomImgBank;
705  uint16 _characterBackgroundBankIdx;
706  uint16 _varD4; //TODO: unsigned?
707  uint16 _frescoeWidth;
708  uint16 _frescoeImgBank;
709  uint16 _varDA; //TODO: pad?
710  uint16 _varDC; //TODO: pad?
711  uint16 _roomBaseX;
712  uint16 _varE0; //TODO: pad?
713  uint16 _dialogType;
714  uint16 _varE4; //TODO: pad?
715  uint16 _currMusicNum;
716  int16 _textNum;
717  uint16 _travelTime;
718  uint16 _varEC; //TODO: pad?
719  byte _displayFlags;
720  byte _oldDisplayFlags;
721  byte _drawFlags;
722  byte _varF1;
723  byte _varF2;
724  byte _menuFlags;
725  byte _varF4; //TODO: write-only?
726  byte _varF5;
727  byte _varF6;
728  byte _varF7;
729  byte _varF8; //TODO: pad?
730  byte _varF9; //TODO: pad?
731  byte _varFA; //TODO: pad?
732  byte _animationFlags;
733  byte _giveObj1;
734  byte _giveObj2;
735  byte _giveObj3;
736  byte _var100;
737  byte _roomVidNum;
738  byte _mirrorEffect;
739  byte _var103;
740  byte _roomBackgroundBankNum;
741  byte _valleyVidNum;
742  byte _updatePaletteFlag;
743  byte _inventoryScrollPos;
744  byte _objCount;
745  byte _textBankIndex;
746  byte _prefLanguage;
747  byte _prefMusicVol[2];
748  byte _prefVoiceVol[2];
749  byte _prefSoundVolume[2];
750  byte _citadelAreaNum;
751  byte _var113;
752  byte _lastPlaceNum;
753  byte _saveEnd; // TODO: This has to be removed
754  int16 _textWidthLimit;
755  byte _numGiveObjs;
756  byte _var119; // unused
757 };
758 
759 #include "common/pack-end.h"
760 
762  Common::String _name; //[16];
763  int32 _size;
764  int32 _offs;
765  char _flag;
766 };
767 
769 public:
770  PakHeaderNode(int count);
771  ~PakHeaderNode();
772 
773  uint16 _count;
774  PakHeaderItem* _files;
775 };
776 
777 struct Citadel {
778  int16 _id;
779  int16 _bank[8];
780  int16 _video[8];
781 
782  void clear() {
783  _id = 0;
784  for (int i = 0; i < 8; ++i) {
785  _bank[i] = 0;
786  _video[i] = 0;
787  }
788  }
789 };
790 
791 /*
792  Labyrinth of Mo
793 
794  | | | | | | | |
795 
796 */
797 
798 enum {
799  LAB_N = 1,
800  LAB_E,
801  LAB_S,
802  LAB_W
803 };
804 
805 struct CubeFace {
806  int tri;
807  char ff_4;
808  char ff_5;
809 
810  byte *_texturePtr;
811  uint16 *_indices;
812  int16 *_uv;
813 };
814 
815 struct Point3D {
816  int16 x;
817  int16 y;
818  int16 z;
819 };
820 
821 struct Cube {
822  int _num;
823  CubeFace **_faces;
824  Point3D *_projection; // projected XYZ coords
825  Point3D *_vertices;
826 };
827 
828 struct XYZ {
829  signed short x, y, z;
830 };
831 
832 struct CubeCursor {
833  uint8 _sides[6]; // spr idx for each side
834  uint8 _kind;
835  int8 _speed;
836 };
837 
838 } // End of namespace Cryo
839 
840 #endif
Definition: defs.h:777
Definition: defs.h:805
Definition: defs.h:828
Definition: str.h:59
Definition: defs.h:832
EventType
Definition: events.h:48
Definition: defs.h:383
MusicType
Definition: mididrv.h:44
Definition: defs.h:597
Definition: defs.h:404
Definition: defs.h:414
Definition: defs.h:392
Definition: defs.h:815
Definition: defs.h:761
Definition: defs.h:340
Definition: defs.h:309
Definition: defs.h:821
Definition: defs.h:435
Definition: defs.h:376
Definition: defs.h:768
Definition: cryo.h:41
Definition: defs.h:473