From b906f3c654f0b980e7d5b4d3c0bcfe341b8830f3 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sun, 6 Nov 2022 23:49:46 -0800 Subject: [PATCH] Add NE resource table skeleton to builder --- BurnOutSharp.Builder/NewExecutable.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/BurnOutSharp.Builder/NewExecutable.cs b/BurnOutSharp.Builder/NewExecutable.cs index 38b400a7..f29064fc 100644 --- a/BurnOutSharp.Builder/NewExecutable.cs +++ b/BurnOutSharp.Builder/NewExecutable.cs @@ -153,6 +153,20 @@ namespace BurnOutSharp.Builder return segmentTable; } + /// + /// Parse a byte array into a resource table + /// + /// Byte array to parse + /// Offset into the byte array + /// Number of resource table entries to read + /// Filled resource table on success, null on error + private static ResourceTable ParseResourceTable(byte[] data, int offset, int count) + { + // TODO: Use marshalling here instead of building + // TODO: Write NE resource table parsing + return null; + } + #endregion #region Stream Data @@ -300,6 +314,19 @@ namespace BurnOutSharp.Builder return segmentTable; } + /// + /// Parse a Stream into a resource table + /// + /// Stream to parse + /// Number of resource table entries to read + /// Filled resource table on success, null on error + private static ResourceTable ParseResourceTable(Stream data, int count) + { + // TODO: Use marshalling here instead of building + // TODO: Write NE resource table parsing + return null; + } + #endregion } } \ No newline at end of file