Skip to content

Commit

Permalink
Merge pull request #31 from burninrubber0/Cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
burninrubber0 authored May 3, 2023
2 parents 2bbd446 + fd81894 commit ac61bf5
Show file tree
Hide file tree
Showing 150 changed files with 1,614 additions and 3,224 deletions.
8 changes: 1 addition & 7 deletions BaseHandlers/AptData.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Serialization;
using BundleFormat;
using BundleUtilities;
using MathLib;
using OpenTK;
using OpenTK.Graphics.OpenGL;
using OpenTK.Mathematics;
using PluginAPI;

namespace BaseHandlers
Expand Down
8 changes: 0 additions & 8 deletions BaseHandlers/BaseHandlers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,10 @@
<ProjectReference Include="..\MathLib\MathLib.csproj" />
<ProjectReference Include="..\ModelViewer\ModelViewer.csproj" />
<ProjectReference Include="..\PluginAPI\PluginAPI.csproj" />
<ProjectReference Include="..\StandardExtension\StandardExtension.csproj" />
<ProjectReference Include="..\VehicleList\VehicleList.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DebugHelper" Version="1.0.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="OpenTK.GLControl" Version="3.3.3" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.1" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)BundleManager\bin\$(ConfigurationName)\$(TargetFramework)\plugins\&quot; /s /e /y" />
Expand Down
112 changes: 1 addition & 111 deletions BaseHandlers/BasePlugin.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
using BundleFormat;
using BundleUtilities;
using ModelViewer.SceneData;
using BundleFormat;
using PluginAPI;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BaseHandlers
{
Expand Down Expand Up @@ -37,106 +28,5 @@ public override string GetName()
{
return "Base Resource Handlers";
}

#region Extra Tools

/*public void ConvertImagesFromPS3ToPC_old(IWin32Window window, BundleArchive archive)
{
if (archive == null)
{
MessageBox.Show(window, "No Archive Open!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (archive.Console)
{
for (int i = 0; i < archive.Entries.Count; i++)
{
BundleEntry entry = archive.Entries[i];
if (entry.EntryBlocks[0].Data.Length == 48 && entry.EntryBlocks[1].Data != null && entry.EntryBlocks[1].Data.Length > 0)
{
MemoryStream ms = new MemoryStream(entry.EntryBlocks[0].Data);
BinaryReader2 br = new BinaryReader2(ms);
br.BigEndian = entry.Console;
byte compression = br.ReadByte();
byte[] unknown1 = br.ReadBytes(3);
byte[] type = Encoding.ASCII.GetBytes("DXT1");
if (compression == 0x85)
{
type = new byte[] { 0x15, 0x00, 0x00, 0x00 };
}
else if (compression == 0x86)
{
type = Encoding.ASCII.GetBytes("DXT1");
}
else if (compression == 0x88)
{
type = Encoding.ASCII.GetBytes("DXT5");
}
int unknown2 = Util.ReverseBytes(br.ReadInt32());
int width = Util.ReverseBytes(br.ReadInt16());
int height = Util.ReverseBytes(br.ReadInt16());
br.Close();
MemoryStream msx = new MemoryStream();
BinaryWriter bw = new BinaryWriter(msx);
bw.Write((int)0);
bw.Write((int)0);
bw.Write((int)0);
bw.Write((int)1);
bw.Write(type);
bw.Write((short)width);
bw.Write((short)height);
bw.Write((int)0x15);
bw.Write((int)0);
bw.Flush();
byte[] Data = msx.ToArray();
bw.Close();
entry.EntryBlocks[0].Data = Data;
entry.Dirty = true;
}
}
}
else
{
MessageBox.Show(window, "This feature only works on PS3 Bundle Files", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
public void ConvertToPC(IWin32Window window, BundleArchive archive)
{
// TODO: Support everything
for (int i = 0; i < archive.Entries.Count; i++)
{
BundleEntry entry = archive.Entries[i];
if (entry.Type == EntryType.IDList)
{
IDList list = new IDList();
list.Read(entry);
list.Write(entry);
}
else if (entry.Type == EntryType.PolygonSoupListResourceType)
{
PolygonSoupList list = new PolygonSoupList();
list.Read(entry);
list.Write(entry);
}
}
//PatchImages();
archive.Platform = BundlePlatform.PC;
}*/

#endregion
}
}
5 changes: 1 addition & 4 deletions BaseHandlers/GraphicsSpec.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
using System.Collections.Generic;
using System.IO;
using System.Collections.Generic;
using BundleFormat;
using BundleUtilities;
using MathLib;
using ModelViewer;
using ModelViewer.SceneData;
using OpenTK;
using PluginAPI;

namespace BaseHandlers
Expand Down
5 changes: 0 additions & 5 deletions BaseHandlers/IDList.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BundleFormat;
using BundleUtilities;
using PluginAPI;
Expand Down
5 changes: 1 addition & 4 deletions BaseHandlers/InstanceList.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using BundleFormat;
using BundleUtilities;
using MathLib;
using ModelViewer;
using ModelViewer.SceneData;
using OpenTK;
using OpenTK.Mathematics;
using PluginAPI;

namespace BaseHandlers
Expand Down
6 changes: 2 additions & 4 deletions BaseHandlers/InstanceListEditor.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions BaseHandlers/InstanceListEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@
using PluginAPI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BaseHandlers
Expand Down Expand Up @@ -254,15 +248,5 @@ private void LstMain_MouseDoubleClick(object sender, MouseEventArgs e)
{
ViewSelectedModel();
}

private void LstMain_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
{
//e.Cancel = true;
}

private void LstMain_ColumnWidthChanged(object sender, ColumnWidthChangedEventArgs e)
{
//UpdateColumnWidth();
}
}
}
4 changes: 0 additions & 4 deletions BaseHandlers/MaterialEntry.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BundleFormat;
using BundleUtilities;

Expand Down
6 changes: 1 addition & 5 deletions BaseHandlers/Renderable.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BundleFormat;
using BundleUtilities;
using MathLib;
using ModelViewer;
using ModelViewer.SceneData;
using OpenTK;
using OpenTK.Mathematics;
using PluginAPI;

namespace BaseHandlers
Expand Down
5 changes: 1 addition & 4 deletions BaseHandlers/StreetData.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BundleFormat;
using BundleUtilities;
using MathLib;
using OpenTK;
using OpenTK.Mathematics;
using PluginAPI;

namespace BaseHandlers
Expand Down
4 changes: 0 additions & 4 deletions BaseHandlers/TextureState.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BundleFormat;
using BundleUtilities;
using BurnoutImage;
Expand Down
4 changes: 0 additions & 4 deletions BaseHandlers/Traffic.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BundleFormat;
using BundleUtilities;
using PluginAPI;
Expand Down
Loading

0 comments on commit ac61bf5

Please sign in to comment.