1
0
mirror of synced 2024-09-24 03:28:21 +02:00

Fix appveyor issues

This commit is contained in:
KillzXGaming 2019-03-31 15:29:36 -04:00
parent e691dab92d
commit a773074933
15 changed files with 79 additions and 3 deletions

Binary file not shown.

View File

@ -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;

View 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);
}
}
}
}

View File

@ -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" />

View File

@ -1 +1 @@
727ce16767060a276a4b91b2ad2a99e5b2d6708a
e7f04db9f9c9c641141cc76d26030ed91545cb20

View File

@ -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;

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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>