Skip to content

Commit ca4a8d1

Browse files
committed
added converter utility project to convert BULLFROG OBJECT DATA to wavefront OBJ
1 parent 1b1313f commit ca4a8d1

14 files changed

Lines changed: 1435 additions & 2 deletions

Hi-Octane Tools.sln

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 2013
4-
VisualStudioVersion = 12.0.40629.0
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.4.33213.308
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Level Editor", "Editor\Level Editor.csproj", "{D059C8FF-79AA-4CC6-9C1B-4D0709461126}"
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Level Inspector", "Inspector\Level Inspector.csproj", "{58CFA79F-8F06-4E60-AE80-BBD5CF8585BC}"
99
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectsConverter", "ObjectsConverter\ObjectsConverter.csproj", "{A0B850F1-D504-4BDB-B938-4D284A622DAD}"
11+
EndProject
1012
Global
1113
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1214
Debug|Any CPU = Debug|Any CPU
@@ -37,8 +39,23 @@ Global
3739
{58CFA79F-8F06-4E60-AE80-BBD5CF8585BC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
3840
{58CFA79F-8F06-4E60-AE80-BBD5CF8585BC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
3941
{58CFA79F-8F06-4E60-AE80-BBD5CF8585BC}.Release|x86.ActiveCfg = Release|Any CPU
42+
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43+
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
44+
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
45+
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
46+
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Debug|x86.ActiveCfg = Debug|Any CPU
47+
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Debug|x86.Build.0 = Debug|Any CPU
48+
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
49+
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Release|Any CPU.Build.0 = Release|Any CPU
50+
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
51+
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
52+
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Release|x86.ActiveCfg = Release|Any CPU
53+
{A0B850F1-D504-4BDB-B938-4D284A622DAD}.Release|x86.Build.0 = Release|Any CPU
4054
EndGlobalSection
4155
GlobalSection(SolutionProperties) = preSolution
4256
HideSolutionNode = FALSE
4357
EndGlobalSection
58+
GlobalSection(ExtensibilityGlobals) = postSolution
59+
SolutionGuid = {4D35CB96-BD53-4ECA-B4BF-E7FFF90648BD}
60+
EndGlobalSection
4461
EndGlobal

ObjectsConverter/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
5+
</startup>
6+
</configuration>

ObjectsConverter/Form1.Designer.cs

Lines changed: 79 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ObjectsConverter/Form1.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System;
2+
using System.Threading;
3+
using System.Windows.Forms;
4+
5+
namespace ObjectsConverter
6+
{
7+
public partial class Form1 : Form
8+
{
9+
public Form1()
10+
{
11+
Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
12+
InitializeComponent();
13+
}
14+
15+
private void runButton_Click(object sender, EventArgs e)
16+
{
17+
OpenFileDialog dialog = new OpenFileDialog();
18+
dialog.RestoreDirectory = true;
19+
dialog.Filter = "Bullfrog DAT file|*.dat";
20+
21+
if (dialog.ShowDialog() != DialogResult.OK) return;
22+
23+
ObjectDatFile file = ObjectDatFile.ReadFile(dialog.FileName);
24+
25+
if (file.Error != "")
26+
{
27+
outBox.Text = file.Error;
28+
return;
29+
}
30+
31+
outBox.Text = file.ToWavefrontOBJ();
32+
}
33+
34+
}
35+
}

0 commit comments

Comments
 (0)