Skip to content

Commit

Permalink
xbox series extension fix (#23)
Browse files Browse the repository at this point in the history
* feat(series): fix xbox series extension

* fix duplicate
  • Loading branch information
yubie-re authored Oct 4, 2024
1 parent f4139cc commit 350dbbc
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 16 deletions.
8 changes: 4 additions & 4 deletions GTA V Script Decompiler/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private async void openToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new()
{
Filter = "GTA V Script Files|*.ysc;*.osc;*.dsc;*.psc;*.ssc;*.ysc.full;*.osc.full;*.dsc.full;*.psc.full;*.ssc.full"
Filter = "GTA V Script Files|*.ysc;*.osc;*.dsc;*.psc;*.zsc;*.ysc.full;*.osc.full;*.dsc.full;*.psc.full;*.zsc.full"
};

if (ofd.ShowDialog() == DialogResult.OK)
Expand Down Expand Up @@ -215,7 +215,7 @@ private async Task BatchDecompile(string dirPath)
CompileList.Enqueue(file);
}

foreach (var file in Directory.GetFiles(dirPath, "*.ssc"))
foreach (var file in Directory.GetFiles(dirPath, "*.zsc"))
{
CompileList.Enqueue(file);
}
Expand All @@ -240,7 +240,7 @@ private async Task BatchDecompile(string dirPath)
CompileList.Enqueue(file);
}

foreach (var file in Directory.GetFiles(dirPath, "*.ssc.full"))
foreach (var file in Directory.GetFiles(dirPath, "*.zsc.full"))
{
CompileList.Enqueue(file);
}
Expand Down Expand Up @@ -306,7 +306,7 @@ private async void fileToolStripMenuItem1_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new()
{
Filter = "GTA V Script Files|*.ysc;*.osc;*.dsc;*.psc;*.ssc;*.ysc.full;*.osc.full;*.dsc.full;*.psc.full;*.ssc.full"
Filter = "GTA V Script Files|*.ysc;*.osc;*.dsc;*.psc;*.zsc;*.ysc.full;*.osc.full;*.dsc.full;*.psc.full;*.zsc.full"
};

if (ofd.ShowDialog() == DialogResult.OK)
Expand Down
2 changes: 1 addition & 1 deletion GTA V Script Decompiler/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Options
[Option('n', "native_tables", HelpText = "Don't extract native tables.")]
public bool DontExtractNativeTables { get; set; }

[Option('v', "verbose", HelpText = "Show wich file is currently being decompiled.")]
[Option('v', "verbose", HelpText = "Show which file is currently being decompiled.")]
public bool Verbose { get; set; }
}
}
62 changes: 51 additions & 11 deletions GTA V Script Decompiler/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,57 @@ static void BatchDecompile(string dirPath, bool extractNativeTables, bool verbos
if (!Directory.Exists(saveDirectory))
Directory.CreateDirectory(saveDirectory);

foreach (var file in Directory.GetFiles(dirPath, "*.ysc"))
{
CompileList.Enqueue(file);
}

foreach (var file in Directory.GetFiles(dirPath, "*.ysc.full"))
{
CompileList.Enqueue(file);
}

while (CompileList.Count > 0)
foreach (var file in Directory.GetFiles(dirPath, "*.ysc"))
{
CompileList.Enqueue(file);
}

foreach (var file in Directory.GetFiles(dirPath, "*.osc"))
{
CompileList.Enqueue(file);
}

foreach (var file in Directory.GetFiles(dirPath, "*.dsc"))
{
CompileList.Enqueue(file);
}

foreach (var file in Directory.GetFiles(dirPath, "*.psc"))
{
CompileList.Enqueue(file);
}

foreach (var file in Directory.GetFiles(dirPath, "*.zsc"))
{
CompileList.Enqueue(file);
}

foreach (var file in Directory.GetFiles(dirPath, "*.ysc.full"))
{
CompileList.Enqueue(file);
}

foreach (var file in Directory.GetFiles(dirPath, "*.osc.full"))
{
CompileList.Enqueue(file);
}

foreach (var file in Directory.GetFiles(dirPath, "*.dsc.full"))
{
CompileList.Enqueue(file);
}

foreach (var file in Directory.GetFiles(dirPath, "*.psc.full"))
{
CompileList.Enqueue(file);
}

foreach (var file in Directory.GetFiles(dirPath, "*.zsc.full"))
{
CompileList.Enqueue(file);
}

while (CompileList.Count > 0)
{
ScriptFile fileopen;
string scriptToDecode;
Expand Down

0 comments on commit 350dbbc

Please sign in to comment.