mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-10 15:14:55 +00:00
Fix appveyor issues
This commit is contained in:
parent
e691dab92d
commit
a773074933
15 changed files with 79 additions and 3 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -37,6 +37,16 @@ namespace FirstPlugin
|
|||
}
|
||||
}
|
||||
|
||||
public void LoadHashLists()
|
||||
{
|
||||
string PathMK7HashFile = System.IO.Path.Combine(Runtime.ExecutableDir, "Lib", "HashList") + "\\Mario Kart 7.saht";
|
||||
string PathMK8DHashFile = System.IO.Path.Combine(Runtime.ExecutableDir, "Lib", "HashList") + "\\Mario Kart 8 Deluxe.saht";
|
||||
string PathMK8HashFile = System.IO.Path.Combine(Runtime.ExecutableDir, "Lib", "HashList") + "\\Mario Kart 8.saht";
|
||||
|
||||
SAHT MK8HashTable = new SAHT(PathMK8HashFile);
|
||||
|
||||
}
|
||||
|
||||
public Dictionary<string, byte[]> OpenedFiles = new Dictionary<string, byte[]>();
|
||||
|
||||
public SarcData sarcData;
|
||||
|
@ -53,6 +63,8 @@ namespace FirstPlugin
|
|||
sarcData.endianness = GetByteOrder(stream);
|
||||
SarcHash = Utils.GenerateUniqueHashID();
|
||||
|
||||
LoadHashLists();
|
||||
|
||||
FillTreeNodes(this, SzsFiles.Files, SarcHash);
|
||||
|
||||
Text = FileName;
|
||||
|
|
53
Switch_FileFormatsMain/FileFormats/Hashes/SAHT.cs
Normal file
53
Switch_FileFormatsMain/FileFormats/Hashes/SAHT.cs
Normal file
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Switch_Toolbox.Library.IO;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace FirstPlugin
|
||||
{
|
||||
public class SAHT
|
||||
{
|
||||
public SAHT(string FileName) {
|
||||
Read(new FileReader(FileName));
|
||||
}
|
||||
|
||||
public List<HashEntry> HashEntries = new List<HashEntry>();
|
||||
|
||||
private void Read(FileReader reader)
|
||||
{
|
||||
reader.ReadSignature(4, "SAHT");
|
||||
uint FileSize = reader.ReadUInt32();
|
||||
uint Offset = reader.ReadUInt32();
|
||||
uint EntryCount = reader.ReadUInt32();
|
||||
|
||||
reader.Seek(Offset, System.IO.SeekOrigin.Begin);
|
||||
for (int i = 0; i <EntryCount; i++)
|
||||
{
|
||||
HashEntry entry = new HashEntry();
|
||||
entry.Read(reader);
|
||||
reader.Align(16);
|
||||
HashEntries.Add(entry);
|
||||
}
|
||||
|
||||
foreach (var entry in HashEntries)
|
||||
{
|
||||
Console.WriteLine(entry.Hash + " " + entry.Name);
|
||||
}
|
||||
}
|
||||
|
||||
public class HashEntry
|
||||
{
|
||||
public uint Hash { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public void Read(FileReader reader)
|
||||
{
|
||||
Hash = reader.ReadUInt32();
|
||||
Name = reader.ReadString(BinaryStringFormat.ZeroTerminated);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -202,6 +202,7 @@
|
|||
<Compile Include="FileFormats\BFRES\GLEnumConverter.cs" />
|
||||
<Compile Include="FileFormats\Font\BFFNT.cs" />
|
||||
<Compile Include="FileFormats\Audio\Archives\BFGRP.cs" />
|
||||
<Compile Include="FileFormats\Hashes\SAHT.cs" />
|
||||
<Compile Include="FileFormats\Shader\SHARCFBNX.cs" />
|
||||
<Compile Include="FileFormats\Texture\BFLIM.cs" />
|
||||
<Compile Include="FileFormats\Layout\BFLAN.cs" />
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
727ce16767060a276a4b91b2ad2a99e5b2d6708a
|
||||
e7f04db9f9c9c641141cc76d26030ed91545cb20
|
||||
|
|
Binary file not shown.
|
@ -69,7 +69,7 @@ namespace Switch_Toolbox.Library.Forms
|
|||
|
||||
public int CurrentFrame
|
||||
{
|
||||
get => currentFrame;
|
||||
get { return currentFrame; }
|
||||
set
|
||||
{
|
||||
if (FollowCurrentFrame && !(Focused && MouseButtons == MouseButtons.Right))
|
||||
|
@ -90,7 +90,7 @@ namespace Switch_Toolbox.Library.Forms
|
|||
|
||||
public int FrameCount
|
||||
{
|
||||
get => lastFrame + 1;
|
||||
get { return lastFrame + 1; }
|
||||
set
|
||||
{
|
||||
lastFrame = value - 1;
|
||||
|
|
BIN
Toolbox/Lib/HashList/Mario Kart 7.saht
Normal file
BIN
Toolbox/Lib/HashList/Mario Kart 7.saht
Normal file
Binary file not shown.
BIN
Toolbox/Lib/HashList/Mario Kart 8 Deluxe.saht
Normal file
BIN
Toolbox/Lib/HashList/Mario Kart 8 Deluxe.saht
Normal file
Binary file not shown.
BIN
Toolbox/Lib/HashList/Mario Kart 8.saht
Normal file
BIN
Toolbox/Lib/HashList/Mario Kart 8.saht
Normal file
Binary file not shown.
|
@ -132,6 +132,15 @@
|
|||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Lib\HashList\Mario Kart 7.saht">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Lib\HashList\Mario Kart 8 Deluxe.saht">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Lib\HashList\Mario Kart 8.saht">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
@ -398,5 +407,6 @@
|
|||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
Loading…
Reference in a new issue