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; namespace BOTWToolset
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BOTWToolset
{ {
struct Color struct Color
{ {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -2,7 +2,6 @@
using System; using System;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Windows;
namespace BOTWToolset.IO.TSCB namespace BOTWToolset.IO.TSCB
{ {
@ -73,7 +72,8 @@ namespace BOTWToolset.IO.TSCB
if (next_val == 1) //if the next value is extra unneeded info 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); 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 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) if (extra_info_len == 8)
{ //Skip the extra "20" after the 8, as well as the extra info { //Skip the extra "20" after the 8, as well as the extra info
areaInfo.HasGrass = true; 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) else //Else if the 2nd byte should be anything else (should always be 1)
areaInfo.HasWater = true; 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); r.BaseStream.Seek(-4, SeekOrigin.Current);
} }