Add skeleton for NE segment table parsing

This commit is contained in:
Matt Nadareski
2022-11-06 21:30:19 -08:00
parent fdd578dad9
commit aa57044bb8
2 changed files with 29 additions and 2 deletions

View File

@@ -130,7 +130,8 @@ namespace BurnOutSharp.Builder
/// </summary>
/// <param name="data">Byte array to parse</param>
/// <param name="offset">Offset into the byte array</param>
/// <returns>Filled executable header on success, null on error</returns>
/// <param name="count">Number of relocation table entries to read</param>
/// <returns>Filled relocation table on success, null on error</returns>
private static RelocationEntry[] ParseRelocationTable(byte[] data, int offset, int count)
{
// If we don't have enough data
@@ -279,7 +280,8 @@ namespace BurnOutSharp.Builder
/// Parse a Stream into a relocation table
/// </summary>
/// <param name="data">Stream to parse</param>
/// <returns>Filled executable header on success, null on error</returns>
/// <param name="count">Number of relocation table entries to read</param>
/// <returns>Filled relocation table on success, null on error</returns>
private static RelocationEntry[] ParseRelocationTable(Stream data, int count)
{
// If we don't have enough data

View File

@@ -111,6 +111,19 @@ namespace BurnOutSharp.Builder
return header;
}
/// <summary>
/// Parse a byte array into a segment table
/// </summary>
/// <param name="data">Byte array to parse</param>
/// <param name="offset">Offset into the byte array</param>
/// <param name="count">Number of segment table entries to read</param>
/// <returns>Filled segment table on success, null on error</returns>
private static SegmentTableEntry[] ParseSegmentTable(byte[] data, int offset, int count)
{
// TODO: Implement segment table reading
return null;
}
#endregion
#region Stream Data
@@ -216,6 +229,18 @@ namespace BurnOutSharp.Builder
return header;
}
/// <summary>
/// Parse a Stream into a segment table
/// </summary>
/// <param name="data">Stream to parse</param>
/// <param name="count">Number of segment table entries to read</param>
/// <returns>Filled segment table on success, null on error</returns>
private static SegmentTableEntry[] ParseSegmentTable(Stream data, int count)
{
// TODO: Implement segment table reading
return null;
}
#endregion
}
}