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
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
|
/* 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.
*
* 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.
*
*/
#include "cryo/cryolib.h"
#ifndef CRYO_DEFS_H
#define CRYO_DEFS_H
namespace Cryo {
#define getElem(array, idx) \
( (char *)(array) + PLE16((idx) * 2 + (char *)(array)) )
/*
static inline void* AGetElem(byte *arr, int16 index)
{
byte *p = arr + num * 2;
byte o0 = *p++;
byte o1 = *p++;
uint16 ofs = (o1 << 8) | o0;
return arr + ofs;
}
*/
///////////////// Game defs
#define FONT_HEIGHT 9
/*
Glossary
room - a single game world's screen. referenced by 16-bit number 0xAALL, where AA - area# and LL - location#
area - geographic area - Mo, Chamaar, etc
location - coordinates of particular room in an area. usually in form of 0xXY, where X - map row, Y - map column
character - an unique character (human or dino.) Has their own voice/dialog lines
person - instance of a character. Usually tied to specific room, but some may travel with you
party - a group of characters that travel with you
object - inventory item
icon - clickable rectangle with some action tied to it
dialog - a set of of dialog lines for character. further divided by categories and each entry may have associated
condition to be validated
global - game-wide storage area. must be preserved when saving/loading
phase - current story progress. Incremented by 1 for minor events, by 0x10 for major advancements
*/
enum Phases {
phNewGame = 0
};
namespace Areas {
enum Areas {
arMo = 1,
arTausCave,
arChamaar,
arUluru,
arKoto,
arTamara,
arCantura,
arShandovra,
arNarimsCave,
arEmbalmersCave,
arWhiteArch,
arMoorkusLair
};
}
#define MKRM(a,l) (((a) << 8) | (l))
enum OBJECT {
OBJ_0,
OBJ_1,
OBJ_2,
OBJ_3,
OBJ_4,
OBJ_PRISME, // 5
OBJ_6,
OBJ_7,
OBJ_OEUF, // 8
OBJ_9,
OBJ_10,
OBJ_CHAMPB, // 11
OBJ_CHAMPM, // 12
OBJ_COUTEAU, // 13
OBJ_NIDV, // 14
OBJ_NIDO, // 15
OBJ_OR, // 16
OBJ_17,
OBJ_18,
OBJ_SOLEIL, // 19
OBJ_CORNE, // 20
OBJ_21,
OBJ_22,
OBJ_23,
OBJ_24,
OBJ_25,
OBJ_26,
OBJ_27,
OBJ_28,
OBJ_29,
OBJ_30,
OBJ_31,
OBJ_32,
OBJ_33,
OBJ_34,
OBJ_35,
OBJ_36, // 36 is 1st plaque, 6 total
OBJ_37,
OBJ_PLAQUE, // 38
OBJ_39,
OBJ_40,
OBJ_41
};
namespace Objects {
enum Objects {
obNone,
obWayStone,
obShell,
obTalisman,
obTooth,
obPrism, // 5
obFlute,
obApple,
obEgg, // 8
obRoot,
obUnused10,
obShroom, // 11
obBadShroom, // 12
obKnife, // 13
obNest, // 14
obFullNest, // 15
obGold, // 16
obMoonStone,
obBag,
obSunStone, // 19
obHorn, // 20
obSword,
obMaskOfDeath,
obMaskOfBonding,
obMaskOfBirth,
obEyeInTheStorm, // 25
obSkyHammer,
obFireInTheClouds,
obWithinAndWithout,
obEyeInTheCyclone,
obRiverThatWinds,
obTrumpet, // 31
obUnused32,
obDrum,
obUnused34,
obUnused35,
obRing,
obTablet1, // 37 is 1st plaque, 6 total
obTablet2,
obTablet3, // 39
obTablet4,
obTablet5,
obTablet6
};
}
enum PERSO {
PER_ROI = 0,
PER_DINA, // 0x12
PER_THOO, // 0x24
PER_MONK, // 0x36
PER_BOURREAU, // 0x48
PER_MESSAGER, // 0x5A
PER_MANGO, // 0x6C
PER_EVE, // 0x7E
PER_AZIA, // 0x90
PER_MAMMI, // 0xA2
PER_MAMMI_1, // 0xB4
PER_MAMMI_2, // 0xC6
PER_MAMMI_3, // 0xD8
PER_MAMMI_4, // 0xEA
PER_MAMMI_5, // 0xFC
PER_MAMMI_6, // 0x10E
PER_BAMBOO, // 0x120
PER_KABUKA, // 0x132
PER_GARDES, // 0x144
PER_UNKN_156, // 0x156
PER_FISHER, // 0x168
PER_MORKUS, // 0x17A
PER_UNKN_18C, // 0x18C
PER_UNKN_19E, // 0x19E
PER_UNKN_1B0, // 0x1B0
PER_UNKN_1C2, // 0x1C2
PER_UNKN_1D4, // 0x1D4
PER_UNKN_1E6, // 0x1E6
PER_UNKN_1F8, // 0x1F8
PER_UNKN_20A, // 0x20A
PER_UNKN_21C, // 0x21C
PER_UNKN_22E, // 0x22E
PER_UNKN_240, // 0x240
PER_UNKN_252, // 0x252
PER_UNKN_264, // 0x264
PER_UNKN_276, // 0x276
PER_UNKN_288, // 0x288
PER_UNKN_29A, // 0x29A
PER_UNKN_2AC, // 0x2AC
PER_UNKN_2BE, // 0x2BE
PER_UNKN_2D0, // 0x2D0
PER_UNKN_2E2, // 0x2E2
PER_UNKN_2F4, // 0x2F4
PER_UNKN_306, // 0x306
PER_UNKN_318, // 0x318
PER_UNKN_32A, // 0x32A
PER_UNKN_33C, // 0x33C
PER_UNKN_34E, // 0x34E
PER_UNKN_360, // 0x360
PER_UNKN_372, // 0x372
PER_UNKN_384, // 0x384
PER_UNKN_396, // 0x396
PER_UNKN_3A8, // 0x3A8
PER_UNKN_3BA, // 0x3BA
PER_UNKN_3CC, // 0x3CC
PER_UNKN_3DE, // 0x3DE
PER_UNKN_3F0, // 0x3F0
PER_UNKN_402 // 0x402
};
namespace PersonId {
enum PersonId {
pidGregor = 0, // The King
pidDina, // Pink dino
pidTau, // Late grandpa
pidMonk, // Old wizard
pidJabber, // Executioner
pidEloi, // Evergreen ptero
pidMungo, // Dina's husband
pidEve, // Blonde girl
pidShazia, // Big boobs sis
pidLeadersBegin, // 9
pidChongOfChamaar = pidLeadersBegin, // Dogface
pidKommalaOfKoto, // Clones
pidUlanOfUlele, // Shaman
pidCabukaOfCantura, // Stone people
pidMarindaOfEmbalmers, // Gods
pidFuggOfTamara, // Boar-like
pidThugg, // Bodyguard
pidNarrator, // 16, Old Eloi, also BGM
pidNarrim, // Sea snake
pidMorkus, // Vicious tyran
pidDinosaur, // different species of friendly dino
pidEnemy // different species of enemy dino
};
}
// person in room mask bits
namespace PersonMask {
enum PersonMask {
pmGregor = 1,
pmDina = 2,
pmTau = 4,
pmMonk = 8,
pmJabber = 0x10,
pmEloi = 0x20,
pmMungo = 0x40,
pmEve = 0x80,
pmShazia = 0x100,
pmLeader = 0x200, // valley tribe leader
pmThugg = 0x400,
pmQuest = 0x800, // special quest person
pmDino = 0x1000,
pmEnemy = 0x2000,
pmMorkus = 0x4000
};
}
namespace PersonFlags {
enum PersonFlags {
pfType0 = 0,
pftTyrann,
pfType2,
pfType3,
pfType4,
pfType5,
pfType6,
pfType7,
pfType8,
pftMosasaurus,
pftTriceraptor,
pftVelociraptor,
pfType12,
pfType13,
pfType14,
pfType15,
pfTypeMask = 0xF,
pf10 = 0x10,
pf20 = 0x20,
pfInParty = 0x40,
pf80 = 0x80
};
}
#pragma pack(push, 1)
struct perso_t {
uint16 _roomNum; // room this person currently in
uint16 _actionId; // TODO: checkme
uint16 _partyMask; // party bit mask
byte _id; // character
byte _flags; // flags and kind
byte _roomBankId;// index in kPersoRoomBankTable for specific room banks
byte _spriteBank; // sprite bank
uint16 _items; // inventory
uint16 _powers; // obj of power bitmask
byte _targetLoc; // For party member this is mini sprite index
byte _lastLoc; // For party member this is mini sprite x offset
byte _speed; // num ticks per step
byte _steps; // current ticks
};
typedef struct perso_t perso_t;
class EdenGame;
struct phase_t {
int16 _id;
void (EdenGame::*disp)();
};
typedef struct phase_t phase_t;
namespace ObjectFlags {
enum ObjectFlags {
ofFlag1 = 1,
ofInHands = 2 // Currently holding this object in hands
};
}
#define MAX_OBJECTS 42
struct object_t {
byte _id;
byte _flags;
int _locations; // index in kObjectLocations
int16 _itemMask;
int16 _powerMask; // object of power bitmask
int16 _count;
};
typedef struct object_t object_t;
namespace DialogFlags {
enum DialogFlags {
df20 = 0x20,
dfRepeatable = 0x40,
dfSpoken = 0x80
};
}
namespace DialogType {
enum DialogType {
dtTalk = 0,
dtDinoAction,
dtDinoItem,
dtItem,
dtEvent,
dtInspect,
dtHint
};
}
struct dial_t {
char _flags; // 0-3 - action index, 4 - highest bit of contidion index, rest is DialogFlags
char _condNumLow; // condition index low bits
char _textCondHiMask; // 0-1 text index hi bits, 2-5 - perso mask num, 6-7 condition index hi bits
char _textNumLow; // text line index low bits
};
typedef struct dial_t dial_t;
struct tape_t {
int16 _textNum;
perso_t *_perso;
int16 _party;
int16 _roomNum;
int16 _bgBankNum;
dial_t *_dialog;
};
typedef struct tape_t tape_t;
struct Follower { // Characters on Mirror screen
char _id; // character
char _spriteNum; // sprite number
int16 sx;
int16 sy;
int16 ex;
int16 ey;
int16 _spriteBank;
int16 ff_C;
int16 ff_E;
};
typedef struct Follower Follower;
struct icon_t {
int16 sx;
int16 sy;
int16 ex;
int16 ey;
uint16 cursor_id; // & 0x8000 - inactive/hidden
unsigned int action_id;
unsigned int object_id;
};
typedef struct icon_t icon_t;
struct goto_t {
byte areaNum; // target area
byte curAreaNum; // current area
byte departVid;
byte travelTime; // time to skip while in travel
byte arriveVid;
};
typedef struct goto_t goto_t;
namespace RoomFlags {
enum RoomFlags {
rf01 = 1,
rf02 = 2,
rf04 = 4,
rf08 = 8,
rfPanable = 0x10,
rfHasCitadel = 0x20,
rf40 = 0x40,
rf80 = 0x80
};
}
struct room_t {
byte ff_0;
byte exits[4]; //TODO: signed?
byte flags;
uint16 bank;
uint16 party;
byte level; // Citadel level
byte video;
byte location;
byte background; // bg/mirror image number (relative)
};
typedef struct room_t room_t;
namespace AreaFlags {
enum AreaFlags {
afFlag1 = 1,
afFlag2 = 2,
afFlag4 = 4,
afFlag8 = 8,
afGaveGold = 0x10,
afFlag20 = 0x20,
HasTriceraptors = 0x100,
HasVelociraptors = 0x200,
HasTyrann = 0x400,
TyrannSighted = 0x4000,
afFlag8000 = 0x8000
};
}
namespace AreaType {
enum AreaType {
atCitadel = 1,
atValley = 2,
atCave = 3
};
}
struct area_t {
byte num;
byte type;
uint16 flags;
uint16 firstRoomIndex;
byte citadelLevel;
byte salNum;
room_t *citadelRoom;
int16 visitCount;
};
typedef struct area_t area_t;
namespace ValleyNews {
enum ValleyNews {
vnAreaMask = 0xF,
vnTriceraptorsIn = 0x10,
vnVelociraptorsIn = 0x20,
vnTyrannIn = 0x30,
vnTyrannLost = 0x40,
vnCitadelLost = 0x50,
vnVelociraptorsLost = 0x60,
vnFree = 0,
vnHidden = 0x80,
vnEnd = 0xFF
};
}
namespace DisplayFlags {
enum DisplayFlags {
dfFlag1 = 1,
dfFlag2 = 2,
dfMirror = 4,
dfPerson = 8,
dfFrescoes = 0x10,
dfPanable = 0x20,
dfFlag40 = 0x40,
dfFlag80 = 0x80
};
}
namespace DrawFlags {
enum DrawFlags {
drDrawInventory = 1,
drDrawFlag2 = 2,
drDrawTopScreen = 4,
drDrawFlag8 = 8,
drDrawMenu = 0x10,
drDrawFlag20 = 0x20
};
}
namespace MenuFlags {
enum MenuFlags {
mfFlag1 = 1,
mfFlag2 = 2,
mfFlag4 = 4,
mfFlag8 = 8,
mfFlag10 = 0x10
};
}
namespace MusicType {
enum MusicType { //TODO: same as DialogType?
mtDontChange = 0,
mtNormal = 1,
mt2 = 2,
mtEvent = 4,
mtFF = 0xFF
};
}
namespace EventType {
enum EventType {
etEvent1 = 1,
etEvent2 = 2,
etEvent3 = 3,
etEvent4 = 4,
etEvent5 = 5,
etEvent6 = 6,
etEvent7 = 7,
etEvent8 = 8,
etEvent9 = 9,
etEventB = 11,
etEventC = 12,
etEventD = 13,
etEventE = 14,
etEventF = 15,
etEvent10 = 16,
etEvent12 = 18,
etGotoArea = 0x80 // + area id
};
}
namespace GameFlags {
enum GameFlags {
gfMummyOpened = 1,
gfFlag2 = 2,
gfFlag4 = 4,
gfFlag8 = 8,
gfFlag10 = 0x10,
gfFlag20 = 0x20,
gfFlag40 = 0x40,
gfFlag80 = 0x80,
gfFlag100 = 0x100,
gfFlag200 = 0x200,
gfFlag400 = 0x400,
gfPrismAndMonk = 0x800,
gfFlag1000 = 0x1000,
gfFlag2000 = 0x2000,
gfFlag4000 = 0x4000,
gfFlag8000 = 0x8000
};
}
struct global_t {
byte areaNum;
byte areaVisitCount;
byte menuItemIdLo;
byte menuItemIdHi; //TODO: pad?
uint16 randomNumber; //TODO: this is randomized in pc ver and used by some conds. always zero on mac
uint16 gameTime;
uint16 gameDays;
uint16 chrono;
uint16 eloiDepartureDay;
uint16 roomNum; // current room number
uint16 newRoomNum; // target room number selected on world map
uint16 phaseNum;
uint16 metPersonsMask1;
uint16 party;
uint16 partyOutside;
uint16 metPersonsMask2;
uint16 __UNUSED_1C; //TODO: write-only?
uint16 phaseActionsCount;
uint16 curAreaFlags;
uint16 curItemsMask;
uint16 curPowersMask;
uint16 curPersoItems;
uint16 curPersoPowers;
uint16 wonItemsMask;
uint16 wonPowersMask;
uint16 stepsToFindAppleFast;
uint16 stepsToFindAppleNormal;
uint16 roomPersoItems; //TODO: write-only?
uint16 roomPersoPowers; //TODO: write-only?
uint16 gameFlags;
uint16 curVideoNum;
uint16 morkusSpyVideoNum1; //TODO: pad?
uint16 morkusSpyVideoNum2; //TODO: pad?
uint16 morkusSpyVideoNum3; //TODO: pad?
uint16 morkusSpyVideoNum4; //TODO: pad?
byte newMusicType;
byte ff_43;
byte videoSubtitleIndex;
byte partyInstruments; // &1 - Bell for Monk, &2 - Drum for Thugg
byte monkGotRing;
byte chrono_on;
byte curRoomFlags;
byte endGameFlag;
byte last_info;
bool autoDialog;
byte worldTyrannSighted;
byte ff_4D;
byte ff_4E;
byte worldGaveGold;
byte worldHasTriceraptors;
byte worldHasVelociraptors;
byte worldHasTyrann;
byte ff_53;
byte ff_54;
byte ff_55; //TODO: pad?
byte ff_56;
byte textToken1;
byte textToken2; //TODO: pad?
byte eloiHaveNews;
byte dialogFlags;
byte curAreaType;
byte curCitadelLevel;
byte newLocation;
byte prevLocation;
byte curPersoFlags;
byte ff_60;
byte eventType;
byte ff_62; //TODO: pad?
byte curObjectId;
byte curObjectFlags;
byte ff_65; //TODO: pad?
byte roomPersoType;
byte roomPersoFlags;
byte narratorSequence;
byte ff_69;
byte ff_6A;
byte frescoNumber;
byte ff_6C; //TODO: pad?
byte ff_6D; //TODO: pad?
byte labyrinthDirections;
byte labyrinthRoom;
void *__UNUSED_70; //TODO: pad?
dial_t *dialog_ptr;
tape_t *tape_ptr;
dial_t *next_dialog_ptr;
dial_t *narrator_dialog_ptr;
dial_t *last_dialog_ptr;
icon_t *nextRoomIcon;
byte *phraseBufferPtr;
byte *__UNUSED_90; //TODO: write-only?
byte *__UNUSED_94; //TODO: write-only?
room_t *room_ptr;
area_t *area_ptr;
area_t *last_area_ptr;
area_t *cur_area_ptr;
room_t *cita_area_firstRoom;
perso_t *perso_ptr;
perso_t *room_perso;
byte last_info_idx;
byte next_info_idx;
byte *persoSpritePtr;
byte *persoSpritePtr2;
byte *curPersoAnimPtr;
byte *ff_C2; //TODO: image desc arr
int16 iconsIndex;
int16 curObjectCursor; // TODO: useless?
int16 ff_CA;
int16 __UNUSED_CC; //TODO: unused/pad
int16 perso_img_bank; //TODO: unsigned?
uint16 roomImgBank;
uint16 persoBackgroundBankIdx;
uint16 ff_D4; //TODO: unsigned?
uint16 fresqWidth;
uint16 fresqImgBank;
uint16 ff_DA; //TODO: pad?
uint16 ff_DC; //TODO: pad?
uint16 room_x_base;
uint16 ff_E0; //TODO: pad?
uint16 dialogType;
uint16 ff_E4; //TODO: pad?
uint16 currentMusicNum;
int16 textNum;
uint16 travelTime;
uint16 ff_EC; //TODO: pad?
byte displayFlags;
byte oldDisplayFlags;
byte drawFlags;
byte ff_F1;
byte ff_F2;
byte menuFlags;
byte ff_F4; //TODO: write-only?
byte ff_F5;
byte ff_F6;
byte ff_F7;
byte ff_F8; //TODO: pad?
byte ff_F9; //TODO: pad?
byte ff_FA; //TODO: pad?
byte animationFlags;
byte __UNUSED_FC; //TODO: pad?
byte giveobj1;
byte giveobj2;
byte giveobj3;
byte ff_100;
byte roomVidNum;
byte ff_102;
byte ff_103;
byte roomBgBankNum;
byte valleyVidNum;
byte updatePaletteFlag;
byte inventoryScrollPos;
byte obj_count;
byte ff_109; //TODO: write-only?
byte textBankIndex;
byte pref_language;
byte pref_10C[2]; //TODO: volume
byte pref_10E[2]; // -//-
byte pref_110[2]; // -//-
byte cita_area_num;
byte ff_113;
byte lastSalNum;
byte save_end;
int16 textWidthLimit;
byte numGiveObjs;
byte ff_119; // unused
};
typedef struct global_t global_t;
struct pakfile_t {
char name[16];
int32 size;
int32 offs;
char flag;
};
typedef struct pakfile_t pakfile_t;
struct pak_t {
uint16 count;
pakfile_t files[10];
};
typedef struct pak_t pak_t;
#pragma pack(pop)
struct cita_t {
int16 ff_0;
int16 ff_2[8 * 2];
};
typedef struct cita_t cita_t;
/////////////// vars
extern Follower followerList[];
/*
Labyrinth of Mo
| | | | | | | |
*/
enum {
LAB_N = 1,
LAB_E,
LAB_S,
LAB_W
};
extern byte kLabyrinthPath[];
extern char kDinoSpeedForCitaLevel[16];
extern char kTabletView[];
// special character backgrounds for specific rooms
extern char kPersoRoomBankTable[];
// area transition descriptors
extern goto_t gotos[];
extern int16 tab_2D24C[];
extern int16 tab_2D28E[];
extern int16 tab_2D298[];
extern int16 tab_2D2AA[];
extern int16 tab_2D2C4[];
extern object_t objects[];
extern int16 kObjectLocations[100];
extern perso_t kPersons[];
extern cita_t cita_list[];
extern int16 tab_2CB16[];
extern char tab_2CB1E[8][4];
struct prect_t {
int16 sx, sy, ex, ey;
};
typedef struct prect_t prect_t;
extern prect_t perso_rects[];
extern byte tab_persxx[][5];
extern area_t kAreasTable[];
extern int16 tab_2CEF0[64];
extern int16 tab_2CF70[64];
extern int16 kActionCursors[299];
struct cubeface_t {
int tri;
char ff_4;
char ff_5;
byte *texptr;
uint16 *indices;
int16 *uv;
};
typedef struct cubeface_t cubeface_t;
struct cube_t {
int num;
cubeface_t **faces;
int16 *projection; // projected XYZ coords
int16 *vertices;
};
typedef struct cube_t cube_t;
extern float flt_2DF7C;
extern float flt_2DF80;
extern float flt_2DF84;
// Cube faces to texture coords mapping
// each entry is num_polys(6) * num_faces_per_poly(2) * vertex_per_face(3) * uv(2)
extern int16 cube_texcoords[3][6 * 2 * 3 * 2];
extern char tab_2E138[4 * 3];
//
struct XYZ {
signed short x, y, z;
};
struct cubeCursor {
unsigned char sides[6]; // spr idx for each side
unsigned char kind;
signed char speed;
};
} // End of namespace Cryo
#endif
|