mirror of
https://github.com/MichaelHinrichs/Ratalaika-Games-Spiller-Engine-Extractor.git
synced 2024-12-01 00:16:20 +00:00
use "path" string variable
This commit is contained in:
parent
c6bef41191
commit
4be341e718
1 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,6 @@ namespace Ratalaika_Games_Spiller_Engine_Extractor
|
||||||
int unknown1 = br.ReadInt32();
|
int unknown1 = br.ReadInt32();
|
||||||
int unknown2 = br.ReadInt32();
|
int unknown2 = br.ReadInt32();
|
||||||
int unknown3 = br.ReadInt32();
|
int unknown3 = br.ReadInt32();
|
||||||
Directory.CreateDirectory(Path.GetDirectoryName(args[0]) + "\\" + Path.GetFileNameWithoutExtension(args[0]));
|
|
||||||
|
|
||||||
MemoryStream fileData = new();
|
MemoryStream fileData = new();
|
||||||
br.ReadInt16();
|
br.ReadInt16();
|
||||||
|
@ -49,11 +48,12 @@ namespace Ratalaika_Games_Spiller_Engine_Extractor
|
||||||
br.Close();
|
br.Close();
|
||||||
|
|
||||||
br = new(fileData);
|
br = new(fileData);
|
||||||
|
string path = Path.GetDirectoryName(args[0]) + "\\" + Path.GetFileNameWithoutExtension(args[0]) + "\\";
|
||||||
foreach(FileTableEntry file in table)
|
foreach(FileTableEntry file in table)
|
||||||
{
|
{
|
||||||
br.BaseStream.Position = file.end - file.Size;
|
br.BaseStream.Position = file.end - file.Size;
|
||||||
Directory.CreateDirectory(Path.GetDirectoryName(args[0]) + "//" + Path.GetFileNameWithoutExtension(args[0]) + "//" + Path.GetDirectoryName(file.name));
|
Directory.CreateDirectory(path + Path.GetDirectoryName(file.name));
|
||||||
using FileStream FS = File.Create(Path.GetDirectoryName(args[0]) + "//" + Path.GetFileNameWithoutExtension(args[0]) + "//" + file.name);
|
using FileStream FS = File.Create(path + file.name);
|
||||||
BinaryWriter bw = new(FS);
|
BinaryWriter bw = new(FS);
|
||||||
bw.Write(br.ReadBytes(file.Size));
|
bw.Write(br.ReadBytes(file.Size));
|
||||||
bw.Close();
|
bw.Close();
|
||||||
|
|
Loading…
Reference in a new issue