Skip to content

Commit ace5092

Browse files
committed
Added a WiiU plugin with support for BFLIM
It is possible that BFLIM files from the Wii U not work yet.
1 parent 8832d1e commit ace5092

File tree

26 files changed

+1199
-27
lines changed

26 files changed

+1199
-27
lines changed

3DS/3DS.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@
181181
<Compile Include="UI\ThemeViewer.Designer.cs">
182182
<DependentUpon>ThemeViewer.cs</DependentUpon>
183183
</Compile>
184+
<Compile Include="UI\ThemeViewerNew.cs">
185+
<SubType>Form</SubType>
186+
</Compile>
187+
<Compile Include="UI\ThemeViewerNew.Designer.cs">
188+
<DependentUpon>ThemeViewerNew.cs</DependentUpon>
189+
</Compile>
184190
<Compile Include="UI\TXOBViewer.cs">
185191
<SubType>UserControl</SubType>
186192
</Compile>
@@ -242,6 +248,9 @@
242248
<EmbeddedResource Include="UI\ThemeViewer.resx">
243249
<DependentUpon>ThemeViewer.cs</DependentUpon>
244250
</EmbeddedResource>
251+
<EmbeddedResource Include="UI\ThemeViewerNew.resx">
252+
<DependentUpon>ThemeViewerNew.cs</DependentUpon>
253+
</EmbeddedResource>
245254
<EmbeddedResource Include="UI\TXOBViewer.resx">
246255
<DependentUpon>TXOBViewer.cs</DependentUpon>
247256
</EmbeddedResource>

3DS/NintendoWare/LYT1/CLIM.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ public CLIM(byte[] Data)
2727
{
2828
Header = new CLIMHeader(er);
2929
Image = new imag(er);
30+
DataLength = er.ReadUInt32();
3031
er.BaseStream.Position = 0;
31-
this.Data = er.ReadBytes((int)Image.DataLength);
32+
this.Data = er.ReadBytes((int)DataLength);
3233
}
3334
finally
3435
{
@@ -53,6 +54,7 @@ public byte[] Write()
5354
er.Write(Data, 0, Data.Length);
5455
Header.Write(er);
5556
Image.Write(er);
57+
er.Write(DataLength);
5658
long curpos = er.BaseStream.Position;
5759
er.BaseStream.Position = Data.Length + 0xC;
5860
er.Write((uint)curpos);
@@ -91,7 +93,7 @@ public bool CreateFromFile()
9193
Image.Height = (ushort)b.Height;
9294
Image.Format = 11;//10;//5;
9395
Data = Textures.FromBitmap(b, Textures.ImageFormat.ETC1A4);//.RGB565);
94-
Image.DataLength = (uint)Data.Length;
96+
DataLength = (uint)Data.Length;
9597
return true;
9698
}
9799
return false;
@@ -153,7 +155,6 @@ public imag(EndianBinaryReader er)
153155
Width = er.ReadUInt16();
154156
Height = er.ReadUInt16();
155157
Format = er.ReadUInt32();
156-
DataLength = er.ReadUInt32();
157158
}
158159
public void Write(EndianBinaryWriter er)
159160
{
@@ -162,14 +163,12 @@ public void Write(EndianBinaryWriter er)
162163
er.Write(Width);
163164
er.Write(Height);
164165
er.Write(Format);
165-
er.Write(DataLength);
166166
}
167167
public String Signature;
168-
public UInt32 SectionSize;//Without signature
168+
public UInt32 SectionSize;
169169
public UInt16 Width;
170170
public UInt16 Height;
171171
public UInt32 Format;
172-
public UInt32 DataLength;
173172

174173
public Textures.ImageFormat GetGPUTextureFormat()
175174
{
@@ -194,6 +193,7 @@ public Textures.ImageFormat GetGPUTextureFormat()
194193
throw new Exception("Unknown Image Format!");
195194
}
196195
}
196+
public UInt32 DataLength;
197197

198198
public Bitmap ToBitmap()
199199
{

3DS/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
1212
[assembly: AssemblyProduct("Every File Explorer")]
13-
[assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014")]
13+
[assembly: AssemblyCopyright("Copyright © Florian Nouwt 2014-2015")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

3DS/SARC.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void Write(EndianBinaryWriter er)
8686
[BinaryFixedSize(4)]
8787
public String Signature;
8888
public UInt16 HeaderSize;
89-
[BinaryBOM(0xFEFF)]
89+
//[BinaryBOM(0xFEFF)]
9090
public UInt16 Endianness;
9191
public UInt32 FileSize;
9292
public UInt32 FileDataOffset;

3DS/UI/ThemeViewerNew.Designer.cs

Lines changed: 217 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3DS/UI/ThemeViewerNew.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel;
4+
using System.Data;
5+
using System.Drawing;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Windows.Forms;
9+
10+
namespace _3DS.UI
11+
{
12+
public partial class ThemeViewerNew : Form
13+
{
14+
public ThemeViewerNew()
15+
{
16+
InitializeComponent();
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)