move file

This commit is contained in:
Perfare 2020-03-14 16:06:21 +08:00
parent 948e2c4d92
commit 5b96a29cca
6 changed files with 12 additions and 8 deletions

View File

@ -65,7 +65,6 @@
<Compile Include="Math\Vector2.cs" />
<Compile Include="Math\Vector3.cs" />
<Compile Include="Math\Vector4.cs" />
<Compile Include="TGASharpLib\TGASharpLib.cs" />
<Compile Include="UType.cs" />
<Compile Include="ResourceReader.cs" />
<Compile Include="IImported.cs" />

View File

@ -116,6 +116,7 @@
</Compile>
<Compile Include="Components\TypeTreeItem.cs" />
<Compile Include="Components\TreeViewExtensions.cs" />
<Compile Include="TGASharpLib.cs" />
<EmbeddedResource Include="ExportOptions.resx">
<DependentUpon>ExportOptions.cs</DependentUpon>
</EmbeddedResource>

View File

@ -767,7 +767,8 @@ namespace AssetStudioGUI
Action<byte[], int> handler = delegate { };
if (validChannel == 0)
{
handler = (data, offset) => {
handler = (data, offset) =>
{
for (int i = 0; i < 4; i++)
data[i + offset] = (i == 3) ? (byte)255 : (byte)0;
};
@ -781,14 +782,16 @@ namespace AssetStudioGUI
c = 1;
else if (textureChannels[2])
c = 2;
handler = (data, offset) => {
handler = (data, offset) =>
{
for (int i = 0; i < 4; i++)
data[i + offset] = (i == 3) ? (byte)255 : data[c + offset];
};
}
else
{
handler = (data, offset) => {
handler = (data, offset) =>
{
for (int i = 0; i < 4; i++)
data[i + offset] = textureChannels[i] ? data[i + offset] : (byte)(i == 3 ? 255 : 0);
};

View File

@ -117,15 +117,15 @@
this.panel1.Controls.Add(this.tobmp);
this.panel1.Location = new System.Drawing.Point(30, 42);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(196, 30);
this.panel1.Size = new System.Drawing.Size(207, 30);
this.panel1.TabIndex = 5;
//
// totga
//
this.totga.AutoSize = true;
this.totga.Location = new System.Drawing.Point(144, 6);
this.totga.Location = new System.Drawing.Point(150, 6);
this.totga.Name = "totga";
this.totga.Size = new System.Drawing.Size(47, 16);
this.totga.Size = new System.Drawing.Size(41, 16);
this.totga.TabIndex = 2;
this.totga.Text = "TGA";
this.totga.UseVisualStyleBackColor = true;

View File

@ -4,6 +4,7 @@ using System.IO;
using System.Linq;
using System.Text;
using AssetStudio;
using TGASharpLib;
namespace AssetStudioGUI
{
@ -41,7 +42,7 @@ namespace AssetStudioGUI
return false;
if (tga)
{
TGASharpLib.TGA file = new TGASharpLib.TGA(bitmap);
var file = new TGA(bitmap);
file.Save(exportFullName);
}
else