mirror of
https://github.com/chev2/botw-toolset.git
synced 2025-12-18 14:03:18 +00:00
Remove BOTWConsole.Log calls
This commit is contained in:
parent
41dc8b656d
commit
7d62580a70
4 changed files with 1 additions and 29 deletions
|
|
@ -106,8 +106,6 @@ namespace BOTWToolset.Control
|
||||||
|
|
||||||
private void Menu_FileOpen(object sender, RoutedEventArgs e)
|
private void Menu_FileOpen(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
BOTWConsole.Log("Clicked File -> Open button");
|
|
||||||
|
|
||||||
var openFileDialog = new OpenFileDialog
|
var openFileDialog = new OpenFileDialog
|
||||||
{
|
{
|
||||||
InitialDirectory = @"C:\",
|
InitialDirectory = @"C:\",
|
||||||
|
|
@ -120,8 +118,6 @@ namespace BOTWToolset.Control
|
||||||
|
|
||||||
if ((bool)openFileDialog.ShowDialog())
|
if ((bool)openFileDialog.ShowDialog())
|
||||||
{
|
{
|
||||||
BOTWConsole.Log("Opening file");
|
|
||||||
|
|
||||||
SARC s = SARC.FromBytes(File.ReadAllBytes(openFileDialog.FileName));
|
SARC s = SARC.FromBytes(File.ReadAllBytes(openFileDialog.FileName));
|
||||||
|
|
||||||
// Set the current file location to the chosen file's location
|
// Set the current file location to the chosen file's location
|
||||||
|
|
@ -142,8 +138,6 @@ namespace BOTWToolset.Control
|
||||||
|
|
||||||
private void Menu_FileClose(object sender, RoutedEventArgs e)
|
private void Menu_FileClose(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
BOTWConsole.Log("Clicked File -> Close button");
|
|
||||||
|
|
||||||
fileLocation = null;
|
fileLocation = null;
|
||||||
|
|
||||||
// Set the current TSCB info to nothing
|
// Set the current TSCB info to nothing
|
||||||
|
|
|
||||||
|
|
@ -309,8 +309,6 @@ namespace BOTWToolset.Control
|
||||||
|
|
||||||
private void Menu_FileOpen(object sender, ExecutedRoutedEventArgs e)
|
private void Menu_FileOpen(object sender, ExecutedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
BOTWConsole.Log("Clicked File -> Open button");
|
|
||||||
|
|
||||||
var openFileDialog = new OpenFileDialog
|
var openFileDialog = new OpenFileDialog
|
||||||
{
|
{
|
||||||
InitialDirectory = @"C:\",
|
InitialDirectory = @"C:\",
|
||||||
|
|
@ -326,8 +324,6 @@ namespace BOTWToolset.Control
|
||||||
// This is to ensure that opening a file when one is already open resets everything in the tab
|
// This is to ensure that opening a file when one is already open resets everything in the tab
|
||||||
SetDisabled();
|
SetDisabled();
|
||||||
|
|
||||||
BOTWConsole.Log("Opening file");
|
|
||||||
|
|
||||||
TSCB t = TSCB.FromBytes(File.ReadAllBytes(openFileDialog.FileName));
|
TSCB t = TSCB.FromBytes(File.ReadAllBytes(openFileDialog.FileName));
|
||||||
|
|
||||||
// Set the current file location to the chosen file's location
|
// Set the current file location to the chosen file's location
|
||||||
|
|
@ -359,8 +355,6 @@ namespace BOTWToolset.Control
|
||||||
|
|
||||||
private void Menu_FileSave(object sender, ExecutedRoutedEventArgs e)
|
private void Menu_FileSave(object sender, ExecutedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
BOTWConsole.Log("Clicked File -> Save button");
|
|
||||||
|
|
||||||
File.WriteAllBytes(fileLocation, TSCB.ToBytes(currentTSCB));
|
File.WriteAllBytes(fileLocation, TSCB.ToBytes(currentTSCB));
|
||||||
|
|
||||||
BOTWConsole.LogStatus($"Saved file to {fileLocation}.");
|
BOTWConsole.LogStatus($"Saved file to {fileLocation}.");
|
||||||
|
|
@ -368,8 +362,6 @@ namespace BOTWToolset.Control
|
||||||
|
|
||||||
private void Menu_FileSaveAs(object sender, ExecutedRoutedEventArgs e)
|
private void Menu_FileSaveAs(object sender, ExecutedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
BOTWConsole.Log("Clicked File -> Save As button");
|
|
||||||
|
|
||||||
SaveFileDialog saveFileDialog = new SaveFileDialog
|
SaveFileDialog saveFileDialog = new SaveFileDialog
|
||||||
{
|
{
|
||||||
InitialDirectory = @"C;\",
|
InitialDirectory = @"C;\",
|
||||||
|
|
@ -389,8 +381,6 @@ namespace BOTWToolset.Control
|
||||||
|
|
||||||
private void Menu_FileClose(object sender, RoutedEventArgs e)
|
private void Menu_FileClose(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
BOTWConsole.Log("Clicked File -> Close button");
|
|
||||||
|
|
||||||
// Set the current TSCB info to nothing
|
// Set the current TSCB info to nothing
|
||||||
currentTSCB = null;
|
currentTSCB = null;
|
||||||
|
|
||||||
|
|
@ -414,7 +404,7 @@ namespace BOTWToolset.Control
|
||||||
// Clamp value between 0 and 1
|
// Clamp value between 0 and 1
|
||||||
overrideValue = Math.Clamp(overrideValue, 0.0f, 1.0f);
|
overrideValue = Math.Clamp(overrideValue, 0.0f, 1.0f);
|
||||||
|
|
||||||
BOTWConsole.Log($"Overriding {textSender.Name} with value {overrideValue}");
|
BOTWConsole.LogStatus($"Overriding {textSender.Name} with value {overrideValue}");
|
||||||
|
|
||||||
switch (textSender.Name)
|
switch (textSender.Name)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,6 @@ namespace BOTWToolset
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
BOTWConsole.Log($"Breath of the Wild Toolkit - Version {VERSION}");
|
|
||||||
|
|
||||||
LabelVersion.Content = $"Version v{VERSION}";
|
LabelVersion.Content = $"Version v{VERSION}";
|
||||||
|
|
||||||
// Initialize and add all tool tabs to the tab controller
|
// Initialize and add all tool tabs to the tab controller
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,6 @@ namespace BOTWToolset.IO.TSCB
|
||||||
// Read mat info offsets
|
// Read mat info offsets
|
||||||
t.MaterialInfoOffsets = r.ReadBytes((int)((t.MaterialInfoLength * 4) + 4));
|
t.MaterialInfoOffsets = r.ReadBytes((int)((t.MaterialInfoLength * 4) + 4));
|
||||||
|
|
||||||
BOTWConsole.Log($"Offset before material iteration: {r.BaseStream.Position}");
|
|
||||||
|
|
||||||
// Initialize mat info array with provided length
|
// Initialize mat info array with provided length
|
||||||
t.MaterialInfo = new MaterialInfo[t.MaterialInfoLength];
|
t.MaterialInfo = new MaterialInfo[t.MaterialInfoLength];
|
||||||
|
|
||||||
|
|
@ -105,13 +103,9 @@ namespace BOTWToolset.IO.TSCB
|
||||||
t.MaterialInfo[i] = matInfo;
|
t.MaterialInfo[i] = matInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOTWConsole.Log($"Offset before area offset iteration: {r.BaseStream.Position}");
|
|
||||||
|
|
||||||
// Read area offsets
|
// Read area offsets
|
||||||
t.AreaArrayOffsets = r.ReadBytes((int)(t.AreaArrayLength * 4));
|
t.AreaArrayOffsets = r.ReadBytes((int)(t.AreaArrayLength * 4));
|
||||||
|
|
||||||
BOTWConsole.Log($"Offset before area iteration: {r.BaseStream.Position}");
|
|
||||||
|
|
||||||
t.AreaInfo = new AreaInfo[t.AreaArrayLength];
|
t.AreaInfo = new AreaInfo[t.AreaArrayLength];
|
||||||
|
|
||||||
// Read every area info entry
|
// Read every area info entry
|
||||||
|
|
@ -187,13 +181,9 @@ namespace BOTWToolset.IO.TSCB
|
||||||
t.AreaInfo[i] = areaInfo;
|
t.AreaInfo[i] = areaInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOTWConsole.Log($"Offset after area iteration: {r.BaseStream.Position} (should be {t.FileBaseOffset + 16})");
|
|
||||||
|
|
||||||
//Get the number of filenames by getting how many bytes they take up out of the entire file size
|
//Get the number of filenames by getting how many bytes they take up out of the entire file size
|
||||||
var filenames_count = (r.BaseStream.Length - (t.FileBaseOffset + 16)) / 12;
|
var filenames_count = (r.BaseStream.Length - (t.FileBaseOffset + 16)) / 12;
|
||||||
|
|
||||||
BOTWConsole.Log($"Filename count: {filenames_count} (should be {t.AreaArrayLength})");
|
|
||||||
|
|
||||||
t.FileNames = new string[filenames_count];
|
t.FileNames = new string[filenames_count];
|
||||||
|
|
||||||
r.BaseStream.Seek(t.FileBaseOffset + 16, SeekOrigin.Begin); // TODO: change this to 'current' later, or maybe even remove
|
r.BaseStream.Seek(t.FileBaseOffset + 16, SeekOrigin.Begin); // TODO: change this to 'current' later, or maybe even remove
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue