Minor edits to Program. Update README.
This commit is contained in:
parent
7da367c47b
commit
5f1ed6fd7f
11
Program.cs
11
Program.cs
|
@ -1,4 +1,5 @@
|
||||||
using System.IO;
|
//Written for Requiem. https://store.steampowered.com/app/289780
|
||||||
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
|
|
||||||
namespace Requiem_Extractor
|
namespace Requiem_Extractor
|
||||||
|
@ -13,7 +14,7 @@ namespace Requiem_Extractor
|
||||||
int fileCount = (int)(map.BaseStream.Length / 136);
|
int fileCount = (int)(map.BaseStream.Length / 136);
|
||||||
|
|
||||||
System.Collections.Generic.List<Map> maps = new();
|
System.Collections.Generic.List<Map> maps = new();
|
||||||
string path = Path.GetDirectoryName(args[0]) + "//" + Path.GetFileNameWithoutExtension(args[0]);
|
string path = Path.GetDirectoryName(args[0]) + "//" + Path.GetFileNameWithoutExtension(args[0]) + "//";
|
||||||
for (int i = 0; i < fileCount; i++)
|
for (int i = 0; i < fileCount; i++)
|
||||||
{
|
{
|
||||||
Map map = Map.Read();
|
Map map = Map.Read();
|
||||||
|
@ -22,12 +23,12 @@ namespace Requiem_Extractor
|
||||||
string name = new string(vdk.ReadChars(128)).TrimEnd('\0');
|
string name = new string(vdk.ReadChars(128)).TrimEnd('\0');
|
||||||
int sizeUncompressed = vdk.ReadInt32();
|
int sizeUncompressed = vdk.ReadInt32();
|
||||||
int sizeCompressed = vdk.ReadInt32();
|
int sizeCompressed = vdk.ReadInt32();
|
||||||
int isCompressed = vdk.ReadInt32();
|
|
||||||
int unknown = vdk.ReadInt32();
|
int unknown = vdk.ReadInt32();
|
||||||
|
int unknown2 = vdk.ReadInt32();
|
||||||
|
|
||||||
|
|
||||||
Directory.CreateDirectory(path + "//" + Path.GetDirectoryName(name));
|
Directory.CreateDirectory(path + Path.GetDirectoryName(name));
|
||||||
FileStream fs = File.Create(path + "//" + name);
|
FileStream fs = File.Create(path + name);
|
||||||
vdk.ReadInt16();
|
vdk.ReadInt16();
|
||||||
using (var ds = new DeflateStream(new MemoryStream(vdk.ReadBytes(sizeCompressed - 2)), CompressionMode.Decompress))
|
using (var ds = new DeflateStream(new MemoryStream(vdk.ReadBytes(sizeCompressed - 2)), CompressionMode.Decompress))
|
||||||
ds.CopyTo(fs);
|
ds.CopyTo(fs);
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
# Requiem-Extractor
|
# Requiem-Extractor
|
||||||
A tool to extract from VDK files found in the game [Requiem](https://store.steampowered.com/app/289780).
|
A tool to extract from VDK files found in the game [Requiem](https://store.steampowered.com/app/289780). <br>
|
||||||
|
Drag and drop a VDK or MAP file onto the application.
|
||||||
|
|
Loading…
Reference in New Issue