Update summaries

This commit is contained in:
Chev 2021-01-11 23:11:56 -08:00
parent e983c557cb
commit 082c5f0d28
17 changed files with 66 additions and 11 deletions

View file

@ -3,7 +3,7 @@
namespace BOTWToolset.Control namespace BOTWToolset.Control
{ {
/// <summary> /// <summary>
/// Interaction logic for TabRSTB.xaml /// Interaction logic for the RSTB tab.
/// </summary> /// </summary>
public partial class TabRSTB : UserControl public partial class TabRSTB : UserControl
{ {

View file

@ -7,7 +7,7 @@ using System.Windows.Controls;
namespace BOTWToolset.Control namespace BOTWToolset.Control
{ {
/// <summary> /// <summary>
/// Interaction logic for TabSARC.xaml /// Interaction logic for the SARC tab.
/// </summary> /// </summary>
public partial class TabSARC : UserControl public partial class TabSARC : UserControl
{ {

View file

@ -16,7 +16,7 @@ using System.Windows.Media.Imaging;
namespace BOTWToolset.Control namespace BOTWToolset.Control
{ {
/// <summary> /// <summary>
/// Control tab for TSCB management /// Interaction logic for the TSCB tab.
/// </summary> /// </summary>
public partial class TabTSCB : UserControl public partial class TabTSCB : UserControl
{ {

View file

@ -9,7 +9,7 @@ using System.Windows.Controls;
namespace BOTWToolset.Control namespace BOTWToolset.Control
{ {
/// <summary> /// <summary>
/// Interaction logic for TabYaz0.xaml /// Interaction logic for the Yaz0 tab.
/// </summary> /// </summary>
public partial class TabYaz0 : UserControl public partial class TabYaz0 : UserControl
{ {

View file

@ -6,6 +6,9 @@ using System.Windows.Threading;
namespace BOTWToolset.Debugging namespace BOTWToolset.Debugging
{ {
/// <summary>
/// Allows for printing debug info to an in-app console.
/// </summary>
static class BOTWConsole static class BOTWConsole
{ {
private readonly static TextBox _console; private readonly static TextBox _console;

View file

@ -6,7 +6,7 @@ using System.Text;
namespace BOTWToolset.IO namespace BOTWToolset.IO
{ {
/// <summary> /// <summary>
/// Big-endian variant of BinaryReader /// Big-endian variant of BinaryReader.
/// </summary> /// </summary>
public class BinaryReaderBig : BinaryReader public class BinaryReaderBig : BinaryReader
{ {

View file

@ -6,7 +6,7 @@ using System.Text;
namespace BOTWToolset.IO namespace BOTWToolset.IO
{ {
/// <summary> /// <summary>
/// Big-endian variant of BinaryWriter /// Big-endian variant of BinaryWriter.
/// </summary> /// </summary>
public class BinaryWriterBig : BinaryWriter public class BinaryWriterBig : BinaryWriter
{ {

View file

@ -3,7 +3,8 @@
namespace BOTWToolset.IO.EXTM namespace BOTWToolset.IO.EXTM
{ {
/// <summary> /// <summary>
/// Stores info on grass data in an .extm file /// Interacts with grass data in an .extm file, used in conjunction with <see cref="TSCB.TSCB"/>.
/// More info found on the <see href="https://zeldamods.org/wiki/Grass.extm">ZeldaMods wiki</see>.
/// </summary> /// </summary>
class Grass class Grass
{ {
@ -19,6 +20,11 @@ namespace BOTWToolset.IO.EXTM
public byte B { get => _b; set => _b = value; } public byte B { get => _b; set => _b = value; }
private byte _b; private byte _b;
/// <summary>
/// Gets an array of <see cref="Grass"/> from an array of bytes.
/// </summary>
/// <param name="bytes">The array of bytes to retrieve <see cref="Grass"/> data from.</param>
/// <returns><see cref="Grass"/>[] data.</returns>
public static Grass[] FromBytes(byte[] bytes) public static Grass[] FromBytes(byte[] bytes)
{ {
using (var r = new BinaryReaderBig(new MemoryStream(bytes))) using (var r = new BinaryReaderBig(new MemoryStream(bytes)))

View file

@ -3,7 +3,8 @@
namespace BOTWToolset.IO.EXTM namespace BOTWToolset.IO.EXTM
{ {
/// <summary> /// <summary>
/// Stores info on water data in an .extm file /// Interacts with water data in an .extm file, used in conjunction with <see cref="TSCB.TSCB"/>.
/// More info found on the <see href="https://zeldamods.org/wiki/Water.extm">ZeldaMods wiki</see>.
/// </summary> /// </summary>
class Water class Water
{ {
@ -29,6 +30,11 @@ namespace BOTWToolset.IO.EXTM
} }
} }
/// <summary>
/// Gets an array of <see cref="Water"/> from an array of bytes.
/// </summary>
/// <param name="bytes">The array of bytes to retrieve <see cref="Water"/> data from.</param>
/// <returns><see cref="Water"/>[] data.</returns>
public static Water[] FromBytes(byte[] bytes) public static Water[] FromBytes(byte[] bytes)
{ {
using (var r = new BinaryReaderBig(new MemoryStream(bytes))) using (var r = new BinaryReaderBig(new MemoryStream(bytes)))

View file

@ -9,6 +9,11 @@ namespace BOTWToolset.IO
{ {
public ushort[] Heights; public ushort[] Heights;
/// <summary>
/// Retrieves a <see cref="HGHT"/> array from a set of bytes.
/// </summary>
/// <param name="bytes">The array of bytes to read.</param>
/// <returns><see cref="HGHT"/> array.</returns>
public static HGHT FromBytes(byte[] bytes) public static HGHT FromBytes(byte[] bytes)
{ {
using (var r = new BinaryReader(new MemoryStream(bytes))) using (var r = new BinaryReader(new MemoryStream(bytes)))

View file

@ -2,6 +2,9 @@
namespace BOTWToolset.IO namespace BOTWToolset.IO
{ {
/// <summary>
/// Contains data for .mate files.
/// </summary>
public class MATE public class MATE
{ {
public byte Material0 { get => _material0; set => _material0 = value; } public byte Material0 { get => _material0; set => _material0 = value; }
@ -13,6 +16,11 @@ namespace BOTWToolset.IO
public byte BlendWeight { get => _blendWeight; set => _blendWeight = value; } public byte BlendWeight { get => _blendWeight; set => _blendWeight = value; }
private byte _blendWeight; private byte _blendWeight;
/// <summary>
/// Retrieves a <see cref="MATE"/> array from a set of bytes.
/// </summary>
/// <param name="bytes">The array of bytes to read.</param>
/// <returns><see cref="MATE"/> array.</returns>
public static MATE[] FromBytes(byte[] bytes) public static MATE[] FromBytes(byte[] bytes)
{ {
using (var r = new BinaryReader(new MemoryStream(bytes))) using (var r = new BinaryReader(new MemoryStream(bytes)))

View file

@ -5,6 +5,10 @@ using System.Linq;
namespace BOTWToolset.IO.SARC namespace BOTWToolset.IO.SARC
{ {
/// <summary>
/// Stores info on a SARC archive file.
/// More info found on the <see href="https://zeldamods.org/wiki/SARC">ZeldaMods wiki</see>.
/// </summary>
public class SARC public class SARC
{ {
//SARC header //SARC header
@ -32,6 +36,11 @@ namespace BOTWToolset.IO.SARC
public byte[][] Files; public byte[][] Files;
/// <summary>
/// Gets a <see cref="SARC"/> from a data stream.
/// </summary>
/// <param name="stream">Data stream to get <see cref="SARC"/> info from.</param>
/// <returns><see cref="SARC"/> with the stream's data.</returns>
public static SARC FromBytes(Stream stream) public static SARC FromBytes(Stream stream)
{ {
SARC s = new SARC(); SARC s = new SARC();

View file

@ -1,5 +1,8 @@
namespace BOTWToolset.IO.SARC namespace BOTWToolset.IO.SARC
{ {
/// <summary>
/// Stores info on the SFAT header (SARC file allocation table), used in conjunction with <see cref="SARC"/>.
/// </summary>
public struct SFAT public struct SFAT
{ {
public string Magic { get => _magic; set => _magic = value; } public string Magic { get => _magic; set => _magic = value; }

View file

@ -1,5 +1,8 @@
namespace BOTWToolset.IO.SARC namespace BOTWToolset.IO.SARC
{ {
/// <summary>
/// Contains information on stored archive files in the SARC, used in conjunction with <see cref="SFAT"/> and <see cref="SARC"/>.
/// </summary>
public struct SFATNode public struct SFATNode
{ {
public uint FileNameHash { get => _fileNameHash; set => _fileNameHash = value; } public uint FileNameHash { get => _fileNameHash; set => _fileNameHash = value; }

View file

@ -1,5 +1,8 @@
namespace BOTWToolset.IO.SARC namespace BOTWToolset.IO.SARC
{ {
/// <summary>
/// Stores info on the SFNT header (SARC file name table), used in conjunction with <see cref="SARC"/>.
/// </summary>
public struct SFNT public struct SFNT
{ {
public string Magic { get => _magic; set => _magic = value; } public string Magic { get => _magic; set => _magic = value; }

View file

@ -7,7 +7,8 @@ using System.Linq;
namespace BOTWToolset.IO.TSCB namespace BOTWToolset.IO.TSCB
{ {
/// <summary> /// <summary>
/// Interacts with .tcsb files. /// Interacts with .tcsb (terrain scene binary) files.
/// More info found on the <see href="https://zeldamods.org/wiki/TSCB">ZeldaMods wiki</see>.
/// </summary> /// </summary>
public class TSCB public class TSCB
{ {
@ -218,7 +219,7 @@ namespace BOTWToolset.IO.TSCB
/// <summary> /// <summary>
/// Writes TSCB data to a byte array. /// Writes TSCB data to a byte array.
/// </summary> /// </summary>
/// <param name="tscb">TSCBInfo that contains data to write.</param> /// <param name="tscb"><see cref="TSCB"/> that contains data to write.</param>
/// <returns>Byte array containing the TSCB data.</returns> /// <returns>Byte array containing the TSCB data.</returns>
public static byte[] GetBytes(TSCB tscb) public static byte[] GetBytes(TSCB tscb)
{ {
@ -312,7 +313,6 @@ namespace BOTWToolset.IO.TSCB
b.AddRange(System.Text.Encoding.ASCII.GetBytes(filename)); b.AddRange(System.Text.Encoding.ASCII.GetBytes(filename));
} }
// TODO: Make this an actual function
return b.ToArray(); return b.ToArray();
} }
} }

View file

@ -7,6 +7,10 @@ using System.Linq;
namespace BOTWToolset.IO.Yaz0 namespace BOTWToolset.IO.Yaz0
{ {
/// <summary>
/// Interacts with Yaz0-encoded data, and allows for encoding data to Yaz0.
/// More info on the <see href="https://zeldamods.org/wiki/Yaz0">ZeldaMods wiki</see>.
/// </summary>
public class Yaz0 public class Yaz0
{ {
public string Magic { get => _magic; set => _magic = value; } public string Magic { get => _magic; set => _magic = value; }
@ -23,6 +27,11 @@ namespace BOTWToolset.IO.Yaz0
private static int s_num_bytes1, s_match_pos; private static int s_num_bytes1, s_match_pos;
private static bool s_prev_flag = false; private static bool s_prev_flag = false;
/// <summary>
/// Returns a <see cref="Yaz0"/> from a Yaz0-encoded file on disk.
/// </summary>
/// <param name="file">The file (full path) to read.</param>
/// <returns><see cref="Yaz0"/> containing the file's data.</returns>
public static Yaz0 ReadFile(string file) public static Yaz0 ReadFile(string file)
{ {
if (File.Exists(file)) if (File.Exists(file))