Skip to content

Commit 2806b02

Browse files
committed
Correct 1555 DDS support.
1 parent 2f18b40 commit 2806b02

File tree

1 file changed

+7
-5
lines changed
  • xivModdingFramework/Textures/FileTypes

1 file changed

+7
-5
lines changed

xivModdingFramework/Textures/FileTypes/DDS.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public static class DDS
5858
{ (uint)BitConverter.ToInt32(Encoding.ASCII.GetBytes("BC4U"), 0) , XivTexFormat.BC4 },
5959
{ (uint)BitConverter.ToInt32(Encoding.ASCII.GetBytes("ATI2"), 0) , XivTexFormat.BC5 },
6060
{ (uint)BitConverter.ToInt32(Encoding.ASCII.GetBytes("BC5U"), 0) , XivTexFormat.BC5 },
61+
{ (uint)BitConverter.ToInt32(Encoding.ASCII.GetBytes("AR15"), 0) , XivTexFormat.A1R5G5B5 },
6162

6263
//ARGB 16F
6364
{ 0x71, XivTexFormat.A16B16G16R16F },
@@ -66,13 +67,9 @@ public static class DDS
6667
{ 0, XivTexFormat.A8R8G8B8 }
6768
};
6869

69-
internal static uint GetDDSType(XivTexFormat format)
70-
{
71-
return DdsTypeToXivTex.FirstOrDefault(x => x.Value == format).Key;
72-
}
73-
7470
/// <summary>
7571
/// 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.
7673
/// </summary>
7774
internal static readonly Dictionary<uint, XivTexFormat> DxgiTypeToXivTex = new Dictionary<uint, XivTexFormat>
7875
{
@@ -85,6 +82,11 @@ internal static uint GetDDSType(XivTexFormat format)
8582
{(uint)DDS.DXGI_FORMAT.DXGI_FORMAT_R16G16B16A16_FLOAT, XivTexFormat.A16B16G16R16F },
8683
{(uint)DDS.DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM, XivTexFormat.A8R8G8B8 }
8784
};
85+
86+
internal static uint GetDDSType(XivTexFormat format)
87+
{
88+
return DdsTypeToXivTex.FirstOrDefault(x => x.Value == format).Key;
89+
}
8890
internal static uint GetDxgiType(XivTexFormat format)
8991
{
9092
return DxgiTypeToXivTex.FirstOrDefault(x => x.Value == format).Key;

0 commit comments

Comments
 (0)