summaryrefslogtreecommitdiff
path: root/NW4RTools/BrresReader.cs
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-03-26 05:14:59 +0100
committerTreeki <treeki@gmail.com>2011-03-26 05:14:59 +0100
commitcff0bbcdf339ec99b9a1311605fb16f6378b3fb4 (patch)
treee921928236eef23869ddf4d27faa01f14e457594 /NW4RTools/BrresReader.cs
parente00b60edda34f50baaa0a21cf2bae4fcad1609a4 (diff)
downloadnw4rtools-cff0bbcdf339ec99b9a1311605fb16f6378b3fb4.tar.gz
nw4rtools-cff0bbcdf339ec99b9a1311605fb16f6378b3fb4.zip
the Wii killing bug is hopefully gone for good! also, a few other improvements
Diffstat (limited to '')
-rw-r--r--NW4RTools/BrresReader.cs14
1 files changed, 14 insertions, 0 deletions
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<int, string> 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<int, string> offsetMap) {
+ return new BrresReader(debug).Load(new InputStream(data, ByteEndian.BigEndian), out offsetMap);
+ }
+
private class RawStreamResDict : ResDict<InputStream> {
@@ -35,6 +43,11 @@ namespace NW4RTools {
}
public ResFile Load(InputStream ins) {
+ SortedDictionary<int, string> trashThis;
+ return Load(ins, out trashThis);
+ }
+
+ public ResFile Load(InputStream ins, out SortedDictionary<int, string> offsetMap) {
File = new ResFile();
// Read BRRES header
@@ -63,6 +76,7 @@ namespace NW4RTools {
}
}
+ offsetMap = OffsetMap;
return File;
}