Skip to content

Commit

Permalink
feat: batch processing support
Browse files Browse the repository at this point in the history
  • Loading branch information
Notexe committed Feb 6, 2024
1 parent 5a2179a commit 9c81f71
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions G2GFxDataTool/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,28 @@ static void Main(string[] args)

if (options.inputPath != null)
{
string ext = Path.GetExtension(options.inputPath);
if (ext == ".swf")
FileAttributes attr = File.GetAttributes(options.inputPath);

if (attr.HasFlag(FileAttributes.Directory))
{
foreach (var file in Directory.GetFiles(options.inputPath))
{
string ext = Path.GetExtension(file);
if (ext == ".swf")
{
ScaleformGFxWriter.WriteScaleformGfX(file, options.outputPath);
UIControlWriter.WriteUIControl(file, options.outputPath);
}
}
}
else
{
ScaleformGFxWriter.WriteScaleformGfX(options.inputPath, options.outputPath);
UIControlWriter.WriteUIControl(options.inputPath, options.outputPath);
string ext = Path.GetExtension(options.inputPath);
if (ext == ".swf")
{
ScaleformGFxWriter.WriteScaleformGfX(options.inputPath, options.outputPath);
UIControlWriter.WriteUIControl(options.inputPath, options.outputPath);
}
}
}

Expand Down

0 comments on commit 9c81f71

Please sign in to comment.