Skip to content

Commit

Permalink
Adjust standalone conversion logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebane1 committed Oct 21, 2024
1 parent e0fa472 commit 36b3684
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 13 deletions.
2 changes: 1 addition & 1 deletion FFXIVLooseTextureCompiler/FFXIVLooseTextureCompiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Version>2.0.3.4</Version>
<Version>2.0.3.5</Version>
<RunPostBuildEvent>Always</RunPostBuildEvent>
<Title>FFXIV Loose Texture Compiler</Title>
<Copyright>Lawener Industries</Copyright>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_LastSelectedProfileId>C:\Users\stel9\source\repos\FFXIVLooseTextureCompiler\FFXIVLooseTextureCompiler\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
<_LastSelectedProfileId>L:\Visual Studio\FFXIVLooseTextureCompiler\FFXIVLooseTextureCompiler\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
</PropertyGroup>
<ItemGroup>
<Compile Update="Configuration Dialogues\BulkNameReplacement.cs">
Expand Down
40 changes: 31 additions & 9 deletions FFXIVLooseTextureCompiler/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,8 @@ private void biboToGen3ToolStripMenuItem_Click(object sender, EventArgs e) {
MessageBox.Show("Please select where you want to save the conversion");
if (saveFileDialog.ShowDialog() == DialogResult.OK) {
XNormal.BiboToGen3(openFileDialog.FileName, saveFileDialog.FileName);
MessageBox.Show("Conversion successful!");
NavigateToFolder(saveFileDialog.FileName);
}
}
}
Expand All @@ -1430,6 +1432,8 @@ private void gen3ToBiboToolStripMenuItem_Click(object sender, EventArgs e) {
MessageBox.Show("Please select where you want to save the conversion");
if (saveFileDialog.ShowDialog() == DialogResult.OK) {
XNormal.Gen3ToBibo(openFileDialog.FileName, saveFileDialog.FileName);
MessageBox.Show("Conversion successful!");
NavigateToFolder(saveFileDialog.FileName);
}
}
}
Expand All @@ -1444,6 +1448,8 @@ private void gen3ToGen2ToolStripMenuItem_Click(object sender, EventArgs e) {
MessageBox.Show("Please select where you want to save the conversion");
if (saveFileDialog.ShowDialog() == DialogResult.OK) {
XNormal.Gen3ToGen2(openFileDialog.FileName, saveFileDialog.FileName);
MessageBox.Show("Conversion successful!");
NavigateToFolder(saveFileDialog.FileName);
}
}
}
Expand All @@ -1458,6 +1464,8 @@ private void gen2ToGen3ToolStripMenuItem_Click(object sender, EventArgs e) {
MessageBox.Show("Please select where you want to save the conversion");
if (saveFileDialog.ShowDialog() == DialogResult.OK) {
XNormal.Gen2ToGen3(openFileDialog.FileName, saveFileDialog.FileName);
MessageBox.Show("Conversion successful!");
NavigateToFolder(saveFileDialog.FileName);
}
}
}
Expand All @@ -1472,6 +1480,8 @@ private void gen2ToBiboToolStripMenuItem_Click(object sender, EventArgs e) {
MessageBox.Show("Please select where you want to save the conversion");
if (saveFileDialog.ShowDialog() == DialogResult.OK) {
XNormal.Gen2ToBibo(openFileDialog.FileName, saveFileDialog.FileName);
MessageBox.Show("Conversion successful!");
NavigateToFolder(saveFileDialog.FileName);
}
}
}
Expand All @@ -1490,6 +1500,8 @@ private void biboToGen2ToolStripMenuItem_Click(object sender, EventArgs e) {
MessageBox.Show("Please select where you want to save the conversion");
if (saveFileDialog.ShowDialog() == DialogResult.OK) {
XNormal.BiboToGen2(openFileDialog.FileName, saveFileDialog.FileName);
MessageBox.Show("Conversion successful!");
NavigateToFolder(saveFileDialog.FileName);
}
}
}
Expand All @@ -1505,6 +1517,8 @@ private void otopopToVanillaToolStripMenuItem_Click(object sender, EventArgs e)
MessageBox.Show("Please select where you want to save the conversion");
if (saveFileDialog.ShowDialog() == DialogResult.OK) {
XNormal.OtopopToVanillaLala(openFileDialog.FileName, saveFileDialog.FileName);
MessageBox.Show("Conversion successful!");
NavigateToFolder(saveFileDialog.FileName);
}
}
}
Expand All @@ -1520,6 +1534,8 @@ private void vanillaToOtopopToolStripMenuItem_Click(object sender, EventArgs e)
MessageBox.Show("Please select where you want to save the conversion");
if (saveFileDialog.ShowDialog() == DialogResult.OK) {
XNormal.VanillaLalaToOtopop(openFileDialog.FileName, saveFileDialog.FileName);
MessageBox.Show("Conversion successful!");
NavigateToFolder(saveFileDialog.FileName);
}
}
}
Expand All @@ -1534,6 +1550,8 @@ private void vanillaToAsymLalaToolStripMenuItem_Click(object sender, EventArgs e
MessageBox.Show("Please select where you want to save the conversion");
if (saveFileDialog.ShowDialog() == DialogResult.OK) {
XNormal.VanillaLalaToAsymLala(openFileDialog.FileName, saveFileDialog.FileName);
MessageBox.Show("Conversion successful!");
NavigateToFolder(saveFileDialog.FileName);
}
}
}
Expand All @@ -1548,6 +1566,8 @@ private void otopopToAsymLalaToolStripMenuItem_Click(object sender, EventArgs e)
MessageBox.Show("Please select where you want to save the conversion");
if (saveFileDialog.ShowDialog() == DialogResult.OK) {
XNormal.OtopopToAsymLala(openFileDialog.FileName, saveFileDialog.FileName);
MessageBox.Show("Conversion successful!");
NavigateToFolder(saveFileDialog.FileName);
}
}
}
Expand All @@ -1562,6 +1582,8 @@ private void asymLalaToOtopopToolStripMenuItem_Click(object sender, EventArgs e)
MessageBox.Show("Please select where you want to save the conversion");
if (saveFileDialog.ShowDialog() == DialogResult.OK) {
XNormal.AsymLalaToOtopop(openFileDialog.FileName, saveFileDialog.FileName);
MessageBox.Show("Conversion successful!");
NavigateToFolder(saveFileDialog.FileName);
}
}
}
Expand Down Expand Up @@ -1740,27 +1762,27 @@ private void imageToRGBChannelsToolStripMenuItem_Click(object sender, EventArgs
openFileDialog.Filter = "Texture File|*.png;*.tga;*.dds;*.bmp;*.tex;";
MessageBox.Show("Please select input texture");
if (openFileDialog.ShowDialog() == DialogResult.OK) {
Bitmap image = TexIO.ResolveBitmap(openFileDialog.FileName);
TexIO.SaveBitmap(ImageManipulation.ExtractRed(image), ImageManipulation.ReplaceExtension(ImageManipulation.AddSuffix(openFileDialog.FileName, "_R."), ".png"));
TexIO.SaveBitmap(ImageManipulation.ExtractGreen(image), ImageManipulation.ReplaceExtension(ImageManipulation.AddSuffix(openFileDialog.FileName, "_G."), ".png"));
TexIO.SaveBitmap(ImageManipulation.ExtractBlue(image), ImageManipulation.ReplaceExtension(ImageManipulation.AddSuffix(openFileDialog.FileName, "_B."), ".png"));
TexIO.SaveBitmap(ImageManipulation.ExtractAlpha(image), ImageManipulation.ReplaceExtension(ImageManipulation.AddSuffix(openFileDialog.FileName, "_A."), ".png"));
ImageManipulation.SplitImageToRGBA(openFileDialog.FileName);
MessageBox.Show("Image successfully split into seperate channels", VersionText);
}
}

