1
0
mirror of synced 2024-12-01 10:37:25 +01:00

A few more fixes for loading

This commit is contained in:
KillzXGaming 2019-06-29 17:19:49 -04:00
parent 5e50fb097f
commit 5a9d480a97
7 changed files with 6 additions and 6 deletions

Binary file not shown.

View File

@ -205,10 +205,10 @@ namespace FirstPlugin
FileNameText = FileName;
LoadFile(stream, Name);
if (!IsLoadingArray)
LoadBNTXArray(ContainerArray, stream, this);
else
LoadFile(stream, Name);
PluginRuntime.bntxContainers.Add(this);
}
@ -223,8 +223,8 @@ namespace FirstPlugin
int Alignment = 4096;
using (var reader = new FileReader(stream, true))
{
reader.Position = 0;
SearchForBinaryContainerFile(reader, Alignment, Containers);
reader.Position = 0;
}
@ -267,13 +267,12 @@ namespace FirstPlugin
bntx.Text = "Sheet " + Containers.Count;
//Get file size in header
reader.Seek(28);
reader.SeekBegin(StartPos + 28);
uint FileSize = reader.ReadUInt32();
//Get total bntx in bytes
reader.Seek(StartPos);
reader.SeekBegin(StartPos);
byte[] Data = reader.ReadBytes((int)FileSize);
bntx.Load(new MemoryStream(Data));
Containers.Add(bntx);
@ -289,6 +288,7 @@ namespace FirstPlugin
if (Magic == "BNTX")
{
reader.Position = NextPos;
SearchForBinaryContainerFile(reader, Alignment, Containers);
}
}