Minor edits to Program. Update README.

This commit is contained in:
Michael Hinrichs 2024-06-01 14:05:20 -05:00
parent 7da367c47b
commit 5f1ed6fd7f
2 changed files with 8 additions and 6 deletions

View File

@ -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
@ -13,7 +14,7 @@ namespace Requiem_Extractor
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();
@ -22,12 +23,12 @@ namespace Requiem_Extractor
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);

View File

@ -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.