Skip to content

Commit

Permalink
Started trying to get WPF set up.
Browse files Browse the repository at this point in the history
  • Loading branch information
MeltyPlayer committed Nov 22, 2023
1 parent d6661ca commit e116365
Show file tree
Hide file tree
Showing 35 changed files with 94 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using uni.games;

namespace uni {
public class RootFileGathererTests {
public class RootFileBundleGathererTests {
[TearDown]
public void Setup() {
FinFileSystem.FileSystem = new FileSystem();
Expand Down Expand Up @@ -58,7 +58,7 @@ public void TestEmpty() {
FinFileSystem.FileSystem = mockFileSystem;
}

var root = new RootFileGatherer().GatherAllFiles();
var root = new RootFileBundleGatherer().GatherAllFiles();
Assert.AreEqual(0, root.Subdirs.Count);
Assert.AreEqual(0, root.FileBundles.Count);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand Down Expand Up @@ -123,6 +124,7 @@
</ItemGroup>

<ItemGroup>
<Folder Include="src\ui\wpf\" />
<Folder Include="src\ui\wpf\common\" />
<Folder Include="src\ui\wpf\panels\" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using fin.audio.io.importers;
using fin.audio.io.importers.ogg;

namespace uni.ui.winforms {
namespace uni.api {
public class GlobalAudioReader : IAudioImporter<IAudioFileBundle> {
public IAudioBuffer<short> ImportAudio(IAudioManager<short> audioManager,
IAudioFileBundle audioFileBundle)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

using xmod.api;

namespace uni.ui.winforms {
namespace uni.api {
public class GlobalModelImporter : IModelImporter<IModelFileBundle> {
public IModel ImportModel(IModelFileBundle modelFileBundle)
=> modelFileBundle switch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

using sm64.api;

namespace uni.ui.winforms {
namespace uni.api {
public class GlobalSceneImporter : ISceneImporter<ISceneFileBundle> {
public IScene ImportScene(ISceneFileBundle sceneFileBundle,
out ILighting? lighting)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

using OpenTK.Graphics;

using uni.ui;
using uni.ui.winforms;

namespace uni.cli {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Assimp;
using System.IO;

using Assimp;

using fin.model.io.exporters.assimp;
using fin.io;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using uni.util.io;

namespace uni.games {
public class RootFileGatherer {
public class RootFileBundleGatherer {
public IFileBundleDirectory GatherAllFiles() {
IAnnotatedFileBundleGathererAccumulator accumulator =
Config.Instance.ExtractorSettings.UseMultithreadingToExtractRoms
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.IO.Compression;
using System.IO;
using System.IO.Compression;

using fin.io;
using fin.log;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.IO.Enumeration;
using System.Text;
using System.IO;

using fin.data.queues;
using fin.io;
using fin.util.asserts;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public IEnumerable<IAnnotatedMdlBundle> GatherFileBundles() {
// For some reason, some MDL files are compressed as RARC.
".mdl"),
out var fileHierarchy)) {
return;
yield break;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using uni.ui.winforms;
using uni.api;

namespace uni.games.midnight_club_2 {
public class MidnightClub2MassExporter : IMassExporter {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.io;
using System.IO;

using fin.io;
using fin.io.bundles;

using uni.platforms;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.io;
using System.IO;

using fin.io;
using fin.io.bundles;

using pmdc.api;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.io;
using System.IO;

using fin.io;
using fin.io.bundles;

using sm64.api;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.io;
using System.IO;

using fin.io;
using fin.util.asserts;

namespace uni.platforms.desktop {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.util.enumerables;
using System.IO;

using fin.util.enumerables;

using Microsoft.Win32;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.util.asserts;
using System.IO;

using fin.util.asserts;

using schema.binary;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.data.stacks;
using System.IO;

using fin.data.stacks;
using fin.io;
using fin.io.archive;
using fin.schema;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.io;
using System.IO;

using fin.io;
using fin.log;
using fin.schema;
using fin.util.asserts;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.io;
using System.IO;

using fin.io;
using fin.log;
using fin.util.asserts;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Globalization;
using System.IO;
using System.Text.RegularExpressions;

using fin.io;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.io;
using System.IO;

using fin.io;
using fin.log;
using fin.util.asserts;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.io;
using System.IO;

using fin.io;
using fin.log;
using fin.util.asserts;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.io;
using System.IO;

using fin.io;
using fin.io.archive;
using fin.util.strings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.io.archive;
using System.IO;

using fin.io.archive;

using schema.binary;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using fin.io;
using System.IO;

using fin.io;
using fin.io.archive;
using fin.util.strings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using schema.binary;
using System.IO;

using schema.binary;

namespace uni.platforms.threeDs.tools.gar.schema {
public class Gar5Subfile : IGarSubfile {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace uni.ui.winforms {
namespace uni.ui {
public static class DebugFlags {
public const float GLOBAL_SCALE = .001f;
public const float NEAR_PLANE = .01f;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace uni.ui.winforms {
namespace uni.ui {
public static class DesignModeUtil {
public static bool InDesignMode { get; set; } = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
using fin.model.impl;
using fin.ui;
using fin.ui.rendering.gl.model;
using MathNet.Numerics.Distributions;

using uni.api;
using uni.ui.winforms.common.fileTreeView;

namespace uni.ui.winforms;
Expand Down Expand Up @@ -71,7 +71,7 @@ public UniversalAssetToolForm() {

private void UniversalAssetToolForm_Load(object sender, EventArgs e) {
this.fileBundleTreeView_.Populate(
new RootFileGatherer().GatherAllFiles());
new RootFileBundleGatherer().GatherAllFiles());


this.fpsCallback_ =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

using OpenTK.Graphics.OpenGL;

using uni.api;
using uni.ui.winforms.gl;

namespace uni.ui.winforms.common.audio {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

using MathNet.Numerics;

using uni.api;
using uni.config;
using uni.games;
using uni.ui.winforms.common.fileTreeView;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Window x:Class="uni.ui.wpf.UniversalAssetToolForm"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:uni.ui.wpf"
mc:Ignorable="d"
Title="UniversalAssetToolForm" Height="450" Width="800">
<Grid>

</Grid>
</Window>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System.Windows;

namespace uni.ui.wpf {
/// <summary>
/// Interaction logic for UniversalAssetToolForm.xaml
/// </summary>
public partial class UniversalAssetToolForm : Window {
public UniversalAssetToolForm() {
InitializeComponent();
}
}
}

0 comments on commit e116365

Please sign in to comment.