Skip to content

Commit

Permalink
cleanup (#40)
Browse files Browse the repository at this point in the history
* cleanup

* fix bbox min/max
  • Loading branch information
gmriggs authored Jan 20, 2022
1 parent 1b09be3 commit 6e3201f
Show file tree
Hide file tree
Showing 201 changed files with 907 additions and 1,639 deletions.
3 changes: 3 additions & 0 deletions ACViewer/ACViewer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@
<Compile Include="Entity\TimeOfDay.cs" />
<Compile Include="Entity\TMTerrainDesc.cs" />
<Compile Include="Enum\DatType.cs" />
<Compile Include="Enum\Facing.cs" />
<Compile Include="Enum\ModelType.cs" />
<Compile Include="Enum\ViewMode.cs" />
<Compile Include="Extensions\PositionExtensions.cs" />
<Compile Include="Extensions\TextureExtensions.cs" />
<Compile Include="Extensions\Vector2Extensions.cs" />
Expand Down
12 changes: 4 additions & 8 deletions ACViewer/Data/DIDTable.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACViewer.Data
{
public class DIDTable: IEquatable<DIDTable>
{
public uint SetupID;
public uint MotionTableID;
public uint SoundTableID;
public uint CombatTableID;
public uint SetupID { get; set; }
public uint MotionTableID { get; set; }
public uint SoundTableID { get; set; }
public uint CombatTableID { get; set; }

public DIDTable() { }

Expand Down
5 changes: 1 addition & 4 deletions ACViewer/Data/DIDTables.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACViewer.Data
{
public static class DIDTables
{
public static Dictionary<uint, DIDTable> Setups;
public static Dictionary<uint, DIDTable> Setups { get; set; }

static DIDTables()
{
Expand Down
7 changes: 2 additions & 5 deletions ACViewer/Entity/AmbientSoundDesc.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

using ACE.Entity.Enum;

namespace ACViewer.Entity
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/AmbientSoundTableDesc.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/AnimData.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/AnimPartChange.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
2 changes: 0 additions & 2 deletions ACViewer/Entity/AnimationFrame.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Collections.Generic;

using ACViewer.Entity.AnimationHooks;

namespace ACViewer.Entity
{
public class AnimationFrame
Expand Down
1 change: 1 addition & 0 deletions ACViewer/Entity/AnimationHook.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Generic;

using ACE.Entity.Enum;

using ACViewer.Entity.AnimationHooks;

namespace ACViewer.Entity
Expand Down
11 changes: 4 additions & 7 deletions ACViewer/Entity/BSPLeaf.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

using ACE.Entity.Enum;

namespace ACViewer.Entity
Expand All @@ -26,8 +23,8 @@ public override List<TreeNode> BuildTree(BSPType bspType)
if (bspType == BSPType.Physics)
{
var solid = new TreeNode($"Solid: {_bspLeaf.Solid}");
var sphere = new TreeNode($"Sphere: {new Sphere(_bspLeaf.Sphere).ToString()}");
var inPolys = new TreeNode($"InPolys: {String.Join(", ", _bspLeaf.InPolys)}");
var sphere = new TreeNode($"Sphere: {new Sphere(_bspLeaf.Sphere)}");
var inPolys = new TreeNode($"InPolys: {string.Join(", ", _bspLeaf.InPolys)}");

treeNode.AddRange(new List<TreeNode>() { solid, sphere, inPolys });
}
Expand Down
11 changes: 4 additions & 7 deletions ACViewer/Entity/BSPNode.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

using ACE.Entity.Enum;

namespace ACViewer.Entity
Expand Down Expand Up @@ -57,13 +54,13 @@ public virtual List<TreeNode> BuildTree(BSPType bspType)
if (bspType == BSPType.Cell)
return treeNode;

var sphere = new TreeNode($"Sphere: {new Sphere(_bspNode.Sphere).ToString()}");
var sphere = new TreeNode($"Sphere: {new Sphere(_bspNode.Sphere)}");
treeNode.Add(sphere);

if (bspType == BSPType.Physics)
return treeNode;

var inPolys = new TreeNode($"InPolys: {String.Join(", ", _bspNode.InPolys)}");
var inPolys = new TreeNode($"InPolys: {string.Join(", ", _bspNode.InPolys)}");
treeNode.Add(inPolys);

return treeNode;
Expand Down
13 changes: 5 additions & 8 deletions ACViewer/Entity/BSPPortal.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

using ACE.Entity.Enum;

namespace ACViewer.Entity
Expand All @@ -20,7 +17,7 @@ public override List<TreeNode> BuildTree(BSPType bspType)
{
var type = new TreeNode($"Type: {_bspPortal.Type:X8}");

var splitter = new TreeNode($"Splitting Plane: {new Plane(_bspPortal.SplittingPlane).ToString()}");
var splitter = new TreeNode($"Splitting Plane: {new Plane(_bspPortal.SplittingPlane)}");

var posNode = new TreeNode("PosNode:");
if (_bspPortal.PosNode != null)
Expand Down Expand Up @@ -48,8 +45,8 @@ public override List<TreeNode> BuildTree(BSPType bspType)

if (bspType == BSPType.Drawing)
{
var sphere = new TreeNode($"Sphere: {new Sphere(_bspPortal.Sphere).ToString()}");
var inPolys = new TreeNode($"InPolys: {String.Join(", ", _bspPortal.InPolys)}");
var sphere = new TreeNode($"Sphere: {new Sphere(_bspPortal.Sphere)}");
var inPolys = new TreeNode($"InPolys: {string.Join(", ", _bspPortal.InPolys)}");

var inPortals = new TreeNode("InPortals:");
foreach (var inPortal in _bspPortal.InPortals)
Expand Down
7 changes: 1 addition & 6 deletions ACViewer/Entity/BSPTree.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ACE.Entity.Enum;
using ACE.Entity.Enum;

namespace ACViewer.Entity
{
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/BldPortal.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
8 changes: 2 additions & 6 deletions ACViewer/Entity/BuildInfo.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand All @@ -18,7 +14,7 @@ public BuildInfo(ACE.DatLoader.Entity.BuildInfo buildInfo)
public List<TreeNode> BuildTree()
{
var modelID = new TreeNode($"ModelID: {_buildInfo.ModelId:X8}");
var frame = new TreeNode($"Frame: {new Frame(_buildInfo.Frame).ToString()}");
var frame = new TreeNode($"Frame: {new Frame(_buildInfo.Frame)}");
var numLeaves = new TreeNode($"NumLeaves: {_buildInfo.NumLeaves}");

var portals = new TreeNode("Portals:");
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/CellPortal.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
7 changes: 2 additions & 5 deletions ACViewer/Entity/CellStruct.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

using ACE.Entity.Enum;

namespace ACViewer.Entity
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/ChatEmoteData.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/ClothingBaseEffect.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/ClothingObjectEffect.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
8 changes: 2 additions & 6 deletions ACViewer/Entity/ClothingSubPalette.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand All @@ -21,7 +17,7 @@ public List<TreeNode> BuildTree()

if (_subPalette.Ranges.Count == 1)
{
var range = new TreeNode($"Range: {new ClothingSubPaletteRange(_subPalette.Ranges[0]).ToString()}");
var range = new TreeNode($"Range: {new ClothingSubPaletteRange(_subPalette.Ranges[0])}");
treeNode.Add(range);
}
else
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/ClothingSubPaletteEffect.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/ClothingSubPaletteRange.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
8 changes: 1 addition & 7 deletions ACViewer/Entity/ClothingTextureEffect.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACViewer.Entity
namespace ACViewer.Entity
{
public class ClothingTextureEffect
{
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/Color.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text;

namespace ACViewer.Entity
{
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/CombatManeuver.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
7 changes: 1 addition & 6 deletions ACViewer/Entity/Contract.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using ACE.Entity.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
8 changes: 1 addition & 7 deletions ACViewer/Entity/CylSphere.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACViewer.Entity
namespace ACViewer.Entity
{
public class CylSphere
{
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/DayGroup.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
6 changes: 1 addition & 5 deletions ACViewer/Entity/EyeStripCG.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace ACViewer.Entity
{
Expand Down
Loading

0 comments on commit 6e3201f

Please sign in to comment.