Format code

This commit is contained in:
Chev 2021-01-07 01:59:28 -08:00
parent 0e8dfea34f
commit 6f030d3de3
8 changed files with 19 additions and 46 deletions

View file

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BOTWToolset
namespace BOTWToolset
{
struct Color
{

View file

@ -1,7 +1,7 @@
using BOTWToolset.IO.TSCB;
using BOTWToolset.Debugging;
using BOTWToolset.IO.TSCB;
using Microsoft.Win32;
using System.Windows.Controls;
using BOTWToolset.Debugging;
namespace BOTWToolset
{

View file

@ -1,6 +1,5 @@
using BOTWToolset.IO.TSCB;
using BOTWToolset.Debugging;
using System.Windows;
using BOTWToolset.Debugging;
namespace BOTWToolset
{

View file

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BOTWToolset.IO.EXTM
namespace BOTWToolset.IO.EXTM
{
/// <summary>
/// Stores info on grass data in an .extm file

View file

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BOTWToolset.IO.EXTM
namespace BOTWToolset.IO.EXTM
{
class GrassColor
{

View file

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BOTWToolset.IO.EXTM
namespace BOTWToolset.IO.EXTM
{
/// <summary>
/// Stores info on water data in an .extm file
@ -23,8 +17,10 @@ namespace BOTWToolset.IO.EXTM
public byte MaterialIndex { get => _matIndex; set => _matIndex = value; }
private byte _matIndex;
public byte MaterialIndexChecksum {
get {
public byte MaterialIndexChecksum
{
get
{
if (_matIndex != 0)
return (byte)(_matIndex + 3);
return _matIndex;

View file

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BOTWToolset.IO.EXTM
namespace BOTWToolset.IO.EXTM
{
class WaterColor
{

View file

@ -2,7 +2,6 @@
using System;
using System.IO;
using System.Linq;
using System.Windows;
namespace BOTWToolset.IO.TSCB
{
@ -72,8 +71,9 @@ namespace BOTWToolset.IO.TSCB
if (next_val == 1) //if the next value is extra unneeded info
{
} else //else, if the value is valid
}
else //else, if the value is valid
{
r.BaseStream.Seek(-4, SeekOrigin.Current);
}
@ -91,7 +91,8 @@ namespace BOTWToolset.IO.TSCB
uint extra_info_len = BitConverter.ToUInt32(r.ReadBytes(4).Reverse().ToArray(), 0); //Usually 0, 4, or 8
if (ref_extra == 4) {
if (ref_extra == 4)
{
if (extra_info_len == 8)
{ //Skip the extra "20" after the 8, as well as the extra info
areaInfo.HasGrass = true;
@ -106,7 +107,8 @@ namespace BOTWToolset.IO.TSCB
else //Else if the 2nd byte should be anything else (should always be 1)
areaInfo.HasWater = true;
}
} else //If the extra info flags aren't set, go back 4
}
else //If the extra info flags aren't set, go back 4
{
r.BaseStream.Seek(-4, SeekOrigin.Current);
}