fix: png now 2080

This commit is contained in:
2026-06-08 19:39:27 +02:00
parent 55322dc7bf
commit 1a33c4e102
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -115,7 +115,7 @@ var extensionTypes = map[string]uint16{
"mtr": 0x0818, "mtr": 0x0818,
"jpg": 0x081C, "jpg": 0x081C,
"lod": 0x081E, "lod": 0x081E,
"png": 0x083E, "png": 0x0820,
"lyt": 0x0BB8, "lyt": 0x0BB8,
"vis": 0x0BB9, "vis": 0x0BB9,
"mdx": 0x0BC0, "mdx": 0x0BC0,
@@ -180,7 +180,7 @@ var typeExtensions = map[uint16]string{
0x0818: "mtr", 0x0818: "mtr",
0x081C: "jpg", 0x081C: "jpg",
0x081E: "lod", 0x081E: "lod",
0x083E: "png", 0x0820: "png",
0x0BB8: "lyt", 0x0BB8: "lyt",
0x0BB9: "vis", 0x0BB9: "vis",
0x0BC0: "mdx", 0x0BC0: "mdx",
+2 -2
View File
@@ -58,8 +58,8 @@ func TestExtensionMappingsKeep2DAAndTLKDistinct(t *testing.T) {
} }
func TestHAKResourceTypeForExtensionSupportsPNG(t *testing.T) { func TestHAKResourceTypeForExtensionSupportsPNG(t *testing.T) {
if resourceType, ok := HAKResourceTypeForExtension("png"); !ok || resourceType != 0x083E { if resourceType, ok := HAKResourceTypeForExtension("png"); !ok || resourceType != 0x0820 {
t.Fatalf("expected png to stay valid for HAK generation, got ok=%v type=0x%04X", ok, resourceType) t.Fatalf("expected png restype 0x0820 (2080) for HAK generation, got ok=%v type=0x%04X", ok, resourceType)
} }
if resourceType, ok := HAKResourceTypeForExtension("2da"); !ok || resourceType != 0x07E1 { if resourceType, ok := HAKResourceTypeForExtension("2da"); !ok || resourceType != 0x07E1 {
t.Fatalf("expected 2da to stay valid for HAK generation, got ok=%v type=0x%04X", ok, resourceType) t.Fatalf("expected 2da to stay valid for HAK generation, got ok=%v type=0x%04X", ok, resourceType)