Skip to content

Commit

Permalink
Change localization, fix PlatformType JSON not being read
Browse files Browse the repository at this point in the history
  • Loading branch information
iMrShadow committed Oct 13, 2024
1 parent 7634a52 commit af7637e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using TelltaleTextureTool.Main;
using TelltaleTextureTool.Telltale.FileTypes.D3DTX;
using Avalonia.Media.Imaging;
using SkiaSharp;
using System.Runtime.InteropServices;
using TelltaleTextureTool.TelltaleEnums;
using TelltaleTextureTool.Graphics;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public static string GetTextureDebugInfo(TexMetadata metadata)
{
StringBuilder information = new();

information.AppendLine("||||||||||| DDS Debug Information |||||||||||");
information.AppendLine("||||||||||| Debug Information |||||||||||");
information.AppendLine($"Width: {metadata.Width}");
information.AppendLine($"Height: {metadata.Height}");
information.AppendLine($"Depth: {metadata.Depth}");
Expand Down
8 changes: 2 additions & 6 deletions TelltaleTextureTool/TelltaleTextureTool/Main/D3DTX_Master.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public void WriteFinalD3DTX(string destinationPath)
{
using BinaryWriter writer = new(File.Create(destinationPath));

metaHeaderObject.WriteToBinary(writer,Game, Platform, true);
metaHeaderObject.WriteToBinary(writer, Game, Platform, true);
d3dtxObject.WriteToBinary(writer, Game, Platform, true);
}

Expand Down Expand Up @@ -284,6 +284,7 @@ public void ReadD3DTXJSON(string filePath)
int d3dtxObjectIndex = 2;

Game = TelltaleToolGameExtensions.GetTelltaleToolGameFromString(firstObject.ToObject<D3DTX_JSON>().GameID);
Platform = firstObject.ToObject<D3DTX_JSON>().PlatformType;

// I am creating the metaObject again instead of using the firstObject variable and i am aware of the performance hit.
JObject? metaObject = jarray[metaObjectIndex] as JObject;
Expand All @@ -296,11 +297,6 @@ public void ReadD3DTXJSON(string filePath)
CreateD3DTX(Game, jsond3dtxObject);

d3dtxMetadata = d3dtxObject.GetD3DTXMetadata();

Console.WriteLine("METADATA JSON");
Console.WriteLine(d3dtxMetadata.MipLevels);
Console.WriteLine(d3dtxMetadata.RegionHeaders.Length);
Console.WriteLine(d3dtxMetadata.Format);
}

public void ConvertJSONObjectToD3dtx(JObject jObject)
Expand Down

0 comments on commit af7637e

Please sign in to comment.