BCLAN: Fix writing of PAI1 section (#459)

Fixes writing of PAI1 section in BCLAN files (tested with Mario Kart 7 bclan files):
1. The offset of the strings is relative to the start of the table, not the start of the PAI1 section.
2. 4 bytes of padding after the strings are needed for proper alignment of the rest of the section.
This commit is contained in:
PabloMK7 2022-02-24 02:22:38 +01:00 committed by GitHub
parent 6137bddb0d
commit f6cd674c24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -313,9 +313,10 @@ namespace LayoutBXLYT
writer.Write(new uint[Textures.Count]);
for (int i = 0; i < Textures.Count; i++)
{
writer.WriteUint32Offset(startOfsPos + (i * 4), startPos);
writer.WriteUint32Offset(startOfsPos + (i * 4), startOfsPos);
writer.WriteString(Textures[i]);
}
writer.Align(4);
}
if (Entries.Count > 0)
{