@@ -58,6 +58,7 @@ public static class DDS
58
58
{ ( uint ) BitConverter . ToInt32 ( Encoding . ASCII . GetBytes ( "BC4U" ) , 0 ) , XivTexFormat . BC4 } ,
59
59
{ ( uint ) BitConverter . ToInt32 ( Encoding . ASCII . GetBytes ( "ATI2" ) , 0 ) , XivTexFormat . BC5 } ,
60
60
{ ( uint ) BitConverter . ToInt32 ( Encoding . ASCII . GetBytes ( "BC5U" ) , 0 ) , XivTexFormat . BC5 } ,
61
+ { ( uint ) BitConverter . ToInt32 ( Encoding . ASCII . GetBytes ( "AR15" ) , 0 ) , XivTexFormat . A1R5G5B5 } ,
61
62
62
63
//ARGB 16F
63
64
{ 0x71 , XivTexFormat . A16B16G16R16F } ,
@@ -66,13 +67,9 @@ public static class DDS
66
67
{ 0 , XivTexFormat . A8R8G8B8 }
67
68
} ;
68
69
69
- internal static uint GetDDSType ( XivTexFormat format )
70
- {
71
- return DdsTypeToXivTex . FirstOrDefault ( x => x . Value == format ) . Key ;
72
- }
73
-
74
70
/// <summary>
75
71
/// A dictionary containing the int representations of known DXGI header extension enum values to Xiv Tex Enum
72
+ /// These are only used if the format does not appear in the previous dictionary (DdsTypeToXivTex) above.
76
73
/// </summary>
77
74
internal static readonly Dictionary < uint , XivTexFormat > DxgiTypeToXivTex = new Dictionary < uint , XivTexFormat >
78
75
{
@@ -85,6 +82,11 @@ internal static uint GetDDSType(XivTexFormat format)
85
82
{ ( uint ) DDS . DXGI_FORMAT . DXGI_FORMAT_R16G16B16A16_FLOAT , XivTexFormat . A16B16G16R16F } ,
86
83
{ ( uint ) DDS . DXGI_FORMAT . DXGI_FORMAT_B8G8R8A8_UNORM , XivTexFormat . A8R8G8B8 }
87
84
} ;
85
+
86
+ internal static uint GetDDSType ( XivTexFormat format )
87
+ {
88
+ return DdsTypeToXivTex . FirstOrDefault ( x => x . Value == format ) . Key ;
89
+ }
88
90
internal static uint GetDxgiType ( XivTexFormat format )
89
91
{
90
92
return DxgiTypeToXivTex . FirstOrDefault ( x => x . Value == format ) . Key ;
0 commit comments