Extraction of other resource mappings
This commit is contained in:
+12
-10
@@ -82,23 +82,24 @@ var extensionTypes = map[string]uint16{
|
||||
"txi": 0x07E6,
|
||||
"git": 0x07E7,
|
||||
"uti": 0x07E9,
|
||||
"utt": 0x07EA,
|
||||
"utc": 0x07EB,
|
||||
"dlg": 0x07ED,
|
||||
"itp": 0x07EE,
|
||||
"uts": 0x07F0,
|
||||
"utt": 0x07F0,
|
||||
"dds": 0x07F1,
|
||||
"uts": 0x07F3,
|
||||
"fac": 0x07F6,
|
||||
"gff": 0x07F7,
|
||||
"ute": 0x07F9,
|
||||
"utd": 0x07FB,
|
||||
"ute": 0x07F8,
|
||||
"utd": 0x07FA,
|
||||
"utp": 0x07FC,
|
||||
"dfa": 0x07FD,
|
||||
"gic": 0x07FE,
|
||||
"gui": 0x07FF,
|
||||
"utm": 0x0800,
|
||||
"utm": 0x0803,
|
||||
"dwk": 0x0804,
|
||||
"pwk": 0x0805,
|
||||
"utg": 0x0807,
|
||||
"jrl": 0x0808,
|
||||
"utw": 0x080A,
|
||||
"ssf": 0x080C,
|
||||
@@ -146,23 +147,24 @@ var typeExtensions = map[uint16]string{
|
||||
0x07E6: "txi",
|
||||
0x07E7: "git",
|
||||
0x07E9: "uti",
|
||||
0x07EA: "utt",
|
||||
0x07EB: "utc",
|
||||
0x07ED: "dlg",
|
||||
0x07EE: "itp",
|
||||
0x07F0: "uts",
|
||||
0x07F0: "utt",
|
||||
0x07F1: "dds",
|
||||
0x07F3: "uts",
|
||||
0x07F6: "fac",
|
||||
0x07F7: "gff",
|
||||
0x07F9: "ute",
|
||||
0x07FB: "utd",
|
||||
0x07F8: "ute",
|
||||
0x07FA: "utd",
|
||||
0x07FC: "utp",
|
||||
0x07FD: "dfa",
|
||||
0x07FE: "gic",
|
||||
0x07FF: "gui",
|
||||
0x0800: "utm",
|
||||
0x0803: "utm",
|
||||
0x0804: "dwk",
|
||||
0x0805: "pwk",
|
||||
0x0807: "utg",
|
||||
0x0808: "jrl",
|
||||
0x080A: "utw",
|
||||
0x080C: "ssf",
|
||||
|
||||
@@ -97,3 +97,34 @@ func TestExtensionMappingsSupportModernAssetTypes(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestExtensionMappingsSupportAllUTBlueprintTypes(t *testing.T) {
|
||||
cases := map[string]uint16{
|
||||
"uti": 0x07E9,
|
||||
"utc": 0x07EB,
|
||||
"utt": 0x07F0,
|
||||
"uts": 0x07F3,
|
||||
"ute": 0x07F8,
|
||||
"utd": 0x07FA,
|
||||
"utp": 0x07FC,
|
||||
"utm": 0x0803,
|
||||
"utg": 0x0807,
|
||||
"utw": 0x080A,
|
||||
}
|
||||
for ext, wantType := range cases {
|
||||
gotType, ok := ResourceTypeForExtension(ext)
|
||||
if !ok {
|
||||
t.Fatalf("expected %s to resolve to a resource type", ext)
|
||||
}
|
||||
if gotType != wantType {
|
||||
t.Fatalf("expected %s type 0x%04X, got 0x%04X", ext, wantType, gotType)
|
||||
}
|
||||
gotExt, ok := ExtensionForResourceType(wantType)
|
||||
if !ok {
|
||||
t.Fatalf("expected type 0x%04X to resolve back to an extension", wantType)
|
||||
}
|
||||
if gotExt != ext {
|
||||
t.Fatalf("expected type 0x%04X to resolve to %s, got %s", wantType, ext, gotExt)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user