Skip to content

Commit

Permalink
Update data control namespaces (#667)
Browse files Browse the repository at this point in the history
Part of #653.
  • Loading branch information
lahm86 authored May 6, 2024
1 parent e8955af commit 55cddd5
Show file tree
Hide file tree
Showing 37 changed files with 48 additions and 55 deletions.
2 changes: 1 addition & 1 deletion ModelExport/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using TRDataControl.Utils;
using TRDataControl;

namespace ModelExport;

Expand Down
9 changes: 0 additions & 9 deletions TRDataControl/Events/SegmentEventArgs.cs

This file was deleted.

2 changes: 1 addition & 1 deletion TRDataControl/Helpers/TRModelExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using TRLevelControl.Build;
using TRLevelControl.Model;

namespace TRModelTransporter.Helpers;
namespace TRDataControl;

public static class TRModelExtensions
{
Expand Down
3 changes: 1 addition & 2 deletions TRDataControl/Transport/TR1/TR1DataExporter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TRDataControl.Remapping;
using TRImageControl.Packing;
using TRImageControl.Packing;
using TRLevelControl;
using TRLevelControl.Helpers;
using TRLevelControl.Model;
Expand Down
3 changes: 1 addition & 2 deletions TRDataControl/Transport/TR1/TR1DataImporter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TRDataControl.Remapping;
using TRImageControl;
using TRImageControl;
using TRImageControl.Packing;
using TRLevelControl.Model;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using TRLevelControl.Helpers;
using TRLevelControl.Model;

namespace TRDataControl.Utils;
namespace TRDataControl;

public class TR1MassExporter : TRMassExporter<TR1Level, TR1Type, TR1SFX, TR1Blob>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using TRImageControl.Packing;
using TRLevelControl.Model;

namespace TRDataControl.Remapping;
namespace TRDataControl;

public class TR1TextureRemapper : TRTextureRemapper<TR1Level>
{
Expand Down
1 change: 0 additions & 1 deletion TRDataControl/Transport/TR2/TR2DataExporter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Diagnostics;
using System.Drawing;
using TRDataControl.Remapping;
using TRImageControl.Packing;
using TRLevelControl.Model;

Expand Down
3 changes: 1 addition & 2 deletions TRDataControl/Transport/TR2/TR2DataImporter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TRDataControl.Remapping;
using TRImageControl;
using TRImageControl;
using TRImageControl.Packing;
using TRLevelControl.Model;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using TRLevelControl.Helpers;
using TRLevelControl.Model;

namespace TRDataControl.Utils;
namespace TRDataControl;

public class TR2MassExporter : TRMassExporter<TR2Level, TR2Type, TR2SFX, TR2Blob>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using TRImageControl.Packing;
using TRLevelControl.Model;

namespace TRDataControl.Remapping;
namespace TRDataControl;

public class TR2TextureRemapper : TRTextureRemapper<TR2Level>
{
Expand Down
3 changes: 1 addition & 2 deletions TRDataControl/Transport/TR3/TR3DataExporter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TRDataControl.Remapping;
using TRImageControl.Packing;
using TRImageControl.Packing;
using TRLevelControl.Model;

namespace TRDataControl;
Expand Down
3 changes: 1 addition & 2 deletions TRDataControl/Transport/TR3/TR3DataImporter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TRDataControl.Remapping;
using TRImageControl;
using TRImageControl;
using TRImageControl.Packing;
using TRLevelControl.Model;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using TRLevelControl.Helpers;
using TRLevelControl.Model;

namespace TRDataControl.Utils;
namespace TRDataControl;

public class TR3MassExporter : TRMassExporter<TR3Level, TR3Type, TR3SFX, TR3Blob>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using TRImageControl.Packing;
using TRLevelControl.Model;

namespace TRDataControl.Remapping;
namespace TRDataControl;

public class TR3TextureRemapper : TRTextureRemapper<TR3Level>
{
Expand Down
3 changes: 1 addition & 2 deletions TRDataControl/Transport/TR4/TR4DataExporter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TRDataControl.Remapping;
using TRImageControl.Packing;
using TRImageControl.Packing;
using TRLevelControl.Model;

namespace TRDataControl;
Expand Down
3 changes: 1 addition & 2 deletions TRDataControl/Transport/TR4/TR4DataImporter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TRDataControl.Remapping;
using TRImageControl.Packing;
using TRImageControl.Packing;
using TRLevelControl.Model;

namespace TRDataControl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using TRLevelControl;
using TRLevelControl.Model;

namespace TRDataControl.Utils;
namespace TRDataControl;

public class TR4MassExporter : TRMassExporter<TR4Level, TR4Type, TR4SFX, TR4Blob>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using TRImageControl.Packing;
using TRLevelControl.Model;

namespace TRDataControl.Remapping;
namespace TRDataControl;

public class TR4TextureRemapper : TRTextureRemapper<TR4Level>
{
Expand Down
3 changes: 1 addition & 2 deletions TRDataControl/Transport/TR5/TR5DataExporter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TRDataControl.Remapping;
using TRImageControl.Packing;
using TRImageControl.Packing;
using TRLevelControl.Model;

namespace TRDataControl;
Expand Down
3 changes: 1 addition & 2 deletions TRDataControl/Transport/TR5/TR5DataImporter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TRDataControl.Remapping;
using TRImageControl.Packing;
using TRImageControl.Packing;
using TRLevelControl.Model;

namespace TRDataControl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using TRLevelControl;
using TRLevelControl.Model;

namespace TRDataControl.Utils;
namespace TRDataControl;

public class TR5MassExporter : TRMassExporter<TR5Level, TR5Type, TR5SFX, TR5Blob>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using TRImageControl.Packing;
using TRLevelControl.Model;

namespace TRDataControl.Remapping;
namespace TRDataControl;

public class TR5TextureRemapper : TRTextureRemapper<TR5Level>
{
Expand Down
1 change: 0 additions & 1 deletion TRDataControl/Transport/TRDataImporter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using RectanglePacker.Events;
using TRImageControl.Packing;
using TRLevelControl.Model;
using TRModelTransporter.Transport;

namespace TRDataControl;

Expand Down
3 changes: 1 addition & 2 deletions TRDataControl/Transport/TRDataTransport.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using TRDataControl.Remapping;
using TRImageControl.Packing;
using TRImageControl.Packing;
using TRLevelControl.Model;

namespace TRDataControl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using TRLevelControl.Model;

namespace TRDataControl.Utils;
namespace TRDataControl;

public abstract class TRMassExporter<L, T, S, B>
where L : TRLevelBase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using TRImageControl.Packing;
using TRLevelControl.Model;

namespace TRDataControl.Remapping;
namespace TRDataControl;

public abstract class TRTextureRemapper<L>
where L : TRLevelBase
Expand Down
2 changes: 1 addition & 1 deletion TRDataControl/Transport/TransportException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace TRModelTransporter.Transport;
namespace TRDataControl;

public class TransportException : Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using TRDataControl;
using TRImageControl.Packing;
using TRLevelControl.Model;
using TRModelTransporter.Helpers;

namespace TRModelTransporter.Utilities;

Expand Down
2 changes: 0 additions & 2 deletions TRDataControlTests/IO/ExportTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ public void TestTR3ExportIO()
}

[TestMethod]
[TestCategory("Model")]
[Description("Test creating a TR4 model export.")]
public void TestTR4ExportProperties()
{
Expand All @@ -174,7 +173,6 @@ public void TestTR4ExportProperties()
}

[TestMethod]
[TestCategory("Model")]
[Description("Test TR4 model export IO.")]
public void TestTR4ExportIO()
{
Expand Down
18 changes: 18 additions & 0 deletions TRDataControlTests/IO/ImportTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,24 @@ public void TestTR5Import()
Assert.IsTrue(level.Models.ContainsKey(TR5Type.Huskie));
}

[TestMethod]
[Description("Test that importing a non-specific type that has aliases fails.")]
public void TestAliasImport()
{
TR2DataImporter importer = new()
{
Level = GetTR2TestLevel(),
TypesToImport = new() { TR2Type.StickWieldingGoon1 },
};

try
{
importer.Import();
Assert.Fail();
}
catch (TransportException) { }
}

private static void ExportTR1Model(TR1Type type, TRBlobType blobType)
{
TR1Level level = GetTR1TestLevel();
Expand Down
1 change: 0 additions & 1 deletion TRRandomizerCore/Randomizers/TR1/TR1OutfitRandomizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using TRLevelControl;
using TRLevelControl.Helpers;
using TRLevelControl.Model;
using TRModelTransporter.Helpers;
using TRRandomizerCore.Helpers;
using TRRandomizerCore.Levels;
using TRRandomizerCore.Meshes;
Expand Down
1 change: 0 additions & 1 deletion TRRandomizerCore/Textures/DynamicTextureBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using TRImageControl.Textures;
using TRLevelControl.Helpers;
using TRLevelControl.Model;
using TRModelTransporter.Helpers;
using TRRandomizerCore.Levels;
using TRRandomizerCore.Utilities;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using RectanglePacker.Organisation;
using System.Drawing;
using System.Drawing.Drawing2D;
using TRDataControl;
using TRImageControl;
using TRImageControl.Packing;
using TRLevelControl.Model;
using TRModelTransporter.Helpers;

namespace TRRandomizerCore.Textures;

Expand Down
2 changes: 1 addition & 1 deletion TRRandomizerCore/Textures/Wireframing/TR1Wireframer.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Drawing;
using System.Drawing.Drawing2D;
using TRDataControl;
using TRImageControl;
using TRImageControl.Packing;
using TRLevelControl.Helpers;
using TRLevelControl.Model;
using TRModelTransporter.Helpers;
using TRRandomizerCore.Utilities;

namespace TRRandomizerCore.Textures;
Expand Down
2 changes: 1 addition & 1 deletion TRRandomizerCore/Textures/Wireframing/TR2Wireframer.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Drawing;
using TRDataControl;
using TRImageControl;
using TRImageControl.Packing;
using TRLevelControl.Helpers;
using TRLevelControl.Model;
using TRModelTransporter.Helpers;
using TRRandomizerCore.Utilities;

namespace TRRandomizerCore.Textures;
Expand Down
2 changes: 1 addition & 1 deletion TRRandomizerCore/Textures/Wireframing/TR3Wireframer.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Drawing;
using System.Drawing.Drawing2D;
using TRDataControl;
using TRImageControl;
using TRImageControl.Packing;
using TRLevelControl.Helpers;
using TRLevelControl.Model;
using TRModelTransporter.Helpers;
using TRRandomizerCore.Utilities;

namespace TRRandomizerCore.Textures;
Expand Down

0 comments on commit 55cddd5

Please sign in to comment.