diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 08c7af1c..e102d7a3 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide index 6da59415..cfc120b4 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index 80f0b0fc..484c8abf 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Switch_FileFormatsMain/FileFormats/Archives/TMPK.cs b/Switch_FileFormatsMain/FileFormats/Archives/TMPK.cs index 96df034e..a2258104 100644 --- a/Switch_FileFormatsMain/FileFormats/Archives/TMPK.cs +++ b/Switch_FileFormatsMain/FileFormats/Archives/TMPK.cs @@ -54,7 +54,8 @@ namespace FirstPlugin public void Load(System.IO.Stream stream) { TPFileSizeTable table = new TPFileSizeTable(); - table.Read(new FileReader("G:\\Wii U\\DATA\\USA\\GAMES\\THE LEGEND OF ZELDA Twilight Princess HD[000500001019E500]\\content\\FileSizeList.txt")); + table.Read(new FileReader($"{Runtime.TpGamePath}/FileSizeList.txt")); + table.Write(new FileWriter($"{Runtime.TpGamePath}/FileSizeListTEST.txt")); Text = FileName; diff --git a/Switch_FileFormatsMain/FileFormats/SizeLists/TPFileSizeTable.cs b/Switch_FileFormatsMain/FileFormats/SizeLists/TPFileSizeTable.cs index 1ddaf8c2..654bf98d 100644 --- a/Switch_FileFormatsMain/FileFormats/SizeLists/TPFileSizeTable.cs +++ b/Switch_FileFormatsMain/FileFormats/SizeLists/TPFileSizeTable.cs @@ -26,5 +26,14 @@ namespace FirstPlugin Console.WriteLine(FileName + " " + Size); } } + + public void Write(FileWriter writer) + { + foreach (var file in FileSizes) + { + writer.Write(file.Key, BinaryStringFormat.ZeroTerminated); + writer.Write(file.Value.ToString(), BinaryStringFormat.ZeroTerminated); + } + } } }