private void multiCreatorToolStripMenuItem_Click(object sender, EventArgs e) {
new MaskCreator().Show();
}

private void NavigateToFolder(string folder) {
Process.Start(new System.Diagnostics.ProcessStartInfo() {
FileName = Path.GetDirectoryName(folder),
UseShellExecute = true,
Verb = "OPEN"
});
}
private void splitImageToRGBAndAlphaToolStripMenuItem_Click(object sender, EventArgs e) {
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "Texture File|*.png;*.tga;*.dds;*.bmp;*.tex;";
MessageBox.Show("Please select input texture");
if (openFileDialog.ShowDialog() == DialogResult.OK) {
Bitmap image = TexIO.ResolveBitmap(openFileDialog.FileName);
TexIO.SaveBitmap(ImageManipulation.ExtractRGB(image), ImageManipulation.ReplaceExtension(ImageManipulation.AddSuffix(openFileDialog.FileName, "_RGB."), ".png"));
TexIO.SaveBitmap(ImageManipulation.ExtractAlpha(image), ImageManipulation.ReplaceExtension(ImageManipulation.AddSuffix(openFileDialog.FileName, "_Alpha."), ".png"));
ImageManipulation.SplitRGBAndAlpha(openFileDialog.FileName);
MessageBox.Show("Image successfully split into RGB and Alpha", VersionText);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2024-09-08T00:01:24.9212903Z||;True|2024-09-07T18:40:17.3953499-05:00||;True|2024-09-07T13:09:05.2583831-05:00||;True|2024-09-07T13:08:41.0560108-05:00||;True|2024-09-07T13:08:13.3230218-05:00||;True|2024-09-07T13:07:43.9952405-05:00||;True|2024-09-07T13:06:00.7441862-05:00||;False|2024-09-07T13:04:03.7960089-05:00||;True|2024-09-07T01:40:42.5424271-05:00||;True|2024-09-07T01:39:58.4210271-05:00||;False|2024-09-07T01:39:09.1259007-05:00||;False|2024-09-07T01:38:56.0747659-05:00||;False|2024-09-07T01:28:47.9707688-05:00||;True|2024-09-07T01:17:05.3097530-05:00||;False|2024-09-07T01:15:47.3445988-05:00||;</History>
<History>True|2024-10-21T04:23:27.1658119Z||;False|2024-10-20T23:23:11.2137464-05:00||;False|2024-10-20T23:22:10.7168610-05:00||;False|2024-10-20T23:22:00.8881179-05:00||;True|2024-09-07T19:01:24.9212903-05:00||;True|2024-09-07T18:40:17.3953499-05:00||;True|2024-09-07T13:09:05.2583831-05:00||;True|2024-09-07T13:08:41.0560108-05:00||;True|2024-09-07T13:08:13.3230218-05:00||;True|2024-09-07T13:07:43.9952405-05:00||;True|2024-09-07T13:06:00.7441862-05:00||;False|2024-09-07T13:04:03.7960089-05:00||;True|2024-09-07T01:40:42.5424271-05:00||;True|2024-09-07T01:39:58.4210271-05:00||;False|2024-09-07T01:39:09.1259007-05:00||;False|2024-09-07T01:38:56.0747659-05:00||;False|2024-09-07T01:28:47.9707688-05:00||;True|2024-09-07T01:17:05.3097530-05:00||;False|2024-09-07T01:15:47.3445988-05:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion LooseTextureCompilerCore

0 comments on commit 36b3684

Please sign in to comment.