-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathfpk.grammar
36 lines (36 loc) · 2.32 KB
/
fpk.grammar
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
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.0.3.10">
<grammar name="Civilization IV FPK grammar" start="FPK file" author="Kelvin Chung" fileextension="fpk">
<description>Grammar for Civilizaiton IV FPK files</description>
<structure name="FPK file" id="3341" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="Version" mustmatch="yes" id="3342" type="integer" length="4">
<fixedvalue value="4"/>
</number>
<string name="Identifier" mustmatch="yes" id="3343" type="fixed-length" length="4" encoding="ISO_8859-1:1987">
<fixedvalue value="FPK_"/>
</string>
<number name="Version 2" mustmatch="yes" id="3344" type="integer" length="1">
<fixedvalue value="1"/>
</number>
<number name="Number of Files" id="3345" fillcolor="FCFC3E" type="integer" length="4"/>
<structure name="File Headers" id="3346" repeat="id:3345" repeatmax="unlimited" consists-of="File Header">
<structref name="File Header" id="3348"/>
</structure>
</structure>
<structure name="File Header" id="3347" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="Filename Length" id="3351" fillcolor="FE9227" type="integer" length="4"/>
<structure name="Filename" id="3352" length="prev.Filename Length">
<binary name="Filename" id="3353"/>
</structure>
<structure name="Filename Padding" id="3355" length="this.Padding Length" repeatmin="0" fillcolor="7B82F6">
<number name="Padding Length" mustmatch="yes" id="3356" fillcolor="FCFC3E" type="integer" length="1" minval="1" maxval="3"/>
</structure>
<number name="Checksum" id="3358" fillcolor="FCFC3E" type="integer" length="8" display="hex"/>
<number name="File Length" id="3359" strokecolor="FCFC3E" fillcolor="FE9227" type="integer" length="4"/>
<offset name="File" id="3361" strokecolor="FCFC3E" fillcolor="FF30FA" length="4" references="File" referenced-size="id:3359"/>
</structure>
<structure name="File" id="3360" encoding="ISO_8859-1:1987" endian="big" signed="no">
<binary name="File Data" id="3363"/>
</structure>
</grammar>
</ufwb>