feat: HuneX initial support

This commit is contained in:
scientificworld
2026-03-11 17:58:20 +08:00
parent 74050870dc
commit 31a6071462
4 changed files with 257 additions and 3 deletions

View File

@@ -124,6 +124,11 @@ namespace GameRes.Formats.BGI
{
if (!file.View.AsciiEqual (4, "KO ARC20"))
return null;
return Open (file);
}
protected ArcFile Open (ArcView file)
{
int count = file.View.ReadInt32 (12);
if (!IsSaneCount (count))
return null;
@@ -152,7 +157,7 @@ namespace GameRes.Formats.BGI
entry.Type = res.Type;
else if (file.View.AsciiEqual (entry.Offset, "BSE 1."))
entry.Type = "image";
else if (file.View.AsciiEqual (entry.Offset+4, "bw "))
else if (file.View.AsciiEqual (entry.Offset+5, "w "))
entry.Type = "audio";
}
return new ArcFile (file, this, dir);

View File

@@ -39,13 +39,13 @@ namespace GameRes.Formats.BGI
public BgiAudio ()
{
Signatures = new uint[] { 0x40, 0 };
Extensions = new string[] { "bw", "", "_bw" };
Extensions = new string[] { "bw", "", "_bw", "hw" };
}
public override SoundInput TryOpen (IBinaryStream file)
{
var header = file.ReadHeader (8);
if (!header.AsciiEqual (4, "bw "))
if (!header.AsciiEqual (4, "bw ") && !header.AsciiEqual (4, "hw "))
return null;
uint offset = header.ToUInt32 (0);
if (offset >= file.Length)