-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathData.h
More file actions
2497 lines (2409 loc) · 112 KB
/
Data.h
File metadata and controls
2497 lines (2409 loc) · 112 KB
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
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#pragma pack(1)
#define maxFilesOpen 8
#define NumExpandedGraphics 1275
#define MAXLOAD 2000 // Else ASSERTION!
// I had some troubles with loads.
// Loads can be larger but this is a nice
// number for debugging purposes.
#if (defined _MSVC_INTEL) || (defined _MSVC_CE2002ARM)
#define LOW_I16(X) ((i16)((i32)X))
#else
#define LOW_I16(X) ((i16)((intptr_t)(X)))
//#define LOW_U16(X) ((u16)((intptr_t)(X)))
#endif
struct MouseQueueEnt;
struct ITEMQ;
void TranslateFullscreen(i32 a, i32 b, i32& x, i32& y);
void Cleanup(bool programTermination);
enum SPEEDS
{
SPEED_GLACIAL,
SPEED_MOLASSES,
SPEED_VERYSLOW,
SPEED_SLOW,
SPEED_NORMAL,
SPEED_FAST,
SPEED_QUICK,
SPEED_NUMSPEED
};
enum VOLUMES
{
VOLUME_FULL = 0,
VOLUME_HALF = 1,
VOLUME_QUARTER = 2,
VOLUME_EIGHTH = 3,
VOLUME_OFF = 4,
VOLUME_NUMVOLUME = 5
};
class SPEEDTABLE
{
public:
i32 vblPerTick;
};
class VOLUMETABLE
{
public:
i32 divisor;
i32 attenuation; //decibels
};
enum VIDEOMODE
{
VM_DEFAULT, // When we don't know what to do.
VM_PRESENTS, // While the word "Presents" is on screen
VM_CENTERMENU, // While a Menu (such as game selection) is on screen
VM_LEFTMENU, // While a Menu (such as save game menu) is on screen
VM_ADVENTURE, // While the party is adventuring
VM_THEEND, // The words "The End" appear on the screen
VM_CREDITS, // While author credits are on screen
VM_CAST, // Cast of characters and stats when game is won
VM_PRISONDOOR, // While door to prison is showing
VM_INVENTORY, // Hero's inventory screen.
VM_FROZEN, // Game is frozen.
VM_SLEEPING // Sleep during adventure
};
extern VIDEOMODE videoMode;
extern SPEEDTABLE speedTable[SPEED_NUMSPEED];
extern VOLUMETABLE volumeTable[VOLUME_NUMVOLUME];
extern bool usingDirectX;
extern bool playerClock;
extern bool extraTicks;
extern SPEEDS gameSpeed;
extern VOLUMES gameVolume;
extern i32 totalMoveCount;
extern bool NoSound;
extern bool NoSleep;
extern bool AutoEnlarge;
extern bool ThreeDMovements;
extern bool GravityGame;
extern bool gravityMove;
extern bool DM_rules;
extern bool indirectText;
extern bool bigActuators;
//extern bool SequencedTimers;
extern bool disableSaves;
extern i32 nextGravityMoveTime;
extern char moveHistory[4];
extern i32 ExtendedFeaturesSize;
extern char ExtendedFeaturesVersion;
extern i32 RememberToPutObjectInHand;
extern char *dungeonName;
extern char *g_folderName;
extern std::string g_folderParentName;
//extern char *folderSavedGame;
extern std::string g_root;
extern i32 *videoSegSize;
extern i32 *videoSegSrcX;
extern i32 *videoSegSrcY;
extern i32 *videoSegWidth;
extern i32 *videoSegHeight;
extern i32 *videoSegX;
extern i32 *videoSegY;
extern i32 *videoPaletteNum;
extern char *gameInfo;
extern i32 gameInfoSize;
extern ui32 graphicSignature1, graphicSignature2;
extern ui32 expectedGraphicSignature1, expectedGraphicSignature2;
extern ui32 CSBgraphicSignature1, CSBgraphicSignature2;
extern ui32 expectedCSBgraphicSignature1, expectedCSBgraphicSignature2;
extern ui32 dungeonSignature1, dungeonSignature2;
extern ui32 versionSignature;
extern ui32 spellFilterLocation;
extern ui32 cellflagArraySize;
extern ui32 EDBT_CSBGraphicsSignature_data;
extern ui32 EDBT_GraphicsSignature_data;
extern ui32 EDBT_CSBversion_data;
extern ui32 EDBT_Debuging_data;
extern EXPOOL expool;
extern bool monsterMoveFilterActive;
extern ui32 parameterMessageSequence;
// File handles are indexes into this table.
extern FILETABLE fileTable[maxFilesOpen];
extern i16 TraceFile;
extern i16 GraphicTraceFile;
extern bool TimerTraceActive;
#ifndef _MSVC_INTEL
extern bool DSATraceActive;
#endif
extern bool AttackTraceActive;
extern bool AITraceActive;
extern bool GraphicTraceActive;
extern i32 traceViewportDrawing;
extern i32 NoSpeedLimit;
extern bool NoClock;
extern bool BeginRecordOK;
extern bool ItemsRemainingOK;
extern i32 keyboardMode;
extern i32 NumberFloppyDrives;
extern bool gameFrozen;
extern i32 screenSize;
extern bool DiskMenuNeeded;
extern i32 GameTime;
extern i32 MostRecentlyAdjustedSkills[2];
extern i32 LatestSkillValues[2];
extern i32 AdjustedSkillNumber;
extern const char *tracePrefix;
const char *initialTracePrefix(bool trace);
const char *nextTracePrefix(const char *trace);
struct STRUCT5688
{
ui8 uByte0;
ui8 uByte1;
ui8 width; //uByte2;
ui8 height; //uByte3;
i16 word4;
};
struct SD
{
SD *pnext;
char name[16];
i32 minimum;
float level;
float y_intercept;
float slope;
};
/*
class SDLIST
{ // A class so destructor will release memory
SD *psd;
public:
SDLIST() { psd=NULL; };
~SDLIST();
SD *newSD(char *,i32,float,float,float);
SD *First();
SD *Next(SD *ent);
};
*/
/*
extern SDLIST sdList;
struct SDENT
{
i32 minimum;
float level;
float y_intercept;
float slope;
};
extern SDENT sdTable[199];
*/
#define FILL(a,b) i8 fill##a[a-b]{};
#define IllegalWallDecorationWarning 1
struct DECORATION_DESC
{
BYTE_RECTANGLE rect;
ui8 width; // #bytes
ui8 height;
};
struct LEGALATTACKS
{
ui8 byte0[8];
};
struct DBank
{
DBank();
void Initialize();
friend class GameTimers;
void AllocateDerivedGraphicCacheIndex();
i16 GetDerivedGraphicCacheIndex(i32 graphicNum);
void SetDerivedGraphicCacheIndex(i32 graphicNum, i32 index);
void SetDerivedGraphicSize(i32 graphicNum, i32 size);
ui16 GetDerivedGraphicSize(i32 graphicNum);
void AllocateDerivedGraphicsSizesBuffer();
i32 unusedLong23326{}; // Static memory remaining size.
ui8 *Pointer23322{}; // Start of remainder of static memory.
ui8 *Pointer23318{}; // Next available memory location. Increments as memory allocated.
pnt Pointer23314{};
pnt Pointer23310{};
i32 iAvailableMemory{}; //Long23306; // 'malloc' memory remaining size
KeyXlate *pKeyXlate1{}; //16884;
KeyXlate *pKeyXlate2{}; //16880;
btn *SecondaryButtonList{};//16876;
btn *PrimaryButtonList{}; //16872;
ui8 *pEndOfAvailMemory{};//pnt Pointer23298; // Address of end of avail 'malloc' memory.
ui8 *Pointer23294{}; // Address of end of 'malloc' memory
ui8 *Pointer22968{}; // Graphic #534
ui8 *Pointer22964{}; // Graphic #535
ui8 *Pointer22960{}; // Graphic #5
ui8 *Pointer22956{}; // Graphic #4 Prison entrance minus door
ui8 *Pointer22952{}; // Graphic #2 Prison door - left
ui8 *Pointer22948{}; // ShrinkBLT (Graphic #2)
ui8 *Pointer22944{}; // ShrinkBLT (Graphic #2)
ui8 *Pointer22940{}; // ShrinkBLT (Graphic #2)
ui8 *Pointer22936{}; // Graphic #3 Prison door - right
ui8 *Pointer22932{}; // ShrinkBLT (Graphic #3)
ui8 *Pointer22928{}; // ShrinkBLT (Graphic #3)
ui8 *Pointer22924{}; // ShrinkBLT (Graphic #3)
ui8 *Pointer22920{};
ui8 *Pointer22916{}; // Prison dungeon interior
const char* Pointer22912{};
const char* Pointer22908{};
const char* Pointer22904{};
const char* Pointer22900{};
const char* Pointer22896{};
const char* Pointer22892{};
const char* Pointer22888{};
const char* Pointer22884{};
const char* Pointer22880{};
const char* Pointer22876{};
const char* Pointer22872{};
const char* Pointer22868{};
const char* Pointer22864{};
const char* Pointer22860{};
const char* Pointer22856{};
const char* Pointer22852{};
const char* Pointer22848{};
const char* Pointer22844{};
const char* Pointer22840{};
const char* Pointer22836{};
const char* Pointer22832{};
const char* Pointer22828{};
const char* Pointer22824{};
const char* Pointer22820{};
const char* Pointer22816{};
const char* Pointer22812{};
LEVELDESC *pLevelDescriptors{};//10442;
// points to array of 16-byte structures
// read from dungeon.dat. Parallels the
// array at Pointer10458.
// Words 0, 8, 10, 12, and 14 are switched
// to littleEndian when we read the file.
ui16 *objectLevelIndex{};// *puwPointer10458;
//Index in pwPointer10454 of first
//column in each level.
ui16 *objectListIndex{}; // *pwPointer10454;
// One word for each DUDAD (numDUDADpointers).
// Small integers (0x00 - 0x41) sorted with
// a couple of duplicates.
// LittleEndian when read from dungeon.dat.
CELLFLAG ***pppdPointer10450{};
// Actually, the 10450 array has two parts. The first
// <numlevel> pointers in the array point repectively to the
// second part for each level.
// Each level then has an array of pointers to the
// contents of the cells in each of the maze's columns.
DUNGEONDATINDEX *dungeonDatIndex{};
//10446; // points to 22-word array.
// All 22 words swapped when read.
// Word[0] used by TAG00a41c.
// Word[2] bits 8-15 = number of levels
// Words reversed when read from file
// Word[5] = size of array 10464
// At runtime, word[i+6] is the number
// of entries allocated for database[i].
// In general, many will be empty.
CELLFLAG *cellFlagArray{};//pdPointer10438;
// This is the CELLFLAG array. Seldom used. 10450 is set
// to point to the start of each level and to the start
// of each column within each level.
i16 LZWrepeatChar{}; // (23408) repeated by character 0x90 0xxx sequence
// except that 0x90 0x00 means 0x90.
i16 Word23406{};
i16 LZWBitNumber{}; // (23404) Bit number within 9-byte I/O buffer
i8 RightOneMask[9]{}; // 23402
FILL(23393,23392)
i8 RightZeroMask[9]{}; // 23392
FILL(23383,23382)
i16 Word23382{};
i16 LZWNextCode{}; // (23380)
ui8 IOBuffer[12]{}; // (23378)how big should this be????? At least 9!
i16 Word23366{};
i16 LZWMaxCode{}; //(23364)Maximum code value (eg: 511 for 9 bit code)
i16 LZWCodeSize{}; //(23362)Number of bits.
i16 LZWrepeatFlag{}; //(23360)
i32 unusedLong23358{}; // copied from 11718 = d.Time
// While d.Time == this value the second part
// of the graphic list is not cleared.
i16 newFlags;//Unused23354;//BigMemory; //23354// Set if lots of memory. (>370000 avail)
// This word is now used for something entirely different.
// See the flags definitions at top of struct.
ITEMQ *unusedpqFirstGraphic2{};//23352; //First ITEMQ in 2nd part of list
ITEMQ *unusedpqLastGraphic{}; //23348; // Last ITEMQ in list?
ITEMQ *pqFirstGraphic{}; //23344; // First ITEMQ in list
// There is a list of graphics. The first entry in the list
// is pqFirstGraphic and the last is pqLastGraphic.
// ** BUT ** the list is divided into two parts and the first
// entry in the second part is pqFirstGraphic2.
ITEMQ *pgUnused{}; //23340; First free graphics buffer
i32 iAvailableGraphicMemory{}; //space remaining?
ITEMQ *pGraphicCachePointers[NumExpandedGraphics]{}; //23332; // pointer to 5100 bytes initially zero
// Each pointer points to an ITEMQ
// which is followed by a bitmap
// and another longword with the size repeated.
// So each buffer has the form:
// i32 size (Negative if allocated)
// i16 flag
// i16 index of previous
// i16 index of next
// i16 graphic number
// (size - 16) bytes of graphic
// i32 size (Negative if allocated)
i16 Word23328{};
i16 CacheInvalid{}; // (23290) non-zero if contents of ClusterCache is invalid
ui8 *ClusterCache{}; // (23288) Pointer to 1024 bytes
ui8 *pStartAvailMemory{};// Pointer23284; // 10000 below initially allocated memory blocks
//This is also the end of graphic memory.
ui8 *pStartMemory{}; // Start of memory.
// Also the start of Graphic memory.
private:
i16 *pwDerivedGraphicSizes{};//Pointer23274; // Pointer to 1460 bytes of memory
i16 *pDerivedGraphicCacheIndex{};//23270;
// 730 words filled with -1 initially
// For each graphic number, this is the index in
// the graphic cache.
public:
std::unique_ptr<i16[]> GraphicIndex0; //pwPointer23266;
// GraphicIndex0 contains NumGraphic(from graphics.dat)
// entries.
// Each graphics index in ppq23332.
// 23266 and 23270 contain the graphics buffer index for each
// of the graphics numbers.
// There are two types of graphics: Those with graphics numbers
// with bit 15 set (0x8000) are listed in 23270 and those with
// bit 15 clear are listed in 23266.
// A graphic is located at ppExpandedGraphics[pwPointernnnn[graphicNum]].
std::unique_ptr<pnt[]> ppUnExpandedGraphics;// *ppPointer23262; // See immediately below.
std::unique_ptr<ui16[]> GraphicDecompressedSizes; //(23258) Sizes of decompressed graphics
std::unique_ptr<ui16[]> GraphicCompressedSizes; //(23254) Array .. size of each graphic.
i32 GraphicFileEOF{}; //(23250) End+1 of GRAPHICS.DAT file
ui8 *SavedCursorPixels{}; //Pointer23198;
ui8 *ScreenCursorAddress{};// Area saved uder cursor//Pointer23194;
pnt Pointer23190{};
pnt Pointer23186{};
pnt Pointer23182{};
pnt Pointer23178{};
ui8 *CursorBitmap{}; //Pointer23174; Adjusted to be on word boundary
pnt Pointer23170{}; // used in VBL handler
const char* Pointer16822[7]{};//"STRENGTH", "DEXTERITY", etc
const char* DirectionNames[4]{};//16794;
pnt Pointer16778{};
i16 *pwPointer16774{}; // Points to d.Word918 initially
const char* Pointer16770[17]{};//"Novice", "Master", etc
pnt Pointer12926{};
ui8 *newTextLine{}; //12922
// This line contains the text bitmap to
// be scrolled into the bottom of the
// screen. 12916 is set to 0 to get the
// process started. (qv)
char *ObjectNames[199]{};//12786;
ui32 RandomNumber{}; // 11986 Initially set from GEMDOS Random function
ui8 *LogicalScreenBase{}; // 11982
std::unique_ptr<ui8[]> compressedGraphic0;//Pointer11782; // Graphic zero?? Menu graphic?
ui8 *pViewportBMP{}; //11682; // 15232 bytes - This is an image of the
ITEM16 *pI1613134{};
i32 Time13130{};
i32 LastPartyMoveTime{};// Long12954; // Time at which party last moved.
i32 LastMonsterAttackTime{}; //Long12950; // Time we last called MonsterAttacks(TAG00c8c0)???
i32 TextTimeout[4]{};// 12946[4];
// One per text line at
// bottom of screen
// This is the time at which the line
// should be removed from the screen.
std::vector<ui32> indirectTextIndex; //NumWordsInTextArray() entries.
std::vector<ui16> compressedText;//Pointer10346; //Do your own littleEndian!
// Something to do with text.
i16 *Pointer2526[3]{}; //&Word2050, &Word2210, &Word2318
pnt Pointer2250{}; // 5 Longwords moved between here and 2110
pnt Pointer2246{}; // 5 Longwords moved between here and 2110
pnt Pointer2242{}; // 5 Longwords moved between here and 2110
pnt Pointer2238{}; // 5 Longwords moved between here and 2110
pnt Pointer2234{}; // 5 Longwords moved between here and 2110
pnt Pointer2230{}; // 5 Longwords moved between here and 2110
pnt Pointer2226{}; // 5 Longwords moved between here and 2110
pnt Pointer2222{}; // 5 Longwords moved between here and 2110
pnt Pointer2218{}; // 5 Longwords moved between here and 2110
pnt Pointer2214{}; // 5 Longwords moved between here and 2110
ui8 *pDoorBitmaps[8]{};
//pnt Pointer2142; // [0] 1504 bytes //F1 Door Facing Right Frame
//pnt Pointer2138; // [1] 1968 bytes //F0 Door Edge
//pnt Pointer2134; // [2] 1504 bytes //F1 Door Facing Left Frame
//pnt Pointer2130; // [3] 1560 bytes //F2 Door Facing Left Frame
//pnt Pointer2126; // [4] 704 bytes //F3 Door Facing Left Frame
//pnt Pointer2122; // [5] 688 bytes //F3L1 & F3R1 Door Facing Left Frame
//pnt Pointer2118; // [6] 256 bytes //F1R1 & F1 & F1L1 Door Facing Top Track
//pnt Pointer2114; // [7] 144 bytes //F2L1 & F2 & F2R1 Door Facing Top Track)
ui8 *pWallBitmaps[7]{};
// 5 pointerss moved as group between here and 2230
//pnt Pointer2110; // [0] 2176 bytes //F0R1
//pnt Pointer2106; // [1] 2176 bytes //F0L1
//pnt Pointer2102; // [2] 1408 bytes //F1L1, F1, F1R1
//pnt Pointer2098; // [3] 5112 bytes //F2L1, F2, F2R1
//pnt Pointer2094; // [4] 3264 bytes //F3L1, F3, F3R1
//pnt Pointer2090; // [5] 392 bytes //F3L2
//pnt Pointer2086; // [6] 392 bytes //F3R2
ui8 *pViewportFloor{}; //2082 - 7840 byte //Address of floor in viewportBMP
ui8 *pViewportBlack{}; //2078 - 4144 bytes //Address of space between floor
// and ceiling in viewportBMP
ui8 *pCeilingBitmap{}; //2074 - 3248 bytes
ui8 *pFloorBitmap{}; //2070 - 7840 bytes
pnt Pointer2066[4]{};
btn *Pointer18986{};
btn *Pointer18982{};
KeyXlate *pKeyXlate18978{};
KeyXlate *pKeyXlate18974{};
btn *pButn18970[2][4]{}; // The menu button lists
ITEM16 *Item16{}; //13010; // Word13012 16-byte units?
// Initialized with -1 in word 0 of each enrty.
// Constructed by AttachItem16ToMonster???
// This appears to be a queue of some sort.
// Word13014 is maybe the number of active
// entries. TAG00bd40 seems to remove the
// active entries.
ui32 WatchdogTime{};//13006; // Always one TIMER in queue.
pnt unused12998{}; // *timerQue;//12998; // Appears to point to an array of words
// that in turn serve as
// indexes into array Pointer12994;
i32 unused12994{}; //TIMER *Timers;// 12994;//Array of TIMER structures
i32 Time{};// 11718;// time (units of "clockTicks") See "Speed"
// Should be about 1/6 seconds
// ************Only 32-bit variables above this line
i8 Byte22570[186]{};
//i16 Word22386;
i16 Word22384{};
FILL(22382,21994)
i8 Byte21994[576]{}; // Magic menu???
i8 Byte21418[576]{}; // Magic menu???
i8 Byte20842[576]{}; // The magic menu outline, maybe???
i16 ClusterInCache{};// (23276) Current cluster in ClusterCache
ui16 NumGraphic{}; //(23246) First two bytes of file are put here.(handle Word23242)
// This is the number of graphics in GRAPHICS.DAT
// Sizes put at *Pointer23254
// Second block put at *Pointer23258;
// *Pointer23262 is a buffer twice the block size
// with first half cleared.
// *Pointer 23266 is a blocksize buffer filled with -1;
i16 Word23244{}; // File open count? Reference count?
i16 GraphicHandle{}; // (23242)File handle
FILL(23240,23236)
// VBL handler fetches these function pointers but
// it appears that the use of the pointers has
// been 'NOP'ed out.
void (*pFunc23236)(i32 P1){};
void (*pFunc23232)(){};
i16 Unused23228{}; //Always zero. I removed it.Word23228;
i16 Word23226{};
i16 OnMouseSwitchActionLock{};//Word23224; // Test/Set for Mouse interrupt
RectPos wRectPos23222{};
RectPos wRectPos23214{};
i8 Byte23206[4]{};
i8 Byte23202[4]{};
i16 CursorWidth{}; //Word23166// in 16-pixel units
i16 CursorHeight{}; //Word23164
i16 NewCursorY{}; //Word23162// new cursor x pos
i16 NewCursorX{}; //Word23160// new cursor y pos
i16 Word23158{}; // Cursor Hotspot y???
i16 Word23156{}; // Cursor Hotspot x???
i16 CurCursorY{}; //Word23154// current cursor x pos
i16 CurCursorX{}; //Word23152// current cursor y pos
i16 Word23150{};
i16 CursorShape{};//23148; 0 = Arrow
i16 Word23146{}; // used in vertical blank handler
i16 Word23144{}; // Special cursor flag??? Ordinal
// of character whose position is moving
i16 NewCursorShape{}; //Word23142;// 0 or 1
i16 PressingEyeOrMouth{};//Word23140; // used in mouse interrupt handler
// Set when showing skill levels
i16 Word23138{}; // used in vertical blank handler
i16 Word23136{}; // Cursor is being displayed. Save area valid.
i16 Word23134{}; // Referenced in mouse interrupt
i16 Word23132{}; // used in vertical blank handler
i16 Word23130{};
i16 CurMouseY{}; //Word23128;
i16 CurMouseX{}; //Word23126;
i16 NewMouseY{}; //Word23124;
i16 NewMouseX{}; //Word23122;
i16 MouseSwitches{};//23120; // Mouse interrupt
i16 Word23118{}; // Hide cursor counter???
i16 Word23116{};
i8 Byte23114{};
FILL(23113,23046)
i16 Word23046{}; //if non-zero then volume
i16 CurrentSound{};//23044;
i8 Byte23042{}; // Save old keyclick state from $484
FILL(23041,23040)
pnt Pointer23040{}; // Pointer to $484 = conterm = keyclick
i16 Word23036{};
FILL(23034,23032)
i16 UseByteCoordinates{};//23032; // Affects whether bytes or
// words are used in RectPos in
// Bitmap operations
char Byte23030[23030-23024]{};
//FILL(23029,23024)
char Byte23024[23024-23008]{};
//FILL(23023,23008)
char Byte23008[23008-22992]{};
//FILL(23007,22992)
i16 DualFloppyDrive{};//Word22992; // Set to 1 if 2 floppy drives
FILL(22990,22988)
const char *Pointer22988{}; // Set to "DRIVE."
const char *Pointer22984{}; // Set to "DRIVE."
char *Pointer22980{};
char *SaveGameFilename{};//22976;
i16 Word22972{};
i16 SingleFloppyDrive{}; //Word22970; // Set to 1 if not 2 floppy drives
i8 Byte22808[132]{}; // read/write as unit to CSBGAME.DAT
i8 Byte22676{};
FILL(22675,22608)
i32 inStreamLeft{}; // 22608 // #bytes left in input stream
pnt inStreamNext{}; // 22604 // Next byte in input stream
i16 inStreamBuffered{}; // 22600 flag if input from buffer
i16 Word22598{};
i16 Word22596{}; // equals 1 or 2 ; I have never seen anything
// but a 2.
i16 Word22594{};
i16 Word22592{}; // From bytes 6 and 7 of dungeon.dat file = 0x000c
// distinguish between DM and CSB????
i32 RandomGameID{};//22590; // Set to random when prison opened
i16 CanRestartFromSavegame{};// Word22586;
//Set to 1 after loading savegame.
//Set to 1 after saving game.
//Set to 0 after loading dungeon.
//Set to 0 after winning game with 4 corbum.
//Set to zero after printing "THE END"
//Set to zero before killing entire party.
i16 PartyHasDied{};//Word22584; //Set when party died
FILL (22582,22578)
i16 datafileHandle{}; // 22578// Dungeon.dat file handle
FILL(22576,22572)
RN MonsterUnderAttack{};//22572
i16 MagicCaster{};//20266;
i16 attackDamageToDisplay{};//Word20264;
i16 unused20262{};//i16 Word20262;
i8 PossibleAttackTypes[4]{};//20260; // Up to 4 different attack types
i8 Byte20256[4]{}; // Parallel to 20260. See GetLegalAttackTypes. Never used that I can see.
i16 Word20252{};
i16 Word20250{};
i16 Word20248{};// compared to button # (#Attack options???)
i16 AttackingCharacterOrdinal{};//20246;
i8 Byte20244[2]{};
// Start of graphic 0x230
i16 Word20242[4]{}; // Rectpos
RectPos wRectPos20234{}; //Swapped when read
RectPos wRectPos20226{}; //Swapped when read
RectPos wRectPos20218{}; //Swapped when read
RectPos wRectPos20210{}; //Swapped when read
RectPos wRectPos20202{}; //Swapped when read
ui8 Byte20194[16]{}; // Color map for ShrinkBLT
//FILL(20193,20178)
i8 experienceForAttacking[44]{}; //Byte20178[44];// Indexed by attack type
i8 SkillNumber[44]{};// 20134;
//Which skill needed for attack??
//small integers. Largest = 18.
//Indexed by attack type.
i8 Byte20090[44]{};
i8 Byte20046[44]{};//Indexed by attack type
i8 Byte20002[44]{};//Strength required????
i8 Byte19958[44]{};
i8 Byte19914[44]{};// indexed by attack type
// very small integers (2, 6,12, 5) the
// largest is 38.
i8 AttackNames[300]{};//19870; //"KICK PUNCH BASH etc"
LEGALATTACKS legalAttacks[44]{};// i8 Byte19570[1];// Groups of eight?. Weapon action???// FILL(19569,19218)
i16 Unused19218{};//Word19218; // 12777 is some magic number here
SPELL Spells[25]{};//19216 8 bytes each // Long0, word6 swapped when read
// ID Type
// [00] 1-4 0x666f00 3 Party Shield
// [01] 1-5-2 0x667073 3 Magic Footprints
// [02] 3-2-6 0x686d77 3 Invisibility
// [03] 3-1 0x686c00 2 Poison Cloud Missile ff87
// [04] 3-2-5 0x686d76 3 See Thru Walls
// [05] 3-3-5 0x686e76 2 Missile ff82
// [06] 3-4-5 0x686f76 3 Light
// [07] 4 0x690000 3 Torch
// [08] 4-4 0x696f00 2 Missile ff80 Fireball
// [09] 4-5-1 0x697072 1 Strength Potion - KU Potion
// [10] 4-5-4 0x697075 3 FireShield
// [11] 5-2 0x6a6d00 2 Missile ff83 Damage non-Material
// [12] 5-1 0x6a6c00 3 Poison Bolt
// [13] 5-4-6 0x6a6f77 3 Darkness
// [14] 6 0x6b0000 2 Missile ff84 Open Door
// [15] 1-5 0x667000 1 Magic Shield Potion(12) YA Potion
// [16] 1 0x660000 1 Stamina Potion(11) MON Potion
// [17] 1-5-3 0x667074 1 Wisdom Potion(8) DANE Potion
// [18] 1-5-4 0x667075 1 Vitality Potion(9) NETA potion
// [19] 2 0x670000 1 Potion(14) Cure Wounds - VI Potion
// [20] 2-5 0x677000 1 Potion(10) Cure Poison - ANTIVENOM
// [21] 3-5-2 0x687073 1 Dexterity Potion(6) ROS Potion
// [22] 6-5-5 0x6b7076 1 Mana Potion(13) EE Potion
// [23] 6-1 0x6b6c76 1 Poison Potion(3) VEN Potion
// [24] 6-3-5 0x6b6e76 3 ZoKathRa
i8 Byte19016[6]{};
i8 Byte19010[24]{};
// Last part of graphic 0x230
i8 Byte18938[2]{}; // Start of graphic 0x231
btn Buttons18936[5]{}; // swapped when read
btn Buttons18876[4]{}; // "" ...
btn Buttons18828[3]{}; // "" ...
btn Buttons18792[2]{}; // "" ...
btn Buttons18768[5]{}; // "" ...
btn Buttons18708[4]{}; // "" ...
btn Buttons18660[3]{}; // "" ...
btn Buttons18624[2]{}; // "" ...
i8 Byte18600[8]{}; // RectPos swapped when read ...
i8 Byte18592[8]{}; // RectPos swapped when read ...
i8 Byte18584[8]{}; // RectPos swapped when read ...
i8 Byte18576[8]{}; // RectPos swapped when read ...
i16 Word18568[4]{}; // deltax[dir] NESW swapped when read ...
i16 Word18560[4]{}; // deltay[dir] NESW swapped when read ...
i16 Word18552[28]{}; // Swapped when read. Magic buttons??? ...
MOVEBUTN MoveButn18496[4]{}; // MF, MR, MB, ML Swapped when read
ui8 DropAreas[16]{};//18464 X andY in screen coordinates
i8 Byte18448[8]{}; // KeyXlate swapped when read ...
i8 Byte18440[12]{}; // KeyXlate swapped when read ...
KeyXlate Byte18428[7]{};// KeyXlate swapped when read ...
i8 Byte18400[28]{}; // KeyXlate swapped when read
btn Buttons18372[4]{}; //
btn Buttons18324[9]{}; // Swapped when read... chest buttons
btn Buttons18216[13]{}; // Swapped when read
btn Buttons18060[9]{}; // Swapped when read
btn Buttons17952[5]{}; // Swapped when read
btn Buttons17892[5]{}; // Swapped when read
btn Buttons17832[3]{}; // Swapped when read ...
btn Buttons17796[3]{}; // Swapped when read [864-4*12]
btn Buttons17760[38]{}; // Swapped when read
btn Buttons17304[9]{}; // Swapped when read ...
btn Buttons17196[20]{}; // Swapped when read ...
btn Buttons16956[2]{}; // Swapped when read ...
btn Buttons16932[4]{}; // Swapped when read
// End of graphic 0x231
i16 Word16868{}; // Mouse click something
i16 FakeMouseButton{};//16866; // Fake Mouse click buttons
i16 FakeMouseY{}; //16864; // Fake Mouse click y
i16 FakeMouseX{}; //16862; // Fake Mouse click x
i16 FakeMouseClick{}; //16860; // Fake Mouse click occurred
// Fake mouse clicks are also created when we need to
// save a click while the Test/Set word is set. The
// click is then acted upon later.
// Some sort of queue.
i16 MouseInterlock{};//16858; // Test/Set so we don't reference the queue twice.
i16 MouseQEnd{}; //16856; Last entry in queue (0 to MOUSEQLEN-1)
i16 MouseQStart{};//16854; Next entry to remove from queue (0 to MOUSEQLEN-1)
// // The queue is empty when Start = End+1
MouseQueueEnt ExMouseQueue[5]{}; //Moved to global space to enlarge.//16852
i8 Byte16702{};
FILL(16701,16634)
RN objOpenChest{};//16634; The one opened and on display
RN rnChestContents[8]{};//16632;
// Contents of opened chest. Commonly
// referenced as 16692[place] because
// place number 30 is the start of the
// chest.
i16 DisplayResurrectChestOrScroll{};// 16616;
// Set to 2 if scroll in weapon hand
// Set to 4 if chest in weapon hand
// Set to 5 during "Resurrect or Reincarnate"
// if ==4 then we search chest as well as backpack.
i16 SelectedCharacterOrdinal{};//16614; Selected to see backpack.
i16 TextOutY{}; //Word16612;
i16 TextOutX{};
i16 Word16608{};
i8 Byte16606[6]{};
i32 Long16600{};
const char* Pointer16596[4]{};//"FIGHTER", "NINJA", etc
i16 Word16580{};
i16 EmptyHanded{};//16578;
RN objectInHand{};//16576; //object in hand cursor?
i16 ObjectType16574{}; // OBJECTTYPE//must say i16 to keep space use to 2 bytes
pnt Pointer16572{};
i16 HandChar{};// 16568; //Whose hand does that cursor belong to?
//Contains character index or -1
i16 PendingOuches[4]{};//16566// Main loop 'or's these to characters' ouches
i16 PendingDamage[4]{};//16558// Main loop subtracts from HP
i8 Byte16550{};
FILL(16549,16482)
// 3328 bytes read into byte16482 .... 16482-3328 = 13154
CHARDESC CH16482[4]{}; //part of 16482
i16 Brightness{}; //13282;//part of 16482 //swapped when read
i8 SeeThruWalls{};//13280;//part of 16482
i8 MagicFootprintsActive{}; //Byte13279; //part of 16482
i16 PartyShield{};// Word13278; //part of 16482 //Party shield timer
i16 FireShield{};//Word13276; //part of 16482 //Spell effect
i16 SpellShield{};//Word13274; //part of 16482 //Spell effect
i8 NumFootprintEnt{};//13272;//part of 16482 #entries in 13268???
ui8 freezeLifeTimer{};// uByte13271; //part of 16482 //Life frozen time
i8 IndexOfFirstMagicFootprint{}; //Byte13270; //part of 16482 index of entry in 13268
i8 IndexOfLastMagicFootprint{}; //Byte13269; //part of 16482 index of entry in 13268
i16 PartyFootprints[24]{};//Word13268[24]; //part of 16482 history of moves???
// bits 0-4 = mapX
// bits 5_9 = mapY
// bits 10_15 = level
i8 Byte13220[24]{}; // parallels 13268??
// Is this a once-only kind of thing?
i8 Invisible{}; //13196;//part of 16482
i8 Byte13195[41]{}; //part of 16482
///////////// End of Character portion of save file /////////////
i16 DelayedActuatorActionPos{};//13154; // -1 means position ignored?
i16 DelayedActuatorActionY{};//13152; //mapY
i16 DelayedActuatorActionX{};//13150; //mapX
i16 DelayedActuatorAction{};
i16 SupressPitDamage{};// 13146; //set to 1 when we climb rope
// Perhaps this is to avoid damage from
// falling into pit. This gets cleared
// after we fall one floor,
i16 NewPos{}; //13144; //objectPosition
//Set to new position by MoveObject
i16 NewDir{}; //13142;
//Set to new direction by MoveObject
i16 NewLevel{};//13140; //objectLevel
//Set to new level by MoveObject
i16 NewY{}; //13138; //Set to newY when party moves
//Set to newY by MoveObject
i16 NewX{}; //13136; //Set to newX when party moves.
//Set to newX by MoveObject
ui8 uByte13126[8]{};
i8 Byte13118{};
FILL(13117,13050)
i8 Byte13050[4]{}; // stack
i16 Word13046{}; // # entries in 13050
i16 moveOntoPartyPosition{};//Word13044;
i16 Word13042{};
RN Obj13040{};
i16 Word13038{};
i16 FluxCageCount{}; //Word13036;
i8 FluxCages[4]{}; // for each direction. Byte13034[4];
i8 DirectionHasBeenTested[4]{}; //Byte13030[4]; // each directioon. (PossibleMove())
i16 SecondaryDirectionToParty{}; //Word13026;
i16 PrimaryDirectionToParty{};//Word13024; //
i16 OrthogonalDistance2Party{}; // Word13022; // used while computing monster movement
RN LastMonsterMoved{}; //Obj13020; //Any timer 29 to 41.
i16 monsterY{}; //Word13018;
i16 monsterX{}; //Word13016; Most recently processed monster movement timer
i16 ITEM16QueLen{};//13014;
i16 MaxITEM16{}; //13012;//#entries in 13010. 60 under some circumstances.
private:
i16 unused13002{}; //firstAvailTimer;//13002;
i16 unused13000{}; //numTimer;//13000; // ++/-- counter
i16 unused12990{}; //MaxTimers;//12990; //# items in Pointer12994 and 12998 array?
public:
// i16 FirstAvailTimer(){return firstAvailTimer;};
// void FirstAvailTimer(i32 v){firstAvailTimer=(i16)v;};
// void IncrementFirstAvailTimer(){firstAvailTimer++;};
// i16 NumTimer() {return numTimer;};
// void NumTimer(i16 v) {numTimer=v;};
// void DecrementNumTimer(){numTimer--;};
// void IncrementNumTimer(){numTimer++;};
// TIMER *pTimer(i32 index) {return Timers + index;};
// i16 TimerQue(i32 index) {return timerQue[index];};
// void TimerQue(i32 index, i16 val){timerQue[index]=val;};
// i16 MaxTimer(){return MaxTimers;};
// void MaxTimer(i32 v){MaxTimers=(i16)v;};
pnt Pointer12988[6]{};
i16 Word12964{}; // These two words set by
i16 Word12962{}; // function that determines damage due to missile
// 12962 a function of damage???
// 12964 = 1, 3, 5, or 7???
i16 unused12960{}; //MissileDelay; // Word12960;
// Shooter sets to 1 during launch so missile
// will not stop before leaving the wall.
i16 MonsterDamageResult{}; //0=none died; 1=some but not all died; 2=all died;Word12958;
DIRECTION SecondaryDirection{}; //Dir12956; // Set to random 1 or 3 when bump into wall
i16 PrintColumn{};//12930; // Current scrolling text column number.
i16 PrintRow{};//12928; In scrolling area. 0 to 3
i16 PushTextUp{}; //12918 used in vertical blank handler
i16 TextScanlineScrollCount{}; //12916; //
// This is the number of lines of Pointer12922
// that have already been scrolled onto the
// text area at the bottom of the screen.
// Set to -1 if no text is in Pointer12922.
// Set to 0 when a new text line needs to be scrolled into the window
char Byte12914[128]{};
//FILL(12913,12786)
i16 VBLInterruptActive{}; //Word11990; // used in vertical blank handler
i16 unused11988{}; //Word11988; // used in vertical blank handler
PALETTE Palette11978{};
PALETTE Palette11946{}; // Current palette???
PALETTE Palette11914{}; // Used as palette
FILL(11882,11850)
i8 Byte11850{};
FILL(11849,11782)
i16 Word11778{}; // used in vertical blank handler
i16 Word11776{}; // used in vertical blank handler
i16 FlashButnActive{}; //Word11774;
i16 FlashButnY2{}; //Word11772; //
i16 FlashButnY1{}; //Word11770; //
i16 FlashButnX2{}; //Word11768; //
i16 FlashButnX1{}; //Word11766; //
i16 Word11764{}; // Menu option result???
i16 QuitPressingMouth{};
i16 PressingMouth{}; // Set when showing food/water
i16 QuitPressingEye{};
i16 PressingEye{};//Word11756; // Set when showing skill levels or viewing object with eye
i16 unused11754{}; //Word11754;
i16 Unused11752{};//Word11752;
i16 Word11750{}; // used in vertical blank handler
i16 newPartyLevel{}; //Word11748;
i16 ShowCursor1{}; //Word11746;
i16 ShowCursor16572{}; // Word11744;
i16 ViewportUpdated{}; //11742;
// Set when new Viewport has been created. VBLinterrupt
// then copies Viewport to screen and clears the flag.
i16 Word11740{};
i16 DynamicPaletteSwitching{};//11738;
// During the adventuring state we change the
// palette twice during each vertical scan. The
// portraits get Palette11978, the viewport and
// buttons get Palette11946, and the text gets
// Palette11978 again.
i16 clockTick{}; //11736;// Every 'Speed' vbls.
// Also set by player actions .
FILL(11734,11732)
i32 Long11732{}; // compared to 11718 = Time. Set equal to
// Time when a game is loaded.
i16 Speed{}; // 11728; Number of VBLs per "clockTick"(11736)
i16 vblCount{}; //11726; // Increment by vbl interrupt.
// Cleared in main loop.
i16 Unused11724{}; //Always zero. I removed it.Word11724; // bit 0 important
i16 Word11722{}; // bit 0 important
i16 Unused11720{}; // Always zeroWord11720;
i16 Word11714{}; // Restored from Game Save file ; Direction of last THROW
i16 Word11712{}; // Restored from Game Save file ; Party movement disable timer after a 'THROW'
// ; To prevent running into object thrown???
i16 partyMoveDisableTimer{}; //Word11710; // Restored from Game Save file ; Party movement disable timer
i16 partyLevel{}; // 11708 See TAG016e54
i16 partyFacing{}; // 11706
i16 partyY{}; // 11704;
i16 partyX{}; // 11702
i16 NumCharacter{}; //11700; // # characters????
// 11698 seems to be an index into an array of palettes
// in TAG00c202 this number is divided by 2.
i16 CurrentPalette{}; //11698// used in vertical blank handler
// Palette to use based on light level
// (d.Brightness) plus torches
i16 GameIsLost{}; //Word11696; // The game is lost.
//There are no living characters.
i16 Word11694{}; //Set when game is won.
//This stops monster movement, prevents
//processing of Timer function 24, and
//stops any damage to characters.
i16 ClockRunning{};//11692
i16 PartySleeping{};//11690;
i16 PotentialCharacterOrdinal{};//11688; // Almost but not quite added to party
i16 gameState{}; //Word11686; See enum GAMESTATE
i16 Word11684{}; // Set when menu is showing???
// viewport
i8 Byte11678{};
FILL(11677,11270)
i16 Word11270{};
FILL(11268,10654)
ui8 LevelCleared[16]{};//10654;//One per DBNum. Initially all zero.
//This is the level we most recently discared
//and object from when we needed room for
//additional objects.
i8 Byte10638{};
FILL(10637,10574)
RN rn10574[5]{};// Is RN right??? Is 5 right???
BUTTON_DEF ViewportObjectButtons[6]{};//10564;
// DrawViewport constructs a button for
// each object that can be clicked.
RN unused10540{}; //rn10540; //Replaced by entries in SUUMARIZEROOMDATA
//This used to conatain the wall text record
i16 unused10538{};//ChampionPortraitOrdinal;//Word10538;
i16 FacingWaterFountain{};//Word10536; Fountain immediately in front of party
i16 FacingViAltar{}; //Word10534;
i16 FacingAlcove{};//Word10532 ; Alcove immediately in front of party.
i16 CellTypeJustAhead{};//10530;
// Cell type of cell immediately ahead of party
// Set by DrawCellF1 // Convert to/from ROOMTYPE
// because we need it to be 16 bits.
//DBCOMMON *misc10528[16];
pnt unused10528[16]{}; // Placeholder.
//This has been replaced by an instance of DATABASES named "db".
// Array of pointers to miscellaneous data.
// Each points to an array. The dungeonDatIndex[i+6]
// defines the number of entries read from dungeon.dat
// and is updated to the total number of entries at runtime.
// Byte7302[i] defines the number of extra entries
// allocated for each array. And Byte7286[i] defines
// the (byte) size of each entry. The empty entries
// have word 0 set to -1. Several of the arrays
// have zero space allocated.
// 0 - 4 + 0 4-byte entries //Doors???
// word2 bit 0 = door condition???
// 1 - 0 + 0 6-byte entries
// 2 - 26 + 0 2-word entries both words swapped when read
// 2nd word is Compressed Text ID.
// 3 - 30 + 0 8-byte entries
// First guess. Pressure pad????
// Databases 0, 1, 2, and 3 cannot be drawn?????
// 4 - 12 + 75 16-byte entries //Entries class DB4
// I guess type 4 is monsters. Just a guess.
// ITEM16.word0 contains an index into this dataase.
// 5 - 0 + 100 4-byte entries
// A torch seems to be in DB5.
// A sword
// 6 - 0 + 120 4-byte entries
// A small Shield is in DB6
// 7 - 0 + 0 4-byte entries
// Text (scroll???)
// 8 - 0 + 5 4-byte entries
// 9 - 0 + 0 8-byte entries // Chests???
// 10 - 0 + 140 4-byte entries //BITS0_6(word[1])+127=weaponIndex???
// corn // word2 = 0x..85 bones; chIdx in bits 14,15
// 11 - 0 + 0 0-byte entries
// 12 - 0 + 0 0-byte entries
// 13 - 0 + 0 0-byte entries
// 14 - 0 + 60 8-byte entries //Entries class DB14
//Fireball??? Missile???
// //word 6 = timer index
// 15 - 0 + 50 4-byte entries