Skip to content

Commit

Permalink
added converter utility project to convert BULLFROG OBJECT DATA to wa…
Browse files Browse the repository at this point in the history
…vefront OBJ
  • Loading branch information
movAX13h committed Feb 7, 2023
1 parent 1b1313f commit ca4a8d1
Show file tree
Hide file tree
Showing 14 changed files with 1,435 additions and 2 deletions.
21 changes: 19 additions & 2 deletions Hi-Octane Tools.sln
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
# Visual Studio Version 17
VisualStudioVersion = 17.4.33213.308
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Level Editor", "Editor\Level Editor.csproj", "{D059C8FF-79AA-4CC6-9C1B-4D0709461126}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Level Inspector", "Inspector\Level Inspector.csproj", "{58CFA79F-8F06-4E60-AE80-BBD5CF8585BC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectsConverter", "ObjectsConverter\ObjectsConverter.csproj", "{A0B850F1-D504-4BDB-B938-4D284A622DAD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -37,8 +39,23 @@ Global
{58CFA79F-8F06-4E60-AE80-BBD5CF8585BC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{58CFA79F-8F06-4E60-AE80-BBD5CF8585BC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{58CFA79F-8F06-4E60-AE80-BBD5CF8585BC}.Release|x86.ActiveCfg = Release|Any CPU
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Debug|x86.ActiveCfg = Debug|Any CPU
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Debug|x86.Build.0 = Debug|Any CPU
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Release|Any CPU.Build.0 = Release|Any CPU
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Release|x86.ActiveCfg = Release|Any CPU
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4D35CB96-BD53-4ECA-B4BF-E7FFF90648BD}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions ObjectsConverter/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
79 changes: 79 additions & 0 deletions ObjectsConverter/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions ObjectsConverter/Form1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.Threading;
using System.Windows.Forms;

namespace ObjectsConverter
{
public partial class Form1 : Form
{
public Form1()
{
Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
InitializeComponent();
}

private void runButton_Click(object sender, EventArgs e)
{
OpenFileDialog dialog = new OpenFileDialog();
dialog.RestoreDirectory = true;
dialog.Filter = "Bullfrog DAT file|*.dat";

if (dialog.ShowDialog() != DialogResult.OK) return;

ObjectDatFile file = ObjectDatFile.ReadFile(dialog.FileName);

if (file.Error != "")
{
outBox.Text = file.Error;
return;
}

outBox.Text = file.ToWavefrontOBJ();
}

}
}
Loading

0 comments on commit ca4a8d1

Please sign in to comment.