Merge branch 'main' into 'multi-pck-files-feature'

This commit is contained in:
miku-666
2024-04-20 21:13:56 +02:00
85 changed files with 4299 additions and 10381 deletions

View File

@@ -0,0 +1,60 @@
/* Copyright (c) 2022-present miku-666
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1.The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
namespace PckStudio.IO.TGA
{
internal enum TGADataTypeCode : byte
{
/// <summary>
/// No image data included.
/// </summary>
NO_DATA = 0,
/// <summary>
/// Uncompressed, color-mapped images.
/// </summary>
COLORMAPPED = 1,
/// <summary>
/// Uncompressed, RGB images.
/// </summary>
RGB = 2,
/// <summary>
/// Uncompressed, black and white images.
/// </summary>
BLACK_WHITE = 3,
/// <summary>
/// Runlength encoded color-mapped images.
/// </summary>
RLE_COLORMAPPED = 9,
/// <summary>
/// Runlength encoded RGB images.
/// </summary>
RLE_RGB = 10,
/// <summary>
/// Compressed, black and white images.
/// </summary>
COMPRESSED_BLACK_WHITE = 11,
/// <summary>
/// Compressed color-mapped data, using Huffman, Delta, and runlength encoding.
/// </summary>
COMPRESSED_RLE_COLORMAPPED = 32,
/// <summary>
/// Compressed color-mapped data, using Huffman, Delta, and runlength encoding. 4-pass quadtree-type process.
/// </summary>
COMPRESSED_RLE_COLORMAPPED_4 = 33,
}
}

View File

@@ -0,0 +1,33 @@
/* Copyright (c) 2022-present miku-666
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1.The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
using System.IO;
using System.Drawing;
namespace PckStudio.IO.TGA
{
internal static class TGADeserializer
{
private static TGAReader reader = new TGAReader();
public static Image DeserializeFromStream(Stream stream)
{
TGAFileData tgaImg = reader.FromStream(stream);
return tgaImg.Bitmap;
}
}
}

View File

@@ -0,0 +1,25 @@
using System;
using System.Runtime.Serialization;
namespace PckStudio.IO.TGA
{
[Serializable]
internal class TGAException : Exception
{
public TGAException()
{
}
public TGAException(string message) : base(message)
{
}
public TGAException(string message, Exception innerException) : base(message, innerException)
{
}
protected TGAException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}

View File

@@ -0,0 +1,63 @@
/* Copyright (c) 2022-present miku-666
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1.The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
using System;
using System.Windows.Forms;
namespace PckStudio.IO.TGA
{
internal struct TGAExtentionData
{
public const short ExtensionSize = 0x1EF;
public string AuthorName;
public string AuthorComment;
public DateTime TimeStamp;
public string JobID;
public TimeSpan JobTime;
public string SoftwareID;
public byte[] SoftwareVersion;
public int KeyColor;
public int PixelAspectRatio;
public int GammaValue;
public int ColorCorrectionOffset;
public int PostageStampOffset;
public int ScanLineOffset;
public byte AttributesType;
public static TGAExtentionData Create()
{
var extensionData = new TGAExtentionData();
extensionData.AuthorName = "";
extensionData.AuthorComment = "";
extensionData.AuthorComment = "";
extensionData.TimeStamp = DateTime.Now;
extensionData.JobID = "";
extensionData.JobTime = new TimeSpan(extensionData.TimeStamp.Hour, extensionData.TimeStamp.Minute, extensionData.TimeStamp.Second);
extensionData.SoftwareID = Application.ProductName;
Version.TryParse(Application.ProductVersion, out Version currentVersion);
extensionData.SoftwareVersion = new byte[] { (byte)currentVersion.Major, (byte)currentVersion.Minor, (byte)currentVersion.Build };
extensionData.KeyColor = 0;
extensionData.PixelAspectRatio = 0;
extensionData.GammaValue = 0;
extensionData.ColorCorrectionOffset = 0;
extensionData.PostageStampOffset = 0;
extensionData.ScanLineOffset = 0;
extensionData.AttributesType = 3;
return extensionData;
}
}
}

View File

@@ -0,0 +1,41 @@
/* Copyright (c) 2022-present miku-666
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1.The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
using System.IO;
using System.Drawing;
using System;
namespace PckStudio.IO.TGA
{
internal class TGAFileData
{
public TGAFileData(TGAHeader header, Image bitmap, TGAFooter footer, TGAExtentionData extentionData)
{
if (bitmap.Width != header.Width || bitmap.Height != header.Height)
throw new InvalidDataException("Header resolution doesn't match Image resolution");
Header = header;
Bitmap = bitmap;
Footer = footer;
ExtentionData = extentionData;
}
public readonly TGAHeader Header;
public readonly Image Bitmap;
public readonly TGAFooter Footer;
public readonly TGAExtentionData ExtentionData;
}
}

View File

@@ -0,0 +1,27 @@
/* Copyright (c) 2022-present miku-666
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1.The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
namespace PckStudio.IO.TGA
{
internal struct TGAFooter
{
internal const string Signature = "TRUEVISION-XFILE";
public int ExtensionDataOffset;
public int DeveloperAreaDataOffset;
}
}

View File

@@ -0,0 +1,37 @@
/* Copyright (c) 2022-present miku-666
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1.The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
namespace PckStudio.IO.TGA
{
/// <summary>
/// Resources:
/// <http://www.paulbourke.net/dataformats/tga/>
/// <https://en.wikipedia.org/wiki/Truevision_TGA>
/// </summary>
internal struct TGAHeader
{
public byte[] Id;
public TGADataTypeCode DataTypeCode;
public (byte Type, short Origin/*Offset*/, short Length, byte Depth) Colormap;
public (short X, short Y) Origin;
public short Width;
public short Height;
public byte BitsPerPixel;
public byte ImageDescriptor;
}
}

View File

@@ -0,0 +1,241 @@
/* Copyright (c) 2022-present miku-666
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1.The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
using System;
using System.IO;
using System.Text;
using System.Drawing;
using System.Diagnostics;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using OMI.Workers;
using OMI;
namespace PckStudio.IO.TGA
{
internal class TGAReader : IDataFormatReader<TGAFileData>, IDataFormatReader
{
object IDataFormatReader.FromStream(Stream stream) => FromStream(stream);
object IDataFormatReader.FromFile(string filename) => FromFile(filename);
public TGAFileData FromFile(string filename)
{
if (File.Exists(filename))
{
using( var fs = File.OpenRead(filename) )
{
return FromStream(fs);
}
}
throw new FileNotFoundException(filename);
}
public TGAFileData FromStream(Stream stream)
{
using var reader = new EndiannessAwareBinaryReader(stream, Encoding.ASCII, leaveOpen: true, Endianness.LittleEndian);
TGAHeader header = LoadHeader(reader);
Image image = LoadImage(reader, header);
TGAFooter footer = LoadFooter(reader);
TGAExtentionData extentionData = LoadExtentionData(reader, footer);
return new TGAFileData(header, image, footer, extentionData);
}
private static void TGA_HandleRGB(EndiannessAwareBinaryReader reader, TGAHeader header, BitmapData bitmapData)
{
int bytesPerPixel = header.BitsPerPixel / 8;
byte[] data = reader.ReadBytes(header.Height * header.Width * bytesPerPixel);
Marshal.Copy(data, 0, bitmapData.Scan0, data.Length);
}
private static void TGA_HandleNoData(EndiannessAwareBinaryReader _, TGAHeader header, BitmapData bitmapData)
{
Random r = new Random();
byte[] bytes = new byte[bitmapData.Width * bitmapData.Height * 4];
r.NextBytes(bytes);
Marshal.Copy(bytes, 0, bitmapData.Scan0, bytes.Length);
}
private static TGAHeader LoadHeader(EndiannessAwareBinaryReader reader)
{
var header = new TGAHeader();
byte[] bytes = reader.ReadBytes(3);
(var headerIdLength, header.Colormap.Type, header.DataTypeCode) = (bytes[0], bytes[1], (TGADataTypeCode)bytes[2]);
header.Colormap.Origin = reader.ReadInt16();
header.Colormap.Length = reader.ReadInt16();
header.Colormap.Depth = reader.ReadByte();
header.Origin.X = reader.ReadInt16();
header.Origin.Y = reader.ReadInt16();
header.Width = reader.ReadInt16();
header.Height = reader.ReadInt16();
header.BitsPerPixel = reader.ReadByte();
header.ImageDescriptor = reader.ReadByte();
header.Id = reader.ReadBytes(headerIdLength);
DebugLogHeader(header);
return header;
}
private static PixelFormat GetPixelFormat(int bytesPerPixel)
{
return bytesPerPixel switch
{
2 => PixelFormat.Format16bppArgb1555,
3 => PixelFormat.Format24bppRgb,
4 => PixelFormat.Format32bppArgb,
_ => throw new NotSupportedException(nameof(bytesPerPixel))
};
}
private static Image LoadImage(EndiannessAwareBinaryReader reader, TGAHeader header)
{
if (header.DataTypeCode != TGADataTypeCode.RGB)
throw new NotSupportedException(nameof(header.DataTypeCode));
Bitmap bitmap = new Bitmap(header.Width, header.Height);
BitmapData bitmapData = bitmap.LockBits(
new Rectangle(0, 0, header.Width, header.Height),
ImageLockMode.WriteOnly,
GetPixelFormat(header.BitsPerPixel >> 3));
if (header.DataTypeCode == TGADataTypeCode.NO_DATA)
{
TGA_HandleNoData(reader, header, bitmapData);
bitmap.UnlockBits(bitmapData);
return bitmap;
}
TGA_HandleRGB(reader, header, bitmapData);
bitmap.UnlockBits(bitmapData);
bitmap.RotateFlip(RotateFlipType.RotateNoneFlipY);
return bitmap;
}
private static TGAFooter LoadFooter(EndiannessAwareBinaryReader reader)
{
long origin = reader.BaseStream.Position;
reader.BaseStream.Seek(-26, SeekOrigin.End);
TGAFooter footer = new TGAFooter();
footer.ExtensionDataOffset = reader.ReadInt32(); // optional
footer.DeveloperAreaDataOffset = reader.ReadInt32(); // optional
string signature = reader.ReadString(16);
Debug.Assert(signature.Equals(TGAFooter.Signature) || reader.ReadInt16() != 0x002E,
"Footer signature invalid");
reader.BaseStream.Seek(origin, SeekOrigin.Begin);
DebugLogFooter(footer);
return footer;
}
private static TGAExtentionData LoadExtentionData(EndiannessAwareBinaryReader reader, TGAFooter footer)
{
if (footer.ExtensionDataOffset > 0)
{
reader.BaseStream.Seek(footer.ExtensionDataOffset, SeekOrigin.Begin);
if (reader.ReadInt16() == TGAExtentionData.ExtensionSize)
{
TGAExtentionData extentionData = new TGAExtentionData();
extentionData.AuthorName = reader.ReadString(41);
extentionData.AuthorComment = reader.ReadString(324);
short month = reader.ReadInt16();
short day = reader.ReadInt16();
short year = reader.ReadInt16();
short hour = reader.ReadInt16();
short minute = reader.ReadInt16();
short second = reader.ReadInt16();
extentionData.TimeStamp = new DateTime(year, month, day, hour, minute, second);
extentionData.JobID = reader.ReadString(41);
extentionData.JobTime = new TimeSpan(
hours: reader.ReadInt16(),
minutes: reader.ReadInt16(),
seconds: reader.ReadInt16()
);
extentionData.SoftwareID = reader.ReadString(41);
extentionData.SoftwareVersion = reader.ReadBytes(3);
extentionData.KeyColor = reader.ReadInt32();
extentionData.PixelAspectRatio = reader.ReadInt32();
extentionData.GammaValue = reader.ReadInt32();
extentionData.ColorCorrectionOffset = reader.ReadInt32();
extentionData.PostageStampOffset = reader.ReadInt32();
extentionData.ScanLineOffset = reader.ReadInt32();
extentionData.AttributesType = reader.ReadByte();
DebugLogExtentionData(extentionData);
return extentionData;
}
}
return default;
}
[Conditional("DEBUG")]
[DebuggerHidden]
[DebuggerStepThrough]
private static void DebugLogExtentionData(TGAExtentionData extentionData)
{
Debug.WriteLine("-------Extention Data-------", category: nameof(TGAReader));
Debug.WriteLine(string.Format("Author Name: {0}", args: extentionData.AuthorName), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Author Comment: {0}", args: extentionData.AuthorComment), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Time Stamp: {0}", args: extentionData.TimeStamp), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Job ID: {0}", args: extentionData.JobID), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Job Time: {0}", args: extentionData.JobTime), category: nameof(TGAReader));
Debug.WriteLine(string.Format("SoftwareID: {0}", args: extentionData.SoftwareID), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Software Version: {0}.{1}.{2}", extentionData.SoftwareVersion[0], extentionData.SoftwareVersion[1], extentionData.SoftwareVersion[2]), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Key Color: {0}", args: extentionData.KeyColor), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Pixel Aspect Ratio: {0}", args: extentionData.PixelAspectRatio), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Gamma Value: {0}", args: extentionData.GammaValue), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Color Correction Offset: {0}", args: extentionData.ColorCorrectionOffset), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Postage Stamp Offset: {0}", args: extentionData.PostageStampOffset), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Scan Line Offset: {0}", args: extentionData.ScanLineOffset), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Attributes Type: {0}", args: extentionData.AttributesType), category: nameof(TGAReader));
Debug.WriteLine("----------------------------", category: nameof(TGAReader));
}
[Conditional("DEBUG")]
[DebuggerHidden]
[DebuggerStepThrough]
private static void DebugLogHeader(TGAHeader header)
{
Debug.WriteLine("------Header Data------", category: nameof(TGAReader));
Debug.WriteLine(string.Format("ID length: {0}", args: header.Id.Length), category: nameof(TGAReader));
Debug.WriteLineIf(header.Id.Length > 0, $"ID: {header.Id}", category: nameof(TGAReader));
Debug.WriteLine(string.Format("Colourmap type: {0}", args: header.Colormap.Type), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Image type: {0}", args: header.DataTypeCode), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Colour map offset: {0}", args: header.Colormap.Origin), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Colour map length: {0}", args: header.Colormap.Length), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Colour map depth: {0}", args: header.Colormap.Depth), category: nameof(TGAReader));
Debug.WriteLine(string.Format("X origin: {0}", args: header.Origin.X), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Y origin: {0}", args: header.Origin.Y), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Width: {0}", args: header.Width), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Height: {0}", args: header.Height), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Bits per pixel: {0}", args: header.BitsPerPixel), category: nameof(TGAReader));
Debug.WriteLine(string.Format("Descriptor: {0}", args: header.ImageDescriptor), category: nameof(TGAReader));
Debug.WriteLine("-----------------------", category: nameof(TGAReader));
}
[Conditional("DEBUG")]
[DebuggerHidden]
[DebuggerStepThrough]
private static void DebugLogFooter(TGAFooter footer)
{
Debug.WriteLine("-------Footer Data-------", category: nameof(TGAReader));
Debug.WriteLine($"Extension Data Offset: {footer.ExtensionDataOffset:x}", category: nameof(TGAReader));
Debug.WriteLine($"Developer Area Data Offset: {footer.DeveloperAreaDataOffset:x}", category: nameof(TGAReader));
Debug.WriteLine("-----------------------", category: nameof(TGAReader));
}
}
}

View File

@@ -0,0 +1,32 @@
/* Copyright (c) 2022-present miku-666
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1.The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
using System.IO;
using System.Drawing;
namespace PckStudio.IO.TGA
{
internal static class TGASerializer
{
private static TGAWriter writer = new TGAWriter();
public static void SerializeToStream(Stream stream, Image image)
{
writer.WriteToStream(stream, image);
}
}
}

View File

@@ -0,0 +1,143 @@
/* Copyright (c) 2022-present miku-666
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1.The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
**/
using System;
using System.IO;
using System.Drawing;
using System.Diagnostics;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Text;
using OMI;
using System.Windows.Forms;
using DiscordRPC;
namespace PckStudio.IO.TGA
{
internal class TGAWriter
{
private Bitmap _bitmap;
private int extensionDataOffset = 0;
public TGAWriter()
{
}
private void WriteHeader(EndiannessAwareBinaryWriter writer)
{
writer.Write(new byte[]
{
0, // header.Id.Length
0, // colormap type
(byte)TGADataTypeCode.RGB
});
writer.Write(0); // Colormap.Origin
writer.Write(0); // Colormap.Length
writer.Write(0); // Colormap.Depth
writer.Write(0); // Origin.X
writer.Write(0); // Origin.Y
writer.Write(_bitmap.Width);
writer.Write(_bitmap.Height);
writer.Write(32); // BitsPerPixel
writer.Write(8); // ImageDescriptor
}
private void WriteImage(EndiannessAwareBinaryWriter writer)
{
_bitmap.RotateFlip(RotateFlipType.RotateNoneFlipY);
BitmapData bitmapData = _bitmap.LockBits(
new Rectangle(0, 0, _bitmap.Width, _bitmap.Height),
ImageLockMode.ReadOnly,
PixelFormat.Format32bppArgb);
byte[] buffer = new byte[_bitmap.Width * _bitmap.Height * 4];
Marshal.Copy(bitmapData.Scan0, buffer, 0, _bitmap.Width * _bitmap.Height * 4);
writer.Write(buffer);
}
private void WriteFooter(EndiannessAwareBinaryWriter writer)
{
writer.Write(extensionDataOffset); // extensionDataOffset
writer.Write(0); // developerAreaDataOffset
writer.WriteString(TGAFooter.Signature);
writer.Write((byte)0x2E);
writer.Write((byte)0x00);
}
private void WriteExtensionData(EndiannessAwareBinaryWriter writer)
{
extensionDataOffset = Convert.ToInt32(writer.BaseStream.Position);
TGAExtentionData extentionData = TGAExtentionData.Create();
writer.Write(TGAExtentionData.ExtensionSize);
// Author Name
writer.WriteString(extentionData.AuthorName, 41);
// Author Comment
writer.WriteString(extentionData.AuthorComment, 324);
// Timestamp
writer.Write((short)extentionData.TimeStamp.Month);
writer.Write((short)extentionData.TimeStamp.Day);
writer.Write((short)extentionData.TimeStamp.Year);
writer.Write((short)extentionData.TimeStamp.Hour);
writer.Write((short)extentionData.TimeStamp.Minute);
writer.Write((short)extentionData.TimeStamp.Second);
// Job id
writer.WriteString(extentionData.JobID, 41);
// Job time
writer.Write((short)extentionData.JobTime.Hours);
writer.Write((short)extentionData.JobTime.Minutes);
writer.Write((short)extentionData.JobTime.Seconds);
// Software Id
writer.WriteString(extentionData.SoftwareID, 41);
// Software version
writer.Write(extentionData.SoftwareVersion, 0, 3);
// Key color
writer.Write(extentionData.KeyColor);
// Pixel aspect ratio
writer.Write(extentionData.PixelAspectRatio);
// Gamma value
writer.Write(extentionData.GammaValue);
// Color correction offset
writer.Write(extentionData.ColorCorrectionOffset);
// Postage stamp offset
writer.Write(extentionData.PostageStampOffset);
// Scan line offset
writer.Write(extentionData.ScanLineOffset);
// Attributes type
writer.Write(extentionData.AttributesType);
}
public void WriteToStream(Stream stream, Image image)
{
_bitmap = new Bitmap(image);
using (var writer = new EndiannessAwareBinaryWriter(stream, Encoding.ASCII, leaveOpen: true, Endianness.LittleEndian))
{
WriteHeader(writer);
WriteImage(writer);
WriteExtensionData(writer);
WriteFooter(writer);
}
}
public void WriteToFile(string filename, Image image)
{
using (var fs = File.OpenWrite(filename))
{
WriteToStream(fs, image);
}
}
}
}

View File

@@ -18,7 +18,7 @@ namespace PckStudio.Classes.Utils
{
int convertedCount = 0;
InProgressPrompt waitDiag = new InProgressPrompt();
waitDiag.Show();
waitDiag.Show(Program.MainInstance);
foreach (string file in filenames)
{
Binka.ToWav(file, Path.Combine(destination.FullName, Path.GetFileNameWithoutExtension(file) + ".binka"));
@@ -27,16 +27,16 @@ namespace PckStudio.Classes.Utils
waitDiag.Close();
waitDiag.Dispose();
MessageBox.Show($"Successfully converted {convertedCount}/{filenames.Length} file{(filenames.Length > 1 ? "s" : "")}", "Done!");
MessageBox.Show(Program.MainInstance, $"Successfully converted {convertedCount}/{filenames.Length} file{(filenames.Length > 1 ? "s" : "")}", "Done!");
}
public static void ToBinka(string[] filenames, DirectoryInfo destination)
public static void ToBinka(string[] filenames, DirectoryInfo destination, int compressionLevel = 4)
{
int convertedCount = 0;
Directory.CreateDirectory(ApplicationScope.DataCacher.CacheDirectory);
InProgressPrompt waitDiag = new InProgressPrompt();
waitDiag.Show();
waitDiag.Show(Program.MainInstance);
foreach (string file in filenames)
{
@@ -56,14 +56,14 @@ namespace PckStudio.Classes.Utils
}
Cursor.Current = Cursors.WaitCursor;
int exitCode = Binka.ToBinka(cacheSongFilepath, Path.Combine(destination.FullName, Path.GetFileNameWithoutExtension(file) + ".binka"), 4);
int exitCode = Binka.ToBinka(cacheSongFilepath, Path.Combine(destination.FullName, Path.GetFileNameWithoutExtension(file) + ".binka"), compressionLevel);
if (exitCode == 0)
convertedCount++;
}
waitDiag.Close();
waitDiag.Dispose();
MessageBox.Show($"Successfully converted {convertedCount}/{filenames.Length} file{(filenames.Length > 1 ? "s" : "")}", "Done!");
MessageBox.Show(Program.MainInstance, $"Successfully converted {convertedCount}/{filenames.Length} file{(filenames.Length > 1 ? "s" : "")}", "Done!");
}
}
}

View File

@@ -1,4 +1,6 @@
namespace PckStudio.Controls
using System.Windows.Forms;
namespace PckStudio.Controls
{
partial class PckEditor
{
@@ -89,6 +91,13 @@
this.extractToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.cloneFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.renameFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.setSubPCKEndiannessToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bigEndianXbox360PS3WiiUToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.littleEndianPS4PSVitaSwitchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.setModelContainerFormatToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.version1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.version2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.version3114ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.replaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.deleteFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.imageList = new System.Windows.Forms.ImageList(this.components);
@@ -167,9 +176,6 @@
// entryTypeTextBox
//
resources.ApplyResources(this.entryTypeTextBox, "entryTypeTextBox");
//
//
//
this.entryTypeTextBox.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image")));
this.entryTypeTextBox.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode")));
this.entryTypeTextBox.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location")));
@@ -197,9 +203,6 @@
// entryDataTextBox
//
resources.ApplyResources(this.entryDataTextBox, "entryDataTextBox");
//
//
//
this.entryDataTextBox.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image1")));
this.entryDataTextBox.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode1")));
this.entryDataTextBox.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location1")));
@@ -325,7 +328,11 @@
this.treeViewMain.Name = "treeViewMain";
this.treeViewMain.PathSeparator = "/";
this.treeViewMain.BeforeLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.treeViewMain_BeforeLabelEdit);
this.treeViewMain.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.treeViewMain_ItemDrag);
this.treeViewMain.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeViewMain_AfterSelect);
this.treeViewMain.DragDrop += new System.Windows.Forms.DragEventHandler(this.treeViewMain_DragDrop);
this.treeViewMain.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeViewMain_DragEnter);
this.treeViewMain.DragOver += new System.Windows.Forms.DragEventHandler(this.treeViewMain_DragOver);
this.treeViewMain.DoubleClick += new System.EventHandler(this.treeViewMain_DoubleClick);
this.treeViewMain.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeViewMain_KeyDown);
//
@@ -556,7 +563,9 @@
this.miscFunctionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.generateMipMapTextureToolStripMenuItem1,
this.viewFileInfoToolStripMenuItem,
this.correctSkinDecimalsToolStripMenuItem});
this.correctSkinDecimalsToolStripMenuItem,
this.setSubPCKEndiannessToolStripMenuItem,
this.setModelContainerFormatToolStripMenuItem});
this.miscFunctionsToolStripMenuItem.Name = "miscFunctionsToolStripMenuItem";
resources.ApplyResources(this.miscFunctionsToolStripMenuItem, "miscFunctionsToolStripMenuItem");
//
@@ -609,6 +618,56 @@
resources.ApplyResources(this.deleteFileToolStripMenuItem, "deleteFileToolStripMenuItem");
this.deleteFileToolStripMenuItem.Click += new System.EventHandler(this.deleteFileToolStripMenuItem_Click);
//
// setSubPCKEndiannessToolStripMenuItem
//
this.setSubPCKEndiannessToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.bigEndianXbox360PS3WiiUToolStripMenuItem,
this.littleEndianPS4PSVitaSwitchToolStripMenuItem});
this.setSubPCKEndiannessToolStripMenuItem.Name = "setSubPCKEndiannessToolStripMenuItem";
resources.ApplyResources(this.setSubPCKEndiannessToolStripMenuItem, "setSubPCKEndiannessToolStripMenuItem");
//
// bigEndianXbox360PS3WiiUToolStripMenuItem
//
this.bigEndianXbox360PS3WiiUToolStripMenuItem.Name = "bigEndianXbox360PS3WiiUToolStripMenuItem";
resources.ApplyResources(this.bigEndianXbox360PS3WiiUToolStripMenuItem, "bigEndianXbox360PS3WiiUToolStripMenuItem");
this.bigEndianXbox360PS3WiiUToolStripMenuItem.Click += new System.EventHandler(this.bigEndianToolStripMenuItem_Click);
//
// littleEndianPS4PSVitaSwitchToolStripMenuItem
//
this.littleEndianPS4PSVitaSwitchToolStripMenuItem.Name = "littleEndianPS4PSVitaSwitchToolStripMenuItem";
resources.ApplyResources(this.littleEndianPS4PSVitaSwitchToolStripMenuItem, "littleEndianPS4PSVitaSwitchToolStripMenuItem");
this.littleEndianPS4PSVitaSwitchToolStripMenuItem.Click += new System.EventHandler(this.littleEndianToolStripMenuItem_Click);
//
// setModelContainerFormatToolStripMenuItem
//
this.setModelContainerFormatToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.version1ToolStripMenuItem,
this.version2ToolStripMenuItem,
this.version3114ToolStripMenuItem});
this.setModelContainerFormatToolStripMenuItem.Name = "setModelContainerFormatToolStripMenuItem";
resources.ApplyResources(this.setModelContainerFormatToolStripMenuItem, "setModelContainerFormatToolStripMenuItem");
//
// version1ToolStripMenuItem
//
this.version1ToolStripMenuItem.Name = "version1ToolStripMenuItem";
resources.ApplyResources(this.version1ToolStripMenuItem, "version1ToolStripMenuItem");
this.version1ToolStripMenuItem.Click += new System.EventHandler(this.setModelVersion1ToolStripMenuItem_Click);
//
// version2ToolStripMenuItem
//
this.version2ToolStripMenuItem.Name = "version2ToolStripMenuItem";
resources.ApplyResources(this.version2ToolStripMenuItem, "version2ToolStripMenuItem");
this.version2ToolStripMenuItem.Click += new System.EventHandler(this.setModelVersion2ToolStripMenuItem_Click);
//
// version3114ToolStripMenuItem
//
this.version3114ToolStripMenuItem.Name = "version3114ToolStripMenuItem";
resources.ApplyResources(this.version3114ToolStripMenuItem, "version3114ToolStripMenuItem");
this.version3114ToolStripMenuItem.Click += new System.EventHandler(this.setModelVersion3ToolStripMenuItem_Click);
//
// moveUpToolStripMenuItem
//
//
// imageList
//
this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
@@ -732,5 +791,12 @@
private MetroFramework.Controls.MetroButton buttonEdit;
private MetroFramework.Controls.MetroLabel metroLabel1;
private MetroFramework.Controls.MetroCheckBox LittleEndianCheckBox;
private System.Windows.Forms.ToolStripMenuItem setSubPCKEndiannessToolStripMenuItem;
private ToolStripMenuItem bigEndianXbox360PS3WiiUToolStripMenuItem;
private ToolStripMenuItem littleEndianPS4PSVitaSwitchToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem setModelContainerFormatToolStripMenuItem;
private ToolStripMenuItem version1ToolStripMenuItem;
private ToolStripMenuItem version2ToolStripMenuItem;
private ToolStripMenuItem version3114ToolStripMenuItem;
}
}

View File

@@ -29,6 +29,13 @@ using OMI.Workers.Language;
using OMI.Workers.Pck;
using PckStudio.FileFormats;
using PckStudio.Helper;
using PckStudio.Internal.Deserializer;
using PckStudio.Internal.Serializer;
using OMI.Formats.GameRule;
using OMI.Workers.GameRule;
using OMI.Formats.Model;
using OMI.Workers.Model;
using OMI.Workers;
namespace PckStudio.Controls
{
@@ -117,24 +124,22 @@ namespace PckStudio.Controls
(file.Filetype == PckFileType.SkinDataFile || file.Filetype == PckFileType.TexturePackInfoFile) &&
file.Size > 0 && treeViewMain.SelectedNode.Nodes.Count == 0)
{
using (var stream = new MemoryStream(file.Data))
try
{
try
{
var reader = new PckFileReader(LittleEndianCheckBox.Checked ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
PckFile subPCKfile = reader.FromStream(stream);
BuildPckTreeView(treeViewMain.SelectedNode.Nodes, subPCKfile);
treeViewMain.SelectedNode.ExpandAll();
var reader = new PckFileReader(LittleEndianCheckBox.Checked ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
PckFile subPCKfile = file.GetData(reader);
BuildPckTreeView(treeViewMain.SelectedNode.Nodes, subPCKfile);
treeViewMain.SelectedNode.ExpandAll();
}
catch (OverflowException ex)
{
MessageBox.Show("Failed to open pck\n" +
"Try checking the 'Open/Save as Switch/Vita/PS4 pck' checkbox in the upper right corner.",
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Debug.WriteLine(ex.Message);
}
}
catch (OverflowException ex)
{
MessageBox.Show("Failed to open pck\n" +
"Try checking the 'Open/Save as Switch/Vita/PS4 pck' checkbox in the upper right corner.",
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Debug.WriteLine(ex.Message);
}
return;
}
treeViewMain.SelectedNode.Nodes.Clear();
@@ -193,22 +198,19 @@ namespace PckStudio.Controls
(file.Filetype == PckFileType.SkinDataFile || file.Filetype == PckFileType.TexturePackInfoFile) &&
file.Data.Length > 0)
{
using (var stream = new MemoryStream(file.Data))
try
{
try
{
var reader = new PckFileReader(GetEndianess());
PckFile subPCKfile = reader.FromStream(stream);
// passes parent path to remove from sub pck filepaths
BuildPckTreeView(node.Nodes, subPCKfile, file.Filename + "/");
}
catch (OverflowException ex)
{
MessageBox.Show("Failed to open pck\n" +
"Try checking the 'Open/Save as Switch/Vita/PS4 pck' checkbox in the upper right corner.",
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Debug.WriteLine(ex.Message);
}
var reader = new PckFileReader(GetEndianess());
PckFile subPCKfile = file.GetData(reader);
// passes parent path to remove from sub pck filepaths
BuildPckTreeView(node.Nodes, subPCKfile, file.Filename + "/");
}
catch (OverflowException ex)
{
MessageBox.Show("Failed to open pck\n" +
"Try checking the 'Open/Save as Switch/Vita/PS4 pck' checkbox in the upper right corner.",
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Debug.WriteLine(ex.Message);
}
}
SetPckFileIcon(node, file.Filetype);
@@ -651,11 +653,7 @@ namespace PckStudio.Controls
case PckFileType.CapeFile:
case PckFileType.TextureFile:
{
// TODO: Add tga support
if (Path.GetExtension(file.Filename) == ".tga") break;
using MemoryStream stream = new MemoryStream(file.Data);
var img = Image.FromStream(stream);
var img = file.GetTexture();
if (img.RawFormat != ImageFormat.Jpeg || img.RawFormat != ImageFormat.Png)
{
@@ -720,6 +718,159 @@ namespace PckStudio.Controls
}
}
#region drag and drop for main tree node
// Most of the code below is modified code from this link:
// https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.treeview.itemdrag?view=windowsdesktop-6.0
// - MattNL
private void treeViewMain_ItemDrag(object sender, ItemDragEventArgs e)
{
if (e.Button != MouseButtons.Left || e.Item is not TreeNode node)
return;
if ((node.TryGetTagData(out PckFileData file) && _pck.Contains(file.Filename, file.Filetype)) || node.Parent is TreeNode)
{
treeViewMain.DoDragDrop(node, DragDropEffects.Move);
}
}
private void treeViewMain_DragOver(object sender, DragEventArgs e)
{
Point dragLocation = new Point(e.X, e.Y);
TreeNode node = treeViewMain.GetNodeAt(treeViewMain.PointToClient(dragLocation));
treeViewMain.SelectedNode = node.IsTagOfType<PckFileData>() ? null : node;
}
private void treeViewMain_DragEnter(object sender, DragEventArgs e)
{
e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : e.AllowedEffect;
}
private void treeViewMain_DragDrop(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop) && e.Data.GetData(DataFormats.FileDrop) is string[] files)
{
ImportFiles(files);
return;
}
string dataFormat = typeof(TreeNode).FullName;
if (!e.Data.GetDataPresent(dataFormat))
return;
// Retrieve the client coordinates of the drop location.
Point dragLocation = new Point(e.X, e.Y);
Point targetPoint = treeViewMain.PointToClient(dragLocation);
if (!treeViewMain.ClientRectangle.Contains(targetPoint))
return;
// Retrieve the node at the drop location.
TreeNode targetNode = treeViewMain.GetNodeAt(targetPoint);
bool isTargetPckFile = targetNode.IsTagOfType<PckFileData>();
if (e.Data.GetData(dataFormat) is not TreeNode draggedNode)
{
Debug.WriteLine("Dragged data was not of type TreeNode.");
return;
}
if (targetNode.Equals(draggedNode.Parent))
{
Debug.WriteLine("target node is parent of dragged node... nothing done.");
return;
}
if (draggedNode.Equals(targetNode.Parent))
{
Debug.WriteLine("dragged node is parent of target node... nothing done.");
return;
}
if (targetNode.Parent == null && isTargetPckFile && draggedNode.Parent == null)
{
Debug.WriteLine("target node is file and is in the root... nothing done.");
return;
}
if ((targetNode.Parent?.Equals(draggedNode.Parent) ?? false) && isTargetPckFile)
{
Debug.WriteLine("target node and dragged node have the same parent... nothing done.");
return;
}
Debug.WriteLine($"Target drop location is {(isTargetPckFile ? "file" : "folder")}.");
// Retrieve the node that was dragged.
if (draggedNode.TryGetTagData(out PckFileData draggedFile) &&
targetNode.FullPath != draggedFile.Filename)
{
Debug.WriteLine(draggedFile.Filename + " was droped onto " + targetNode.FullPath);
string newFilePath = Path.Combine(isTargetPckFile
? Path.GetDirectoryName(targetNode.FullPath)
: targetNode.FullPath, Path.GetFileName(draggedFile.Filename));
Debug.WriteLine("New filepath: " + newFilePath);
draggedFile.Filename = newFilePath;
_wasModified = true;
BuildMainTreeView();
return;
}
else
{
List<PckFileData> pckFiles = GetEndingNodes(draggedNode.Nodes).Where(t => t.IsTagOfType<PckFileData>()).Select(t => t.Tag as PckFileData).ToList();
string oldPath = draggedNode.FullPath;
string newPath = Path.Combine(isTargetPckFile ? Path.GetDirectoryName(targetNode.FullPath) : targetNode.FullPath, draggedNode.Text).Replace('\\', '/');
foreach (var pckFile in pckFiles)
{
pckFile.Filename = Path.Combine(newPath, pckFile.Filename.Substring(oldPath.Length + 1)).Replace('\\', '/');
}
_wasModified = true;
BuildMainTreeView();
}
}
private IEnumerable<TreeNode> GetEndingNodes(TreeNodeCollection collection)
{
List<TreeNode> trailingNodes = new List<TreeNode>(collection.Count);
foreach (TreeNode node in collection)
{
if (node.Nodes.Count > 0)
{
trailingNodes.AddRange(GetEndingNodes(node.Nodes));
continue;
}
trailingNodes.Add(node);
}
return trailingNodes;
}
private void ImportFiles(string[] files)
{
int addedCount = 0;
foreach (var file in files)
{
using AddFilePrompt addFile = new AddFilePrompt(Path.GetFileName(file));
if (addFile.ShowDialog(this) != DialogResult.OK)
continue;
if (_pck.Contains(addFile.Filepath, addFile.Filetype))
{
MessageBox.Show(this, $"'{addFile.Filepath}' of type {addFile.Filetype} already exists.", "Import failed", MessageBoxButtons.OK, MessageBoxIcon.Warning);
continue;
}
_pck.CreateNewFile(addFile.Filepath, addFile.Filetype, () => File.ReadAllBytes(file));
addedCount++;
BuildMainTreeView();
_wasModified = true;
}
Trace.TraceInformation("[{0}] Imported {1} file(s).", nameof(ImportFiles), addedCount);
}
#endregion
private void createSkinToolStripMenuItem_Click(object sender, EventArgs e)
{
LOCFile locFile = null;
@@ -777,10 +928,10 @@ namespace PckStudio.Controls
return;
var file = new PckFileData(
$"res/textures/{Animation.GetCategoryName(diag.Category)}/{diag.SelectedTile}.png",
$"{ResourceLocation.GetPathFromCategory(diag.Category)}/{diag.SelectedTile}.png",
PckFileType.TextureFile);
var animation = AnimationHelper.GetAnimationFromFile(file);
var animation = file.GetDeserializedData<Animation>(AnimationDeserializer.DefaultDeserializer);
using AnimationEditor animationEditor = new AnimationEditor(animation, Path.GetFileNameWithoutExtension(file.Filename));
if (animationEditor.ShowDialog() == DialogResult.OK)
{
@@ -964,12 +1115,9 @@ namespace PckStudio.Controls
saveFileDialog.DefaultExt = ".3dst";
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
using (var ms = new MemoryStream(file.Data))
{
Image img = Image.FromStream(ms);
var writer = new _3DSTextureWriter(img);
writer.WriteToFile(saveFileDialog.FileName);
}
Image img = file.GetTexture();
var writer = new _3DSTextureWriter(img);
writer.WriteToFile(saveFileDialog.FileName);
}
}
}
@@ -1007,7 +1155,7 @@ namespace PckStudio.Controls
PckFileData MipMappedFile = new PckFileData(mippedPath, PckFileType.TextureFile);
Image originalTexture = Image.FromStream(new MemoryStream(file.Data));
Image originalTexture = file.GetTexture();
int NewWidth = Math.Max(originalTexture.Width / (int)Math.Pow(2, i - 1), 1);
int NewHeight = Math.Max(originalTexture.Height / (int)Math.Pow(2, i - 1), 1);
@@ -1607,7 +1755,7 @@ namespace PckStudio.Controls
texture = _img;
}
file.SetData(texture, ImageFormat.Png);
file.SetTexture(texture);
_wasModified = true;
BuildMainTreeView();
}
@@ -1616,14 +1764,13 @@ namespace PckStudio.Controls
if (!file.Filename.StartsWith("res/textures/blocks/") && !file.Filename.StartsWith("res/textures/items/"))
return;
var animation = AnimationHelper.GetAnimationFromFile(file);
var animation = file.GetDeserializedData<Animation>(AnimationDeserializer.DefaultDeserializer);
using (AnimationEditor animationEditor = new AnimationEditor(animation, Path.GetFileNameWithoutExtension(file.Filename)))
{
if (animationEditor.ShowDialog(this) == DialogResult.OK)
{
_wasModified = true;
file.Filename = animationEditor.FinalPath;
AnimationHelper.SaveAnimationToFile(file, animation);
file.SetSerializedData(animation, AnimationSerializer.DefaultSerializer);
BuildMainTreeView();
}
}
@@ -1631,9 +1778,33 @@ namespace PckStudio.Controls
private void HandleGameRuleFile(PckFileData file)
{
using GameRuleFileEditor grfEditor = new GameRuleFileEditor(file);
_wasModified = grfEditor.ShowDialog(this) == DialogResult.OK;
UpdateRichPresence();
const string use_deflate = "PS3";
const string use_xmem = "Xbox 360";
const string use_zlib = "Wii U, PS Vita";
ItemSelectionPopUp dialog = new ItemSelectionPopUp(use_zlib, use_deflate, use_xmem);
dialog.LabelText = "Type";
dialog.ButtonText = "Ok";
if (dialog.ShowDialog() != DialogResult.OK)
return;
var compressiontype = dialog.SelectedItem switch
{
use_deflate => GameRuleFile.CompressionType.Deflate,
use_xmem => GameRuleFile.CompressionType.XMem,
use_zlib => GameRuleFile.CompressionType.Zlib,
_ => GameRuleFile.CompressionType.Unknown
};
GameRuleFile grf = file.GetData(new GameRuleFileReader(compressiontype));
using GameRuleFileEditor grfEditor = new GameRuleFileEditor(grf);
if (grfEditor.ShowDialog(this) == DialogResult.OK)
{
file.SetData(new GameRuleFileWriter(grfEditor.Result));
_wasModified = true;
UpdateRichPresence();
}
}
private void HandleAudioFile(PckFileData file)
@@ -1666,26 +1837,23 @@ namespace PckStudio.Controls
{
if (file.Size <= 0)
return;
using (var ms = new MemoryStream(file.Data))
var texture = file.GetTexture();
if (file.HasProperty("BOX"))
{
var texture = Image.FromStream(ms);
if (file.HasProperty("BOX"))
using generateModel generate = new generateModel(file);
if (generate.ShowDialog() == DialogResult.OK)
{
using generateModel generate = new generateModel(file);
if (generate.ShowDialog() == DialogResult.OK)
{
entryDataTextBox.Text = entryTypeTextBox.Text = string.Empty;
_wasModified = true;
ReloadMetaTreeView();
}
}
else
{
SkinPreview frm = new SkinPreview(texture, file.GetProperty("ANIM", SkinANIM.FromString));
frm.ShowDialog(this);
frm.Dispose();
entryDataTextBox.Text = entryTypeTextBox.Text = string.Empty;
_wasModified = true;
ReloadMetaTreeView();
}
}
else
{
SkinPreview frm = new SkinPreview(texture, file.GetProperty("ANIM", SkinANIM.FromString));
frm.ShowDialog(this);
frm.Dispose();
}
}
public void HandleModelsFile(PckFileData file)
@@ -1912,5 +2080,101 @@ namespace PckStudio.Controls
private void moveUpToolStripMenuItem_Click(object sender, EventArgs e) => moveFile(-1);
[Obsolete]
private void moveDownToolStripMenuItem_Click(object sender, EventArgs e) => moveFile(1);
private void SetPckEndianness(OMI.Endianness endianness)
{
try
{
if (treeViewMain.SelectedNode.Tag is PckFileData file && (file.Filetype is PckFileType.AudioFile || file.Filetype is PckFileType.SkinDataFile || file.Filetype is PckFileType.TexturePackInfoFile))
{
IDataFormatReader reader = file.Filetype is PckFileType.AudioFile
? new PckAudioFileReader(endianness == OMI.Endianness.BigEndian ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian)
: new PckFileReader(endianness == OMI.Endianness.BigEndian ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
object pck = reader.FromStream(new MemoryStream(file.Data));
IDataFormatWriter writer = file.Filetype is PckFileType.AudioFile
? new PckAudioFileWriter((PckAudioFile)pck, endianness)
: new PckFileWriter((PckFile)pck, endianness);
file.SetData(writer);
_wasModified = true;
MessageBox.Show($"\"{file.Filename}\" successfully converted to {(endianness == OMI.Endianness.LittleEndian ? "little" : "big")} endian.", "Converted PCK file");
}
}
catch (OverflowException)
{
MessageBox.Show(this, $"File was not a valid {(endianness != OMI.Endianness.LittleEndian ? "little" : "big")} endian PCK File.", "Not a valid PCK file");
return;
}
catch (Exception ex)
{
MessageBox.Show(this, ex.Message, "Not a valid PCK file");
return;
}
}
private void littleEndianToolStripMenuItem_Click(object sender, EventArgs e) => SetPckEndianness(OMI.Endianness.LittleEndian);
private void bigEndianToolStripMenuItem_Click(object sender, EventArgs e) => SetPckEndianness(OMI.Endianness.BigEndian);
private void SetModelVersion(int version)
{
if (treeViewMain.SelectedNode.Tag is PckFileData file && file.Filetype is PckFileType.ModelsFile)
{
try
{
ModelContainer container = file.GetData(new ModelFileReader());
if (container.Version == version)
{
MessageBox.Show(
this,
$"This model container is already Version {version + 1}.",
"Can't convert", MessageBoxButtons.OK, MessageBoxIcon.Error
);
return;
}
if (version == 2 &&
MessageBox.Show(
this,
"Conversion to 1.14 models.bin format does not yet support parent declaration and may not be 100% accurate.\n" +
"Would you like to continue?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) != DialogResult.Yes
)
{
return;
}
if (container.Version > 1 &&
MessageBox.Show(
this,
"Conversion from 1.14 models.bin format does not yet support parent parts and may not be 100% accurate.\n" +
"Would you like to continue?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) != DialogResult.Yes
)
{
return;
}
file.SetData(new ModelFileWriter(container, version));
_wasModified = true;
MessageBox.Show(
this,
$"\"{file.Filename}\" successfully converted to Version {version + 1} format.",
"Converted model container file"
);
}
catch (Exception ex)
{
MessageBox.Show(this, ex.Message, "Not a valid model container file.");
return;
}
}
}
private void setModelVersion1ToolStripMenuItem_Click(object sender, EventArgs e) => SetModelVersion(0);
private void setModelVersion2ToolStripMenuItem_Click(object sender, EventArgs e) => SetModelVersion(1);
private void setModelVersion3ToolStripMenuItem_Click(object sender, EventArgs e) => SetModelVersion(2);
}
}

View File

@@ -884,6 +884,141 @@
<data name="&gt;&gt;fileEntryCountLabel.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;MetaTab.Name" xml:space="preserve">
<value>MetaTab</value>
</data>
<data name="&gt;&gt;MetaTab.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroTabPage, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;MetaTab.Parent" xml:space="preserve">
<value>PropertiesTabControl</value>
</data>
<data name="&gt;&gt;MetaTab.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="PropertiesTabControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="PropertiesTabControl.Location" type="System.Drawing.Point, System.Drawing">
<value>279, 270</value>
</data>
<data name="PropertiesTabControl.Size" type="System.Drawing.Size, System.Drawing">
<value>732, 281</value>
</data>
<data name="PropertiesTabControl.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="&gt;&gt;PropertiesTabControl.Name" xml:space="preserve">
<value>PropertiesTabControl</value>
</data>
<data name="&gt;&gt;PropertiesTabControl.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroTabControl, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;PropertiesTabControl.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;PropertiesTabControl.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="&gt;&gt;metroLabel2.Name" xml:space="preserve">
<value>metroLabel2</value>
</data>
<data name="&gt;&gt;metroLabel2.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroLabel2.Parent" xml:space="preserve">
<value>MetaTab</value>
</data>
<data name="&gt;&gt;metroLabel2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;entryTypeTextBox.Name" xml:space="preserve">
<value>entryTypeTextBox</value>
</data>
<data name="&gt;&gt;entryTypeTextBox.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroTextBox, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;entryTypeTextBox.Parent" xml:space="preserve">
<value>MetaTab</value>
</data>
<data name="&gt;&gt;entryTypeTextBox.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;entryDataTextBox.Name" xml:space="preserve">
<value>entryDataTextBox</value>
</data>
<data name="&gt;&gt;entryDataTextBox.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroTextBox, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;entryDataTextBox.Parent" xml:space="preserve">
<value>MetaTab</value>
</data>
<data name="&gt;&gt;entryDataTextBox.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;buttonEdit.Name" xml:space="preserve">
<value>buttonEdit</value>
</data>
<data name="&gt;&gt;buttonEdit.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroButton, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;buttonEdit.Parent" xml:space="preserve">
<value>MetaTab</value>
</data>
<data name="&gt;&gt;buttonEdit.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;metroLabel1.Name" xml:space="preserve">
<value>metroLabel1</value>
</data>
<data name="&gt;&gt;metroLabel1.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroLabel1.Parent" xml:space="preserve">
<value>MetaTab</value>
</data>
<data name="&gt;&gt;metroLabel1.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="&gt;&gt;treeMeta.Name" xml:space="preserve">
<value>treeMeta</value>
</data>
<data name="&gt;&gt;treeMeta.Type" xml:space="preserve">
<value>System.Windows.Forms.TreeView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;treeMeta.Parent" xml:space="preserve">
<value>MetaTab</value>
</data>
<data name="&gt;&gt;treeMeta.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="MetaTab.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 38</value>
</data>
<data name="MetaTab.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value>
</data>
<data name="MetaTab.Size" type="System.Drawing.Size, System.Drawing">
<value>724, 239</value>
</data>
<data name="MetaTab.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="MetaTab.Text" xml:space="preserve">
<value>Properties</value>
</data>
<data name="&gt;&gt;MetaTab.Name" xml:space="preserve">
<value>MetaTab</value>
</data>
<data name="&gt;&gt;MetaTab.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroTabPage, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;MetaTab.Parent" xml:space="preserve">
<value>PropertiesTabControl</value>
</data>
<data name="&gt;&gt;MetaTab.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="metroLabel2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
@@ -891,7 +1026,7 @@
<value>True</value>
</data>
<data name="metroLabel2.Location" type="System.Drawing.Point, System.Drawing">
<value>204, 168</value>
<value>204, 165</value>
</data>
<data name="metroLabel2.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 0</value>
@@ -936,7 +1071,7 @@
<value>False</value>
</data>
<data name="entryTypeTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>215, 138</value>
<value>215, 135</value>
</data>
<data name="entryTypeTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>146, 20</value>
@@ -981,7 +1116,7 @@
<value>False</value>
</data>
<data name="entryDataTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>215, 170</value>
<value>215, 167</value>
</data>
<data name="entryDataTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>146, 20</value>
@@ -1005,7 +1140,7 @@
<value>Bottom, Right</value>
</data>
<data name="buttonEdit.Location" type="System.Drawing.Point, System.Drawing">
<value>215, 196</value>
<value>215, 193</value>
</data>
<data name="buttonEdit.Size" type="System.Drawing.Size, System.Drawing">
<value>146, 33</value>
@@ -1038,7 +1173,7 @@
<value>True</value>
</data>
<data name="metroLabel1.Location" type="System.Drawing.Point, System.Drawing">
<value>266, 61</value>
<value>266, 58</value>
</data>
<data name="metroLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 0</value>
@@ -1061,56 +1196,6 @@
<metadata name="contextMenuMetaTree.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>301, 19</value>
</metadata>
<data name="addEntryToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>160, 22</value>
</data>
<data name="addEntryToolStripMenuItem1.Text" xml:space="preserve">
<value>Add Entry</value>
</data>
<data name="addBOXEntryToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>160, 22</value>
</data>
<data name="addBOXEntryToolStripMenuItem1.Text" xml:space="preserve">
<value>Add BOX Entry</value>
</data>
<data name="addANIMEntryToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>160, 22</value>
</data>
<data name="addANIMEntryToolStripMenuItem1.Text" xml:space="preserve">
<value>Add ANIM Entry</value>
</data>
<data name="addEntryToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAABSSURBVDhP5c0x
DsAgDENRxt7/wmkNSpRGf0CCCZAegxNMM7MlGMp3dIU6dxhKf/QMNxRogeQC8ivw5Vn7C0heJlFA+kL5
jWAohxRkde4wnGftBS90axNmphIGAAAAAElFTkSuQmCC
</value>
</data>
<data name="addEntryToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>181, 22</value>
</data>
<data name="addEntryToolStripMenuItem.Text" xml:space="preserve">
<value>Add Entry</value>
</data>
<data name="addMultipleEntriesToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>181, 22</value>
</data>
<data name="addMultipleEntriesToolStripMenuItem1.Text" xml:space="preserve">
<value>Add Multiple Entries</value>
</data>
<data name="deleteEntryToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>181, 22</value>
</data>
<data name="deleteEntryToolStripMenuItem.Text" xml:space="preserve">
<value>Delete Entry</value>
</data>
<data name="editAllEntriesToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>181, 22</value>
</data>
<data name="editAllEntriesToolStripMenuItem.Text" xml:space="preserve">
<value>Edit All Entries</value>
</data>
<data name="contextMenuMetaTree.Size" type="System.Drawing.Size, System.Drawing">
<value>182, 92</value>
</data>
@@ -1144,56 +1229,55 @@
<data name="&gt;&gt;treeMeta.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="MetaTab.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 38</value>
<data name="addEntryToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAABSSURBVDhP5c0x
DsAgDENRxt7/wmkNSpRGf0CCCZAegxNMM7MlGMp3dIU6dxhKf/QMNxRogeQC8ivw5Vn7C0heJlFA+kL5
jWAohxRkde4wnGftBS90axNmphIGAAAAAElFTkSuQmCC
</value>
</data>
<data name="MetaTab.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value>
<data name="addEntryToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>181, 22</value>
</data>
<data name="MetaTab.Size" type="System.Drawing.Size, System.Drawing">
<value>724, 239</value>
<data name="addEntryToolStripMenuItem.Text" xml:space="preserve">
<value>Add Entry</value>
</data>
<data name="MetaTab.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<data name="addEntryToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>160, 22</value>
</data>
<data name="MetaTab.Text" xml:space="preserve">
<value>Properties</value>
<data name="addEntryToolStripMenuItem1.Text" xml:space="preserve">
<value>Add Entry</value>
</data>
<data name="&gt;&gt;MetaTab.Name" xml:space="preserve">
<value>MetaTab</value>
<data name="addBOXEntryToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>160, 22</value>
</data>
<data name="&gt;&gt;MetaTab.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroTabPage, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
<data name="addBOXEntryToolStripMenuItem1.Text" xml:space="preserve">
<value>Add BOX Entry</value>
</data>
<data name="&gt;&gt;MetaTab.Parent" xml:space="preserve">
<value>PropertiesTabControl</value>
<data name="addANIMEntryToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>160, 22</value>
</data>
<data name="&gt;&gt;MetaTab.ZOrder" xml:space="preserve">
<value>0</value>
<data name="addANIMEntryToolStripMenuItem1.Text" xml:space="preserve">
<value>Add ANIM Entry</value>
</data>
<data name="PropertiesTabControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
<data name="addMultipleEntriesToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>181, 22</value>
</data>
<data name="PropertiesTabControl.Location" type="System.Drawing.Point, System.Drawing">
<value>279, 270</value>
<data name="addMultipleEntriesToolStripMenuItem1.Text" xml:space="preserve">
<value>Add Multiple Entries</value>
</data>
<data name="PropertiesTabControl.Size" type="System.Drawing.Size, System.Drawing">
<value>732, 281</value>
<data name="deleteEntryToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>181, 22</value>
</data>
<data name="PropertiesTabControl.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
<data name="deleteEntryToolStripMenuItem.Text" xml:space="preserve">
<value>Delete Entry</value>
</data>
<data name="&gt;&gt;PropertiesTabControl.Name" xml:space="preserve">
<value>PropertiesTabControl</value>
<data name="editAllEntriesToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>181, 22</value>
</data>
<data name="&gt;&gt;PropertiesTabControl.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroTabControl, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;PropertiesTabControl.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;PropertiesTabControl.ZOrder" xml:space="preserve">
<value>6</value>
<data name="editAllEntriesToolStripMenuItem.Text" xml:space="preserve">
<value>Edit All Entries</value>
</data>
<metadata name="label11.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@@ -1225,6 +1309,65 @@
<metadata name="contextMenuPCKEntries.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>22, 20</value>
</metadata>
<data name="contextMenuPCKEntries.Size" type="System.Drawing.Size, System.Drawing">
<value>158, 224</value>
</data>
<data name="&gt;&gt;contextMenuPCKEntries.Name" xml:space="preserve">
<value>contextMenuPCKEntries</value>
</data>
<data name="&gt;&gt;contextMenuPCKEntries.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="treeViewMain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Left</value>
</data>
<data name="treeViewMain.ImageIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>204, 20</value>
</metadata>
<data name="imageList.ImageSize" type="System.Drawing.Size, System.Drawing">
<value>32, 32</value>
</data>
<data name="treeViewMain.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 50</value>
</data>
<data name="treeViewMain.SelectedImageIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="treeViewMain.Size" type="System.Drawing.Size, System.Drawing">
<value>274, 501</value>
</data>
<data name="treeViewMain.TabIndex" type="System.Int32, mscorlib">
<value>20</value>
</data>
<data name="&gt;&gt;treeViewMain.Name" xml:space="preserve">
<value>treeViewMain</value>
</data>
<data name="&gt;&gt;treeViewMain.Type" xml:space="preserve">
<value>System.Windows.Forms.TreeView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;treeViewMain.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;treeViewMain.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="createToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xOdTWsmQAAAA3SURBVDhPY/j/
/z9FGKsgGIsCKWSMTQ0QYxUE45FmALpiYvFwMgAbxqIYG8YqCMajBhCJ/zMAAPGwpV/Xje8RAAAAAElF
TkSuQmCC
</value>
</data>
<data name="createToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>157, 22</value>
</data>
<data name="createToolStripMenuItem.Text" xml:space="preserve">
<value>Create</value>
</data>
<data name="folderToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
@@ -1313,19 +1456,20 @@
<data name="entityMaterialsbinToolStripMenuItem.Text" xml:space="preserve">
<value>EntityMaterials.bin</value>
</data>
<data name="createToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="importSkinsToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xOdTWsmQAAAA3SURBVDhPY/j/
/z9FGKsgGIsCKWSMTQ0QYxUE45FmALpiYvFwMgAbxqIYG8YqCMajBhCJ/zMAAPGwpV/Xje8RAAAAAElF
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xOdTWsmQAAABzSURBVDhPpYzB
DQAhCARp4hr3Txu254WTjYRb9cEmk/BgRjBVHTv85Twmgt77PcJEYIFrhIkAgWOEiSAGthEmgtbaD9fW
mBgpB4xywCgFxiMf5YDdrq3l5wjEjKtzTARMNlydY2IGot2ureVnRjkQmZbICyCi7XU5cfqKAAAAAElF
TkSuQmCC
</value>
</data>
<data name="createToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<data name="importSkinsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>157, 22</value>
</data>
<data name="createToolStripMenuItem.Text" xml:space="preserve">
<value>Create</value>
<data name="importSkinsToolStripMenuItem.Text" xml:space="preserve">
<value>Import</value>
</data>
<data name="importSkinToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@@ -1379,20 +1523,11 @@
<data name="addFileToolStripMenuItem.Text" xml:space="preserve">
<value>Add File</value>
</data>
<data name="importSkinsToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xOdTWsmQAAABzSURBVDhPpYzB
DQAhCARp4hr3Txu254WTjYRb9cEmk/BgRjBVHTv85Twmgt77PcJEYIFrhIkAgWOEiSAGthEmgtbaD9fW
mBgpB4xywCgFxiMf5YDdrq3l5wjEjKtzTARMNlydY2IGot2ureVnRjkQmZbICyCi7XU5cfqKAAAAAElF
TkSuQmCC
</value>
</data>
<data name="importSkinsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<data name="exportToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>157, 22</value>
</data>
<data name="importSkinsToolStripMenuItem.Text" xml:space="preserve">
<value>Import</value>
<data name="exportToolStripMenuItem.Text" xml:space="preserve">
<value>Export</value>
</data>
<data name="as3DSTextureFileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 22</value>
@@ -1400,11 +1535,11 @@
<data name="as3DSTextureFileToolStripMenuItem.Text" xml:space="preserve">
<value>Export as 3DS Texture</value>
</data>
<data name="exportToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<data name="setFileTypeToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>157, 22</value>
</data>
<data name="exportToolStripMenuItem.Text" xml:space="preserve">
<value>Export</value>
<data name="setFileTypeToolStripMenuItem.Text" xml:space="preserve">
<value>Set File Type</value>
</data>
<data name="skinToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>222, 22</value>
@@ -1478,11 +1613,11 @@
<data name="entityMaterialsFileBINToolStripMenuItem.Text" xml:space="preserve">
<value>Entity Materials File (.BIN)</value>
</data>
<data name="setFileTypeToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<data name="miscFunctionsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>157, 22</value>
</data>
<data name="setFileTypeToolStripMenuItem.Text" xml:space="preserve">
<value>Set File Type</value>
<data name="miscFunctionsToolStripMenuItem.Text" xml:space="preserve">
<value>Misc. Functions</value>
</data>
<data name="generateMipMapTextureToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>210, 22</value>
@@ -1502,12 +1637,6 @@
<data name="correctSkinDecimalsToolStripMenuItem.Text" xml:space="preserve">
<value>Correct Skin Decimals</value>
</data>
<data name="miscFunctionsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>157, 22</value>
</data>
<data name="miscFunctionsToolStripMenuItem.Text" xml:space="preserve">
<value>Misc. Functions</value>
</data>
<data name="extractToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
@@ -1564,51 +1693,6 @@
<data name="deleteFileToolStripMenuItem.Text" xml:space="preserve">
<value>Delete</value>
</data>
<data name="contextMenuPCKEntries.Size" type="System.Drawing.Size, System.Drawing">
<value>158, 224</value>
</data>
<data name="&gt;&gt;contextMenuPCKEntries.Name" xml:space="preserve">
<value>contextMenuPCKEntries</value>
</data>
<data name="&gt;&gt;contextMenuPCKEntries.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="treeViewMain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Left</value>
</data>
<data name="treeViewMain.ImageIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>204, 20</value>
</metadata>
<data name="imageList.ImageSize" type="System.Drawing.Size, System.Drawing">
<value>32, 32</value>
</data>
<data name="treeViewMain.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 50</value>
</data>
<data name="treeViewMain.SelectedImageIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="treeViewMain.Size" type="System.Drawing.Size, System.Drawing">
<value>274, 501</value>
</data>
<data name="treeViewMain.TabIndex" type="System.Int32, mscorlib">
<value>20</value>
</data>
<data name="&gt;&gt;treeViewMain.Name" xml:space="preserve">
<value>treeViewMain</value>
</data>
<data name="&gt;&gt;treeViewMain.Type" xml:space="preserve">
<value>System.Windows.Forms.TreeView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;treeViewMain.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;treeViewMain.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="addMultipleEntriesToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
@@ -1678,7 +1762,7 @@
<value>previewPictureBox</value>
</data>
<data name="&gt;&gt;previewPictureBox.Type" xml:space="preserve">
<value>PckStudio.PictureBoxWithInterpolationMode, PCK-Studio, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>PckStudio.ToolboxItems.InterpolationPictureBox, PCK-Studio, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;previewPictureBox.Parent" xml:space="preserve">
<value>$this</value>

View File

@@ -9,6 +9,10 @@ using System.Text;
using System.Threading.Tasks;
using OMI.Formats.Pck;
using OMI.Workers;
using PckStudio.Interfaces;
using PckStudio.IO.TGA;
using PckStudio.Internal.Deserializer;
using PckStudio.Internal.Serializer;
namespace PckStudio.Extensions
{
@@ -16,8 +20,6 @@ namespace PckStudio.Extensions
{
private const string MipMap = "MipMapLevel";
private static Image EmptyImage = new Bitmap(1, 1, PixelFormat.Format32bppArgb);
internal static Image GetTexture(this PckFileData file)
{
if (file.Filetype != PckFileType.SkinFile &&
@@ -26,31 +28,35 @@ namespace PckStudio.Extensions
{
throw new Exception("File is not suitable to contain image data.");
}
using (var stream = new MemoryStream(file.Data))
{
try
{
return Image.FromStream(stream);
}
catch(Exception ex)
{
Trace.WriteLine($"Failed to read image from pck file data({file.Filename}).", category: nameof(PckFileDataExtensions) + "." + nameof(GetTexture));
Debug.WriteLine(ex.Message);
return EmptyImage;
}
}
return file.GetDeserializedData(ImageDeserializer.DefaultDeserializer);
}
internal static void SetData(this PckFileData file, IDataFormatWriter writer)
internal static T GetDeserializedData<T>(this PckFileData file, IPckDeserializer<T> deserializer)
{
return deserializer.Deserialize(file);
}
internal static T GetData<T>(this PckFileData file, IDataFormatReader<T> formatReader) where T : class
{
using var ms = new MemoryStream(file.Data);
return formatReader.FromStream(ms);
}
internal static void SetSerializedData<T>(this PckFileData file, T obj, IPckFileSerializer<T> serializer)
{
serializer.Serialize(obj, ref file);
}
internal static void SetData(this PckFileData file, IDataFormatWriter formatWriter)
{
using (var stream = new MemoryStream())
{
writer.WriteToStream(stream);
formatWriter.WriteToStream(stream);
file.SetData(stream.ToArray());
}
}
internal static void SetData(this PckFileData file, Image image, ImageFormat imageFormat)
internal static void SetTexture(this PckFileData file, Image image)
{
if (file.Filetype != PckFileType.SkinFile &&
file.Filetype != PckFileType.CapeFile &&
@@ -58,12 +64,7 @@ namespace PckStudio.Extensions
{
throw new Exception("File is not suitable to contain image data.");
}
using (var stream = new MemoryStream())
{
image.Save(stream, imageFormat);
file.SetData(stream.ToArray());
}
file.SetSerializedData(image, ImageSerializer.DefaultSerializer);
}
internal static bool IsMipmappedFile(this PckFileData file)

View File

@@ -11,7 +11,7 @@ namespace PckStudio.Extensions
{
internal static bool IsTagOfType<T>(this TreeNode node) where T : class
{
return node.Tag is T;
return node?.Tag is T;
}
internal static bool TryGetTagData<TOut>(this TreeNode node, out TOut tagData) where TOut : class

View File

@@ -118,7 +118,7 @@
this.radioButtonEur.Size = new System.Drawing.Size(137, 30);
this.radioButtonEur.TabIndex = 1;
this.radioButtonEur.TabStop = true;
this.radioButtonEur.Text = "EUR";
this.radioButtonEur.Text = "EU";
this.radioButtonEur.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.radioButtonEur.UseVisualStyleBackColor = false;
this.radioButtonEur.Click += new System.EventHandler(this.radioButton_Click);
@@ -164,7 +164,7 @@
this.radioButtonJap.Name = "radioButtonJap";
this.radioButtonJap.Size = new System.Drawing.Size(138, 30);
this.radioButtonJap.TabIndex = 2;
this.radioButtonJap.Text = "JAP";
this.radioButtonJap.Text = "JP";
this.radioButtonJap.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.radioButtonJap.UseVisualStyleBackColor = false;
this.radioButtonJap.Click += new System.EventHandler(this.radioButton_Click);

View File

@@ -41,7 +41,7 @@ namespace PckStudio.Features
{
InitializeComponent();
if (!TryApplyPermanentCemuConfig() &&
MessageBox.Show("Failed to get Cemu perma settings\nDo you want to open your local settings.xml file?",
MessageBox.Show(this, "Failed to get Cemu perma settings\nDo you want to open your local settings.xml file?",
"Cemu mlc path not found",
MessageBoxButtons.YesNo,
MessageBoxIcon.Warning) == DialogResult.Yes
@@ -197,14 +197,14 @@ namespace PckStudio.Features
DLCTreeView.Nodes.Clear();
if (!IsValidInstallDirectory())
{
MessageBox.Show("Please select a valid Game Directory!", "Invalid Directory Specified",
MessageBox.Show(this, "Please select a valid Game Directory!", "Invalid Directory Specified",
MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (!IsValidGameDirectory())
{
MessageBox.Show($"Could not find '{GetGameContentPath()}'!", "Not Found",
MessageBox.Show(this, $"Could not find '{GetGameContentPath()}'!", "Not Found",
MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
@@ -214,7 +214,7 @@ namespace PckStudio.Features
if (!dlcDirectory.Exists)
{
MessageBox.Show($"'{dirPath}' does not exist!", "Not Found",
MessageBox.Show(this, $"'{dirPath}' does not exist!", "Not Found",
MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
@@ -246,7 +246,7 @@ namespace PckStudio.Features
private void openSkinPackToolStripMenuItem_Click(object sender, EventArgs e)
{
if (DLCTreeView.SelectedNode.Tag is DLCDirectoryInfo dlcDir)
if (DLCTreeView.SelectedNode?.Tag is DLCDirectoryInfo dlcDir)
{
Program.MainInstance.LoadPckFromFile(dlcDir.PackPath);
}
@@ -254,7 +254,7 @@ namespace PckStudio.Features
private void openTexturePackToolStripMenuItem_Click(object sender, EventArgs e)
{
if (DLCTreeView.SelectedNode.Tag is DLCDirectoryInfo dlcDir && dlcDir.HasTexturePack)
if (DLCTreeView.SelectedNode?.Tag is DLCDirectoryInfo dlcDir && dlcDir.HasTexturePack)
{
Program.MainInstance.LoadPckFromFile(dlcDir.TexturePackPath);
}
@@ -276,7 +276,7 @@ namespace PckStudio.Features
if (prompt.NewText.ContainsAny(Path.GetInvalidPathChars()))
{
MessageBox.Show("Invalid Folder name entered!", "Invalid Folder Name", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show(this, "Invalid Folder name entered!", "Invalid Folder Name", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
@@ -284,7 +284,7 @@ namespace PckStudio.Features
if (Directory.Exists(directoryPath))
{
MessageBox.Show("A Folder with the same name already exists!", "Folder Name taken", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show(this, "A Folder with the same name already exists!", "Folder Name taken", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
Directory.CreateDirectory(directoryPath);
@@ -302,7 +302,7 @@ namespace PckStudio.Features
private void removePckToolStripMenuItem_Click(object sender, EventArgs e)
{
string pckName = DLCTreeView.SelectedNode.Text;
var result = MessageBox.Show($"Are you sure you want to permanently delete '{pckName}'?", "Hold up!", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
var result = MessageBox.Show(this, $"Are you sure you want to permanently delete '{pckName}'?", "Hold up!", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
string directoryPath = GetContentSubDirectory("WiiU", "DLC", pckName);

View File

@@ -73,7 +73,7 @@ namespace PckStudio.Features
}
catch (NotImplementedException ex)
{
MessageBox.Show(ex.Message, "Not Implemented");
MessageBox.Show(this, ex.Message, "Not Implemented");
}
}

View File

@@ -41,7 +41,7 @@ namespace PckStudio.Features
[Obsolete("Prompt user to use Aroma instead!")]
private void buttonSelect_Click(object sender, EventArgs e)
{
MessageBox.Show("Please use Aroma's ftp Plugin!");
MessageBox.Show(this, "Please use Aroma's ftp Plugin!");
return;
}
@@ -131,14 +131,14 @@ namespace PckStudio.Features
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
MessageBox.Show(this, ex.ToString());
}
return;
}
if (!Regex.IsMatch(IPv4TextBox.Text, @"^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$"))
{
MessageBox.Show("Please enter a valid Wii U IP!");
MessageBox.Show(this, "Please enter a valid Wii U IP!");
return;
}
@@ -169,7 +169,7 @@ namespace PckStudio.Features
catch (Exception ex)
{
SetButtonState(ButtonState.Start);
MessageBox.Show(ex.ToString());
MessageBox.Show(this, ex.ToString());
}
}
@@ -184,7 +184,7 @@ namespace PckStudio.Features
ListViewHitTestInfo hitTestInfo = listViewPCKS.HitTest(e.Location);
if (e.Button == MouseButtons.Right && hitTestInfo.Location != ListViewHitTestLocations.None)
{
contextMenuStripCaffiine.Show(Cursor.Position);
contextMenuStripCaffiine.Show(this, Cursor.Position);
}
}
@@ -194,7 +194,7 @@ namespace PckStudio.Features
{
SetButtonState(ButtonState.Wait);
ReplacePck(mod);
MessageBox.Show("PCK Replaced!");
MessageBox.Show(this, "PCK Replaced!");
}
SetButtonState(ButtonState.Stop);
UpdateDLCPath();
@@ -208,10 +208,10 @@ namespace PckStudio.Features
OpenFileDialog openPCK = new OpenFileDialog();
openPCK.Filter = "PCK File|*.pck";
if (openPCK.ShowDialog() == DialogResult.OK)
if (openPCK.ShowDialog(this) == DialogResult.OK)
{
ReplacePck(openPCK.FileName);
MessageBox.Show("PCK Replaced!");
MessageBox.Show(this, "PCK Replaced!");
}
}
SetButtonState(ButtonState.Stop);
@@ -283,7 +283,7 @@ namespace PckStudio.Features
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Pack Image|*.png";
if (ofd.ShowDialog() == DialogResult.OK)
if (ofd.ShowDialog(this) == DialogResult.OK)
TextBoxPackImage.Text = ofd.FileName;
}
}

View File

@@ -105,8 +105,7 @@
resources.GetString("FileTypeComboBox.Items10"),
resources.GetString("FileTypeComboBox.Items11"),
resources.GetString("FileTypeComboBox.Items12"),
resources.GetString("FileTypeComboBox.Items13"),
resources.GetString("FileTypeComboBox.Items14")});
resources.GetString("FileTypeComboBox.Items13")});
this.FileTypeComboBox.Name = "FileTypeComboBox";
this.FileTypeComboBox.Style = MetroFramework.MetroColorStyle.Blue;
this.FileTypeComboBox.Theme = MetroFramework.MetroThemeStyle.Dark;

View File

@@ -12,7 +12,7 @@ namespace PckStudio.Popups
/// otherwise <see cref="string.Empty"/>
/// </summary>
public string Filepath => DialogResult == DialogResult.OK ? InputTextBox.Text : string.Empty;
public PckFileType Filetype => (PckFileType)FileTypeComboBox.SelectedIndex;
public PckFileType Filetype => (PckFileType)(FileTypeComboBox.SelectedIndex + (FileTypeComboBox.SelectedIndex >= 3 ? 1 : 0));
public AddFilePrompt(string initialText) : this(initialText, -1)
{ }

View File

@@ -262,39 +262,36 @@
<value>TextureFile (*.png)</value>
</data>
<data name="FileTypeComboBox.Items3" xml:space="preserve">
<value>UIDataFile (UNUSED)</value>
</data>
<data name="FileTypeComboBox.Items4" xml:space="preserve">
<value>InfoFile (0)</value>
</data>
<data name="FileTypeComboBox.Items5" xml:space="preserve">
<data name="FileTypeComboBox.Items4" xml:space="preserve">
<value>TexturePackInfoFile (x&lt;Resolution&gt;Info.pck)</value>
</data>
<data name="FileTypeComboBox.Items6" xml:space="preserve">
<data name="FileTypeComboBox.Items5" xml:space="preserve">
<value>LocalisationFile (languages.loc/localisation.loc)</value>
</data>
<data name="FileTypeComboBox.Items7" xml:space="preserve">
<data name="FileTypeComboBox.Items6" xml:space="preserve">
<value>GameRulesFile (*.grf)</value>
</data>
<data name="FileTypeComboBox.Items8" xml:space="preserve">
<data name="FileTypeComboBox.Items7" xml:space="preserve">
<value>AudioFile (*.pck)</value>
</data>
<data name="FileTypeComboBox.Items9" xml:space="preserve">
<data name="FileTypeComboBox.Items8" xml:space="preserve">
<value>ColourTableFile (colours.col)</value>
</data>
<data name="FileTypeComboBox.Items10" xml:space="preserve">
<data name="FileTypeComboBox.Items9" xml:space="preserve">
<value>GameRulesHeader (*.grh)</value>
</data>
<data name="FileTypeComboBox.Items11" xml:space="preserve">
<data name="FileTypeComboBox.Items10" xml:space="preserve">
<value>SkinDataFile (*.pck)</value>
</data>
<data name="FileTypeComboBox.Items12" xml:space="preserve">
<data name="FileTypeComboBox.Items11" xml:space="preserve">
<value>ModelsFile (models.bin)</value>
</data>
<data name="FileTypeComboBox.Items13" xml:space="preserve">
<data name="FileTypeComboBox.Items12" xml:space="preserve">
<value>BehavioursFile (behaviours.bin)</value>
</data>
<data name="FileTypeComboBox.Items14" xml:space="preserve">
<data name="FileTypeComboBox.Items13" xml:space="preserve">
<value>MaterialFile (entityMaterials.bin)</value>
</data>
<data name="FileTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">

View File

@@ -11,11 +11,11 @@ namespace PckStudio.Forms.Additional_Popups.Animation
{
internal partial class ChangeTile : MetroForm
{
string selectedTile = "";
AnimationCategory category = AnimationCategory.Blocks;
private JsonTileInfo selectedTile;
private ResourceCategory category = ResourceCategory.BlockAnimation;
public string SelectedTile => selectedTile;
public AnimationCategory Category => category;
public JsonTileInfo SelectedTile => selectedTile;
public ResourceCategory Category => category;
List<TreeNode> treeViewBlockCache = new List<TreeNode>();
List<TreeNode> treeViewItemCache = new List<TreeNode>();
@@ -31,8 +31,8 @@ namespace PckStudio.Forms.Additional_Popups.Animation
private void InitializeTreeviews()
{
Profiler.Start();
GetTileDataToView(AnimationCategory.Blocks, treeViewBlocks.Nodes, treeViewBlockCache.Add);
GetTileDataToView(AnimationCategory.Items, treeViewItems.Nodes, treeViewItemCache.Add);
GetTileDataToView(ResourceCategory.BlockAnimation, treeViewBlocks.Nodes, treeViewBlockCache.Add);
GetTileDataToView(ResourceCategory.ItemAnimation, treeViewItems.Nodes, treeViewItemCache.Add);
Profiler.Stop();
}
@@ -40,19 +40,19 @@ namespace PckStudio.Forms.Additional_Popups.Animation
{
if (e.Node.Tag is JsonTileInfo tileData)
{
selectedTile = tileData.InternalName;
selectedTile = tileData;
category = e.Node.TreeView == treeViewItems
? AnimationCategory.Items
: AnimationCategory.Blocks;
? ResourceCategory.ItemAnimation
: ResourceCategory.BlockAnimation;
}
}
private void GetTileDataToView(AnimationCategory key, TreeNodeCollection collection, Action<TreeNode> additionalAction)
private void GetTileDataToView(ResourceCategory key, TreeNodeCollection collection, Action<TreeNode> additionalAction)
{
List<JsonTileInfo> textureInfos = key switch
{
AnimationCategory.Blocks => Tiles.BlockTileInfos,
AnimationCategory.Items => Tiles.ItemTileInfos,
ResourceCategory.BlockAnimation => Tiles.BlockTileInfos,
ResourceCategory.ItemAnimation => Tiles.ItemTileInfos,
_ => throw new InvalidOperationException(nameof(key))
};
Profiler.Start();
@@ -126,7 +126,7 @@ namespace PckStudio.Forms.Additional_Popups.Animation
private void AcceptBtn_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(selectedTile))
if (string.IsNullOrEmpty(selectedTile.InternalName))
{
DialogResult = DialogResult.Cancel;
return;

View File

@@ -3,14 +3,13 @@ using System.Collections.Generic;
using System.Windows.Forms;
using MetroFramework.Forms;
using Newtonsoft.Json.Linq;
using PckStudio.Internal.Json;
namespace PckStudio.Forms.Additional_Popups.EntityForms
{
public partial class AddEntry : MetroForm
{
string selectedEntity = "";
private static JObject EntityJSONData = JObject.Parse(Properties.Resources.entityData);
public string SelectedEntity => selectedEntity;
List<TreeNode> treeViewEntityCache = new List<TreeNode>();
@@ -24,37 +23,31 @@ namespace PckStudio.Forms.Additional_Popups.EntityForms
entities.Images.AddRange(entityImages);
treeViewEntity.ImageList = entities;
try
var entityInfos = dataType switch
{
int i = 0;
"models" => Entities.ModelInfos,
"materials" => Entities.MaterialInfos,
"behaviours" => Entities.BehaviourInfos,
_ => null,
};
if (EntityJSONData[dataType] != null)
int i = 0;
foreach(var entity in entityInfos)
{
TreeNode entityNode = new TreeNode(entity.DisplayName)
{
foreach (JObject content in EntityJSONData[dataType].Children())
{
foreach (JProperty prop in content.Properties())
{
if (!string.IsNullOrEmpty((string)prop.Value))
{
TreeNode entityNode = new TreeNode((string)prop.Value)
{
Tag = prop.Name,
ImageIndex = i,
SelectedImageIndex = i,
};
treeViewEntity.Nodes.Add(entityNode);
treeViewEntityCache.Add(entityNode);
}
i++;
}
}
Tag = entity.InternalName,
ImageIndex = i,
SelectedImageIndex = i,
};
i++;
if (!String.IsNullOrEmpty(entity.InternalName))
{
treeViewEntity.Nodes.Add(entityNode);
treeViewEntityCache.Add(entityNode);
}
}
catch (Newtonsoft.Json.JsonException j_ex)
{
MessageBox.Show(j_ex.Message, "Error");
return;
}
treeViewEntity.Sort();
}
@@ -64,7 +57,6 @@ namespace PckStudio.Forms.Additional_Popups.EntityForms
if (e.Node.Tag is string entityData)
{
selectedEntity = entityData;
Console.WriteLine(selectedEntity);
}
}

View File

@@ -44,7 +44,7 @@ namespace PckStudio.Forms.Additional_Popups.Grf
{
if (string.IsNullOrWhiteSpace(ParameterName) || string.IsNullOrWhiteSpace(ParameterValue))
{
MessageBox.Show("Name and Value need valid values");
MessageBox.Show(this, "Name and Value need valid values");
return;
}
DialogResult = DialogResult.OK;

View File

@@ -6,6 +6,7 @@ namespace PckStudio.Forms.Additional_Popups
public partial class ItemSelectionPopUp : MetroFramework.Forms.MetroForm
{
public string SelectedItem => DialogResult == DialogResult.OK ? ComboBox.Text : string.Empty;
public int SelectedIndex => DialogResult == DialogResult.OK ? ComboBox.SelectedIndex : -1;
public string LabelText
{

View File

@@ -246,11 +246,11 @@ namespace PckStudio.Forms.Editor
string value = string.Empty;
while (!SkinANIM.IsValidANIM(value))
{
if (!string.IsNullOrWhiteSpace(value)) MessageBox.Show($"The following value \"{value}\" is not valid. Please try again.");
if (!string.IsNullOrWhiteSpace(value)) MessageBox.Show(this, $"The following value \"{value}\" is not valid. Please try again.");
TextPrompt diag = new TextPrompt(value);
diag.LabelText = "ANIM";
diag.OKButtonText = "Ok";
if (diag.ShowDialog() == DialogResult.OK)
if (diag.ShowDialog(this) == DialogResult.OK)
{
value = diag.NewText;
}
@@ -276,7 +276,7 @@ namespace PckStudio.Forms.Editor
FileName = animValue.Text + ".png",
Filter = "Skin textures|*.png"
};
if (saveFileDialog.ShowDialog() != DialogResult.OK)
if (saveFileDialog.ShowDialog(this) != DialogResult.OK)
return;
bool isSlim = ruleset.Value.GetFlag(SkinAnimFlag.SLIM_MODEL);
bool is64x64 = ruleset.Value.GetFlag(SkinAnimFlag.RESOLUTION_64x64);
@@ -349,7 +349,7 @@ namespace PckStudio.Forms.Editor
diag.ButtonText = "Presets";
diag.ButtonText = "Load";
if (diag.ShowDialog() != DialogResult.OK)
if (diag.ShowDialog(this) != DialogResult.OK)
return;
var templateANIM = new SkinANIM(Templates[diag.SelectedItem]);

View File

@@ -48,7 +48,6 @@
this.gifToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bulkAnimationSpeedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.changeTileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.frameTimeandTicksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.howToInterpolation = new System.Windows.Forms.ToolStripMenuItem();
@@ -215,8 +214,7 @@
// editToolStripMenuItem
//
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.bulkAnimationSpeedToolStripMenuItem,
this.changeTileToolStripMenuItem});
this.bulkAnimationSpeedToolStripMenuItem});
this.editToolStripMenuItem.ForeColor = System.Drawing.Color.White;
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(46, 20);
@@ -229,13 +227,6 @@
this.bulkAnimationSpeedToolStripMenuItem.Text = "Set Bulk Animation Speed";
this.bulkAnimationSpeedToolStripMenuItem.Click += new System.EventHandler(this.bulkAnimationSpeedToolStripMenuItem_Click);
//
// changeTileToolStripMenuItem
//
this.changeTileToolStripMenuItem.Name = "changeTileToolStripMenuItem";
this.changeTileToolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.changeTileToolStripMenuItem.Text = "Change Tile";
this.changeTileToolStripMenuItem.Click += new System.EventHandler(this.changeTileToolStripMenuItem_Click);
//
// helpToolStripMenuItem
//
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -337,7 +328,6 @@
this.animationPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.animationPictureBox.TabIndex = 16;
this.animationPictureBox.TabStop = false;
this.animationPictureBox.UseBlendColor = false;
//
// AnimationEditor
//
@@ -382,7 +372,6 @@
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem bulkAnimationSpeedToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem changeTileToolStripMenuItem;
private MetroFramework.Controls.MetroLabel tileLabel;
private System.Windows.Forms.ToolStripMenuItem howToInterpolation;
private System.Windows.Forms.ToolStripMenuItem editorControlsToolStripMenuItem;

View File

@@ -32,43 +32,34 @@ using PckStudio.Forms.Additional_Popups.Animation;
using PckStudio.Extensions;
using PckStudio.Properties;
using PckStudio.Internal;
using PckStudio.Internal.Json;
using PckStudio.Helper;
using AnimatedGif;
using PckStudio.Internal.Deserializer;
namespace PckStudio.Forms.Editor
{
public partial class AnimationEditor : MetroForm
{
public Animation Result => _animation;
private Animation _animation;
private string _tileName = string.Empty;
public string FinalPath => $"res/textures/{_animation.CategoryString}/{_tileName}.png";
private static readonly string[] specialTileNames = { "clock", "compass" };
private static bool IsSpecialTile(string name)
{
return name.ToLower().EqualsAny(specialTileNames);
}
private bool _isSpecialTile;
private AnimationEditor()
{
InitializeComponent();
toolStripSeparator1.Visible = saveToolStripMenuItem1.Visible = !Settings.Default.AutoSaveChanges;
}
internal AnimationEditor(Animation animation, string name)
internal AnimationEditor(Animation animation, string displayName, bool isSpecialTile = false)
: this()
{
_ = animation ?? throw new ArgumentNullException(nameof(animation));
_animation = animation;
_tileName = name;
tileLabel.Text = displayName;
_isSpecialTile = isSpecialTile;
}
internal AnimationEditor(Animation animation, string name, Color blendColor)
: this(animation, name)
internal AnimationEditor(Animation animation, string displayName, Color blendColor)
: this(animation, displayName)
{
animationPictureBox.UseBlendColor = true;
animationPictureBox.BlendColor = blendColor;
@@ -79,15 +70,12 @@ namespace PckStudio.Forms.Editor
bulkAnimationSpeedToolStripMenuItem.Enabled =
importToolStripMenuItem.Enabled =
exportAsToolStripMenuItem.Enabled =
changeTileToolStripMenuItem.Enabled =
InterpolationCheckbox.Visible = !IsSpecialTile(_tileName);
InterpolationCheckbox.Visible = !_isSpecialTile;
}
private void AnimationEditor_Load(object sender, EventArgs e)
{
ValidateToolStrip();
SetTileLabel();
LoadAnimationTreeView();
}
@@ -170,7 +158,7 @@ namespace PckStudio.Forms.Editor
private void saveToolStripMenuItem1_Click(object sender, EventArgs e)
{
if (!IsSpecialTile(_tileName) && _animation is not null && _animation.FrameCount > 0)
if (!_isSpecialTile && _animation is not null && _animation.FrameCount > 0)
{
DialogResult = DialogResult.OK;
return;
@@ -279,7 +267,7 @@ namespace PckStudio.Forms.Editor
diag.SaveBtn.Text = "Add";
if (diag.ShowDialog(this) == DialogResult.OK)
{
_animation.AddFrame(diag.FrameTextureIndex, IsSpecialTile(_tileName) ? Animation.MinimumFrameTime : diag.FrameTime);
_animation.AddFrame(diag.FrameTextureIndex, _isSpecialTile ? Animation.MinimumFrameTime : diag.FrameTime);
UpdateTreeView();
}
}
@@ -308,6 +296,7 @@ namespace PckStudio.Forms.Editor
private void importJavaAnimationToolStripMenuItem_Click(object sender, EventArgs e)
{
if (MessageBox.Show(
this,
"This feature will replace the existing animation data. " +
"It might fail if the selected animation script is invalid. " +
"Are you sure that you want to continue?",
@@ -329,55 +318,26 @@ namespace PckStudio.Forms.Editor
string textureFile = fileDialog.FileName.Substring(0, fileDialog.FileName.Length - ".mcmeta".Length);
if (!File.Exists(textureFile))
{
MessageBox.Show(textureFile + " was not found", "Texture not found");
MessageBox.Show(this, textureFile + " was not found", "Texture not found");
return;
}
try
{
var img = Image.FromFile(textureFile);
JObject mcmeta = JObject.Parse(File.ReadAllText(fileDialog.FileName));
Animation javaAnimation = AnimationHelper.GetAnimationFromJavaAnimation(mcmeta, img);
javaAnimation.Category = _animation.Category;
Animation javaAnimation = AnimationDeserializer.DefaultDeserializer.DeserializeJavaAnimation(mcmeta, img);
//javaAnimation.Category = _animation.Category;
_animation = javaAnimation;
LoadAnimationTreeView();
}
catch (JsonException j_ex)
{
MessageBox.Show(j_ex.Message, "Invalid animation");
MessageBox.Show(this, j_ex.Message, "Invalid animation");
return;
}
}
private void changeTileToolStripMenuItem_Click(object sender, EventArgs e)
{
StopAnimation();
using (ChangeTile diag = new ChangeTile())
{
if (diag.ShowDialog(this) != DialogResult.OK)
return;
Debug.WriteLine($"{diag.SelectedTile}");
_animation.Category = diag.Category;
_tileName = diag.SelectedTile;
ValidateToolStrip();
SetTileLabel();
}
}
private void SetTileLabel()
{
var textureInfos = _animation.Category switch
{
AnimationCategory.Blocks => Tiles.BlockTileInfos,
AnimationCategory.Items => Tiles.ItemTileInfos,
_ => throw new ArgumentOutOfRangeException(_animation.Category.ToString())
};
tileLabel.Text = textureInfos.FirstOrDefault(p => p.InternalName == _tileName)?.DisplayName ?? _tileName;
}
private void exportJavaAnimationToolStripMenuItem_Click(object sender, EventArgs e)
private void exportJavaAnimationToolStripMenuItem_Click(object sender, EventArgs e)
{
SaveFileDialog fileDialog = new SaveFileDialog();
fileDialog.Title = "Please choose where you want to save your new animation";
@@ -392,29 +352,29 @@ namespace PckStudio.Forms.Editor
// removes ".mcmeta" from filename
string texturePath = Path.Combine(Path.GetDirectoryName(filename), Path.GetFileNameWithoutExtension(filename));
finalTexture.Save(texturePath);
MessageBox.Show("Animation was successfully exported as " + Path.GetFileName(filename), "Export successful!");
MessageBox.Show(this, "Animation was successfully exported as " + Path.GetFileName(filename), "Export successful!");
}
}
private void howToInterpolation_Click(object sender, EventArgs e)
{
MessageBox.Show("The Interpolation effect is when the animtion smoothly translates between the frames instead of simply displaying the next one. This can be seen with some vanilla Minecraft textures such as Magma and Prismarine.", "Interpolation");
MessageBox.Show(this, "The Interpolation effect is when the animtion smoothly translates between the frames instead of simply displaying the next one. This can be seen with some vanilla Minecraft textures such as Magma and Prismarine.", "Interpolation");
}
private void editorControlsToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("Simply drag and drop frames in the tree to rearrange your animation.\n\n" +
MessageBox.Show(this, "Simply drag and drop frames in the tree to rearrange your animation.\n\n" +
"You can also preview your animation at any time by simply pressing the button under the animation display.", "Editor Controls");
}
private void setBulkSpeedToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("You can edit the frame and its speed by double clicking a frame in the tree. If you'd like to change the entire animation's speed, you can do so with the \"Set Bulk Animation Speed\" button in the \"Tools\" tab", "How to use Bulk Animation tool");
MessageBox.Show(this, "You can edit the frame and its speed by double clicking a frame in the tree. If you'd like to change the entire animation's speed, you can do so with the \"Set Bulk Animation Speed\" button in the \"Tools\" tab", "How to use Bulk Animation tool");
}
private void javaAnimationSupportToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("You can import any valid Java Edition tile animations into your pck by opening an mcmeta.\n\n" +
MessageBox.Show(this, "You can import any valid Java Edition tile animations into your pck by opening an mcmeta.\n\n" +
"You can also export your animation as an Java Edition tile animation. It will also export the actual texture in the same spot.", "Java Edition Support");
}
@@ -448,7 +408,7 @@ namespace PckStudio.Forms.Editor
var gif = Image.FromFile(fileDialog.FileName);
if (!gif.RawFormat.Equals(ImageFormat.Gif))
{
MessageBox.Show("Selected file is not a gif", "Invalid file", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show(this, "Selected file is not a gif", "Invalid file", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
@@ -466,11 +426,11 @@ namespace PckStudio.Forms.Editor
textures.Add(new Bitmap(gif, oldResolution, oldResolution));
}
var animCat = _animation.Category;
_animation = new Animation(textures, string.Empty);
_animation.Interpolate = InterpolationCheckbox.Checked;
_animation.Category = animCat;
// TODO: Add function or a other way to initialize the frames by textures.
// Currently single frames only get added when an anim has an invalid format or is empty.
// -Miku
_animation = new Animation(textures, "");
_animation.Interpolate = InterpolationCheckbox.Checked;
LoadAnimationTreeView();
}
@@ -481,7 +441,7 @@ namespace PckStudio.Forms.Editor
Filter = "PNG Files | *.png",
Title = "Select a PNG File",
};
if (ofd.ShowDialog() != DialogResult.OK)
if (ofd.ShowDialog(this) != DialogResult.OK)
return;
Image img = Image.FromFile(ofd.FileName);
var textures = img.Split(ImageLayoutDirection.Vertical);
@@ -493,7 +453,7 @@ namespace PckStudio.Forms.Editor
{
var fileDialog = new SaveFileDialog()
{
FileName = _tileName,
FileName = tileLabel.Text,
Filter = "GIF file|*.gif"
};
if (fileDialog.ShowDialog(this) != DialogResult.OK)

View File

@@ -124,8 +124,8 @@ namespace PckStudio.Forms.Editor
if (!parent.CreateDataFolder()) return;
string FileName = Path.Combine(parent.GetDataPath(), entry.Text + ".binka");
if (File.Exists(FileName)) MessageBox.Show("\"" + entry.Text + ".binka\" exists in the \"Data\" folder", "File found");
else MessageBox.Show("\"" + entry.Text + ".binka\" does not exist in the \"Data\" folder. The game will crash when attempting to load this track.", "File missing");
if (File.Exists(FileName)) MessageBox.Show(this, "\"" + entry.Text + ".binka\" exists in the \"Data\" folder", "File found");
else MessageBox.Show(this, "\"" + entry.Text + ".binka\" does not exist in the \"Data\" folder. The game will crash when attempting to load this track.", "File missing");
}
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
@@ -145,7 +145,7 @@ namespace PckStudio.Forms.Editor
if (available.Length > 0)
{
using ItemSelectionPopUp add = new ItemSelectionPopUp(available);
if (add.ShowDialog() == DialogResult.OK)
if (add.ShowDialog(this) == DialogResult.OK)
audioFile.AddCategory(GetCategoryId(add.SelectedItem));
else return;
@@ -165,7 +165,7 @@ namespace PckStudio.Forms.Editor
}
else
{
MessageBox.Show("There are no more categories that could be added", "All possible categories are used");
MessageBox.Show(this, "There are no more categories that could be added", "All possible categories are used");
}
}
@@ -179,7 +179,7 @@ namespace PckStudio.Forms.Editor
ofn.Multiselect = true;
ofn.Filter = "Supported audio files (*.binka,*.wav)|*.binka;*.wav";
ofn.Title = "Please choose WAV or BINKA files to add to your pack";
ofn.ShowDialog();
ofn.ShowDialog(this);
ofn.Dispose();
if (string.IsNullOrEmpty(ofn.FileName)) return; // Return if name is null or if the user cancels
@@ -268,7 +268,7 @@ namespace PckStudio.Forms.Editor
diag_text += " Pressing yes will replace the existing file. By pressing no, the song entry will be added without affecting the file." +
"You can also cancel this operation and all files in queue.";
DialogResult user_prompt = MessageBox.Show(diag_text, "File already exists", MessageBoxButtons.YesNoCancel);
DialogResult user_prompt = MessageBox.Show(this, diag_text, "File already exists", MessageBoxButtons.YesNoCancel);
while (user_prompt == DialogResult.None) ; // Stops the editor from adding or processing the file until the user has made their choice
if (user_prompt == DialogResult.Cancel)
{
@@ -364,7 +364,7 @@ namespace PckStudio.Forms.Editor
!audioFile.HasCategory(PckAudioFile.AudioCategory.EAudioType.Nether) ||
!audioFile.HasCategory(PckAudioFile.AudioCategory.EAudioType.End))
{
MessageBox.Show("Your changes were not saved. The game will crash when loading your pack if the Overworld, Nether and End categories don't all exist with at least one valid song.", "Mandatory Categories Missing");
MessageBox.Show(this, "Your changes were not saved. The game will crash when loading your pack if the Overworld, Nether and End categories don't all exist with at least one valid song.", "Mandatory Categories Missing");
return;
}
@@ -375,7 +375,7 @@ namespace PckStudio.Forms.Editor
{
if (category.SongNames.Count < 1)
{
MessageBox.Show("The game will crash upon loading your pack if any of the categories are empty. Please remove or occupy the category.", "Empty Category");
MessageBox.Show(this, "The game will crash upon loading your pack if any of the categories are empty. Please remove or occupy the category.", "Empty Category");
return;
}
@@ -385,7 +385,7 @@ namespace PckStudio.Forms.Editor
if (!File.Exists(FileName))
{
songs_missing = true;
MessageBox.Show("\"" + song + ".binka\" does not exist in the \"Data\" folder. The game will crash when attempting to load this track.", "File missing");
MessageBox.Show(this, "\"" + song + ".binka\" does not exist in the \"Data\" folder. The game will crash when attempting to load this track.", "File missing");
}
}
@@ -406,7 +406,7 @@ namespace PckStudio.Forms.Editor
if (songs_missing)
{
MessageBox.Show("Failed to save AudioData file because there are missing song entries", "Error");
MessageBox.Show(this, "Failed to save AudioData file because there are missing song entries", "Error");
return;
}
@@ -421,7 +421,7 @@ namespace PckStudio.Forms.Editor
private void helpToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("Simply drag and drop BINKA or WAV audio files into the right tree to add them to the category selected on the left tree.\n\n" +
MessageBox.Show(this, "Simply drag and drop BINKA or WAV audio files into the right tree to add them to the category selected on the left tree.\n\n" +
"The \"Menu\" category will only play once when loading the pack, and never again.\n\n" +
"The \"Creative\" category will only play songs listed in that category, and unlike other editions of Minecraft, will NOT play songs from the Overworld category. You can fix this by clicking the checkbox found at the top of the form.\n\n" +
"The mini game categories will only play if you have your pack loaded in those mini games.\n\n" +
@@ -430,7 +430,7 @@ namespace PckStudio.Forms.Editor
private void deleteUnusedBINKAsToolStripMenuItem_Click(object sender, EventArgs e)
{
DialogResult dr = MessageBox.Show("This will delete all unused BINKA songs in the Data directory. This cannot be undone. Are you sure you want to continue?", "Warning", MessageBoxButtons.YesNo);
DialogResult dr = MessageBox.Show(this, "This will delete all unused BINKA songs in the Data directory. This cannot be undone. Are you sure you want to continue?", "Warning", MessageBoxButtons.YesNo);
if (dr != DialogResult.Yes) return;
var totalSongList = new List<string>();
foreach (string song in audioFile.Categories.SelectMany(cat => cat.SongNames))
@@ -458,17 +458,17 @@ namespace PckStudio.Forms.Editor
totalDeleted++;
}
}
MessageBox.Show("Successfully deleted " + totalDeleted + " files", "Done");
MessageBox.Show(this, "Successfully deleted " + totalDeleted + " files", "Done");
}
private void howToAddSongsToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("Right click the right window and press \"Add Entry\" or drag and drop a valid WAV file into the editor's right window. You can also drop other BINKA files, either from the main game or using a tool like BinkMan. The editor will automatically put the song in the Data folder for you.", "How to add a song");
MessageBox.Show(this, "Right click the right window and press \"Add Entry\" or drag and drop a valid WAV file into the editor's right window. You can also drop other BINKA files, either from the main game or using a tool like BinkMan. The editor will automatically put the song in the Data folder for you.", "How to add a song");
}
private void whatAreTheCategoriesToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("Categories are pretty self explanatory. The game controls when each category should play.\n" +
MessageBox.Show(this, "Categories are pretty self explanatory. The game controls when each category should play.\n" +
"\nGAMEPLAY - Plays in the specified dimensions and game modes.\n" +
"-Overworld: Plays in survival mode and in Creative if no songs are set\n" +
"-Nether: Plays in the Nether.\n" +
@@ -484,17 +484,17 @@ namespace PckStudio.Forms.Editor
private void howToEditCreditsToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("Click Tools -> Credits Editor. This will allow you to edit all the credits easily in the pack easily. Only supports English credits at the moment. ","How to edit credits?");
MessageBox.Show(this, "Click Tools -> Credits Editor. This will allow you to edit all the credits easily in the pack easily. Only supports English credits at the moment. ","How to edit credits?");
}
private void optimizeDataFolderToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("Click Tools -> Delete Unused BINKA files. This will clean your folder of any unused songs.", "How to optimize the Data folder");
MessageBox.Show(this, "Click Tools -> Delete Unused BINKA files. This will clean your folder of any unused songs.", "How to optimize the Data folder");
}
private void BINKACompressionToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("The numerical up/down control is responsible for the level of compression used when converting WAV files. The default is 4, which was commonly used by 4J for the game's files.","BINKA Compression Level");
MessageBox.Show(this, "The numerical up/down control is responsible for the level of compression used when converting WAV files. The default is 4, which was commonly used by 4J for the game's files.","BINKA Compression Level");
}
private void openDataFolderToolStripMenuItem_Click(object sender, EventArgs e)
@@ -520,7 +520,7 @@ namespace PckStudio.Forms.Editor
ofn.Multiselect = true;
ofn.Filter = "Supported audio files (*.binka,*.wav)|*.binka;*.wav";
ofn.Title = "Please choose WAV or BINKA files to replace existing track files";
ofn.ShowDialog();
ofn.ShowDialog(this);
ofn.Dispose();
if (string.IsNullOrEmpty(ofn.FileName)) return; // Return if name is null or if the user cancels
@@ -578,7 +578,7 @@ namespace PckStudio.Forms.Editor
{
using ItemSelectionPopUp add = new ItemSelectionPopUp(available);
add.ButtonText = "Save";
if (add.ShowDialog() != DialogResult.OK) return;
if (add.ShowDialog(this) != DialogResult.OK) return;
audioFile.RemoveCategory(category.audioType);
@@ -592,13 +592,13 @@ namespace PckStudio.Forms.Editor
}
else
{
MessageBox.Show("There are no categories that aren't already used", "All possible categories are used");
MessageBox.Show(this, "There are no categories that aren't already used", "All possible categories are used");
}
}
private void organizeTracksToolStripMenuItem_Click(object sender, EventArgs e)
{
if(MessageBox.Show("This function will move all binka files in the \"Data\" folder into a \"Music\" folder, to keep your data better organized. Would you like to continue?", "Move tracks?", MessageBoxButtons.YesNo) == DialogResult.Yes)
if(MessageBox.Show(this, "This function will move all binka files in the \"Data\" folder into a \"Music\" folder, to keep your data better organized. Would you like to continue?", "Move tracks?", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
if (treeView1.Nodes.Count < 1 || !parent.CreateDataFolder()) return;
string musicdir = Path.Combine(parent.GetDataPath(), "Music");

View File

@@ -14,6 +14,7 @@ using OMI.Formats.Pck;
using PckStudio.Properties;
using PckStudio.Internal;
using PckStudio.Extensions;
using PckStudio.Internal.Json;
namespace PckStudio.Forms.Editor
{
@@ -23,7 +24,7 @@ namespace PckStudio.Forms.Editor
private readonly PckFileData _file;
BehaviourFile behaviourFile;
private readonly JObject EntityJSONData = JObject.Parse(Properties.Resources.entityData);
private readonly List<EntityInfo> BehaviourData = Entities.BehaviourInfos;
void SetUpTree()
{
@@ -33,18 +34,10 @@ namespace PckStudio.Forms.Editor
{
TreeNode EntryNode = new TreeNode(entry.name);
foreach (JObject content in EntityJSONData["behaviours"].Children())
{
var prop = content.Properties().FirstOrDefault(prop => prop.Name == entry.name);
if (prop is JProperty)
{
EntryNode.Text = (string)prop.Value;
EntryNode.ImageIndex = EntityJSONData["behaviours"].Children().ToList().IndexOf(content);
EntryNode.SelectedImageIndex = EntryNode.ImageIndex;
break;
}
}
var behaviour = BehaviourData.Find(b => b.InternalName == entry.name);
EntryNode.Text = behaviour.DisplayName;
EntryNode.ImageIndex = BehaviourData.IndexOf(behaviour);
EntryNode.SelectedImageIndex = EntryNode.ImageIndex;
EntryNode.Tag = entry;
foreach (var posOverride in entry.overrides)
@@ -83,10 +76,9 @@ namespace PckStudio.Forms.Editor
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
{
if (e.Node is null) return;
if (treeView1.SelectedNode is null) return;
bool isValidOverride = e.Node.Tag is BehaviourFile.RiderPositionOverride.PositionOverride &&
treeView1.SelectedNode != null;
bool isValidOverride = treeView1.SelectedNode.Tag is BehaviourFile.RiderPositionOverride.PositionOverride;
MobIsTamedCheckbox.Enabled = isValidOverride;
MobHasSaddleCheckbox.Enabled = isValidOverride;
xUpDown.Enabled = isValidOverride;
@@ -97,7 +89,7 @@ namespace PckStudio.Forms.Editor
if (isValidOverride)
{
var posOverride = e.Node.Tag as BehaviourFile.RiderPositionOverride.PositionOverride;
var posOverride = treeView1.SelectedNode.Tag as BehaviourFile.RiderPositionOverride.PositionOverride;
MobIsTamedCheckbox.Checked = posOverride.EntityIsTamed;
MobHasSaddleCheckbox.Checked = posOverride.EntityHasSaddle;
xUpDown.Value = (decimal)posOverride.x;
@@ -160,7 +152,7 @@ namespace PckStudio.Forms.Editor
var diag = new AddEntry("behaviours", ApplicationScope.EntityImages);
diag.acceptBtn.Text = "Save";
if (diag.ShowDialog() == DialogResult.OK)
if (diag.ShowDialog(this) == DialogResult.OK)
{
if (String.IsNullOrEmpty(diag.SelectedEntity)) return;
if (behaviourFile.entries.FindAll(behaviour => behaviour.name == diag.SelectedEntity).Count() > 0)
@@ -172,17 +164,11 @@ namespace PckStudio.Forms.Editor
entry.name = diag.SelectedEntity;
treeView1.SelectedNode.Tag = entry;
foreach (JObject content in EntityJSONData["behaviours"].Children())
{
var prop = content.Properties().FirstOrDefault(prop => prop.Name == entry.name);
if (prop is JProperty)
{
treeView1.SelectedNode.Text = (string)prop.Value;
treeView1.SelectedNode.ImageIndex = EntityJSONData["behaviours"].Children().ToList().IndexOf(content);
treeView1.SelectedNode.SelectedImageIndex = treeView1.SelectedNode.ImageIndex;
break;
}
}
var behaviour = BehaviourData.Find(b => b.InternalName == entry.name);
treeView1.SelectedNode.Text = behaviour.DisplayName;
treeView1.SelectedNode.ImageIndex = BehaviourData.IndexOf(behaviour);
treeView1.SelectedNode.SelectedImageIndex = treeView1.SelectedNode.ImageIndex;
}
}
@@ -213,7 +199,7 @@ namespace PckStudio.Forms.Editor
{
var diag = new AddEntry("behaviours", ApplicationScope.EntityImages);
if(diag.ShowDialog() == DialogResult.OK)
if(diag.ShowDialog(this) == DialogResult.OK)
{
if (string.IsNullOrEmpty(diag.SelectedEntity)) return;
if (behaviourFile.entries.FindAll(behaviour => behaviour.name == diag.SelectedEntity).Count() > 0)
@@ -225,17 +211,12 @@ namespace PckStudio.Forms.Editor
TreeNode NewOverrideNode = new TreeNode(NewOverride.name);
NewOverrideNode.Tag = NewOverride;
foreach (JObject content in EntityJSONData["behaviours"].Children())
{
var prop = content.Properties().FirstOrDefault(prop => prop.Name == NewOverride.name);
if (prop is JProperty)
{
NewOverrideNode.Text = (string)prop.Value;
NewOverrideNode.ImageIndex = EntityJSONData["behaviours"].Children().ToList().IndexOf(content);
NewOverrideNode.SelectedImageIndex = NewOverrideNode.ImageIndex;
break;
}
}
var behaviour = BehaviourData.Find(b => b.InternalName == NewOverride.name);
NewOverrideNode.Text = behaviour.DisplayName;
NewOverrideNode.ImageIndex = BehaviourData.IndexOf(behaviour);
NewOverrideNode.SelectedImageIndex = NewOverrideNode.ImageIndex;
treeView1.Nodes.Add(NewOverrideNode);
treeView1.SelectedNode = NewOverrideNode;

View File

@@ -51,7 +51,21 @@ namespace PckStudio.Forms.Editor
this.menuStrip = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.targetUpdateToolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.waterTab = new System.Windows.Forms.TabPage();
this.waterTreeView = new System.Windows.Forms.TreeView();
this.ColorContextMenu = new MetroFramework.Controls.MetroContextMenu(this.components);
this.copyColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pasteColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreOriginalColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.underwaterTreeView = new System.Windows.Forms.TreeView();
this.fogTreeView = new System.Windows.Forms.TreeView();
this.colorsTab = new System.Windows.Forms.TabPage();
this.colorTreeView = new System.Windows.Forms.TreeView();
this.tabControl = new MetroFramework.Controls.MetroTabControl();
this.underwaterTab = new System.Windows.Forms.TabPage();
this.fogTab = new System.Windows.Forms.TabPage();
this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.targetUpdateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.TU12ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.TU13ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.TU14ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -65,19 +79,7 @@ namespace PckStudio.Forms.Editor
this.TU54ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.TU69ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._1_9_1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.waterTab = new System.Windows.Forms.TabPage();
this.waterTreeView = new System.Windows.Forms.TreeView();
this.ColorContextMenu = new MetroFramework.Controls.MetroContextMenu(this.components);
this.restoreOriginalColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.copyColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pasteColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.underwaterTreeView = new System.Windows.Forms.TreeView();
this.fogTreeView = new System.Windows.Forms.TreeView();
this.colorsTab = new System.Windows.Forms.TabPage();
this.colorTreeView = new System.Windows.Forms.TreeView();
this.tabControl = new MetroFramework.Controls.MetroTabControl();
this.underwaterTab = new System.Windows.Forms.TabPage();
this.fogTab = new System.Windows.Forms.TabPage();
this.stripPS4BiomesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.metroPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.blueUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.greenUpDown)).BeginInit();
@@ -239,6 +241,7 @@ namespace PckStudio.Forms.Editor
//
// colorTextbox
//
this.colorTextbox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
//
//
//
@@ -254,7 +257,7 @@ namespace PckStudio.Forms.Editor
this.colorTextbox.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible1")));
this.colorTextbox.Lines = new string[0];
resources.ApplyResources(this.colorTextbox, "colorTextbox");
this.colorTextbox.MaxLength = 32767;
this.colorTextbox.MaxLength = 6;
this.colorTextbox.Name = "colorTextbox";
this.colorTextbox.PasswordChar = '\0';
this.colorTextbox.ScrollBars = System.Windows.Forms.ScrollBars.None;
@@ -267,6 +270,7 @@ namespace PckStudio.Forms.Editor
this.colorTextbox.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
this.colorTextbox.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
this.colorTextbox.TextChanged += new System.EventHandler(this.colorBox_TextChanged);
this.colorTextbox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.colorTextbox_KeyPress);
//
// metroLabel1
//
@@ -287,7 +291,7 @@ namespace PckStudio.Forms.Editor
this.menuStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.targetUpdateToolToolStripMenuItem});
this.toolsToolStripMenuItem});
this.menuStrip.Name = "menuStrip";
//
// fileToolStripMenuItem
@@ -304,9 +308,126 @@ namespace PckStudio.Forms.Editor
this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1";
this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click);
//
// targetUpdateToolToolStripMenuItem
// waterTab
//
this.targetUpdateToolToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.waterTab.BackColor = System.Drawing.SystemColors.WindowFrame;
this.waterTab.Controls.Add(this.waterTreeView);
resources.ApplyResources(this.waterTab, "waterTab");
this.waterTab.Name = "waterTab";
//
// waterTreeView
//
this.waterTreeView.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.waterTreeView.ContextMenuStrip = this.ColorContextMenu;
resources.ApplyResources(this.waterTreeView, "waterTreeView");
this.waterTreeView.ForeColor = System.Drawing.Color.White;
this.waterTreeView.Name = "waterTreeView";
this.waterTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView2_AfterSelect);
this.waterTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView2_KeyDown);
//
// ColorContextMenu
//
this.ColorContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.copyColorToolStripMenuItem,
this.pasteColorToolStripMenuItem,
this.restoreOriginalColorToolStripMenuItem});
this.ColorContextMenu.Name = "ColorContextMenu";
resources.ApplyResources(this.ColorContextMenu, "ColorContextMenu");
//
// copyColorToolStripMenuItem
//
this.copyColorToolStripMenuItem.Name = "copyColorToolStripMenuItem";
resources.ApplyResources(this.copyColorToolStripMenuItem, "copyColorToolStripMenuItem");
this.copyColorToolStripMenuItem.Click += new System.EventHandler(this.copyColorToolStripMenuItem_Click);
//
// pasteColorToolStripMenuItem
//
this.pasteColorToolStripMenuItem.Name = "pasteColorToolStripMenuItem";
resources.ApplyResources(this.pasteColorToolStripMenuItem, "pasteColorToolStripMenuItem");
this.pasteColorToolStripMenuItem.Click += new System.EventHandler(this.pasteColorToolStripMenuItem_Click);
//
// restoreOriginalColorToolStripMenuItem
//
this.restoreOriginalColorToolStripMenuItem.Name = "restoreOriginalColorToolStripMenuItem";
resources.ApplyResources(this.restoreOriginalColorToolStripMenuItem, "restoreOriginalColorToolStripMenuItem");
this.restoreOriginalColorToolStripMenuItem.Click += new System.EventHandler(this.restoreOriginalColorToolStripMenuItem_Click);
//
// underwaterTreeView
//
this.underwaterTreeView.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.underwaterTreeView.ContextMenuStrip = this.ColorContextMenu;
this.underwaterTreeView.ForeColor = System.Drawing.Color.White;
resources.ApplyResources(this.underwaterTreeView, "underwaterTreeView");
this.underwaterTreeView.Name = "underwaterTreeView";
this.underwaterTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView3_AfterSelect);
this.underwaterTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView3_KeyDown);
//
// fogTreeView
//
this.fogTreeView.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.fogTreeView.ContextMenuStrip = this.ColorContextMenu;
this.fogTreeView.ForeColor = System.Drawing.Color.White;
resources.ApplyResources(this.fogTreeView, "fogTreeView");
this.fogTreeView.Name = "fogTreeView";
this.fogTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView4_AfterSelect);
this.fogTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView4_KeyDown);
//
// colorsTab
//
this.colorsTab.BackColor = System.Drawing.SystemColors.WindowFrame;
this.colorsTab.Controls.Add(this.colorTreeView);
resources.ApplyResources(this.colorsTab, "colorsTab");
this.colorsTab.Name = "colorsTab";
//
// colorTreeView
//
this.colorTreeView.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.colorTreeView.ContextMenuStrip = this.ColorContextMenu;
resources.ApplyResources(this.colorTreeView, "colorTreeView");
this.colorTreeView.ForeColor = System.Drawing.Color.White;
this.colorTreeView.Name = "colorTreeView";
this.colorTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
this.colorTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown);
//
// tabControl
//
resources.ApplyResources(this.tabControl, "tabControl");
this.tabControl.Controls.Add(this.colorsTab);
this.tabControl.Controls.Add(this.waterTab);
this.tabControl.Controls.Add(this.underwaterTab);
this.tabControl.Controls.Add(this.fogTab);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Style = MetroFramework.MetroColorStyle.White;
this.tabControl.Theme = MetroFramework.MetroThemeStyle.Dark;
this.tabControl.UseSelectable = true;
//
// underwaterTab
//
this.underwaterTab.BackColor = System.Drawing.SystemColors.WindowFrame;
this.underwaterTab.Controls.Add(this.underwaterTreeView);
resources.ApplyResources(this.underwaterTab, "underwaterTab");
this.underwaterTab.Name = "underwaterTab";
//
// fogTab
//
this.fogTab.BackColor = System.Drawing.SystemColors.WindowFrame;
this.fogTab.Controls.Add(this.fogTreeView);
resources.ApplyResources(this.fogTab, "fogTab");
this.fogTab.Name = "fogTab";
//
// toolsToolStripMenuItem
//
this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.stripPS4BiomesToolStripMenuItem,
this.targetUpdateToolStripMenuItem});
this.toolsToolStripMenuItem.ForeColor = System.Drawing.Color.White;
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
resources.ApplyResources(this.toolsToolStripMenuItem, "toolsToolStripMenuItem");
//
// targetUpdateToolStripMenuItem
//
this.targetUpdateToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.TU12ToolStripMenuItem,
this.TU13ToolStripMenuItem,
this.TU14ToolStripMenuItem,
@@ -320,9 +441,8 @@ namespace PckStudio.Forms.Editor
this.TU54ToolStripMenuItem,
this.TU69ToolStripMenuItem,
this._1_9_1ToolStripMenuItem});
this.targetUpdateToolToolStripMenuItem.ForeColor = System.Drawing.Color.White;
this.targetUpdateToolToolStripMenuItem.Name = "targetUpdateToolToolStripMenuItem";
resources.ApplyResources(this.targetUpdateToolToolStripMenuItem, "targetUpdateToolToolStripMenuItem");
this.targetUpdateToolStripMenuItem.Name = "targetUpdateToolStripMenuItem";
resources.ApplyResources(this.targetUpdateToolStripMenuItem, "targetUpdateToolStripMenuItem");
//
// TU12ToolStripMenuItem
//
@@ -389,105 +509,11 @@ namespace PckStudio.Forms.Editor
this._1_9_1ToolStripMenuItem.Name = "_1_9_1ToolStripMenuItem";
resources.ApplyResources(this._1_9_1ToolStripMenuItem, "_1_9_1ToolStripMenuItem");
//
// waterTab
// stripPS4BiomesToolStripMenuItem
//
this.waterTab.BackColor = System.Drawing.SystemColors.WindowFrame;
this.waterTab.Controls.Add(this.waterTreeView);
resources.ApplyResources(this.waterTab, "waterTab");
this.waterTab.Name = "waterTab";
//
// waterTreeView
//
this.waterTreeView.ContextMenuStrip = this.ColorContextMenu;
resources.ApplyResources(this.waterTreeView, "waterTreeView");
this.waterTreeView.Name = "waterTreeView";
this.waterTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView2_AfterSelect);
this.waterTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView2_KeyDown);
//
// ColorContextMenu
//
this.ColorContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.restoreOriginalColorToolStripMenuItem,
this.copyColorToolStripMenuItem,
this.pasteColorToolStripMenuItem});
this.ColorContextMenu.Name = "ColorContextMenu";
resources.ApplyResources(this.ColorContextMenu, "ColorContextMenu");
//
// restoreOriginalColorToolStripMenuItem
//
this.restoreOriginalColorToolStripMenuItem.Name = "restoreOriginalColorToolStripMenuItem";
resources.ApplyResources(this.restoreOriginalColorToolStripMenuItem, "restoreOriginalColorToolStripMenuItem");
this.restoreOriginalColorToolStripMenuItem.Click += new System.EventHandler(this.restoreOriginalColorToolStripMenuItem_Click);
//
// copyColorToolStripMenuItem
//
this.copyColorToolStripMenuItem.Name = "copyColorToolStripMenuItem";
resources.ApplyResources(this.copyColorToolStripMenuItem, "copyColorToolStripMenuItem");
this.copyColorToolStripMenuItem.Click += new System.EventHandler(this.copyColorToolStripMenuItem_Click);
//
// pasteColorToolStripMenuItem
//
this.pasteColorToolStripMenuItem.Name = "pasteColorToolStripMenuItem";
resources.ApplyResources(this.pasteColorToolStripMenuItem, "pasteColorToolStripMenuItem");
this.pasteColorToolStripMenuItem.Click += new System.EventHandler(this.pasteColorToolStripMenuItem_Click);
//
// underwaterTreeView
//
this.underwaterTreeView.ContextMenuStrip = this.ColorContextMenu;
resources.ApplyResources(this.underwaterTreeView, "underwaterTreeView");
this.underwaterTreeView.Name = "underwaterTreeView";
this.underwaterTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView3_AfterSelect);
this.underwaterTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView3_KeyDown);
//
// fogTreeView
//
this.fogTreeView.ContextMenuStrip = this.ColorContextMenu;
resources.ApplyResources(this.fogTreeView, "fogTreeView");
this.fogTreeView.Name = "fogTreeView";
this.fogTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView4_AfterSelect);
this.fogTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView4_KeyDown);
//
// colorsTab
//
this.colorsTab.BackColor = System.Drawing.SystemColors.WindowFrame;
this.colorsTab.Controls.Add(this.colorTreeView);
resources.ApplyResources(this.colorsTab, "colorsTab");
this.colorsTab.Name = "colorsTab";
//
// colorTreeView
//
this.colorTreeView.ContextMenuStrip = this.ColorContextMenu;
resources.ApplyResources(this.colorTreeView, "colorTreeView");
this.colorTreeView.Name = "colorTreeView";
this.colorTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
this.colorTreeView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown);
//
// tabControl
//
resources.ApplyResources(this.tabControl, "tabControl");
this.tabControl.Controls.Add(this.colorsTab);
this.tabControl.Controls.Add(this.waterTab);
this.tabControl.Controls.Add(this.underwaterTab);
this.tabControl.Controls.Add(this.fogTab);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Style = MetroFramework.MetroColorStyle.White;
this.tabControl.Theme = MetroFramework.MetroThemeStyle.Dark;
this.tabControl.UseSelectable = true;
//
// underwaterTab
//
this.underwaterTab.BackColor = System.Drawing.SystemColors.WindowFrame;
this.underwaterTab.Controls.Add(this.underwaterTreeView);
resources.ApplyResources(this.underwaterTab, "underwaterTab");
this.underwaterTab.Name = "underwaterTab";
//
// fogTab
//
this.fogTab.BackColor = System.Drawing.SystemColors.WindowFrame;
this.fogTab.Controls.Add(this.fogTreeView);
resources.ApplyResources(this.fogTab, "fogTab");
this.fogTab.Name = "fogTab";
this.stripPS4BiomesToolStripMenuItem.Name = "stripPS4BiomesToolStripMenuItem";
resources.ApplyResources(this.stripPS4BiomesToolStripMenuItem, "stripPS4BiomesToolStripMenuItem");
this.stripPS4BiomesToolStripMenuItem.Click += new System.EventHandler(this.stripPS4BiomesToolStripMenuItem_Click);
//
// COLEditor
//
@@ -551,21 +577,23 @@ namespace PckStudio.Forms.Editor
private ToolStripMenuItem restoreOriginalColorToolStripMenuItem;
private MetroFramework.Controls.MetroTextBox metroTextBox1;
private MetroFramework.Controls.MetroLabel metroLabel2;
private ToolStripMenuItem targetUpdateToolToolStripMenuItem;
private ToolStripMenuItem TU12ToolStripMenuItem;
private ToolStripMenuItem TU13ToolStripMenuItem;
private ToolStripMenuItem TU14ToolStripMenuItem;
private ToolStripMenuItem TU19ToolStripMenuItem;
private ToolStripMenuItem TU31ToolStripMenuItem;
private ToolStripMenuItem TU32ToolStripMenuItem;
private ToolStripMenuItem TU43ToolStripMenuItem;
private ToolStripMenuItem TU46ToolStripMenuItem;
private ToolStripMenuItem TU51ToolStripMenuItem;
private ToolStripMenuItem TU53ToolStripMenuItem;
private ToolStripMenuItem TU54ToolStripMenuItem;
private ToolStripMenuItem TU69ToolStripMenuItem;
private ToolStripMenuItem _1_9_1ToolStripMenuItem;
private ToolStripMenuItem copyColorToolStripMenuItem;
private ToolStripMenuItem pasteColorToolStripMenuItem;
}
private ToolStripMenuItem copyColorToolStripMenuItem;
private ToolStripMenuItem pasteColorToolStripMenuItem;
private ToolStripMenuItem toolsToolStripMenuItem;
private ToolStripMenuItem targetUpdateToolStripMenuItem;
private ToolStripMenuItem TU12ToolStripMenuItem;
private ToolStripMenuItem TU13ToolStripMenuItem;
private ToolStripMenuItem TU14ToolStripMenuItem;
private ToolStripMenuItem TU19ToolStripMenuItem;
private ToolStripMenuItem TU31ToolStripMenuItem;
private ToolStripMenuItem TU32ToolStripMenuItem;
private ToolStripMenuItem TU43ToolStripMenuItem;
private ToolStripMenuItem TU46ToolStripMenuItem;
private ToolStripMenuItem TU51ToolStripMenuItem;
private ToolStripMenuItem TU53ToolStripMenuItem;
private ToolStripMenuItem TU54ToolStripMenuItem;
private ToolStripMenuItem TU69ToolStripMenuItem;
private ToolStripMenuItem _1_9_1ToolStripMenuItem;
private ToolStripMenuItem stripPS4BiomesToolStripMenuItem;
}
}

View File

@@ -17,7 +17,7 @@ namespace PckStudio.Forms.Editor
{
ColorContainer default_colourfile;
ColorContainer colourfile;
ColorContainer.Color clipboard_color;
string clipboard_color = "#FFFFFF";
private readonly PckFileData _file;
@@ -55,6 +55,9 @@ namespace PckStudio.Forms.Editor
_1_9_1ToolStripMenuItem.Click += (sender, e) => SetUpDefaultFile(sender, e, 12);
SetUpDefaultFile(null, EventArgs.Empty, 11, false);
colorTreeView.Select();
colorTreeView.SelectedNode = colorTreeView.Nodes[0];
}
private void SetUpDefaultFile(object sender, EventArgs e, int ID, bool targetVersion = true)
@@ -87,6 +90,14 @@ namespace PckStudio.Forms.Editor
SetUpTable(targetVersion);
}
void AddEntry(TreeView treeView, List<TreeNode> cache, string name, object tag)
{
TreeNode tn = new TreeNode(name);
tn.Tag = tag;
treeView.Nodes.Add(tn);
cache.Add(tn);
}
void SetUpTable(bool targetVersion)
{
colorTreeView.Nodes.Clear();
@@ -98,35 +109,57 @@ namespace PckStudio.Forms.Editor
List<string> CurrentEntries = new List<string>();
foreach (var obj in temp.Colors)
colorCache.Clear();
fogCache.Clear();
underwaterCache.Clear();
waterCache.Clear();
// fixes the duplicate entry bug
if (targetVersion)
{
foreach(var col in colourfile.Colors)
{
if (default_colourfile.Colors.Find(c => c.Name == col.Name) == null) continue;
CurrentEntries.Add(col.Name);
AddEntry(colorTreeView, colorCache, col.Name, col);
}
}
foreach (var col in temp.Colors)
{
var entry = colourfile.Colors.Find(color => color.Name == obj.Name);
TreeNode tn = new TreeNode(obj.Name);
tn.Tag = entry != null ? entry : obj;
if (CurrentEntries.Contains(obj.Name)) continue;
CurrentEntries.Add(obj.Name);
colorTreeView.Nodes.Add(tn);
colorCache.Add(tn);
var entry = colourfile.Colors.Find(color => color.Name == col.Name);
if (CurrentEntries.Contains(col.Name)) continue;
var color = entry ?? col;
AddEntry(colorTreeView, colorCache, color.Name, color);
}
CurrentEntries.Clear();
foreach (var obj in temp.WaterColors)
// fixes the duplicate entry bug
if (targetVersion)
{
var entry = colourfile.WaterColors.Find(color => color.Name == obj.Name);
TreeNode tn = new TreeNode(obj.Name);
tn.Tag = entry != null ? entry : obj;
if (CurrentEntries.Contains(obj.Name)) continue;
CurrentEntries.Add(obj.Name);
waterTreeView.Nodes.Add(tn);
waterCache.Add(tn);
TreeNode tnB = new TreeNode(obj.Name);
tnB.Tag = entry != null ? entry : obj;
underwaterTreeView.Nodes.Add(tnB);
underwaterCache.Add(tnB);
TreeNode tnC = new TreeNode(obj.Name);
tnC.Tag = entry != null ? entry : obj;
fogTreeView.Nodes.Add(tnC);
fogCache.Add(tnC);
foreach (var col in colourfile.WaterColors)
{
if (default_colourfile.WaterColors.Find(c => c.Name == col.Name) == null) continue;
var entry = colourfile.WaterColors.Find(color => color.Name == col.Name);
var color = entry ?? col;
AddEntry(waterTreeView, waterCache, color.Name, color);
AddEntry(underwaterTreeView, underwaterCache, color.Name, color);
AddEntry(fogTreeView, fogCache, color.Name, color);
}
}
foreach (var col in temp.WaterColors)
{
var entry = colourfile.WaterColors.Find(color => color.Name == col.Name);
if (CurrentEntries.Contains(col.Name)) continue;
var color = entry ?? col;
AddEntry(waterTreeView, waterCache, color.Name, color);
AddEntry(underwaterTreeView, underwaterCache, color.Name, color);
AddEntry(fogTreeView, fogCache, color.Name, color);
}
// force the filter function to run to carry filter over and fix treeview size
metroTextBox1_TextChanged(null, null);
}
void SetUpValueChanged(bool add)
@@ -151,6 +184,11 @@ namespace PckStudio.Forms.Editor
{
if (colorTreeView.SelectedNode.Tag == null)
return;
waterTreeView.SelectedNode = null;
underwaterTreeView.SelectedNode = null;
fogTreeView.SelectedNode = null;
var colorEntry = (ColorContainer.Color)colorTreeView.SelectedNode.Tag;
var color = colorEntry.ColorPallette.ToArgb();
SetUpValueChanged(false);
@@ -160,6 +198,7 @@ namespace PckStudio.Forms.Editor
greenUpDown.Value = color >> 8 & 0xff;
blueUpDown.Value = color & 0xff;
pictureBox1.BackColor = Color.FromArgb(0xff << 24 | color);
colorTextbox.Text = ColorTranslator.ToHtml(colorEntry.ColorPallette).TrimStart('#');
SetUpValueChanged(true);
}
@@ -167,6 +206,11 @@ namespace PckStudio.Forms.Editor
{
if (waterTreeView.SelectedNode.Tag == null)
return;
colorTreeView.SelectedNode = null;
underwaterTreeView.SelectedNode = null;
fogTreeView.SelectedNode = null;
var colorEntry = (ColorContainer.WaterColor)waterTreeView.SelectedNode.Tag;
int color = colorEntry.SurfaceColor.ToArgb();
SetUpValueChanged(false);
@@ -178,6 +222,7 @@ namespace PckStudio.Forms.Editor
greenUpDown.Value = color >> 8 & 0xff;
blueUpDown.Value = color & 0xff;
pictureBox1.BackColor = colorEntry.SurfaceColor;
colorTextbox.Text = ColorTranslator.ToHtml(colorEntry.SurfaceColor).TrimStart('#');
SetUpValueChanged(true);
}
@@ -185,6 +230,11 @@ namespace PckStudio.Forms.Editor
{
if (underwaterTreeView.SelectedNode.Tag == null)
return;
colorTreeView.SelectedNode = null;
waterTreeView.SelectedNode = null;
fogTreeView.SelectedNode = null;
var colorEntry = (ColorContainer.WaterColor)underwaterTreeView.SelectedNode.Tag;
int color = colorEntry.UnderwaterColor.ToArgb();
SetUpValueChanged(false);
@@ -194,6 +244,7 @@ namespace PckStudio.Forms.Editor
greenUpDown.Value = color >> 8 & 0xff;
blueUpDown.Value = color & 0xff;
pictureBox1.BackColor = Color.FromArgb(255, Color.FromArgb(0xff << 24 | color));
colorTextbox.Text = ColorTranslator.ToHtml(colorEntry.UnderwaterColor).TrimStart('#');
SetUpValueChanged(true);
}
@@ -201,6 +252,11 @@ namespace PckStudio.Forms.Editor
{
if (fogTreeView.SelectedNode.Tag == null)
return;
colorTreeView.SelectedNode = null;
waterTreeView.SelectedNode = null;
underwaterTreeView.SelectedNode = null;
var colorEntry = (ColorContainer.WaterColor)fogTreeView.SelectedNode.Tag;
int color = colorEntry.FogColor.ToArgb();
SetUpValueChanged(false);
@@ -210,38 +266,12 @@ namespace PckStudio.Forms.Editor
greenUpDown.Value = color >> 8 & 0xff;
blueUpDown.Value = color & 0xff;
pictureBox1.BackColor = Color.FromArgb(255, Color.FromArgb(0xff << 24 | color));
colorTextbox.Text = ColorTranslator.ToHtml(colorEntry.FogColor).TrimStart('#');
SetUpValueChanged(true);
}
private void saveToolStripMenuItem1_Click(object sender, EventArgs e)
{
List<string> PS4Biomes = new List<string>
{
"bamboo_jungle",
"bamboo_jungle_hills",
"mesa_mutated",
"mega_spruce_taiga_mutated",
"mega_taiga_mutated"
};
if (colourfile.WaterColors.Find(e => PS4Biomes.Contains(e.Name)) != null)
{
var result = MessageBox.Show(this, "Biomes exclusive to PS4 Edition v1.91 were found in the water section of this colour table. This will crash all other editions of the game and PS4 Edition v1.90 and below. Would you like to remove them?", "Potentially unsupported biomes found", MessageBoxButtons.YesNoCancel);
switch (result)
{
case DialogResult.Yes:
foreach (var col in colourfile.WaterColors.ToList())
{
if(PS4Biomes.Contains(col.Name)) colourfile.WaterColors.Remove(col);
}
break;
case DialogResult.No:
break;
default:
return;
}
}
_file.SetData(new COLFileWriter(colourfile));
DialogResult = DialogResult.OK;
@@ -315,49 +345,43 @@ namespace PckStudio.Forms.Editor
}
}
public bool IsValidHexString(string value)
{
return System.Text.RegularExpressions.Regex.IsMatch(value, @"\A\b[0-9a-fA-F]+\b\Z") && value.Length == 6;
}
private void colorBox_TextChanged(object sender, EventArgs e)
{
//TreeView tv = (TreeView)tabControl.SelectedTab.Controls[0];
//if (tv.SelectedNode == null || tv.SelectedNode.Tag == null)
// return;
//bool hasAlpha = tabControl.SelectedTab == waterTab;
//alphaUpDown.Enabled = hasAlpha;
//redUpDown.Value = StringToByteArrayFastest(colorTextbox.Text)[!hasAlpha ? 0 : 1];
//greenUpDown.Value = StringToByteArrayFastest(colorTextbox.Text)[!hasAlpha ? 1 : 2];
//blueUpDown.Value = StringToByteArrayFastest(colorTextbox.Text)[!hasAlpha ? 2 : 3];
//int color = 0; /*colorEntry.color*/;
// int argb = (int)((0xff000000u) | (color >> 24));
//colorTextbox.MaxLength = hasAlpha ? 8 : 6;
//alphaLabel.Visible = false;
//alphaUpDown.Visible = false;
//if (hasAlpha)
//{
// alphaLabel.Visible = true;
// alphaUpDown.Visible = true;
// alphaUpDown.Value = StringToByteArrayFastest(colorTextbox.Text)[0];
// argb = color >> 24 | color << 8;
//}
//pictureBox1.BackColor = Color.FromArgb(argb);
if(IsValidHexString(colorTextbox.Text))
{
Color color = ColorTranslator.FromHtml("#" + colorTextbox.Text);
redUpDown.Value = color.R;
greenUpDown.Value = color.G;
blueUpDown.Value = color.B;
}
}
private void color_ValueChanged(object sender, EventArgs e)
{
Color fixed_color = new Color();
Color color = Color.FromArgb(tabControl.SelectedTab == waterTab ? (int)alphaUpDown.Value : 255, (int)redUpDown.Value, (int)greenUpDown.Value, (int)blueUpDown.Value);
if (tabControl.SelectedTab == colorsTab)
{
{
var colorEntry = (ColorContainer.Color)colorTreeView.SelectedNode.Tag;
colorEntry.ColorPallette = fixed_color = Color.FromArgb(255, (int)redUpDown.Value, (int)greenUpDown.Value, (int)blueUpDown.Value);
colorEntry.ColorPallette = color;
}
else if (tabControl.SelectedTab != null && waterTreeView.SelectedNode != null) // just in case
{
var colorEntry = (ColorContainer.WaterColor)waterTreeView.SelectedNode.Tag;
fixed_color = Color.FromArgb(tabControl.SelectedTab == waterTab ? (int)alphaUpDown.Value : 255, (int)redUpDown.Value, (int)greenUpDown.Value, (int)blueUpDown.Value);
if (tabControl.SelectedTab == waterTab) colorEntry.SurfaceColor = fixed_color;
else if (tabControl.SelectedTab == underwaterTab) colorEntry.UnderwaterColor = fixed_color;
else colorEntry.FogColor = fixed_color;
else
{
var waterColorEntry = (tabControl.SelectedTab.Controls[0] as TreeView).SelectedNode.Tag as ColorContainer.WaterColor;
if (tabControl.SelectedTab == waterTab) waterColorEntry.SurfaceColor = color;
else if (tabControl.SelectedTab == underwaterTab) waterColorEntry.UnderwaterColor = color;
else waterColorEntry.FogColor = color;
}
pictureBox1.BackColor = fixed_color;
pictureBox1.BackColor = color;
colorTextbox.Text = ColorTranslator.ToHtml(color).TrimStart('#');
}
private void setColorBtn_Click(object sender, EventArgs e)
@@ -366,7 +390,7 @@ namespace PckStudio.Forms.Editor
colorPick.AllowFullOpen = true;
colorPick.AnyColor = true;
colorPick.SolidColorOnly = tabControl.SelectedTab == colorsTab;
if (colorPick.ShowDialog() != DialogResult.OK) return;
if (colorPick.ShowDialog(this) != DialogResult.OK) return;
pictureBox1.BackColor = colorPick.Color;
if (tabControl.SelectedTab == waterTab && waterTreeView.SelectedNode != null &&
waterTreeView.SelectedNode.Tag != null && waterTreeView.SelectedNode.Tag is ColorContainer.WaterColor)
@@ -412,56 +436,48 @@ namespace PckStudio.Forms.Editor
private void alpha_ValueChanged(object sender, EventArgs e)
{
if (tabControl.SelectedTab == waterTab && waterTreeView.SelectedNode != null &&
waterTreeView.SelectedNode.Tag != null && waterTreeView.SelectedNode.Tag is ColorContainer.WaterColor)
{
var colorEntry = (ColorContainer.WaterColor)waterTreeView.SelectedNode.Tag;
pictureBox1.BackColor = colorEntry.SurfaceColor = Color.FromArgb((int)alphaUpDown.Value, colorEntry.SurfaceColor);
}
var colorEntry = (ColorContainer.WaterColor)waterTreeView.SelectedNode.Tag;
pictureBox1.BackColor = colorEntry.SurfaceColor = Color.FromArgb((int)alphaUpDown.Value, colorEntry.SurfaceColor);
}
private void restoreOriginalColorToolStripMenuItem_Click(object sender, EventArgs e)
{
SetUpValueChanged(false);
if (tabControl.SelectedTab == colorsTab && colorTreeView.SelectedNode != null &&
colorTreeView.SelectedNode.Tag != null && colorTreeView.SelectedNode.Tag is ColorContainer.Color colorInfoD)
{
var entry = default_colourfile.Colors.Find(color => color.Name == colorTreeView.SelectedNode.Text);
colorInfoD.ColorPallette = entry.ColorPallette;
UpdateDisplayColor(entry.ColorPallette);
}
else if (tabControl.SelectedTab == waterTab && waterTreeView.SelectedNode != null &&
waterTreeView.SelectedNode.Tag != null && waterTreeView.SelectedNode.Tag is ColorContainer.WaterColor colorInfo)
{
var entry = default_colourfile.WaterColors.Find(color => color.Name == waterTreeView.SelectedNode.Text);
colorInfo.SurfaceColor = entry.SurfaceColor;
UpdateDisplayColor(entry.SurfaceColor);
}
else if (tabControl.SelectedTab == underwaterTab && underwaterTreeView.SelectedNode != null &&
underwaterTreeView.SelectedNode.Tag != null && underwaterTreeView.SelectedNode.Tag is ColorContainer.WaterColor colorInfoB)
{
var entry = default_colourfile.WaterColors.Find(color => color.Name == underwaterTreeView.SelectedNode.Text);
colorInfoB.UnderwaterColor = entry.UnderwaterColor;
UpdateDisplayColor(entry.UnderwaterColor);
}
else if (tabControl.SelectedTab == fogTab && fogTreeView.SelectedNode != null &&
fogTreeView.SelectedNode.Tag != null && fogTreeView.SelectedNode.Tag is ColorContainer.WaterColor colorInfoC)
{
var entry = default_colourfile.WaterColors.Find(color => color.Name == fogTreeView.SelectedNode.Text);
colorInfoC.FogColor = entry.FogColor;
UpdateDisplayColor(entry.FogColor);
}
SetUpValueChanged(true);
}
if(tabControl.SelectedTab is var tab && tab != null)
{
TreeNode node = (tabControl.SelectedTab.Controls[0] as TreeView).SelectedNode;
private void UpdateDisplayColor(Color color)
{
alphaUpDown.Value = color.A;
redUpDown.Value = color.R;
greenUpDown.Value = color.G;
blueUpDown.Value = color.B;
pictureBox1.BackColor = Color.FromArgb(tabControl.SelectedTab == colorsTab ? 0xFF : color.A, color);
}
Color color = Color.Empty;
if (tab == colorsTab)
{
color = default_colourfile.Colors.Find(color => color.Name == node.Text).ColorPallette;
if (color.IsEmpty) return;
colorTextbox.Text = ColorTranslator.ToHtml(color).TrimStart('#');
}
else
{
var WaterEntry = default_colourfile.WaterColors.Find(color => color.Name == node.Text);
if (WaterEntry == null) return;
color =
tab == waterTab ? WaterEntry.SurfaceColor :
tab == underwaterTab ? WaterEntry.UnderwaterColor : WaterEntry.FogColor;
if (tab == waterTab)
{
alphaUpDown.Value = color.A;
}
redUpDown.Value = color.R;
greenUpDown.Value = color.G;
blueUpDown.Value = color.B;
}
pictureBox1.BackColor = Color.FromArgb(tab == colorsTab ? 0xFF : color.A, color);
}
}
private void metroTextBox1_TextChanged(object sender, EventArgs e)
{
@@ -536,66 +552,12 @@ namespace PckStudio.Forms.Editor
private void copyColorToolStripMenuItem_Click(object sender, EventArgs e)
{
var colorToCopy = new ColorContainer.Color()
{
Name = "",
ColorPallette = new Color()
};
if (tabControl.SelectedTab == colorsTab && colorTreeView.SelectedNode.Tag is ColorContainer.Color colorInfoD)
{
colorToCopy = colorInfoD;
}
else if (tabControl.SelectedTab == waterTab && waterTreeView.SelectedNode.Tag is ColorContainer.WaterColor colorInfo)
{
colorToCopy.ColorPallette = colorInfo.SurfaceColor;
}
else if (tabControl.SelectedTab == underwaterTab && underwaterTreeView.SelectedNode.Tag is ColorContainer.WaterColor colorInfoB)
{
colorToCopy.ColorPallette = colorInfoB.UnderwaterColor;
}
else if (tabControl.SelectedTab == fogTab && fogTreeView.SelectedNode.Tag is ColorContainer.WaterColor colorInfoC)
{
colorToCopy.ColorPallette = colorInfoC.FogColor;
}
clipboard_color = colorToCopy;
clipboard_color = colorTextbox.Text;
}
private void pasteColorToolStripMenuItem_Click(object sender, EventArgs e)
{
if (clipboard_color == null) return;
SetUpValueChanged(false);
Color fixed_color = Color.FromArgb(255, Color.FromArgb(0xff, clipboard_color.ColorPallette));
if (tabControl.SelectedTab == waterTab && waterTreeView.SelectedNode != null &&
waterTreeView.SelectedNode.Tag != null && waterTreeView.SelectedNode.Tag is ColorContainer.WaterColor)
{
var colorEntry = ((ColorContainer.WaterColor)waterTreeView.SelectedNode.Tag);
colorEntry.SurfaceColor = fixed_color;
}
else if (tabControl.SelectedTab == underwaterTab && underwaterTreeView.SelectedNode != null &&
underwaterTreeView.SelectedNode.Tag != null && underwaterTreeView.SelectedNode.Tag is ColorContainer.WaterColor)
{
var colorEntry = ((ColorContainer.WaterColor)underwaterTreeView.SelectedNode.Tag);
colorEntry.UnderwaterColor = fixed_color;
}
else if (tabControl.SelectedTab == fogTab && fogTreeView.SelectedNode != null &&
fogTreeView.SelectedNode.Tag != null && fogTreeView.SelectedNode.Tag is ColorContainer.WaterColor)
{
var colorEntry = ((ColorContainer.WaterColor)fogTreeView.SelectedNode.Tag);
colorEntry.FogColor = fixed_color;
}
else if (tabControl.SelectedTab == colorsTab && colorTreeView.SelectedNode != null &&
colorTreeView.SelectedNode.Tag != null && colorTreeView.SelectedNode.Tag is ColorContainer.Color)
{
var colorEntry = ((ColorContainer.Color)colorTreeView.SelectedNode.Tag);
colorEntry.ColorPallette = fixed_color;
}
redUpDown.Value = clipboard_color.ColorPallette.R;
greenUpDown.Value = clipboard_color.ColorPallette.G;
blueUpDown.Value = clipboard_color.ColorPallette.B;
pictureBox1.BackColor = fixed_color;
SetUpValueChanged(true);
colorTextbox.Text = clipboard_color;
}
private void COLEditor_FormClosing(object sender, FormClosingEventArgs e)
@@ -605,5 +567,34 @@ namespace PckStudio.Forms.Editor
saveToolStripMenuItem1_Click(sender, EventArgs.Empty);
}
}
private void colorTextbox_KeyPress(object sender, KeyPressEventArgs e)
{
string hexCheck = "0123456789abcdefABCDEF\b";
e.Handled = !hexCheck.Contains(e.KeyChar);
}
private void stripPS4BiomesToolStripMenuItem_Click(object sender, EventArgs e)
{
if(colourfile.WaterColors.Count > 0)
{
List<string> PS4Biomes = new List<string>
{
"bamboo_jungle",
"bamboo_jungle_hills",
"mesa_mutated",
"mega_spruce_taiga_mutated",
"mega_taiga_mutated"
};
foreach (var col in colourfile.WaterColors.ToList())
{
if (PS4Biomes.Contains(col.Name)) colourfile.WaterColors.Remove(col);
}
SetUpTable(false);
}
}
}
}

View File

@@ -117,18 +117,210 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="&gt;&gt;metroTextBox1.Name" xml:space="preserve">
<value>metroTextBox1</value>
</data>
<data name="&gt;&gt;metroTextBox1.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroTextBox, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroTextBox1.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;metroTextBox1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;metroLabel2.Name" xml:space="preserve">
<value>metroLabel2</value>
</data>
<data name="&gt;&gt;metroLabel2.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroLabel2.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;metroLabel2.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;setColorBtn.Name" xml:space="preserve">
<value>setColorBtn</value>
</data>
<data name="&gt;&gt;setColorBtn.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroButton, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;setColorBtn.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;setColorBtn.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;blueUpDown.Name" xml:space="preserve">
<value>blueUpDown</value>
</data>
<data name="&gt;&gt;blueUpDown.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;blueUpDown.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;blueUpDown.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;greenUpDown.Name" xml:space="preserve">
<value>greenUpDown</value>
</data>
<data name="&gt;&gt;greenUpDown.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;greenUpDown.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;greenUpDown.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="&gt;&gt;redUpDown.Name" xml:space="preserve">
<value>redUpDown</value>
</data>
<data name="&gt;&gt;redUpDown.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;redUpDown.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;redUpDown.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="&gt;&gt;alphaUpDown.Name" xml:space="preserve">
<value>alphaUpDown</value>
</data>
<data name="&gt;&gt;alphaUpDown.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;alphaUpDown.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;alphaUpDown.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="&gt;&gt;alphaLabel.Name" xml:space="preserve">
<value>alphaLabel</value>
</data>
<data name="&gt;&gt;alphaLabel.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;alphaLabel.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;alphaLabel.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="&gt;&gt;blueLabel.Name" xml:space="preserve">
<value>blueLabel</value>
</data>
<data name="&gt;&gt;blueLabel.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;blueLabel.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;blueLabel.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="&gt;&gt;greenLabel.Name" xml:space="preserve">
<value>greenLabel</value>
</data>
<data name="&gt;&gt;greenLabel.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;greenLabel.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;greenLabel.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="&gt;&gt;redLabel.Name" xml:space="preserve">
<value>redLabel</value>
</data>
<data name="&gt;&gt;redLabel.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;redLabel.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;redLabel.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="&gt;&gt;colorTextbox.Name" xml:space="preserve">
<value>colorTextbox</value>
</data>
<data name="&gt;&gt;colorTextbox.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroTextBox, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;colorTextbox.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;colorTextbox.ZOrder" xml:space="preserve">
<value>13</value>
</data>
<data name="&gt;&gt;metroLabel1.Name" xml:space="preserve">
<value>metroLabel1</value>
</data>
<data name="&gt;&gt;metroLabel1.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroLabel1.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;metroLabel1.ZOrder" xml:space="preserve">
<value>14</value>
</data>
<data name="&gt;&gt;pictureBox1.Name" xml:space="preserve">
<value>pictureBox1</value>
</data>
<data name="&gt;&gt;pictureBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox1.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
<value>15</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="metroPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="metroPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 60</value>
</data>
<data name="metroPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>612, 523</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="metroPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;metroPanel1.Name" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;metroPanel1.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroPanel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroPanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;metroPanel1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="resource.Image" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="resource.Location" type="System.Drawing.Point, System.Drawing">
<value>113, 1</value>
</data>
<data name="resource.Size" type="System.Drawing.Size, System.Drawing">
<value>21, 21</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="resource.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
@@ -298,16 +490,16 @@
<value>True</value>
</data>
<data name="alphaLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>367, 320</value>
<value>342, 320</value>
</data>
<data name="alphaLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>21, 19</value>
<value>46, 19</value>
</data>
<data name="alphaLabel.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
</data>
<data name="alphaLabel.Text" xml:space="preserve">
<value>A:</value>
<value>Alpha:</value>
</data>
<data name="alphaLabel.Visible" type="System.Boolean, mscorlib">
<value>False</value>
@@ -328,16 +520,16 @@
<value>True</value>
</data>
<data name="blueLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>368, 395</value>
<value>351, 397</value>
</data>
<data name="blueLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>20, 19</value>
<value>37, 19</value>
</data>
<data name="blueLabel.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="blueLabel.Text" xml:space="preserve">
<value>B:</value>
<value>Blue:</value>
</data>
<data name="&gt;&gt;blueLabel.Name" xml:space="preserve">
<value>blueLabel</value>
@@ -355,16 +547,16 @@
<value>True</value>
</data>
<data name="greenLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>367, 371</value>
<value>341, 371</value>
</data>
<data name="greenLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>21, 19</value>
<value>47, 19</value>
</data>
<data name="greenLabel.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="greenLabel.Text" xml:space="preserve">
<value>G:</value>
<value>Green:</value>
</data>
<data name="&gt;&gt;greenLabel.Name" xml:space="preserve">
<value>greenLabel</value>
@@ -382,16 +574,16 @@
<value>True</value>
</data>
<data name="redLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>368, 345</value>
<value>353, 345</value>
</data>
<data name="redLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>20, 19</value>
<value>35, 19</value>
</data>
<data name="redLabel.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="redLabel.Text" xml:space="preserve">
<value>R:</value>
<value>Red:</value>
</data>
<data name="&gt;&gt;redLabel.Name" xml:space="preserve">
<value>redLabel</value>
@@ -448,16 +640,16 @@
<value>True</value>
</data>
<data name="metroLabel1.Location" type="System.Drawing.Point, System.Drawing">
<value>342, 423</value>
<value>354, 423</value>
</data>
<data name="metroLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>46, 19</value>
<value>34, 19</value>
</data>
<data name="metroLabel1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="metroLabel1.Text" xml:space="preserve">
<value>Color:</value>
<value>Hex:</value>
</data>
<data name="&gt;&gt;metroLabel1.Name" xml:space="preserve">
<value>metroLabel1</value>
@@ -492,142 +684,12 @@
<data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
<value>15</value>
</data>
<data name="metroPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="metroPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 60</value>
</data>
<data name="metroPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>612, 523</value>
</data>
<data name="metroPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;metroPanel1.Name" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;metroPanel1.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroPanel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroPanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;metroPanel1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="menuStrip.AutoSize" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="saveToolStripMenuItem1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAADfSURBVDhPYxg8
QLt++3yTGbf/Fm599P/Nh49wfPXxq/+rTt37f+Dak/8gOSBgAGEMANIMxGBFyAasPf/0v8GE8//z1t8C
y4HU4DIALIluwLpLL+HiMANAGKoNAWASCavv/n/57gPcgOvP3oENOXj7NViOoAFGU6791+k4ghWD5Aga
QCyGakMAkODcU89R/I8Ng9TgNADk14dPn/8/c+kqVgySgwUqVBsCwAx49urN/zsPHmPFIDmaGvAXJInN
38gYasBfqDYE0K7dOn/Wvut/sfkdGYPUgJI9VNuAAwYGAGn6yvdevWgPAAAAAElFTkSuQmCC
</value>
</data>
<data name="saveToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>98, 22</value>
</data>
<data name="saveToolStripMenuItem1.Text" xml:space="preserve">
<value>Save</value>
</data>
<data name="fileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 20</value>
</data>
<data name="fileToolStripMenuItem.Text" xml:space="preserve">
<value>File</value>
</data>
<data name="TU12ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>414, 22</value>
</data>
<data name="TU12ToolStripMenuItem.Text" xml:space="preserve">
<value>TU12 (360)</value>
</data>
<data name="TU13ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>414, 22</value>
</data>
<data name="TU13ToolStripMenuItem.Text" xml:space="preserve">
<value>TU13/1.00 (360/PS3)</value>
</data>
<data name="TU14ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>414, 22</value>
</data>
<data name="TU14ToolStripMenuItem.Text" xml:space="preserve">
<value>TU14/1.04 (360/PS3)</value>
</data>
<data name="TU19ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>414, 22</value>
</data>
<data name="TU19ToolStripMenuItem.Text" xml:space="preserve">
<value>TU19/1.12/CU7 (360/PS3-4-Vita/XONE)</value>
</data>
<data name="TU31ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>414, 22</value>
</data>
<data name="TU31ToolStripMenuItem.Text" xml:space="preserve">
<value>TU31/1.22/CU19 (360/PS3-4-Vita/XONE)</value>
</data>
<data name="TU32ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>414, 22</value>
</data>
<data name="TU32ToolStripMenuItem.Text" xml:space="preserve">
<value>TU32/1.24/CU20/P3 (360/PS3-4-Vita/XONE/WIIU)</value>
</data>
<data name="TU43ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>414, 22</value>
</data>
<data name="TU43ToolStripMenuItem.Text" xml:space="preserve">
<value>TU43/1.35/CU32/P12 (360/PS3-4-Vita/XONE/WIIU)</value>
</data>
<data name="TU46ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>414, 22</value>
</data>
<data name="TU46ToolStripMenuItem.Text" xml:space="preserve">
<value>TU46/1.38/CU36/P15 (360/PS3-4-Vita/XONE/WIIU)</value>
</data>
<data name="TU51ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>414, 22</value>
</data>
<data name="TU51ToolStripMenuItem.Text" xml:space="preserve">
<value>TU51/1.44/CU41/P20 (360/PS3-4-Vita/XONE/WIIU)</value>
</data>
<data name="TU53ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>414, 22</value>
</data>
<data name="TU53ToolStripMenuItem.Text" xml:space="preserve">
<value>TU53/1.49/CU43/P23/1.0.3 (360/PS3-4-Vita/XONE/WIIU/SWITCH)</value>
</data>
<data name="TU54ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>414, 22</value>
</data>
<data name="TU54ToolStripMenuItem.Text" xml:space="preserve">
<value>TU54/1.52/CU44/P24/1.0.4 (360/PS3-4-Vita/XONE/WIIU/SWITCH)</value>
</data>
<data name="TU69ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>414, 22</value>
</data>
<data name="TU69ToolStripMenuItem.Text" xml:space="preserve">
<value>TU69/1.76/P38 (360/PS3-4-Vita/WIIU)</value>
</data>
<data name="_1_9_1ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>414, 22</value>
</data>
<data name="_1_9_1ToolStripMenuItem.Text" xml:space="preserve">
<value>1.91 (PS4)</value>
</data>
<data name="targetUpdateToolToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>117, 20</value>
</data>
<data name="targetUpdateToolToolStripMenuItem.Text" xml:space="preserve">
<value>Target Update Tool</value>
</data>
<data name="menuStrip.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 60</value>
</data>
@@ -652,29 +714,33 @@
<data name="&gt;&gt;menuStrip.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="fileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 20</value>
</data>
<data name="fileToolStripMenuItem.Text" xml:space="preserve">
<value>File</value>
</data>
<data name="saveToolStripMenuItem1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAADdSURBVDhPzZJB
CoJQEIa9jy0iPFAnCDpAtG3ZooUE4b6oVtIuClpJIAgqZEVlKpqEHUAm5pGPmhTbRA18G//5P5iHgvA3
I7ZniiQ7aVM9QZzcOKYbwVDbw8I6A2YAICBvg2VJdtjSs2Cse1Dt6tCYbliGO0UCFlLBxAj590yA0D4X
1Ec7CK8JF9j+lUmWzoVlpYJaz4JKZ5ULZqWCT6F9Jhhowcv9eeBOoQBvPXoBrA0zF8yyR6V9LvCjGLYH
NxfMvipIMaQ3Ux6ClPYFsaUq/bmd0rspuIO/Pe3/bu5p+sr3gTvFEQAAAABJRU5ErkJggg==
</value>
</data>
<data name="saveToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
</data>
<data name="saveToolStripMenuItem1.Text" xml:space="preserve">
<value>Save</value>
</data>
<metadata name="ColorContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>125, 17</value>
</metadata>
<data name="restoreOriginalColorToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 22</value>
</data>
<data name="restoreOriginalColorToolStripMenuItem.Text" xml:space="preserve">
<value>Restore original color</value>
</data>
<data name="copyColorToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 22</value>
</data>
<data name="copyColorToolStripMenuItem.Text" xml:space="preserve">
<value>Copy Color</value>
</data>
<data name="pasteColorToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 22</value>
</data>
<data name="pasteColorToolStripMenuItem.Text" xml:space="preserve">
<value>Paste Color</value>
</data>
<data name="ColorContextMenu.Size" type="System.Drawing.Size, System.Drawing">
<value>187, 70</value>
<value>146, 70</value>
</data>
<data name="&gt;&gt;ColorContextMenu.Name" xml:space="preserve">
<value>ColorContextMenu</value>
@@ -733,6 +799,24 @@
<data name="&gt;&gt;waterTab.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="copyColorToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>134, 22</value>
</data>
<data name="copyColorToolStripMenuItem.Text" xml:space="preserve">
<value>Copy Color</value>
</data>
<data name="pasteColorToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>134, 22</value>
</data>
<data name="pasteColorToolStripMenuItem.Text" xml:space="preserve">
<value>Paste Color</value>
</data>
<data name="restoreOriginalColorToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 22</value>
</data>
<data name="restoreOriginalColorToolStripMenuItem.Text" xml:space="preserve">
<value>Restore Color</value>
</data>
<data name="underwaterTreeView.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
@@ -895,6 +979,102 @@
<data name="&gt;&gt;tabControl.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="toolsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 20</value>
</data>
<data name="toolsToolStripMenuItem.Text" xml:space="preserve">
<value>Tools</value>
</data>
<data name="targetUpdateToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
</data>
<data name="targetUpdateToolStripMenuItem.Text" xml:space="preserve">
<value>Target Update</value>
</data>
<data name="TU12ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>416, 22</value>
</data>
<data name="TU12ToolStripMenuItem.Text" xml:space="preserve">
<value>TU12 (360)</value>
</data>
<data name="TU13ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>416, 22</value>
</data>
<data name="TU13ToolStripMenuItem.Text" xml:space="preserve">
<value>TU13/1.00 (360/PS3)</value>
</data>
<data name="TU14ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>416, 22</value>
</data>
<data name="TU14ToolStripMenuItem.Text" xml:space="preserve">
<value>TU14/1.04 (360/PS3)</value>
</data>
<data name="TU19ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>416, 22</value>
</data>
<data name="TU19ToolStripMenuItem.Text" xml:space="preserve">
<value>TU19/1.12/CU7 (360/PS3-4-Vita/XONE)</value>
</data>
<data name="TU31ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>416, 22</value>
</data>
<data name="TU31ToolStripMenuItem.Text" xml:space="preserve">
<value>TU31/1.22/CU19 (360/PS3-4-Vita/XONE)</value>
</data>
<data name="TU32ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>416, 22</value>
</data>
<data name="TU32ToolStripMenuItem.Text" xml:space="preserve">
<value>TU32/1.24/CU20/P3 (360/PS3-4-Vita/XONE/WIIU)</value>
</data>
<data name="TU43ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>416, 22</value>
</data>
<data name="TU43ToolStripMenuItem.Text" xml:space="preserve">
<value>TU43/1.35/CU32/P12 (360/PS3-4-Vita/XONE/WIIU)</value>
</data>
<data name="TU46ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>416, 22</value>
</data>
<data name="TU46ToolStripMenuItem.Text" xml:space="preserve">
<value>TU46/1.38/CU36/P15 (360/PS3-4-Vita/XONE/WIIU)</value>
</data>
<data name="TU51ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>416, 22</value>
</data>
<data name="TU51ToolStripMenuItem.Text" xml:space="preserve">
<value>TU51/1.44/CU41/P20 (360/PS3-4-Vita/XONE/WIIU)</value>
</data>
<data name="TU53ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>416, 22</value>
</data>
<data name="TU53ToolStripMenuItem.Text" xml:space="preserve">
<value>TU53/1.49/CU43/P23/1.0.3 (360/PS3-4-Vita/XONE/WIIU/SWITCH)</value>
</data>
<data name="TU54ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>416, 22</value>
</data>
<data name="TU54ToolStripMenuItem.Text" xml:space="preserve">
<value>TU54/1.52/CU44/P24/1.0.4 (360/PS3-4-Vita/XONE/WIIU/SWITCH)</value>
</data>
<data name="TU69ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>416, 22</value>
</data>
<data name="TU69ToolStripMenuItem.Text" xml:space="preserve">
<value>TU69/1.76/P38 (360/PS3-4-Vita/WIIU)</value>
</data>
<data name="_1_9_1ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>416, 22</value>
</data>
<data name="_1_9_1ToolStripMenuItem.Text" xml:space="preserve">
<value>1.91 (PS4)</value>
</data>
<data name="stripPS4BiomesToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>213, 22</value>
</data>
<data name="stripPS4BiomesToolStripMenuItem.Text" xml:space="preserve">
<value>Remove PS4 Biome Colors</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -3431,10 +3611,34 @@
<data name="&gt;&gt;saveToolStripMenuItem1.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;targetUpdateToolToolStripMenuItem.Name" xml:space="preserve">
<value>targetUpdateToolToolStripMenuItem</value>
<data name="&gt;&gt;copyColorToolStripMenuItem.Name" xml:space="preserve">
<value>copyColorToolStripMenuItem</value>
</data>
<data name="&gt;&gt;targetUpdateToolToolStripMenuItem.Type" xml:space="preserve">
<data name="&gt;&gt;copyColorToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pasteColorToolStripMenuItem.Name" xml:space="preserve">
<value>pasteColorToolStripMenuItem</value>
</data>
<data name="&gt;&gt;pasteColorToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;restoreOriginalColorToolStripMenuItem.Name" xml:space="preserve">
<value>restoreOriginalColorToolStripMenuItem</value>
</data>
<data name="&gt;&gt;restoreOriginalColorToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolsToolStripMenuItem.Name" xml:space="preserve">
<value>toolsToolStripMenuItem</value>
</data>
<data name="&gt;&gt;toolsToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;targetUpdateToolStripMenuItem.Name" xml:space="preserve">
<value>targetUpdateToolStripMenuItem</value>
</data>
<data name="&gt;&gt;targetUpdateToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TU12ToolStripMenuItem.Name" xml:space="preserve">
@@ -3515,22 +3719,10 @@
<data name="&gt;&gt;_1_9_1ToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;restoreOriginalColorToolStripMenuItem.Name" xml:space="preserve">
<value>restoreOriginalColorToolStripMenuItem</value>
<data name="&gt;&gt;stripPS4BiomesToolStripMenuItem.Name" xml:space="preserve">
<value>stripPS4BiomesToolStripMenuItem</value>
</data>
<data name="&gt;&gt;restoreOriginalColorToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;copyColorToolStripMenuItem.Name" xml:space="preserve">
<value>copyColorToolStripMenuItem</value>
</data>
<data name="&gt;&gt;copyColorToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pasteColorToolStripMenuItem.Name" xml:space="preserve">
<value>pasteColorToolStripMenuItem</value>
</data>
<data name="&gt;&gt;pasteColorToolStripMenuItem.Type" xml:space="preserve">
<data name="&gt;&gt;stripPS4BiomesToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">

View File

@@ -35,71 +35,19 @@ namespace PckStudio.Forms.Editor
{
public partial class GameRuleFileEditor : MetroFramework.Forms.MetroForm
{
private PckFileData _pckfile;
private GameRuleFile _file;
private GameRuleFile.CompressionType compressionType;
private GameRuleFile.CompressionLevel compressionLevel;
private const string use_zlib = "Wii U, PS Vita";
private const string use_deflate = "PS3";
private const string use_xmem = "Xbox 360";
public GameRuleFile Result => _file;
public GameRuleFileEditor()
private GameRuleFileEditor()
{
InitializeComponent();
PromptForCompressionType();
saveToolStripMenuItem.Visible = !Settings.Default.AutoSaveChanges;
}
private void PromptForCompressionType()
public GameRuleFileEditor(GameRuleFile gameRuleFile) : this()
{
ItemSelectionPopUp dialog = new ItemSelectionPopUp(use_zlib, use_deflate, use_xmem);
dialog.LabelText = "Type";
dialog.ButtonText = "Ok";
if (dialog.ShowDialog() == DialogResult.OK)
{
switch(dialog.SelectedItem)
{
case use_zlib:
wiiUPSVitaToolStripMenuItem.Checked = true;
break;
case use_deflate:
pS3ToolStripMenuItem.Checked = true;
break;
case use_xmem:
xbox360ToolStripMenuItem.Checked = true;
break;
}
}
}
public GameRuleFileEditor(PckFileData file) : this()
{
_pckfile = file;
using (var stream = new MemoryStream(file.Data))
{
_file = OpenGameRuleFile(stream);
}
}
public GameRuleFileEditor(Stream stream) : this()
{
_file = OpenGameRuleFile(stream);
}
private GameRuleFile OpenGameRuleFile(Stream stream)
{
try
{
var reader = new GameRuleFileReader(compressionType);
return reader.FromStream(stream);
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
MessageBox.Show("Faild to open .grf/.grh file");
}
return default!;
_file = gameRuleFile;
}
private void OnLoad(object sender, EventArgs e)
@@ -169,11 +117,11 @@ namespace PckStudio.Forms.Editor
if (GrfTreeView.SelectedNode == null || !(GrfTreeView.SelectedNode.Tag is GameRuleFile.GameRule)) return;
var grfTag = GrfTreeView.SelectedNode.Tag as GameRuleFile.GameRule;
AddParameter prompt = new AddParameter();
if (prompt.ShowDialog() == DialogResult.OK)
if (prompt.ShowDialog(this) == DialogResult.OK)
{
if (grfTag.Parameters.ContainsKey(prompt.ParameterName))
{
MessageBox.Show("Can't add detail that already exists.", "Error");
MessageBox.Show(this, "Can't add detail that already exists.", "Error");
return;
}
grfTag.Parameters.Add(prompt.ParameterName, prompt.ParameterValue);
@@ -190,7 +138,7 @@ namespace PckStudio.Forms.Editor
ReloadParameterTreeView();
return;
}
MessageBox.Show("No Rule selected");
MessageBox.Show(this, "No Rule selected");
}
private void GrfDetailsTreeView_KeyDown(object sender, KeyEventArgs e)
@@ -205,7 +153,7 @@ namespace PckStudio.Forms.Editor
GrfParametersTreeView.SelectedNode is TreeNode paramNode && paramNode.Tag is KeyValuePair<string, string> param)
{
AddParameter prompt = new AddParameter(param.Key, param.Value, false);
if (prompt.ShowDialog() == DialogResult.OK)
if (prompt.ShowDialog(this) == DialogResult.OK)
{
rule.Parameters[prompt.ParameterName] = prompt.ParameterValue;
ReloadParameterTreeView();
@@ -227,9 +175,9 @@ namespace PckStudio.Forms.Editor
using (TextPrompt prompt = new TextPrompt())
{
prompt.OKButtonText = "Add";
if (MessageBox.Show($"Add Game Rule to {parentRule.Name}", "Attention",
if (MessageBox.Show(this, $"Add Game Rule to {parentRule.Name}", "Attention",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes &&
prompt.ShowDialog() == DialogResult.OK &&
prompt.ShowDialog(this) == DialogResult.OK &&
!string.IsNullOrWhiteSpace(prompt.NewText))
{
var tag = parentRule.AddRule(prompt.NewText);
@@ -264,80 +212,58 @@ namespace PckStudio.Forms.Editor
{
if (_file.Header.unknownData[3] != 0)
{
MessageBox.Show("World grf saving is currently unsupported");
MessageBox.Show(this, "World grf saving is currently unsupported");
return;
}
using (var stream = new MemoryStream())
{
try
{
_pckfile?.SetData(new GameRuleFileWriter(_file));
DialogResult = DialogResult.OK;
MessageBox.Show("Saved!");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
MessageBox.Show($"Failed to save grf file\n{ex.Message}", "Save Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
DialogResult = DialogResult.OK;
MessageBox.Show("Saved!");
}
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenFileDialog dialog = new OpenFileDialog();
dialog.Filter = "Game Rule File|*.grf";
PromptForCompressionType();
if (dialog.ShowDialog(this) == DialogResult.OK)
{
using (var fs = File.OpenRead(dialog.FileName))
{
_file = OpenGameRuleFile(fs);
ReloadGameRuleTree();
}
}
}
private void noneToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
if (sender is ToolStripRadioButtonMenuItem radioButton && radioButton.Checked)
compressionLevel = GameRuleFile.CompressionLevel.None;
_file.Header.CompressionLevel = GameRuleFile.CompressionLevel.None;
}
private void compressedToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
if (sender is ToolStripRadioButtonMenuItem radioButton && radioButton.Checked)
compressionLevel = GameRuleFile.CompressionLevel.Compressed;
_file.Header.CompressionLevel = GameRuleFile.CompressionLevel.Compressed;
}
private void compressedRLEToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
if (sender is ToolStripRadioButtonMenuItem radioButton && radioButton.Checked)
compressionLevel = GameRuleFile.CompressionLevel.CompressedRle;
_file.Header.CompressionLevel = GameRuleFile.CompressionLevel.CompressedRle;
}
private void compressedRLECRCToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
if (sender is ToolStripRadioButtonMenuItem radioButton && radioButton.Checked)
compressionLevel = GameRuleFile.CompressionLevel.CompressedRleCrc;
_file.Header.CompressionLevel = GameRuleFile.CompressionLevel.CompressedRleCrc;
}
private void wiiUPSVitaToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
if (sender is ToolStripRadioButtonMenuItem radioButton && radioButton.Checked)
compressionType = GameRuleFile.CompressionType.Zlib;
_file.Header.CompressionType = GameRuleFile.CompressionType.Zlib;
}
private void pS3ToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
if (sender is ToolStripRadioButtonMenuItem radioButton && radioButton.Checked)
compressionType = GameRuleFile.CompressionType.Deflate;
_file.Header.CompressionType = GameRuleFile.CompressionType.Deflate;
}
private void xbox360ToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
if (sender is ToolStripRadioButtonMenuItem radioButton && radioButton.Checked)
compressionType = GameRuleFile.CompressionType.XMem;
_file.Header.CompressionType = GameRuleFile.CompressionType.XMem;
}
private void GameRuleFileEditor_FormClosing(object sender, FormClosingEventArgs e)

View File

@@ -53,7 +53,7 @@ namespace PckStudio.Forms.Editor
if (node == null ||
!currentLoc.LocKeys.ContainsKey(node.Text))
{
MessageBox.Show("Selected Node does not seem to be in the loc file");
MessageBox.Show(this, "Selected Node does not seem to be in the loc file");
return;
}
ReloadTranslationTable();
@@ -65,7 +65,7 @@ namespace PckStudio.Forms.Editor
using (TextPrompt prompt = new TextPrompt())
{
prompt.OKButtonText = "Add";
if (prompt.ShowDialog() == DialogResult.OK &&
if (prompt.ShowDialog(this) == DialogResult.OK &&
!currentLoc.LocKeys.ContainsKey(prompt.NewText) &&
currentLoc.AddLocKey(prompt.NewText, ""))
{
@@ -87,7 +87,7 @@ namespace PckStudio.Forms.Editor
if (e.ColumnIndex != 1 ||
treeViewLocKeys.SelectedNode == null)
{
MessageBox.Show("something went wrong");
MessageBox.Show(this, "something went wrong");
return;
}
currentLoc.SetLocEntry(treeViewLocKeys.SelectedNode.Text, tbl.Rows[e.RowIndex][0].ToString(), tbl.Rows[e.RowIndex][1].ToString());
@@ -136,7 +136,7 @@ namespace PckStudio.Forms.Editor
{
string[] avalibleLang = GetAvailableLanguages().ToArray();
using (var dialog = new AddLanguage(avalibleLang))
if (dialog.ShowDialog() == DialogResult.OK)
if (dialog.ShowDialog(this) == DialogResult.OK)
{
currentLoc.AddLanguage(dialog.SelectedLanguage);
ReloadTranslationTable();

View File

@@ -12,6 +12,7 @@ using OMI.Formats.Material;
using OMI.Workers.Material;
using PckStudio.Internal;
using PckStudio.Extensions;
using PckStudio.Internal.Json;
namespace PckStudio.Forms.Editor
{
@@ -21,7 +22,7 @@ namespace PckStudio.Forms.Editor
private readonly PckFileData _file;
MaterialContainer materialFile;
private readonly JObject EntityJSONData = JObject.Parse(Properties.Resources.entityData);
private readonly List<EntityInfo> MaterialData = Entities.BehaviourInfos;
private bool showInvalidEntries;
@@ -36,23 +37,15 @@ namespace PckStudio.Forms.Editor
{
TreeNode EntryNode = new TreeNode(entry.Name);
EntryNode.ImageIndex = -1;
foreach (JObject content in EntityJSONData["materials"].Children())
{
var prop = content.Properties().FirstOrDefault(prop => prop.Name == entry.Name);
if (prop is JProperty)
{
EntryNode.Text = (string)prop.Value;
EntryNode.ImageIndex = EntityJSONData["materials"].Children().ToList().IndexOf(content);
break;
}
var material = MaterialData.Find(m => m.InternalName == entry.Name);
if(material != null)
{
EntryNode.Text = material.DisplayName;
EntryNode.ImageIndex = MaterialData.IndexOf(material);
EntryNode.Tag = entry;
}
EntryNode.Tag = entry;
// check for invalid material entry
if (EntryNode.ImageIndex == -1)
else
{
EntryNode.ImageIndex = 127; // icon for invalid entry
EntryNode.Text += " (Invalid)";
@@ -152,7 +145,7 @@ namespace PckStudio.Forms.Editor
{
var diag = new Additional_Popups.EntityForms.AddEntry("materials", ApplicationScope.EntityImages);
if (diag.ShowDialog() == DialogResult.OK)
if (diag.ShowDialog(this) == DialogResult.OK)
{
if (string.IsNullOrEmpty(diag.SelectedEntity)) return;
if (materialFile.FindAll(mat => mat.Name == diag.SelectedEntity).Count() > 0)
@@ -164,17 +157,11 @@ namespace PckStudio.Forms.Editor
TreeNode NewEntryNode = new TreeNode(NewEntry.Name);
NewEntryNode.Tag = NewEntry;
foreach (JObject content in EntityJSONData["materials"].Children())
{
var prop = content.Properties().FirstOrDefault(prop => prop.Name == NewEntry.Name);
if (prop is JProperty)
{
NewEntryNode.Text = (string)prop.Value;
NewEntryNode.ImageIndex = EntityJSONData["materials"].Children().ToList().IndexOf(content);
NewEntryNode.SelectedImageIndex = NewEntryNode.ImageIndex;
break;
}
}
var material = MaterialData.Find(m => m.InternalName == NewEntry.Name);
NewEntryNode.Text = material.DisplayName;
NewEntryNode.ImageIndex = MaterialData.IndexOf(material);
NewEntryNode.SelectedImageIndex = NewEntryNode.ImageIndex;
treeView1.Nodes.Add(NewEntryNode);
}
}

View File

@@ -31,7 +31,10 @@ using OMI.Workers.Color;
using PckStudio.Extensions;
using PckStudio.Helper;
using PckStudio.Internal;
using PckStudio.Internal.Deserializer;
using PckStudio.Internal.Json;
using PckStudio.Internal.Serializer;
namespace PckStudio.Forms.Editor
{
@@ -240,15 +243,18 @@ namespace PckStudio.Forms.Editor
if (animationButton.Enabled = _atlasType == "blocks" || _atlasType == "items")
{
PckFileData animationFile;
bool hasAnimation =
_pckFile.TryGetValue($"res/textures/{_atlasType}/{dataTile.Tile.InternalName}.png", PckFileType.TextureFile, out var animationFile);
_pckFile.TryGetValue($"res/textures/{_atlasType}/{dataTile.Tile.InternalName}.png", PckFileType.TextureFile, out animationFile) ||
_pckFile.TryGetValue($"res/textures/{_atlasType}/{dataTile.Tile.InternalName}.tga", PckFileType.TextureFile, out animationFile);
animationButton.Text = hasAnimation ? "Edit Animation" : "Create Animation";
if (playAnimationsToolStripMenuItem.Checked &&
hasAnimation &&
animationFile.Size > 0)
{
var animation = AnimationHelper.GetAnimationFromFile(animationFile);
var animation = animationFile.GetDeserializedData(AnimationDeserializer.DefaultDeserializer);
selectTilePictureBox.Start(animation);
}
}
@@ -513,7 +519,7 @@ namespace PckStudio.Forms.Editor
Title = "Select Texture"
};
if (fileDialog.ShowDialog() == DialogResult.OK)
if (fileDialog.ShowDialog(this) == DialogResult.OK)
{
var img = Image.FromFile(fileDialog.FileName);
SetTile(img);
@@ -532,15 +538,15 @@ namespace PckStudio.Forms.Editor
PckFileType.TextureFile
);
var animation = AnimationHelper.GetAnimationFromFile(file);
var animation = file.GetDeserializedData(AnimationDeserializer.DefaultDeserializer);
var animationEditor = new AnimationEditor(animation, _selectedTile.Tile.InternalName, GetBlendColor());
if (animationEditor.ShowDialog() != DialogResult.OK)
if (animationEditor.ShowDialog(this) != DialogResult.OK)
{
return;
}
AnimationHelper.SaveAnimationToFile(file, animation);
file.SetSerializedData(animationEditor.Result, AnimationSerializer.DefaultSerializer);
// so animations can automatically update upon saving
SelectedIndex = _selectedTile.Index;
}
@@ -552,7 +558,7 @@ namespace PckStudio.Forms.Editor
Filter = "Tile Texture|*.png",
FileName = _selectedTile.Tile.InternalName
};
if (saveFileDialog.ShowDialog() == DialogResult.OK)
if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
{
dataTile.Texture.Save(saveFileDialog.FileName, ImageFormat.Png);
}
@@ -614,7 +620,7 @@ namespace PckStudio.Forms.Editor
0x211d1d // Black
};
if (colorPick.ShowDialog() != DialogResult.OK) return;
if (colorPick.ShowDialog(this) != DialogResult.OK) return;
selectTilePictureBox.BlendColor = colorPick.Color;
selectTilePictureBox.Image = dataTile.Texture;

View File

@@ -51,19 +51,19 @@ namespace PckStudio.Popups
{
case 64:
anim.SetFlag(SkinAnimFlag.RESOLUTION_64x64, true);
MessageBox.Show("64x64 Skin Detected");
MessageBox.Show(this, "64x64 Skin Detected");
skinType = eSkinType._64x64;
break;
case 32:
anim.SetFlag(SkinAnimFlag.RESOLUTION_64x64 | SkinAnimFlag.SLIM_MODEL, false);
MessageBox.Show("64x32 Skin Detected");
MessageBox.Show(this, "64x32 Skin Detected");
skinType = eSkinType._64x32;
break;
default:
if (img.Width == img.Height)
{
anim.SetFlag(SkinAnimFlag.RESOLUTION_64x64, true);
MessageBox.Show("64x64 HD Skin Detected");
MessageBox.Show(this, "64x64 HD Skin Detected");
skinType = eSkinType._64x64HD;
break;
}
@@ -71,12 +71,12 @@ namespace PckStudio.Popups
if (img.Height == img.Width / 2)
{
anim.SetFlag(SkinAnimFlag.RESOLUTION_64x64 | SkinAnimFlag.SLIM_MODEL, false);
MessageBox.Show("64x32 HD Skin Detected");
MessageBox.Show(this, "64x32 HD Skin Detected");
skinType = eSkinType._64x32HD;
break;
}
MessageBox.Show("Not a Valid Skin File");
MessageBox.Show(this, "Not a Valid Skin File");
skinType = eSkinType.Invalid;
return;
}
@@ -145,12 +145,12 @@ namespace PckStudio.Popups
private void buttonSkin_Click(object sender, EventArgs e)
{
contextMenuSkin.Show(Location.X + buttonSkin.Location.X + 2, Location.Y + buttonSkin.Location.Y + buttonSkin.Size.Height);
contextMenuSkin.Show(this, Location.X + buttonSkin.Location.X + 2, Location.Y + buttonSkin.Location.Y + buttonSkin.Size.Height);
}
private void buttonCape_Click(object sender, EventArgs e)
{
contextMenuCape.Show(Location.X + buttonCape.Location.X + 2, Location.Y + buttonCape.Location.Y + buttonCape.Size.Height);
contextMenuCape.Show(this, Location.X + buttonCape.Location.X + 2, Location.Y + buttonCape.Location.Y + buttonCape.Size.Height);
}
private void replaceToolStripMenuItem_Click(object sender, EventArgs e)
@@ -170,6 +170,7 @@ namespace PckStudio.Popups
if (e.Button == MouseButtons.Right)
{
contextMenuSkin.Show(
this,
x: Location.X + skinPictureBox.Location.X,
y: Location.Y + skinPictureBox.Location.Y + skinPictureBox.Size.Height
);
@@ -205,6 +206,7 @@ namespace PckStudio.Popups
if (e.Button == MouseButtons.Right)
{
contextMenuCape.Show(
this,
x: Location.X + capePictureBox.Location.X,
y: Location.Y + capePictureBox.Location.Y + capePictureBox.Size.Height
);
@@ -220,7 +222,7 @@ namespace PckStudio.Popups
var img = Image.FromFile(ofd.FileName);
if (img.RawFormat != ImageFormat.Png && img.Width != img.Height * 2)
{
MessageBox.Show("Not a Valid Cape File");
MessageBox.Show(this, "Not a Valid Cape File");
return;
}
capePictureBox.Image = Image.FromFile(ofd.FileName);
@@ -237,7 +239,7 @@ namespace PckStudio.Popups
{
if (!int.TryParse(textSkinID.Text, out int _skinId))
{
MessageBox.Show("The Skin ID Must be a Unique 8 Digit Number Thats Not Already in Use", "Invalid Skin ID", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show(this, "The Skin ID Must be a Unique 8 Digit Number Thats Not Already in Use", "Invalid Skin ID", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
string skinId = _skinId.ToString("d08");
@@ -269,7 +271,7 @@ namespace PckStudio.Popups
cape.Filename = $"dlccape{skinId}.png";
skin.AddProperty("CAPEPATH", cape.Filename);
}
skin.SetData(skinPictureBox.Image, ImageFormat.Png);
skin.SetTexture(skinPictureBox.Image);
DialogResult = DialogResult.OK;
Close();
}
@@ -283,10 +285,10 @@ namespace PckStudio.Popups
private void CreateCustomModel_Click(object sender, EventArgs e)
{
//Prompt for skin model generator
if (MessageBox.Show("Create your own custom skin model?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) != DialogResult.Yes)
if (MessageBox.Show(this, "Create your own custom skin model?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) != DialogResult.Yes)
return;
skin.SetData(Resources.classic_template, ImageFormat.Png);
skin.SetTexture(Resources.classic_template);
using generateModel generate = new generateModel(skin);

View File

@@ -41,7 +41,7 @@ namespace PckStudio.Popups
DialogResult = DialogResult.OK;
return;
}
MessageBox.Show("Please select a filetype before applying");
MessageBox.Show(this, "Please select a filetype before applying");
}
private void applyBulkProperties(IReadOnlyCollection<PckFileData> files, int index)
@@ -73,10 +73,10 @@ namespace PckStudio.Popups
if (Enum.IsDefined(typeof(PckFileType), index))
{
MessageBox.Show($"Data added to {(PckFileType)index} entries");
MessageBox.Show(this, $"Data added to {(PckFileType)index} entries");
return;
}
MessageBox.Show("Data added to all entries");
MessageBox.Show(this, "Data added to all entries");
}
private void treeMeta_AfterSelect(object sender, TreeViewEventArgs e)

View File

@@ -1052,7 +1052,7 @@ namespace PckStudio.Forms
Bitmap bitmap = new Bitmap(uvPictureBox.Image, 64, 64);
using SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "PNG Image Files | *.png";
if (saveFileDialog.ShowDialog() == DialogResult.OK)
if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
{
bitmap.Save(saveFileDialog.FileName, ImageFormat.Png);
}
@@ -1066,7 +1066,7 @@ namespace PckStudio.Forms
openFileDialog.Filter = "PNG Image Files | *.png";
openFileDialog.Title = "Select Skin Texture";
if (openFileDialog.ShowDialog() == DialogResult.OK) // skins can only be a 1:1 ratio (base 64x64) or a 2:1 ratio (base 64x32)
if (openFileDialog.ShowDialog(this) == DialogResult.OK) // skins can only be a 1:1 ratio (base 64x64) or a 2:1 ratio (base 64x32)
{
using (var img = Image.FromFile(openFileDialog.FileName))
{
@@ -1117,7 +1117,7 @@ namespace PckStudio.Forms
private void listView1_DoubleClick(object sender, EventArgs e)
{
ColorDialog colorDialog = new ColorDialog();
if (colorDialog.ShowDialog() == DialogResult.OK)
if (colorDialog.ShowDialog(this) == DialogResult.OK)
listViewBoxes.SelectedItems[0].ForeColor = colorDialog.Color;
Rerender();
}
@@ -1175,7 +1175,7 @@ namespace PckStudio.Forms
{
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "Custom Skin Model File | *.CSM";
if (saveFileDialog.ShowDialog() != DialogResult.OK)
if (saveFileDialog.ShowDialog(this) != DialogResult.OK)
return;
string contents = "";
foreach (ListViewItem listViewItem in listViewBoxes.Items)
@@ -1199,7 +1199,7 @@ namespace PckStudio.Forms
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "Custom Skin Model File | *.CSM";
openFileDialog.Title = "Select Custom Skin Model File";
if (MessageBox.Show("Import custom model project file? Your current work will be lost!", "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) == DialogResult.Yes && openFileDialog.ShowDialog() == DialogResult.OK)
if (MessageBox.Show(this, "Import custom model project file? Your current work will be lost!", "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) == DialogResult.Yes && openFileDialog.ShowDialog(this) == DialogResult.OK)
{
listViewBoxes.Items.Clear();
modelBoxes.Clear();
@@ -1246,7 +1246,7 @@ namespace PckStudio.Forms
catch (Exception ex)
{
Console.WriteLine(ex.Message);
MessageBox.Show("Please Select a Part");
MessageBox.Show(this, "Please Select a Part");
}
}
@@ -1261,7 +1261,7 @@ namespace PckStudio.Forms
private void changeColorToolStripMenuItem_Click(object sender, EventArgs e)
{
ColorDialog colorDialog = new ColorDialog();
if (colorDialog.ShowDialog() == DialogResult.OK)
if (colorDialog.ShowDialog(this) == DialogResult.OK)
listViewBoxes.SelectedItems[0].ForeColor = colorDialog.Color;
Rerender();
}
@@ -1368,7 +1368,7 @@ namespace PckStudio.Forms
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "JSON Model File | *.JSON";
openFileDialog.Title = "Select JSON Model File";
if (MessageBox.Show("Import custom model project file? Your current work will be lost!", "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) == DialogResult.Yes && openFileDialog.ShowDialog() == DialogResult.OK)
if (MessageBox.Show(this, "Import custom model project file? Your current work will be lost!", "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) == DialogResult.Yes && openFileDialog.ShowDialog(this) == DialogResult.OK)
{
listViewBoxes.Items.Clear();
string str1 = JSONToCSM(openFileDialog.FileName);

View File

@@ -1,391 +0,0 @@
namespace PckStudio.Forms.Utilities
{
partial class PckCenterBeta
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PckCenterBeta));
this.metroTabControl1 = new MetroFramework.Controls.MetroTabControl();
this.metroTabPage1 = new MetroFramework.Controls.MetroTabPage();
this.metroPanel1 = new MetroFramework.Controls.MetroPanel();
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
this.VitaCheckBox = new MetroFramework.Controls.MetroCheckBox();
this.DownloadButton = new System.Windows.Forms.Button();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.CategoryComboBox = new MetroFramework.Controls.MetroComboBox();
this.OnlineTreeView = new System.Windows.Forms.TreeView();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.metroTabPage2 = new MetroFramework.Controls.MetroTabPage();
this.VitaCheckBox2 = new MetroFramework.Controls.MetroCheckBox();
this.DeleteLocalButton = new System.Windows.Forms.Button();
this.OpenFolderButton = new System.Windows.Forms.Button();
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.CategoryComboBoxLocal = new MetroFramework.Controls.MetroComboBox();
this.LocalTreeView = new System.Windows.Forms.TreeView();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.metroTabControl1.SuspendLayout();
this.metroTabPage1.SuspendLayout();
this.metroPanel1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.metroTabPage2.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.SuspendLayout();
//
// metroTabControl1
//
this.metroTabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.metroTabControl1.Controls.Add(this.metroTabPage1);
this.metroTabControl1.Controls.Add(this.metroTabPage2);
this.metroTabControl1.Location = new System.Drawing.Point(24, 64);
this.metroTabControl1.Name = "metroTabControl1";
this.metroTabControl1.SelectedIndex = 0;
this.metroTabControl1.Size = new System.Drawing.Size(767, 620);
this.metroTabControl1.Style = MetroFramework.MetroColorStyle.Silver;
this.metroTabControl1.TabIndex = 0;
this.metroTabControl1.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroTabControl1.UseSelectable = true;
this.metroTabControl1.SelectedIndexChanged += new System.EventHandler(this.metroTabControl1_SelectedIndexChanged);
//
// metroTabPage1
//
this.metroTabPage1.Controls.Add(this.metroPanel1);
this.metroTabPage1.Controls.Add(this.VitaCheckBox);
this.metroTabPage1.Controls.Add(this.DownloadButton);
this.metroTabPage1.Controls.Add(this.tableLayoutPanel1);
this.metroTabPage1.HorizontalScrollbarBarColor = true;
this.metroTabPage1.HorizontalScrollbarHighlightOnWheel = false;
this.metroTabPage1.HorizontalScrollbarSize = 10;
this.metroTabPage1.Location = new System.Drawing.Point(4, 38);
this.metroTabPage1.Name = "metroTabPage1";
this.metroTabPage1.Size = new System.Drawing.Size(759, 578);
this.metroTabPage1.TabIndex = 0;
this.metroTabPage1.Text = "Online";
this.metroTabPage1.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroTabPage1.VerticalScrollbarBarColor = true;
this.metroTabPage1.VerticalScrollbarHighlightOnWheel = false;
this.metroTabPage1.VerticalScrollbarSize = 10;
//
// metroPanel1
//
this.metroPanel1.Controls.Add(this.metroLabel1);
this.metroPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.metroPanel1.HorizontalScrollbarBarColor = true;
this.metroPanel1.HorizontalScrollbarHighlightOnWheel = false;
this.metroPanel1.HorizontalScrollbarSize = 10;
this.metroPanel1.Location = new System.Drawing.Point(252, 0);
this.metroPanel1.Name = "metroPanel1";
this.metroPanel1.Size = new System.Drawing.Size(507, 505);
this.metroPanel1.TabIndex = 6;
this.metroPanel1.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroPanel1.VerticalScrollbarBarColor = true;
this.metroPanel1.VerticalScrollbarHighlightOnWheel = false;
this.metroPanel1.VerticalScrollbarSize = 10;
//
// metroLabel1
//
this.metroLabel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.metroLabel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.metroLabel1.FontSize = MetroFramework.MetroLabelSize.Tall;
this.metroLabel1.FontWeight = MetroFramework.MetroLabelWeight.Bold;
this.metroLabel1.Location = new System.Drawing.Point(0, 0);
this.metroLabel1.Name = "metroLabel1";
this.metroLabel1.Size = new System.Drawing.Size(507, 505);
this.metroLabel1.TabIndex = 3;
this.metroLabel1.Text = "Pack Name: %n\r\nAuthor: %a\r\nDescription: %d";
this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroLabel1.WrapToLine = true;
//
// VitaCheckBox
//
this.VitaCheckBox.AutoSize = true;
this.VitaCheckBox.Location = new System.Drawing.Point(259, 511);
this.VitaCheckBox.Name = "VitaCheckBox";
this.VitaCheckBox.Size = new System.Drawing.Size(97, 15);
this.VitaCheckBox.Style = MetroFramework.MetroColorStyle.Silver;
this.VitaCheckBox.TabIndex = 5;
this.VitaCheckBox.Text = "Vita/PS4 PCKs";
this.VitaCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
this.VitaCheckBox.UseSelectable = true;
//
// DownloadButton
//
this.DownloadButton.BackColor = System.Drawing.Color.Purple;
this.DownloadButton.FlatAppearance.BorderSize = 0;
this.DownloadButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.DownloadButton.ForeColor = System.Drawing.Color.White;
this.DownloadButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.DownloadButton.Location = new System.Drawing.Point(259, 532);
this.DownloadButton.Name = "DownloadButton";
this.DownloadButton.Size = new System.Drawing.Size(169, 43);
this.DownloadButton.TabIndex = 4;
this.DownloadButton.Text = "DOWNLOAD TO COLLECTION";
this.DownloadButton.UseVisualStyleBackColor = false;
this.DownloadButton.Visible = false;
this.DownloadButton.Click += new System.EventHandler(this.DownloadButton_Click);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.CategoryComboBox, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.OnlineTreeView, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.pictureBox1, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Left;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 3;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20.24221F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.228374F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 73.52941F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(252, 578);
this.tableLayoutPanel1.TabIndex = 2;
//
// CategoryComboBox
//
this.CategoryComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.CategoryComboBox.FormattingEnabled = true;
this.CategoryComboBox.ItemHeight = 23;
this.CategoryComboBox.Location = new System.Drawing.Point(3, 119);
this.CategoryComboBox.Name = "CategoryComboBox";
this.CategoryComboBox.Size = new System.Drawing.Size(246, 29);
this.CategoryComboBox.Style = MetroFramework.MetroColorStyle.Silver;
this.CategoryComboBox.TabIndex = 6;
this.CategoryComboBox.Theme = MetroFramework.MetroThemeStyle.Light;
this.CategoryComboBox.UseSelectable = true;
this.CategoryComboBox.SelectedIndexChanged += new System.EventHandler(this.CategoryComboBox_SelectedIndexChanged);
//
// OnlineTreeView
//
this.OnlineTreeView.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.OnlineTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
this.OnlineTreeView.ForeColor = System.Drawing.Color.White;
this.OnlineTreeView.Location = new System.Drawing.Point(3, 155);
this.OnlineTreeView.Name = "OnlineTreeView";
this.OnlineTreeView.Size = new System.Drawing.Size(246, 420);
this.OnlineTreeView.TabIndex = 0;
this.OnlineTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnlineTreeView_AfterSelect);
//
// pictureBox1
//
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Right;
this.pictureBox1.Image = global::PckStudio.Properties.Resources.pckCenterHeader;
this.pictureBox1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.pictureBox1.Location = new System.Drawing.Point(3, 3);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(246, 110);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 4;
this.pictureBox1.TabStop = false;
//
// metroTabPage2
//
this.metroTabPage2.Controls.Add(this.VitaCheckBox2);
this.metroTabPage2.Controls.Add(this.DeleteLocalButton);
this.metroTabPage2.Controls.Add(this.OpenFolderButton);
this.metroTabPage2.Controls.Add(this.metroLabel2);
this.metroTabPage2.Controls.Add(this.tableLayoutPanel2);
this.metroTabPage2.HorizontalScrollbarBarColor = true;
this.metroTabPage2.HorizontalScrollbarHighlightOnWheel = false;
this.metroTabPage2.HorizontalScrollbarSize = 10;
this.metroTabPage2.Location = new System.Drawing.Point(4, 38);
this.metroTabPage2.Name = "metroTabPage2";
this.metroTabPage2.Size = new System.Drawing.Size(759, 578);
this.metroTabPage2.Style = MetroFramework.MetroColorStyle.Silver;
this.metroTabPage2.TabIndex = 1;
this.metroTabPage2.Text = "Local";
this.metroTabPage2.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroTabPage2.VerticalScrollbarBarColor = true;
this.metroTabPage2.VerticalScrollbarHighlightOnWheel = false;
this.metroTabPage2.VerticalScrollbarSize = 10;
//
// VitaCheckBox2
//
this.VitaCheckBox2.AutoSize = true;
this.VitaCheckBox2.Location = new System.Drawing.Point(258, 511);
this.VitaCheckBox2.Name = "VitaCheckBox2";
this.VitaCheckBox2.Size = new System.Drawing.Size(97, 15);
this.VitaCheckBox2.Style = MetroFramework.MetroColorStyle.Silver;
this.VitaCheckBox2.TabIndex = 9;
this.VitaCheckBox2.Text = "Vita/PS4 PCKs";
this.VitaCheckBox2.Theme = MetroFramework.MetroThemeStyle.Dark;
this.VitaCheckBox2.UseSelectable = true;
//
// DeleteLocalButton
//
this.DeleteLocalButton.BackColor = System.Drawing.Color.Crimson;
this.DeleteLocalButton.FlatAppearance.BorderSize = 0;
this.DeleteLocalButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.DeleteLocalButton.ForeColor = System.Drawing.Color.White;
this.DeleteLocalButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.DeleteLocalButton.Location = new System.Drawing.Point(387, 532);
this.DeleteLocalButton.Name = "DeleteLocalButton";
this.DeleteLocalButton.Size = new System.Drawing.Size(87, 43);
this.DeleteLocalButton.TabIndex = 8;
this.DeleteLocalButton.Text = "DELETE";
this.DeleteLocalButton.UseVisualStyleBackColor = false;
this.DeleteLocalButton.Visible = false;
this.DeleteLocalButton.Click += new System.EventHandler(this.DeleteLocalButton_Click);
//
// OpenFolderButton
//
this.OpenFolderButton.BackColor = System.Drawing.Color.SteelBlue;
this.OpenFolderButton.FlatAppearance.BorderSize = 0;
this.OpenFolderButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.OpenFolderButton.ForeColor = System.Drawing.Color.White;
this.OpenFolderButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.OpenFolderButton.Location = new System.Drawing.Point(258, 532);
this.OpenFolderButton.Name = "OpenFolderButton";
this.OpenFolderButton.Size = new System.Drawing.Size(123, 43);
this.OpenFolderButton.TabIndex = 7;
this.OpenFolderButton.Text = "OPEN FOLDER";
this.OpenFolderButton.UseVisualStyleBackColor = false;
this.OpenFolderButton.Visible = false;
this.OpenFolderButton.Click += new System.EventHandler(this.OpenFolderButton_Click);
//
// metroLabel2
//
this.metroLabel2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.metroLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.metroLabel2.FontSize = MetroFramework.MetroLabelSize.Tall;
this.metroLabel2.FontWeight = MetroFramework.MetroLabelWeight.Bold;
this.metroLabel2.Location = new System.Drawing.Point(252, 0);
this.metroLabel2.Name = "metroLabel2";
this.metroLabel2.Size = new System.Drawing.Size(507, 578);
this.metroLabel2.TabIndex = 3;
this.metroLabel2.Text = "Pack Name: %n\r\nAuthor: %a\r\nDescription: %d";
this.metroLabel2.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroLabel2.WrapToLine = true;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Controls.Add(this.CategoryComboBoxLocal, 0, 1);
this.tableLayoutPanel2.Controls.Add(this.LocalTreeView, 0, 2);
this.tableLayoutPanel2.Controls.Add(this.pictureBox2, 0, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Left;
this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 3;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20.24F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.23F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 73.53F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(252, 578);
this.tableLayoutPanel2.TabIndex = 5;
//
// CategoryComboBoxLocal
//
this.CategoryComboBoxLocal.Dock = System.Windows.Forms.DockStyle.Fill;
this.CategoryComboBoxLocal.FormattingEnabled = true;
this.CategoryComboBoxLocal.ItemHeight = 23;
this.CategoryComboBoxLocal.Location = new System.Drawing.Point(3, 119);
this.CategoryComboBoxLocal.Name = "CategoryComboBoxLocal";
this.CategoryComboBoxLocal.Size = new System.Drawing.Size(246, 29);
this.CategoryComboBoxLocal.Style = MetroFramework.MetroColorStyle.Silver;
this.CategoryComboBoxLocal.TabIndex = 10;
this.CategoryComboBoxLocal.Theme = MetroFramework.MetroThemeStyle.Light;
this.CategoryComboBoxLocal.UseSelectable = true;
this.CategoryComboBoxLocal.SelectedIndexChanged += new System.EventHandler(this.CategoryComboBoxLocal_SelectedIndexChanged);
//
// LocalTreeView
//
this.LocalTreeView.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.LocalTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
this.LocalTreeView.ForeColor = System.Drawing.Color.White;
this.LocalTreeView.Location = new System.Drawing.Point(3, 155);
this.LocalTreeView.Name = "LocalTreeView";
this.LocalTreeView.Size = new System.Drawing.Size(246, 420);
this.LocalTreeView.TabIndex = 0;
this.LocalTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.LocalTreeView_AfterSelect);
//
// pictureBox2
//
this.pictureBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
this.pictureBox2.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.pictureBox2.Location = new System.Drawing.Point(3, 3);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(246, 110);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox2.TabIndex = 4;
this.pictureBox2.TabStop = false;
//
// PckCenterBeta
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(814, 707);
this.Controls.Add(this.metroTabControl1);
this.Name = "PckCenterBeta";
this.Resizable = false;
this.Style = MetroFramework.MetroColorStyle.Silver;
this.Text = "Pck Center";
this.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroTabControl1.ResumeLayout(false);
this.metroTabPage1.ResumeLayout(false);
this.metroTabPage1.PerformLayout();
this.metroPanel1.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.metroTabPage2.ResumeLayout(false);
this.metroTabPage2.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.ResumeLayout(false);
}
#endregion
private MetroFramework.Controls.MetroTabControl metroTabControl1;
private MetroFramework.Controls.MetroTabPage metroTabPage1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.TreeView OnlineTreeView;
private MetroFramework.Controls.MetroLabel metroLabel1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button DownloadButton;
private MetroFramework.Controls.MetroTabPage metroTabPage2;
private System.Windows.Forms.Button DeleteLocalButton;
private System.Windows.Forms.Button OpenFolderButton;
private MetroFramework.Controls.MetroLabel metroLabel2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.TreeView LocalTreeView;
private MetroFramework.Controls.MetroCheckBox VitaCheckBox;
private MetroFramework.Controls.MetroCheckBox VitaCheckBox2;
private MetroFramework.Controls.MetroComboBox CategoryComboBox;
private MetroFramework.Controls.MetroPanel metroPanel1;
private MetroFramework.Controls.MetroComboBox CategoryComboBoxLocal;
}
}

View File

@@ -1,265 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Media.Imaging;
using MetroFramework.Forms;
using PckStudio.API.PCKCenter.model;
using PckStudio.API.PCKCenter;
namespace PckStudio.Forms.Utilities
{
public partial class PckCenterBeta : MetroForm
{
public PckCenterBeta()
{
InitializeComponent();
try
{
GetCategories();
CategoryComboBox.SelectedIndex = 0;
}
catch
{
}
}
public PCKCollections Collections = new PCKCollections();
public PCKCollectionsLocal LocalCollections = new PCKCollectionsLocal();
LocalActions LActions = new LocalActions();
string cache = Program.AppDataCache;
#region Functions
public void GetCategories()
{
CategoryComboBox.Items.Clear();
CategoryComboBoxLocal.Items.Clear();
switch (metroTabControl1.SelectedIndex)
{
case 0:
string[] Cats = Collections.GetCategories();
foreach (string cat in Cats)
{
CategoryComboBox.Items.Add(cat);
}
break;
case 1:
string[] CatsL = LocalCollections.GetLocalCategories(VitaCheckBox2.Checked);
foreach (string cat in CatsL)
{
CategoryComboBoxLocal.Items.Add(cat);
}
break;
}
}
public void LoadPacks()
{
OnlineTreeView.Nodes.Clear();
LocalTreeView.Nodes.Clear();
DownloadButton.Visible = false;
pictureBox1.Image = pictureBox2.Image = Properties.Resources.pckCenterHeader;
switch (metroTabControl1.SelectedIndex)
{
case 0:
PCKCenterJSON packs = Collections.GetPackDescs(CategoryComboBox.Text, VitaCheckBox.Checked);
Collections.CenterPacks = packs;
foreach (KeyValuePair<string, EntryInfo> entry in packs.Data)
{
TreeNode tn = new TreeNode(entry.Value.Name);
tn.Tag = entry.Key;
OnlineTreeView.Nodes.Add(tn);
}
break;
case 1:
PCKCenterJSON Localpacks = LocalCollections.GetLocalPackDescs(CategoryComboBoxLocal.Text, VitaCheckBox2.Checked);
LocalCollections.CenterPacks = Localpacks;
foreach (KeyValuePair<string, EntryInfo> entry in Localpacks.Data)
{
TreeNode tn = new TreeNode(entry.Value.Name);
tn.Tag = entry.Key;
LocalTreeView.Nodes.Add(tn);
}
break;
}
}
public bool IsPackLocal(int packID, bool isVita)
{
return File.Exists(cache + $"packs/{(isVita ? "vita" : "normal")}/pcks/" + packID + ".pck");
}
#endregion
#region Online
private void OnlineTreeView_AfterSelect(object sender, TreeViewEventArgs e)
{
try
{
EntryInfo EI = Collections.CenterPacks.Data[OnlineTreeView.SelectedNode.Tag.ToString()];
string nam = string.Format("Pack Name: {0}\npack ID: {1}\nAuthor: {2}\nDescription: {3}",
EI.Name, OnlineTreeView.SelectedNode.Tag.ToString(), EI.Author, EI.Description);
metroLabel1.Text = nam;
metroLabel1.AutoSize = false;
metroLabel1.WrapToLine = true;
pictureBox1.Image = Collections.GetPackImage(int.Parse(OnlineTreeView.SelectedNode.Tag.ToString()), VitaCheckBox.Checked);
if(!IsPackLocal(int.Parse(OnlineTreeView.SelectedNode.Tag.ToString()), VitaCheckBox.Checked))
DownloadButton.Visible = true;
else
DownloadButton.Visible = false;/**/
}
catch
{
}
}
private void CategoryComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
LoadPacks();
}
catch
{
}
}
private void DownloadButton_Click(object sender, EventArgs e)
{
try
{
Collections.TryDownloadPack(CategoryComboBox.Text, int.Parse(OnlineTreeView.SelectedNode.Tag.ToString()), VitaCheckBox.Checked);
MessageBox.Show("Download complete");/**/
}
catch
{
}
}
#endregion
#region Local
private void LocalTreeView_AfterSelect(object sender, TreeViewEventArgs e)
{
try
{
string nam = "Pack Name: %n\npack ID: %pid\nAuthor: %a\nDescription: %d";
EntryInfo EI = LocalCollections.CenterPacks.Data[LocalTreeView.SelectedNode.Tag.ToString()];
metroLabel2.Text = nam.Replace("%n", EI.Name).Replace("%a", EI.Author).Replace("%d", EI.Description).Replace("%pid", LocalTreeView.SelectedNode.Tag.ToString());
metroLabel2.AutoSize = false;
metroLabel2.WrapToLine = true;
pictureBox2.Image = LocalCollections.GetLocalPackImage(int.Parse(LocalTreeView.SelectedNode.Tag.ToString()), VitaCheckBox2.Checked);
OpenFolderButton.Visible = true;
DeleteLocalButton.Visible = true;
}
catch
{
}
}
private void CategoryComboBoxLocal_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
LoadPacks();
}
catch
{
}
}
private void metroTabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
GetCategories();
CategoryComboBoxLocal.SelectedIndex = 0;
}
catch
{
}
}
private void OpenFolderButton_Click(object sender, EventArgs e)
{
switch (VitaCheckBox2.Checked)
{
case true:
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo()
{
FileName = cache + "packs/vita/pcks",
UseShellExecute = true,
Verb = "open"
});
break;
case false:
Console.WriteLine(cache + "packs/normal/pcks/");
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo()
{
FileName = cache + "packs/normal/pcks/",
UseShellExecute = true,
Verb = "open"
});
break;
}
}
private void DeleteLocalButton_Click(object sender, EventArgs e)
{
EntryInfo EI = LocalCollections.CenterPacks.Data[LocalTreeView.SelectedNode.Tag.ToString()];
string PackID = LocalTreeView.SelectedNode.Tag.ToString();
LActions.Removepack(LocalCollections.CenterPacks, int.Parse(PackID));
metroLabel2.Text = "Pack Name: %n\npack ID: %pid\nAuthor: %a\nDescription: %d";
pictureBox2.Image.Dispose();
pictureBox2.Image = Properties.Resources.NoImageFound;
switch (VitaCheckBox2.Checked)
{
case true:
File.Delete(cache + "packs/vita/pcks/" + PackID + ".pck");
File.Delete(cache + "packs/vita/images/" + PackID + ".png");
break;
case false:
File.Delete(cache + "packs/normal/pcks/" + PackID + ".pck");
File.Delete(cache + "packs/normal/images/" + PackID + ".png");
break;
}
LocalTreeView.SelectedNode.Remove();
switch (LActions.SaveLocalJSON(LocalCollections.CenterPacks, CategoryComboBoxLocal.Text, VitaCheckBox2.Checked))
{
case false:
MessageBox.Show("Could not save JSON due to unknown error");
break;
}
}
#endregion
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,141 +0,0 @@

namespace PckStudio.Forms.Utilities
{
partial class TextureConverterUtility
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.listBox1 = new System.Windows.Forms.ListBox();
this.metroTextBox1 = new MetroFramework.Controls.MetroTextBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
this.SuspendLayout();
//
// listBox1
//
this.listBox1.FormattingEnabled = true;
this.listBox1.Location = new System.Drawing.Point(29, 64);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(288, 407);
this.listBox1.TabIndex = 0;
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
//
// metroTextBox1
//
//
//
//
this.metroTextBox1.CustomButton.Image = null;
this.metroTextBox1.CustomButton.Location = new System.Drawing.Point(266, 1);
this.metroTextBox1.CustomButton.Name = "";
this.metroTextBox1.CustomButton.Size = new System.Drawing.Size(21, 21);
this.metroTextBox1.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
this.metroTextBox1.CustomButton.TabIndex = 1;
this.metroTextBox1.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
this.metroTextBox1.CustomButton.UseSelectable = true;
this.metroTextBox1.CustomButton.Visible = false;
this.metroTextBox1.Lines = new string[] {
"//TEXT//"};
this.metroTextBox1.Location = new System.Drawing.Point(29, 502);
this.metroTextBox1.MaxLength = 32767;
this.metroTextBox1.Name = "metroTextBox1";
this.metroTextBox1.PasswordChar = '\0';
this.metroTextBox1.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.metroTextBox1.SelectedText = "";
this.metroTextBox1.SelectionLength = 0;
this.metroTextBox1.SelectionStart = 0;
this.metroTextBox1.ShortcutsEnabled = true;
this.metroTextBox1.Size = new System.Drawing.Size(288, 23);
this.metroTextBox1.TabIndex = 1;
this.metroTextBox1.Text = "//TEXT//";
this.metroTextBox1.UseSelectable = true;
this.metroTextBox1.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
this.metroTextBox1.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
//
// button1
//
this.button1.Location = new System.Drawing.Point(28, 531);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "Browse..";
this.button1.UseVisualStyleBackColor = true;
this.button1.Visible = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(242, 531);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 3;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// metroLabel1
//
this.metroLabel1.AutoSize = true;
this.metroLabel1.Location = new System.Drawing.Point(29, 477);
this.metroLabel1.Name = "metroLabel1";
this.metroLabel1.Size = new System.Drawing.Size(71, 19);
this.metroLabel1.TabIndex = 4;
this.metroLabel1.Text = "PackName";
this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// TextureConverterUtility
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(356, 577);
this.Controls.Add(this.metroLabel1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.metroTextBox1);
this.Controls.Add(this.listBox1);
this.Name = "TextureConverterUtility";
this.Resizable = false;
this.Style = MetroFramework.MetroColorStyle.Silver;
this.Text = "Texture Converter";
this.Theme = MetroFramework.MetroThemeStyle.Dark;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TextureConverterUtility_FormClosing);
this.Load += new System.EventHandler(this.TextureConverterUtility_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ListBox listBox1;
private MetroFramework.Controls.MetroTextBox metroTextBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private MetroFramework.Controls.MetroLabel metroLabel1;
}
}

View File

@@ -1,545 +0,0 @@
using System;
using System.IO;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;
using MetroFramework.Forms;
using PckStudio.Properties;
using OMI.Formats.Pck;
namespace PckStudio.Forms.Utilities
{
[Obsolete()]
public partial class TextureConverterUtility : MetroForm
{
public TextureConverterUtility(TreeView tv0, PckFile pck)
{
InitializeComponent();
TView = tv0;
Pck = pck;
}
string AppData = "";
string Packname = "";
bool ToPC = true;
PckFile Pck;
TreeView TView;
static string[,] ItemSheetArray =
{
{"leather_helmet","chainmail_helmet","iron_helmet","diamond_helmet","golden_helmet","flint_and_steel","flint","coal","string","wheat_seeds","apple","golden_apple","egg","sugar","snowball","elytra" },
{"leather_chestplate","chainmail_chestplate","iron_chestplate","diamond_chestplate","golden_chestplate","bow","brick","iron_ingot","feather","wheat","painting","sugarcane","bone","cake","slime_ball","broken_elytra" },
{"leather_leggings","chainmail_leggings","iron_leggings","diamond_leggings","golden_leggings","arrow","end_crystal","gold_ingot","gunpowder","bread","oak_sign","oak_door","iron_door","","fire_charge","chorus_fruit" },
{"leather_boots","chainmail_boots","iron_boots","diamond_boots","golden_boots","stick","compass_00","diamond","redstone","clay_ball","paper","book","map","pumpkin_seeds","melon_seeds","popped_chorus_fruit" },
{"wooden_sword","stone_sword","iron_sword","diamond_sword","golden_sword","fishing_rod","clock_00","bowl","mushroom_stew","glowstone_dust","bucket","water_bucket","lava_bucket","milk_bucket","ink_sac","gray_dye" },
{"wooden_shovel","stone_shovel","iron_shovel","diamond_shovel","golden_shovel","fishing_rod_cast","repeater","porkchop","cooked_porkchop","cod","cooked_cod","rotten_flesh","cookie","shears","red_dye","pink_dye" },
{"wooden_pickaxe","stone_pickaxe","iron_pickaxe","diamond_pickaxe","golden_pickaxe","bow_pulling_0","carrot_on_a_stick","leather","saddle","beef","cooked_beef","ender_pearl","blaze_rod","melon_slice","green_dye","lime_dye" },
{"wooden_axe","stone_axe","iron_axe","diamond_axe","golden_axe","bow_pulling_1","baked_potato","potato","carrot","chicken","cooked_chicken","ghast_tear","gold_nugget","nether_wart","cocoa_beans","yellow_dye" },
{"wooden_hoe","stone_hoe","iron_hoe","diamond_hoe","golden_hoe","bow_pulling_2","poisonous_potato","minecart","oak_boat","glistering_melon_slice","fermented_spider_eye","spider_eye","potion","potion_overlay","blue_dye","light_blue_dye" },
{"leather_helmet_overlay","spectral_arrow","iron_horse_armor","diamond_horse_armor","golden_horse_armor","comparator","golden_carrot","chest_minecart","pumpkin_pie","spawn_egg","splash_potion","ender_eye","cauldron","blaze_powder","purple_dye","magenta_dye" },
{"","tipped_arrow_base","dragon_breath","name_tag","lead","nether_brick","tropical_fish","furnace_minecart","charcoal","spawn_egg_overlay","","experience_bottle","brewing_stand","magma_cream","cyan_dye","orange_dye" },
{"leather_leggings_overlay","tipped_arrow_head","lingering_potion","barrier","mutton","rabbit","pufferfish","hopper_minecart","hopper","nether_star","emerald","writable_book","written_book","flower_pot","light_gray_dye","bone_meal" },
{"leather_boots_overlay","beetroot","beetroot_seeds","beetroot_soup","cooked_mutton","cooked_rabbit","salmon","tnt_minecart","armor_stand","firework_rocket","firework_star","firework_star_overlay","quartz","map","item_frame","enchanted_book" },
{"acacia_door","birch_door","dark_oak_door","jungle_door","spruce_door","rabbit_stew","cooked_salmon","command_block_minecart","acacia_boat","birch_boat","dark_oak_boat","jungle_boat","spruce_boat","prismarine_shard","prismarine_crystals","leather_horse_armor" },
{"structure_void","","totem_of_undying","shulker_shell","iron_nugget","rabbit_foot","rabbit_hide","","","","","","","","","dragon_fireball" },
{"music_disc_13","music_disc_cat","music_disc_blocks","music_disc_chirp","music_disc_far","music_disc_mall","music_disc_mellohi","music_disc_stal","music_disc_strad","music_disc_ward","music_disc_11","music_disc_wait","cod_bucket","salmon_bucket","pufferfish_bucket","tropical_fish_bucket" },
{"leather_horse_armor","","","","","","","kelp","dried_kelp","sea_pickle","nautilus_shell","heart_of_the_sea","turtle_helmet","scute","trident","phantom_membrane" }
};
static string[,] BlockSheetArray =
{
{"grass_block_top","stone","dirt","grass_block_side","oak_planks","smooth_stone_slab_side","smooth_stone","bricks","tnt_side","tnt_top","tnt_bottom","cobweb","poppy","dandelion","blue_concrete","oak_sapling" },
{"cobblestone","bedrock","sand","gravel","oak_log","oak_log_top","iron_block","gold_block","diamond_block","emerald_block","redstone_block","dropper_front","red_mushroom","brown_mushroom","jungle_sapling","red_concrete" },
{"gold_ore","iron_ore","coal_ore","bookshelf","mossy_cobblestone","obsidian","grass_block_side_overlay","grass","dispenser_front_vertical","beacon","dropper_front_vertical","crafting_table_top","furnace_front","furnace_side","dispenser_front","red_concrete" },
{"sponge","glass","diamond_ore","redstone_ore","oak_leaves","black_concrete","stone_bricks","dead_bush","fern","daylight_detector_top","daylight_detector_side","crafting_table_side","crafting_table_front","furnace_front_on","furnace_top","spruce_sapling" },
{"white_wool","spawner","snow","ice","grass_block_snow","cactus_top","cactus_side","cactus_bottom","clay","sugar_cane","jukebox_side","jukebox_top","birch_leaves","mycelium_side","mycelium_top","birch_sapling" },
{"torch","oak_door_top","iron_door_top","ladder","oak_trapdoor","iron_bars","farmland_wet","farmland","wheat_stage0","wheat_stage1","wheat_stage2","wheat_stage3","wheat_stage4","wheat_stage5","wheat_stage6","wheat_stage7" },
{"lever","oak_door_bottom","iron_door_bottom","redstone_torch","mossy_stone_bricks","cracked_stone_bricks","pumpkin_top","netherrack","soul_sand","glowstone","piston_top_sticky","piston_top","piston_side","piston_bottom","piston_inner","pumpkin_stem" },
{"rail_corner","black_wool","gray_wool","redstone_torch_off","spruce_log","birch_log","pumpkin_side","carved_pumpkin","jack_o_lantern","cake_top","cake_side","cake_inner","cake_bottom","red_mushroom_block","brown_mushroom_block","attached_pumpkin_stem" },
{"rail","red_wool", "pink_wool","repeater","spruce_leaves","spruce_leaves","conduit","turtle_egg","melon_side","melon_top","cauldron_top","cauldron_inner","wet_sponge","mushroom_stem","mushroom_block_inside","vines" },
{"lapis_block","green_wool","lime_wool","repeater_on","glass_pane_top","debug","debug","turtle_egg_slightly_cracked","turtle_egg_very_cracked","jungle_log","cauldron_side","cauldron_bottom","brewing_stand_base","brewing_stand","end_portal_frame_top","end_portal_frame_side" },
{"lapis_ore","brown_wool","yellow_wool","powered_rail","redstone_dust_dot","redstone_dust_line0","enchanting_table_top","dragon_egg","cocoa_stage2","cocoa_stage1","cocoa_stage0","emerald_ore","tripwire_hook","tripwire","end_portal_frame_eye","end_stone" },
{"sandstone_top","blue_wool","light_blue_wool","powered_rail_on","debug","debug","enchanting_table_side","enchanting_table_bottom","glide_blue","item_frame","flower_pot","comparator","comparator_on","activator_rail","activator_rail","nether_quartz_ore" },
{"sandstone","purple_wool","magenta_wool","detector_rail","jungle_leaves","black_concrete","spruce_planks","jungle_planks","carrots_stage0","carrots_stage1","carrots_stage2","carrots_stage3","slime_block","debug","debug","debug" },
{"sandstone_bottom","cyan_wool","orange_wool","redstone_lamp","redstone_lamp_on","chiseled_stone_bricks","birch_planks","anvil","chipped_anvil_top","chiseled_quartz_block_top","quartz_pillar_top","quartz_block_side","debug","detector_rail_on","debug","debug" },
{"nether_bricks","light_gray_wool","nether_wart_stage0","nether_wart_stage1","nether_wart_stage2","chiseled_sandstone","cut_sandstone","anvil_top","damaged_anvil_top","chiseled_quartz_block","quartz_pillar","quartz_block_top","debug","debug","debug","debug" },
{"destroy_stage_0","destroy_stage_1","destroy_stage_2","destroy_stage_3","destroy_stage_4","destroy_stage_5","destroy_stage_6","destroy_stage_7","destroy_stage_8","destroy_stage_9","hay_block_side","quartz_block_bottom","debug","hay_block_top","debug","debug" },
{"coal_block","terracotta","note_block","andesite","polished_andesite","diorite","polished_diorite","granite","polished_granite","potatoes_stage0","potatoes_stage1","potatoes_stage2","potatoes_stage3","spruce_log_top","jungle_log_top","birch_log_top" },
{"black_terracotta","blue_terracotta","brown_terracotta","cyan_terracotta","gray_terracotta","green_terracotta","light_blue_terracotta","lime_terracotta","magenta_terracotta","orange_terracotta","pink_terracotta","purple_terracotta","red_terracotta","light_gray_terracotta","white_terracotta","yellow_terracotta" },
{"black_stained_glass","blue_stained_glass","brown_stained_glass","cyan_stained_glass","gray_stained_glass","green_stained_glass","light_blue_stained_glass","lime_stained_glass","magenta_stained_glass","orange_stained_glass","pink_stained_glass","purple_stained_glass","red_stained_glass","light_gray_stained_glass","white_stained_glass","yellow_stained_glass" },
{"black_stained_glass_pane_top","blue_stained_glass_pane_top","brown_stained_glass_pane_top","cyan_stained_glass_pane_top","gray_stained_glass_pane_top","green_stained_glass_pane_top","light_blue_stained_glass_pane_top","lime_stained_glass_pane_top","magenta_stained_glass_pane_top","orange_stained_glass_pane_top","pink_stained_glass_pane_top","purple_stained_glass_pane_top","red_stained_glass_pane_top","light_gray_stained_glass_pane_top","white_stained_glass_pane_top","yellow_stained_glass_pane_top" },
{"large_fern_top","tall_grass_top","peony_top","rose_bush_top","lilac_top","orange_tulip","sunflower_top","sunflower_front","acacia_log","acacia_log_top","acacia_planks","acacia_leaves","acacia_leaves","prismarine_bricks","red_sand","red_sandstone_top" },
{"large_fern_bottom","tall_grass_bottom","peony_bottom","rose_bush_bottom","lilac_bottom","pink_tulip","sunflower_bottom","sunflower_back","dark_oak_log","dark_oak_log_top","dark_oak_planks","dark_oak_leaves","dark_oak_leaves","dark_prismarine","red_sandstone_bottom","red_sandstone" },
{"allium","blue_orchid","azure_bluet","oxeye_daisy","red_tulip","white_tulip","acacia_sapling","dark_oak_sapling","coarse_dirt","podzol_side","podzol_top","spruce_leaves","spruce_leaves","debug","chiseled_red_sandstone","cut_red_sandstone" },
{"acacia_door_top","birch_door_top","dark_oak_door_top","jungle_door_top","spruce_door_top","chorus_flower","chorus_flower_dead","chorus_plant","end_stone_bricks","grass_path_side","grass_path_top","debug","packed_ice","debug","daylight_detector_inverted_top","iron_trapdoor" },
{"acacia_door_bottom","birch_door_bottom","dark_oak_door_bottom","jungle_door_bottom","spruce_door_bottom","purpur_block","purpur_pillar","purpur_pillar_top","end_rod","debug","nether_wart_block","red_nether_bricks","frosted_ice_0","frosted_ice_1","frosted_ice_2","frosted_ice_3" },
{"beetroots_stage0","beetroots_stage1","beetroots_stage2","beetroots_stage3","debug","debug","debug","debug","debug","debug","debug","debug","debug","debug","debug","debug" },
{"bone_block_side","bone_block_top","melon_stem","attached_melon_stem","observer_front","observer_side","observer_back","observer_back_on","observer_top","glide_yellow","glide_green","structure_block","structure_block_corner","structure_block_data","structure_block_load","structure_block_save" },
{"black_concrete","blue_concrete","brown_concrete","cyan_concrete","gray_concrete","green_concrete","light_blue_concrete","lime_concrete","magenta_concrete","orange_concrete","pink_concrete","purple_concrete","red_concrete","light_gray_concrete","white_concrete","yellow_concrete" },
{"black_concrete_powder","blue_concrete_powder","brown_concrete_powder","cyan_concrete_powder","gray_concrete_powder","green_concrete_powder","light_blue_concrete_powder","lime_concrete_powder","magenta_concrete_powder","orange_concrete_powder","pink_concrete_powder","purple_concrete_powder","red_concrete_powder","light_gray_concrete_powder","white_concrete_powder","yellow_concrete_powder" },
{"black_glazed_terracotta","blue_glazed_terracotta","brown_glazed_terracotta","cyan_glazed_terracotta","gray_glazed_terracotta","green_glazed_terracotta","light_blue_glazed_terracotta","lime_glazed_terracotta","magenta_glazed_terracotta","orange_glazed_terracotta","pink_glazed_terracotta","purple_glazed_terracotta","red_glazed_terracotta","light_gray_glazed_terracotta","white_glazed_terracotta","yellow_glazed_terracotta" },
{"white_shulker_box","","water_overlay","debug","tube_coral_block","bubble_coral_block","brain_coral_block","fire_coral_block","horn_coral_block","tube_coral","bubble_coral","brain_coral","fire_coral","horn_coral","sea_pickle","blue_ice" },
{"dried_kelp_top","dried_kelp_side","debug","debug","dead_tube_coral_block","dead_bubble_coral_block","dead_brain_coral_block","dead_fire_coral_block","dead_horn_coral_block","tube_coral_fan","bubble_coral_fan","brain_coral_fan","fire_coral_fan","horn_coral_fan","","" },
{"debug","debug","debug","debug","debug","debug","debug","debug","debug","dead_tube_coral_fan","dead_bubble_coral_fan","dead_brain_coral_fan","dead_fire_coral_fan","dead_horn_coral_fan","","spruce_trapdoor" },
{"stripped_oak_log","stripped_oak_log_top","stripped_acacia_log","stripped_acacia_log_top","stripped_birch_log","stripped_birch_log_top","stripped_dark_oak_log","stripped_dark_oak_log_top","stripped_jungle_log","stripped_jungle_log_top","stripped_spruce_log","stripped_spruce_log_top","acacia_trapdoor","birch_trapdoor","dark_oak_trapdoor","jungle_trapdoor" }
};
static string[,] mobs =
{
{"\\entity\\alex","\\alex"},
{"\\entity\\steve","\\char"},
{"\\entity\\bat","\\bat"},
{"\\entity\\chicken","\\chicken"},
{"\\entity\\dolphin","\\dolphin"},
{"\\entity\\endermite","\\endermite"},
{"\\entity\\guardian","\\guardian"},
{"\\entity\\guardian_beam","\\guardian_beam"},
{"\\entity\\guardian_elder","\\guardian_elder"},
{"\\entity\\phantom","\\phantom"},
{"\\entity\\spider_eyes","\\spider_eyes"},
{"\\entity\\squid","\\squid"},
{"\\entity\\steve","\\steve"},
{"\\entity\\witch","\\witch"},
{"\\entity\\bear\\polarbear","\\bear\\polarbear"},
{"\\entity\\creeper\\creeper","\\creeper"},
{"\\entity\\ghast\\ghast","\\ghast"},
{"\\entity\\ghast\\ghast_shooting","\\ghast_fire"},
{"\\entity\\enderdragon\\dragon_fireball","\\enderdragon\\dragon_fireball"},
{"\\entity\\enderdragon\\dragon","\\enderdragon\\ender"},
{"\\entity\\end_crystal\\end_crystal_beam","\\enderdragon\\beam"},
{"\\entity\\enderdragon\\dragon_eyes","\\enderdragon\\ender_eyes"},
{"\\entity\\enderman\\enderman_eyes","\\enderman\\enderman_eyes"},
{"\\entity\\enderman\\enderman","\\enderman\\enderman"},
{"\\entity\\fish\\cod","\\fish\\cod"},
{"\\entity\\fish\\pufferfish","\\fish\\pufferfish"},
{"\\entity\\fish\\salmon","\\fish\\salmon"},
{"\\entity\\fish\\tropical_a","\\fish\\tropical_a"},
{"\\entity\\fish\\tropical_a_pattern_1","\\fish\\tropical_a_pattern_1"},
{"\\entity\\fish\\tropical_a_pattern_2","\\fish\\tropical_a_pattern_2"},
{"\\entity\\fish\\tropical_a_pattern_3","\\fish\\tropical_a_pattern_3"},
{"\\entity\\fish\\tropical_a_pattern_4","\\fish\\tropical_a_pattern_4"},
{"\\entity\\fish\\tropical_a_pattern_5","\\fish\\tropical_a_pattern_5"},
{"\\entity\\fish\\tropical_a_pattern_6","\\fish\\tropical_a_pattern_6"},
{"\\entity\\fish\\tropical_b","\\fish\\tropical_b"},
{"\\entity\\fish\\tropical_b_pattern_1","\\fish\\tropical_b_pattern_1"},
{"\\entity\\fish\\tropical_b_pattern_2","\\fish\\tropical_b_pattern_2"},
{"\\entity\\fish\\tropical_b_pattern_3","\\fish\\tropical_b_pattern_3"},
{"\\entity\\fish\\tropical_b_pattern_4","\\fish\\tropical_b_pattern_4"},
{"\\entity\\fish\\tropical_b_pattern_5","\\fish\\tropical_b_pattern_5"},
{"\\entity\\fish\\tropical_b_pattern_6","\\fish\\tropical_b_pattern_6"},
{"\\entity\\horse\\donkey","\\horse\\donkey"},
{"\\entity\\horse\\horse_black","\\horse\\horse_black"},
{"\\entity\\horse\\horse_brown","\\horse\\horse_brown"},
{"\\entity\\horse\\horse_chestnut","\\horse\\horse_chestnut"},
{"\\entity\\horse\\horse_creamy","\\horse\\horse_creamy"},
{"\\entity\\horse\\horse_darkbrown","\\horse\\horse_darkbrown"},
{"\\entity\\horse\\horse_gray","\\horse\\horse_gray"},
{"\\entity\\horse\\horse_markings_blackdots","\\horse\\horse_markings_blackdots"},
{"\\entity\\horse\\horse_markings_white","\\horse\\horse_markings_white"},
{"\\entity\\horse\\horse_markings_whitedots","\\horse\\horse_markings_whitedots"},
{"\\entity\\horse\\horse_markings_whitefield","\\horse\\horse_markings_whitefield"},
{"\\entity\\horse\\horse_skeleton","\\horse\\horse_skeleton"},
{"\\entity\\horse\\horse_white","\\horse\\horse_white"},
{"\\entity\\horse\\horse_zombie","\\horse\\horse_zombie"},
{"\\entity\\horse\\mule","\\horse\\mule"},
{"\\entity\\illager\\evoker","\\illager\\evoker"},
{"\\entity\\illager\\vex","\\illager\\vex"},
{"\\entity\\illager\\vex_charging","\\illager\\vex_charging"},
{"\\entity\\illager\\vindicator","\\illager\\vindicator"},
{"\\entity\\llama\\spit","\\llama\\spit"},
{"\\entity\\parrot\\parrot_blue","\\parrot\\parrot_blue"},
{"\\entity\\parrot\\parrot_green","\\parrot\\parrot_green"},
{"\\entity\\parrot\\parrot_grey","\\parrot\\parrot_grey"},
{"\\entity\\parrot\\parrot_red_blue","\\parrot\\parrot_red_blue"},
{"\\entity\\parrot\\parrot_yellow_blue","\\parrot\\parrot_yellow_blue"},
{"\\entity\\rabbit\\black","\\rabbit\\black"},
{"\\entity\\rabbit\\brown","\\rabbit\\brown"},
{"\\entity\\rabbit\\caerbannog","\\rabbit\\caerbannog"},
{"\\entity\\rabbit\\gold","\\rabbit\\gold"},
{"\\entity\\rabbit\\salt","\\rabbit\\salt"},
{"\\entity\\rabbit\\toast","\\rabbit\\toast"},
{"\\entity\\rabbit\\white","\\rabbit\\white"},
{"\\entity\\rabbit\\white_splotched","\\rabbit\\white_splotched"},
{"\\entity\\shulker\\spark","\\shulker\\spark"},
{"\\entity\\skeleton\\stray","\\skeleton\\stray"},
{"\\entity\\skeleton\\skeleton","\\skeleton"},
{"\\entity\\skeleton\\wither_skeleton","\\skeleton_wither"},
{"\\entity\\skeleton\\stray_overlay","\\skeleton\\stray_overlay"},
{"\\entity\\slime\\slime","\\slime"},
{"\\entity\\villager\\villager","\\villager\\villager"},
{"\\entity\\wither\\wither","\\wither\\wither"},
{"\\entity\\wither\\wither_armor","\\wither\\wither_armor"},
{"\\entity\\wither\\wither_invulnerable","\\wither\\wither_invulnerable"},
{"\\entity\\zombie\\drowned","\\zombie\\drowned"},
{"\\entity\\zombie\\husk","\\zombie\\husk"},
{"\\entity\\cow\\cow","\\cow"},
{"\\entity\\cow\\red_mooshroom","\\redcow"},
{"\\entity\\cow\\red_mooshroom","\\redcow"},
{"\\entity\\enderman\\enderman","\\enderman"},
{"\\entity\\enderman\\enderman_eyes","\\enderman_eyes"},
{"\\entity\\ghast\\ghast","\\ghast"},
{"\\entity\\ghast\\ghast_shooting","\\ghast_fire"},
{"\\entity\\pig\\pig","\\pig"},
{"\\entity\\sheep\\sheep_fur","\\sheep_fur"},
{"\\entity\\zombie_villager\\zombie_villager","\\zombie_villager\\zombie_villager"}
};
static string[,] painting =
{
{"alban","0","2", "1", "1"},
{"alban","1","2", "1", "1"},
{"aztec","0","1", "1", "1"},
{"aztec","1","1", "1", "1"},
{"aztec2","0","3", "1", "1"},
{"aztec2","1","3", "1", "1"},
{"kebab","0","0", "1", "1"},
{"kebab","1","0", "1", "1"},
{"bomb","0","4", "1", "1"},
{"plant","0","5", "1", "1"},
{"wasteland","0","6", "1", "1"},
{"courbet","2","2", "2", "1"},
{"creebet","2","8", "2", "1"},
{"sea","2","4", "2", "1"},
{"sunset","2","6", "2", "1"},
{"burning_skull","12","8", "4", "4"},
{"bust","8","2", "2", "2"},
{"donkey_kong","7","12", "4", "3"},
{"fighters","6","0", "4", "2"},
{"graham","4","1", "1", "2"},
{"match","8","0", "2", "2"},
{"pigscene","12","4", "4", "4"},
{"pointer","12","0", "4", "4"},
{"pool","2","0", "2", "1"},
{"skeleton","4","12", "4", "3"},
{"skull_and_roses","8","8", "2", "2"},
{"stage","8","4", "2", "2"},
{"void","8","6", "2", "2"},
{"wanderer","4","0", "1", "2"},
{"back","0","15", "1", "1"},
{"back","1","15", "1", "1"},
{"back","2","15", "1", "1"},
{"back","3","15", "1", "1"},
{"back","0","14", "1", "1"},
{"back","1","14", "1", "1"},
{"back","2","14", "1", "1"},
{"back","3","14", "1", "1"},
{"back","0","13", "1", "1"},
{"back","1","13", "1", "1"},
{"back","2","13", "1", "1"},
{"back","3","13", "1", "1"},
{"back","0","12", "1", "1"},
{"back","1","12", "1", "1"},
{"back","2","12", "1", "1"},
{"back","3","12", "1", "1"}
};
static string[,] ExData = {
{ "\\environment\\clouds","\\environment\\clouds"},
{ "\\environment\\rain","\\environment\\rain"},
{ "\\environment\\snow","\\environment\\snow"},
{ "\\environment\\sun","\\terrain\\sun"},
{ "\\environment\\moon_phases","\\terrain\\moon_phases"},
{ "\\environment\\end_sky","\\misc\\particlefield"},
{ "\\misc\\pumpkinblur","\\misc\\pumpkinblur"}
};
static string[,] armour =
{
{ "\\models\\armor\\chainmail_layer_1", "\\armor\\chain_1"},
{ "\\models\\armor\\chainmail_layer_2", "\\armor\\chain_2"},
{ "\\models\\armor\\leather_layer_1", "\\armor\\cloth_1"},
{ "\\models\\armor\\leather_layer_1_overlay", "\\armor\\cloth_1_boverlay"},
{ "\\models\\armor\\leather_layer_2", "\\armor\\cloth_2"},
{ "\\models\\armor\\leather_layer_2_overlay", "\\armor\\cloth_2_b"},
{ "\\models\\armor\\diamond_layer_1", "\\armor\\diamond_1"},
{ "\\models\\armor\\diamond_layer_2", "\\armor\\diamond_2"},
{ "\\models\\armor\\gold_layer_1", "\\armor\\gold_1"},
{ "\\models\\armor\\gold_layer_2", "\\armor\\gold_2"},
{ "\\models\\armor\\iron_layer_1", "\\armor\\iron_1"},
{ "\\models\\armor\\iron_layer_2", "\\armor\\iron_2"},
{ "\\models\\armor\\turtle_layer_1", "\\armor\\turtle_1"}
};
private void TextureConverterUtility_Load(object sender, EventArgs e)
{
AppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "\\.minecraft\\resourcepacks");
if (!Directory.Exists(AppData))
{
MessageBox.Show($"Could not find \".minecraft folder\" in {Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}", "Directory not found");
DialogResult = DialogResult.Cancel;
Close();
return;
}
if (ToPC)
{
foreach (string folder in Directory.GetDirectories(AppData))
listBox1.Items.Add(Path.GetFileName(folder));
metroTextBox1.Text = "New Texture Pack";
Packname = "New Texture Pack";
}
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if(ToPC)
metroTextBox1.Text = listBox1.SelectedItem.ToString();
}
private void button1_Click(object sender, EventArgs e)
{
if (ToPC)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
if (fbd.ShowDialog() == DialogResult.OK)
metroTextBox1.Text = fbd.SelectedPath;
}
}
private void button2_Click(object sender, EventArgs e)
{
if (ToPC)
{
Packname = metroTextBox1.Text;
Image Terrain = new Bitmap(640, 480);
Image Items = new Bitmap(640, 480);
Image painting = new Bitmap(640, 480);
TreeNode EntityNode = new TreeNode();
foreach(TreeNode tn in TView.Nodes[TView.Nodes.Count - 1].Nodes)
{
switch (tn.Text)
{
case ("terrain.png"):
Terrain = Image.FromStream(new MemoryStream(((PckFileData)(tn.Tag)).Data));
break;
case ("items.png"):
Items = Image.FromStream(new MemoryStream(((PckFileData)(tn.Tag)).Data));
break;
case ("art"):
painting = Image.FromStream(new MemoryStream(((PckFileData)(tn.Nodes[0].Tag)).Data));
break;
case ("mob"):
EntityNode = tn;
break;
}
}
SplitTextures("terrain.png", Terrain);
SplitTextures("items.png", Items);
SplitTextures2(0);
SplitTextures2(1);
SplitTextures2(2);
SplitTextures3("kz.png", painting);
File.WriteAllText(AppData + "\\" + Packname + "\\pack.mcmeta", "{\n\t\"pack\": {\n\t\t\"pack_format\": 6,\n\t\t\"description\": \"\"\n\t}\n}");
Resources.pack.Save(AppData + "\\" + Packname + "\\pack.png");
Close();
}
}
public void SplitTextures(string path, Image Img)
{
try
{
// Get the inputs.
int wid = 16;
int hgt = 16;
string Outpath = "";
Bitmap bm = new Bitmap(Img);
if (Path.GetFileNameWithoutExtension(path) == "items")
{
wid = bm.Width / 16;
int NumDown = bm.Height / wid;
hgt = bm.Height / NumDown;
Outpath = "assets\\minecraft\\textures\\item\\";
}
else if (Path.GetFileNameWithoutExtension(path) == "terrain")
{
wid = bm.Width / 16;
int NumDown = bm.Height / wid;
hgt = bm.Height / NumDown;
Outpath = "assets\\minecraft\\textures\\block\\";
}
else
return;
// Start splitting the Bitmap.
Directory.CreateDirectory(AppData + "\\" + metroTextBox1.Text + "\\" + Outpath);
Bitmap piece = new Bitmap(wid, hgt);
Rectangle dest_rect = new Rectangle(0, 0, wid, hgt);
using (Graphics gr = Graphics.FromImage(piece))
{
int num_rows = bm.Height / hgt;
int num_cols = bm.Width / wid;
Rectangle source_rect = new Rectangle(0, 0, wid, hgt);
for (int row = 0; row < num_rows; row++)
{
source_rect.X = 0;
for (int col = 0; col < num_cols; col++)
{
// Copy the piece of the image.
gr.Clear(Color.Transparent);
gr.DrawImage(bm, dest_rect, source_rect,
GraphicsUnit.Pixel);
// Save the piece.
string filename = "placeholder";
if (Path.GetFileNameWithoutExtension(path) == "items")
{
filename = ItemSheetArray[row, col] + ".png";
}
else if (Path.GetFileNameWithoutExtension(path) == "terrain")
{
filename = BlockSheetArray[row, col] + ".png";
}
piece.Save(AppData + "\\" + metroTextBox1.Text + "\\" + Outpath + "\\" + filename, ImageFormat.Png);
// Move to the next column.
source_rect.X += wid;
}
source_rect.Y += hgt;
}
gr.Dispose();
}
bm.Dispose();
}
catch (Exception err)
{
MessageBox.Show("Error!\n" + err.Message + "\nStacktrace:\n" + err.StackTrace);
}
}
public void SplitTextures2(int Type)
{
if (Type == 0)
{
int i = 0;
int ix = mobs.Length / 2;
string Outpath = "assets\\minecraft\\textures\\";
foreach (PckFileData mf in Pck.GetFiles())
{
FileInfo file = new FileInfo(Environment.CurrentDirectory + "\\Temp\\" + @"\" + mf.Filename);
file.Directory.Create(); // If the directory already exists, this method does nothing.
File.WriteAllBytes(Environment.CurrentDirectory + "\\Temp\\" + @"\" + mf.Filename, mf.Data); //writes minefile to file
}
while (i <= ix)
{
try
{
Console.WriteLine(mobs[i, 0] + " --- " + mobs[i, 1]);
Directory.CreateDirectory(AppData + "\\" + metroTextBox1.Text + "\\" + Outpath + mobs[i, 0] + ".png");
File.Copy(Environment.CurrentDirectory + "\\Temp\\res\\mob" + mobs[i, 1] + ".png", AppData + "\\" + metroTextBox1.Text + "\\" + Outpath + mobs[i, 0] + ".png");
}
catch { }
i++;
}
}
if (Type == 1)
{
int i = 0;
int ix = ExData.Length / 2;
string Outpath = "assets\\minecraft\\textures\\";
foreach (PckFileData mf in Pck.GetFiles())
{
FileInfo file = new FileInfo(Environment.CurrentDirectory + "\\Temp\\" + @"\" + mf.Filename);
file.Directory.Create(); // If the directory already exists, this method does nothing.
File.WriteAllBytes(Environment.CurrentDirectory + "\\Temp\\" + @"\" + mf.Filename, mf.Data); //writes minefile to file
}
while (i <= ix)
{
try
{
Console.WriteLine(ExData[i, 0] + " --- " + ExData[i, 1]);
Directory.CreateDirectory(Path.GetDirectoryName(AppData + "\\" + metroTextBox1.Text + "\\" + Outpath + ExData[i, 0] + ".png"));
File.Copy(Environment.CurrentDirectory + "\\Temp\\res" + ExData[i, 1] + ".png", AppData + "\\" + metroTextBox1.Text + "\\" + Outpath + ExData[i, 0] + ".png");
}
catch { }
i++;
}
}
if (Type == 2)
{
int i = 0;
int ix = armour.Length / 2;
string Outpath = "assets\\minecraft\\textures\\";
foreach (PckFileData mf in Pck.GetFiles())
{
FileInfo file = new FileInfo(Environment.CurrentDirectory + "\\Temp\\" + @"\" + mf.Filename);
file.Directory.Create(); // If the directory already exists, this method does nothing.
File.WriteAllBytes(Environment.CurrentDirectory + "\\Temp\\" + @"\" + mf.Filename, mf.Data); //writes minefile to file
}
while (i <= ix)
{
try
{
Console.WriteLine(armour[i, 0] + " --- " + armour[i, 1]);
Directory.CreateDirectory(Path.GetDirectoryName(AppData + "\\" + metroTextBox1.Text + "\\" + Outpath + armour[i, 0] + ".png"));
File.Copy(Environment.CurrentDirectory + "\\Temp\\res" + armour[i, 1] + ".png", AppData + "\\" + metroTextBox1.Text + "\\" + Outpath + armour[i, 0] + ".png");
}
catch { }
i++;
}
}
}
public void SplitTextures3(string path, Image Img)
{
int i = 0;
int ix = painting.Length / 5;
string Outpath = "assets\\minecraft\\textures\\painting\\";
Bitmap bm = (Bitmap)Img;
// Get the inputs.
int wid = bm.Width / 16;
int hgt = bm.Height / 16;
// Start splitting the Bitmap.
string piece_name = Path.GetFileNameWithoutExtension(path);
Directory.CreateDirectory(AppData + "\\" + metroTextBox1.Text + "\\" + Outpath);
while (i < ix)
{
Rectangle dest_rect = new Rectangle(0, 0, wid * int.Parse(painting[i, 3]), hgt * int.Parse(painting[i, 4]));
Bitmap piece = new Bitmap(wid * int.Parse(painting[i, 3]), hgt * int.Parse(painting[i, 4]));
using (Graphics gr = Graphics.FromImage(piece))
{
try
{
Rectangle source_rect = new Rectangle(wid * int.Parse(painting[i, 2]), hgt * int.Parse(painting[i, 1]), wid * int.Parse(painting[i, 3]), hgt * int.Parse(painting[i, 4]));
// Copy the piece of the image.
gr.Clear(Color.Transparent);
gr.DrawImage(bm, dest_rect, source_rect, GraphicsUnit.Pixel);
piece.Save(AppData + "\\" + metroTextBox1.Text + "\\" + Outpath + "\\" + (painting[i, 0]) + ".png", ImageFormat.Png);
gr.Dispose();
}
catch (Exception err) { Console.WriteLine(err.Message); }
}
i++;
}
bm.Dispose();
}
private void TextureConverterUtility_FormClosing(object sender, FormClosingEventArgs e)
{
Directory.Delete(Environment.CurrentDirectory + "\\Temp", true);
}
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,261 +0,0 @@
namespace PckStudio.Forms.Utilities
{
partial class pckCenter
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(pckCenter));
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.radioButtonMine = new System.Windows.Forms.RadioButton();
this.radioButtonDevPicks = new System.Windows.Forms.RadioButton();
this.radioButtonNew = new System.Windows.Forms.RadioButton();
this.radioButtonAll = new System.Windows.Forms.RadioButton();
this.radioButtonCommunity = new System.Windows.Forms.RadioButton();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.buttonSubmit = new System.Windows.Forms.Button();
this.radioButtonTex = new System.Windows.Forms.RadioButton();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.panel1 = new System.Windows.Forms.Panel();
this.pckLayout = new System.Windows.Forms.FlowLayoutPanel();
this.contextMenuStripPCK = new System.Windows.Forms.ContextMenuStrip(this.components);
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.PSVitaPCKCheckbox = new MetroFramework.Controls.MetroCheckBox();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tableLayoutPanel2.SuspendLayout();
this.panel1.SuspendLayout();
this.contextMenuStripPCK.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
this.SuspendLayout();
//
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.radioButtonMine, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.radioButtonDevPicks, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.radioButtonNew, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.radioButtonAll, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.radioButtonCommunity, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.pictureBox1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.buttonSubmit, 0, 7);
this.tableLayoutPanel1.Controls.Add(this.radioButtonTex, 0, 6);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// radioButtonMine
//
resources.ApplyResources(this.radioButtonMine, "radioButtonMine");
this.radioButtonMine.BackColor = System.Drawing.Color.Transparent;
this.radioButtonMine.FlatAppearance.BorderSize = 0;
this.radioButtonMine.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42)))));
this.radioButtonMine.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.radioButtonMine.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.radioButtonMine.ForeColor = System.Drawing.Color.White;
this.radioButtonMine.Name = "radioButtonMine";
this.radioButtonMine.UseVisualStyleBackColor = false;
this.radioButtonMine.CheckedChanged += new System.EventHandler(this.radioButtonMine_CheckedChanged);
//
// radioButtonDevPicks
//
resources.ApplyResources(this.radioButtonDevPicks, "radioButtonDevPicks");
this.radioButtonDevPicks.BackColor = System.Drawing.Color.Transparent;
this.radioButtonDevPicks.FlatAppearance.BorderSize = 0;
this.radioButtonDevPicks.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42)))));
this.radioButtonDevPicks.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.radioButtonDevPicks.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.radioButtonDevPicks.ForeColor = System.Drawing.Color.White;
this.radioButtonDevPicks.Name = "radioButtonDevPicks";
this.radioButtonDevPicks.UseVisualStyleBackColor = false;
this.radioButtonDevPicks.CheckedChanged += new System.EventHandler(this.radioButtonDevPicks_CheckedChanged);
//
// radioButtonNew
//
resources.ApplyResources(this.radioButtonNew, "radioButtonNew");
this.radioButtonNew.BackColor = System.Drawing.Color.Transparent;
this.radioButtonNew.FlatAppearance.BorderSize = 0;
this.radioButtonNew.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42)))));
this.radioButtonNew.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.radioButtonNew.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.radioButtonNew.ForeColor = System.Drawing.Color.White;
this.radioButtonNew.Name = "radioButtonNew";
this.radioButtonNew.UseVisualStyleBackColor = false;
this.radioButtonNew.CheckedChanged += new System.EventHandler(this.radioButtonNew_CheckedChanged);
//
// radioButtonAll
//
resources.ApplyResources(this.radioButtonAll, "radioButtonAll");
this.radioButtonAll.BackColor = System.Drawing.Color.Transparent;
this.radioButtonAll.Checked = true;
this.radioButtonAll.FlatAppearance.BorderSize = 0;
this.radioButtonAll.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42)))));
this.radioButtonAll.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.radioButtonAll.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.radioButtonAll.ForeColor = System.Drawing.Color.White;
this.radioButtonAll.Name = "radioButtonAll";
this.radioButtonAll.TabStop = true;
this.radioButtonAll.UseVisualStyleBackColor = false;
this.radioButtonAll.CheckedChanged += new System.EventHandler(this.radioButtonAll_CheckedChanged);
//
// radioButtonCommunity
//
resources.ApplyResources(this.radioButtonCommunity, "radioButtonCommunity");
this.radioButtonCommunity.BackColor = System.Drawing.Color.Transparent;
this.radioButtonCommunity.FlatAppearance.BorderSize = 0;
this.radioButtonCommunity.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42)))));
this.radioButtonCommunity.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.radioButtonCommunity.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.radioButtonCommunity.ForeColor = System.Drawing.Color.White;
this.radioButtonCommunity.Name = "radioButtonCommunity";
this.radioButtonCommunity.UseVisualStyleBackColor = false;
this.radioButtonCommunity.CheckedChanged += new System.EventHandler(this.radioButtonCommunity_CheckedChanged);
//
// pictureBox1
//
resources.ApplyResources(this.pictureBox1, "pictureBox1");
this.pictureBox1.Image = global::PckStudio.Properties.Resources.pckCenterHeader;
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.TabStop = false;
//
// buttonSubmit
//
this.buttonSubmit.FlatAppearance.BorderSize = 0;
resources.ApplyResources(this.buttonSubmit, "buttonSubmit");
this.buttonSubmit.ForeColor = System.Drawing.Color.White;
this.buttonSubmit.Name = "buttonSubmit";
this.buttonSubmit.UseVisualStyleBackColor = true;
this.buttonSubmit.Click += new System.EventHandler(this.buttonSubmit_Click);
//
// radioButtonTex
//
resources.ApplyResources(this.radioButtonTex, "radioButtonTex");
this.radioButtonTex.BackColor = System.Drawing.Color.Transparent;
this.radioButtonTex.FlatAppearance.BorderSize = 0;
this.radioButtonTex.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(42)))), ((int)(((byte)(42)))));
this.radioButtonTex.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.radioButtonTex.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.radioButtonTex.ForeColor = System.Drawing.Color.White;
this.radioButtonTex.Name = "radioButtonTex";
this.radioButtonTex.UseVisualStyleBackColor = false;
this.radioButtonTex.CheckedChanged += new System.EventHandler(this.radioButtonTex_CheckedChanged);
//
// tableLayoutPanel2
//
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel1, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.panel1, 1, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.panel1.Controls.Add(this.pckLayout);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// pckLayout
//
resources.ApplyResources(this.pckLayout, "pckLayout");
this.pckLayout.Name = "pckLayout";
this.pckLayout.ControlRemoved += new System.Windows.Forms.ControlEventHandler(this.pckLayout_ControlRemoved);
this.pckLayout.MouseClick += new System.Windows.Forms.MouseEventHandler(this.pckLayout_MouseClick);
this.pckLayout.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pckLayout_MouseDown);
this.pckLayout.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pckLayout_MouseMove_1);
//
// contextMenuStripPCK
//
this.contextMenuStripPCK.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.deleteToolStripMenuItem,
this.exportToolStripMenuItem});
this.contextMenuStripPCK.Name = "contextMenuStripPCK";
resources.ApplyResources(this.contextMenuStripPCK, "contextMenuStripPCK");
//
// deleteToolStripMenuItem
//
this.deleteToolStripMenuItem.Image = global::PckStudio.Properties.Resources.file_delete;
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
resources.ApplyResources(this.deleteToolStripMenuItem, "deleteToolStripMenuItem");
//
// exportToolStripMenuItem
//
this.exportToolStripMenuItem.Image = global::PckStudio.Properties.Resources.file_export;
this.exportToolStripMenuItem.Name = "exportToolStripMenuItem";
resources.ApplyResources(this.exportToolStripMenuItem, "exportToolStripMenuItem");
//
// PSVitaPCKCheckbox
//
resources.ApplyResources(this.PSVitaPCKCheckbox, "PSVitaPCKCheckbox");
this.PSVitaPCKCheckbox.Name = "PSVitaPCKCheckbox";
this.PSVitaPCKCheckbox.Style = MetroFramework.MetroColorStyle.Silver;
this.PSVitaPCKCheckbox.Theme = MetroFramework.MetroThemeStyle.Dark;
this.PSVitaPCKCheckbox.UseSelectable = true;
this.PSVitaPCKCheckbox.CheckedChanged += new System.EventHandler(this.PSVitaPCKCheckbox_CheckedChanged);
//
// pckCenter
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle;
this.Controls.Add(this.PSVitaPCKCheckbox);
this.Controls.Add(this.tableLayoutPanel2);
this.Name = "pckCenter";
this.ShadowType = MetroFramework.Forms.MetroFormShadowType.DropShadow;
this.Style = MetroFramework.MetroColorStyle.White;
this.Theme = MetroFramework.MetroThemeStyle.Dark;
this.Load += new System.EventHandler(this.pckCenter_Load);
this.tableLayoutPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.tableLayoutPanel2.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.contextMenuStripPCK.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.BindingSource bindingSource1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.RadioButton radioButtonDevPicks;
private System.Windows.Forms.RadioButton radioButtonNew;
private System.Windows.Forms.RadioButton radioButtonAll;
private System.Windows.Forms.RadioButton radioButtonCommunity;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.FlowLayoutPanel pckLayout;
private System.Windows.Forms.RadioButton radioButtonMine;
private System.Windows.Forms.ContextMenuStrip contextMenuStripPCK;
private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exportToolStripMenuItem;
private System.Windows.Forms.Button buttonSubmit;
private System.Windows.Forms.RadioButton radioButtonTex;
private MetroFramework.Controls.MetroCheckBox PSVitaPCKCheckbox;
}
}

View File

@@ -1,395 +0,0 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Windows.Forms;
using System.Diagnostics;
using PckStudio.Classes.Misc;
using PckStudio.API.PCKCenter.model;
using PckStudio.API.PCKCenter;
namespace PckStudio.Forms.Utilities
{
public partial class pckCenter : MetroFramework.Forms.MetroForm
{
string[] mods;
static string hosturl = Program.BaseAPIUrl;
static string loadDirectory = hosturl + "/pckCenterList.txt";
static string appData = Program.AppData;
LocalActions LAct = new LocalActions();
string cacheDir = Program.AppDataCache + "/mods/";
bool nobleLoaded = true;
bool newLoaded = true;
bool devPicksLoaded = true;
bool communityLoaded = true;
bool TexLoaded = true;
bool isVita = false;
public pckCenter()
{
InitializeComponent();
//listViewNav.SmallImageList = imgList;
if (!Directory.Exists(cacheDir))
{
Directory.CreateDirectory(cacheDir);
}
if(isVita)
loadDirectory = File.ReadAllText(appData + "\\settings.ini").Split(new[] { "\r\n", "\n" }, StringSplitOptions.None)[1] + "/studio/PCK/api/pckCenterVitaList.txt";
}
private void reload(bool checkNeeded)
{
try
{
using (WebClient client = new WebClient())
{
try
{
if ((client.DownloadString(hosturl + "pckCenterAvailable.txt")) == "1")
{
}
else if ((client.DownloadString(hosturl + "pckCenterAvailable.txt")) == "0")
{
MessageBox.Show("PCK Center is currently down for maintenance, sorry for any inconveniences");
radioButtonMine.Checked = true;
return;
}
else
{
}
}
catch (Exception connect)
{
MessageBox.Show(connect.ToString());
}
}
using (WebClient client = new WebClient())
{
string parseContent = client.DownloadString(loadDirectory);
mods = parseContent.Split('\n');
int controlCount = pckLayout.Controls.Count;
for (int i = controlCount - 1; i >= 0; i--)
{
Control control = pckLayout.Controls[i];
pckLayout.Controls.Remove(control);
control.Dispose();
}
PCKCenterJSON PJSON = new PCKCenterJSON();
PJSON.Data = new Dictionary<string, EntryInfo>();
int x = 0;
foreach (string mod in mods)
{
try
{
if (File.Exists(cacheDir + mod + ".png") && checkNeeded == true)
{
//image cache
string imgname = hosturl + "pcks/" + mod + ".png";
if (isVita)
imgname = hosturl + "pcks/vita" + mod + ".png";
HttpWebRequest textureFile = (HttpWebRequest)WebRequest.Create(imgname);
HttpWebResponse textureFileResponse = (HttpWebResponse)textureFile.GetResponse();
DateTime localImageModifiedTime = File.GetLastWriteTime(cacheDir + mod + ".png");
DateTime onlineImageModifiedTime = textureFileResponse.LastModified;
textureFileResponse.Dispose();
if (localImageModifiedTime >= onlineImageModifiedTime)
{
}
else
{
if (isVita)
client.DownloadFile(hosturl + "pcks/vita/" + mod + ".png", cacheDir + mod + ".png");
else
client.DownloadFile(hosturl + "pcks/" + mod + ".png", cacheDir + mod + ".png");
}
}
else if (mod.Length == 0) { }
else if (File.Exists(cacheDir + mod + ".png") && checkNeeded == false)
{
}
else
{
// MessageBox.Show(mod + ".png");
client.DownloadFile(hosturl + "pcks/" + mod + ".png", cacheDir + mod + ".png");
}
if (File.Exists(cacheDir + mod + ".desc") && checkNeeded == true)
{
//desc cache
HttpWebRequest descFile = (HttpWebRequest)WebRequest.Create(hosturl + "pcks/" + mod + ".desc");
HttpWebResponse descFileResponse = (HttpWebResponse)descFile.GetResponse();
DateTime localDescModifiedTime = File.GetLastWriteTime(cacheDir + mod + ".desc");
DateTime onlineDescModifiedTime = descFileResponse.LastModified;
descFileResponse.Dispose();
if (localDescModifiedTime >= onlineDescModifiedTime)
{
}
else
{
client.DownloadFile(hosturl + "pcks/" + mod + ".desc", cacheDir + mod + ".desc");
}
}
else if (File.Exists(cacheDir + mod + ".png") && checkNeeded == false)
{
}
else if (mod.Length == 0) { }
else
{
client.DownloadFile(hosturl + "pcks/" + mod + ".desc", cacheDir + mod + ".desc");
}
if (mod.Length != 0)
{
string[] parseDesc = File.ReadAllText(cacheDir + mod + ".desc").Split('\n');
Bitmap bmp = new Bitmap(Image.FromFile(cacheDir + mod + ".png"));
string pckName = parseDesc[0];
string author = parseDesc[1];
string desc = parseDesc[2];
string direct = parseDesc[3];
string ad = parseDesc[4];
bool IsVita = (parseDesc[5] == "true" || parseDesc[5] == "True");
string Packname = parseDesc[6];
EntryInfo EInfo = new EntryInfo();
EInfo.Name = pckName;
EInfo.Author = author;
EInfo.Description = desc;
PJSON.Data.Add((++x).ToString(), EInfo);
File.Copy(cacheDir + mod + ".png", cacheDir + "images/" + ++x + ".png");
}
}
catch (Exception err) { Console.WriteLine(err.Message); }
x++;
}
LAct.SaveLocalJSON(PJSON, loadDirectory.Replace(hosturl + "pckCenter", "").Replace(".txt", ""), isVita);
}
}
catch (Exception err)
{
MessageBox.Show("Couldn't connect to PCK Center servers.. \n" + err.Message.ToString() + "\n" + err.ToString()) ;
}
}
private void radioButtonNew_CheckedChanged(object sender, EventArgs e)
{
if (radioButtonNew.Checked == true)
{
loadDirectory = hosturl + "pckCenterNew.txt";
if (isVita)
loadDirectory = hosturl + "pckCenterVitaNew.txt";
if (!string.IsNullOrWhiteSpace(new WebClient().DownloadString(loadDirectory)))
{
reload(newLoaded);
newLoaded = false;
}
else { MessageBox.Show("No Packs Avaliable!"); }
}
}
private void radioButtonDevPicks_CheckedChanged(object sender, EventArgs e)
{
if (radioButtonDevPicks.Checked == true)
{
loadDirectory = hosturl + "pckCenterPicks.txt";
if (isVita)
loadDirectory = hosturl + "pckCenterVitaPicks.txt";
if (!string.IsNullOrWhiteSpace(new WebClient().DownloadString(loadDirectory)))
{
reload(devPicksLoaded);
devPicksLoaded = false;
}
else { MessageBox.Show("No Packs Avaliable!"); }
}
}
private void radioButtonCommunity_CheckedChanged(object sender, EventArgs e)
{
if (radioButtonCommunity.Checked == true)
{
loadDirectory = hosturl + "pckCenterCommunity.txt";
if(isVita)
loadDirectory = hosturl + "pckCenterVitaCommunity.txt";
if (!string.IsNullOrWhiteSpace(new WebClient().DownloadString(loadDirectory)))
{
reload(communityLoaded);
communityLoaded = false;
}
else { MessageBox.Show("No Packs Avaliable!"); }
}
}
private void radioButtonMine_CheckedChanged(object sender, EventArgs e)
{
if (radioButtonMine.Checked == true)
{
loadCollectdion();
}
}
private void loadCollectdion()
{
int controlCount = pckLayout.Controls.Count;
for (int i = controlCount - 1; i >= 0; i--)
{
Control control = pckLayout.Controls[i];
pckLayout.Controls.Remove(control);
control.Dispose();
}
pckLayout.Enabled = false;
List<string> pckFiles = Directory.GetFiles(appData + "/PCK-Center/myPcks/", "*.*", SearchOption.AllDirectories).Where(file => new string[] { ".pck" }.Contains(Path.GetExtension(file))).ToList();
foreach (string pck in pckFiles)
{
string pckName = "";
string author = "";
string desc = "";
string direct = "";
string ad = "";
string mod = Path.GetFileName(pck);
mod = Path.GetFileNameWithoutExtension(mod);
string[] parseDesc = File.ReadAllText(appData + "/PCK-Center/myPcks/" + mod + ".desc").Split('\n');
pckName += parseDesc[0];
author += parseDesc[1];
desc += parseDesc[2];
direct += parseDesc[3];
ad += parseDesc[4];
string filename = appData + "/PCK-Center/myPcks/" + mod + ".png";
Bitmap bmp = null;
using (FileStream memStream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read))
{
bmp = (Bitmap)Image.FromStream(memStream);
}
}
pckLayout.Enabled = true;
}
private void radioButtonAll_CheckedChanged(object sender, EventArgs e)
{
if (radioButtonAll.Checked == true)
{
loadDirectory = hosturl + "pckCenterList.txt";
if (isVita)
loadDirectory = hosturl + "pckCenterVitaList.txt";
if (!string.IsNullOrWhiteSpace(new WebClient().DownloadString(loadDirectory)))
{
reload(nobleLoaded);
nobleLoaded = false;
}
else { MessageBox.Show("No Packs Avaliable!"); }
}
}
private void pckCenter_Load(object sender, EventArgs e)
{
Directory.CreateDirectory(appData + "/PCK-Center/myPcks/");
reload(nobleLoaded);
nobleLoaded = false;
try
{
RPC.SetPresence("Viewing the PCK Center");
}
catch
{
Debug.WriteLine("ERROR WITH RPC");
}
}
private void pckLayout_MouseUp(object sender, MouseEventArgs e)
{
}
private void pckLayout_MouseMove_1(object sender, MouseEventArgs e)
{
}
//Down to Collection //Redownload //Yea
private void pckLayout_MouseClick(object sender, MouseEventArgs e)
{
}
private void pckLayout_MouseDown(object sender, MouseEventArgs e)
{
}
private void pckLayout_ControlRemoved(object sender, ControlEventArgs e)
{
}
private void buttonSubmit_Click(object sender, EventArgs e)
{
if(!isVita)
Process.Start("mailto:phoenixarc.canarynotifs@gmail.com?subject=PCK%20Submission&body=Pack%20name(%E3%83%91%E3%83%83%E3%82%AF%E5%90%8D)%3A%0A%0Aauthor(%E8%91%97%E8%80%85)%3A%0A%0Adescription(%E8%AA%AC%E6%98%8E)%3A%0A%0Aimage(%E7%94%BB%E5%83%8F)%3A");
if(isVita)
Process.Start("mailto:phoenixarc.canarynotifs@gmail.com?subject=PCK%20Submission--Vita--&body=Pack%20name(%E3%83%91%E3%83%83%E3%82%AF%E5%90%8D)%3A%0A%0Aauthor(%E8%91%97%E8%80%85)%3A%0A%0Adescription(%E8%AA%AC%E6%98%8E)%3A%0A%0Aimage(%E7%94%BB%E5%83%8F)%3A%3A%0A%0APack%20To%20Replace%3A%0A%0A");
}
private void radioButtonTex_CheckedChanged(object sender, EventArgs e)
{
if (radioButtonTex.Checked == true)
{
loadDirectory = hosturl + "pckCenterTex.txt";
if (isVita)
loadDirectory = hosturl + "pckCenterVitaTex.txt";
if (!string.IsNullOrWhiteSpace(new WebClient().DownloadString(loadDirectory)))
{
reload(TexLoaded);
TexLoaded = false;
}
else { MessageBox.Show("No Packs Avaliable!"); }
}
}
private void PSVitaPCKCheckbox_CheckedChanged(object sender, EventArgs e)
{
isVita = PSVitaPCKCheckbox.Checked;
nobleLoaded = true;
newLoaded = true;
devPicksLoaded = true;
communityLoaded = true;
TexLoaded = true;
radioButtonAll.Checked = true;
loadDirectory = hosturl + "pckCenterList.txt";
if (isVita)
{
hosturl += "";
loadDirectory = hosturl + "pckCenterVitaList.txt";
}
if (!string.IsNullOrWhiteSpace(new WebClient().DownloadString(loadDirectory)))
{
reload(nobleLoaded);
nobleLoaded = false;
}
else { MessageBox.Show("No Packs Avaliable!"); }
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,618 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="radioButtonMine.Appearance" type="System.Windows.Forms.Appearance, System.Windows.Forms">
<value>Button</value>
</data>
<data name="radioButtonMine.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="radioButtonMine.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 12pt</value>
</data>
<data name="radioButtonMine.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 398</value>
</data>
<data name="radioButtonMine.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>15, 0, 0, 0</value>
</data>
<data name="radioButtonMine.Size" type="System.Drawing.Size, System.Drawing">
<value>188, 45</value>
</data>
<data name="radioButtonMine.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="radioButtonMine.Text" xml:space="preserve">
<value>My Collection</value>
</data>
<data name="&gt;&gt;radioButtonMine.Name" xml:space="preserve">
<value>radioButtonMine</value>
</data>
<data name="&gt;&gt;radioButtonMine.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonMine.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;radioButtonMine.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="radioButtonDevPicks.Appearance" type="System.Windows.Forms.Appearance, System.Windows.Forms">
<value>Button</value>
</data>
<data name="radioButtonDevPicks.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="radioButtonDevPicks.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 12pt</value>
</data>
<data name="radioButtonDevPicks.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 296</value>
</data>
<data name="radioButtonDevPicks.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>15, 0, 0, 0</value>
</data>
<data name="radioButtonDevPicks.Size" type="System.Drawing.Size, System.Drawing">
<value>188, 45</value>
</data>
<data name="radioButtonDevPicks.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="radioButtonDevPicks.Text" xml:space="preserve">
<value>Dev Picks</value>
</data>
<data name="&gt;&gt;radioButtonDevPicks.Name" xml:space="preserve">
<value>radioButtonDevPicks</value>
</data>
<data name="&gt;&gt;radioButtonDevPicks.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonDevPicks.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;radioButtonDevPicks.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="radioButtonNew.Appearance" type="System.Windows.Forms.Appearance, System.Windows.Forms">
<value>Button</value>
</data>
<data name="radioButtonNew.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="radioButtonNew.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 12pt</value>
</data>
<data name="radioButtonNew.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 245</value>
</data>
<data name="radioButtonNew.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>15, 0, 0, 0</value>
</data>
<data name="radioButtonNew.Size" type="System.Drawing.Size, System.Drawing">
<value>188, 45</value>
</data>
<data name="radioButtonNew.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="radioButtonNew.Text" xml:space="preserve">
<value>New</value>
</data>
<data name="&gt;&gt;radioButtonNew.Name" xml:space="preserve">
<value>radioButtonNew</value>
</data>
<data name="&gt;&gt;radioButtonNew.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonNew.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;radioButtonNew.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="radioButtonAll.Appearance" type="System.Windows.Forms.Appearance, System.Windows.Forms">
<value>Button</value>
</data>
<data name="radioButtonAll.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="radioButtonAll.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 12pt</value>
</data>
<data name="radioButtonAll.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 194</value>
</data>
<data name="radioButtonAll.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>15, 0, 0, 0</value>
</data>
<data name="radioButtonAll.Size" type="System.Drawing.Size, System.Drawing">
<value>188, 45</value>
</data>
<data name="radioButtonAll.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="radioButtonAll.Text" xml:space="preserve">
<value>NoblePCKs</value>
</data>
<data name="&gt;&gt;radioButtonAll.Name" xml:space="preserve">
<value>radioButtonAll</value>
</data>
<data name="&gt;&gt;radioButtonAll.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonAll.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;radioButtonAll.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="radioButtonCommunity.Appearance" type="System.Windows.Forms.Appearance, System.Windows.Forms">
<value>Button</value>
</data>
<data name="radioButtonCommunity.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="radioButtonCommunity.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 12pt</value>
</data>
<data name="radioButtonCommunity.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 347</value>
</data>
<data name="radioButtonCommunity.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>15, 0, 0, 0</value>
</data>
<data name="radioButtonCommunity.Size" type="System.Drawing.Size, System.Drawing">
<value>188, 45</value>
</data>
<data name="radioButtonCommunity.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="radioButtonCommunity.Text" xml:space="preserve">
<value>Community</value>
</data>
<data name="&gt;&gt;radioButtonCommunity.Name" xml:space="preserve">
<value>radioButtonCommunity</value>
</data>
<data name="&gt;&gt;radioButtonCommunity.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonCommunity.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;radioButtonCommunity.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="pictureBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>188, 185</value>
</data>
<data name="pictureBox1.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="pictureBox1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;pictureBox1.Name" xml:space="preserve">
<value>pictureBox1</value>
</data>
<data name="&gt;&gt;pictureBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="buttonSubmit.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="buttonSubmit.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 12pt</value>
</data>
<data name="buttonSubmit.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 500</value>
</data>
<data name="buttonSubmit.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>15, 0, 0, 0</value>
</data>
<data name="buttonSubmit.Size" type="System.Drawing.Size, System.Drawing">
<value>188, 45</value>
</data>
<data name="buttonSubmit.TabIndex" type="System.Int32, mscorlib">
<value>14</value>
</data>
<data name="buttonSubmit.Text" xml:space="preserve">
<value>Submit PCK</value>
</data>
<data name="buttonSubmit.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;buttonSubmit.Name" xml:space="preserve">
<value>buttonSubmit</value>
</data>
<data name="&gt;&gt;buttonSubmit.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonSubmit.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;buttonSubmit.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="radioButtonTex.Appearance" type="System.Windows.Forms.Appearance, System.Windows.Forms">
<value>Button</value>
</data>
<data name="radioButtonTex.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="radioButtonTex.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 12pt</value>
</data>
<data name="radioButtonTex.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 449</value>
</data>
<data name="radioButtonTex.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>15, 0, 0, 0</value>
</data>
<data name="radioButtonTex.Size" type="System.Drawing.Size, System.Drawing">
<value>188, 45</value>
</data>
<data name="radioButtonTex.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="radioButtonTex.Text" xml:space="preserve">
<value>Texture Packs</value>
</data>
<data name="&gt;&gt;radioButtonTex.Name" xml:space="preserve">
<value>radioButtonTex</value>
</data>
<data name="&gt;&gt;radioButtonTex.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonTex.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;radioButtonTex.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 549</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="radioButtonMine" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonDevPicks" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonNew" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonAll" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonCommunity" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="pictureBox1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="buttonSubmit" Row="7" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="radioButtonTex" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="tableLayoutPanel2.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="tableLayoutPanel2.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="pckLayout.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="pckLayout.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="pckLayout.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="pckLayout.Size" type="System.Drawing.Size, System.Drawing">
<value>604, 549</value>
</data>
<data name="pckLayout.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;pckLayout.Name" xml:space="preserve">
<value>pckLayout</value>
</data>
<data name="&gt;&gt;pckLayout.Type" xml:space="preserve">
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pckLayout.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;pckLayout.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>203, 3</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>604, 549</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 60</value>
</data>
<data name="tableLayoutPanel2.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<value>810, 555</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Name" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tableLayoutPanel2.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="tableLayoutPanel1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="panel1" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Absolute,200,Absolute,610" /&gt;&lt;Rows Styles="Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="contextMenuStripPCK.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>154, 17</value>
</metadata>
<data name="deleteToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>108, 22</value>
</data>
<data name="deleteToolStripMenuItem.Text" xml:space="preserve">
<value>Delete</value>
</data>
<data name="exportToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>108, 22</value>
</data>
<data name="exportToolStripMenuItem.Text" xml:space="preserve">
<value>Export</value>
</data>
<data name="contextMenuStripPCK.Size" type="System.Drawing.Size, System.Drawing">
<value>109, 48</value>
</data>
<data name="&gt;&gt;contextMenuStripPCK.Name" xml:space="preserve">
<value>contextMenuStripPCK</value>
</data>
<data name="&gt;&gt;contextMenuStripPCK.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>188, 17</value>
</metadata>
<data name="PSVitaPCKCheckbox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="PSVitaPCKCheckbox.CheckAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>BottomLeft</value>
</data>
<data name="PSVitaPCKCheckbox.Location" type="System.Drawing.Point, System.Drawing">
<value>717, 42</value>
</data>
<data name="PSVitaPCKCheckbox.Size" type="System.Drawing.Size, System.Drawing">
<value>110, 15</value>
</data>
<data name="PSVitaPCKCheckbox.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="PSVitaPCKCheckbox.Text" xml:space="preserve">
<value>PS4/PSVita PCKs</value>
</data>
<data name="&gt;&gt;PSVitaPCKCheckbox.Name" xml:space="preserve">
<value>PSVitaPCKCheckbox</value>
</data>
<data name="&gt;&gt;PSVitaPCKCheckbox.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroCheckBox, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;PSVitaPCKCheckbox.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;PSVitaPCKCheckbox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>850, 635</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>850, 588</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>PCK Center</value>
</data>
<data name="&gt;&gt;deleteToolStripMenuItem.Name" xml:space="preserve">
<value>deleteToolStripMenuItem</value>
</data>
<data name="&gt;&gt;deleteToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;exportToolStripMenuItem.Name" xml:space="preserve">
<value>exportToolStripMenuItem</value>
</data>
<data name="&gt;&gt;exportToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;bindingSource1.Name" xml:space="preserve">
<value>bindingSource1</value>
</data>
<data name="&gt;&gt;bindingSource1.Type" xml:space="preserve">
<value>System.Windows.Forms.BindingSource, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>pckCenter</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>MetroFramework.Forms.MetroForm, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
</root>

View File

@@ -1,177 +0,0 @@
namespace PckStudio.Forms
{
partial class pckCenterOpen
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(pckCenterOpen));
this.buttonDirect = new System.Windows.Forms.Button();
this.labelName = new System.Windows.Forms.Label();
this.labelDesc = new System.Windows.Forms.Label();
this.buttonDelete = new System.Windows.Forms.Button();
this.buttonExport = new System.Windows.Forms.Button();
this.buttonInstallPs3 = new System.Windows.Forms.Button();
this.buttonInstallXbox = new System.Windows.Forms.Button();
this.buttonInstallWiiU = new System.Windows.Forms.Button();
this.pictureBoxDisplay = new System.Windows.Forms.PictureBox();
this.buttonBedrock = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxDisplay)).BeginInit();
this.SuspendLayout();
//
// buttonDirect
//
this.buttonDirect.BackColor = System.Drawing.Color.Purple;
this.buttonDirect.FlatAppearance.BorderSize = 0;
resources.ApplyResources(this.buttonDirect, "buttonDirect");
this.buttonDirect.ForeColor = System.Drawing.Color.White;
this.buttonDirect.Name = "buttonDirect";
this.buttonDirect.UseVisualStyleBackColor = false;
this.buttonDirect.Click += new System.EventHandler(this.buttonDirect_Click);
//
// labelName
//
resources.ApplyResources(this.labelName, "labelName");
this.labelName.ForeColor = System.Drawing.Color.White;
this.labelName.Name = "labelName";
//
// labelDesc
//
resources.ApplyResources(this.labelDesc, "labelDesc");
this.labelDesc.ForeColor = System.Drawing.Color.White;
this.labelDesc.Name = "labelDesc";
//
// buttonDelete
//
this.buttonDelete.BackColor = System.Drawing.Color.Red;
this.buttonDelete.FlatAppearance.BorderSize = 0;
resources.ApplyResources(this.buttonDelete, "buttonDelete");
this.buttonDelete.ForeColor = System.Drawing.Color.White;
this.buttonDelete.Name = "buttonDelete";
this.buttonDelete.UseVisualStyleBackColor = false;
this.buttonDelete.Click += new System.EventHandler(this.buttonDelete_Click);
//
// buttonExport
//
this.buttonExport.BackColor = System.Drawing.Color.SlateGray;
this.buttonExport.FlatAppearance.BorderSize = 0;
resources.ApplyResources(this.buttonExport, "buttonExport");
this.buttonExport.ForeColor = System.Drawing.Color.White;
this.buttonExport.Name = "buttonExport";
this.buttonExport.UseVisualStyleBackColor = false;
this.buttonExport.Click += new System.EventHandler(this.buttonExport_Click);
//
// buttonInstallPs3
//
this.buttonInstallPs3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.buttonInstallPs3.BackgroundImage = global::PckStudio.Properties.Resources.PS3;
resources.ApplyResources(this.buttonInstallPs3, "buttonInstallPs3");
this.buttonInstallPs3.FlatAppearance.BorderSize = 0;
this.buttonInstallPs3.ForeColor = System.Drawing.Color.White;
this.buttonInstallPs3.Name = "buttonInstallPs3";
this.buttonInstallPs3.UseVisualStyleBackColor = false;
this.buttonInstallPs3.Click += new System.EventHandler(this.buttonInstallPs3_Click);
//
// buttonInstallXbox
//
this.buttonInstallXbox.BackColor = System.Drawing.Color.Lime;
this.buttonInstallXbox.BackgroundImage = global::PckStudio.Properties.Resources.Xbox;
resources.ApplyResources(this.buttonInstallXbox, "buttonInstallXbox");
this.buttonInstallXbox.FlatAppearance.BorderSize = 0;
this.buttonInstallXbox.ForeColor = System.Drawing.Color.White;
this.buttonInstallXbox.Name = "buttonInstallXbox";
this.buttonInstallXbox.UseVisualStyleBackColor = false;
this.buttonInstallXbox.Click += new System.EventHandler(this.buttonInstallXbox_Click);
//
// buttonInstallWiiU
//
this.buttonInstallWiiU.BackColor = System.Drawing.Color.DeepSkyBlue;
this.buttonInstallWiiU.BackgroundImage = global::PckStudio.Properties.Resources.WiiU;
resources.ApplyResources(this.buttonInstallWiiU, "buttonInstallWiiU");
this.buttonInstallWiiU.FlatAppearance.BorderSize = 0;
this.buttonInstallWiiU.ForeColor = System.Drawing.Color.White;
this.buttonInstallWiiU.Name = "buttonInstallWiiU";
this.buttonInstallWiiU.UseVisualStyleBackColor = false;
this.buttonInstallWiiU.Click += new System.EventHandler(this.buttonInstallWiiU_Click);
//
// pictureBoxDisplay
//
resources.ApplyResources(this.pictureBoxDisplay, "pictureBoxDisplay");
this.pictureBoxDisplay.Name = "pictureBoxDisplay";
this.pictureBoxDisplay.TabStop = false;
//
// buttonBedrock
//
this.buttonBedrock.BackColor = System.Drawing.Color.Green;
this.buttonBedrock.FlatAppearance.BorderSize = 0;
resources.ApplyResources(this.buttonBedrock, "buttonBedrock");
this.buttonBedrock.ForeColor = System.Drawing.Color.White;
this.buttonBedrock.Name = "buttonBedrock";
this.buttonBedrock.UseVisualStyleBackColor = false;
this.buttonBedrock.Click += new System.EventHandler(this.convertToBedrockToolStripMenuItem_Click);
//
// pckCenterOpen
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle;
this.Controls.Add(this.buttonDirect);
this.Controls.Add(this.buttonBedrock);
this.Controls.Add(this.buttonInstallPs3);
this.Controls.Add(this.buttonInstallXbox);
this.Controls.Add(this.buttonInstallWiiU);
this.Controls.Add(this.buttonExport);
this.Controls.Add(this.buttonDelete);
this.Controls.Add(this.labelDesc);
this.Controls.Add(this.labelName);
this.Controls.Add(this.pictureBoxDisplay);
this.MaximizeBox = false;
this.Name = "pckCenterOpen";
this.Resizable = false;
this.ShadowType = MetroFramework.Forms.MetroFormShadowType.DropShadow;
this.Style = MetroFramework.MetroColorStyle.White;
this.Theme = MetroFramework.MetroThemeStyle.Dark;
this.Load += new System.EventHandler(this.pckCenterOpen_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBoxDisplay)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox pictureBoxDisplay;
private System.Windows.Forms.Button buttonDirect;
private System.Windows.Forms.Label labelName;
private System.Windows.Forms.Label labelDesc;
private System.Windows.Forms.Button buttonDelete;
private System.Windows.Forms.Button buttonExport;
private System.Windows.Forms.Button buttonInstallWiiU;
private System.Windows.Forms.Button buttonInstallXbox;
private System.Windows.Forms.Button buttonInstallPs3;
private System.Windows.Forms.Button buttonBedrock;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,142 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="buttonDirect.Text" xml:space="preserve">
<value>コレクションにダウンロード</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="labelName.Size" type="System.Drawing.Size, System.Drawing">
<value>134, 31</value>
</data>
<data name="labelName.Text" xml:space="preserve">
<value>スキンパック</value>
</data>
<data name="labelDesc.Text" xml:space="preserve">
<value>ラベルの説明</value>
</data>
<data name="buttonDelete.Text" xml:space="preserve">
<value>削除</value>
</data>
<data name="buttonExport.Text" xml:space="preserve">
<value>取得する</value>
</data>
<data name="buttonBedrock.Text" xml:space="preserve">
<value>Bedrockに変換</value>
</data>
</root>

View File

@@ -1,432 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="buttonDirect.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="buttonDirect.Location" type="System.Drawing.Point, System.Drawing">
<value>568, 338</value>
</data>
<data name="buttonDirect.Size" type="System.Drawing.Size, System.Drawing">
<value>169, 67</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="buttonDirect.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="buttonDirect.Text" xml:space="preserve">
<value>DOWNLOAD TO COLLECTION</value>
</data>
<data name="buttonDirect.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;buttonDirect.Name" xml:space="preserve">
<value>buttonDirect</value>
</data>
<data name="&gt;&gt;buttonDirect.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonDirect.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;buttonDirect.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="labelName.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelName.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 20.25pt</value>
</data>
<data name="labelName.Location" type="System.Drawing.Point, System.Drawing">
<value>24, 24</value>
</data>
<data name="labelName.Size" type="System.Drawing.Size, System.Drawing">
<value>135, 31</value>
</data>
<data name="labelName.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="labelName.Text" xml:space="preserve">
<value>Skin Pack</value>
</data>
<data name="&gt;&gt;labelName.Name" xml:space="preserve">
<value>labelName</value>
</data>
<data name="&gt;&gt;labelName.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelName.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;labelName.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="labelDesc.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 12pt</value>
</data>
<data name="labelDesc.Location" type="System.Drawing.Point, System.Drawing">
<value>384, 64</value>
</data>
<data name="labelDesc.Size" type="System.Drawing.Size, System.Drawing">
<value>353, 222</value>
</data>
<data name="labelDesc.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="labelDesc.Text" xml:space="preserve">
<value>labelDesc</value>
</data>
<data name="&gt;&gt;labelDesc.Name" xml:space="preserve">
<value>labelDesc</value>
</data>
<data name="&gt;&gt;labelDesc.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelDesc.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;labelDesc.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="buttonDelete.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="buttonDelete.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 12pt</value>
</data>
<data name="buttonDelete.Location" type="System.Drawing.Point, System.Drawing">
<value>384, 338</value>
</data>
<data name="buttonDelete.Size" type="System.Drawing.Size, System.Drawing">
<value>178, 66</value>
</data>
<data name="buttonDelete.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="buttonDelete.Text" xml:space="preserve">
<value>Delete</value>
</data>
<data name="&gt;&gt;buttonDelete.Name" xml:space="preserve">
<value>buttonDelete</value>
</data>
<data name="&gt;&gt;buttonDelete.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonDelete.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;buttonDelete.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="buttonExport.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="buttonExport.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 12pt</value>
</data>
<data name="buttonExport.Location" type="System.Drawing.Point, System.Drawing">
<value>495, 256</value>
</data>
<data name="buttonExport.Size" type="System.Drawing.Size, System.Drawing">
<value>45, 30</value>
</data>
<data name="buttonExport.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="buttonExport.Text" xml:space="preserve">
<value>Get</value>
</data>
<data name="&gt;&gt;buttonExport.Name" xml:space="preserve">
<value>buttonExport</value>
</data>
<data name="&gt;&gt;buttonExport.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonExport.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;buttonExport.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="buttonInstallPs3.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Stretch</value>
</data>
<data name="buttonInstallPs3.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="buttonInstallPs3.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 12pt</value>
</data>
<data name="buttonInstallPs3.Location" type="System.Drawing.Point, System.Drawing">
<value>460, 256</value>
</data>
<data name="buttonInstallPs3.Size" type="System.Drawing.Size, System.Drawing">
<value>30, 30</value>
</data>
<data name="buttonInstallPs3.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="&gt;&gt;buttonInstallPs3.Name" xml:space="preserve">
<value>buttonInstallPs3</value>
</data>
<data name="&gt;&gt;buttonInstallPs3.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonInstallPs3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;buttonInstallPs3.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="buttonInstallXbox.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Stretch</value>
</data>
<data name="buttonInstallXbox.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="buttonInstallXbox.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 12pt</value>
</data>
<data name="buttonInstallXbox.Location" type="System.Drawing.Point, System.Drawing">
<value>424, 256</value>
</data>
<data name="buttonInstallXbox.Size" type="System.Drawing.Size, System.Drawing">
<value>30, 30</value>
</data>
<data name="buttonInstallXbox.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="&gt;&gt;buttonInstallXbox.Name" xml:space="preserve">
<value>buttonInstallXbox</value>
</data>
<data name="&gt;&gt;buttonInstallXbox.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonInstallXbox.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;buttonInstallXbox.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="buttonInstallWiiU.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="buttonInstallWiiU.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="buttonInstallWiiU.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 12pt</value>
</data>
<data name="buttonInstallWiiU.Location" type="System.Drawing.Point, System.Drawing">
<value>388, 256</value>
</data>
<data name="buttonInstallWiiU.Size" type="System.Drawing.Size, System.Drawing">
<value>30, 30</value>
</data>
<data name="buttonInstallWiiU.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="&gt;&gt;buttonInstallWiiU.Name" xml:space="preserve">
<value>buttonInstallWiiU</value>
</data>
<data name="&gt;&gt;buttonInstallWiiU.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonInstallWiiU.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;buttonInstallWiiU.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="pictureBoxDisplay.Location" type="System.Drawing.Point, System.Drawing">
<value>24, 64</value>
</data>
<data name="pictureBoxDisplay.Size" type="System.Drawing.Size, System.Drawing">
<value>341, 341</value>
</data>
<data name="pictureBoxDisplay.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>StretchImage</value>
</data>
<data name="pictureBoxDisplay.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;pictureBoxDisplay.Name" xml:space="preserve">
<value>pictureBoxDisplay</value>
</data>
<data name="&gt;&gt;pictureBoxDisplay.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBoxDisplay.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;pictureBoxDisplay.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="buttonBedrock.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="buttonBedrock.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 12pt</value>
</data>
<data name="buttonBedrock.Location" type="System.Drawing.Point, System.Drawing">
<value>388, 293</value>
</data>
<data name="buttonBedrock.Size" type="System.Drawing.Size, System.Drawing">
<value>152, 30</value>
</data>
<data name="buttonBedrock.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="buttonBedrock.Text" xml:space="preserve">
<value>Convert to Bedrock</value>
</data>
<data name="&gt;&gt;buttonBedrock.Name" xml:space="preserve">
<value>buttonBedrock</value>
</data>
<data name="&gt;&gt;buttonBedrock.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonBedrock.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;buttonBedrock.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>760, 418</value>
</data>
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>CenterParent</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>pckCenterOpen</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>MetroFramework.Forms.MetroForm, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
</root>

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OMI.Formats.Pck;
namespace PckStudio.Interfaces
{
internal interface IPckDeserializer<T>
{
public T Deserialize(PckFileData file);
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OMI.Formats.Pck;
namespace PckStudio.Interfaces
{
internal interface IPckFileSerializer<T>
{
public void Serialize(T obj, ref PckFileData file);
}
}

View File

@@ -25,44 +25,24 @@ using System.Linq;
namespace PckStudio.Internal
{
internal sealed class Animation
public sealed class Animation
{
public const int MinimumFrameTime = 1;
public const int GameTickInMilliseconds = 50;
public static Animation Empty(AnimationCategory category)
{
var animation = new Animation(Array.Empty<Image>(), string.Empty);
animation.Category = category;
return animation;
}
public int FrameCount => frames.Count;
public int TextureCount => textures.Count;
public bool Interpolate { get; set; } = false;
public AnimationCategory Category { get; set; }
public string CategoryString => GetCategoryName(Category);
public static string GetCategoryName(AnimationCategory category)
{
return category switch
{
AnimationCategory.Items => "items",
AnimationCategory.Blocks => "blocks",
_ => throw new ArgumentOutOfRangeException(category.ToString())
};
}
private readonly List<Image> textures;
private readonly IList<Frame> frames = new List<Frame>();
private object _syncLock = new object();
public Animation(IEnumerable<Image> textures)
{
this.textures = new List<Image>(textures);
@@ -215,7 +195,7 @@ namespace PckStudio.Internal
public void SetFrame(int frameIndex, Frame frame)
{
lock(frames)
lock(_syncLock)
{
frames[frameIndex] = frame;
}
@@ -245,7 +225,7 @@ namespace PckStudio.Internal
internal void SetFrameTicks(int ticks)
{
lock(frames)
lock(_syncLock)
{
foreach (var frame in frames)
{
@@ -256,10 +236,15 @@ namespace PckStudio.Internal
internal void SwapFrames(int sourceIndex, int destinationIndex)
{
lock(frames)
lock(_syncLock)
{
frames.Swap(sourceIndex, destinationIndex);
}
}
internal static Animation CreateEmpty()
{
return new Animation(Array.Empty<Image>());
}
}
}

View File

@@ -25,7 +25,7 @@ namespace PckStudio.Internal
{
// this is to specify which build release this is. This is manually updated for now
// TODO: add different chars for different configurations
private const string BuildType = "b";
private const string BuildType = "c";
private static System.Globalization.Calendar _buildCalendar;
private static DateTime date = new FileInfo(Assembly.GetExecutingAssembly().Location).LastWriteTime;
private static string _betaBuildVersion;

View File

@@ -2,28 +2,21 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using OMI.Formats.Pck;
using PckStudio.Extensions;
using PckStudio.Internal;
using PckStudio.Interfaces;
namespace PckStudio.Helper
namespace PckStudio.Internal.Deserializer
{
internal static class AnimationHelper
internal sealed class AnimationDeserializer : IPckDeserializer<Animation>
{
internal static void SaveAnimationToFile(PckFileData file, Animation animation)
{
string anim = animation.BuildAnim();
file.SetProperty("ANIM", anim);
var texture = animation.BuildTexture();
file.SetData(texture, ImageFormat.Png);
}
internal static Animation GetAnimationFromFile(PckFileData file)
public static readonly AnimationDeserializer DefaultDeserializer = new AnimationDeserializer();
public Animation Deserialize(PckFileData file)
{
_ = file ?? throw new ArgumentNullException(nameof(file));
if (file.Size > 0)
@@ -31,25 +24,20 @@ namespace PckStudio.Helper
var texture = file.GetTexture();
var frameTextures = texture.Split(ImageLayoutDirection.Vertical);
var _animation = new Animation(frameTextures, file.GetProperty("ANIM"));
_animation.Category = file.Filename.Split('/').Contains("items")
? AnimationCategory.Items
: AnimationCategory.Blocks;
return _animation;
}
return Animation.Empty(file.Filename.Split('/').Contains("items")
? AnimationCategory.Items
: AnimationCategory.Blocks);
return Animation.CreateEmpty();
}
internal static Animation GetAnimationFromJavaAnimation(JObject jsonObject, Image texture)
public Animation DeserializeJavaAnimation(JObject jsonObject, Image texture)
{
var textures = texture.Split(ImageLayoutDirection.Vertical);
Animation result = new Animation(textures);
if (jsonObject["animation"] is not JToken animation)
return result;
int frameTime = Animation.MinimumFrameTime;
if (animation["frametime"] is JToken frametime_token && frametime_token.Type == JTokenType.Integer)
frameTime = (int)frametime_token;
@@ -60,12 +48,12 @@ namespace PckStudio.Helper
{
foreach (JToken frame in frames_token.Children())
{
if (frame.Type == JTokenType.Object &&
if (frame.Type == JTokenType.Object &&
frame["index"] is JToken frame_index &&
frame_index.Type == JTokenType.Integer &&
frame["time"] is JToken frame_time &&
frame_time.Type == JTokenType.Integer)
{
{
Debug.WriteLine("Index: {0}, Time: {1}", frame_index, frame_time);
result.AddFrame((int)frame_index, (int)frame_time);
}

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OMI.Formats.Pck;
using PckStudio.Interfaces;
using PckStudio.IO.TGA;
namespace PckStudio.Internal.Deserializer
{
internal sealed class ImageDeserializer : IPckDeserializer<Image>
{
public static readonly ImageDeserializer DefaultDeserializer = new ImageDeserializer();
private static Image EmptyImage = new Bitmap(1, 1, PixelFormat.Format32bppArgb);
public Image Deserialize(PckFileData file)
{
using var stream = new MemoryStream(file.Data);
try
{
if (Path.GetExtension(file.Filename) == ".tga")
return TGADeserializer.DeserializeFromStream(stream);
else
return Image.FromStream(stream);
}
catch (Exception ex)
{
Trace.TraceError($"Failed to read image from pck file data({file.Filename}).");
Debug.WriteLine(ex.Message);
return EmptyImage;
}
}
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Newtonsoft.Json;
using PckStudio.Extensions;
using PckStudio.Properties;
namespace PckStudio.Internal.Json
{
internal class JsonEntities
{
[JsonProperty("entries")]
public List<EntityInfo> Entries { get; set; }
}
internal static class Entities
{
private static JsonEntities _jsonModelData, _jsonMaterialData, _jsonBehaviourData;
internal static JsonEntities JsonModelData => _jsonModelData ??= JsonConvert.DeserializeObject<JsonEntities>(Resources.entityModelsData);
internal static JsonEntities JsonMaterialData => _jsonMaterialData ??= JsonConvert.DeserializeObject<JsonEntities>(Resources.entityMaterialsData);
internal static JsonEntities JsonBehaviourData => _jsonBehaviourData ??= JsonConvert.DeserializeObject<JsonEntities>(Resources.entityBehavioursData);
internal static List<EntityInfo> ModelInfos => JsonModelData.Entries;
internal static List<EntityInfo> MaterialInfos => JsonMaterialData.Entries;
internal static List<EntityInfo> BehaviourInfos => JsonBehaviourData.Entries;
}
}

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace PckStudio.Internal.Json
{
internal class EntityInfo
{
[JsonProperty("displayName")]
public string DisplayName { get; set; }
[JsonProperty("internalName")]
public string InternalName { get; set; }
public EntityInfo(string displayName, string internalName)
{
DisplayName = displayName;
InternalName = internalName;
}
}
}

View File

@@ -18,9 +18,10 @@
namespace PckStudio.Internal
{
internal enum AnimationCategory
internal enum ResourceCategory
{
Items,
Blocks
Unknown = -1,
ItemAnimation,
BlockAnimation
}
}

View File

@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PckStudio.Internal
{
internal class ResourceLocation
{
public static string GetPathFromCategory(ResourceCategory category)
{
return category switch
{
ResourceCategory.ItemAnimation => "res/textures/items",
ResourceCategory.BlockAnimation => "res/textures/blocks",
_ => string.Empty
};
}
public static ResourceCategory GetCategoryFromPath(string path)
{
if (string.IsNullOrWhiteSpace(path) || !path.StartsWith("res/"))
return ResourceCategory.Unknown;
if (path.StartsWith("res/textures/items"))
return ResourceCategory.ItemAnimation;
if (path.StartsWith("res/textures/blocks"))
return ResourceCategory.BlockAnimation;
return ResourceCategory.Unknown;
}
}
}

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using OMI.Formats.Pck;
using PckStudio.Extensions;
using PckStudio.Interfaces;
namespace PckStudio.Internal.Serializer
{
internal sealed class AnimationSerializer : IPckFileSerializer<Animation>
{
public static readonly AnimationSerializer DefaultSerializer = new AnimationSerializer();
public void Serialize(Animation animation, ref PckFileData file)
{
string anim = animation.BuildAnim();
file.SetProperty("ANIM", anim);
var texture = animation.BuildTexture();
file.SetTexture(texture);
}
}
}

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OMI.Formats.Pck;
using PckStudio.Interfaces;
using PckStudio.IO.TGA;
namespace PckStudio.Internal.Serializer
{
internal sealed class ImageSerializer : IPckFileSerializer<Image>
{
public static readonly ImageSerializer DefaultSerializer = new ImageSerializer();
public void Serialize(Image obj, ref PckFileData file)
{
var stream = new MemoryStream();
try
{
if (Path.GetExtension(file.Filename) == ".tga")
TGASerializer.SerializeToStream(stream, obj);
else
obj.Save(stream, ImageFormat.Png);
file.SetData(stream.ToArray());
}
catch (Exception ex)
{
Trace.TraceError($"Failed to serialize image to pck file data({file.Filename}).");
Debug.WriteLine(ex.Message);
}
}
}
}

View File

@@ -96,21 +96,6 @@
this.openPckCenterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.joinDevelopmentDiscordToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.trelloBoardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.videosToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.howToMakeABasicSkinPackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.howToMakeACustomSkinModelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.howToMakeCustomSkinModelsbedrockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.howToMakeCustomMusicToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.howToInstallPcksDirectlyToWiiUToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pckCenterReleaseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.howPCKsWorkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.donateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toNobledezJackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toPhoenixARCDeveloperToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.forMattNLContributorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuMetaTree = new System.Windows.Forms.ContextMenuStrip(this.components);
this.addEntryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addEntryToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
@@ -573,7 +558,7 @@
//
// openPckCenterToolStripMenuItem
//
this.openPckCenterToolStripMenuItem.Image = global::PckStudio.Properties.Resources.pckCenterHeader;
this.openPckCenterToolStripMenuItem.Image = global::PckStudio.Properties.Resources.NoImageFound;
this.openPckCenterToolStripMenuItem.Name = "openPckCenterToolStripMenuItem";
resources.ApplyResources(this.openPckCenterToolStripMenuItem, "openPckCenterToolStripMenuItem");
this.openPckCenterToolStripMenuItem.Click += new System.EventHandler(this.openPckCenterToolStripMenuItem_Click);

View File

@@ -12,10 +12,12 @@ using OMI.Formats.Archive;
using OMI.Formats.Pck;
using OMI.Formats.GameRule;
using OMI.Formats.Languages;
using OMI.Formats.Model;
using OMI.Workers.Archive;
using OMI.Workers.Pck;
using OMI.Workers.GameRule;
using OMI.Workers.Language;
using OMI.Workers.Model;
using PckStudio.Properties;
using PckStudio.Forms;
using PckStudio.Forms.Editor;
@@ -117,42 +119,11 @@ namespace PckStudio
return TryGetEditor(tabControl.SelectedTab, out editor);
}
#region drag and drop for main tree node
// Most of the code below is modified code from this link: https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.treeview.itemdrag?view=windowsdesktop-6.0
// - MattNL
private void treeViewMain_ItemDrag(object sender, ItemDragEventArgs e)
{
}
// Set the target drop effect to the effect
// specified in the ItemDrag event handler.
private void treeViewMain_DragEnter(object sender, DragEventArgs e)
{
e.Effect = e.AllowedEffect;
}
// Select the node under the mouse pointer to indicate the
// expected drop location.
private void treeViewMain_DragOver(object sender, DragEventArgs e)
{
}
private void treeViewMain_DragDrop(object sender, DragEventArgs e)
{
}
#endregion
private PckFile InitializePack(int packId, int packVersion, string packName, bool createSkinsPCK)
private PckFile InitializePack(int packId, int packVersion, string packName, bool createSkinsPCK)
{
var pack = new PckFile(3);
var zeroFile = pack.CreateNewFile("0", PckFileType.InfoFile);
PckFileData zeroFile = pack.CreateNewFile("0", PckFileType.InfoFile);
zeroFile.AddProperty("PACKID", packId);
zeroFile.AddProperty("PACKVERSION", packVersion);
@@ -173,14 +144,13 @@ namespace PckStudio
var pack = InitializePack(packId, packVersion, packName, createSkinsPCK);
PckFile infoPCK = new PckFile(3);
var icon = infoPCK.CreateNewFile("icon.png", PckFileType.TextureFile);
icon.SetData(Resources.TexturePackIcon, ImageFormat.Png);
PckFileData icon = infoPCK.CreateNewFile("icon.png", PckFileType.TextureFile);
icon.SetTexture(Resources.TexturePackIcon);
var comparison = infoPCK.CreateNewFile("comparison.png", PckFileType.TextureFile);
comparison.SetData(Resources.Comparison, ImageFormat.Png);
var texturepackInfo = pack.CreateNewFile($"{res}/{res}Info.pck", PckFileType.TexturePackInfoFile);
PckFileData comparison = infoPCK.CreateNewFile("comparison.png", PckFileType.TextureFile);
comparison.SetTexture(Resources.Comparison);
PckFileData texturepackInfo = pack.CreateNewFile($"{res}/{res}Info.pck", PckFileType.TexturePackInfoFile);
texturepackInfo.AddProperty("PACKID", "0");
texturepackInfo.AddProperty("DATAPATH", $"{res}Data.pck");
@@ -191,9 +161,9 @@ namespace PckStudio
private PckFile InitializeMashUpPack(int packId, int packVersion, string packName, string res)
{
var pack = InitializeTexturePack(packId, packVersion, packName, res, true);
var gameRuleFile = pack.CreateNewFile("GameRules.grf", PckFileType.GameRulesFile);
var grfFile = new GameRuleFile();
PckFile pack = InitializeTexturePack(packId, packVersion, packName, res, true);
PckFileData gameRuleFile = pack.CreateNewFile("GameRules.grf", PckFileType.GameRulesFile);
GameRuleFile grfFile = new GameRuleFile();
grfFile.AddRule("MapOptions",
new KeyValuePair<string, string>("seed", "0"),
new KeyValuePair<string, string>("baseSaveName", string.Empty),
@@ -218,7 +188,7 @@ namespace PckStudio
{
TextPrompt namePrompt = new TextPrompt();
namePrompt.OKButtonText = "Ok";
if (namePrompt.ShowDialog() == DialogResult.OK)
if (namePrompt.ShowDialog(this) == DialogResult.OK)
{
var currentPCK = InitializePack(new Random().Next(8000, int.MaxValue), 0, namePrompt.NewText, true);
AddEditorPage(currentPCK);
@@ -376,7 +346,7 @@ namespace PckStudio
{
if (!HasDataFolder())
{
DialogResult result = MessageBox.Show("There is not a \"Data\" folder present in the pack folder. Would you like to create one?", "Folder missing", MessageBoxButtons.YesNo);
DialogResult result = MessageBox.Show(this, "There is not a \"Data\" folder present in the pack folder. Would you like to create one?", "Folder missing", MessageBoxButtons.YesNo);
if (result == DialogResult.No) return false;
else Directory.CreateDirectory(GetDataPath());
}
@@ -476,9 +446,9 @@ namespace PckStudio
{
pckOpen.Image = Resources.pckDrop;
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
foreach (var file in files)
foreach (string file in files)
{
var ext = Path.GetExtension(file);
string ext = Path.GetExtension(file);
if (ext.Equals(".pck", StringComparison.CurrentCultureIgnoreCase))
e.Effect = DragDropEffects.Copy;
return;
@@ -522,23 +492,6 @@ namespace PckStudio
Process.Start("https://trello.com/b/0XLNOEbe/pck-studio");
}
private void openPckManagerToolStripMenuItem_Click(object sender, EventArgs e)
{
PckManager ??= new PckManager();
PckManager.FormClosing += (s, e) =>
{
PckManager.Hide();
e.Cancel = true;
};
if (!PckManager.Visible)
{
PckManager.Show();
PckManager.BringToFront();
}
if (PckManager.Focus())
PckManager.BringToFront();
}
private void wavBinkaToolStripMenuItem_Click(object sender, EventArgs e)
{
using OpenFileDialog fileDialog = new OpenFileDialog
@@ -547,9 +500,24 @@ namespace PckStudio
Filter = "WAV files (*.wav)|*.wav",
Title = "Please choose WAV files to convert to BINKA"
};
if (fileDialog.ShowDialog() == DialogResult.OK)
if (fileDialog.ShowDialog(this) == DialogResult.OK)
{
BinkaConverter.ToBinka(fileDialog.FileNames, new DirectoryInfo(Path.GetDirectoryName(fileDialog.FileName)));
using ItemSelectionPopUp dialog = new ItemSelectionPopUp(
"Level 1 (Best Quality)", "Level 2", "Level 3", "Level 4", "Level 5",
"Level 6", "Level 7", "Level 8", "Level 9 (Worst Quality)")
{
LabelText = "Compression",
ButtonText = "OK"
};
if(dialog.ShowDialog(this) == DialogResult.OK)
{
BinkaConverter.ToBinka(
fileDialog.FileNames,
new DirectoryInfo(Path.GetDirectoryName(fileDialog.FileName)),
dialog.SelectedIndex + 1 // compression level
);
}
}
}
@@ -561,7 +529,7 @@ namespace PckStudio
Filter = "BINKA files (*.binka)|*.binka",
Title = "Please choose BINKA files to convert to WAV"
};
if (fileDialog.ShowDialog() == DialogResult.OK)
if (fileDialog.ShowDialog(this) == DialogResult.OK)
{
BinkaConverter.ToWav(fileDialog.FileNames, new DirectoryInfo(Path.GetDirectoryName(fileDialog.FileName)));
}
@@ -613,7 +581,20 @@ namespace PckStudio
closeAllToolStripMenuItem.Visible = false;
}
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
private void openPckManagerToolStripMenuItem_Click(object sender, EventArgs e)
{
PckManager ??= new PckManager();
PckManager.FormClosing += (s, e) => PckManager = null;
if (!PckManager.Visible)
{
// Passing in a parent form will make it stay on top of every other form. -miku
PckManager.Show();
}
if (PckManager.Focus())
PckManager.BringToFront();
}
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
PckManager?.Close();
closeAllToolStripMenuItem_Click(sender, e);

View File

@@ -133,11 +133,22 @@
<Reference Include="WindowsFormsIntegration" />
</ItemGroup>
<ItemGroup>
<Compile Include="Classes\IO\TGA\TGADeserializer.cs" />
<Compile Include="Classes\IO\TGA\TGASerializer.cs" />
<Compile Include="Extensions\LocFileExtensions.cs" />
<Compile Include="Extensions\PckFileDataExtensions.cs" />
<Compile Include="Extensions\TreeNodeExtensions.cs" />
<Compile Include="Helper\AnimationHelper.cs" />
<Compile Include="Internal\AnimationCategory.cs" />
<Compile Include="Internal\Deserializer\ImageDeserializer.cs" />
<Compile Include="Internal\Serializer\AnimationSerializer.cs" />
<Compile Include="Internal\Deserializer\AnimationDeserializer.cs" />
<Compile Include="Interfaces\IPckDeserializer.cs" />
<Compile Include="Interfaces\IPckFileSerializer.cs" />
<Compile Include="Internal\Json\Entities.cs" />
<Compile Include="Internal\Json\EntityInfo.cs" />
<Compile Include="Internal\ResourceCategory.cs" />
<Compile Include="Internal\CommitInfo.cs" />
<Compile Include="Internal\ResourceLocation.cs" />
<Compile Include="Internal\Serializer\ImageSerializer.cs" />
<Compile Include="Internal\SkinAnimFlag.cs" />
<Compile Include="Internal\SkinAnimMask.cs" />
<Compile Include="Properties\Resources.Designer.cs">
@@ -256,7 +267,14 @@
<Compile Include="Features\WiiUPanel.Designer.cs">
<DependentUpon>WiiUPanel.cs</DependentUpon>
</Compile>
<Compile Include="Internal\CommitInfo.cs" />
<Compile Include="Classes\IO\TGA\TGAFileData.cs" />
<Compile Include="Classes\IO\TGA\TGADataTypeCode.cs" />
<Compile Include="Classes\IO\TGA\TGAException.cs" />
<Compile Include="Classes\IO\TGA\TGAExtentionData.cs" />
<Compile Include="Classes\IO\TGA\TGAFooter.cs" />
<Compile Include="Classes\IO\TGA\TGAHeader.cs" />
<Compile Include="Classes\IO\TGA\TGAReader.cs" />
<Compile Include="Classes\IO\TGA\TGAWriter.cs" />
<Compile Include="Forms\Additional-Popups\EntityForms\AddEntry.cs">
<SubType>Form</SubType>
</Compile>
@@ -431,30 +449,6 @@
<Compile Include="Forms\Editor\AudioEditor.Designer.cs">
<DependentUpon>AudioEditor.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Utilities\pckCenter.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\Utilities\pckCenter.Designer.cs">
<DependentUpon>pckCenter.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Utilities\PckCenterBeta.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\Utilities\PckCenterBeta.Designer.cs">
<DependentUpon>PckCenterBeta.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Utilities\pckCenterOpen.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\Utilities\pckCenterOpen.Designer.cs">
<DependentUpon>pckCenterOpen.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Utilities\TextureConverterUtility.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\Utilities\TextureConverterUtility.Designer.cs">
<DependentUpon>TextureConverterUtility.cs</DependentUpon>
</Compile>
<Compile Include="Internal\PckNodeSorter.cs" />
<Compile Include="Program.cs" />
<Compile Include="Forms\CreditsForm.cs">
@@ -600,25 +594,6 @@
<DependentUpon>AudioEditor.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Utilities\pckCenter.ja.resx">
<DependentUpon>pckCenter.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Utilities\pckCenter.resx">
<DependentUpon>pckCenter.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Utilities\PckCenterBeta.resx">
<DependentUpon>PckCenterBeta.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Utilities\pckCenterOpen.ja.resx">
<DependentUpon>pckCenterOpen.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Utilities\pckCenterOpen.resx">
<DependentUpon>pckCenterOpen.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Utilities\TextureConverterUtility.resx">
<DependentUpon>TextureConverterUtility.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\CreditsForm.resx">
<DependentUpon>CreditsForm.cs</DependentUpon>
</EmbeddedResource>
@@ -645,7 +620,9 @@
<ItemGroup>
<None Include="Resources\atlases\bannerData.json" />
<None Include="Resources\atlases\blockData.json" />
<None Include="Resources\atlases\entityData.json" />
<None Include="Resources\atlases\entityBehavioursData.json" />
<None Include="Resources\atlases\entityMaterialsData.json" />
<None Include="Resources\atlases\entityModelsData.json" />
<None Include="Resources\atlases\experienceOrbData.json" />
<None Include="Resources\atlases\explosionData.json" />
<None Include="Resources\atlases\itemData.json" />
@@ -681,7 +658,6 @@
<None Include="Resources\Splash.png" />
<None Include="Resources\pckOpen.png" />
<None Include="Resources\pckDrop.png" />
<None Include="Resources\pckCenterHeader.png" />
<None Include="Resources\binka\binka_encode.exe" />
<None Include="Resources\binka\mss32.dll" />
<None Include="Resources\anim_editor\classic_template.png" />
@@ -711,6 +687,7 @@
<None Include="Resources\atlases\particles.png" />
<None Include="Resources\atlases\paintings.png" />
<Content Include="Resources\atlases\terrain.png" />
<None Include="Resources\external\trello.png" />
<Content Include="Resources\icons\file_delete.png" />
<Content Include="Resources\icons\file_empty.png" />
<None Include="Resources\icons\file_export.png" />

View File

@@ -59,6 +59,7 @@ namespace PckStudio
{
bool updateAvailable = Updater.IsUpdateAvailable(Application.ProductVersion);
if (updateAvailable && MessageBox.Show(
MainInstance ?? null,
"New update available.\n" +
message,
"Update Available",

View File

@@ -7,10 +7,10 @@ using System.Security.Permissions;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("PCK Studio")]
[assembly: AssemblyTitle("Pck Studio")]
[assembly: AssemblyDescription("A Minecraft Legacy Console .pck Editor")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Nobledez & PhoenixARC")]
[assembly: AssemblyCompany("PCK-Studio")]
[assembly: AssemblyProduct("PCK-Studio")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyCulture("")]

View File

@@ -103,33 +103,28 @@ namespace PckStudio.Properties {
/// <summary>
/// Looks up a localized string similar to {
/// &quot;COMMENT_1&quot;: &quot;JSON by MattNL&quot;,
/// &quot;banners&quot;: [
/// &quot;entries&quot;: [
/// {
/// &quot;internalName&quot;: &quot;base&quot;,
/// &quot;displayName&quot;: &quot;Base&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;border&quot;,
/// &quot;displayName&quot;: &quot;Bordure&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;bricks&quot;,
/// &quot;displayName&quot;: &quot;Field Masoned&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;circle&quot;,
/// &quot;displayName&quot;: &quot;Roundel&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;creeper&quot;,
/// &quot;displayName&quot;: &quot;Creeper Charge&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;cross&quot;,
/// &quot;displayName&quot;: &quot;Saltire&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;curly_bo [rest of string was truncated]&quot;;.
/// &quot;displayName&quot;: &quot;Base&quot;,
/// &quot;hasColourEntry&quot;: true,
/// &quot;colourEntry&quot;: {
/// &quot;defaultName&quot;: &quot;Banner_White&quot;,
/// &quot;variants&quot;: [
/// &quot;Banner_Black&quot;,
/// &quot;Banner_Blue&quot;,
/// &quot;Banner_Brown&quot;,
/// &quot;Banner_Cyan&quot;,
/// &quot;Banner_Gray&quot;,
/// &quot;Banner_Green&quot;,
/// &quot;Banner_Light_Blue&quot;,
/// &quot;Banner_Lime&quot;,
/// &quot;Banner_Magenta&quot;,
/// &quot;Banner_Orange&quot;,
/// &quot;Banner_Pink&quot;,
/// &quot;Banner_Purple&quot;,
/// &quot;Banner_Red&quot;,
/// &quot;Ban [rest of string was truncated]&quot;;.
/// </summary>
public static string bannerData {
get {
@@ -201,7 +196,7 @@ namespace PckStudio.Properties {
/// Looks up a localized string similar to {
/// &quot;COMMENT_1&quot;: &quot;Tile data research by MattNL&quot;,
/// &quot;COMMENT_2&quot;: &quot;JSON by PhoenixARC, MattNL, and NessieHax (Miku-666)&quot;,
/// &quot;blocks&quot;: [
/// &quot;entries&quot;: [
/// {
/// &quot;internalName&quot;: &quot;grass_top&quot;,
/// &quot;displayName&quot;: &quot;Grass Block (Top)&quot;,
@@ -221,7 +216,7 @@ namespace PckStudio.Properties {
/// &quot;displayName&quot;: &quot;Stone&quot;
/// },
/// {
/// &quot;internalName&quot;: [rest of string was truncated]&quot;;.
/// &quot;internalName&quot;: [rest of string was truncated]&quot;;.
/// </summary>
public static string blockData {
get {
@@ -344,32 +339,110 @@ namespace PckStudio.Properties {
/// <summary>
/// Looks up a localized string similar to {
/// &quot;COMMENT&quot;: &quot;Entity data research by NessieHax (Miku-666) and MattNL&quot;,
/// &quot;models&quot;: [
/// { &quot;&quot;: &quot;&quot; },
/// { &quot;&quot;: &quot;&quot; },
/// { &quot;&quot;: &quot;&quot; },
/// { &quot;bat&quot;: &quot;Bat&quot; },
/// { &quot;blaze&quot;: &quot;Blaze&quot; },
/// { &quot;boat&quot;: &quot;Boat&quot; },
/// { &quot;cat&quot;: &quot;Cat (PS4 EXCLUSIVE)&quot; },
/// { &quot;&quot;: &quot;&quot; },
/// { &quot;&quot;: &quot;&quot; },
/// { &quot;chicken&quot;: &quot;Chicken&quot; },
/// { &quot;cod&quot;: &quot;Cod&quot; },
/// { &quot;&quot;: &quot;&quot; },
/// { &quot;cow&quot;: &quot;Cow&quot; },
/// { &quot;creeper&quot;: &quot;Creeper&quot; },
/// { &quot;dolphin&quot;: &quot;Dolphin&quot; },
/// { &quot;&quot;: &quot;&quot; },
/// { &quot;&quot;: &quot;&quot; },
/// { &quot;zombie.drowned&quot;: &quot;Drowned&quot; },
/// { &quot;&quot;: &quot;&quot; },
/// { &quot;&quot;: &quot;&quot; },
/// [rest of string was truncated]&quot;;.
/// &quot;entries&quot;: [
/// {
/// &quot;internalName&quot;: &quot;area_effect_cloud&quot;,
/// &quot;displayName&quot;: &quot;Area Effect Cloud / Particle&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;armor_stand&quot;,
/// &quot;displayName&quot;: &quot;Armor Stand&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;arrow&quot;,
/// &quot;displayName&quot;: &quot;Arrow&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;bat&quot;,
/// &quot;displayName&quot;: &quot;Bat&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;blaze&quot;,
/// &quot;displayName&quot;: &quot;Blaze&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;boat&quot;,
/// &quot;display [rest of string was truncated]&quot;;.
/// </summary>
public static string entityData {
public static string entityBehavioursData {
get {
return ResourceManager.GetString("entityData", resourceCulture);
return ResourceManager.GetString("entityBehavioursData", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {
/// &quot;COMMENT&quot;: &quot;Entity data research by NessieHax (Miku-666) and MattNL&quot;,
/// &quot;entries&quot;: [
/// {
/// &quot;internalName&quot;: &quot;&quot;,
/// &quot;displayName&quot;: &quot;&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;&quot;,
/// &quot;displayName&quot;: &quot;&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;&quot;,
/// &quot;displayName&quot;: &quot;&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;bat&quot;,
/// &quot;displayName&quot;: &quot;Bat&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;blaze_head&quot;,
/// &quot;displayName&quot;: &quot;Blaze&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;&quot;,
/// &quot;displayName&quot;: &quot;&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;cat&quot;,
/// &quot;displayName&quot;: &quot;Cat [PS4 [rest of string was truncated]&quot;;.
/// </summary>
public static string entityMaterialsData {
get {
return ResourceManager.GetString("entityMaterialsData", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {
/// &quot;COMMENT&quot;: &quot;Entity data research by NessieHax (Miku-666) and MattNL&quot;,
/// &quot;entries&quot;: [
/// {
/// &quot;internalName&quot;: &quot;&quot;,
/// &quot;displayName&quot;: &quot;&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;&quot;,
/// &quot;displayName&quot;: &quot;&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;&quot;,
/// &quot;displayName&quot;: &quot;&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;bat&quot;,
/// &quot;displayName&quot;: &quot;Bat&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;blaze&quot;,
/// &quot;displayName&quot;: &quot;Blaze&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;boat&quot;,
/// &quot;displayName&quot;: &quot;Boat&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;cat&quot;,
/// &quot;displayName&quot;: &quot;Cat [ [rest of string was truncated]&quot;;.
/// </summary>
public static string entityModelsData {
get {
return ResourceManager.GetString("entityModelsData", resourceCulture);
}
}
@@ -386,7 +459,7 @@ namespace PckStudio.Properties {
/// <summary>
/// Looks up a localized string similar to {
/// &quot;COMMENT_1&quot;: &quot;JSON by MattNL&quot;,
/// &quot;experience_orbs&quot;: [
/// &quot;entries&quot;: [
/// {
/// &quot;internalName&quot;: &quot;experience_orb_0&quot;,
/// &quot;displayName&quot;: &quot;Experience Orb (Size 1)&quot;,
@@ -405,7 +478,8 @@ namespace PckStudio.Properties {
/// &quot;variants&quot;: [&quot;experience_orb&quot;]
/// }
/// },
/// [rest of string was truncated]&quot;;.
/// {
/// &quot; [rest of string was truncated]&quot;;.
/// </summary>
public static string experienceOrbData {
get {
@@ -416,7 +490,7 @@ namespace PckStudio.Properties {
/// <summary>
/// Looks up a localized string similar to {
/// &quot;COMMENT_1&quot;: &quot;JSON by MattNL&quot;,
/// &quot;explosions&quot;: [
/// &quot;entries&quot;: [
/// {
/// &quot;internalName&quot;: &quot;explosion_0&quot;,
/// &quot;displayName&quot;: &quot;Explosion (Stage 1)&quot;,
@@ -436,7 +510,7 @@ namespace PckStudio.Properties {
/// &quot;colourEntry&quot;: {
/// &quot;defaultName&quot;: &quot;Particle_Explode&quot;,
/// &quot;variants&quot;: [
/// [rest of string was truncated]&quot;;.
/// [rest of string was truncated]&quot;;.
/// </summary>
public static string explosionData {
get {
@@ -558,7 +632,7 @@ namespace PckStudio.Properties {
/// Looks up a localized string similar to {
/// &quot;COMMENT_1&quot;: &quot;Tile data research by MattNL&quot;,
/// &quot;COMMENT_2&quot;: &quot;JSON by PhoenixARC, MattNL, and NessieHax (Miku-666)&quot;,
/// &quot;items&quot;: [
/// &quot;entries&quot;: [
/// {
/// &quot;internalName&quot;: &quot;helmetCloth&quot;,
/// &quot;displayName&quot;: &quot;Leather Cap&quot;,
@@ -574,7 +648,7 @@ namespace PckStudio.Properties {
/// &quot;displayName&quot;: &quot;Chain Helmet&quot;
/// },
/// {
/// &quot;internalName&quot;: &quot;he [rest of string was truncated]&quot;;.
/// &quot;internalName&quot;: &quot; [rest of string was truncated]&quot;;.
/// </summary>
public static string itemData {
get {
@@ -615,7 +689,7 @@ namespace PckStudio.Properties {
/// <summary>
/// Looks up a localized string similar to {
/// &quot;COMMENT_1&quot;: &quot;JSON by MattNL&quot;,
/// &quot;map_icons&quot;: [
/// &quot;entries&quot;: [
/// {
/// &quot;internalName&quot;: &quot;player_1&quot;,
/// &quot;displayName&quot;: &quot;Player 1&quot;
@@ -641,7 +715,7 @@ namespace PckStudio.Properties {
/// &quot;displayName&quot;: &quot;Target Point (Unused)&quot;
/// },
/// {
/// [rest of string was truncated]&quot;;.
/// [rest of string was truncated]&quot;;.
/// </summary>
public static string mapIconData {
get {
@@ -672,7 +746,7 @@ namespace PckStudio.Properties {
/// <summary>
/// Looks up a localized string similar to {
/// &quot;COMMENT_1&quot;: &quot;JSON by MattNL&quot;,
/// &quot;moon_phases&quot;: [
/// &quot;entries&quot;: [
/// {
/// &quot;internalName&quot;: &quot;moon_phase_0&quot;,
/// &quot;displayName&quot;: &quot;Full Moon&quot;
@@ -695,7 +769,7 @@ namespace PckStudio.Properties {
/// },
/// {
/// &quot;internalName&quot;: &quot;moon_phase_5&quot;,
/// &quot;displayNa [rest of string was truncated]&quot;;.
/// &quot;displayName&quot;: [rest of string was truncated]&quot;;.
/// </summary>
public static string moonPhaseData {
get {
@@ -746,7 +820,7 @@ namespace PckStudio.Properties {
/// <summary>
/// Looks up a localized string similar to {
/// &quot;COMMENT_1&quot;: &quot;JSON by MattNL&quot;,
/// &quot;paintings&quot;: [
/// &quot;entries&quot;: [
/// {
/// &quot;internalName&quot;: &quot;Kebab&quot;,
/// &quot;displayName&quot;: &quot;\&quot;Kebab med tre pepperoni\&quot; by Kristoffer Zetterstrand&quot;
@@ -765,7 +839,7 @@ namespace PckStudio.Properties {
/// },
/// {
/// &quot;internalName&quot;: &quot;Bomb&quot;,
/// &quot;di [rest of string was truncated]&quot;;.
/// &quot;disp [rest of string was truncated]&quot;;.
/// </summary>
public static string paintingData {
get {
@@ -786,7 +860,7 @@ namespace PckStudio.Properties {
/// <summary>
/// Looks up a localized string similar to {
/// &quot;COMMENT_1&quot;: &quot;JSON by MattNL&quot;,
/// &quot;particles&quot;: [
/// &quot;entries&quot;: [
/// {
/// &quot;internalName&quot;: &quot;generic_0&quot;,
/// &quot;displayName&quot;: &quot;Generic (Stage 1)&quot;,
@@ -806,7 +880,8 @@ namespace PckStudio.Properties {
/// },
/// {
/// &quot;internalName&quot;: &quot;generic_1&quot;,
/// &quot;displayName&quot;: &quot;Generic (Stage 2)&quot;, [rest of string was truncated]&quot;;.
/// &quot;displayName&quot;: &quot;Generic (Stage 2)&quot;,
/// [rest of string was truncated]&quot;;.
/// </summary>
public static string particleData {
get {
@@ -834,16 +909,6 @@ namespace PckStudio.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap pckCenterHeader {
get {
object obj = ResourceManager.GetObject("pckCenterHeader", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -984,6 +1049,16 @@ namespace PckStudio.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap trello {
get {
object obj = ResourceManager.GetObject("trello", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>

View File

@@ -184,9 +184,6 @@
<data name="ENTITY_MATERIALS_ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\iconImageList\ENTITY MATERIALS ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pckCenterHeader" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\pckCenterHeader.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="IMAGE_ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\iconImageList\IMAGE ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@@ -280,9 +277,6 @@
<data name="entities_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\atlases\entities.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="entityData" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\atlases\entityData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="file_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons\file_delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@@ -376,4 +370,16 @@
<data name="paintings_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\atlases\paintings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="trello" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\external\trello.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="entityBehavioursData" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\atlases\entityBehavioursData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="entityMaterialsData" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\atlases\entityMaterialsData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="entityModelsData" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\atlases\entityModelsData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
</root>

View File

@@ -12,7 +12,7 @@ namespace PckStudio.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -115,5 +115,16 @@ namespace PckStudio.Properties {
this["UseComboBoxForGRFParameter"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Collections.Specialized.StringCollection RecentFiles {
get {
return ((global::System.Collections.Specialized.StringCollection)(this["RecentFiles"]));
}
set {
this["RecentFiles"] = value;
}
}
}
}

View File

@@ -26,5 +26,8 @@
<Setting Name="UseComboBoxForGRFParameter" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="RecentFiles" Type="System.Collections.Specialized.StringCollection" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

@@ -0,0 +1,489 @@
{
"COMMENT": "Entity data research by NessieHax (Miku-666) and MattNL",
"entries": [
{
"internalName": "area_effect_cloud",
"displayName": "Area Effect Cloud / Particle"
},
{
"internalName": "armor_stand",
"displayName": "Armor Stand"
},
{
"internalName": "arrow",
"displayName": "Arrow"
},
{
"internalName": "bat",
"displayName": "Bat"
},
{
"internalName": "blaze",
"displayName": "Blaze"
},
{
"internalName": "boat",
"displayName": "Boat"
},
{
"internalName": "cat",
"displayName": "Cat [PS4 EXCLUSIVE]"
},
{
"internalName": "cave_spider",
"displayName": "Cave Spider"
},
{
"internalName": "chest_minecart",
"displayName": "Chest Minecart"
},
{
"internalName": "chicken",
"displayName": "Chicken"
},
{
"internalName": "cod",
"displayName": "Cod"
},
{
"internalName": "commandblock_minecart",
"displayName": "Command Block Minecart"
},
{
"internalName": "cow",
"displayName": "Cow"
},
{
"internalName": "creeper",
"displayName": "Creeper"
},
{
"internalName": "dolphin",
"displayName": "Dolphin"
},
{
"internalName": "donkey",
"displayName": "Donkey"
},
{
"internalName": "dragon_fireball",
"displayName": "Dragon Fireball"
},
{
"internalName": "drowned",
"displayName": "Drowned"
},
{
"internalName": "egg",
"displayName": "Thrown Egg"
},
{
"internalName": "elder_guardian",
"displayName": "Elder Guardian"
},
{
"internalName": "ender_crystal",
"displayName": "End Crystal"
},
{
"internalName": "ender_dragon",
"displayName": "Ender Dragon"
},
{
"internalName": "ender_pearl",
"displayName": "Thrown Ender Pearl"
},
{
"internalName": "enderman",
"displayName": "Enderman"
},
{
"internalName": "endermite",
"displayName": "Endermite"
},
{
"internalName": "evocation_illager",
"displayName": "Evoker"
},
{
"internalName": "evocation_fangs",
"displayName": "Evoker Fangs"
},
{
"internalName": "xp_bottle",
"displayName": "Thrown Bottle O' Enchanting"
},
{
"internalName": "xp_orb",
"displayName": "Experience Orb"
},
{
"internalName": "eye_of_ender_signal",
"displayName": "Thrown Eye of Ender"
},
{
"internalName": "falling_block",
"displayName": "Falling Block"
},
{
"internalName": "fireball",
"displayName": "Fireball"
},
{
"internalName": "fireworks_rocket",
"displayName": "Firework Rocket"
},
{
"internalName": "furnace_minecart",
"displayName": "Furnace Minecart"
},
{
"internalName": "ghast",
"displayName": "Ghast"
},
{
"internalName": "giant",
"displayName": "Giant"
},
{
"internalName": "guardian",
"displayName": "Guardian"
},
{
"internalName": "hopper_minecart",
"displayName": "Hopper Minecart"
},
{
"internalName": "horse",
"displayName": "Horse"
},
{
"internalName": "husk",
"displayName": "Husk"
},
{
"internalName": "villager_golem",
"displayName": "Iron Golem"
},
{
"internalName": "item",
"displayName": "Dropped Item"
},
{
"internalName": "item_frame",
"displayName": "Item Frame"
},
{
"internalName": "leash_knot",
"displayName": "Lead Knot"
},
{
"internalName": "llama",
"displayName": "Llama"
},
{
"internalName": "llama_spit",
"displayName": "Llama Spit"
},
{
"internalName": "magma_cube",
"displayName": "Magma Cube"
},
{
"internalName": "minecart",
"displayName": "Minecart"
},
{
"internalName": "mooshroom",
"displayName": "Mooshroom"
},
{
"internalName": "mule",
"displayName": "Mule"
},
{
"internalName": "ocelot",
"displayName": "Ocelot"
},
{
"internalName": "painting",
"displayName": "Painting"
},
{
"internalName": "panda",
"displayName": "Panda [PS4 EXCLUSIVE]"
},
{
"internalName": "parrot",
"displayName": "Parrot"
},
{
"internalName": "phantom",
"displayName": "Phantom"
},
{
"internalName": "pig",
"displayName": "Pig"
},
{
"internalName": "pillager",
"displayName": "Pillager [PS4 EXCLUSIVE]"
},
{
"internalName": "polar_bear",
"displayName": "Polar Bear"
},
{
"internalName": "potion",
"displayName": "Thrown Potion"
},
{
"internalName": "pufferfish",
"displayName": "Pufferfish"
},
{
"internalName": "rabbit",
"displayName": "Rabbit"
},
{
"internalName": "ravager",
"displayName": "Ravager [PS4 EXCLUSIVE]"
},
{
"internalName": "salmon",
"displayName": "Salmon"
},
{
"internalName": "sheep",
"displayName": "Sheep"
},
{
"internalName": "shulker",
"displayName": "Shulker"
},
{
"internalName": "shulker_bullet",
"displayName": "Shulker Bullet"
},
{
"internalName": "silverfish",
"displayName": "Silverfish"
},
{
"internalName": "skeleton",
"displayName": "Skeleton"
},
{
"internalName": "skeleton_horse",
"displayName": "Skeleton Horse"
},
{
"internalName": "slime",
"displayName": "Slime"
},
{
"internalName": "small_fireball",
"displayName": "Small Fireball"
},
{
"internalName": "snowman",
"displayName": "Snow Golem"
},
{
"internalName": "snowball",
"displayName": "Thrown Snowball"
},
{
"internalName": "spawner_minecart",
"displayName": "Spawner Minecart"
},
{
"internalName": "spectral_arrow",
"displayName": "Spectral Arrow"
},
{
"internalName": "spider",
"displayName": "Spider"
},
{
"internalName": "squid",
"displayName": "Squid"
},
{
"internalName": "stray",
"displayName": "Stray"
},
{
"internalName": "tnt",
"displayName": "Primed TNT"
},
{
"internalName": "tnt_minecart",
"displayName": "TNT Minecart"
},
{
"internalName": "trident",
"displayName": "Thrown Trident"
},
{
"internalName": "tropical_fish",
"displayName": "Tropical Fish"
},
{
"internalName": "turtle",
"displayName": "Turtle"
},
{
"internalName": "vex",
"displayName": "Vex"
},
{
"internalName": "villager",
"displayName": "Villager"
},
{
"internalName": "vindication_illager",
"displayName": "Vindicator"
},
{
"internalName": "wandering_trader",
"displayName": "Wandering Trader [PS4 EXCLUSIVE]"
},
{
"internalName": "witch",
"displayName": "Witch"
},
{
"internalName": "wither",
"displayName": "Wither"
},
{
"internalName": "wither_skeleton",
"displayName": "Wither Skeleton"
},
{
"internalName": "wither_skull",
"displayName": "Wither Skull"
},
{
"internalName": "wolf",
"displayName": "Wolf"
},
{
"internalName": "zombie",
"displayName": "Zombie"
},
{
"internalName": "zombie_horse",
"displayName": "Zombie Horse"
},
{
"internalName": "zombie_pigman",
"displayName": "Zombie Pigman"
},
{
"internalName": "zombie_villager",
"displayName": "Zombie Villager"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "illusion_illager",
"displayName": "Illusioner"
}
]
}

View File

@@ -1,369 +0,0 @@
{
"COMMENT": "Entity data research by NessieHax (Miku-666) and MattNL",
"models": [
{ "": "" },
{ "": "" },
{ "": "" },
{ "bat": "Bat" },
{ "blaze": "Blaze" },
{ "boat": "Boat" },
{ "cat": "Cat (PS4 EXCLUSIVE)" },
{ "": "" },
{ "": "" },
{ "chicken": "Chicken" },
{ "cod": "Cod" },
{ "": "" },
{ "cow": "Cow" },
{ "creeper": "Creeper" },
{ "dolphin": "Dolphin" },
{ "": "" },
{ "": "" },
{ "zombie.drowned": "Drowned" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "dragon": "Ender Dragon" },
{ "": "" },
{ "enderman": "Enderman" },
{ "endermite": "Endermite" },
{ "evoker": "Evoker" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "ghast": "Ghast" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "zombie.husk": "Husk" },
{ "irongolem": "Iron Golem" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "llama": "Llama" },
{ "": "" },
{ "lavaslime": "Magma Cube" },
{ "minecart": "Minecart" },
{ "mooshroom": "Mooshroom" },
{ "": "" },
{ "ocelot": "Ocelot" },
{ "": "" },
{ "panda": "Panda (PS4 EXCLUSIVE)" },
{ "parrot": "Parrot" },
{ "phantom": "Phantom" },
{ "pig": "Pig" },
{ "": "" },
{ "polarbear": "Polar Bear" },
{ "": "" },
{ "pufferfish.large": "Pufferfish (Large)" },
{ "rabbit": "Rabbit" },
{ "": "" },
{ "salmon": "Salmon" },
{ "": "" },
{ "shulker": "Shulker" },
{ "": "" },
{ "silverfish": "Silverfish" },
{ "skeleton": "Skeleton" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "snowgolem": "Snow Golem" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "squid": "Squid" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "trident": "Thrown Trident" },
{ "tropicalfish_a": "Tropical Fish (Small)" },
{ "turtle": "Turtle" },
{ "vex": "Vex" },
{ "villager": "Villager" },
{ "vindicator": "Vindicator/Illusioner" },
{ "": "" },
{ "witch": "Witch" },
{ "witherboss": "Wither" },
{ "skeleton.wither": "Wither Skeleton" },
{ "witherboss.armor": "Wither (Armor)" },
{ "wolf": "Wolf" },
{ "zombie": "Zombie" },
{ "": "" },
{ "pigzombie": "Zombie Pigman" },
{ "zombie.villager": "Zombie Villager" },
{ "skeleton_head": "Skeleton Skull" },
{ "skeleton_wither_head": "Wither Skeleton Skull" },
{ "zombie_head": "Zombie Head" },
{ "creeper_head": "Creeper Head" },
{ "dragon_head": "Ender Dragon Head" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "spider": "Spiders" },
{ "bed": "Bed" },
{ "guardian": "Guardians" },
{ "horse.v2": "Horses/Donky/Mule" },
{ "pufferfish.small": "Pufferfish (Small)" },
{ "pufferfish.mid": "Pufferfish (Medium)" },
{ "sheep.sheared": "Sheep (Without Fur)" },
{ "sheep": "Sheep (Fur Only)" },
{ "slime": "Slime (Inner)" },
{ "slime.armor": "Slime (Outer)" },
{ "skeleton.stray": "Stray" },
{ "stray.armor": "Stray (Overlay)" },
{ "tropicalfish_b": "Tropical Fish (Large)" }
],
"materials": [
{ "": "" },
{ "": "" },
{ "": "" },
{ "bat": "Bat" },
{ "blaze_head": "Blaze (Head Only)" },
{ "": "" },
{ "cat": "Cat (PS4 EXCLUSIVE)" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "drowned": "Drowned" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "ender_dragon": "Ender Dragon" },
{ "": "" },
{ "enderman": "Enderman" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "ghast": "Ghast" },
{ "": "" },
{ "guardian": "Guardian" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "iron_golem": "Iron Golem" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "magma_cube": "Magma Cube" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "phantom": "Phantom" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "sheep": "Sheep" },
{ "shulker": "Shulker" },
{ "": "" },
{ "": "" },
{ "skeleton": "Skeleton" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "stray": "Stray" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "wither_boss": "Wither" },
{ "wither_skeleton": "Wither Skeleton" },
{ "": "" },
{ "wolf": "Wolf" },
{ "": "" },
{ "": "" },
{ "zombie_pigman": "Zombie Pigman" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "villager": "Villager (PS4 EXCLUSIVE)" },
{ "zombie_villager": "Zombie Villager (PS4 EXCLUSIVE)" },
{ "": "" },
{ "phantom_invisible": "Phantom (Second Layer)" },
{ "enderman_invisible": "Enderman (Second Layer)" },
{ "spider_invisible": "Spiders (Second Layer)" },
{ "spider": "Spiders" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" }
],
"behaviours": [
{ "area_effect_cloud": "Area Effect Cloud / Particle" },
{ "armor_stand": "Armor Stand" },
{ "arrow": "Arrow" },
{ "bat": "Bat" },
{ "blaze": "Blaze" },
{ "boat": "Boat" },
{ "cat": "Cat (PS4 EXCLUSIVE)" },
{ "cave_spider": "Cave Spider" },
{ "chest_minecart": "Chest Minecart" },
{ "chicken": "Chicken" },
{ "cod": "Cod" },
{ "commandblock_minecart": "Command Block Minecart" },
{ "cow": "Cow" },
{ "creeper": "Creeper" },
{ "dolphin": "Dolphin" },
{ "donkey": "Donkey" },
{ "dragon_fireball": "Dragon Fireball" },
{ "drowned": "Drowned" },
{ "egg": "Thrown Egg" },
{ "elder_guardian": "Elder Guardian" },
{ "ender_crystal": "End Crystal" },
{ "ender_dragon": "Ender Dragon" },
{ "ender_pearl": "Thrown Ender Pearl" },
{ "enderman": "Enderman" },
{ "endermite": "Endermite" },
{ "evocation_illager": "Evoker" },
{ "evocation_fangs": "Evoker Fangs" },
{ "xp_bottle": "Thrown Experience Bottle" },
{ "xp_orb": "Experience Orb" },
{ "eye_of_ender_signal": "Thrown Eye of Ender" },
{ "falling_block": "Falling Block" },
{ "fireball": "Fireball" },
{ "fireworks_rocket": "Firework Rocket" },
{ "furnace_minecart": "Furnace Minecart" },
{ "ghast": "Ghast" },
{ "giant": "Giant" },
{ "guardian": "Guardian" },
{ "hopper_minecart": "Hopper Minecart" },
{ "horse": "Horse" },
{ "husk": "Husk" },
{ "villager_golem": "Iron Golem" },
{ "item": "Dropped Item" },
{ "item_frame": "Item Frame" },
{ "leash_knot": "Lead Knot" },
{ "llama": "Llama" },
{ "llama_spit": "Llama Spit" },
{ "magma_cube": "Magma Cube" },
{ "minecart": "Minecart" },
{ "mooshroom": "Mooshroom" },
{ "mule": "Mule" },
{ "ocelot": "Ocelot" },
{ "painting": "Painting" },
{ "panda": "Panda (PS4 EXCLUSIVE)" },
{ "parrot": "Parrot" },
{ "phantom": "Phantom" },
{ "pig": "Pig" },
{ "pillager": "Pillager (PS4 EXCLUSIVE)" },
{ "polar_bear": "Polar Bear" },
{ "potion": "Thrown Potion" },
{ "pufferfish": "Pufferfish" },
{ "rabbit": "Rabbit" },
{ "ravager": "Ravager (PS4 EXCLUSIVE)" },
{ "salmon": "Salmon" },
{ "sheep": "Sheep" },
{ "shulker": "Shulker" },
{ "shulker_bullet": "Shulker Bullet" },
{ "silverfish": "Silverfish" },
{ "skeleton": "Skeleton" },
{ "skeleton_horse": "Skeleton Horse" },
{ "slime": "Slime" },
{ "small_fireball": "Small Fireball" },
{ "snowman": "Snow Golem" },
{ "snowball": "Thrown Snowball" },
{ "spawner_minecart": "Spawner Minecart" },
{ "spectral_arrow": "Spectral Arrow" },
{ "spider": "Spider" },
{ "squid": "Squid" },
{ "stray": "Stray" },
{ "tnt": "Primed TNT" },
{ "tnt_minecart": "TNT Minecart" },
{ "trident": "Thrown Trident" },
{ "tropical_fish": "Tropical Fish" },
{ "turtle": "Turtle" },
{ "vex": "Vex" },
{ "villager": "Villager" },
{ "vindication_illager": "Vindicator" },
{ "wandering_trader": "Wandering Trader (PS4 Exclusive)" },
{ "witch": "Witch" },
{ "wither": "Wither" },
{ "wither_skeleton": "Wither Skeleton" },
{ "wither_skull": "Wither Skull" },
{ "wolf": "Wolf" },
{ "zombie": "Zombie" },
{ "zombie_horse": "Zombie Horse" },
{ "zombie_pigman": "Zombie Pigman" },
{ "zombie_villager": "Zombie Villager" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" },
{ "": "" }
]
}

View File

@@ -0,0 +1,485 @@
{
"COMMENT": "Entity data research by NessieHax (Miku-666) and MattNL",
"entries": [
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "bat",
"displayName": "Bat"
},
{
"internalName": "blaze_head",
"displayName": "Blaze"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "cat",
"displayName": "Cat [PS4 EXCLUSIVE]"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "drowned",
"displayName": "Drowned"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "ender_dragon",
"displayName": "Ender Dragon"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "enderman",
"displayName": "Enderman"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "ghast",
"displayName": "Ghast"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "guardian",
"displayName": "Guardian"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "iron_golem",
"displayName": "Iron Golem"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "magma_cube",
"displayName": "Magma Cube"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "phantom",
"displayName": "Phantom"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "sheep",
"displayName": "Sheep"
},
{
"internalName": "shulker",
"displayName": "Shulker"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "skeleton",
"displayName": "Skeleton"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "stray",
"displayName": "Stray"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "wither_boss",
"displayName": "Wither"
},
{
"internalName": "wither_skeleton",
"displayName": "Wither Skeleton"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "wolf",
"displayName": "Wolf"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "zombie_pigman",
"displayName": "Zombie Pigman"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "villager",
"displayName": "Villager [PS4 EXCLUSIVE]"
},
{
"internalName": "zombie_villager",
"displayName": "Zombie Villager [PS4 EXCLUSIVE]"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "phantom_invisible",
"displayName": "Phantom (Overlay)"
},
{
"internalName": "enderman_invisible",
"displayName": "Enderman (Overlay)"
},
{
"internalName": "spider_invisible",
"displayName": "Spiders (Overlay)"
},
{
"internalName": "spider",
"displayName": "Spiders"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
}
]
}

View File

@@ -0,0 +1,485 @@
{
"COMMENT": "Entity data research by NessieHax (Miku-666) and MattNL",
"entries": [
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "bat",
"displayName": "Bat"
},
{
"internalName": "blaze",
"displayName": "Blaze"
},
{
"internalName": "boat",
"displayName": "Boat"
},
{
"internalName": "cat",
"displayName": "Cat [PS4 EXCLUSIVE]"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "chicken",
"displayName": "Chicken"
},
{
"internalName": "cod",
"displayName": "Cod"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "cow",
"displayName": "Cow"
},
{
"internalName": "creeper",
"displayName": "Creeper"
},
{
"internalName": "dolphin",
"displayName": "Dolphin"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "zombie.drowned",
"displayName": "Drowned"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "dragon",
"displayName": "Ender Dragon"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "enderman",
"displayName": "Enderman"
},
{
"internalName": "endermite",
"displayName": "Endermite"
},
{
"internalName": "evoker",
"displayName": "Evoker"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "ghast",
"displayName": "Ghast"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "zombie.husk",
"displayName": "Husk"
},
{
"internalName": "irongolem",
"displayName": "Iron Golem"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "llama",
"displayName": "Llama"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "lavaslime",
"displayName": "Magma Cube"
},
{
"internalName": "minecart",
"displayName": "Minecart"
},
{
"internalName": "mooshroom",
"displayName": "Mooshroom"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "ocelot",
"displayName": "Ocelot"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "panda",
"displayName": "Panda [PS4 EXCLUSIVE]"
},
{
"internalName": "parrot",
"displayName": "Parrot"
},
{
"internalName": "phantom",
"displayName": "Phantom"
},
{
"internalName": "pig",
"displayName": "Pig"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "polarbear",
"displayName": "Polar Bear"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "pufferfish.large",
"displayName": "Pufferfish (Large)"
},
{
"internalName": "rabbit",
"displayName": "Rabbit"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "salmon",
"displayName": "Salmon"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "shulker",
"displayName": "Shulker"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "silverfish",
"displayName": "Silverfish"
},
{
"internalName": "skeleton",
"displayName": "Skeleton"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "snowgolem",
"displayName": "Snow Golem"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "squid",
"displayName": "Squid"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "trident",
"displayName": "Thrown Trident"
},
{
"internalName": "tropicalfish_a",
"displayName": "Tropical Fish (Small)"
},
{
"internalName": "turtle",
"displayName": "Turtle"
},
{
"internalName": "vex",
"displayName": "Vex"
},
{
"internalName": "villager",
"displayName": "Villager"
},
{
"internalName": "vindicator",
"displayName": "Vindicator/Illusioner"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "witch",
"displayName": "Witch"
},
{
"internalName": "witherboss",
"displayName": "Wither"
},
{
"internalName": "skeleton.wither",
"displayName": "Wither Skeleton"
},
{
"internalName": "witherboss.armor",
"displayName": "Wither (Armor)"
},
{
"internalName": "wolf",
"displayName": "Wolf"
},
{
"internalName": "zombie",
"displayName": "Zombie"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "pigzombie",
"displayName": "Zombie Pigman"
},
{
"internalName": "zombie.villager",
"displayName": "Zombie Villager"
},
{
"internalName": "skeleton_head",
"displayName": "Skeleton Skull"
},
{
"internalName": "skeleton_wither_head",
"displayName": "Wither Skeleton Skull"
},
{
"internalName": "zombie_head",
"displayName": "Zombie Head"
},
{
"internalName": "creeper_head",
"displayName": "Creeper Head"
},
{
"internalName": "dragon_head",
"displayName": "Ender Dragon Head"
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "",
"displayName": ""
},
{
"internalName": "spider",
"displayName": "Spider"
},
{
"internalName": "bed",
"displayName": "Bed"
},
{
"internalName": "guardian",
"displayName": "Guardian"
},
{
"internalName": "horse.v2",
"displayName": "Horse/Donkey/Mule"
},
{
"internalName": "pufferfish.small",
"displayName": "Pufferfish (Small)"
},
{
"internalName": "pufferfish.mid",
"displayName": "Pufferfish (Medium)"
},
{
"internalName": "sheep.sheared",
"displayName": "Sheep (Without Fur)"
},
{
"internalName": "sheep",
"displayName": "Sheep (Fur Only)"
},
{
"internalName": "slime",
"displayName": "Slime (Inner)"
},
{
"internalName": "slime.armor",
"displayName": "Slime (Outer)"
},
{
"internalName": "skeleton.stray",
"displayName": "Stray"
},
{
"internalName": "stray.armor",
"displayName": "Stray (Overlay)"
},
{
"internalName": "tropicalfish_b",
"displayName": "Tropical Fish (Large)"
}
]
}

BIN
PCK-Studio/Resources/external/trello.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

2
Vendor/OMI-Lib vendored