1
0
mirror of synced 2024-11-14 11:07:39 +01:00
Switch-Toolbox/File_Format_Library/FileFormats/HedgehogEngine/HeaderCommon.cs

46 lines
1.2 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Toolbox.Library.IO;
namespace HedgehogLibrary
{
public class HeaderCommon
{
public const uint Signature = 0x133054A;
public Node Root;
public void Read(FileReader reader)
{
//Not sure but i've seen this used for checking game version
ushort version = reader.ReadUInt16();
if (version == 0x80)
{
ushort fileSize = reader.ReadUInt16();
uint signature = reader.ReadUInt32();
uint offsetTable = reader.ReadUInt32();
uint offsetTableEntryCount = reader.ReadUInt32();
while (true)
{
ushort sectionFlag = reader.ReadUInt16();
ushort sectionAddress = reader.ReadUInt16();
uint sectionValue = reader.ReadUInt32();
string sectionName = reader.ReadString(8, Encoding.ASCII);
if (sectionName == "Contexts")
break;
}
}
}
public class Node
{
}
}
}