|
|
@ -1,4 +1,5 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
using System.CodeDom;
|
|
|
|
using System.ComponentModel;
|
|
|
|
using System.ComponentModel;
|
|
|
|
using System.Diagnostics;
|
|
|
|
using System.Diagnostics;
|
|
|
|
using System.Drawing;
|
|
|
|
using System.Drawing;
|
|
|
@ -25,6 +26,11 @@ namespace DotNetCTFDumper.GUI
|
|
|
|
public PackDataForm PackForm;
|
|
|
|
public PackDataForm PackForm;
|
|
|
|
|
|
|
|
|
|
|
|
public delegate void SaveHandler(int index, int all);
|
|
|
|
public delegate void SaveHandler(int index, int all);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public delegate void IncrementSortedProgressBar(int all);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public MainForm()
|
|
|
|
public MainForm()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//Buttons
|
|
|
|
//Buttons
|
|
|
@ -89,11 +95,11 @@ namespace DotNetCTFDumper.GUI
|
|
|
|
private void StartReading()
|
|
|
|
private void StartReading()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var path = openFileDialog1.FileName;
|
|
|
|
var path = openFileDialog1.FileName;
|
|
|
|
|
|
|
|
loadingLabel.Visible = true;
|
|
|
|
Program.ReadFile(path, Settings.Verbose, Settings.DumpImages, Settings.DumpSounds);
|
|
|
|
Program.ReadFile(path, Settings.Verbose, Settings.DumpImages, Settings.DumpSounds);
|
|
|
|
imageBar.Value = 0;
|
|
|
|
imageBar.Value = 0;
|
|
|
|
soundBar.Value = 0;
|
|
|
|
soundBar.Value = 0;
|
|
|
|
GameInfo.Text = "";
|
|
|
|
GameInfo.Text = "";
|
|
|
|
loadingLabel.Visible = true;
|
|
|
|
|
|
|
|
imageLabel.Text = "Using nonGUI mode";
|
|
|
|
imageLabel.Text = "Using nonGUI mode";
|
|
|
|
soundLabel.Text = "Using nonGUI mode";
|
|
|
|
soundLabel.Text = "Using nonGUI mode";
|
|
|
|
|
|
|
|
|
|
|
@ -196,6 +202,7 @@ namespace DotNetCTFDumper.GUI
|
|
|
|
treeView1.Nodes.Clear();
|
|
|
|
treeView1.Nodes.Clear();
|
|
|
|
foreach (var item in gameData.GameChunks.Chunks)
|
|
|
|
foreach (var item in gameData.GameChunks.Chunks)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
string ActualName = item.Name;
|
|
|
|
string ActualName = item.Name;
|
|
|
|
if (item.Loader is Frame frm) ActualName = ActualName + " " + frm.Name;
|
|
|
|
if (item.Loader is Frame frm) ActualName = ActualName + " " + frm.Name;
|
|
|
|
ChunkNode newNode = Helper.GetChunkNode(item, ActualName);
|
|
|
|
ChunkNode newNode = Helper.GetChunkNode(item, ActualName);
|
|
|
@ -263,6 +270,8 @@ namespace DotNetCTFDumper.GUI
|
|
|
|
Exe.Instance.GameData.GameChunks.GetChunk<SoundBank>().OnSoundSaved += UpdateSoundBar;
|
|
|
|
Exe.Instance.GameData.GameChunks.GetChunk<SoundBank>().OnSoundSaved += UpdateSoundBar;
|
|
|
|
if (Exe.Instance.GameData.GameChunks.GetChunk<MusicBank>() != null)
|
|
|
|
if (Exe.Instance.GameData.GameChunks.GetChunk<MusicBank>() != null)
|
|
|
|
Exe.Instance.GameData.GameChunks.GetChunk<MusicBank>().OnMusicSaved += UpdateMusicBar;
|
|
|
|
Exe.Instance.GameData.GameChunks.GetChunk<MusicBank>().OnMusicSaved += UpdateMusicBar;
|
|
|
|
|
|
|
|
ImageDumper.SortedImageSaved += IncrementSortedBar;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GameInfo.Text = toLog;
|
|
|
|
GameInfo.Text = toLog;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -290,6 +299,17 @@ namespace DotNetCTFDumper.GUI
|
|
|
|
musicLabel.Text = $"{index}/{all}";
|
|
|
|
musicLabel.Text = $"{index}/{all}";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void IncrementSortedBar(int all)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
SortedProgressBar.Visible = true;
|
|
|
|
|
|
|
|
SortedProgressBar.Maximum = all;
|
|
|
|
|
|
|
|
SortedProgressBar.Value += 1;
|
|
|
|
|
|
|
|
if (SortedProgressBar.Value >= SortedProgressBar.Maximum)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
SortedProgressBar.Visible = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void FolderBTN_Click(object sender, EventArgs e)
|
|
|
|
private void FolderBTN_Click(object sender, EventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|