Skip to content

Commit 22db67e

Browse files
committed
Move types shared with RfgTools into common library
1 parent 7c6e4ce commit 22db67e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+123
-630
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77
[submodule "Dependencies/Beef.Linq"]
88
path = Dependencies/Beef.Linq
99
url = https://github.com/xposure/Beef.Linq.git
10+
[submodule "Dependencies/Common"]
11+
path = Dependencies/Common
12+
url = https://github.com/Moneyl/NF_Common.git

BeefSpace.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FileVersion = 1
2-
Projects = {Nanoforge = {Path = "."}, RfgTools = {Path = "Dependencies/RfgTools"}, "Beef.Linq" = {Path = "Dependencies/Beef.Linq/src"}, ImGui = {Path = "Dependencies/imgui-beef"}}
2+
Projects = {Nanoforge = {Path = "."}, RfgTools = {Path = "Dependencies/RfgTools"}, "Beef.Linq" = {Path = "Dependencies/Beef.Linq/src"}, ImGui = {Path = "Dependencies/imgui-beef"}, Common = {Path = "Dependencies/Common"}}
33
Unlocked = ["Zlib"]
44

55
[Workspace]

Dependencies/Common

Submodule Common added at f61556a

Dependencies/RfgTools

src/App/App.bf

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ using System.Collections;
33
using System.Diagnostics;
44
using System.Reflection;
55
using Nanoforge.Misc;
6-
using Nanoforge.Math;
6+
using Common.Math;
7+
using Common;
78
using System;
89

910
namespace Nanoforge.App

src/App/AppSystem.bf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Nanoforge.Misc;
22
using Nanoforge.App;
3-
using Nanoforge;
3+
using Common;
44
using System;
55

66
namespace Nanoforge.App

src/App/Events.bf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System.Collections;
2-
using Nanoforge;
2+
using Common;
33
using System;
44

55
namespace Nanoforge.App

src/App/Project/DiffUtil.bf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Collections;
22
using System.Reflection;
3-
using Nanoforge;
3+
using Common;
44
using System;
55

66
namespace Nanoforge.App.Project

src/App/Project/EditorObject.bf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using Nanoforge;
1+
using Common;
22
using System;
33
using System.Collections;
44
using System.Threading;
5-
using Nanoforge.Math;
5+
using Common.Math;
66

77
namespace Nanoforge.App
88
{

src/App/Project/Helpers.bf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System.Collections;
2-
using Nanoforge;
2+
using Common;
33
using System;
44

55
namespace Nanoforge.App.Project

src/App/Project/ProjectDB.bf

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ using System.Diagnostics;
33
using System.Collections;
44
using System.Threading;
55
using Nanoforge.Misc;
6-
using Nanoforge.Math;
6+
using Common.Math;
77
using System.Linq;
8-
using Nanoforge;
8+
using Common;
99
using System.IO;
1010
using System;
1111

src/App/Project/Snapshot.bf

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
using System.Collections;
2-
using Nanoforge.Math;
3-
using Nanoforge;
2+
using Common.Math;
3+
using Common;
44
using System;
5+
using Nanoforge.Rfg;
56

67
namespace Nanoforge.App.Project
78
{

src/App/Project/Transaction.bf

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Collections;
2-
using Nanoforge;
2+
using Common.Math;
3+
using Common;
34
using System;
45

56
namespace Nanoforge.App.Project

src/App/SystemSet.bf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ using Nanoforge.Misc.Containers;
22
using System.Collections;
33
using System.Diagnostics;
44
using System.Reflection;
5-
using Nanoforge;
5+
using Common;
66
using System;
77

88
namespace Nanoforge.App

src/FileSystem/PackfileVFS.bf

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Collections;
22
using RfgTools.Formats;
3-
using Nanoforge;
3+
using Common;
44
using System.IO;
55
using System;
66

@@ -41,13 +41,11 @@ namespace Nanoforge.FileSystem
4141
{
4242
delete packfile;
4343
Runtime.FatalError(scope $"Failed to read packfile. Error: '{err}'"); //TODO: Add proper error logging instead of crashing
44-
continue;
4544
}
4645
if (packfile.ReadAsmFiles() case .Err(let err))
4746
{
4847
delete packfile;
4948
Runtime.FatalError(scope $"Failed to read asm_pc file in packfile. Error: '{err}'"); //TODO: Add proper error logging instead of crashing
50-
continue;
5149
}
5250
Packfiles.Add(packfile);
5351
}

src/Gui/Documents/MapEditorDocument.bf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Threading;
22
using Nanoforge.App;
33
using Nanoforge.Rfg;
4-
using Nanoforge;
4+
using Common;
55
using System;
66
using ImGui;
77
using Nanoforge.Rfg.Import;

src/Gui/Extensions.bf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using Nanoforge.Math;
1+
using Common.Math;
22
using Nanoforge.Gui;
3-
using Nanoforge;
3+
using Common;
44
using System;
55

66
namespace ImGui

src/Gui/FontManager.bf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Collections;
22
using Nanoforge.App;
3-
using Nanoforge;
3+
using Common;
44
using System;
55
using ImGui;
66

src/Gui/Gui.bf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using System.Collections;
22
using Nanoforge.Gui.Panels;
3-
using Nanoforge.Math;
3+
using Common.Math;
44
using System.Threading;
55
using Nanoforge.App;
66
using System.Linq;
7-
using Nanoforge;
7+
using Common;
88
using System;
99
using ImGui;
1010

src/Gui/IGuiDocument.bf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Nanoforge.App;
2-
using Nanoforge;
2+
using Common;
33
using System;
44

55
namespace Nanoforge.Gui

src/Gui/IGuiPanel.bf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Nanoforge.App;
2-
using Nanoforge;
2+
using Common;
33
using System;
44

55
namespace Nanoforge.Gui

src/Gui/Panels/MainMenuBar.bf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Nanoforge.App;
2-
using Nanoforge;
2+
using Common;
33
using System;
44
using ImGui;
55
using System.Collections;

src/Gui/Panels/StateViewer.bf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Collections;
22
using Nanoforge.App;
3-
using Nanoforge;
3+
using Common;
44
using System;
55
using ImGui;
66

src/Math/Extensions.bf

-92
This file was deleted.

src/Math/Mat2.bf

-11
This file was deleted.

src/Math/Mat3.bf

-11
This file was deleted.

src/Math/Mat4.bf

-57
This file was deleted.

0 commit comments

Comments
 (0)