-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMAP(gr).bt
1494 lines (1353 loc) · 36.4 KB
/
MAP(gr).bt
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
//------------------------------------------------
//--- 010 Editor v7.0 Binary Template ------------
//
// File: MAP(gr).bt
// Authors: Alexander Evdokimov
// Version: 0.8
// Purpose: Ghost Recon MAP file
// File Mask: *.map
//
// History:
//
// 2016.12 v0.1 initial release
//
// Notes:
// 1. When exporting from 3ds Max with developers export plugin:
// If 4 byte var stored in map file (int or float) is FFFFFFFF (hex) or 4294967295 (dec)
// then it wasn't set in 3ds max, so it's empty.
//------------------------------------------------
struct {
local byte check_enable = 0; // 1 - enable value checking | 0 - disable
} VARS <hidden=true>;
void Check(int value, int number, string str) {
if (VARS.check_enable) {
local string s1, s2;
SPrintf( s1, "%d", (int)value );
SPrintf( s2, "%d", (int)number );
if (value != number) {
MessageBox( idYes, "Warning", str + ": " + s1 + " not " + s2);
break;
};
};
};
typedef enum <ubyte> {
no,
yes
} BOOL; // bool data type
//typedef struct {
// UINT SectionSize;
// UINT MN;
// struct {
// UINT Length; // 8
// char Text[Length]; // "version"
// UINT Value;
// } VERSION_STRING;
// struct {
// UINT Length;
// char Text[Length];
// } NAME_STRING <name="Name">;
//} SECTION_HEADER <name=HeaderName>;
struct {
struct {
UINT Length; //
char Text[Length]; // BeginMapv4.0
} BEGINMAP_STRING <name="File ID (Signature)">;
struct {
time_t CreateDate <name="File Creation Date">;
} DATETIME <name="File DATETIME">;
} MAPHEADER <name="MAP Header", fgcolor=cBlack, bgcolor=0xccff66>;
//------------------------------------------------
// Section - MaterialList
//------------------------------------------------
typedef struct {
struct {
UINT SectionSize;
UINT MN; // 2
Check(MN, 2, "Material Section Header MN");
struct {
UINT Length; // 8
char Text[Length]; // "version"
UINT Value; // 2
} VERSION;
Check(VERSION.Value, 2, "Material Section Header Version value");
struct {
UINT Length;
char Text[Length]; //
} MATERIAL_NAME_STRING <name="Material Name">;
} HEADER <name="Material Section Header">;
struct {
FLOAT Opacity; // 0..1, 1 - default
UINT Faceted; // 0 - on, 3 - unset
//Check(Faceted, 0, "isFaceted");
struct {
struct {
FLOAT Red;
FLOAT Green;
FLOAT Blue;
FLOAT mn; // 1
Check(mn, 1, "AMBIENT MN");
} AMBIENT;
struct {
FLOAT Red;
FLOAT Green;
FLOAT Blue;
FLOAT mn; // 1
Check(mn, 1, "DIFFUSE MN");
} DIFFUSE;
struct {
FLOAT Red;
FLOAT Green;
FLOAT Blue;
FLOAT mn; // 1
Check(mn, 1, "SPECULAR MN");
} SPECULAR;
} COLORS <name="Colors">; // you can change theme if there is no material (texture) assigned to the object otherwise it's ignored by GRE
FLOAT SpecularLevel; //
BOOL twoSided <name="2-Sided">;
} PARAMETRES;
} MATERIAL <name=MaterialName>;
typedef struct {
struct {
UINT SectionSize;
UINT MN; // 38
Check(MN, 38, "Textures section header MN");
struct {
UINT Length;
char Text[Length];
UINT Value; // 2
} VERSION;
Check(VERSION.Value, 2, "Textures section header Value");
struct {
UINT Length;
char Text[Length];
} TEXTURENAME_STRING <name="Texture Name">;
} HEADER <name="Textures section header">;
BOOL mn <comment="always 0">; // 0
struct {
UINT Length;
char Text[Length];
} TEXTURE_FILENAME_STRING <name="Texture .rsb file name">;
struct {
UINT AdvTransparencyType; // 0 - subtractive, 2 - additive, 3 - filter
UINT Tiled; // 1 - u tiled only, 2 - v tiled only, 3 - untiled
FLOAT SelfIllumination; // 0..1, 0 - default
} PARAMETERS;
} TEXTURE <name=TextureName>;
string MaterialName(MATERIAL &material) {
return "Name: " + material.HEADER.MATERIAL_NAME_STRING.Text + " ";
}
string TextureName(TEXTURE &texture) {
return "FileName: " + texture.TEXTURE_FILENAME_STRING.Text + " ";
}
struct {
struct {
UINT SectionSize;
UINT MN; // 8
Check(MN, 8, "MaterialList Section Header MN");
struct {
UINT Length;
char Text[Length];
UINT Value; // 3
} VERSION;
Check(VERSION.Value, 3, "MaterialList Section Header Version value");
struct {
UINT Length; //
char Text[Length]; //
} MATERIALLIST_STRING;
} HEADER <name="1.0 MaterialList section header">;
struct {
UINT Count <name="Materials Count">;
typedef struct (int arraySize) {
MATERIAL array[arraySize] <optimize=false>;
} MATERIAL_ARRAY;
MATERIAL_ARRAY MaterialArray(Count) <name="Material Array">;
} MATERIALS <name="1.1 Materials section">;
struct {
UINT Count <name="Textures Count">;
if (Count > 0) {
typedef struct (int arraySize) {
TEXTURE array[arraySize] <optimize=false>;
} TEXTURE_ARRAY;
TEXTURE_ARRAY TextureArray(Count) <name="Textures Array">;
};
} TEXTURES <name="1.2 Textures section">;
} MAPMATERIALLIST <name="1. MaterialList section">;
//------------------------------------------------
// Section - GeometryList
//------------------------------------------------
typedef enum <uint> {
Carpet,
Concrete,
Wood,
Metal,
Asphalt,
Sand,
LowGrass,
HighGrass,
Puddle,
Water,
Drywall,
ThinMetal,
ThickMetal,
MetalGasTank,
SteamPipe,
ElectricalPanel,
Snow,
SafetyGlass,
BulletResistantGlass,
Ice,
Mud,
Glass,
Foliage,
Gravel,
GlassShards,
CreakyWood,
DeepSand,
BakedClay,
unset = 4294967295
} SURFACE_PROPERTY;
typedef struct {
UINT Length;
char Name[Length]; //
BYTE FloorPolygon; // 2 - non colidable 2d, 10 - non colidable 3d, 26 - 3
BYTE CarvingBoundary; // 1 - Carving Boundary 2 - cannot carve
BYTE MN; // 0
Check(MN, 0, "POLYGON_PARAMETERS 1");
BYTE MN; // 0
Check(MN, 0, "POLYGON_PARAMETERS 2");
SURFACE_PROPERTY SurfaceProperty <name="Surface Property">; // 0 - 12
} POLYGON_PROPERTIES <name=PPName>;
string PPName(POLYGON_PROPERTIES &polygonproperties) {
return "Name: " + polygonproperties.Name;
}
typedef struct {
UINT Length;
char PointName[Length];
struct {
struct {
FLOAT x;
FLOAT y;
FLOAT z;
} XAXIS;
struct {
FLOAT x;
FLOAT y;
FLOAT z;
} YAXIS;
struct {
FLOAT x;
FLOAT y;
FLOAT z;
} ZAXIS;
struct {
FLOAT Y;
FLOAT X;
FLOAT Z;
} POSITION;
} TRANSFORMATION_MATRIX;
} POINT <name=Point_Name>;
string Point_Name (POINT &point) {
return "Name: " + point.PointName;
};
typedef struct {
struct {
UINT SectionSize;
UINT MN; // 4 - rooms, 35 - others
//Check(MN, 4, "Section Header MN");
struct {
UINT Length; //
char Text[Length]; //
UINT Value; // 8
} VERSION;
Check(VERSION.Value, 8, "Section Header Version value");
struct {
UINT Length; //
char Text[Length]; //
} NAME_STRING;
} HEADER <name="Section header">;
struct {
UINT SectionSize;
UINT MN; // 4 - rooms, 3 - others
//Check(MN, 4, "Object section header MN");
struct {
UINT Length; //
char Text[Length]; //
UINT Value; // 8
} VERSION;
Check(VERSION.Value, 8, "Object section header VERSION.Value");
struct {
UINT Length; //
char Text[Length]; //
} NAMESTRING;
BOOL DarkMapped <name="DarkMapped">; // 1 - rooms, 0 - other
//Check(DarkMapped, 1, "DarkMapped");
BOOL CastShadows <name="CastShadows">;
} SUBSECTION_HEADER <name="Object section header">;
struct {
UINT VertexCount;
typedef struct {
FLOAT X;
FLOAT Y;
FLOAT Z;
} VERTEX <name="VERTEX">;
typedef struct (int arraySize) {
VERTEX array[arraySize] <optimize=false>;
} VERTEX_ARRAY;
VERTEX_ARRAY VertexArray(VertexCount) <name="Object vertices array">;
} VERTICES <name="Object vertices section">;
struct {
UINT Count;
typedef struct {
struct {
BOOL mn; // 1
Check(mn, 1, "Texture PARAMETERS");
BOOL UseDetailedDarkmap;
BOOL DetailTexture;
UINT MaterialIndex;
UINT isTextured;
if (isTextured > 0) {
UINT TextureIndex;
if (DetailTexture == yes || isTextured > 1) {
UINT DetailTextureIndex;
};
};
struct {
UINT MN; // 1
Check(mn, 1, "Map MN");
UINT SelfIlluminationMap;
UINT SpecularMap;
UINT BumpMap;
UINT ReflectionMap;
UINT MapCount;
} MAP;
} PARAMETERS;
struct {
UINT FaceCount;
typedef struct {
FLOAT X;
FLOAT Y;
FLOAT Z;
FLOAT DistanceOriginFace; // Distance from object origin to face, sign defines direction of normal vector
} FACE_NORMAL <name="Normal">;
typedef struct (int arraySize) {
FACE_NORMAL array[arraySize] <optimize=false>;
} FACE_NORMAL_ARRAY;
FACE_NORMAL_ARRAY FaceNormalArray(FaceCount) <name="Normals">;
typedef struct {
UINT16 P1;
UINT16 P2;
UINT16 P3;
} FACE_INDICIES;
typedef struct (int arraySize) {
FACE_INDICIES array[arraySize] <optimize=false>;
} FACE_INDICIES_ARRAY;
FACE_INDICIES_ARRAY FaceIndiciesArray(FaceCount) <name="Faces index array">;
typedef struct {
UINT16 P1;
UINT16 P2;
UINT16 P3;
} TEXTURE_INDICIES <name="Texture indicies">;
typedef struct (int arraySize) {
TEXTURE_INDICIES array[arraySize] <optimize=false>;
} TEXTURE_INDICIES_ARRAY;
TEXTURE_INDICIES_ARRAY TextureIndiciesArray(FaceCount) <name="Texture index array">;
} FACES <name="Faces">;
struct {
UINT VerticiesCount; // ?
UINT TextureCount;
typedef struct {
FLOAT X;
FLOAT Y;
FLOAT Z;
} NORMAL_COORDINATES <name="Normal">;
typedef struct (int arraySize) {
NORMAL_COORDINATES array[arraySize] <optimize=false>;
} NORMAL_COORDINATES_ARRAY;
NORMAL_COORDINATES_ARRAY NormalCoordinatesArray(VerticiesCount) <name="Normal Coordinates">;
if (TextureCount > 0) {
typedef struct {
FLOAT U;
FLOAT V;
} TEXTURE_UVCOORDINATES <name="UV coordinates">;
typedef struct (int arraySize) {
TEXTURE_UVCOORDINATES array[arraySize] <optimize=false>;
} TEXTURE_UVCOORDINATES_ARRAY;
TEXTURE_UVCOORDINATES_ARRAY TextureCoordinatesArray(VerticiesCount*TextureCount) <name="Texture Coordinates">;
};
typedef struct {
FLOAT Red; // 0..1 (0..255 in RGB)
FLOAT Green;
FLOAT Blue;
FLOAT MN;
Check(MN, 1, " value");
} FACE_COLOR <name="Face RGB color">;
typedef struct (int arraySize) {
FACE_COLOR array[arraySize] <optimize=false>;
} FACE_COLOR_ARRAY;
FACE_COLOR_ARRAY CoordinatesArray(VerticiesCount) <name="Faces color array">;
} TEXTURE_VERTICIES <name="Texture data">;
} OBJECT_DATA;
typedef struct (int arraySize) {
OBJECT_DATA array[arraySize] <optimize=false>;
} OBJECT_DATA_ARRAY;
OBJECT_DATA_ARRAY MAPObjectsDataArray(Count) <name="Objects data array">;
} OBJECTS_DATA <name="Objects data section">;
// List of used taged HPs (3ds Max Helper Points) like special effects (e.g. water splashes),
// dynamic grass (foliage setup)
struct {
UINT Count;
//Check(MN, 0, "Points Count");
if (Count) {
typedef struct(int arraySize) {
POINT array[arraySize] <optimize=false>;
} POINT_ARRAY;
POINT_ARRAY MAPPointArray(Count) <name="Point array">;
}
} Points <name="Points section">;
struct {
UINT VerticiesCount;
if (VerticiesCount > 0) {
typedef struct {
FLOAT X;
FLOAT Y;
FLOAT Z;
} COVERTICE <name="Vertex">;
typedef struct (int arraySize) {
COVERTICE array[arraySize];
} COVERTICE_ARRAY;
COVERTICE_ARRAY COArray(VerticiesCount) <name="Vertex Array">;
};
UINT FaceCount;
if (FaceCount > 0) {
typedef struct {
FLOAT X;
FLOAT Y;
FLOAT Z;
FLOAT DistanceOriginFace;
} COLLISION_FACE_NORMALS <name="Face Normals">;
typedef struct (int arraySize) {
COLLISION_FACE_NORMALS array[arraySize];
} COLLISION_FACE_NORMALS_ARRAY;
COLLISION_FACE_NORMALS_ARRAY MAPCollisionFaceNormalsArray(FaceCount) <name="Face Normals Array">;
};
} CollisionObjects <name="2D-Collision (non-rendered) objects section">;
// Objects tagging properties
struct {
UINT ObjectsCount;
struct {
UINT Count; // Rendered objects count (visible in game)
if (Count > 0) {
typedef struct (int arraySize) {
POLYGON_PROPERTIES array[arraySize] <optimize=false>;
} POLYGON_PROPERTIES_ARRAY;
POLYGON_PROPERTIES_ARRAY PolygonsPropArray(Count) <name="Object Array">;
};
} POLYGONS <name="Poligons tagging">;
struct {
UINT Count; // // non-Rendered objects count (invisible in game)
if (Count > 0) {
typedef struct {
POLYGON_PROPERTIES pproperties;
UINT FCount;
typedef struct {
UINT16 p1;
UINT16 p2;
UINT16 p3;
UINT16 FIndex;
} NRO_FACE_INDICIES <name="Face Indicies">;
typedef struct (int arraySize) {
NRO_FACE_INDICIES array[arraySize] <optimize=false>;
} NRO_FACE_INDICIES_ARRAY;
NRO_FACE_INDICIES_ARRAY NROFaceIndiciesArray(FCount) <name="Face Indicies Array">;
} NON_REND_OBJECT <name="Object">;
typedef struct (int arraySize) {
NON_REND_OBJECT NonRendArray[arraySize] <optimize=false>;
} NONREND_OBJECT_ARRAY;
NONREND_OBJECT_ARRAY MAPNonRendObjectArray(Count) <name="Objects Array">;
};
} NONROBJECTS <name="Non-rendered objects section">;
} OBJECTSTAGGING <name="Tagging section">;
} GEOMETRY <name=ObjectName>;
string ObjectName(GEOMETRY &geometry) {
return "Name: " + geometry.HEADER.NAME_STRING.Text + " ";
}
struct { //
struct {
UINT SectionSize;
UINT MN; // 7
Check(MN, 7, "GeometryList Header MN");
struct {
UINT Length;
char Text[Length];
UINT Value; // 1
} VERSION;
Check(VERSION.Value, 1, "GeometryList Header MN");
struct {
UINT Length; //
char Text[Length]; //
} GEOMETRYLIST_STRING;
} HEADER <name="GeometryList Header">;
struct {
UINT Count <name="Object Count">;
typedef struct (int arraySize) {
GEOMETRY array[arraySize] <optimize=false>;
} GEOMETRY_ARRAY;
GEOMETRY_ARRAY GeometryArray(Count) <name="Object geometry data array">;
} GEOMETRYDATA <name="Geometry data section">;
} MAPGEOMETRYLIST <name="2. GeometryList Section">;
//------------------------------------------------------
// PortalList Section
//------------------------------------------------------
typedef struct {
struct {
UINT SectionSize;
UINT mn; // 0
Check(mn, 0, "PortalList section header mn");
struct {
UINT Length;
char Text[Length];
UINT Value; // 2
} VERSION_STRING;
Check(VERSION_STRING.Value, 2, "PortalList section header VersionString");
struct {
UINT Length;
char Text[Length];
} PORTAL_NAME_STRING;
} HEADER <name="Portal header">;
struct {
UINT VertexCount;
typedef struct {
FLOAT x;
FLOAT y;
FLOAT z;
} COORDINATES <name="Vertex Coordinates">;
COORDINATES CoordinatesArray[VertexCount];
UINT RoomNumber;
UINT OpositeRoomNumber;
BYTE mn; // 0
Check(mn, 0, "PortalList section header mn");
} PORTAL_PARAMS;
} PORTAL <name=PortalName>;
string PortalName(PORTAL &portal) {
return "Name: " + portal.HEADER.PORTAL_NAME_STRING.Text;
};
struct {
struct {
UINT SectionSize;
UINT mn; //9
Check(mn, 9, "PortalList section header mn");
struct {
UINT Length;
char Text[Length];
UINT Value; // 1
} VERSION_STRING;
Check(VERSION_STRING.Value, 1, "PortalList section header VersionString");
struct {
UINT Length;
char Text[Length];
} PORTALLIST_STRING;
} PORTALLIST_HEADER <name="PortalList section header">;
UINT Count;
typedef struct(int arraySize) {
PORTAL array[arraySize] <optimize=false>;
} PORTAL_ARRAY;
PORTAL_ARRAY MAPPORTAL_ARRAY(Count) <name="Portal Array">;
} PORTALLIST <name="3. PortalList section">;
//------------------------------------------------------------
// OccluderList Section
//------------------------------------------------------------
typedef struct {
struct {
UINT SectionSize;
UINT mn;
struct {
UINT Length;
char Text[Length];
UINT Value;
} VERSION_STRING;
struct {
UINT Length;
char Text[Length];
} OCCLUDER_NAME_STRING;
} HEADER <name="Occluder header">;
BYTE mnm[2];
UINT mn;
BYTE mnk[3];
UINT VertexCount;
typedef struct {
FLOAT X;
FLOAT Y;
FLOAT Z;
} OCCLUDER_VERTEX;
OCCLUDER_VERTEX VertexArray[VertexCount];
} OCCLUDER <name=OccluderName>;
string OccluderName(OCCLUDER &occluder) {
return "Name: " + occluder.HEADER.OCCLUDER_NAME_STRING.Text;
};
struct {
struct {
UINT SectionSize;
UINT mn;
struct {
UINT Length;
char Text[Length];
UINT Value;
} VERSION_STRING;
struct {
UINT Length;
char Text[Length];
} OCCLUDERLIST_STRING;
} OCCLUDERLIST_HEADER <name="OccluderList section header">;
UINT Count;
if (Count > 0) {
typedef struct(int arraySize) {
OCCLUDER array[arraySize] <optimize=false>;
} OCCLUDER_ARRAY;
OCCLUDER_ARRAY OccluderArray(Count) <name="Occluder Array">;
};
} OccluderList <name="4. OccluderList section">;
//----------------------------------------------------------------
// LightList Section
//---------------------------------------------------------------
struct {
struct {
UINT SectionSize;
UINT mn;
struct {
UINT StringLength;
char String[StringLength];
UINT number;
} VersionString;
struct {
UINT StringLength;
char OccluderList[StringLength];
} LightListString;
} LightListHeader <name="OccluderList section header">;
UINT Count;
struct {
typedef struct {
struct {
UINT SectionSize;
UINT mn;
struct {
UINT StringLength;
char String[StringLength];
UINT number;
} VersionString;
struct {
UINT StringLength;
char String[StringLength];
} GeometryListString;
} Header <name="Light header">;
UINT Count;
UINT LightType; // 0 - ambient, 6 - sun
FLOAT Angle;
FLOAT MN; // 0.3926991
FLOAT MN; // 0
FLOAT MN; // 0.5
FLOAT MN; // 0.5
FLOAT Atennuation;
FLOAT MN;
struct {
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
} direction;
struct {
FLOAT x;
FLOAT y;
FLOAT z;
} position;
FLOAT MN; // 0
FLOAT MN; // 0
FLOAT MN; // 0
FLOAT MN; // 0
FLOAT MN; // 0
FLOAT MN; // 0
BYTE AlwaysOn;
struct {
FLOAT Red;
FLOAT Green;
FLOAT Blue;
} Color;
FLOAT MN;
BYTE mn; // 1
BYTE CastShadows;
BYTE mn; // 0
BYTE Negative;
struct {
UINT StringLength;
char String[StringLength];
} NameString1;
struct {
UINT StringLength;
char String[StringLength];
} ProjectedTextureString;
UINT LinearAttenuation;
BYTE mn; // 0
BYTE DecayOn;
FLOAT DecayStart;
BYTE DynLightActors;
} Light;
typedef struct(int arraySize) {
Light array[arraySize] <optimize=false>;
} LightsArray;
LightsArray MAPLightsArray(Count);
} Lights;
} LightList <name="5. LightList section">;
//----------------------------------------------------------------
// VFogList Section
//---------------------------------------------------------------
struct {
struct {
UINT SectionSize;
UINT mn;
struct {
UINT Length;
char Text[Length];
UINT value;
} VERSION_STRING;
struct {
UINT Length;
char OccluderList[Length];
} FOGLIST_NAME_STRING;
} FOGLIST_HEADER <name="FogList section header">;
UINT Count;
} VFogList <name="6. VFogList section">;
//----------------------------------------------------------------
// ObjectList section
//---------------------------------------------------------------
typedef struct {
typedef struct {
UINT SectionSize;
UINT MN;
struct {
UINT Length; // 1
char Text[Length]; //
UINT Value;
} VERSION;
struct {
UINT Length; //
char Text[Length]; //
} NAME_STRING;
} FOHEADER;
typedef struct {
struct {
FLOAT x;
FLOAT y;
FLOAT z;
} XAxis;
struct {
FLOAT x;
FLOAT y;
FLOAT z;
} YAxis;
struct {
FLOAT x;
FLOAT y;
FLOAT z;
} ZAxis;
struct {
FLOAT Y;
FLOAT X;
FLOAT Z;
} Position;
} TRANSFORMATION_MATRIX2;
typedef struct {
UINT DynamicsType; // 2 - Pbomb (Parray)
FLOAT Duration;
FLOAT Strength;
FLOAT Range;
UINT ExplosionType; // 2 - Eponential
struct {
FLOAT X; // 0
FLOAT Y; // 0
FLOAT Z; // 1
} Position;
FLOAT MN;
FLOAT MN;
FLOAT MN;
UINT BlastSymmetry; // 1 - cylindrical
FLOAT StartTime;
FLOAT Chaos;
} SPACE_WARPS;
struct {
BYTE A;
UINT Y;
UINT SpawnOnDeath; // 1
FLOAT Z;
FLOAT Y;
FLOAT X;
FLOAT Z;
FLOAT Y;
BYTE X;
BYTE X;
UINT AA;
BYTE MN;
} HEADER;
UINT ParticleSystemType; // 0 - blizzard, 1 - snow, 2 - Spray, 3 - SuperSpray, 4 - PArray, 5 - PCloud
if (ParticleSystemType != 3) {
struct {
UINT Length; //
char Text[Length]; //
} Properties;
}
struct {
FLOAT Width; // IconSize
FLOAT Length; //
FLOAT Height; // 3D
} EMITTER_SIZE;
struct {
FLOAT ParticleSpeed; // Parray (units in sec) (Particle Motion Speed (units per frame) * 30)
FLOAT ParticleSpeedVariation; // %ParticleSpeed
} PARTICLE_MOTION;
struct {
FLOAT GrowFor; // Parray (Particle size Grow For / 30)
FLOAT FadeFor; // Parray (Particle size Fade For / 30)
} PARTICLE_Size;
struct {
FLOAT MN;
FLOAT MN;
} SOME;
struct {
FLOAT Life;
FLOAT LifeVariation;
} PARTICLE_TIMING;
struct{
FLOAT ParticleSize;
FLOAT ParticleSizeVariation;
} PARTICLE_SIZE;
struct {
FLOAT UseRate; // * 3
UINT UseTotal;
} PARTICLE_QUANTITY;
struct {
UINT SpinAxisControlType; // 0 - Random, 2- user defined
FLOAT XAxis;
FLOAT YAxis;
FLOAT ZAxis;
FLOAT Variation;
} SpinAxisControl ;
FLOAT MN; // 1
FLOAT MN; // 0
//
struct {
FLOAT OffAxis;
FLOAT Spread;
FLOAT OffPlane;
FLOAT Spread;
} PARTICLE_FORMATION;
//
struct {
FLOAT GrowFor;
FLOAT FadeFor;
} ParticleSize2;
FLOAT MN;
FLOAT MN;
UINT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
struct {
FLOAT SpinTime;
FLOAT SpinTimeVariation;
FLOAT Phase;
FLOAT PhaseVariation;
} SpinSpeedControls;
UINT particleType; // 2 - object fragments
UINT SpawnType; // 2 instanced geometry
struct {
UINT Spawns;
UINT Spawns;
FLOAT Spawn_Affects;
} SPAWN_EFFECTS;
FLOAT MN; // time
struct {
FLOAT EmiStart; // time
FLOAT EmiStop; // time
} PARTICLE_TIMING;
UINT MN;
struct {
UINT UseTotal; // * PercentageOfParticles
} PARTICLE_QUANTITY;
BYTE isTextured;
if (isTextured) {
UINT Length;
char TextureName[Length];
}
if (particleType == 2) {
typedef struct {
struct {
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
FLOAT MN;
} Some;
UINT Count;
FOHEADER F1;
struct {
UINT Length;
char Text[Length];
} ObjectProperties;
struct {
struct {
FLOAT x;