Skip to content

Commit

Permalink
Prioritize writing the JSON first
Browse files Browse the repository at this point in the history
  • Loading branch information
iMrShadow committed Oct 11, 2024
1 parent 03aa3f7 commit c6a4139
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions TelltaleTextureTool/TelltaleTextureTool/Converter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,13 @@ public static void ConvertTextureFromD3DtxToOthers(string sourceFilePath, string

var array = ddsFile.GetData(d3dtxFile);

d3dtxFile.WriteD3DTXJSON(Path.GetFileNameWithoutExtension(d3dtxFile.FilePath), destinationDirectory);

Texture texture = new(array, TextureType.D3DTX);

texture.TransformTexture(options, true, false);
texture.SaveTexture(Path.Combine(destinationDirectory, Path.GetFileNameWithoutExtension(sourceFilePath)), newTextureType);
texture.Release();

// Write the d3dtx data into a file
d3dtxFile.WriteD3DTXJSON(Path.GetFileNameWithoutExtension(d3dtxFile.FilePath), destinationDirectory);
}

/// <summary>
Expand Down

0 comments on commit c6a4139

Please sign in to comment.