fixed GSA writing, added always-edit button and search in file and for file

This commit is contained in:
2026-07-21 15:50:52 +02:00
parent cbf0891ba4
commit d171c34236
42 changed files with 538 additions and 61 deletions

View File

@ -15,6 +15,12 @@ public static class GsaWriter
/// <summary>Magic word for the NARD (enhanced) format.</summary>
private const uint MAGIC_NARD = 0x4E415244;
/// <summary>
/// End-of-archive terminator written where the next entry's alias length would be.
/// The engine's sequential reader stops when it hits this invalid length.
/// </summary>
private const uint TERMINATOR = 0xFFFFFFFF;
/// <summary>
/// Writes the archive to the specified file path.
/// </summary>
@ -53,6 +59,11 @@ public static class GsaWriter
{
WriteEntry(writer, entry, archive);
}
// Write the end-of-archive terminator, aligned like an entry header
if (archive.Format == GsaFormat.NARD && archive.OffsetPadding > 0)
WritePadding(writer, archive.OffsetPadding);
writer.Write(TERMINATOR);
}
/// <summary>