Skip to content

Commit

Permalink
Minor edits to Program. Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHinrichs committed Jun 1, 2024
1 parent 7da367c commit 5f1ed6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.IO;
//Written for Requiem. https://store.steampowered.com/app/289780
using System.IO;
using System.IO.Compression;

namespace Requiem_Extractor
Expand All @@ -13,7 +14,7 @@ static void Main(string[] args)
int fileCount = (int)(map.BaseStream.Length / 136);

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++)
{
Map map = Map.Read();
Expand All @@ -22,12 +23,12 @@ static void Main(string[] args)
string name = new string(vdk.ReadChars(128)).TrimEnd('\0');
int sizeUncompressed = vdk.ReadInt32();
int sizeCompressed = vdk.ReadInt32();
int isCompressed = vdk.ReadInt32();
int unknown = vdk.ReadInt32();
int unknown2 = vdk.ReadInt32();


Directory.CreateDirectory(path + "//" + Path.GetDirectoryName(name));
FileStream fs = File.Create(path + "//" + name);
Directory.CreateDirectory(path + Path.GetDirectoryName(name));
FileStream fs = File.Create(path + name);
vdk.ReadInt16();
using (var ds = new DeflateStream(new MemoryStream(vdk.ReadBytes(sizeCompressed - 2)), CompressionMode.Decompress))
ds.CopyTo(fs);
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# 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.

0 comments on commit 5f1ed6f

Please # to comment.