From cff0bbcdf339ec99b9a1311605fb16f6378b3fb4 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sat, 26 Mar 2011 05:14:59 +0100 Subject: the Wii killing bug is hopefully gone for good! also, a few other improvements --- NW4RTools/BrresReader.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'NW4RTools/BrresReader.cs') diff --git a/NW4RTools/BrresReader.cs b/NW4RTools/BrresReader.cs index aa54437..8b9fcb1 100644 --- a/NW4RTools/BrresReader.cs +++ b/NW4RTools/BrresReader.cs @@ -10,10 +10,18 @@ namespace NW4RTools { return LoadFile(data, true); } + public static ResFile LoadFile(byte[] data, out SortedDictionary offsetMap) { + return LoadFile(data, true, out offsetMap); + } + public static ResFile LoadFile(byte[] data, bool debug) { return new BrresReader(debug).Load(new InputStream(data, ByteEndian.BigEndian)); } + public static ResFile LoadFile(byte[] data, bool debug, out SortedDictionary offsetMap) { + return new BrresReader(debug).Load(new InputStream(data, ByteEndian.BigEndian), out offsetMap); + } + private class RawStreamResDict : ResDict { @@ -35,6 +43,11 @@ namespace NW4RTools { } public ResFile Load(InputStream ins) { + SortedDictionary trashThis; + return Load(ins, out trashThis); + } + + public ResFile Load(InputStream ins, out SortedDictionary offsetMap) { File = new ResFile(); // Read BRRES header @@ -63,6 +76,7 @@ namespace NW4RTools { } } + offsetMap = OffsetMap; return File; } -- cgit v1.2.3