mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-26 12:45:35 +00:00
Merge 'main' into EntityModelsFile-Support
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
||||
[submodule "OMI-Lib"]
|
||||
path = Vendor/OMI-Lib
|
||||
url = https://github.com/PhoenixARC/-OMI-Filetype-Library.git
|
||||
[submodule "Vendor/SharpMss32"]
|
||||
path = Vendor/SharpMss32
|
||||
url = https://github.com/NessieHax/SharpMss32.git
|
||||
|
||||
13
PCK-Studio/Classes/Extensions/BlendMode.cs
Normal file
13
PCK-Studio/Classes/Extensions/BlendMode.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
public enum BlendMode
|
||||
{
|
||||
Add,
|
||||
Subtract,
|
||||
Multiply,
|
||||
Average,
|
||||
DescendingOrder,
|
||||
AscendingOrder,
|
||||
Screen
|
||||
}
|
||||
}
|
||||
45
PCK-Studio/Classes/Extensions/ColorExtensions.cs
Normal file
45
PCK-Studio/Classes/Extensions/ColorExtensions.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Numerics;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
internal static class ColorExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Normalizes the Color between 0.0 - 1.0
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static Vector3 Normalize(this Color color)
|
||||
{
|
||||
return new Vector3(color.R / 255f, color.G / 255f, color.B / 255f);
|
||||
}
|
||||
|
||||
private static T Clamp<T>(T value, T min, T max) where T : IComparable<T>
|
||||
{
|
||||
if (value.CompareTo(min) < 0) return min;
|
||||
if (value.CompareTo(max) > 0) return max;
|
||||
return value;
|
||||
}
|
||||
|
||||
public static byte BlendValues(float source, float overlay, BlendMode blendType)
|
||||
{
|
||||
source = Clamp(source, 0.0f, 1.0f);
|
||||
overlay = Clamp(overlay, 0.0f, 1.0f);
|
||||
|
||||
float resultValue = blendType switch
|
||||
{
|
||||
BlendMode.Add => source + overlay,
|
||||
BlendMode.Subtract => source - overlay,
|
||||
BlendMode.Multiply => source * overlay,
|
||||
BlendMode.Average => (source + overlay) / 2.0f,
|
||||
BlendMode.AscendingOrder => source > overlay ? overlay : source,
|
||||
BlendMode.DescendingOrder => source < overlay ? overlay : source,
|
||||
BlendMode.Screen => 1f - (1f - source) * (1f - overlay),
|
||||
_ => 0.0f
|
||||
};
|
||||
return (byte)Clamp(resultValue * 255, 0, 255);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
17
PCK-Studio/Classes/Extensions/EnumerableExtensions.cs
Normal file
17
PCK-Studio/Classes/Extensions/EnumerableExtensions.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
internal static class EnumerableExtensions
|
||||
{
|
||||
public static IEnumerable<(int index, T type)>enumerate<T>(this IEnumerable<T> array)
|
||||
{
|
||||
int i = 0;
|
||||
foreach (var item in array)
|
||||
{
|
||||
yield return (i++, item);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
}
|
||||
39
PCK-Studio/Classes/Extensions/GraphicsExtensions.cs
Normal file
39
PCK-Studio/Classes/Extensions/GraphicsExtensions.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
public struct GraphicsConfig
|
||||
{
|
||||
public GraphicsConfig()
|
||||
{
|
||||
CompositingQuality = CompositingQuality.Default;
|
||||
InterpolationMode = InterpolationMode.Default;
|
||||
SmoothingMode = SmoothingMode.Default;
|
||||
PixelOffsetMode = PixelOffsetMode.Default;
|
||||
CompositingMode = CompositingMode.SourceOver;
|
||||
}
|
||||
|
||||
public CompositingMode CompositingMode { get; set; }
|
||||
public CompositingQuality CompositingQuality { get; set; }
|
||||
public InterpolationMode InterpolationMode { get; set; }
|
||||
public SmoothingMode SmoothingMode { get; set; }
|
||||
public PixelOffsetMode PixelOffsetMode { get; set; }
|
||||
}
|
||||
|
||||
internal static class GraphicsExtensions
|
||||
{
|
||||
public static void ApplyConfig(this Graphics graphics, GraphicsConfig config)
|
||||
{
|
||||
graphics.CompositingMode = config.CompositingMode;
|
||||
graphics.CompositingQuality = config.CompositingQuality;
|
||||
graphics.InterpolationMode = config.InterpolationMode;
|
||||
graphics.SmoothingMode = config.SmoothingMode;
|
||||
graphics.PixelOffsetMode = config.PixelOffsetMode;
|
||||
}
|
||||
}
|
||||
}
|
||||
236
PCK-Studio/Classes/Extensions/ImageExtensions.cs
Normal file
236
PCK-Studio/Classes/Extensions/ImageExtensions.cs
Normal file
@@ -0,0 +1,236 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
public enum ImageLayoutDirection
|
||||
{
|
||||
Horizontal,
|
||||
Vertical
|
||||
}
|
||||
|
||||
internal static class ImageExtensions
|
||||
{
|
||||
private struct ImageLayoutInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Size of sub section of the image
|
||||
/// </summary>
|
||||
public readonly Size SectionSize;
|
||||
public readonly Point SectionPoint;
|
||||
public readonly Rectangle SectionArea;
|
||||
|
||||
public ImageLayoutInfo(int width, int height, int index, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
switch(layoutDirection)
|
||||
{
|
||||
case ImageLayoutDirection.Horizontal:
|
||||
{
|
||||
SectionSize = new Size(height,height);
|
||||
SectionPoint = new Point(index * height, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case ImageLayoutDirection.Vertical:
|
||||
{
|
||||
SectionSize = new Size(width, width);
|
||||
SectionPoint = new Point(0, index * width);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
SectionSize = Size.Empty;
|
||||
SectionPoint = new Point(-1, -1);
|
||||
break;
|
||||
}
|
||||
SectionArea = new Rectangle(SectionPoint, SectionSize);
|
||||
}
|
||||
}
|
||||
|
||||
public static Image GetArea(this Image source, Rectangle area)
|
||||
{
|
||||
Image tileImage = new Bitmap(area.Width, area.Height);
|
||||
using (Graphics gfx = Graphics.FromImage(tileImage))
|
||||
{
|
||||
gfx.SmoothingMode = SmoothingMode.None;
|
||||
gfx.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||
gfx.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
gfx.DrawImage(source, new Rectangle(Point.Empty, area.Size), area, GraphicsUnit.Pixel);
|
||||
}
|
||||
return tileImage;
|
||||
}
|
||||
|
||||
public static IEnumerable<Image> CreateImageList(this Image source, Size size)
|
||||
{
|
||||
int rowCount = source.Width / size.Width;
|
||||
int columnCount = source.Height / size.Height;
|
||||
Debug.WriteLine($"{source.Width} {source.Height} {size} {columnCount} {rowCount}");
|
||||
for (int i = 0; i < columnCount * rowCount; i++)
|
||||
{
|
||||
int row = Math.DivRem(i, rowCount, out int column);
|
||||
Rectangle tileArea = new Rectangle(new Point(column * size.Height, row * size.Width), size);
|
||||
yield return source.GetArea(tileArea);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
public static IEnumerable<Image> CreateImageList(this Image source, int scalar)
|
||||
{
|
||||
return CreateImageList(source, new Size(scalar, scalar));
|
||||
}
|
||||
|
||||
public static IEnumerable<Image> CreateImageList(this Image source, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
for (int i = 0; i < source.Height / source.Width; i++)
|
||||
{
|
||||
ImageLayoutInfo locationInfo = new ImageLayoutInfo(source.Width, source.Height, i, layoutDirection);
|
||||
yield return source.GetArea(locationInfo.SectionArea);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
public static Image CombineImages(IList<Image> sources, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
Size imageSize = CalculateImageSize(sources, layoutDirection);
|
||||
var image = new Bitmap(imageSize.Width, imageSize.Height);
|
||||
|
||||
using (var graphic = Graphics.FromImage(image))
|
||||
{
|
||||
foreach (var (i, texture) in sources.enumerate())
|
||||
{
|
||||
var info = new ImageLayoutInfo(texture.Width, texture.Height, i, layoutDirection);
|
||||
graphic.DrawImage(texture, info.SectionPoint);
|
||||
};
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
private static Size CalculateImageSize(IList<Image> sources, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
if (sources.Count == 0)
|
||||
{
|
||||
return Size.Empty;
|
||||
}
|
||||
var horizontal = layoutDirection == ImageLayoutDirection.Horizontal;
|
||||
|
||||
int width = sources[0].Width;
|
||||
int height = sources[0].Height;
|
||||
|
||||
if (!sources.All(img => img.Width.Equals(width) && img.Height.Equals(height)))
|
||||
throw new InvalidOperationException("Images must have the same width and height.");
|
||||
|
||||
if (horizontal)
|
||||
width *= sources.Count;
|
||||
else
|
||||
height *= sources.Count;
|
||||
|
||||
return new Size(width, height);
|
||||
}
|
||||
|
||||
public static Image ResizeImage(this Image image, int width, int height, GraphicsConfig graphicsConfig)
|
||||
{
|
||||
var destRect = new Rectangle(0, 0, width, height);
|
||||
var destImage = new Bitmap(width, height);
|
||||
|
||||
destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);
|
||||
|
||||
using (var graphics = Graphics.FromImage(destImage))
|
||||
{
|
||||
graphics.ApplyConfig(graphicsConfig);
|
||||
using (var wrapMode = new ImageAttributes())
|
||||
{
|
||||
wrapMode.SetWrapMode(WrapMode.TileFlipXY);
|
||||
graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode);
|
||||
}
|
||||
}
|
||||
return destImage;
|
||||
}
|
||||
|
||||
public static Image Fill(this Image image, Color color)
|
||||
{
|
||||
using (var g = Graphics.FromImage(image))
|
||||
{
|
||||
using (SolidBrush brush = new SolidBrush(color))
|
||||
{
|
||||
g.FillRectangle(brush, new Rectangle(Point.Empty, image.Size));
|
||||
}
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
public static Image Blend(this Image image, Color overlayColor, BlendMode mode)
|
||||
{
|
||||
if (image is not Bitmap baseImage)
|
||||
return image;
|
||||
|
||||
BitmapData baseImageData = baseImage.LockBits(new Rectangle(Point.Empty, baseImage.Size),
|
||||
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
|
||||
byte[] baseImageBuffer = new byte[baseImageData.Stride * baseImageData.Height];
|
||||
|
||||
Marshal.Copy(baseImageData.Scan0, baseImageBuffer, 0, baseImageBuffer.Length);
|
||||
|
||||
var normalized = overlayColor.Normalize();
|
||||
|
||||
for (int k = 0; k < baseImageBuffer.Length; k += 4)
|
||||
{
|
||||
baseImageBuffer[k + 0] = ColorExtensions.BlendValues(baseImageBuffer[k + 0] / 255f, normalized.X, mode);
|
||||
baseImageBuffer[k + 1] = ColorExtensions.BlendValues(baseImageBuffer[k + 1] / 255f, normalized.Y, mode);
|
||||
baseImageBuffer[k + 2] = ColorExtensions.BlendValues(baseImageBuffer[k + 2] / 255f, normalized.Z, mode);
|
||||
}
|
||||
|
||||
Bitmap bitmapResult = new Bitmap(baseImage.Width, baseImage.Height, PixelFormat.Format32bppArgb);
|
||||
BitmapData resultImageData = bitmapResult.LockBits(new Rectangle(Point.Empty, bitmapResult.Size),
|
||||
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
Marshal.Copy(baseImageBuffer, 0, resultImageData.Scan0, baseImageBuffer.Length);
|
||||
|
||||
bitmapResult.UnlockBits(resultImageData);
|
||||
baseImage.UnlockBits(baseImageData);
|
||||
|
||||
return bitmapResult;
|
||||
}
|
||||
|
||||
public static Image Blend(this Image image, Image overlay, BlendMode mode)
|
||||
{
|
||||
if (image is not Bitmap baseImage || overlay is not Bitmap overlayImage ||
|
||||
image.Width != overlay.Width || image.Height != overlay.Height)
|
||||
return image;
|
||||
|
||||
BitmapData baseImageData = baseImage.LockBits(new Rectangle(Point.Empty, baseImage.Size),
|
||||
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
|
||||
byte[] baseImageBuffer = new byte[baseImageData.Stride * baseImageData.Height];
|
||||
|
||||
Marshal.Copy(baseImageData.Scan0, baseImageBuffer, 0, baseImageBuffer.Length);
|
||||
|
||||
BitmapData overlayImageData = overlayImage.LockBits(new Rectangle(Point.Empty, overlayImage.Size),
|
||||
ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
|
||||
byte[] overlayImageBuffer = new byte[overlayImageData.Stride * overlayImageData.Height];
|
||||
|
||||
Marshal.Copy(overlayImageData.Scan0, overlayImageBuffer, 0, overlayImageBuffer.Length);
|
||||
|
||||
for (int k = 0; k < baseImageBuffer.Length && k < overlayImageBuffer.Length; k += 4)
|
||||
{
|
||||
baseImageBuffer[k + 0] = ColorExtensions.BlendValues(baseImageBuffer[k + 0] / 255f, overlayImageBuffer[k + 0] / 255f, mode);
|
||||
baseImageBuffer[k + 1] = ColorExtensions.BlendValues(baseImageBuffer[k + 1] / 255f, overlayImageBuffer[k + 1] / 255f, mode);
|
||||
baseImageBuffer[k + 2] = ColorExtensions.BlendValues(baseImageBuffer[k + 2] / 255f, overlayImageBuffer[k + 2] / 255f, mode);
|
||||
}
|
||||
|
||||
Bitmap bitmapResult = new Bitmap(baseImage.Width, baseImage.Height, PixelFormat.Format32bppArgb);
|
||||
BitmapData resultImageData = bitmapResult.LockBits(new Rectangle(Point.Empty, bitmapResult.Size),
|
||||
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
Marshal.Copy(baseImageBuffer, 0, resultImageData.Scan0, baseImageBuffer.Length);
|
||||
|
||||
bitmapResult.UnlockBits(resultImageData);
|
||||
baseImage.UnlockBits(baseImageData);
|
||||
overlayImage.UnlockBits(overlayImageData);
|
||||
return bitmapResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PckStudio.Forms.Utilities
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
public static class ListUtils
|
||||
public static class ListExtensions
|
||||
{
|
||||
public static IList<T> Swap<T>(this IList<T> list, int index1, int index2)
|
||||
{
|
||||
@@ -1,63 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace PckStudio.Classes.Extentions
|
||||
{
|
||||
internal static class ImageExtentions
|
||||
{
|
||||
public enum ImageLayoutDirection
|
||||
{
|
||||
Horizontal,
|
||||
Vertical
|
||||
}
|
||||
|
||||
public static IEnumerable<Image> CreateImageList(this Image source, Size size)
|
||||
{
|
||||
int img_row_count = source.Width / size.Width;
|
||||
int img_column_count = source.Height / size.Height;
|
||||
Debug.WriteLine($"{source.Width} {source.Height} {size} {img_column_count} {img_row_count}");
|
||||
for (int i = 0; i < img_column_count * img_row_count; i++)
|
||||
{
|
||||
int row = i / img_row_count;
|
||||
int column = i % img_row_count;
|
||||
Rectangle tileArea = new Rectangle(new Point(column * size.Height, row * size.Width), size);
|
||||
yield return GetTileImage(source, tileArea, size);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
|
||||
public static IEnumerable<Image> CreateImageList(this Image source, int scalar)
|
||||
{
|
||||
return CreateImageList(source, new Size(scalar, scalar));
|
||||
}
|
||||
|
||||
public static IEnumerable<Image> CreateImageList(this Image source, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
for (int i = 0; i < source.Height / source.Width; i++)
|
||||
{
|
||||
(Size size, Point point) locationInfo = layoutDirection == ImageLayoutDirection.Horizontal
|
||||
? (new Size(source.Width, source.Width), new Point(0, i * source.Width))
|
||||
: (new Size(source.Height, source.Height), new Point(i * source.Height, 0));
|
||||
Rectangle tileArea = new Rectangle(locationInfo.point, locationInfo.size);
|
||||
yield return GetTileImage(source, tileArea, locationInfo.size);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
private static Image GetTileImage(Image source, Rectangle area, Size size, GraphicsUnit unit = GraphicsUnit.Pixel)
|
||||
{
|
||||
Image tileImage = new Bitmap(size.Width, size.Height);
|
||||
using (Graphics gfx = Graphics.FromImage(tileImage))
|
||||
{
|
||||
gfx.SmoothingMode = SmoothingMode.None;
|
||||
gfx.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||
gfx.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
gfx.DrawImage(source, new Rectangle(Point.Empty, size), area, unit);
|
||||
}
|
||||
return tileImage;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,43 +2,22 @@
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Web.Caching;
|
||||
using PckStudio.Classes.Misc;
|
||||
using SharpMSS;
|
||||
|
||||
namespace PckStudio.Classes
|
||||
{
|
||||
internal static class Binka
|
||||
{
|
||||
private class LibHandle
|
||||
{
|
||||
[DllImport("kernel32.dll")]
|
||||
public static extern IntPtr LoadLibrary(string lpFileName);
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
public static extern int FreeLibrary(IntPtr library);
|
||||
|
||||
private IntPtr libHandle;
|
||||
|
||||
public IntPtr Handle => libHandle;
|
||||
|
||||
public LibHandle(string libraryPath)
|
||||
{
|
||||
libHandle = LoadLibrary(libraryPath);
|
||||
}
|
||||
|
||||
~LibHandle()
|
||||
{
|
||||
FreeLibrary(libHandle);
|
||||
}
|
||||
}
|
||||
|
||||
private static string dataCache = Program.AppDataCache;
|
||||
|
||||
public static uint LastAILErrorCode = 0xffffffff;
|
||||
private static FileCacher cacher = new FileCacher(Program.AppDataCache);
|
||||
|
||||
public static int FromWav(string inputFilepath, string outputFilepath, int compressionLevel)
|
||||
{
|
||||
var process = Process.Start(new ProcessStartInfo
|
||||
cacher.Cache(Properties.Resources.binka_encode, "binka_encode.exe");
|
||||
var process = Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = GetAndCacheResource("binka_encode.exe"),
|
||||
FileName = cacher.GetCachedFilepath("binka_encode.exe"),
|
||||
Arguments = $"\"{inputFilepath}\" \"{outputFilepath}\" -s -b{compressionLevel}",
|
||||
UseShellExecute = true,
|
||||
CreateNoWindow = true,
|
||||
@@ -48,94 +27,45 @@ namespace PckStudio.Classes
|
||||
return process.ExitCode;
|
||||
}
|
||||
|
||||
public static unsafe void ToWav(string inputFilename, string outputFilepath)
|
||||
public static void ToWav(string inputFilepath, string outputFilepath)
|
||||
{
|
||||
// handle should be closed when function gets out of scope
|
||||
LibHandle mss32LibHandle = new LibHandle(GetAndCacheResource("mss32.dll"));
|
||||
|
||||
string ext = Path.GetExtension(inputFilename).ToLower();
|
||||
switch (ext)
|
||||
if (!inputFilepath.EndsWith(".binka"))
|
||||
{
|
||||
case ".binka":
|
||||
case ".wav":
|
||||
break;
|
||||
default:
|
||||
throw new NotSupportedException(nameof(ext)+":"+ext);
|
||||
throw new Exception("Not a Bink Audio file.");
|
||||
}
|
||||
string outputDirectory = Path.GetDirectoryName(outputFilepath);
|
||||
Directory.CreateDirectory(outputDirectory);
|
||||
string destinationFilepath = Path.Combine(outputDirectory, Path.GetFileName(inputFilename));
|
||||
|
||||
byte[] inputFiledata = File.ReadAllBytes(inputFilename);
|
||||
Debug.WriteLine($"{nameof(inputFiledata)}: {inputFiledata.Length}");
|
||||
cacher.Cache(Properties.Resources.mss32, "mss32.dll");
|
||||
cacher.Cache(Properties.Resources.binkawin, "binkawin.asi");
|
||||
|
||||
AILInternalCalls.SetRedistDirectory(".");
|
||||
AILInternalCalls.Startup(); // __fastcall
|
||||
LibHandle mss32LibHandle = new LibHandle(cacher.GetCachedFilepath("mss32.dll"));
|
||||
|
||||
string destinationFilepath = Path.Combine(
|
||||
Path.GetDirectoryName(outputFilepath),
|
||||
Path.GetFileNameWithoutExtension(inputFilepath) + ".wav");
|
||||
|
||||
AILAPI.SetRedistDirectory(cacher.CacheDirectory.Replace('\\', '/'));
|
||||
|
||||
RIBAPI.LoadApplicationProviders("*.asi");
|
||||
|
||||
byte[] inputFiledata = File.ReadAllBytes(inputFilepath);
|
||||
|
||||
int resultBufferSize = 0;
|
||||
IntPtr resultBuffer = new IntPtr();
|
||||
// crash happens in AIL_decompress_ASI
|
||||
LastAILErrorCode = (uint)AILInternalCalls.DecompressASI(inputFiledata, inputFiledata.Length, ".binka", resultBuffer, &resultBufferSize);
|
||||
Debug.WriteLine("AIL Error Code: " + LastAILErrorCode.ToString());
|
||||
if (AILAPI.DecompressASI(inputFiledata, inputFiledata.Length, ".binka", ref resultBuffer, ref resultBufferSize, null) == 0)
|
||||
{
|
||||
Console.WriteLine(AILAPI.GetLastError());
|
||||
return;
|
||||
}
|
||||
|
||||
byte[] buffer = new byte[resultBufferSize];
|
||||
Marshal.Copy(resultBuffer, buffer, 0, resultBufferSize);
|
||||
AILInternalCalls.MemFreeLock(resultBuffer);
|
||||
AILInternalCalls.Shutdown();
|
||||
File.WriteAllBytes(destinationFilepath, buffer);
|
||||
}
|
||||
|
||||
AILAPI.MemFreeLock(resultBuffer);
|
||||
RIBAPI.FreeProviderLibrary(0); // free all loaded providers
|
||||
AILAPI.Shutdown();
|
||||
|
||||
// Move to a cache class ?
|
||||
private static string GetAndCacheResource(string resourceName)
|
||||
{
|
||||
_ = resourceName ?? throw new ArgumentNullException(nameof(resourceName));
|
||||
string destinationFilepath = Path.Combine(dataCache, resourceName);
|
||||
if (!File.Exists(destinationFilepath))
|
||||
{
|
||||
byte[] resourceData = ExtractResource(resourceName);
|
||||
using (FileStream fsDst = File.OpenWrite(destinationFilepath))
|
||||
{
|
||||
fsDst.Write(resourceData, 0, resourceData.Length);
|
||||
}
|
||||
}
|
||||
return destinationFilepath;
|
||||
}
|
||||
File.WriteAllBytes(destinationFilepath, buffer);
|
||||
|
||||
internal static byte[] ExtractResource(string resourceName)
|
||||
{
|
||||
byte[] resourceData = (byte[])Properties.Resources.ResourceManager.GetObject(Path.GetFileNameWithoutExtension(resourceName));
|
||||
return resourceData;
|
||||
}
|
||||
|
||||
private class AILInternalCalls
|
||||
{
|
||||
public delegate int AIL_decomp_func();
|
||||
|
||||
[DllImport("mss32.dll", EntryPoint = "_AIL_decompress_ASI@24")]
|
||||
public unsafe static extern int DecompressASI(
|
||||
[MarshalAs(UnmanagedType.LPArray)] byte[] indata,
|
||||
int insize,
|
||||
[MarshalAs(UnmanagedType.LPStr)] string ext,
|
||||
IntPtr result,
|
||||
int *resultSize,
|
||||
[MarshalAs(UnmanagedType.FunctionPtr)] AIL_decomp_func func = null);
|
||||
|
||||
[DllImport("mss32.dll", EntryPoint = "_AIL_last_error@0")]
|
||||
[return: MarshalAs(UnmanagedType.LPStr)]
|
||||
public static extern string LastError();
|
||||
|
||||
[DllImport("mss32.dll", EntryPoint = "_AIL_set_redist_directory@4")]
|
||||
[return: MarshalAs(UnmanagedType.LPStr)]
|
||||
public static extern string SetRedistDirectory([MarshalAs(UnmanagedType.LPStr)] string redistDir);
|
||||
|
||||
[DllImport("mss32.dll", EntryPoint = "_AIL_mem_free_lock@4")]
|
||||
public static extern void MemFreeLock(IntPtr ptr);
|
||||
|
||||
[DllImport("mss32.dll", EntryPoint = "_AIL_startup@0")]
|
||||
public static extern int Startup();
|
||||
|
||||
[DllImport("mss32.dll", EntryPoint = "_AIL_shutdown@0")]
|
||||
public static extern int Shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using PckStudio.Models;
|
||||
|
||||
namespace PckStudio.Classes
|
||||
{
|
||||
class CSM
|
||||
{
|
||||
|
||||
//Part Name
|
||||
//Part Parent(HEAD, BODY, LEG0, LEG1, ARM0, ARM1)
|
||||
//Part Name
|
||||
//Position-X
|
||||
//Position-Y
|
||||
//Position-Z
|
||||
//Size-X
|
||||
//Size-Y
|
||||
//Size-Z
|
||||
//UV-Y
|
||||
//UV-X
|
||||
|
||||
public static List<string> CSMBlock = new List<string>();
|
||||
|
||||
public static void TryParse(string CSM, MinecraftModelView modelView)
|
||||
{
|
||||
try
|
||||
{
|
||||
int i = 0;
|
||||
string[] CSMLines = CSM.Split(new[] { "\n", "\r\n" }, StringSplitOptions.None);
|
||||
foreach (string line in CSMLines)
|
||||
{
|
||||
if (i > 10)
|
||||
{
|
||||
GetModelPartFromCSM(CSMBlock, modelView);
|
||||
CSMBlock.Clear();
|
||||
i = 0;
|
||||
}
|
||||
CSMBlock.Add(line + "\n");
|
||||
i++;
|
||||
}
|
||||
|
||||
modelView.Invalidate();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void GetModelPartFromCSM(List<string> CSM, MinecraftModelView modelView)
|
||||
{
|
||||
string PartName = CSM[0];
|
||||
string PartParent = CSM[1];
|
||||
string PartName2 = CSM[2];
|
||||
int PositionX = int.Parse(CSM[3]);
|
||||
int PositionY = int.Parse(CSM[4]);
|
||||
int PositionZ = int.Parse(CSM[5]);
|
||||
int SizeX = int.Parse(CSM[6]);
|
||||
int SizeY = int.Parse(CSM[7]);
|
||||
int SizeZ = int.Parse(CSM[8]);
|
||||
int UVY = int.Parse(CSM[9]);
|
||||
int UVX = int.Parse(CSM[10]);
|
||||
|
||||
//RenderBox
|
||||
System.Drawing.Image source = Textures[0].Source;
|
||||
Object3D object3D = new Box(source, new Rectangle(8, 0, 0x10, 8), new Rectangle(0, 8, 0x20, 8), new Point3D(0f, 0f, 0f), Effects.None);
|
||||
Object3D object3D2 = new Box(source, new Rectangle(0x28, 0, 0x10, 8), new Rectangle(0x20, 8, 0x20, 8), new Point3D(0f, 0f, 0f), Effects.None);
|
||||
Object3D object3D3 = new Box(source, new Rectangle(0x2C, 0x10, 8, 4), new Rectangle(0x28, 0x14, 0x20, 0xC), new Point3D(0f, 4f, 0f), Effects.FlipHorizontally);
|
||||
|
||||
|
||||
//RenderGroup
|
||||
Object3DGroup object3DGroup = new Object3DGroup();
|
||||
object3D2.Scale = 1.16f;
|
||||
object3DGroup.RotationOrder = RotationOrders.XY;
|
||||
object3DGroup.MinDegrees1 = -80f;
|
||||
object3DGroup.MaxDegrees1 = 80f;
|
||||
object3DGroup.MinDegrees2 = -57f;
|
||||
object3DGroup.MaxDegrees2 = 57f;
|
||||
object3DGroup.Add(object3D);
|
||||
object3DGroup.Add(object3D2);
|
||||
object3DGroup.Position = new Point3D(0f, 8f, 0f);
|
||||
object3DGroup.Origin = new Point3D(0f, -4f, 0f);
|
||||
object3DGroup.RotationOrder = RotationOrders.XY;
|
||||
modelView.AddDynamic(object3DGroup);
|
||||
}
|
||||
|
||||
public static Texture[] Textures = new Texture[] { new Texture(Bitmap.FromFile(Environment.CurrentDirectory + "\\default.png")) };
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ using OMI.Formats.Languages;
|
||||
|
||||
namespace PckStudio.Classes.FileTypes
|
||||
{
|
||||
public class PCKAudioFile
|
||||
public class PckAudioFile
|
||||
{
|
||||
public class InvalidCategoryException : Exception
|
||||
{
|
||||
94
PCK-Studio/Classes/IO/3DST/3DSTextureReader.cs
Normal file
94
PCK-Studio/Classes/IO/3DST/3DSTextureReader.cs
Normal file
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OMI.Workers;
|
||||
using PckStudio.Classes._3ds;
|
||||
using OMI;
|
||||
|
||||
namespace PckStudio.Classes.IO._3DST
|
||||
{
|
||||
internal class _3DSTextureReader : IDataFormatReader<Image>, IDataFormatReader
|
||||
{
|
||||
public Image FromFile(string filename)
|
||||
{
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
Image img = null;
|
||||
using (var fs = File.OpenRead(filename))
|
||||
{
|
||||
img = FromStream(fs);
|
||||
}
|
||||
return img;
|
||||
}
|
||||
throw new FileNotFoundException(filename);
|
||||
}
|
||||
|
||||
public Image FromStream(Stream stream)
|
||||
{
|
||||
Image img = null;
|
||||
using (var reader = new EndiannessAwareBinaryReader(stream, Encoding.ASCII, leaveOpen: true, Endianness.LittleEndian))
|
||||
{
|
||||
if (reader.ReadString(4) == "3DST")
|
||||
{
|
||||
const int offset = 32;
|
||||
reader.ReadInt32(); // unknown value
|
||||
_3DSTextureFormat format = reader.ReadInt32() switch
|
||||
{
|
||||
0 => _3DSTextureFormat.argb8,
|
||||
1 => _3DSTextureFormat.rgb8,
|
||||
2 => _3DSTextureFormat.rgba5551,
|
||||
3 => _3DSTextureFormat.rgb8,
|
||||
4 => _3DSTextureFormat.rgba4,
|
||||
9 => _3DSTextureFormat.la4,
|
||||
_ => _3DSTextureFormat.dontCare,
|
||||
};
|
||||
int width = reader.ReadInt32();
|
||||
int height = reader.ReadInt32();
|
||||
int bufferSize = CalcBufferSize(format, width, height);
|
||||
stream.Seek(offset, SeekOrigin.Begin);
|
||||
byte[] buffer = new byte[bufferSize];
|
||||
reader.Read(buffer, 0, bufferSize);
|
||||
img = TextureCodec.Decode(buffer, width, height, format);
|
||||
img.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
}
|
||||
}
|
||||
return img;
|
||||
}
|
||||
|
||||
private static int CalcBufferSize(_3DSTextureFormat textureFormat, int width, int height)
|
||||
{
|
||||
switch (textureFormat)
|
||||
{
|
||||
case _3DSTextureFormat.argb8:
|
||||
return width * height * 4;
|
||||
case _3DSTextureFormat.rgb8:
|
||||
return width * height * 3;
|
||||
case _3DSTextureFormat.rgba5551:
|
||||
case _3DSTextureFormat.rgb565:
|
||||
case _3DSTextureFormat.rgba4:
|
||||
case _3DSTextureFormat.la8:
|
||||
case _3DSTextureFormat.hilo8:
|
||||
return width * height * 2;
|
||||
case _3DSTextureFormat.l8:
|
||||
case _3DSTextureFormat.a8:
|
||||
case _3DSTextureFormat.la4:
|
||||
case _3DSTextureFormat.etc1a4:
|
||||
return width * height;
|
||||
case _3DSTextureFormat.l4:
|
||||
case _3DSTextureFormat.a4:
|
||||
case _3DSTextureFormat.etc1:
|
||||
return width * height >> 1;
|
||||
default:
|
||||
throw new InvalidDataException("Invalid texture format on BCH!");
|
||||
}
|
||||
}
|
||||
|
||||
object IDataFormatReader.FromFile(string filename) => FromFile(filename);
|
||||
|
||||
object IDataFormatReader.FromStream(Stream stream) => FromStream(stream);
|
||||
}
|
||||
}
|
||||
47
PCK-Studio/Classes/IO/3DST/3DSTextureWriter.cs
Normal file
47
PCK-Studio/Classes/IO/3DST/3DSTextureWriter.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using OMI;
|
||||
using OMI.Workers;
|
||||
using PckStudio.Classes._3ds;
|
||||
|
||||
namespace PckStudio.Classes.IO._3DST
|
||||
{
|
||||
internal class _3DSTextureWriter : IDataFormatWriter
|
||||
{
|
||||
private Image _image;
|
||||
private _3DSTextureFormat _format;
|
||||
public _3DSTextureWriter(Image image, _3DSTextureFormat format = _3DSTextureFormat.argb8)
|
||||
{
|
||||
_image = image;
|
||||
_format = format;
|
||||
}
|
||||
|
||||
public void WriteToFile(string filename)
|
||||
{
|
||||
using(var fs = File.OpenWrite(filename))
|
||||
{
|
||||
WriteToStream(fs);
|
||||
}
|
||||
}
|
||||
|
||||
public void WriteToStream(Stream stream)
|
||||
{
|
||||
using (var writer = new EndiannessAwareBinaryWriter(stream, Encoding.ASCII, leaveOpen: true, Endianness.LittleEndian))
|
||||
{
|
||||
writer.WriteString("3DST"); // 0
|
||||
writer.Write(2); // 4 unknown
|
||||
writer.Write((int)_format); // 8
|
||||
writer.Write(_image.Width); // 12
|
||||
writer.Write(_image.Height); // 16
|
||||
writer.Write(0); // 20
|
||||
writer.Write(0); // 24
|
||||
writer.Write(0); // 28
|
||||
_image.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
byte[] buffer = TextureCodec.Encode(new Bitmap(_image), _format);
|
||||
stream.Write(buffer, 0, buffer.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,14 +2,35 @@
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Runtime.InteropServices;
|
||||
using PckStudio.Classes._3ds.Utils;
|
||||
|
||||
namespace PckStudio.Classes._3ds
|
||||
{
|
||||
/// <summary>
|
||||
/// Format of the texture used on the PICA200.
|
||||
/// </summary>
|
||||
public enum _3DSTextureFormat
|
||||
{
|
||||
argb8 = 0,
|
||||
rgb8 = 1,
|
||||
rgba5551 = 2,
|
||||
rgb565 = 3,
|
||||
rgba4 = 4,
|
||||
la8 = 5,
|
||||
hilo8 = 6,
|
||||
l8 = 7,
|
||||
a8 = 8,
|
||||
la4 = 9,
|
||||
l4 = 0xa,
|
||||
a4 = 0xb,
|
||||
etc1 = 0xc,
|
||||
etc1a4 = 0xd,
|
||||
dontCare
|
||||
}
|
||||
|
||||
class TextureCodec
|
||||
{
|
||||
private static int[] tileOrder = { 0, 1, 8, 9, 2, 3, 10, 11, 16, 17, 24, 25, 18, 19, 26, 27, 4, 5, 12, 13, 6, 7, 14, 15, 20, 21, 28, 29, 22, 23, 30, 31, 32, 33, 40, 41, 34, 35, 42, 43, 48, 49, 56, 57, 50, 51, 58, 59, 36, 37, 44, 45, 38, 39, 46, 47, 52, 53, 60, 61, 54, 55, 62, 63 };
|
||||
private static int[,] etc1LUT = { { 2, 8, -2, -8 }, { 5, 17, -5, -17 }, { 9, 29, -9, -29 }, { 13, 42, -13, -42 }, { 18, 60, -18, -60 }, { 24, 80, -24, -80 }, { 33, 106, -33, -106 }, { 47, 183, -47, -183 } };
|
||||
private static readonly int[] tileOrder = { 0, 1, 8, 9, 2, 3, 10, 11, 16, 17, 24, 25, 18, 19, 26, 27, 4, 5, 12, 13, 6, 7, 14, 15, 20, 21, 28, 29, 22, 23, 30, 31, 32, 33, 40, 41, 34, 35, 42, 43, 48, 49, 56, 57, 50, 51, 58, 59, 36, 37, 44, 45, 38, 39, 46, 47, 52, 53, 60, 61, 54, 55, 62, 63 };
|
||||
private static readonly int[,] etc1LUT = { { 2, 8, -2, -8 }, { 5, 17, -5, -17 }, { 9, 29, -9, -29 }, { 13, 42, -13, -42 }, { 18, 60, -18, -60 }, { 24, 80, -24, -80 }, { 33, 106, -33, -106 }, { 47, 183, -47, -183 } };
|
||||
|
||||
private static class TextureConverter
|
||||
{
|
||||
@@ -1,57 +1,66 @@
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using OMI;
|
||||
using OMI.Workers;
|
||||
using PckStudio.Classes.FileTypes;
|
||||
|
||||
namespace PckStudio.Classes.IO.CSMB
|
||||
{
|
||||
internal class CSMBFileReader : StreamDataReader<CSMBFile>
|
||||
internal class CSMBFileReader : IDataFormatReader<CSMBFile>, IDataFormatReader
|
||||
{
|
||||
public static CSMBFile Read(Stream stream)
|
||||
{
|
||||
return new CSMBFileReader().ReadFromStream(stream);
|
||||
}
|
||||
|
||||
private CSMBFileReader() : base(false)
|
||||
private CSMBFileReader()
|
||||
{ }
|
||||
|
||||
protected override CSMBFile ReadFromStream(Stream stream)
|
||||
public CSMBFile FromFile(string filename)
|
||||
{
|
||||
CSMBFile BinFile = new CSMBFile();
|
||||
ReadInt(stream);
|
||||
int NumOfParts = ReadInt(stream);
|
||||
for(int i = 0; i < NumOfParts; i++)
|
||||
{
|
||||
CSMBPart part = new CSMBPart();
|
||||
part.Name = ReadString(stream);
|
||||
part.Parent = (CSMBParentPart)ReadInt(stream);
|
||||
part.posX = ReadFloat(stream);
|
||||
part.posY = ReadFloat(stream);
|
||||
part.posZ = ReadFloat(stream);
|
||||
part.sizeX = ReadFloat(stream);
|
||||
part.sizeY = ReadFloat(stream);
|
||||
part.sizeZ = ReadFloat(stream);
|
||||
part.uvX = ReadInt(stream);
|
||||
part.uvY = ReadInt(stream);
|
||||
part.MirrorTexture = ReadBool(stream);
|
||||
part.HideWArmour = ReadBool(stream);
|
||||
part.Inflation = ReadFloat(stream);
|
||||
BinFile.Parts.Add(part);
|
||||
}
|
||||
int NumOfOffsets = ReadInt(stream);
|
||||
for (int i = 0; i < NumOfOffsets; i++)
|
||||
{
|
||||
CSMBOffset offset = new CSMBOffset();
|
||||
offset.offsetPart = (CSMBOffsetPart)ReadInt(stream);
|
||||
offset.VerticalOffset = ReadFloat(stream);
|
||||
BinFile.Offsets.Add(offset);
|
||||
}
|
||||
return BinFile;
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
private string ReadString(Stream stream)
|
||||
public CSMBFile FromStream(Stream stream)
|
||||
{
|
||||
short strlen = ReadShort(stream);
|
||||
return ReadString(stream, strlen, Encoding.ASCII);
|
||||
CSMBFile csmbFile = new CSMBFile();
|
||||
using (var reader = new EndiannessAwareBinaryReader(stream, Encoding.ASCII, leaveOpen: true, Endianness.LittleEndian))
|
||||
{
|
||||
reader.ReadInt32();
|
||||
int numOfParts = reader.ReadInt32();
|
||||
for (int i = 0; i < numOfParts; i++)
|
||||
{
|
||||
CSMBPart part = new CSMBPart();
|
||||
part.Name = ReadString(reader);
|
||||
part.Parent = (CSMBParentPart)reader.ReadInt32();
|
||||
part.posX = reader.ReadSingle();
|
||||
part.posY = reader.ReadSingle();
|
||||
part.posZ = reader.ReadSingle();
|
||||
part.sizeX = reader.ReadSingle();
|
||||
part.sizeY = reader.ReadSingle();
|
||||
part.sizeZ = reader.ReadSingle();
|
||||
part.uvX = reader.ReadInt32();
|
||||
part.uvY = reader.ReadInt32();
|
||||
part.MirrorTexture = reader.ReadBoolean();
|
||||
part.HideWArmour = reader.ReadBoolean();
|
||||
part.Inflation = reader.ReadSingle();
|
||||
csmbFile.Parts.Add(part);
|
||||
}
|
||||
int numOfOffsets = reader.ReadInt32();
|
||||
for (int i = 0; i < numOfOffsets; i++)
|
||||
{
|
||||
CSMBOffset offset = new CSMBOffset();
|
||||
offset.offsetPart = (CSMBOffsetPart)reader.ReadInt32();
|
||||
offset.VerticalOffset = reader.ReadSingle();
|
||||
csmbFile.Offsets.Add(offset);
|
||||
}
|
||||
}
|
||||
return csmbFile;
|
||||
}
|
||||
|
||||
private string ReadString(EndiannessAwareBinaryReader reader)
|
||||
{
|
||||
ushort strlen = reader.ReadUInt16();
|
||||
return reader.ReadString(strlen);
|
||||
}
|
||||
|
||||
object IDataFormatReader.FromStream(Stream stream) => FromStream(stream);
|
||||
|
||||
object IDataFormatReader.FromFile(string filename) => FromFile(filename);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,54 +1,58 @@
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using OMI.Workers;
|
||||
using OMI;
|
||||
|
||||
namespace PckStudio.Classes.IO.CSMB
|
||||
{
|
||||
internal class CSMBFileWriter : StreamDataWriter
|
||||
internal class CSMBFileWriter : IDataFormatWriter
|
||||
{
|
||||
CSMBFile _CSMB;
|
||||
public static void Write(Stream stream, CSMBFile file)
|
||||
{
|
||||
new CSMBFileWriter(file).WriteToStream(stream);
|
||||
}
|
||||
|
||||
public CSMBFileWriter(CSMBFile csmb) : base(false)
|
||||
public CSMBFileWriter(CSMBFile csmb)
|
||||
{
|
||||
_CSMB = csmb;
|
||||
}
|
||||
|
||||
protected override void WriteToStream(Stream stream)
|
||||
public void WriteToFile(string filename)
|
||||
{
|
||||
WriteInt(stream, 0);
|
||||
WriteInt(stream, _CSMB.Parts.Count);
|
||||
foreach(CSMBPart part in _CSMB.Parts)
|
||||
using(var fs = File.OpenWrite(filename))
|
||||
{
|
||||
WriteString(stream, part.Name);
|
||||
WriteInt(stream, (int)part.Parent);
|
||||
WriteFloat(stream, part.posX);
|
||||
WriteFloat(stream, part.posY);
|
||||
WriteFloat(stream, part.posZ);
|
||||
WriteFloat(stream, part.sizeX);
|
||||
WriteFloat(stream, part.sizeY);
|
||||
WriteFloat(stream, part.sizeZ);
|
||||
WriteInt(stream, part.uvX);
|
||||
WriteInt(stream, part.uvY);
|
||||
WriteBool(stream, part.MirrorTexture);
|
||||
WriteBool(stream, part.HideWArmour);
|
||||
WriteFloat(stream, part.Inflation);
|
||||
}
|
||||
WriteInt(stream, _CSMB.Offsets.Count);
|
||||
foreach (CSMBOffset offset in _CSMB.Offsets)
|
||||
{
|
||||
WriteInt(stream, (int)offset.offsetPart);
|
||||
WriteFloat(stream, offset.VerticalOffset);
|
||||
WriteToStream(fs);
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteString(Stream stream, string s)
|
||||
public void WriteToStream(Stream stream)
|
||||
{
|
||||
WriteShort(stream, (short)s.Length);
|
||||
WriteString(stream, s, Encoding.ASCII);
|
||||
using (var writer = new EndiannessAwareBinaryWriter(stream, Encoding.ASCII, leaveOpen: true, Endianness.LittleEndian))
|
||||
{
|
||||
writer.Write(0);
|
||||
writer.Write(_CSMB.Parts.Count);
|
||||
foreach (CSMBPart part in _CSMB.Parts)
|
||||
{
|
||||
writer.Write((short)part.Name.Length);
|
||||
writer.WriteString(part.Name);
|
||||
writer.Write((int)part.Parent);
|
||||
writer.Write(part.posX);
|
||||
writer.Write(part.posY);
|
||||
writer.Write(part.posZ);
|
||||
writer.Write(part.sizeX);
|
||||
writer.Write(part.sizeY);
|
||||
writer.Write(part.sizeZ);
|
||||
writer.Write(part.uvX);
|
||||
writer.Write(part.uvY);
|
||||
writer.Write(part.MirrorTexture);
|
||||
writer.Write(part.HideWArmour);
|
||||
writer.Write(part.Inflation);
|
||||
}
|
||||
writer.Write(_CSMB.Offsets.Count);
|
||||
foreach (CSMBOffset offset in _CSMB.Offsets)
|
||||
{
|
||||
writer.Write((int)offset.offsetPart);
|
||||
writer.Write(offset.VerticalOffset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PckStudio.Classes.IO.PCK
|
||||
{
|
||||
|
||||
public class InvalidAudioPckException : Exception
|
||||
{
|
||||
public InvalidAudioPckException(string message) : base(message)
|
||||
{ }
|
||||
}
|
||||
|
||||
internal class PCKAudioFileReader : StreamDataReader<PCKAudioFile>
|
||||
{
|
||||
private PCKAudioFile _file;
|
||||
private List<string> LUT = new List<string>();
|
||||
private List<PCKAudioFile.AudioCategory.EAudioType> _OriginalAudioTypeOrder = new List<PCKAudioFile.AudioCategory.EAudioType>();
|
||||
|
||||
|
||||
public static PCKAudioFile Read(Stream stream, bool isLittleEndian)
|
||||
{
|
||||
return new PCKAudioFileReader(isLittleEndian).ReadFromStream(stream);
|
||||
}
|
||||
|
||||
private PCKAudioFileReader(bool isLittleEndian) : base(isLittleEndian)
|
||||
{
|
||||
}
|
||||
|
||||
protected override PCKAudioFile ReadFromStream(Stream stream)
|
||||
{
|
||||
int pck_type = ReadInt(stream);
|
||||
if (pck_type > 0xf00000) // 03 00 00 00 == true
|
||||
throw new OverflowException(nameof(pck_type));
|
||||
if (pck_type > 1)
|
||||
throw new InvalidAudioPckException(nameof(pck_type));
|
||||
_file = new PCKAudioFile();
|
||||
ReadLookUpTable(stream);
|
||||
ReadCategories(stream);
|
||||
ReadCategorySongs(stream);
|
||||
return _file;
|
||||
}
|
||||
|
||||
private void ReadLookUpTable(Stream stream)
|
||||
{
|
||||
int count = ReadInt(stream);
|
||||
LUT = new List<string>(count);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
int index = ReadInt(stream);
|
||||
LUT.Insert(index, ReadString(stream));
|
||||
}
|
||||
}
|
||||
|
||||
private void ReadCategories(Stream stream)
|
||||
{
|
||||
int categoryEntryCount = ReadInt(stream);
|
||||
for (; 0 < categoryEntryCount; categoryEntryCount--)
|
||||
{
|
||||
var parameterType = (PCKAudioFile.AudioCategory.EAudioParameterType)ReadInt(stream);
|
||||
var audioType = (PCKAudioFile.AudioCategory.EAudioType)ReadInt(stream);
|
||||
string name = ReadString(stream);
|
||||
// AddCategory puts the file's categories out of order and causes some songs to be put in the wrong categories
|
||||
// This is my simple fix for the issue.
|
||||
_OriginalAudioTypeOrder.Add(audioType);
|
||||
_file.AddCategory(parameterType, audioType, name);
|
||||
}
|
||||
}
|
||||
|
||||
private void ReadCategorySongs(Stream stream)
|
||||
{
|
||||
List<string> credits = new List<string>();
|
||||
List<string> creditIds = new List<string>();
|
||||
foreach (var c in _OriginalAudioTypeOrder)
|
||||
{
|
||||
int audioCount = ReadInt(stream);
|
||||
for (; 0 < audioCount; audioCount--)
|
||||
{
|
||||
string key = LUT[ReadInt(stream)];
|
||||
string value = ReadString(stream);
|
||||
switch (key)
|
||||
{
|
||||
case "CUENAME":
|
||||
_file.GetCategory(c).SongNames.Add(value);
|
||||
break;
|
||||
case "CREDIT":
|
||||
credits.Add(value);
|
||||
break;
|
||||
case "CREDITID":
|
||||
creditIds.Add(value);
|
||||
_file.AddCreditId(value);
|
||||
break;
|
||||
default:
|
||||
throw new InvalidDataException(nameof(key));
|
||||
}
|
||||
}
|
||||
};
|
||||
foreach (var credit in credits.Zip(creditIds, (str, id) => (str, id)))
|
||||
{
|
||||
_file.SetCredit(credit.id, credit.str);
|
||||
}
|
||||
}
|
||||
|
||||
private string ReadString(Stream stream)
|
||||
{
|
||||
int len = ReadInt(stream);
|
||||
string s = ReadString(stream, len, IsUsingLittleEndian ? Encoding.Unicode : Encoding.BigEndianUnicode);
|
||||
ReadInt(stream); // padding
|
||||
return s;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace PckStudio.Classes.IO.PCK
|
||||
{
|
||||
internal class PCKAudioFileWriter : StreamDataWriter
|
||||
{
|
||||
|
||||
private PCKAudioFile _file;
|
||||
private static readonly List<string> LUT = new List<string>
|
||||
{
|
||||
"CUENAME",
|
||||
"CREDIT",
|
||||
"CREDITID"
|
||||
};
|
||||
|
||||
public static void Write(Stream stream, PCKAudioFile file, bool isLittleEndian)
|
||||
{
|
||||
new PCKAudioFileWriter(file, isLittleEndian).WriteToStream(stream);
|
||||
}
|
||||
|
||||
private PCKAudioFileWriter(PCKAudioFile file, bool isLittleEndian) : base(isLittleEndian)
|
||||
{
|
||||
_file = file;
|
||||
}
|
||||
|
||||
protected override void WriteToStream(Stream stream)
|
||||
{
|
||||
WriteInt(stream, _file.type);
|
||||
WriteLookUpTable(stream);
|
||||
WriteCategories(stream);
|
||||
WriteCategorySongs(stream);
|
||||
}
|
||||
|
||||
private void WriteString(Stream stream, string s)
|
||||
{
|
||||
WriteInt(stream, s.Length);
|
||||
WriteString(stream, s, IsUsingLittleEndian ? Encoding.Unicode : Encoding.BigEndianUnicode);
|
||||
WriteInt(stream, 0); // padding
|
||||
}
|
||||
|
||||
private void WriteLookUpTable(Stream stream)
|
||||
{
|
||||
WriteInt(stream, 3);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
WriteInt(stream, i);
|
||||
WriteString(stream, LUT[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteCategories(Stream stream)
|
||||
{
|
||||
WriteInt(stream, _file.Categories.Length);
|
||||
foreach (var category in _file.Categories)
|
||||
{
|
||||
WriteInt(stream, (int)category.parameterType);
|
||||
WriteInt(stream, (int)category.audioType);
|
||||
WriteString(stream, category.Name);
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteCategorySongs(Stream stream)
|
||||
{
|
||||
bool addCredit = true;
|
||||
foreach (var category in _file.Categories)
|
||||
{
|
||||
WriteInt(stream, category.SongNames.Count + (addCredit ? _file.Credits.Count * 2 : 0));
|
||||
foreach (var name in category.SongNames)
|
||||
{
|
||||
WriteInt(stream, LUT.IndexOf("CUENAME"));
|
||||
WriteString(stream, name);
|
||||
}
|
||||
if (addCredit)
|
||||
{
|
||||
foreach (var credit in _file.Credits)
|
||||
{
|
||||
WriteInt(stream, LUT.IndexOf("CREDIT"));
|
||||
WriteString(stream, credit.Value);
|
||||
WriteInt(stream, LUT.IndexOf("CREDITID"));
|
||||
WriteString(stream, credit.Key);
|
||||
}
|
||||
}
|
||||
addCredit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
140
PCK-Studio/Classes/IO/PckAudio/PckAudioFileReader.cs
Normal file
140
PCK-Studio/Classes/IO/PckAudio/PckAudioFileReader.cs
Normal file
@@ -0,0 +1,140 @@
|
||||
using OMI;
|
||||
using OMI.Workers;
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PckStudio.Classes.IO.PCK
|
||||
{
|
||||
|
||||
public class InvalidAudioPckException : Exception
|
||||
{
|
||||
public InvalidAudioPckException(string message) : base(message)
|
||||
{ }
|
||||
}
|
||||
|
||||
internal class PckAudioFileReader : IDataFormatReader<PckAudioFile>, IDataFormatReader
|
||||
{
|
||||
private PckAudioFile _file;
|
||||
private Endianness _endianness;
|
||||
private List<string> LUT = new List<string>();
|
||||
private List<PckAudioFile.AudioCategory.EAudioType> _OriginalAudioTypeOrder = new List<PckAudioFile.AudioCategory.EAudioType>();
|
||||
|
||||
public PckAudioFileReader(Endianness endianness)
|
||||
{
|
||||
_endianness = endianness;
|
||||
}
|
||||
|
||||
public PckAudioFile FromFile(string filename)
|
||||
{
|
||||
if(File.Exists(filename))
|
||||
{
|
||||
PckAudioFile file;
|
||||
using(var fs = File.OpenRead(filename))
|
||||
{
|
||||
file = FromStream(fs);
|
||||
}
|
||||
return file;
|
||||
}
|
||||
throw new FileNotFoundException(filename);
|
||||
}
|
||||
|
||||
public PckAudioFile FromStream(Stream stream)
|
||||
{
|
||||
using (var reader = new EndiannessAwareBinaryReader(stream,
|
||||
_endianness == Endianness.BigEndian
|
||||
? Encoding.BigEndianUnicode
|
||||
: Encoding.Unicode,
|
||||
leaveOpen: true, _endianness))
|
||||
{
|
||||
int pck_type = reader.ReadInt32();
|
||||
if (pck_type > 0xf00000) // 03 00 00 00 == true
|
||||
throw new OverflowException(nameof(pck_type));
|
||||
if (pck_type > 1)
|
||||
throw new InvalidAudioPckException(nameof(pck_type));
|
||||
_file = new PckAudioFile();
|
||||
ReadLookUpTable(reader);
|
||||
ReadCategories(reader);
|
||||
ReadCategorySongs(reader);
|
||||
}
|
||||
return _file;
|
||||
}
|
||||
|
||||
private void ReadLookUpTable(EndiannessAwareBinaryReader reader)
|
||||
{
|
||||
int count = reader.ReadInt32();
|
||||
LUT = new List<string>(count);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
int index = reader.ReadInt32();
|
||||
string value = ReadString(reader);
|
||||
LUT.Insert(index, value);
|
||||
}
|
||||
}
|
||||
|
||||
private void ReadCategories(EndiannessAwareBinaryReader reader)
|
||||
{
|
||||
int categoryEntryCount = reader.ReadInt32();
|
||||
for (; 0 < categoryEntryCount; categoryEntryCount--)
|
||||
{
|
||||
var parameterType = (PckAudioFile.AudioCategory.EAudioParameterType)reader.ReadInt32();
|
||||
var audioType = (PckAudioFile.AudioCategory.EAudioType)reader.ReadInt32();
|
||||
string name = ReadString(reader);
|
||||
// AddCategory puts the file's categories out of order and causes some songs to be put in the wrong categories
|
||||
// This is my simple fix for the issue.
|
||||
_OriginalAudioTypeOrder.Add(audioType);
|
||||
_file.AddCategory(parameterType, audioType, name);
|
||||
}
|
||||
}
|
||||
|
||||
private void ReadCategorySongs(EndiannessAwareBinaryReader reader)
|
||||
{
|
||||
List<string> credits = new List<string>();
|
||||
List<string> creditIds = new List<string>();
|
||||
foreach (var c in _OriginalAudioTypeOrder)
|
||||
{
|
||||
int audioCount = reader.ReadInt32();
|
||||
for (; 0 < audioCount; audioCount--)
|
||||
{
|
||||
string key = LUT[reader.ReadInt32()];
|
||||
string value = ReadString(reader);
|
||||
switch (key)
|
||||
{
|
||||
case "CUENAME":
|
||||
_file.GetCategory(c).SongNames.Add(value);
|
||||
break;
|
||||
case "CREDIT":
|
||||
credits.Add(value);
|
||||
break;
|
||||
case "CREDITID":
|
||||
creditIds.Add(value);
|
||||
_file.AddCreditId(value);
|
||||
break;
|
||||
default:
|
||||
throw new InvalidDataException(nameof(key));
|
||||
}
|
||||
}
|
||||
};
|
||||
foreach (var credit in credits.Zip(creditIds, (str, id) => (str, id)))
|
||||
{
|
||||
_file.SetCredit(credit.id, credit.str);
|
||||
}
|
||||
}
|
||||
|
||||
private string ReadString(EndiannessAwareBinaryReader reader)
|
||||
{
|
||||
int len = reader.ReadInt32();
|
||||
string s = reader.ReadString(len);
|
||||
reader.ReadInt32(); // padding
|
||||
return s;
|
||||
}
|
||||
|
||||
object IDataFormatReader.FromStream(Stream stream) => FromStream(stream);
|
||||
|
||||
object IDataFormatReader.FromFile(string filename) => FromFile(filename);
|
||||
}
|
||||
}
|
||||
104
PCK-Studio/Classes/IO/PckAudio/PckAudioFileWriter.cs
Normal file
104
PCK-Studio/Classes/IO/PckAudio/PckAudioFileWriter.cs
Normal file
@@ -0,0 +1,104 @@
|
||||
using OMI;
|
||||
using OMI.Workers;
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace PckStudio.Classes.IO.PCK
|
||||
{
|
||||
internal class PckAudioFileWriter : IDataFormatWriter
|
||||
{
|
||||
|
||||
private PckAudioFile _file;
|
||||
private Endianness _endianness;
|
||||
private static readonly List<string> LUT = new List<string>
|
||||
{
|
||||
"CUENAME",
|
||||
"CREDIT",
|
||||
"CREDITID"
|
||||
};
|
||||
|
||||
public PckAudioFileWriter(PckAudioFile file, Endianness endianness)
|
||||
{
|
||||
_file = file;
|
||||
_endianness = endianness;
|
||||
}
|
||||
|
||||
public void WriteToFile(string filename)
|
||||
{
|
||||
using(var fs = File.OpenWrite(filename))
|
||||
{
|
||||
WriteToStream(fs);
|
||||
}
|
||||
}
|
||||
|
||||
public void WriteToStream(Stream stream)
|
||||
{
|
||||
using (var writer = new EndiannessAwareBinaryWriter(stream,
|
||||
_endianness == Endianness.BigEndian
|
||||
? Encoding.BigEndianUnicode
|
||||
: Encoding.Unicode,
|
||||
leaveOpen: true, _endianness))
|
||||
{
|
||||
writer.Write(_file.type);
|
||||
WriteLookUpTable(writer);
|
||||
WriteCategories(writer);
|
||||
WriteCategorySongs(writer);
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteString(EndiannessAwareBinaryWriter writer, string s)
|
||||
{
|
||||
writer.Write(s.Length);
|
||||
writer.WriteString(s);
|
||||
writer.Write(0); // padding
|
||||
}
|
||||
|
||||
private void WriteLookUpTable(EndiannessAwareBinaryWriter writer)
|
||||
{
|
||||
writer.Write(3);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
writer.Write(i);
|
||||
WriteString(writer, LUT[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteCategories(EndiannessAwareBinaryWriter writer)
|
||||
{
|
||||
writer.Write(_file.Categories.Length);
|
||||
foreach (var category in _file.Categories)
|
||||
{
|
||||
writer.Write((int)category.parameterType);
|
||||
writer.Write((int)category.audioType);
|
||||
WriteString(writer, category.Name);
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteCategorySongs(EndiannessAwareBinaryWriter writer)
|
||||
{
|
||||
bool addCredit = true;
|
||||
foreach (var category in _file.Categories)
|
||||
{
|
||||
writer.Write(category.SongNames.Count + (addCredit ? _file.Credits.Count * 2 : 0));
|
||||
foreach (var name in category.SongNames)
|
||||
{
|
||||
writer.Write(LUT.IndexOf("CUENAME"));
|
||||
WriteString(writer, name);
|
||||
}
|
||||
if (addCredit)
|
||||
{
|
||||
foreach (var credit in _file.Credits)
|
||||
{
|
||||
writer.Write(LUT.IndexOf("CREDIT"));
|
||||
WriteString(writer, credit.Value);
|
||||
writer.Write(LUT.IndexOf("CREDITID"));
|
||||
WriteString(writer, credit.Key);
|
||||
}
|
||||
}
|
||||
addCredit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
/* 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 PckStudio.Classes.FileTypes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PckStudio.Classes.IO
|
||||
{
|
||||
public abstract class StreamDataReader<T>
|
||||
{
|
||||
private static bool useLittleEndian;
|
||||
protected static bool IsUsingLittleEndian => useLittleEndian;
|
||||
protected abstract T ReadFromStream(Stream stream);
|
||||
|
||||
protected StreamDataReader(bool useLittleEndian)
|
||||
{
|
||||
StreamDataReader<T>.useLittleEndian = useLittleEndian;
|
||||
}
|
||||
|
||||
protected static string ReadString(Stream stream, int length, Encoding encoding)
|
||||
{
|
||||
byte[] buffer = ReadBytes(stream, length << Convert.ToInt32(encoding is UnicodeEncoding));
|
||||
return encoding.GetString(buffer).TrimEnd('\0');
|
||||
}
|
||||
|
||||
protected static byte[] ReadBytes(Stream stream, int count)
|
||||
{
|
||||
byte[] buffer = new byte[count];
|
||||
stream.Read(buffer, 0, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
protected static bool ReadBool(Stream stream)
|
||||
{
|
||||
return stream.ReadByte() != 0;
|
||||
}
|
||||
|
||||
protected static ushort ReadUShort(Stream stream) => (ushort)ReadShort(stream);
|
||||
protected static short ReadShort(Stream stream)
|
||||
{
|
||||
byte[] bytes = ReadBytes(stream, 2);
|
||||
if (BitConverter.IsLittleEndian && !useLittleEndian)
|
||||
Array.Reverse(bytes);
|
||||
return BitConverter.ToInt16(bytes, 0);
|
||||
}
|
||||
|
||||
protected static uint ReadUInt(Stream stream) => (uint)ReadInt(stream);
|
||||
protected static int ReadInt(Stream stream)
|
||||
{
|
||||
byte[] buffer = ReadBytes(stream, 4);
|
||||
if (BitConverter.IsLittleEndian && !useLittleEndian)
|
||||
Array.Reverse(buffer);
|
||||
return BitConverter.ToInt32(buffer, 0);
|
||||
}
|
||||
|
||||
protected static ulong ReadULong(Stream stream) => (ulong)ReadLong(stream);
|
||||
protected static long ReadLong(Stream stream)
|
||||
{
|
||||
byte[] buffer = ReadBytes(stream, 8);
|
||||
if (BitConverter.IsLittleEndian && !useLittleEndian)
|
||||
Array.Reverse(buffer);
|
||||
return BitConverter.ToInt64(buffer, 0);
|
||||
}
|
||||
|
||||
protected static float ReadFloat(Stream stream)
|
||||
{
|
||||
byte[] buffer = ReadBytes(stream, 4);
|
||||
if (BitConverter.IsLittleEndian && !useLittleEndian)
|
||||
Array.Reverse(buffer);
|
||||
return BitConverter.ToSingle(buffer, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/* 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.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PckStudio.Classes.IO
|
||||
{
|
||||
public abstract class StreamDataWriter
|
||||
{
|
||||
private static bool useLittleEndian;
|
||||
protected static bool IsUsingLittleEndian => useLittleEndian;
|
||||
|
||||
protected StreamDataWriter(bool littleEndian)
|
||||
{
|
||||
useLittleEndian = littleEndian;
|
||||
}
|
||||
|
||||
protected abstract void WriteToStream(Stream stream);
|
||||
|
||||
protected static void WriteBool(Stream stream, bool state)
|
||||
{
|
||||
stream.WriteByte((byte)(state ? 1 : 0));
|
||||
}
|
||||
|
||||
protected static void WriteUShort(Stream stream, ushort value) => WriteShort(stream, (short)value);
|
||||
|
||||
protected static void WriteShort(Stream stream, short value)
|
||||
{
|
||||
byte[] bytes = BitConverter.GetBytes(value);
|
||||
if (BitConverter.IsLittleEndian && !useLittleEndian)
|
||||
Array.Reverse(bytes);
|
||||
WriteBytes(stream, bytes, 2);
|
||||
}
|
||||
|
||||
protected static void WriteUInt(Stream stream, uint value) => WriteInt(stream, (int)value);
|
||||
protected static void WriteInt(Stream stream, int value)
|
||||
{
|
||||
byte[] buffer = BitConverter.GetBytes(value);
|
||||
if (BitConverter.IsLittleEndian && !useLittleEndian)
|
||||
Array.Reverse(buffer);
|
||||
WriteBytes(stream, buffer, 4);
|
||||
}
|
||||
|
||||
protected static void WriteULong(Stream stream, ulong value) => WriteLong(stream, (long)value);
|
||||
protected static void WriteLong(Stream stream, long value)
|
||||
{
|
||||
byte[] buffer = BitConverter.GetBytes(value);
|
||||
if (BitConverter.IsLittleEndian && !useLittleEndian)
|
||||
Array.Reverse(buffer);
|
||||
WriteBytes(stream, buffer, 8);
|
||||
}
|
||||
|
||||
protected static void WriteString(Stream stream, string s, Encoding encoding)
|
||||
=> WriteBytes(stream, encoding.GetBytes(s));
|
||||
|
||||
protected static void WriteBytes(Stream stream, byte[] bytes) => WriteBytes(stream, bytes, bytes.Length);
|
||||
protected static void WriteBytes(Stream stream, byte[] bytes, int count)
|
||||
{
|
||||
stream.Write(bytes, 0, count);
|
||||
}
|
||||
|
||||
protected static void WriteFloat(Stream stream, float value)
|
||||
{
|
||||
byte[] buffer = BitConverter.GetBytes(value);
|
||||
if (BitConverter.IsLittleEndian && !useLittleEndian)
|
||||
Array.Reverse(buffer);
|
||||
WriteBytes(stream, buffer, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
51
PCK-Studio/Classes/Misc/FileCacher.cs
Normal file
51
PCK-Studio/Classes/Misc/FileCacher.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace PckStudio.Classes.Misc
|
||||
{
|
||||
internal class FileCacher
|
||||
{
|
||||
private string _cacheDirectory;
|
||||
|
||||
public string CacheDirectory => _cacheDirectory;
|
||||
|
||||
public FileCacher(string cacheDirectory)
|
||||
{
|
||||
_cacheDirectory = cacheDirectory;
|
||||
}
|
||||
|
||||
public bool HasFileCached(string filename)
|
||||
{
|
||||
string destinationFilepath = Path.Combine(_cacheDirectory, filename);
|
||||
return File.Exists(destinationFilepath);
|
||||
}
|
||||
|
||||
public string GetCachedFilepath(string filename)
|
||||
{
|
||||
if (HasFileCached(filename))
|
||||
{
|
||||
return Path.Combine(_cacheDirectory, filename);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Caches data if the <paramref name="filename"/> doesn't already exists in the <see cref="CacheDirectory"/>
|
||||
/// </summary>
|
||||
/// <param name="data">Data to cache</param>
|
||||
/// <param name="filename">Filename with extension</param>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public void Cache(byte[] data, string filename)
|
||||
{
|
||||
_ = filename ?? throw new ArgumentNullException("filename");
|
||||
string destinationFilepath = Path.Combine(_cacheDirectory, filename);
|
||||
if (!File.Exists(destinationFilepath))
|
||||
{
|
||||
using (FileStream fsDst = File.OpenWrite(destinationFilepath))
|
||||
{
|
||||
fsDst.Write(data, 0, data.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,12 +10,32 @@ namespace PckStudio.Classes.Misc
|
||||
public static DiscordRpcClient Client;
|
||||
public static readonly DateTime StartUpTime = DateTime.UtcNow;
|
||||
|
||||
private static readonly Assets _assets = new Assets()
|
||||
{
|
||||
LargeImageKey = "pcklgo",
|
||||
LargeImageText = "PCK-Studio",
|
||||
};
|
||||
|
||||
private static readonly Button[] _buttons = new Button[]
|
||||
{
|
||||
new Button()
|
||||
{
|
||||
Label = "Check it out.",
|
||||
Url = Program.ProjectUrl,
|
||||
}
|
||||
};
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
Client = new DiscordRpcClient(Settings.Default.RichPresenceId);
|
||||
Client.Initialize();
|
||||
}
|
||||
|
||||
public static void SetPresence(string details)
|
||||
{
|
||||
SetPresence(details, null);
|
||||
}
|
||||
|
||||
public static void SetPresence(string details, string state)
|
||||
{
|
||||
Client?.SetPresence(new RichPresence()
|
||||
@@ -23,16 +43,14 @@ namespace PckStudio.Classes.Misc
|
||||
Details = details,
|
||||
State = state,
|
||||
Timestamps = new Timestamps() { Start = StartUpTime },
|
||||
Assets = new Assets()
|
||||
{
|
||||
LargeImageKey = "pcklgo",
|
||||
LargeImageText = "PCK-Studio",
|
||||
}
|
||||
Assets = _assets,
|
||||
Buttons = _buttons
|
||||
});
|
||||
}
|
||||
|
||||
public static void Deinitialize()
|
||||
{
|
||||
Client?.ClearPresence();
|
||||
Client?.Dispose();
|
||||
Client = null;
|
||||
}
|
||||
|
||||
64
PCK-Studio/Classes/Models/SkinBox.cs
Normal file
64
PCK-Studio/Classes/Models/SkinBox.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PckStudio.Classes.Models
|
||||
{
|
||||
public class SkinBox
|
||||
{
|
||||
public string Type;
|
||||
public Vector3 Pos;
|
||||
public Vector3 Size;
|
||||
public float U, V;
|
||||
public bool HideWithArmor;
|
||||
public bool Mirror;
|
||||
public float Scale;
|
||||
public SkinBox(string input)
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] arguments = Regex.Split(input, @"\s+"); // split by whitespace
|
||||
|
||||
int old_length = arguments.Length - 1;
|
||||
|
||||
Array.Resize<string>(ref arguments, 12);
|
||||
|
||||
for (int x = 11; x > old_length; x--)
|
||||
{
|
||||
arguments[x] = "0"; // set any missing arguments to '0'
|
||||
}
|
||||
|
||||
Type = arguments[0].ToUpper(); // just in case a box has all lower, the editor still parses correctly
|
||||
|
||||
Pos = new Vector3(float.Parse(arguments[1]), float.Parse(arguments[2]), float.Parse(arguments[3]));
|
||||
Size = new Vector3(float.Parse(arguments[4]), float.Parse(arguments[5]), float.Parse(arguments[6]));
|
||||
U = float.Parse(arguments[7]);
|
||||
V = float.Parse(arguments[8]);
|
||||
HideWithArmor = Convert.ToBoolean(int.Parse(arguments[9]));
|
||||
Mirror = Convert.ToBoolean(int.Parse(arguments[10]));
|
||||
Scale = float.Parse(arguments[11]);
|
||||
}
|
||||
catch (FormatException fex)
|
||||
{
|
||||
MessageBox.Show($"A Format Exception was thrown\nFailed to parse BOX value\n{fex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
catch (IndexOutOfRangeException iex) // this should be MUCH more rare now
|
||||
{
|
||||
MessageBox.Show($"A box paramater was out of range\nFailed to parse BOX value\n{iex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Type = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public ValueTuple<string, string> ToProperty()
|
||||
{
|
||||
string value = $"{Type} {Pos.X} {Pos.Y} {Pos.Z} {Size.X} {Size.Y} {Size.Z} {U} {V} {Convert.ToInt32(HideWithArmor)} {Convert.ToInt32(Mirror)} {Scale}";
|
||||
return new ValueTuple<string, string>("BOX", value.Replace(',', '.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using System.Windows.Forms;
|
||||
|
||||
namespace PckStudio.Classes.Networking
|
||||
{
|
||||
[Obsolete]
|
||||
class Network
|
||||
{
|
||||
public static string Version = Application.ProductVersion;
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Windows.Forms;
|
||||
|
||||
namespace PckStudio.Classes.Networking
|
||||
{
|
||||
[Obsolete]
|
||||
public enum UpdateResult
|
||||
{
|
||||
// Base Failure value
|
||||
@@ -19,6 +20,7 @@ namespace PckStudio.Classes.Networking
|
||||
UpdateFailure,
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
class UpdateOptions
|
||||
{
|
||||
public bool IsBeta { get; set; }
|
||||
@@ -45,6 +47,7 @@ namespace PckStudio.Classes.Networking
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
static class Update
|
||||
{
|
||||
public static UpdateResult CheckForUpdate(UpdateOptions options)
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace PckStudio.Classes._3ds.Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Format of the texture used on the PICA200.
|
||||
/// </summary>
|
||||
public enum _3DSTextureFormat
|
||||
{
|
||||
argb8 = 0,
|
||||
rgb8 = 1,
|
||||
rgba5551 = 2,
|
||||
rgb565 = 3,
|
||||
rgba4 = 4,
|
||||
la8 = 5,
|
||||
hilo8 = 6,
|
||||
l8 = 7,
|
||||
a8 = 8,
|
||||
la4 = 9,
|
||||
l4 = 0xa,
|
||||
a4 = 0xb,
|
||||
etc1 = 0xc,
|
||||
etc1a4 = 0xd,
|
||||
dontCare
|
||||
}
|
||||
|
||||
internal class _3DSUtil
|
||||
{
|
||||
private static string ReadString(Stream stream, int len)
|
||||
{
|
||||
byte[] buffer = new byte[len];
|
||||
stream.Read(buffer, 0, len);
|
||||
return Encoding.ASCII.GetString(buffer);
|
||||
}
|
||||
|
||||
private static int ReadInt32(Stream stream)
|
||||
{
|
||||
byte[] buffer = new byte[4];
|
||||
stream.Read(buffer, 0, 4);
|
||||
return BitConverter.ToInt32(buffer, 0);
|
||||
}
|
||||
|
||||
private static void WriteString(Stream stream, string s)
|
||||
{
|
||||
byte[] buffer = Encoding.ASCII.GetBytes(s);
|
||||
stream.Write(buffer, 0, buffer.Length);
|
||||
}
|
||||
|
||||
private static void WriteInt32(Stream stream, int value)
|
||||
{
|
||||
byte[] buffer = BitConverter.GetBytes(value);
|
||||
stream.Write(buffer, 0, 4);
|
||||
}
|
||||
|
||||
public static int CalcBufferSize(_3DSTextureFormat textureFormat, int width, int height)
|
||||
{
|
||||
switch (textureFormat)
|
||||
{
|
||||
case _3DSTextureFormat.argb8:
|
||||
return width * height * 4;
|
||||
case _3DSTextureFormat.rgb8:
|
||||
return width * height * 3;
|
||||
case _3DSTextureFormat.rgba5551:
|
||||
case _3DSTextureFormat.rgb565:
|
||||
case _3DSTextureFormat.rgba4:
|
||||
case _3DSTextureFormat.la8:
|
||||
case _3DSTextureFormat.hilo8:
|
||||
return width * height * 2;
|
||||
case _3DSTextureFormat.l8:
|
||||
case _3DSTextureFormat.a8:
|
||||
case _3DSTextureFormat.la4:
|
||||
case _3DSTextureFormat.etc1a4:
|
||||
return width * height;
|
||||
case _3DSTextureFormat.l4:
|
||||
case _3DSTextureFormat.a4:
|
||||
case _3DSTextureFormat.etc1:
|
||||
return width * height >> 1;
|
||||
default:
|
||||
throw new InvalidDataException("Invalid texture format on BCH!");
|
||||
}
|
||||
}
|
||||
|
||||
public static Image GetImageFrom3DST(Stream stream)
|
||||
{
|
||||
if (ReadString(stream, 4) == "3DST")
|
||||
{
|
||||
const int offset = 32;
|
||||
stream.Seek(8L, SeekOrigin.Begin);
|
||||
_3DSTextureFormat format = ReadInt32(stream) switch
|
||||
{
|
||||
0 => _3DSTextureFormat.argb8,
|
||||
1 => _3DSTextureFormat.rgb8,
|
||||
2 => _3DSTextureFormat.rgba5551,
|
||||
3 => _3DSTextureFormat.rgb8,
|
||||
4 => _3DSTextureFormat.rgba4,
|
||||
9 => _3DSTextureFormat.la4,
|
||||
_ => _3DSTextureFormat.dontCare,
|
||||
};
|
||||
int width = ReadInt32(stream);
|
||||
int height = ReadInt32(stream);
|
||||
int bufferSize = CalcBufferSize(format, width, height);
|
||||
stream.Seek(offset, SeekOrigin.Begin);
|
||||
byte[] buffer = new byte[bufferSize];
|
||||
stream.Read(buffer, 0, bufferSize);
|
||||
var img = TextureCodec.Decode(buffer, width, height, format);
|
||||
img.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
return img;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void SetImageTo3DST(Stream stream, Image source, _3DSTextureFormat format = _3DSTextureFormat.argb8)
|
||||
{
|
||||
// TODO: fix Encoding
|
||||
WriteString(stream, "3DST"); // 0
|
||||
WriteInt32(stream, 2); // 4 unknown
|
||||
WriteInt32(stream, (int)format); // 8
|
||||
WriteInt32(stream, source.Width); // 12
|
||||
WriteInt32(stream, source.Height); // 16
|
||||
WriteInt32(stream, 0); // 20
|
||||
WriteInt32(stream, 0); // 24
|
||||
WriteInt32(stream, 0); // 28
|
||||
source.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
byte[] buffer = TextureCodec.Encode(new Bitmap(source), format);
|
||||
stream.Write(buffer, 0, buffer.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PckStudio.Classes.Utils.ModelConversion
|
||||
{
|
||||
public class BedrockJSONtoCSM
|
||||
{
|
||||
public string JSONtoCSM(string JsonString)
|
||||
{
|
||||
dynamic jsonDe = JsonConvert.DeserializeObject<dynamic>(JsonString);
|
||||
string NewJSON = JsonConvert.SerializeObject(jsonDe["minecraft:geometry"]);
|
||||
JObject[] NewJObject = JsonConvert.DeserializeObject<JObject[]>(NewJSON);
|
||||
|
||||
string CSMData = "";
|
||||
foreach (JBone bone in NewJObject[0].bones)
|
||||
{
|
||||
int i = 0;
|
||||
string PARENT = bone.name;
|
||||
foreach (JCube Cube in bone.cubes)
|
||||
{
|
||||
string name = PARENT + " " + i;
|
||||
|
||||
float PosXModifier = 0;
|
||||
float PosYModifier = 0;
|
||||
float PosZModifier = 0;
|
||||
|
||||
switch (PARENT)
|
||||
{
|
||||
case "ARM0":
|
||||
PosXModifier = 5;
|
||||
PosYModifier = 22;
|
||||
break;
|
||||
case "ARM1":
|
||||
PosXModifier = -5;
|
||||
PosYModifier = 22;
|
||||
break;
|
||||
case "LEG0":
|
||||
PosXModifier = 1.9f;
|
||||
PosYModifier = 12;
|
||||
break;
|
||||
case "LEG1":
|
||||
PosXModifier = -1.9f;
|
||||
PosYModifier = 12;
|
||||
break;
|
||||
case "BODY":
|
||||
PosYModifier = 24;
|
||||
break;
|
||||
case "HEAD":
|
||||
PosYModifier = 24;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
float PosX = Cube.origin[0] + PosXModifier;
|
||||
float PosY = Cube.origin[1] + PosYModifier;
|
||||
float PosZ = Cube.origin[2] + PosZModifier;
|
||||
float SizeX = Cube.size[0];
|
||||
float SizeY = Cube.size[1];
|
||||
float SizeZ = Cube.size[2];
|
||||
float UvX = Cube.uv[0];
|
||||
float UvY = Cube.uv[1];
|
||||
|
||||
CSMData += name + "\n" + PARENT + "\n" + name + "\n" + PosX + "\n" + PosY + "\n" + PosZ + "\n" + SizeX + "\n" + SizeY + "\n" + SizeZ + "\n" + UvX + "\n" + UvY + "\n";
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return CSMData;
|
||||
}
|
||||
}
|
||||
|
||||
internal class WholeJSON
|
||||
{
|
||||
public string format_version = "1.12.0";
|
||||
public Dictionary<string, object> entries = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
internal class JObject
|
||||
{
|
||||
public Dictionary<string, object> description = new Dictionary<string, object>();
|
||||
public JBone[] bones = { };
|
||||
}
|
||||
internal class JBone
|
||||
{
|
||||
public string name = "";
|
||||
public int[] pivot = {0, 0, 0};
|
||||
public JCube[] cubes = { };
|
||||
}
|
||||
internal class JCube
|
||||
{
|
||||
public float[] origin = new float[3];
|
||||
public float[] size = new float [3];
|
||||
public float[] uv = new float[2];
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PckStudio.Classes.Utils.ModelConversion
|
||||
{
|
||||
public class CSMtoBedrockJSON
|
||||
{
|
||||
public string CSMtoJSON(string CSMString)
|
||||
{
|
||||
List<string> CSMLIST = new List<string>();
|
||||
CSMLIST.AddRange(CSMString.Split(new[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries));
|
||||
List<List<string>> CSMS = SplitToSublists(CSMLIST, 11);
|
||||
|
||||
JObject jobj = new JObject();
|
||||
List<JBone> bones = new List<JBone>();
|
||||
Dictionary<string, List<JCube>> CubeList = new Dictionary<string, List<JCube>>
|
||||
{
|
||||
{"HEAD", new List<JCube>()},
|
||||
{"BODY", new List<JCube>()},
|
||||
{"ARM0", new List<JCube>()},
|
||||
{"ARM1", new List<JCube>()},
|
||||
{"LEG0", new List<JCube>()},
|
||||
{"LEG1", new List<JCube>()}
|
||||
};
|
||||
|
||||
foreach (List<string> CSMItem in CSMS)
|
||||
{
|
||||
JCube NewCube = new JCube();
|
||||
|
||||
|
||||
float PosXModifier = 0;
|
||||
float PosYModifier = 0;
|
||||
float PosZModifier = 0;
|
||||
|
||||
switch (CSMItem[1])
|
||||
{
|
||||
case "ARM0":
|
||||
PosXModifier = -5;
|
||||
PosYModifier = -22;
|
||||
break;
|
||||
case "ARM1":
|
||||
PosXModifier = 5;
|
||||
PosYModifier = -22;
|
||||
break;
|
||||
case "LEG0":
|
||||
PosXModifier = -1.9f;
|
||||
PosYModifier = -12;
|
||||
break;
|
||||
case "LEG1":
|
||||
PosXModifier = 1.9f;
|
||||
PosYModifier = -12;
|
||||
break;
|
||||
case "BODY":
|
||||
PosYModifier = -24;
|
||||
break;
|
||||
case "HEAD":
|
||||
PosYModifier = -24;
|
||||
break;
|
||||
}
|
||||
NewCube.origin[0] = float.Parse(CSMItem[3]) + PosXModifier;
|
||||
NewCube.origin[1] = float.Parse(CSMItem[4]) + PosYModifier;
|
||||
NewCube.origin[2] = float.Parse(CSMItem[5]) + PosZModifier;
|
||||
NewCube.size[0] = float.Parse(CSMItem[6]);
|
||||
NewCube.size[1] = float.Parse(CSMItem[7]);
|
||||
NewCube.size[2] = float.Parse(CSMItem[8]);
|
||||
NewCube.uv[0] = float.Parse(CSMItem[9]);
|
||||
NewCube.uv[1] = float.Parse(CSMItem[10]);
|
||||
CubeList[CSMItem[1]].Add(NewCube);
|
||||
}
|
||||
foreach (KeyValuePair<string, List<JCube>> bone in CubeList)
|
||||
{
|
||||
JBone jb = new JBone();
|
||||
jb.name = bone.Key;
|
||||
jb.cubes = bone.Value.ToArray();
|
||||
bones.Add(jb);
|
||||
}
|
||||
jobj.bones = bones.ToArray();
|
||||
jobj.description.Add("identifier", "geometry.steve");
|
||||
jobj.description.Add("texture_width", 64);
|
||||
jobj.description.Add("texture_height", 64);
|
||||
jobj.description.Add("visible_bounds_width", 2);
|
||||
jobj.description.Add("visible_bounds_height", 3.5f);
|
||||
jobj.description.Add("visible_bounds_offset", new float[] { 0, 1.25f, 0 });
|
||||
WholeJSON WJ = new WholeJSON();
|
||||
WJ.entries.Add("format_version", "1.12.0");
|
||||
WJ.entries.Add("minecraft:geometry", new JObject[] { jobj });
|
||||
string JSONDATA = JsonConvert.SerializeObject(WJ.entries, Formatting.Indented);
|
||||
return JSONDATA;
|
||||
}
|
||||
|
||||
public List<List<string>> SplitToSublists(List<string> source, int size)
|
||||
{
|
||||
return source
|
||||
.Select((x, i) => new { Index = i, Value = x })
|
||||
.GroupBy(x => x.Index / size)
|
||||
.Select(x => x.Select(v => v.Value).ToList())
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -69,8 +69,8 @@ namespace PckStudio.Classes.Utils
|
||||
DINNERBONE = 1 << 31, // 0x80000000
|
||||
}
|
||||
|
||||
public struct SkinANIM
|
||||
{
|
||||
public class SkinANIM : ICloneable, IEquatable<SkinANIM>
|
||||
{
|
||||
private ANIM_EFFECTS _ANIM;
|
||||
public static readonly Regex animRegex = new Regex(@"^0x[0-9a-f]{1,8}\b", RegexOptions.IgnoreCase);
|
||||
|
||||
@@ -78,11 +78,6 @@ namespace PckStudio.Classes.Utils
|
||||
: this(ANIM_EFFECTS.NONE)
|
||||
{
|
||||
}
|
||||
|
||||
public SkinANIM(string anim)
|
||||
: this(ParseString(anim))
|
||||
{
|
||||
}
|
||||
|
||||
public SkinANIM(ANIM_EFFECTS anim)
|
||||
{
|
||||
@@ -93,10 +88,10 @@ namespace PckStudio.Classes.Utils
|
||||
|
||||
public static bool IsValidANIM(string anim) => animRegex.IsMatch(anim ?? string.Empty);
|
||||
|
||||
public static ANIM_EFFECTS ParseString(string anim)
|
||||
=> IsValidANIM(anim)
|
||||
? (ANIM_EFFECTS)Convert.ToInt32(anim.TrimEnd(' ', '\n', '\r'), 16)
|
||||
: ANIM_EFFECTS.NONE;
|
||||
public static SkinANIM FromString(string value)
|
||||
=> IsValidANIM(value)
|
||||
? new SkinANIM((ANIM_EFFECTS)Convert.ToInt32(value.TrimEnd(' ', '\n', '\r'), 16))
|
||||
: new SkinANIM();
|
||||
|
||||
public void SetANIM(ANIM_EFFECTS anim) => _ANIM = anim;
|
||||
|
||||
@@ -107,10 +102,16 @@ namespace PckStudio.Classes.Utils
|
||||
public static implicit operator SkinANIM(ANIM_EFFECTS anim) => new SkinANIM(anim);
|
||||
|
||||
public static bool operator ==(SkinANIM a, ANIM_EFFECTS b) => a._ANIM == b;
|
||||
|
||||
public static bool operator !=(SkinANIM a, ANIM_EFFECTS b) => !(a == b);
|
||||
public static bool operator ==(SkinANIM a, SkinANIM b) => a.Equals(b);
|
||||
public static bool operator !=(SkinANIM a, SkinANIM b) => !a.Equals(b);
|
||||
|
||||
public override bool Equals(object obj) => obj is SkinANIM a && a == _ANIM;
|
||||
public bool Equals(SkinANIM other)
|
||||
{
|
||||
return _ANIM == other._ANIM;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj) => obj is SkinANIM a && Equals(a);
|
||||
|
||||
public override int GetHashCode() => (int)_ANIM;
|
||||
|
||||
@@ -134,5 +135,10 @@ namespace PckStudio.Classes.Utils
|
||||
{
|
||||
return (_ANIM & flag) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return MemberwiseClone();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
this.Controls.Add(this.InputTextBox);
|
||||
this.Controls.Add(this.OKButton);
|
||||
this.Controls.Add(this.TextLabel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "AddFilePrompt";
|
||||
|
||||
@@ -6,26 +6,27 @@ namespace PckStudio
|
||||
{
|
||||
public partial class AddFilePrompt : MetroForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Text entered <c>only access when DialogResult == DialogResult.OK</c>
|
||||
/// </summary>
|
||||
public string filepath => InputTextBox.Text;
|
||||
public int filetype => FileTypeComboBox.SelectedIndex;
|
||||
/// <summary>
|
||||
/// Text entered only valid when <see cref="DialogResult"/> == <see cref="DialogResult.OK"/>,
|
||||
/// otherwise <see cref="string.Empty"/>
|
||||
/// </summary>
|
||||
public string Filepath => DialogResult == DialogResult.OK ? InputTextBox.Text : string.Empty;
|
||||
public int Filetype => FileTypeComboBox.SelectedIndex;
|
||||
|
||||
public AddFilePrompt(string InitialText) : this(InitialText, -1)
|
||||
public AddFilePrompt(string initialText) : this(initialText, -1)
|
||||
{ }
|
||||
|
||||
public AddFilePrompt(string InitialText, int maxChar)
|
||||
public AddFilePrompt(string initialText, int maxChar)
|
||||
{
|
||||
InitializeComponent();
|
||||
InputTextBox.Text = InitialText;
|
||||
InputTextBox.Text = initialText;
|
||||
InputTextBox.MaxLength = maxChar < 0 ? short.MaxValue : maxChar;
|
||||
FormBorderStyle = FormBorderStyle.None;
|
||||
}
|
||||
|
||||
private void OKBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(FileTypeComboBox.SelectedIndex > -1) DialogResult = DialogResult.OK;
|
||||
if(FileTypeComboBox.SelectedIndex > -1)
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void InputTextBox_KeyDown(object sender, KeyEventArgs e)
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
InitializeComponent();
|
||||
ImageList tiles = new ImageList();
|
||||
tiles.ColorDepth = ColorDepth.Depth32Bit;
|
||||
tiles.Images.AddRange(AnimationUtil.tileImages);
|
||||
tiles.Images.AddRange(AnimationResources.tileImages);
|
||||
treeViewBlocks.ImageList = tiles;
|
||||
treeViewItems.ImageList = tiles;
|
||||
|
||||
@@ -31,9 +31,9 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
if (AnimationUtil.tileData["blocks"] != null)
|
||||
if (AnimationResources.tileData["blocks"] != null)
|
||||
{
|
||||
foreach (JObject content in AnimationUtil.tileData["blocks"].Children())
|
||||
foreach (JObject content in AnimationResources.tileData["blocks"].Children())
|
||||
{
|
||||
foreach (JProperty prop in content.Properties())
|
||||
{
|
||||
@@ -52,9 +52,9 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
}
|
||||
}
|
||||
}
|
||||
if (AnimationUtil.tileData["items"] != null)
|
||||
if (AnimationResources.tileData["items"] != null)
|
||||
{
|
||||
foreach (JObject content in AnimationUtil.tileData["items"].Children())
|
||||
foreach (JObject content in AnimationResources.tileData["items"].Children())
|
||||
{
|
||||
foreach (JProperty prop in content.Properties())
|
||||
{
|
||||
|
||||
@@ -29,138 +29,138 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.SaveBtn = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.CancelBtn = new System.Windows.Forms.Button();
|
||||
this.FrameTimeUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.FrameList = new System.Windows.Forms.TreeView();
|
||||
this.TextureIcons = new System.Windows.Forms.ImageList(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.FrameTimeUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// SaveBtn
|
||||
//
|
||||
this.SaveBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.SaveBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.SaveBtn.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.SaveBtn.Location = new System.Drawing.Point(12, 228);
|
||||
this.SaveBtn.Name = "SaveBtn";
|
||||
this.SaveBtn.Size = new System.Drawing.Size(75, 23);
|
||||
this.SaveBtn.TabIndex = 7;
|
||||
this.SaveBtn.Text = "Save";
|
||||
this.SaveBtn.UseVisualStyleBackColor = true;
|
||||
this.SaveBtn.Click += new System.EventHandler(this.SaveBtn_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.ForeColor = System.Drawing.Color.White;
|
||||
this.label1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.label1.Location = new System.Drawing.Point(19, 204);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(62, 13);
|
||||
this.label1.TabIndex = 10;
|
||||
this.label1.Text = "Frame Time";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.ForeColor = System.Drawing.Color.White;
|
||||
this.label3.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.label3.Location = new System.Drawing.Point(14, 13);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(109, 13);
|
||||
this.label3.TabIndex = 12;
|
||||
this.label3.Text = "may/matt was here :3";
|
||||
//
|
||||
// CancelBtn
|
||||
//
|
||||
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.CancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.CancelBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.CancelBtn.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.CancelBtn.Location = new System.Drawing.Point(92, 228);
|
||||
this.CancelBtn.Name = "CancelBtn";
|
||||
this.CancelBtn.Size = new System.Drawing.Size(75, 23);
|
||||
this.CancelBtn.TabIndex = 13;
|
||||
this.CancelBtn.Text = "Cancel";
|
||||
this.CancelBtn.UseVisualStyleBackColor = true;
|
||||
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
|
||||
//
|
||||
// FrameTimeUpDown
|
||||
//
|
||||
this.FrameTimeUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
this.FrameTimeUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.FrameTimeUpDown.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.FrameTimeUpDown.Location = new System.Drawing.Point(87, 202);
|
||||
this.FrameTimeUpDown.Maximum = new decimal(new int[] {
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.SaveBtn = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.CancelBtn = new System.Windows.Forms.Button();
|
||||
this.FrameTimeUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.FrameList = new System.Windows.Forms.TreeView();
|
||||
this.TextureIcons = new System.Windows.Forms.ImageList(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.FrameTimeUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// SaveBtn
|
||||
//
|
||||
this.SaveBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.SaveBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.SaveBtn.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.SaveBtn.Location = new System.Drawing.Point(12, 228);
|
||||
this.SaveBtn.Name = "SaveBtn";
|
||||
this.SaveBtn.Size = new System.Drawing.Size(75, 23);
|
||||
this.SaveBtn.TabIndex = 7;
|
||||
this.SaveBtn.Text = "Save";
|
||||
this.SaveBtn.UseVisualStyleBackColor = true;
|
||||
this.SaveBtn.Click += new System.EventHandler(this.SaveBtn_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.ForeColor = System.Drawing.Color.White;
|
||||
this.label1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.label1.Location = new System.Drawing.Point(19, 204);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(62, 13);
|
||||
this.label1.TabIndex = 10;
|
||||
this.label1.Text = "Frame Time";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.ForeColor = System.Drawing.Color.White;
|
||||
this.label3.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.label3.Location = new System.Drawing.Point(14, 13);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(150, 13);
|
||||
this.label3.TabIndex = 12;
|
||||
this.label3.Text = "Select a frame and frame time:";
|
||||
//
|
||||
// CancelBtn
|
||||
//
|
||||
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.CancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.CancelBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.CancelBtn.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.CancelBtn.Location = new System.Drawing.Point(92, 228);
|
||||
this.CancelBtn.Name = "CancelBtn";
|
||||
this.CancelBtn.Size = new System.Drawing.Size(75, 23);
|
||||
this.CancelBtn.TabIndex = 13;
|
||||
this.CancelBtn.Text = "Cancel";
|
||||
this.CancelBtn.UseVisualStyleBackColor = true;
|
||||
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
|
||||
//
|
||||
// FrameTimeUpDown
|
||||
//
|
||||
this.FrameTimeUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
this.FrameTimeUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.FrameTimeUpDown.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.FrameTimeUpDown.Location = new System.Drawing.Point(87, 202);
|
||||
this.FrameTimeUpDown.Maximum = new decimal(new int[] {
|
||||
10000,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.FrameTimeUpDown.Minimum = new decimal(new int[] {
|
||||
this.FrameTimeUpDown.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.FrameTimeUpDown.Name = "FrameTimeUpDown";
|
||||
this.FrameTimeUpDown.Size = new System.Drawing.Size(73, 20);
|
||||
this.FrameTimeUpDown.TabIndex = 15;
|
||||
this.FrameTimeUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.FrameTimeUpDown.Value = new decimal(new int[] {
|
||||
this.FrameTimeUpDown.Name = "FrameTimeUpDown";
|
||||
this.FrameTimeUpDown.Size = new System.Drawing.Size(73, 20);
|
||||
this.FrameTimeUpDown.TabIndex = 15;
|
||||
this.FrameTimeUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.FrameTimeUpDown.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// FrameList
|
||||
//
|
||||
this.FrameList.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.FrameList.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.FrameList.HideSelection = false;
|
||||
this.FrameList.ImageIndex = 0;
|
||||
this.FrameList.ImageList = this.TextureIcons;
|
||||
this.FrameList.Location = new System.Drawing.Point(12, 37);
|
||||
this.FrameList.Name = "FrameList";
|
||||
this.FrameList.SelectedImageIndex = 0;
|
||||
this.FrameList.ShowLines = false;
|
||||
this.FrameList.ShowRootLines = false;
|
||||
this.FrameList.Size = new System.Drawing.Size(155, 159);
|
||||
this.FrameList.TabIndex = 1;
|
||||
//
|
||||
// TextureIcons
|
||||
//
|
||||
this.TextureIcons.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
|
||||
this.TextureIcons.ImageSize = new System.Drawing.Size(32, 32);
|
||||
this.TextureIcons.TransparentColor = System.Drawing.Color.Transparent;
|
||||
//
|
||||
// FrameEditor
|
||||
//
|
||||
this.AcceptButton = this.SaveBtn;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.CancelBtn;
|
||||
this.ClientSize = new System.Drawing.Size(178, 264);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.FrameList);
|
||||
this.Controls.Add(this.FrameTimeUpDown);
|
||||
this.Controls.Add(this.CancelBtn);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.SaveBtn);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FrameEditor";
|
||||
this.Resizable = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
((System.ComponentModel.ISupportInitialize)(this.FrameTimeUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
//
|
||||
// FrameList
|
||||
//
|
||||
this.FrameList.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.FrameList.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.FrameList.HideSelection = false;
|
||||
this.FrameList.ImageIndex = 0;
|
||||
this.FrameList.ImageList = this.TextureIcons;
|
||||
this.FrameList.Location = new System.Drawing.Point(12, 37);
|
||||
this.FrameList.Name = "FrameList";
|
||||
this.FrameList.SelectedImageIndex = 0;
|
||||
this.FrameList.ShowLines = false;
|
||||
this.FrameList.ShowRootLines = false;
|
||||
this.FrameList.Size = new System.Drawing.Size(155, 159);
|
||||
this.FrameList.TabIndex = 1;
|
||||
//
|
||||
// TextureIcons
|
||||
//
|
||||
this.TextureIcons.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
|
||||
this.TextureIcons.ImageSize = new System.Drawing.Size(32, 32);
|
||||
this.TextureIcons.TransparentColor = System.Drawing.Color.Transparent;
|
||||
//
|
||||
// FrameEditor
|
||||
//
|
||||
this.AcceptButton = this.SaveBtn;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.CancelBtn;
|
||||
this.ClientSize = new System.Drawing.Size(178, 264);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.FrameList);
|
||||
this.Controls.Add(this.FrameTimeUpDown);
|
||||
this.Controls.Add(this.CancelBtn);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.SaveBtn);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FrameEditor";
|
||||
this.Resizable = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
((System.ComponentModel.ISupportInitialize)(this.FrameTimeUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using MetroFramework.Forms;
|
||||
using System.Windows.Forms;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
{
|
||||
@@ -13,16 +13,12 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
public FrameEditor(ImageList texList)
|
||||
{
|
||||
InitializeComponent();
|
||||
label3.Text = "Select a frame and frame time:";
|
||||
FrameList.ImageList = texList;
|
||||
|
||||
int index = 0;
|
||||
foreach (Image frameTex in texList.Images)
|
||||
for (int index = 0; index < texList.Images.Count; index++)
|
||||
{
|
||||
TreeNode frame = new TreeNode($"Frame {index}", index, index);
|
||||
FrameList.Nodes.Add(frame);
|
||||
Console.WriteLine(index);
|
||||
index++;
|
||||
Debug.WriteLine(index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +37,8 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,108 +29,108 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.TimeUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
((System.ComponentModel.ISupportInitialize)(this.TimeUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button1.ForeColor = System.Drawing.Color.White;
|
||||
this.button1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.button1.Location = new System.Drawing.Point(55, 63);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 7;
|
||||
this.button1.Text = "Save";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.ForeColor = System.Drawing.Color.White;
|
||||
this.label1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.label1.Location = new System.Drawing.Point(9, 35);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(79, 13);
|
||||
this.label1.TabIndex = 10;
|
||||
this.label1.Text = "Animation Time";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.ForeColor = System.Drawing.Color.White;
|
||||
this.label3.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.label3.Location = new System.Drawing.Point(47, 13);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(174, 13);
|
||||
this.label3.TabIndex = 12;
|
||||
this.label3.Text = "Frame Time must be greater than 0.";
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button2.ForeColor = System.Drawing.Color.White;
|
||||
this.button2.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.button2.Location = new System.Drawing.Point(135, 63);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(75, 23);
|
||||
this.button2.TabIndex = 13;
|
||||
this.button2.Text = "Cancel";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// TimeUpDown
|
||||
//
|
||||
this.TimeUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
this.TimeUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.TimeUpDown.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.TimeUpDown.Location = new System.Drawing.Point(94, 33);
|
||||
this.TimeUpDown.Maximum = new decimal(new int[] {
|
||||
this.saveButton = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.TimeUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
((System.ComponentModel.ISupportInitialize)(this.TimeUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// saveButton
|
||||
//
|
||||
this.saveButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.saveButton.ForeColor = System.Drawing.Color.White;
|
||||
this.saveButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.saveButton.Location = new System.Drawing.Point(55, 63);
|
||||
this.saveButton.Name = "saveButton";
|
||||
this.saveButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.saveButton.TabIndex = 7;
|
||||
this.saveButton.Text = "Save";
|
||||
this.saveButton.UseVisualStyleBackColor = true;
|
||||
this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.ForeColor = System.Drawing.Color.White;
|
||||
this.label1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.label1.Location = new System.Drawing.Point(9, 35);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(79, 13);
|
||||
this.label1.TabIndex = 10;
|
||||
this.label1.Text = "Animation Time";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.ForeColor = System.Drawing.Color.White;
|
||||
this.label3.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.label3.Location = new System.Drawing.Point(47, 13);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(174, 13);
|
||||
this.label3.TabIndex = 12;
|
||||
this.label3.Text = "Frame Time must be greater than 0.";
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.cancelButton.ForeColor = System.Drawing.Color.White;
|
||||
this.cancelButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.cancelButton.Location = new System.Drawing.Point(135, 63);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.cancelButton.TabIndex = 13;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// TimeUpDown
|
||||
//
|
||||
this.TimeUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
this.TimeUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.TimeUpDown.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.TimeUpDown.Location = new System.Drawing.Point(94, 33);
|
||||
this.TimeUpDown.Maximum = new decimal(new int[] {
|
||||
10000,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.TimeUpDown.Name = "TimeUpDown";
|
||||
this.TimeUpDown.Size = new System.Drawing.Size(162, 20);
|
||||
this.TimeUpDown.TabIndex = 15;
|
||||
this.TimeUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// SetBulkSpeed
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(264, 94);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.button2);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.TimeUpDown);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(266, 96);
|
||||
this.Name = "SetBulkSpeed";
|
||||
this.Resizable = false;
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
((System.ComponentModel.ISupportInitialize)(this.TimeUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.TimeUpDown.Name = "TimeUpDown";
|
||||
this.TimeUpDown.Size = new System.Drawing.Size(162, 20);
|
||||
this.TimeUpDown.TabIndex = 15;
|
||||
this.TimeUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// SetBulkSpeed
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(264, 94);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.saveButton);
|
||||
this.Controls.Add(this.TimeUpDown);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(266, 96);
|
||||
this.Name = "SetBulkSpeed";
|
||||
this.Resizable = false;
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
((System.ComponentModel.ISupportInitialize)(this.TimeUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button saveButton;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.NumericUpDown TimeUpDown;
|
||||
}
|
||||
}
|
||||
@@ -6,19 +6,20 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
{
|
||||
public partial class SetBulkSpeed : MetroForm
|
||||
{
|
||||
public int time => (int)TimeUpDown.Value;
|
||||
public SetBulkSpeed(TreeView treeView)
|
||||
public int Ticks => (int)TimeUpDown.Value;
|
||||
|
||||
public SetBulkSpeed()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
private void saveButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (time < 0) return;
|
||||
if (Ticks < 0) return;
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
this.Controls.Add(this.InputTextBox);
|
||||
this.Controls.Add(this.OKButton);
|
||||
this.Controls.Add(this.TextLabel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "CreateTexturePack";
|
||||
|
||||
@@ -9,19 +9,18 @@ namespace PckStudio
|
||||
/// <summary>
|
||||
/// Text entered <c>only access when DialogResult == DialogResult.OK</c>
|
||||
/// </summary>
|
||||
public string packName => InputTextBox.Text;
|
||||
public string packRes => metroComboBox1.Text;
|
||||
public string PackName => InputTextBox.Text;
|
||||
public string PackRes => metroComboBox1.Text;
|
||||
|
||||
public CreateTexturePack(string InitialText)
|
||||
public CreateTexturePack()
|
||||
{
|
||||
InitializeComponent();
|
||||
InputTextBox.Text = InitialText;
|
||||
FormBorderStyle = FormBorderStyle.None;
|
||||
}
|
||||
|
||||
private void OKBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (metroComboBox1.SelectedIndex < 0) return;
|
||||
if (metroComboBox1.SelectedIndex < 0)
|
||||
return;
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -87,7 +87,7 @@
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.CancelBtn);
|
||||
this.Controls.Add(this.TextLabel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "MipMapPrompt";
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace PckStudio
|
||||
public MipMapPrompt()
|
||||
{
|
||||
InitializeComponent();
|
||||
FormBorderStyle = FormBorderStyle.None;
|
||||
}
|
||||
|
||||
private void OKBtn_Click(object sender, EventArgs e)
|
||||
@@ -22,20 +21,9 @@ namespace PckStudio
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void InputTextBox_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
OKBtn_Click(sender, e);
|
||||
}
|
||||
|
||||
private void CancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
this.Controls.Add(this.InputTextBox);
|
||||
this.Controls.Add(this.OKButton);
|
||||
this.Controls.Add(this.TextLabel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "RenamePrompt";
|
||||
|
||||
@@ -19,18 +19,11 @@ namespace PckStudio
|
||||
InitializeComponent();
|
||||
InputTextBox.Text = InitialText;
|
||||
InputTextBox.MaxLength = maxChar < 0 ? short.MaxValue : maxChar;
|
||||
FormBorderStyle = FormBorderStyle.None;
|
||||
}
|
||||
|
||||
private void OKBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void InputTextBox_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
OKBtn_Click(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace PckStudio.Forms.Additional_Popups
|
||||
{
|
||||
public partial class TextPrompt : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
public string[] TextOutput => DialogResult == DialogResult.OK ? PromptTextBox.Lines : null;
|
||||
public string[] TextOutput => DialogResult == DialogResult.OK ? PromptTextBox.Lines : Array.Empty<string>();
|
||||
public TextPrompt(string[] list = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
786
PCK-Studio/Forms/Editor/ANIMEditor.Designer.cs
generated
Normal file
786
PCK-Studio/Forms/Editor/ANIMEditor.Designer.cs
generated
Normal file
@@ -0,0 +1,786 @@
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
partial class ANIMEditor
|
||||
{
|
||||
/// <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(ANIMEditor));
|
||||
this.saveButton = new MetroFramework.Controls.MetroButton();
|
||||
this.effectsGroup = new System.Windows.Forms.GroupBox();
|
||||
this.rightLegOCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.headOCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.leftLegOCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.leftArmOCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.bodyOCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.rightLegCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.slimCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.headCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.leftLegCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.rightArmCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.leftArmCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.bodyCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.classicCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.rightArmOCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.effectsGroup2 = new System.Windows.Forms.GroupBox();
|
||||
this.rightLeggingCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.helmetCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.leftLeggingCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.rightArmorCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.leftArmorCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.chestplateCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.unknownCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.crouchCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.dinnerboneCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.noArmorCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.bobbingCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.santaCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.syncLegsCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.staticArmsCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.syncArmsCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.statueCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.zombieCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.staticLegsCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.copyButton = new MetroFramework.Controls.MetroButton();
|
||||
this.importButton = new MetroFramework.Controls.MetroButton();
|
||||
this.exportButton = new MetroFramework.Controls.MetroButton();
|
||||
this.animValue = new MetroFramework.Controls.MetroLabel();
|
||||
this.uncheckAllButton = new MetroFramework.Controls.MetroButton();
|
||||
this.checkAllButton = new MetroFramework.Controls.MetroButton();
|
||||
this.toolTip = new MetroFramework.Components.MetroToolTip();
|
||||
this.resetButton = new MetroFramework.Controls.MetroButton();
|
||||
this.templateButton = new MetroFramework.Controls.MetroButton();
|
||||
this.effectsGroup.SuspendLayout();
|
||||
this.effectsGroup2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// saveButton
|
||||
//
|
||||
this.saveButton.Location = new System.Drawing.Point(250, 514);
|
||||
this.saveButton.Name = "saveButton";
|
||||
this.saveButton.Size = new System.Drawing.Size(126, 23);
|
||||
this.saveButton.TabIndex = 1;
|
||||
this.saveButton.Text = "Save";
|
||||
this.saveButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.saveButton.UseSelectable = true;
|
||||
this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
|
||||
//
|
||||
// effectsGroup
|
||||
//
|
||||
this.effectsGroup.Controls.Add(this.rightLegOCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.headOCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.leftLegOCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.leftArmOCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.bodyOCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.rightLegCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.slimCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.headCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.leftLegCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.rightArmCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.leftArmCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.bodyCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.classicCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.rightArmOCheckBox);
|
||||
this.effectsGroup.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.effectsGroup.Location = new System.Drawing.Point(22, 148);
|
||||
this.effectsGroup.Name = "effectsGroup";
|
||||
this.effectsGroup.Size = new System.Drawing.Size(393, 238);
|
||||
this.effectsGroup.TabIndex = 2;
|
||||
this.effectsGroup.TabStop = false;
|
||||
this.effectsGroup.Text = "Skin Flags";
|
||||
//
|
||||
// rightLegOCheckBox
|
||||
//
|
||||
this.rightLegOCheckBox.AutoSize = true;
|
||||
this.rightLegOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.rightLegOCheckBox.Location = new System.Drawing.Point(180, 208);
|
||||
this.rightLegOCheckBox.Name = "rightLegOCheckBox";
|
||||
this.rightLegOCheckBox.Size = new System.Drawing.Size(199, 19);
|
||||
this.rightLegOCheckBox.TabIndex = 13;
|
||||
this.rightLegOCheckBox.Text = "Remove Right Leg Layer Box";
|
||||
this.rightLegOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.rightLegOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.rightLegOCheckBox.UseSelectable = true;
|
||||
//
|
||||
// headOCheckBox
|
||||
//
|
||||
this.headOCheckBox.AutoSize = true;
|
||||
this.headOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.headOCheckBox.Location = new System.Drawing.Point(180, 50);
|
||||
this.headOCheckBox.Name = "headOCheckBox";
|
||||
this.headOCheckBox.Size = new System.Drawing.Size(173, 19);
|
||||
this.headOCheckBox.TabIndex = 12;
|
||||
this.headOCheckBox.Text = "Remove Head Layer Box";
|
||||
this.headOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.headOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.headOCheckBox.UseSelectable = true;
|
||||
//
|
||||
// leftLegOCheckBox
|
||||
//
|
||||
this.leftLegOCheckBox.AutoSize = true;
|
||||
this.leftLegOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.leftLegOCheckBox.Location = new System.Drawing.Point(180, 174);
|
||||
this.leftLegOCheckBox.Name = "leftLegOCheckBox";
|
||||
this.leftLegOCheckBox.Size = new System.Drawing.Size(190, 19);
|
||||
this.leftLegOCheckBox.TabIndex = 11;
|
||||
this.leftLegOCheckBox.Text = "Remove Left Leg Layer Box";
|
||||
this.leftLegOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.leftLegOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.leftLegOCheckBox.UseSelectable = true;
|
||||
//
|
||||
// leftArmOCheckBox
|
||||
//
|
||||
this.leftArmOCheckBox.AutoSize = true;
|
||||
this.leftArmOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.leftArmOCheckBox.Location = new System.Drawing.Point(180, 112);
|
||||
this.leftArmOCheckBox.Name = "leftArmOCheckBox";
|
||||
this.leftArmOCheckBox.Size = new System.Drawing.Size(194, 19);
|
||||
this.leftArmOCheckBox.TabIndex = 9;
|
||||
this.leftArmOCheckBox.Text = "Remove Left Arm Layer Box";
|
||||
this.leftArmOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.leftArmOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.leftArmOCheckBox.UseSelectable = true;
|
||||
//
|
||||
// bodyOCheckBox
|
||||
//
|
||||
this.bodyOCheckBox.AutoSize = true;
|
||||
this.bodyOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.bodyOCheckBox.Location = new System.Drawing.Point(180, 81);
|
||||
this.bodyOCheckBox.Name = "bodyOCheckBox";
|
||||
this.bodyOCheckBox.Size = new System.Drawing.Size(172, 19);
|
||||
this.bodyOCheckBox.TabIndex = 8;
|
||||
this.bodyOCheckBox.Text = "Remove Body Layer Box";
|
||||
this.bodyOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.bodyOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.bodyOCheckBox.UseSelectable = true;
|
||||
//
|
||||
// rightLegCheckBox
|
||||
//
|
||||
this.rightLegCheckBox.AutoSize = true;
|
||||
this.rightLegCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.rightLegCheckBox.Location = new System.Drawing.Point(6, 208);
|
||||
this.rightLegCheckBox.Name = "rightLegCheckBox";
|
||||
this.rightLegCheckBox.Size = new System.Drawing.Size(162, 19);
|
||||
this.rightLegCheckBox.TabIndex = 7;
|
||||
this.rightLegCheckBox.Text = "Remove Right Leg Box";
|
||||
this.rightLegCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.rightLegCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.rightLegCheckBox.UseSelectable = true;
|
||||
//
|
||||
// slimCheckBox
|
||||
//
|
||||
this.slimCheckBox.AutoSize = true;
|
||||
this.slimCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.slimCheckBox.Location = new System.Drawing.Point(180, 19);
|
||||
this.slimCheckBox.Name = "slimCheckBox";
|
||||
this.slimCheckBox.Size = new System.Drawing.Size(151, 19);
|
||||
this.slimCheckBox.TabIndex = 6;
|
||||
this.slimCheckBox.Text = "64x64 Alex/Slim Skin";
|
||||
this.slimCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.slimCheckBox, " The 1.8 style skin type with slim arms, overlays for each part, and sep" +
|
||||
"arate textures for right and left limbs. Resolution is also set to 64x64. " +
|
||||
" ");
|
||||
this.slimCheckBox.UseSelectable = true;
|
||||
//
|
||||
// headCheckBox
|
||||
//
|
||||
this.headCheckBox.AutoSize = true;
|
||||
this.headCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.headCheckBox.Location = new System.Drawing.Point(6, 50);
|
||||
this.headCheckBox.Name = "headCheckBox";
|
||||
this.headCheckBox.Size = new System.Drawing.Size(136, 19);
|
||||
this.headCheckBox.TabIndex = 5;
|
||||
this.headCheckBox.Text = "Remove Head Box";
|
||||
this.headCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.headCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.headCheckBox.UseSelectable = true;
|
||||
//
|
||||
// leftLegCheckBox
|
||||
//
|
||||
this.leftLegCheckBox.AutoSize = true;
|
||||
this.leftLegCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.leftLegCheckBox.Location = new System.Drawing.Point(6, 174);
|
||||
this.leftLegCheckBox.Name = "leftLegCheckBox";
|
||||
this.leftLegCheckBox.Size = new System.Drawing.Size(153, 19);
|
||||
this.leftLegCheckBox.TabIndex = 4;
|
||||
this.leftLegCheckBox.Text = "Remove Left Leg Box";
|
||||
this.leftLegCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.leftLegCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.leftLegCheckBox.UseSelectable = true;
|
||||
//
|
||||
// rightArmCheckBox
|
||||
//
|
||||
this.rightArmCheckBox.AutoSize = true;
|
||||
this.rightArmCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.rightArmCheckBox.Location = new System.Drawing.Point(6, 143);
|
||||
this.rightArmCheckBox.Name = "rightArmCheckBox";
|
||||
this.rightArmCheckBox.Size = new System.Drawing.Size(166, 19);
|
||||
this.rightArmCheckBox.TabIndex = 3;
|
||||
this.rightArmCheckBox.Text = "Remove Right Arm Box";
|
||||
this.rightArmCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.rightArmCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.rightArmCheckBox.UseSelectable = true;
|
||||
//
|
||||
// leftArmCheckBox
|
||||
//
|
||||
this.leftArmCheckBox.AutoSize = true;
|
||||
this.leftArmCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.leftArmCheckBox.Location = new System.Drawing.Point(6, 112);
|
||||
this.leftArmCheckBox.Name = "leftArmCheckBox";
|
||||
this.leftArmCheckBox.Size = new System.Drawing.Size(157, 19);
|
||||
this.leftArmCheckBox.TabIndex = 2;
|
||||
this.leftArmCheckBox.Text = "Remove Left Arm Box";
|
||||
this.leftArmCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.leftArmCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.leftArmCheckBox.UseSelectable = true;
|
||||
//
|
||||
// bodyCheckBox
|
||||
//
|
||||
this.bodyCheckBox.AutoSize = true;
|
||||
this.bodyCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.bodyCheckBox.Location = new System.Drawing.Point(6, 81);
|
||||
this.bodyCheckBox.Name = "bodyCheckBox";
|
||||
this.bodyCheckBox.Size = new System.Drawing.Size(135, 19);
|
||||
this.bodyCheckBox.TabIndex = 1;
|
||||
this.bodyCheckBox.Text = "Remove Body Box";
|
||||
this.bodyCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.bodyCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.bodyCheckBox.UseSelectable = true;
|
||||
//
|
||||
// classicCheckBox
|
||||
//
|
||||
this.classicCheckBox.AutoSize = true;
|
||||
this.classicCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.classicCheckBox.Location = new System.Drawing.Point(6, 19);
|
||||
this.classicCheckBox.Name = "classicCheckBox";
|
||||
this.classicCheckBox.Size = new System.Drawing.Size(136, 19);
|
||||
this.classicCheckBox.TabIndex = 0;
|
||||
this.classicCheckBox.Text = "64x64 Classic Skin";
|
||||
this.classicCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.classicCheckBox, " The 1.8 style skin type with overlays for each part and separate textur" +
|
||||
"es for right and left limbs. Resolution is also set to 64x64. ");
|
||||
this.classicCheckBox.UseSelectable = true;
|
||||
//
|
||||
// rightArmOCheckBox
|
||||
//
|
||||
this.rightArmOCheckBox.AutoSize = true;
|
||||
this.rightArmOCheckBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.rightArmOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.rightArmOCheckBox.Location = new System.Drawing.Point(180, 143);
|
||||
this.rightArmOCheckBox.Name = "rightArmOCheckBox";
|
||||
this.rightArmOCheckBox.Size = new System.Drawing.Size(203, 19);
|
||||
this.rightArmOCheckBox.TabIndex = 10;
|
||||
this.rightArmOCheckBox.Text = "Remove Right Arm Layer Box";
|
||||
this.rightArmOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.rightArmOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.rightArmOCheckBox.UseSelectable = true;
|
||||
//
|
||||
// effectsGroup2
|
||||
//
|
||||
this.effectsGroup2.Controls.Add(this.rightLeggingCheckBox);
|
||||
this.effectsGroup2.Controls.Add(this.helmetCheckBox);
|
||||
this.effectsGroup2.Controls.Add(this.leftLeggingCheckBox);
|
||||
this.effectsGroup2.Controls.Add(this.rightArmorCheckBox);
|
||||
this.effectsGroup2.Controls.Add(this.leftArmorCheckBox);
|
||||
this.effectsGroup2.Controls.Add(this.chestplateCheckBox);
|
||||
this.effectsGroup2.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.effectsGroup2.Location = new System.Drawing.Point(421, 183);
|
||||
this.effectsGroup2.Name = "effectsGroup2";
|
||||
this.effectsGroup2.Size = new System.Drawing.Size(188, 203);
|
||||
this.effectsGroup2.TabIndex = 14;
|
||||
this.effectsGroup2.TabStop = false;
|
||||
this.effectsGroup2.Text = "Armor Flags";
|
||||
//
|
||||
// rightLeggingCheckBox
|
||||
//
|
||||
this.rightLeggingCheckBox.AutoSize = true;
|
||||
this.rightLeggingCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.rightLeggingCheckBox.Location = new System.Drawing.Point(6, 174);
|
||||
this.rightLeggingCheckBox.Name = "rightLeggingCheckBox";
|
||||
this.rightLeggingCheckBox.Size = new System.Drawing.Size(173, 19);
|
||||
this.rightLeggingCheckBox.TabIndex = 7;
|
||||
this.rightLeggingCheckBox.Text = "Render Right Leg Armor";
|
||||
this.rightLeggingCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.rightLeggingCheckBox, " Forcefully enables the specified armor piece.");
|
||||
this.rightLeggingCheckBox.UseSelectable = true;
|
||||
//
|
||||
// helmetCheckBox
|
||||
//
|
||||
this.helmetCheckBox.AutoSize = true;
|
||||
this.helmetCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.helmetCheckBox.Location = new System.Drawing.Point(6, 19);
|
||||
this.helmetCheckBox.Name = "helmetCheckBox";
|
||||
this.helmetCheckBox.Size = new System.Drawing.Size(147, 19);
|
||||
this.helmetCheckBox.TabIndex = 5;
|
||||
this.helmetCheckBox.Text = "Render Head Armor";
|
||||
this.helmetCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.helmetCheckBox, " Forcefully enables the specified armor piece.");
|
||||
this.helmetCheckBox.UseSelectable = true;
|
||||
//
|
||||
// leftLeggingCheckBox
|
||||
//
|
||||
this.leftLeggingCheckBox.AutoSize = true;
|
||||
this.leftLeggingCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.leftLeggingCheckBox.Location = new System.Drawing.Point(6, 143);
|
||||
this.leftLeggingCheckBox.Name = "leftLeggingCheckBox";
|
||||
this.leftLeggingCheckBox.Size = new System.Drawing.Size(164, 19);
|
||||
this.leftLeggingCheckBox.TabIndex = 4;
|
||||
this.leftLeggingCheckBox.Text = "Render Left Leg Armor";
|
||||
this.leftLeggingCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.leftLeggingCheckBox, " Forcefully enables the specified armor piece.");
|
||||
this.leftLeggingCheckBox.UseSelectable = true;
|
||||
//
|
||||
// rightArmorCheckBox
|
||||
//
|
||||
this.rightArmorCheckBox.AutoSize = true;
|
||||
this.rightArmorCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.rightArmorCheckBox.Location = new System.Drawing.Point(6, 112);
|
||||
this.rightArmorCheckBox.Name = "rightArmorCheckBox";
|
||||
this.rightArmorCheckBox.Size = new System.Drawing.Size(177, 19);
|
||||
this.rightArmorCheckBox.TabIndex = 3;
|
||||
this.rightArmorCheckBox.Text = "Render Right Arm Armor";
|
||||
this.rightArmorCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.rightArmorCheckBox, " Forcefully enables the specified armor piece.");
|
||||
this.rightArmorCheckBox.UseSelectable = true;
|
||||
//
|
||||
// leftArmorCheckBox
|
||||
//
|
||||
this.leftArmorCheckBox.AutoSize = true;
|
||||
this.leftArmorCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.leftArmorCheckBox.Location = new System.Drawing.Point(6, 81);
|
||||
this.leftArmorCheckBox.Name = "leftArmorCheckBox";
|
||||
this.leftArmorCheckBox.Size = new System.Drawing.Size(168, 19);
|
||||
this.leftArmorCheckBox.TabIndex = 2;
|
||||
this.leftArmorCheckBox.Text = "Render Left Arm Armor";
|
||||
this.leftArmorCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.leftArmorCheckBox, " Forcefully enables the specified armor piece.");
|
||||
this.leftArmorCheckBox.UseSelectable = true;
|
||||
//
|
||||
// chestplateCheckBox
|
||||
//
|
||||
this.chestplateCheckBox.AutoSize = true;
|
||||
this.chestplateCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.chestplateCheckBox.Location = new System.Drawing.Point(6, 50);
|
||||
this.chestplateCheckBox.Name = "chestplateCheckBox";
|
||||
this.chestplateCheckBox.Size = new System.Drawing.Size(146, 19);
|
||||
this.chestplateCheckBox.TabIndex = 1;
|
||||
this.chestplateCheckBox.Text = "Render Body Armor";
|
||||
this.chestplateCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.chestplateCheckBox, " Forcefully enables the specified armor piece.");
|
||||
this.chestplateCheckBox.UseSelectable = true;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.unknownCheckBox);
|
||||
this.groupBox1.Controls.Add(this.crouchCheckBox);
|
||||
this.groupBox1.Controls.Add(this.dinnerboneCheckBox);
|
||||
this.groupBox1.Controls.Add(this.noArmorCheckBox);
|
||||
this.groupBox1.Controls.Add(this.bobbingCheckBox);
|
||||
this.groupBox1.Controls.Add(this.santaCheckBox);
|
||||
this.groupBox1.Controls.Add(this.syncLegsCheckBox);
|
||||
this.groupBox1.Controls.Add(this.staticArmsCheckBox);
|
||||
this.groupBox1.Controls.Add(this.syncArmsCheckBox);
|
||||
this.groupBox1.Controls.Add(this.statueCheckBox);
|
||||
this.groupBox1.Controls.Add(this.zombieCheckBox);
|
||||
this.groupBox1.Controls.Add(this.staticLegsCheckBox);
|
||||
this.groupBox1.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.groupBox1.Location = new System.Drawing.Point(22, 388);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(587, 115);
|
||||
this.groupBox1.TabIndex = 15;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Special Animations";
|
||||
//
|
||||
// unknownCheckBox
|
||||
//
|
||||
this.unknownCheckBox.AutoSize = true;
|
||||
this.unknownCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.unknownCheckBox.Location = new System.Drawing.Point(126, 81);
|
||||
this.unknownCheckBox.Name = "unknownCheckBox";
|
||||
this.unknownCheckBox.Size = new System.Drawing.Size(84, 19);
|
||||
this.unknownCheckBox.TabIndex = 13;
|
||||
this.unknownCheckBox.Text = "Unknown";
|
||||
this.unknownCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.unknownCheckBox, " If you figure out what this is. Please reach out to MNL#8935 on Discord. (: " +
|
||||
"");
|
||||
this.unknownCheckBox.UseSelectable = true;
|
||||
//
|
||||
// crouchCheckBox
|
||||
//
|
||||
this.crouchCheckBox.AutoSize = true;
|
||||
this.crouchCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.crouchCheckBox.Location = new System.Drawing.Point(126, 50);
|
||||
this.crouchCheckBox.Name = "crouchCheckBox";
|
||||
this.crouchCheckBox.Size = new System.Drawing.Size(137, 19);
|
||||
this.crouchCheckBox.TabIndex = 12;
|
||||
this.crouchCheckBox.Text = "Backwards Crouch";
|
||||
this.crouchCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.crouchCheckBox, " The crouch animation is reversed so that the arms and body lean back. Usefu" +
|
||||
"l for small skins. ");
|
||||
this.crouchCheckBox.UseSelectable = true;
|
||||
//
|
||||
// dinnerboneCheckBox
|
||||
//
|
||||
this.dinnerboneCheckBox.AutoSize = true;
|
||||
this.dinnerboneCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.dinnerboneCheckBox.Location = new System.Drawing.Point(126, 19);
|
||||
this.dinnerboneCheckBox.Name = "dinnerboneCheckBox";
|
||||
this.dinnerboneCheckBox.Size = new System.Drawing.Size(97, 19);
|
||||
this.dinnerboneCheckBox.TabIndex = 11;
|
||||
this.dinnerboneCheckBox.Text = "Dinnerbone";
|
||||
this.dinnerboneCheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.dinnerboneCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.dinnerboneCheckBox, " Flips the skin upside down like Dinnerbone\'s skin, a Minecraft developer. ");
|
||||
this.dinnerboneCheckBox.UseSelectable = true;
|
||||
//
|
||||
// noArmorCheckBox
|
||||
//
|
||||
this.noArmorCheckBox.AutoSize = true;
|
||||
this.noArmorCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.noArmorCheckBox.Location = new System.Drawing.Point(420, 81);
|
||||
this.noArmorCheckBox.Name = "noArmorCheckBox";
|
||||
this.noArmorCheckBox.Size = new System.Drawing.Size(131, 19);
|
||||
this.noArmorCheckBox.TabIndex = 10;
|
||||
this.noArmorCheckBox.Text = "Disable All Armor";
|
||||
this.noArmorCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.noArmorCheckBox, " Disables all armor desptie the armor flags. ");
|
||||
this.noArmorCheckBox.UseSelectable = true;
|
||||
//
|
||||
// bobbingCheckBox
|
||||
//
|
||||
this.bobbingCheckBox.AutoSize = true;
|
||||
this.bobbingCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.bobbingCheckBox.Location = new System.Drawing.Point(272, 50);
|
||||
this.bobbingCheckBox.Name = "bobbingCheckBox";
|
||||
this.bobbingCheckBox.Size = new System.Drawing.Size(124, 19);
|
||||
this.bobbingCheckBox.TabIndex = 9;
|
||||
this.bobbingCheckBox.Text = "Disable Bobbing";
|
||||
this.bobbingCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.bobbingCheckBox, " Disables the bobbing effect in first person.");
|
||||
this.bobbingCheckBox.UseSelectable = true;
|
||||
//
|
||||
// santaCheckBox
|
||||
//
|
||||
this.santaCheckBox.AutoSize = true;
|
||||
this.santaCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.santaCheckBox.Location = new System.Drawing.Point(420, 50);
|
||||
this.santaCheckBox.Name = "santaCheckBox";
|
||||
this.santaCheckBox.Size = new System.Drawing.Size(86, 19);
|
||||
this.santaCheckBox.TabIndex = 8;
|
||||
this.santaCheckBox.Text = "Bad Santa";
|
||||
this.santaCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.santaCheckBox, " The skin sits down after about 10 seconds of no controller input. Made for" +
|
||||
" Bad Santa in the \"Festive\" skin pack. ");
|
||||
this.santaCheckBox.UseSelectable = true;
|
||||
//
|
||||
// syncLegsCheckBox
|
||||
//
|
||||
this.syncLegsCheckBox.AutoSize = true;
|
||||
this.syncLegsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.syncLegsCheckBox.Location = new System.Drawing.Point(272, 19);
|
||||
this.syncLegsCheckBox.Name = "syncLegsCheckBox";
|
||||
this.syncLegsCheckBox.Size = new System.Drawing.Size(136, 19);
|
||||
this.syncLegsCheckBox.TabIndex = 7;
|
||||
this.syncLegsCheckBox.Text = "Synchronous Legs";
|
||||
this.syncLegsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.syncLegsCheckBox, " These parts will move at the same time and angle as each other. ");
|
||||
this.syncLegsCheckBox.UseSelectable = true;
|
||||
//
|
||||
// staticArmsCheckBox
|
||||
//
|
||||
this.staticArmsCheckBox.AutoSize = true;
|
||||
this.staticArmsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.staticArmsCheckBox.Location = new System.Drawing.Point(6, 19);
|
||||
this.staticArmsCheckBox.Name = "staticArmsCheckBox";
|
||||
this.staticArmsCheckBox.Size = new System.Drawing.Size(94, 19);
|
||||
this.staticArmsCheckBox.TabIndex = 5;
|
||||
this.staticArmsCheckBox.Text = "Static Arms";
|
||||
this.staticArmsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.staticArmsCheckBox, " These parts will not move in most animations. ");
|
||||
this.staticArmsCheckBox.UseSelectable = true;
|
||||
//
|
||||
// syncArmsCheckBox
|
||||
//
|
||||
this.syncArmsCheckBox.AutoSize = true;
|
||||
this.syncArmsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.syncArmsCheckBox.Location = new System.Drawing.Point(420, 19);
|
||||
this.syncArmsCheckBox.Name = "syncArmsCheckBox";
|
||||
this.syncArmsCheckBox.Size = new System.Drawing.Size(140, 19);
|
||||
this.syncArmsCheckBox.TabIndex = 4;
|
||||
this.syncArmsCheckBox.Text = "Synchronous Arms";
|
||||
this.syncArmsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.syncArmsCheckBox, " These parts will move at the same time and angle as each other. ");
|
||||
this.syncArmsCheckBox.UseSelectable = true;
|
||||
//
|
||||
// statueCheckBox
|
||||
//
|
||||
this.statueCheckBox.AutoSize = true;
|
||||
this.statueCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.statueCheckBox.Location = new System.Drawing.Point(272, 81);
|
||||
this.statueCheckBox.Name = "statueCheckBox";
|
||||
this.statueCheckBox.Size = new System.Drawing.Size(126, 19);
|
||||
this.statueCheckBox.TabIndex = 3;
|
||||
this.statueCheckBox.Text = "Statue of Liberty";
|
||||
this.statueCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.statueCheckBox, " The right arm is lifted like the Statue of Liberty. Made for Angel of Libe" +
|
||||
"rty in the \"Doctor Who Volume I\" skin pack. ");
|
||||
this.statueCheckBox.UseSelectable = true;
|
||||
//
|
||||
// zombieCheckBox
|
||||
//
|
||||
this.zombieCheckBox.AutoSize = true;
|
||||
this.zombieCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.zombieCheckBox.Location = new System.Drawing.Point(6, 81);
|
||||
this.zombieCheckBox.Name = "zombieCheckBox";
|
||||
this.zombieCheckBox.Size = new System.Drawing.Size(107, 19);
|
||||
this.zombieCheckBox.TabIndex = 2;
|
||||
this.zombieCheckBox.Text = "Zombie Arms";
|
||||
this.zombieCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.zombieCheckBox, " Both arms will stick up like a Zombie. ");
|
||||
this.zombieCheckBox.UseSelectable = true;
|
||||
//
|
||||
// staticLegsCheckBox
|
||||
//
|
||||
this.staticLegsCheckBox.AutoSize = true;
|
||||
this.staticLegsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.staticLegsCheckBox.Location = new System.Drawing.Point(6, 50);
|
||||
this.staticLegsCheckBox.Name = "staticLegsCheckBox";
|
||||
this.staticLegsCheckBox.Size = new System.Drawing.Size(90, 19);
|
||||
this.staticLegsCheckBox.TabIndex = 1;
|
||||
this.staticLegsCheckBox.Text = "Static Legs";
|
||||
this.staticLegsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.staticLegsCheckBox, " These parts will not move in most animations. ");
|
||||
this.staticLegsCheckBox.UseSelectable = true;
|
||||
//
|
||||
// copyButton
|
||||
//
|
||||
this.copyButton.Location = new System.Drawing.Point(425, 119);
|
||||
this.copyButton.Name = "copyButton";
|
||||
this.copyButton.Size = new System.Drawing.Size(173, 23);
|
||||
this.copyButton.TabIndex = 22;
|
||||
this.copyButton.Text = "Copy ANIM Value";
|
||||
this.copyButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.copyButton.UseSelectable = true;
|
||||
this.copyButton.Click += new System.EventHandler(this.copyButton_Click);
|
||||
//
|
||||
// importButton
|
||||
//
|
||||
this.importButton.Location = new System.Drawing.Point(32, 119);
|
||||
this.importButton.Name = "importButton";
|
||||
this.importButton.Size = new System.Drawing.Size(186, 23);
|
||||
this.importButton.TabIndex = 23;
|
||||
this.importButton.Text = "Import ANIM";
|
||||
this.importButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.importButton.UseSelectable = true;
|
||||
this.importButton.Click += new System.EventHandler(this.importButton_Click);
|
||||
//
|
||||
// exportButton
|
||||
//
|
||||
this.exportButton.Location = new System.Drawing.Point(229, 119);
|
||||
this.exportButton.Name = "exportButton";
|
||||
this.exportButton.Size = new System.Drawing.Size(186, 23);
|
||||
this.exportButton.TabIndex = 24;
|
||||
this.exportButton.Text = "Export Template Texture";
|
||||
this.exportButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.exportButton.UseSelectable = true;
|
||||
this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
|
||||
//
|
||||
// animValue
|
||||
//
|
||||
this.animValue.AutoSize = true;
|
||||
this.animValue.FontSize = MetroFramework.MetroLabelSize.Tall;
|
||||
this.animValue.FontWeight = MetroFramework.MetroLabelWeight.Regular;
|
||||
this.animValue.Location = new System.Drawing.Point(260, 60);
|
||||
this.animValue.Name = "animValue";
|
||||
this.animValue.Size = new System.Drawing.Size(110, 25);
|
||||
this.animValue.TabIndex = 25;
|
||||
this.animValue.Text = "0x00000000";
|
||||
this.animValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.animValue.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// uncheckAllButton
|
||||
//
|
||||
this.uncheckAllButton.Location = new System.Drawing.Point(229, 90);
|
||||
this.uncheckAllButton.Name = "uncheckAllButton";
|
||||
this.uncheckAllButton.Size = new System.Drawing.Size(186, 23);
|
||||
this.uncheckAllButton.TabIndex = 26;
|
||||
this.uncheckAllButton.Text = "Uncheck All";
|
||||
this.uncheckAllButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.uncheckAllButton.UseSelectable = true;
|
||||
this.uncheckAllButton.Click += new System.EventHandler(this.uncheckAllButton_Click);
|
||||
//
|
||||
// checkAllButton
|
||||
//
|
||||
this.checkAllButton.Location = new System.Drawing.Point(32, 90);
|
||||
this.checkAllButton.Name = "checkAllButton";
|
||||
this.checkAllButton.Size = new System.Drawing.Size(186, 23);
|
||||
this.checkAllButton.TabIndex = 27;
|
||||
this.checkAllButton.Text = "Check All";
|
||||
this.checkAllButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.checkAllButton.UseSelectable = true;
|
||||
this.checkAllButton.Click += new System.EventHandler(this.checkAllButton_Click);
|
||||
//
|
||||
// toolTip
|
||||
//
|
||||
this.toolTip.StripAmpersands = true;
|
||||
this.toolTip.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.toolTip.StyleManager = null;
|
||||
this.toolTip.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// resetButton
|
||||
//
|
||||
this.resetButton.Location = new System.Drawing.Point(425, 90);
|
||||
this.resetButton.Name = "resetButton";
|
||||
this.resetButton.Size = new System.Drawing.Size(173, 23);
|
||||
this.resetButton.TabIndex = 28;
|
||||
this.resetButton.Text = "Restore ANIM";
|
||||
this.resetButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.resetButton.UseSelectable = true;
|
||||
this.resetButton.Click += new System.EventHandler(this.resetButton_Click);
|
||||
//
|
||||
// templateButton
|
||||
//
|
||||
this.templateButton.Location = new System.Drawing.Point(425, 154);
|
||||
this.templateButton.Name = "templateButton";
|
||||
this.templateButton.Size = new System.Drawing.Size(173, 23);
|
||||
this.templateButton.TabIndex = 29;
|
||||
this.templateButton.Text = "Skin Presets";
|
||||
this.templateButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.templateButton.UseSelectable = true;
|
||||
this.templateButton.Click += new System.EventHandler(this.templateButton_Click);
|
||||
//
|
||||
// ANIMEditor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(630, 554);
|
||||
this.Controls.Add(this.templateButton);
|
||||
this.Controls.Add(this.effectsGroup);
|
||||
this.Controls.Add(this.resetButton);
|
||||
this.Controls.Add(this.checkAllButton);
|
||||
this.Controls.Add(this.uncheckAllButton);
|
||||
this.Controls.Add(this.animValue);
|
||||
this.Controls.Add(this.exportButton);
|
||||
this.Controls.Add(this.importButton);
|
||||
this.Controls.Add(this.copyButton);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.effectsGroup2);
|
||||
this.Controls.Add(this.saveButton);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(630, 554);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(630, 554);
|
||||
this.Name = "ANIMEditor";
|
||||
this.Resizable = false;
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Text = "ANIM Editor";
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.effectsGroup.ResumeLayout(false);
|
||||
this.effectsGroup.PerformLayout();
|
||||
this.effectsGroup2.ResumeLayout(false);
|
||||
this.effectsGroup2.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private MetroFramework.Controls.MetroButton saveButton;
|
||||
private System.Windows.Forms.GroupBox effectsGroup;
|
||||
private MetroFramework.Controls.MetroCheckBox headCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox leftLegCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox rightArmCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox leftArmCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox bodyCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox classicCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox slimCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox rightLegCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox rightLegOCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox headOCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox leftLegOCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox rightArmOCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox leftArmOCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox bodyOCheckBox;
|
||||
private System.Windows.Forms.GroupBox effectsGroup2;
|
||||
private MetroFramework.Controls.MetroCheckBox rightLeggingCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox helmetCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox leftLeggingCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox rightArmorCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox leftArmorCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox chestplateCheckBox;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private MetroFramework.Controls.MetroCheckBox syncLegsCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox staticArmsCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox syncArmsCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox statueCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox zombieCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox staticLegsCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox bobbingCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox santaCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox noArmorCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox dinnerboneCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox crouchCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox unknownCheckBox;
|
||||
private MetroFramework.Controls.MetroButton copyButton;
|
||||
private MetroFramework.Controls.MetroButton importButton;
|
||||
private MetroFramework.Controls.MetroButton exportButton;
|
||||
private MetroFramework.Controls.MetroLabel animValue;
|
||||
private MetroFramework.Controls.MetroButton uncheckAllButton;
|
||||
private MetroFramework.Controls.MetroButton checkAllButton;
|
||||
private MetroFramework.Components.MetroToolTip toolTip;
|
||||
private MetroFramework.Controls.MetroButton resetButton;
|
||||
private MetroFramework.Controls.MetroButton templateButton;
|
||||
}
|
||||
}
|
||||
326
PCK-Studio/Forms/Editor/ANIMEditor.cs
Normal file
326
PCK-Studio/Forms/Editor/ANIMEditor.cs
Normal file
@@ -0,0 +1,326 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using PckStudio.Classes.Utils;
|
||||
using PckStudio.Forms.Additional_Popups;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
public partial class ANIMEditor : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
public SkinANIM ResultAnim => ruleset.Value;
|
||||
|
||||
private readonly SkinANIM initialANIM;
|
||||
private ANIMRuleSet ruleset;
|
||||
|
||||
sealed class ANIMRuleSet
|
||||
{
|
||||
public SkinANIM Value => anim;
|
||||
public Action<SkinANIM> OnCheckboxChanged;
|
||||
|
||||
private class Bictionary<T1, T2> : Dictionary<T1, T2>
|
||||
{
|
||||
public Bictionary(int capacity)
|
||||
: base(capacity)
|
||||
{ }
|
||||
|
||||
public T1 this[T2 index]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!this.Any(x => x.Value.Equals(index)))
|
||||
throw new KeyNotFoundException();
|
||||
return this.First(x => x.Value.Equals(index)).Key;
|
||||
}
|
||||
}
|
||||
|
||||
internal void AddRange(IEnumerable<(T1, T2)> range)
|
||||
{
|
||||
foreach (var (key, value) in range)
|
||||
{
|
||||
Add(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
private Bictionary<CheckBox, ANIM_EFFECTS> checkBoxLinkage;
|
||||
private SkinANIM anim;
|
||||
private bool ignoreCheckChanged = false;
|
||||
|
||||
public ANIMRuleSet(params (CheckBox, ANIM_EFFECTS)[] linkage)
|
||||
{
|
||||
checkBoxLinkage = new Bictionary<CheckBox, ANIM_EFFECTS>(32);
|
||||
if (linkage.Length < 32)
|
||||
Debug.WriteLine($"Not all {nameof(ANIM_EFFECTS)} are mapped to a given checkbox.");
|
||||
|
||||
checkBoxLinkage.AddRange(linkage);
|
||||
foreach (var (checkbox, _) in linkage)
|
||||
{
|
||||
checkbox.CheckedChanged += checkedChanged;
|
||||
}
|
||||
}
|
||||
|
||||
internal void SetAll(bool state)
|
||||
{
|
||||
foreach (var item in checkBoxLinkage)
|
||||
{
|
||||
IgnoreAndDo(item.Key, checkbox =>
|
||||
{
|
||||
anim.SetFlag(item.Value, state);
|
||||
checkbox.Checked = state;
|
||||
checkbox.Enabled = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
internal void ApplyAnim(SkinANIM anim)
|
||||
{
|
||||
this.anim = anim;
|
||||
foreach (var item in checkBoxLinkage)
|
||||
item.Key.Enabled = true;
|
||||
foreach (var item in checkBoxLinkage)
|
||||
{
|
||||
item.Key.Checked = anim.GetFlag(item.Value);
|
||||
}
|
||||
}
|
||||
|
||||
private void checkedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!ignoreCheckChanged && sender is CheckBox checkBox && checkBoxLinkage.ContainsKey(checkBox))
|
||||
{
|
||||
switch (checkBoxLinkage[checkBox])
|
||||
{
|
||||
case ANIM_EFFECTS.HEAD_DISABLED:
|
||||
checkBoxLinkage[ANIM_EFFECTS.FORCE_HEAD_ARMOR].Enabled = !checkBox.Checked;
|
||||
break;
|
||||
case ANIM_EFFECTS.BODY_DISABLED:
|
||||
checkBoxLinkage[ANIM_EFFECTS.FORCE_BODY_ARMOR].Enabled = !checkBox.Checked;
|
||||
break;
|
||||
case ANIM_EFFECTS.LEFT_LEG_DISABLED:
|
||||
checkBoxLinkage[ANIM_EFFECTS.FORCE_LEFT_LEG_ARMOR].Enabled = !checkBox.Checked;
|
||||
break;
|
||||
case ANIM_EFFECTS.RIGHT_LEG_DISABLED:
|
||||
checkBoxLinkage[ANIM_EFFECTS.FORCE_RIGHT_LEG_ARMOR].Enabled = !checkBox.Checked;
|
||||
break;
|
||||
case ANIM_EFFECTS.LEFT_ARM_DISABLED:
|
||||
checkBoxLinkage[ANIM_EFFECTS.FORCE_LEFT_ARM_ARMOR].Enabled = !checkBox.Checked;
|
||||
break;
|
||||
case ANIM_EFFECTS.RIGHT_ARM_DISABLED:
|
||||
checkBoxLinkage[ANIM_EFFECTS.FORCE_RIGHT_ARM_ARMOR].Enabled = !checkBox.Checked;
|
||||
break;
|
||||
|
||||
case ANIM_EFFECTS.RESOLUTION_64x64:
|
||||
Uncheck(checkBoxLinkage[ANIM_EFFECTS.SLIM_MODEL]);
|
||||
checkBoxLinkage[ANIM_EFFECTS.SLIM_MODEL].Enabled = !checkBox.Checked;
|
||||
break;
|
||||
|
||||
case ANIM_EFFECTS.SLIM_MODEL:
|
||||
Uncheck(checkBoxLinkage[ANIM_EFFECTS.RESOLUTION_64x64]);
|
||||
checkBoxLinkage[ANIM_EFFECTS.RESOLUTION_64x64].Enabled = !checkBox.Checked;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
anim.SetFlag(checkBoxLinkage[checkBox], checkBox.Checked && checkBox.Enabled);
|
||||
OnCheckboxChanged?.Invoke(anim);
|
||||
}
|
||||
}
|
||||
|
||||
private void Uncheck(CheckBox checkBox)
|
||||
{
|
||||
checkBox.Checked = false;
|
||||
}
|
||||
|
||||
private void IgnoreAndDo(CheckBox checkBox, Action<CheckBox> action)
|
||||
{
|
||||
ignoreCheckChanged = true;
|
||||
action.Invoke(checkBox);
|
||||
ignoreCheckChanged = false;
|
||||
}
|
||||
}
|
||||
|
||||
public ANIMEditor(string ANIM)
|
||||
{
|
||||
InitializeComponent();
|
||||
if (!SkinANIM.IsValidANIM(ANIM))
|
||||
{
|
||||
DialogResult = DialogResult.Abort;
|
||||
Close();
|
||||
}
|
||||
var anim = initialANIM = SkinANIM.FromString(ANIM);
|
||||
ruleset = new ANIMRuleSet(
|
||||
(bobbingCheckBox, ANIM_EFFECTS.HEAD_BOBBING_DISABLED),
|
||||
(bodyCheckBox, ANIM_EFFECTS.BODY_DISABLED),
|
||||
(bodyOCheckBox, ANIM_EFFECTS.BODY_OVERLAY_DISABLED),
|
||||
(chestplateCheckBox, ANIM_EFFECTS.FORCE_BODY_ARMOR),
|
||||
(classicCheckBox, ANIM_EFFECTS.RESOLUTION_64x64),
|
||||
(crouchCheckBox, ANIM_EFFECTS.DO_BACKWARDS_CROUCH),
|
||||
(dinnerboneCheckBox, ANIM_EFFECTS.DINNERBONE),
|
||||
(headCheckBox, ANIM_EFFECTS.HEAD_DISABLED),
|
||||
(headOCheckBox, ANIM_EFFECTS.HEAD_OVERLAY_DISABLED),
|
||||
(helmetCheckBox, ANIM_EFFECTS.FORCE_HEAD_ARMOR),
|
||||
(leftArmCheckBox, ANIM_EFFECTS.LEFT_ARM_DISABLED),
|
||||
(leftArmOCheckBox, ANIM_EFFECTS.LEFT_ARM_OVERLAY_DISABLED),
|
||||
(leftArmorCheckBox, ANIM_EFFECTS.FORCE_LEFT_ARM_ARMOR),
|
||||
(leftLegCheckBox, ANIM_EFFECTS.LEFT_LEG_DISABLED),
|
||||
(leftLeggingCheckBox, ANIM_EFFECTS.FORCE_LEFT_LEG_ARMOR),
|
||||
(leftLegOCheckBox, ANIM_EFFECTS.LEFT_LEG_OVERLAY_DISABLED),
|
||||
(noArmorCheckBox, ANIM_EFFECTS.ALL_ARMOR_DISABLED),
|
||||
(rightArmCheckBox, ANIM_EFFECTS.RIGHT_ARM_DISABLED),
|
||||
(rightArmOCheckBox, ANIM_EFFECTS.RIGHT_ARM_OVERLAY_DISABLED),
|
||||
(rightArmorCheckBox, ANIM_EFFECTS.FORCE_RIGHT_ARM_ARMOR),
|
||||
(rightLegCheckBox, ANIM_EFFECTS.RIGHT_LEG_DISABLED),
|
||||
(rightLeggingCheckBox, ANIM_EFFECTS.FORCE_RIGHT_LEG_ARMOR),
|
||||
(rightLegOCheckBox, ANIM_EFFECTS.RIGHT_LEG_OVERLAY_DISABLED),
|
||||
(santaCheckBox, ANIM_EFFECTS.BAD_SANTA),
|
||||
(slimCheckBox, ANIM_EFFECTS.SLIM_MODEL),
|
||||
(staticArmsCheckBox, ANIM_EFFECTS.STATIC_ARMS),
|
||||
(staticLegsCheckBox, ANIM_EFFECTS.STATIC_LEGS),
|
||||
(statueCheckBox, ANIM_EFFECTS.STATUE_OF_LIBERTY),
|
||||
(syncArmsCheckBox, ANIM_EFFECTS.SYNCED_ARMS),
|
||||
(syncLegsCheckBox, ANIM_EFFECTS.SYNCED_LEGS),
|
||||
(unknownCheckBox, ANIM_EFFECTS.__BIT_4),
|
||||
(zombieCheckBox, ANIM_EFFECTS.ZOMBIE_ARMS)
|
||||
);
|
||||
ruleset.OnCheckboxChanged = setDisplayAnim;
|
||||
setDisplayAnim(anim);
|
||||
ruleset.ApplyAnim(anim);
|
||||
}
|
||||
|
||||
private void setDisplayAnim(SkinANIM anim)
|
||||
{
|
||||
animValue.Text = anim.ToString();
|
||||
}
|
||||
|
||||
private void saveButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void copyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Clipboard.SetText(animValue.Text);
|
||||
}
|
||||
|
||||
private void importButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
string value = string.Empty;
|
||||
while (!SkinANIM.IsValidANIM(value))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(value)) MessageBox.Show($"The following value \"{value}\" is not valid. Please try again.");
|
||||
RenamePrompt diag = new RenamePrompt(value);
|
||||
diag.TextLabel.Text = "ANIM";
|
||||
diag.OKButton.Text = "Ok";
|
||||
if (diag.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
value = diag.NewText;
|
||||
}
|
||||
else return;
|
||||
}
|
||||
ruleset.ApplyAnim(SkinANIM.FromString(value));
|
||||
}
|
||||
|
||||
private void uncheckAllButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ruleset.SetAll(false);
|
||||
}
|
||||
|
||||
private void checkAllButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ruleset.SetAll(true);
|
||||
}
|
||||
|
||||
private void exportButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
using SaveFileDialog saveFileDialog = new SaveFileDialog
|
||||
{
|
||||
FileName = animValue.Text + ".png",
|
||||
Filter = "Skin textures|*.png"
|
||||
};
|
||||
if (saveFileDialog.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
bool isSlim = ruleset.Value.GetFlag(ANIM_EFFECTS.SLIM_MODEL);
|
||||
bool is64x64 = ruleset.Value.GetFlag(ANIM_EFFECTS.RESOLUTION_64x64);
|
||||
bool isClassic32 = !isSlim && !is64x64;
|
||||
|
||||
Image skin = isSlim ? Properties.Resources.slim_template : Properties.Resources.classic_template;
|
||||
|
||||
Size imgSize = new Size(64, isClassic32 ? 32 : 64);
|
||||
|
||||
Bitmap img = new Bitmap(imgSize.Width, imgSize.Height);
|
||||
using (Graphics graphic = Graphics.FromImage(img))
|
||||
{
|
||||
graphic.DrawImage(skin, new Rectangle(Point.Empty, imgSize), new Rectangle(Point.Empty, imgSize), GraphicsUnit.Pixel);
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.HEAD_OVERLAY_DISABLED))
|
||||
graphic.FillRectangle(Brushes.Magenta, new Rectangle(32, 0, 32, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.HEAD_DISABLED))
|
||||
graphic.FillRectangle(Brushes.Magenta, new Rectangle(0, 0, 32, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.BODY_DISABLED))
|
||||
graphic.FillRectangle(Brushes.Magenta, new Rectangle(16, 16, 24, 16));
|
||||
if (img.Height == 64)
|
||||
{
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.RIGHT_ARM_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(40, 16, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.RIGHT_LEG_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(0, 16, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.BODY_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(16, 32, 24, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.RIGHT_ARM_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(40, 32, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.RIGHT_LEG_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(0, 32, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.LEFT_LEG_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(0, 48, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.LEFT_LEG_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(16, 48, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.LEFT_ARM_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(32, 48, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.LEFT_ARM_OVERLAY_DISABLED)) graphic.FillRectangle(Brushes.Magenta, new Rectangle(48, 48, 16, 16));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Since both classic 32 arms and legs use the same texture, removing the texture would remove both limbs instead of just one.
|
||||
// So both must be disabled by the user before they're removed from the texture;
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.RIGHT_ARM_DISABLED) && ruleset.Value.GetFlag(ANIM_EFFECTS.LEFT_ARM_DISABLED))
|
||||
graphic.FillRectangle(Brushes.Magenta, new Rectangle(40, 16, 16, 16));
|
||||
if (ruleset.Value.GetFlag(ANIM_EFFECTS.RIGHT_LEG_DISABLED) && ruleset.Value.GetFlag(ANIM_EFFECTS.LEFT_LEG_DISABLED))
|
||||
graphic.FillRectangle(Brushes.Magenta, new Rectangle(0, 16, 16, 16));
|
||||
}
|
||||
img.MakeTransparent(Color.Magenta);
|
||||
skin = img;
|
||||
}
|
||||
skin.Save(saveFileDialog.FileName);
|
||||
}
|
||||
|
||||
private void resetButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ruleset.ApplyAnim((SkinANIM)initialANIM.Clone());
|
||||
}
|
||||
|
||||
static readonly Dictionary<string, ANIM_EFFECTS> Templates = new Dictionary<string, ANIM_EFFECTS>()
|
||||
{
|
||||
{ "Steve (64x32)", ANIM_EFFECTS.NONE },
|
||||
{ "Steve (64x64)", ANIM_EFFECTS.RESOLUTION_64x64 },
|
||||
{ "Alex (64x64)", ANIM_EFFECTS.SLIM_MODEL },
|
||||
{ "Zombie Skins", ANIM_EFFECTS.ZOMBIE_ARMS },
|
||||
{ "Cetacean Skins", ANIM_EFFECTS.SYNCED_ARMS | ANIM_EFFECTS.SYNCED_LEGS },
|
||||
{ "Ski Skins", ANIM_EFFECTS.SYNCED_ARMS | ANIM_EFFECTS.STATIC_LEGS },
|
||||
{ "Ghost Skins", ANIM_EFFECTS.STATIC_LEGS | ANIM_EFFECTS.ZOMBIE_ARMS },
|
||||
{ "Medusa (Greek Myth.)", ANIM_EFFECTS.SYNCED_LEGS },
|
||||
{ "Librarian (Halo)", ANIM_EFFECTS.STATIC_LEGS },
|
||||
{ "Grim Reaper (Halloween)", ANIM_EFFECTS.STATIC_LEGS | ANIM_EFFECTS.STATIC_ARMS }
|
||||
};
|
||||
|
||||
private void templateButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
var diag = new ItemSelectionPopUp(Templates.Keys.ToArray());
|
||||
diag.label2.Text = "Presets";
|
||||
diag.okBtn.Text = "Load";
|
||||
|
||||
if (diag.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
var templateANIM = new SkinANIM(Templates[diag.SelectedItem]);
|
||||
DialogResult prompt = MessageBox.Show(this, "Would you like to add this preset's effects to your current ANIM? Otherwise all of your effects will be cleared. Either choice can be undone by pressing \"Restore ANIM\".", "", MessageBoxButtons.YesNo);
|
||||
if (prompt == DialogResult.Yes)
|
||||
templateANIM = ruleset.Value | templateANIM;
|
||||
ruleset.ApplyAnim(templateANIM);
|
||||
}
|
||||
}
|
||||
}
|
||||
2630
PCK-Studio/Forms/Editor/ANIMEditor.resx
Normal file
2630
PCK-Studio/Forms/Editor/ANIMEditor.resx
Normal file
File diff suppressed because it is too large
Load Diff
146
PCK-Studio/Forms/Editor/Animation.cs
Normal file
146
PCK-Studio/Forms/Editor/Animation.cs
Normal file
@@ -0,0 +1,146 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using PckStudio.Extensions;
|
||||
using System.Text;
|
||||
|
||||
|
||||
// TODO: change namespace
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
sealed class Animation
|
||||
{
|
||||
public const int MinimumFrameTime = 1;
|
||||
|
||||
public int FrameCount => frames.Count;
|
||||
|
||||
public int TextureCount => frameTextures.Count;
|
||||
|
||||
public Frame this[int frameIndex] => frames[frameIndex];
|
||||
|
||||
// TODO: implement this
|
||||
public bool Interpolate { get; set; } = false;
|
||||
|
||||
private readonly List<Image> frameTextures;
|
||||
|
||||
private readonly List<Frame> frames = new List<Frame>();
|
||||
|
||||
|
||||
public Animation(IEnumerable<Image> image)
|
||||
{
|
||||
frameTextures = new List<Image>(image);
|
||||
}
|
||||
|
||||
public Animation(IEnumerable<Image> frameTextures, string ANIM) : this(frameTextures)
|
||||
{
|
||||
ParseAnim(ANIM);
|
||||
}
|
||||
|
||||
public struct Frame
|
||||
{
|
||||
public readonly Image Texture;
|
||||
public int Ticks;
|
||||
|
||||
public Frame(Image texture) : this(texture, MinimumFrameTime)
|
||||
{ }
|
||||
|
||||
public Frame(Image texture, int frameTime)
|
||||
{
|
||||
Texture = texture;
|
||||
Ticks = frameTime;
|
||||
}
|
||||
}
|
||||
|
||||
private void ParseAnim(string ANIM)
|
||||
{
|
||||
_ = ANIM ?? throw new ArgumentNullException(nameof(ANIM));
|
||||
ANIM = (Interpolate = ANIM.StartsWith("#")) ? ANIM.Substring(1) : ANIM;
|
||||
string[] animData = ANIM.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
int lastFrameTime = MinimumFrameTime;
|
||||
if (animData.Length <= 0)
|
||||
for (int i = 0; i < TextureCount; i++)
|
||||
{
|
||||
AddFrame(i);
|
||||
}
|
||||
|
||||
foreach (string frameInfo in animData)
|
||||
{
|
||||
string[] frameData = frameInfo.Split('*');
|
||||
//if (frameData.Length < 2)
|
||||
// continue; // shouldn't happen
|
||||
int currentFrameIndex = 0;
|
||||
int.TryParse(frameData[0], out currentFrameIndex);
|
||||
|
||||
// Some textures like the Halloween 2015's Lava texture don't have a
|
||||
// frame time parameter for certain frames.
|
||||
// This will detect that and place the last frame time in its place.
|
||||
// This is accurate to console edition behavior.
|
||||
// - MattNL
|
||||
int currentFrameTime = string.IsNullOrEmpty(frameData[1]) ? lastFrameTime : int.Parse(frameData[1]);
|
||||
AddFrame(currentFrameIndex, currentFrameTime);
|
||||
lastFrameTime = currentFrameTime;
|
||||
}
|
||||
}
|
||||
|
||||
public Frame AddFrame(int frameTextureIndex) => AddFrame(frameTextureIndex, MinimumFrameTime);
|
||||
public Frame AddFrame(int frameTextureIndex, int frameTime)
|
||||
{
|
||||
if (frameTextureIndex < 0 || frameTextureIndex >= frameTextures.Count)
|
||||
throw new ArgumentOutOfRangeException(nameof(frameTextureIndex));
|
||||
Frame f = new Frame(frameTextures[frameTextureIndex], frameTime);
|
||||
frames.Add(f);
|
||||
return f;
|
||||
}
|
||||
|
||||
public bool RemoveFrame(int frameIndex)
|
||||
{
|
||||
frames.RemoveAt(frameIndex);
|
||||
return true;
|
||||
}
|
||||
|
||||
public Frame GetFrame(int index) => frames[index];
|
||||
|
||||
public List<Frame> GetFrames()
|
||||
{
|
||||
return frames;
|
||||
}
|
||||
|
||||
public List<Image> GetFrameTextures()
|
||||
{
|
||||
return frameTextures;
|
||||
}
|
||||
|
||||
public int GetTextureIndex(Image frameTexture)
|
||||
{
|
||||
_ = frameTexture ?? throw new ArgumentNullException(nameof(frameTexture));
|
||||
return frameTextures.IndexOf(frameTexture);
|
||||
}
|
||||
|
||||
public void SetFrame(Frame frame, int frameTextureIndex, int frameTime = MinimumFrameTime)
|
||||
=> SetFrame(frames.IndexOf(frame), frameTextureIndex, frameTime);
|
||||
public void SetFrame(int frameIndex, int frameTextureIndex, int frameTime = MinimumFrameTime)
|
||||
{
|
||||
frames[frameIndex] = new Frame(frameTextures[frameTextureIndex], frameTime);
|
||||
}
|
||||
|
||||
public string BuildAnim()
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder(Interpolate ? "#" : string.Empty);
|
||||
foreach (var frame in frames)
|
||||
stringBuilder.Append($"{GetTextureIndex(frame.Texture)}*{frame.Ticks},");
|
||||
return stringBuilder.ToString(0, stringBuilder.Length - 1);
|
||||
}
|
||||
|
||||
public Image BuildTexture(bool isClockOrCompass, List<Image> linearImages = default!)
|
||||
{
|
||||
int width = frameTextures[0].Width;
|
||||
int height = frameTextures[0].Height;
|
||||
if (width != height)
|
||||
throw new Exception("Invalid size");
|
||||
|
||||
var textures = isClockOrCompass ? linearImages : frameTextures;
|
||||
|
||||
return ImageExtensions.CombineImages(textures, ImageLayoutDirection.Vertical);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,248 +2,35 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using PckStudio.Forms.Additional_Popups.Animation;
|
||||
using PckStudio.Forms.Utilities;
|
||||
using PckStudio.Classes.Extentions;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Diagnostics;
|
||||
using PckStudio.Extensions;
|
||||
using OMI.Formats.Pck;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
public partial class AnimationEditor : MetroForm
|
||||
public partial class AnimationEditor : MetroForm
|
||||
{
|
||||
PckFile.FileData animationFile;
|
||||
Animation currentAnimation;
|
||||
AnimationPlayer player;
|
||||
|
||||
bool isItem = false;
|
||||
string animationSection => AnimationUtil.GetAnimationSection(isItem);
|
||||
string animationSection => AnimationResources.GetAnimationSection(isItem);
|
||||
|
||||
public string TileName = string.Empty;
|
||||
|
||||
sealed class Animation
|
||||
{
|
||||
public const int MinimumFrameTime = 1;
|
||||
private bool IsEditingSpecial => IsSpecialTile(TileName);
|
||||
|
||||
private readonly List<Image> frameTextures;
|
||||
|
||||
private readonly List<Frame> frames = new List<Frame>();
|
||||
|
||||
public Frame this[int frameIndex] => frames[frameIndex];
|
||||
|
||||
// not implemented rn...
|
||||
public bool Interpolate { get; set; } = false;
|
||||
|
||||
public Animation(Image image)
|
||||
{
|
||||
frameTextures = new List<Image>(image.CreateImageList(ImageExtentions.ImageLayoutDirection.Horizontal));
|
||||
}
|
||||
|
||||
public Animation(Image image, string ANIM) : this(image)
|
||||
{
|
||||
ParseAnim(ANIM);
|
||||
}
|
||||
|
||||
public struct Frame
|
||||
{
|
||||
public readonly Image Texture;
|
||||
public int Ticks;
|
||||
|
||||
public static implicit operator Image(Frame f) => f.Texture;
|
||||
|
||||
public Frame(Image texture) : this(texture, MinimumFrameTime)
|
||||
{}
|
||||
|
||||
public Frame(Image texture, int frameTime)
|
||||
{
|
||||
Texture = texture;
|
||||
Ticks = frameTime;
|
||||
}
|
||||
}
|
||||
|
||||
public void ParseAnim(string ANIM)
|
||||
{
|
||||
_ = ANIM ?? throw new ArgumentNullException(nameof(ANIM));
|
||||
ANIM = (Interpolate = ANIM.StartsWith("#")) ? ANIM.Substring(1) : ANIM;
|
||||
string[] animData = ANIM.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
int lastFrameTime = MinimumFrameTime;
|
||||
if (animData.Length <= 0)
|
||||
{
|
||||
for(int i = 0; i < FrameTextureCount; i++)
|
||||
{
|
||||
AddFrame(i, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (string frameInfo in animData)
|
||||
{
|
||||
string[] frameData = frameInfo.Split('*');
|
||||
//if (frameData.Length < 2)
|
||||
// continue; // shouldn't happen
|
||||
int currentFrameIndex = int.TryParse(frameData[0], out currentFrameIndex) ? currentFrameIndex : 0;
|
||||
|
||||
// Some textures like the Halloween 2015's Lava texture don't have a
|
||||
// frame time parameter for certain frames.
|
||||
// This will detect that and place the last frame time in its place.
|
||||
// This is accurate to console edition behavior.
|
||||
// - MattNL
|
||||
int currentFrameTime = string.IsNullOrEmpty(frameData[1]) ? lastFrameTime : int.Parse(frameData[1]);
|
||||
AddFrame(currentFrameIndex, currentFrameTime);
|
||||
lastFrameTime = currentFrameTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
public Frame AddFrame(int frameTextureIndex) => AddFrame(frameTextureIndex, MinimumFrameTime);
|
||||
public Frame AddFrame(int frameTextureIndex, int frameTime)
|
||||
{
|
||||
if (frameTextureIndex < 0 || frameTextureIndex >= frameTextures.Count)
|
||||
throw new ArgumentOutOfRangeException(nameof(frameTextureIndex));
|
||||
Frame f = new Frame(frameTextures[frameTextureIndex], frameTime);
|
||||
frames.Add(f);
|
||||
return f;
|
||||
}
|
||||
|
||||
public bool RemoveFrame(int frameIndex)
|
||||
{
|
||||
frames.RemoveAt(frameIndex);
|
||||
return true;
|
||||
}
|
||||
|
||||
public Frame GetFrame(int index) => frames[index];
|
||||
|
||||
public List<Frame> GetFrames()
|
||||
{
|
||||
return frames;
|
||||
}
|
||||
|
||||
public List<Image> GetFrameTextures()
|
||||
{
|
||||
return frameTextures;
|
||||
}
|
||||
|
||||
public int GetFrameIndex(Image frameTexture)
|
||||
{
|
||||
_ = frameTexture ?? throw new ArgumentNullException(nameof(frameTexture));
|
||||
return frameTextures.IndexOf(frameTexture);
|
||||
}
|
||||
|
||||
public int FrameCount => frames.Count;
|
||||
public int FrameTextureCount => frameTextures.Count;
|
||||
|
||||
public void SetFrame(Frame frame, int frameTextureIndex, int frameTime = MinimumFrameTime)
|
||||
=> SetFrame(frames.IndexOf(frame), frameTextureIndex, frameTime);
|
||||
public void SetFrame(int frameIndex, int frameTextureIndex, int frameTime = MinimumFrameTime)
|
||||
{
|
||||
frames[frameIndex] = new Frame(frameTextures[frameTextureIndex], frameTime);
|
||||
}
|
||||
|
||||
public string BuildAnim()
|
||||
{
|
||||
string animationData = Interpolate ? "#" : string.Empty;
|
||||
frames.ForEach(frame => animationData += $"{GetFrameIndex(frame)}*{frame.Ticks},");
|
||||
return animationData.TrimEnd(',');
|
||||
}
|
||||
|
||||
public Image BuildTexture(AnimationEditor ae)
|
||||
{
|
||||
int width = frameTextures[0].Width;
|
||||
int height = frameTextures[0].Height;
|
||||
if (width != height) throw new Exception("Invalid size");
|
||||
|
||||
bool isClockOrCompass = ae.TileName == "clock" || ae.TileName == "compass";
|
||||
|
||||
List<Image> linearImages = new List<Image>();
|
||||
foreach (TreeNode n in ae.frameTreeView.Nodes) linearImages.Add(frameTextures[n.ImageIndex]);
|
||||
|
||||
var img = new Bitmap(width, height * (isClockOrCompass ? linearImages.Count : FrameTextureCount));
|
||||
int pos_y = 0;
|
||||
|
||||
using (var g = Graphics.FromImage(img))
|
||||
(isClockOrCompass ? linearImages : frameTextures).ForEach(texture =>
|
||||
{
|
||||
g.DrawImage(texture, 0, pos_y);
|
||||
pos_y += height;
|
||||
});
|
||||
return img;
|
||||
}
|
||||
}
|
||||
|
||||
sealed class AnimationPlayer
|
||||
private bool IsSpecialTile(string tileName)
|
||||
{
|
||||
public const int BaseTickSpeed = 48;
|
||||
public bool IsPlaying { get; private set; } = false;
|
||||
|
||||
private int currentAnimationFrameIndex = 0;
|
||||
private PictureBox display;
|
||||
private Animation _animation;
|
||||
private CancellationTokenSource cts = new CancellationTokenSource();
|
||||
|
||||
public AnimationPlayer(PictureBox display)
|
||||
{
|
||||
SetContext(display);
|
||||
}
|
||||
|
||||
private async void DoAnimate()
|
||||
{
|
||||
_ = display ?? throw new ArgumentNullException(nameof(display));
|
||||
_ = _animation ?? throw new ArgumentNullException(nameof(_animation));
|
||||
IsPlaying = true;
|
||||
while (!cts.IsCancellationRequested)
|
||||
{
|
||||
if (currentAnimationFrameIndex >= _animation.FrameCount)
|
||||
currentAnimationFrameIndex = 0;
|
||||
Animation.Frame frame = SetFrameDisplayed(currentAnimationFrameIndex++);
|
||||
await Task.Delay(BaseTickSpeed * frame.Ticks);
|
||||
}
|
||||
IsPlaying = false;
|
||||
}
|
||||
|
||||
public void Start(Animation animation)
|
||||
{
|
||||
_animation = animation;
|
||||
cts = new CancellationTokenSource();
|
||||
Task.Run(DoAnimate, cts.Token);
|
||||
}
|
||||
|
||||
public void Stop([CallerMemberName] string callerName = default!)
|
||||
{
|
||||
Debug.WriteLine($"{nameof(AnimationPlayer.Stop)} called from {callerName}!");
|
||||
cts.Cancel();
|
||||
}
|
||||
|
||||
public Animation.Frame GetCurrentFrame() => _animation[currentAnimationFrameIndex];
|
||||
|
||||
public void SetContext(PictureBox display) => this.display = display;
|
||||
|
||||
public void SelectFrame(Animation animation, int index)
|
||||
{
|
||||
_animation = animation;
|
||||
if (IsPlaying) Stop();
|
||||
SetFrameDisplayed(index);
|
||||
currentAnimationFrameIndex = index;
|
||||
}
|
||||
|
||||
private Animation.Frame SetFrameDisplayed(int i)
|
||||
{
|
||||
Monitor.Enter(_animation);
|
||||
Animation.Frame frame = _animation[i];
|
||||
display.Image = frame;
|
||||
Monitor.Exit(_animation);
|
||||
return frame;
|
||||
}
|
||||
}
|
||||
return tileName == "clock" || tileName == "compass";
|
||||
}
|
||||
|
||||
public AnimationEditor(PckFile.FileData file)
|
||||
{
|
||||
@@ -252,7 +39,7 @@ namespace PckStudio.Forms.Editor
|
||||
isItem = file.Filename.Split('/').Contains("items");
|
||||
TileName = Path.GetFileNameWithoutExtension(file.Filename);
|
||||
|
||||
InterpolationCheckbox.Visible = !(TileName == "clock" || TileName == "compass");
|
||||
InterpolationCheckbox.Visible = !IsEditingSpecial;
|
||||
InterpolationCheckbox.Checked = InterpolationCheckbox.Visible;
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled = InterpolationCheckbox.Visible;
|
||||
importJavaAnimationToolStripMenuItem.Enabled = InterpolationCheckbox.Visible;
|
||||
@@ -262,12 +49,14 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
using MemoryStream textureMem = new MemoryStream(animationFile.Data);
|
||||
var texture = new Bitmap(textureMem);
|
||||
currentAnimation = animationFile.Properties.HasProperty("ANIM")
|
||||
? new Animation(texture, animationFile.Properties.GetPropertyValue("ANIM"))
|
||||
: new Animation(texture);
|
||||
var frameTextures = texture.CreateImageList(ImageLayoutDirection.Vertical);
|
||||
|
||||
currentAnimation = animationFile.Properties.HasProperty("ANIM")
|
||||
? new Animation(frameTextures, animationFile.Properties.GetPropertyValue("ANIM"))
|
||||
: new Animation(frameTextures);
|
||||
player = new AnimationPlayer(pictureBoxWithInterpolationMode1);
|
||||
|
||||
foreach (JObject content in AnimationUtil.tileData[animationSection].Children())
|
||||
foreach (JObject content in AnimationResources.tileData[animationSection].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == TileName);
|
||||
if (prop is JProperty)
|
||||
@@ -286,7 +75,15 @@ namespace PckStudio.Forms.Editor
|
||||
// $"Frame: {i}, Frame Time: {Animation.MinimumFrameTime}"
|
||||
TextureIcons.Images.Clear();
|
||||
TextureIcons.Images.AddRange(currentAnimation.GetFrameTextures().ToArray());
|
||||
currentAnimation.GetFrames().ForEach(f => frameTreeView.Nodes.Add("", $"for {f.Ticks} frames", currentAnimation.GetFrameIndex(f.Texture), currentAnimation.GetFrameIndex(f.Texture)));
|
||||
foreach (var frame in currentAnimation.GetFrames())
|
||||
{
|
||||
var imageIndex = currentAnimation.GetTextureIndex(frame.Texture);
|
||||
frameTreeView.Nodes.Add(new TreeNode($"for {frame.Ticks} frames")
|
||||
{
|
||||
ImageIndex = imageIndex,
|
||||
SelectedImageIndex = imageIndex,
|
||||
});
|
||||
}
|
||||
player.SelectFrame(currentAnimation, 0);
|
||||
}
|
||||
|
||||
@@ -304,8 +101,8 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void StartAnimationBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
// crash fix: when pushing the play button on occasions, the animation will play twice the intended speed and crash PCK Studio after one iteration
|
||||
player.Stop(); // force the player to stop before starting
|
||||
// prevent player from crashing
|
||||
player.Stop();
|
||||
AnimationPlayBtn.Enabled = !(AnimationStopBtn.Enabled = !AnimationStopBtn.Enabled);
|
||||
if (currentAnimation.FrameCount > 1)
|
||||
{
|
||||
@@ -338,12 +135,13 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void saveToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
string anim = currentAnimation.BuildAnim();
|
||||
animationFile.Properties.SetProperty("ANIM", TileName == "clock" || TileName == "compass" ? "" : anim);
|
||||
|
||||
animationFile.Properties.SetProperty("ANIM", IsEditingSpecial ? "" : anim);
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
currentAnimation.BuildTexture(this).Save(stream, ImageFormat.Png);
|
||||
var texture = currentAnimation.BuildTexture(IsEditingSpecial);
|
||||
texture.Save(stream, ImageFormat.Png);
|
||||
animationFile.SetData(stream.ToArray());
|
||||
}
|
||||
//Reusing this for the tile path
|
||||
@@ -431,7 +229,7 @@ namespace PckStudio.Forms.Editor
|
||||
private void treeView1_doubleClick(object sender, EventArgs e)
|
||||
{
|
||||
var frame = currentAnimation.GetFrame(frameTreeView.SelectedNode.Index);
|
||||
using FrameEditor diag = new FrameEditor(frame.Ticks, currentAnimation.GetFrameIndex(frame.Texture), TextureIcons);
|
||||
using FrameEditor diag = new FrameEditor(frame.Ticks, currentAnimation.GetTextureIndex(frame.Texture), TextureIcons);
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
/* Found a bug here. When passing the frame variable, it would replace the first instance of that frame and time
|
||||
@@ -464,15 +262,10 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void bulkAnimationSpeedToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetBulkSpeed diag = new SetBulkSpeed(frameTreeView);
|
||||
if(diag.ShowDialog(this) == DialogResult.OK)
|
||||
SetBulkSpeed diag = new SetBulkSpeed();
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
var list = currentAnimation.GetFrames();
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
Animation.Frame f = list[i];
|
||||
currentAnimation.SetFrame(f, currentAnimation.GetFrameIndex(f), diag.time);
|
||||
}
|
||||
currentAnimation.GetFrames().ForEach(frame => frame.Ticks = diag.Ticks);
|
||||
LoadAnimationTreeView();
|
||||
}
|
||||
diag.Dispose();
|
||||
@@ -485,15 +278,12 @@ namespace PckStudio.Forms.Editor
|
||||
if (query == DialogResult.No) return;
|
||||
|
||||
OpenFileDialog fileDialog = new OpenFileDialog();
|
||||
fileDialog.Multiselect = false;
|
||||
fileDialog.Title = "Please select a valid Minecaft: Java Edition animation script";
|
||||
|
||||
// It's marked as .png.mcmeta just in case
|
||||
// some weirdo tries to pass a pack.mcmeta or something
|
||||
// -MattNL
|
||||
fileDialog.Filter = "Animation Scripts (*.mcmeta)|*.png.mcmeta";
|
||||
fileDialog.CheckPathExists = true;
|
||||
fileDialog.CheckFileExists = true;
|
||||
if (fileDialog.ShowDialog(this) != DialogResult.OK) return;
|
||||
Console.WriteLine("Selected Animation Script: " + fileDialog.FileName);
|
||||
|
||||
@@ -504,8 +294,8 @@ namespace PckStudio.Forms.Editor
|
||||
return;
|
||||
}
|
||||
using MemoryStream textureMem = new MemoryStream(File.ReadAllBytes(textureFile));
|
||||
var new_animation = new Animation(Image.FromStream(textureMem));
|
||||
|
||||
var textures = Image.FromStream(textureMem).CreateImageList(ImageLayoutDirection.Horizontal);
|
||||
var new_animation = new Animation(textures);
|
||||
try
|
||||
{
|
||||
JObject mcmeta = JObject.Parse(File.ReadAllText(fileDialog.FileName));
|
||||
@@ -540,7 +330,7 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < new_animation.FrameTextureCount; i++)
|
||||
for (int i = 0; i < new_animation.TextureCount; i++)
|
||||
{
|
||||
new_animation.AddFrame(i, frameTime);
|
||||
}
|
||||
@@ -566,13 +356,13 @@ namespace PckStudio.Forms.Editor
|
||||
if (TileName != diag.SelectedTile) isItem = diag.IsItem;
|
||||
TileName = diag.SelectedTile;
|
||||
|
||||
InterpolationCheckbox.Visible = !(TileName == "clock" || TileName == "compass");
|
||||
InterpolationCheckbox.Checked = InterpolationCheckbox.Visible;
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled = InterpolationCheckbox.Visible;
|
||||
importJavaAnimationToolStripMenuItem.Enabled = InterpolationCheckbox.Visible;
|
||||
exportJavaAnimationToolStripMenuItem.Enabled = InterpolationCheckbox.Visible;
|
||||
InterpolationCheckbox.Checked =
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled =
|
||||
importJavaAnimationToolStripMenuItem.Enabled =
|
||||
exportJavaAnimationToolStripMenuItem.Enabled =
|
||||
InterpolationCheckbox.Visible = !IsEditingSpecial;
|
||||
|
||||
foreach (JObject content in AnimationUtil.tileData[animationSection].Children())
|
||||
foreach (JObject content in AnimationResources.tileData[animationSection].Children())
|
||||
{
|
||||
var first = content.Properties().FirstOrDefault(p => p.Name == TileName);
|
||||
if (first is JProperty p) tileLabel.Text = (string)p.Value;
|
||||
@@ -584,31 +374,39 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
SaveFileDialog fileDialog = new SaveFileDialog();
|
||||
fileDialog.Title = "Please choose where you want to save your new animation";
|
||||
|
||||
fileDialog.Filter = "Animation Scripts (*.mcmeta)|*.png.mcmeta";
|
||||
fileDialog.CheckPathExists = true;
|
||||
if (fileDialog.ShowDialog(this) != DialogResult.OK) return;
|
||||
if (fileDialog.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
JObject mcmeta = ConvertAnimationToJava(currentAnimation);
|
||||
string jsondata = JsonConvert.SerializeObject(mcmeta, Formatting.Indented);
|
||||
string filename = fileDialog.FileName;
|
||||
File.WriteAllText(filename, jsondata);
|
||||
var finalTexture = currentAnimation.BuildTexture(isClockOrCompass: false);
|
||||
finalTexture.Save(Path.GetFileNameWithoutExtension(filename)); // removes ".mcmeta" from filename!
|
||||
MessageBox.Show("Animation was successfully exported to " + filename, "Export successful!");
|
||||
}
|
||||
}
|
||||
|
||||
JObject mcmeta = new JObject();
|
||||
JObject animation = new JObject();
|
||||
JArray frames = new JArray();
|
||||
currentAnimation.GetFrames().ForEach(f => {
|
||||
JObject frame = new JObject();
|
||||
frame["index"] = currentAnimation.GetFrameIndex(f.Texture);
|
||||
frame["time"] = f.Ticks;
|
||||
frames.Add(frame);
|
||||
});
|
||||
animation["interpolation"] = InterpolationCheckbox.Checked;
|
||||
animation["frames"] = frames;
|
||||
mcmeta["comment"] = "Animation converted via PCK Studio";
|
||||
mcmeta["animation"] = animation;
|
||||
File.WriteAllText(fileDialog.FileName, JsonConvert.SerializeObject(mcmeta, Formatting.Indented));
|
||||
string fn = fileDialog.FileName;
|
||||
currentAnimation.BuildTexture(this).Save(fn.Remove(fn.Length - 7));
|
||||
MessageBox.Show("Your animation was successfully exported at " + fn, "Successful export");
|
||||
}
|
||||
private JObject ConvertAnimationToJava(Animation animation)
|
||||
{
|
||||
JObject janimation = new JObject();
|
||||
JObject mcmeta = new JObject();
|
||||
mcmeta["comment"] = $"Animation converted by {ProductName}";
|
||||
mcmeta["animation"] = janimation;
|
||||
JArray jframes = new JArray();
|
||||
foreach (var frame in animation.GetFrames())
|
||||
{
|
||||
JObject jframe = new JObject();
|
||||
jframe["index"] = animation.GetTextureIndex(frame.Texture);
|
||||
jframe["time"] = frame.Ticks;
|
||||
jframes.Add(jframe);
|
||||
};
|
||||
janimation["interpolation"] = InterpolationCheckbox.Checked;
|
||||
janimation["frames"] = jframes;
|
||||
return mcmeta;
|
||||
}
|
||||
|
||||
private void howToInterpolation_Click(object sender, EventArgs e)
|
||||
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.\n\nThe \"Interpolates\" checkbox at the bottom controls this.", "Interpolation");
|
||||
}
|
||||
|
||||
76
PCK-Studio/Forms/Editor/AnimationPlayer.cs
Normal file
76
PCK-Studio/Forms/Editor/AnimationPlayer.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
// TODO: write as a UI control ??
|
||||
sealed class AnimationPlayer
|
||||
{
|
||||
public const int BaseTickSpeed = 48;
|
||||
public bool IsPlaying { get; private set; } = false;
|
||||
|
||||
private int currentAnimationFrameIndex = 0;
|
||||
private PictureBox display;
|
||||
private Animation _animation;
|
||||
private CancellationTokenSource cts = new CancellationTokenSource();
|
||||
|
||||
public AnimationPlayer(PictureBox display)
|
||||
{
|
||||
SetContext(display);
|
||||
}
|
||||
|
||||
private async void DoAnimate()
|
||||
{
|
||||
_ = display ?? throw new ArgumentNullException(nameof(display));
|
||||
_ = _animation ?? throw new ArgumentNullException(nameof(_animation));
|
||||
IsPlaying = true;
|
||||
while (!cts.IsCancellationRequested)
|
||||
{
|
||||
if (currentAnimationFrameIndex >= _animation.FrameCount)
|
||||
currentAnimationFrameIndex = 0;
|
||||
Animation.Frame frame = SetDisplayFrame(currentAnimationFrameIndex++);
|
||||
await Task.Delay(BaseTickSpeed * frame.Ticks);
|
||||
}
|
||||
IsPlaying = false;
|
||||
}
|
||||
|
||||
public void Start(Animation animation)
|
||||
{
|
||||
_animation = animation;
|
||||
cts = new CancellationTokenSource();
|
||||
Task.Run(DoAnimate, cts.Token);
|
||||
}
|
||||
|
||||
public void Stop([CallerMemberName] string callerName = default!)
|
||||
{
|
||||
Debug.WriteLine($"{nameof(AnimationPlayer.Stop)} called from {callerName}!");
|
||||
cts.Cancel();
|
||||
}
|
||||
|
||||
public Animation.Frame GetCurrentFrame() => _animation[currentAnimationFrameIndex];
|
||||
|
||||
public void SetContext(PictureBox display) => this.display = display;
|
||||
|
||||
public void SelectFrame(Animation animation, int index)
|
||||
{
|
||||
_animation = animation;
|
||||
if (IsPlaying)
|
||||
Stop();
|
||||
SetDisplayFrame(index);
|
||||
currentAnimationFrameIndex = index;
|
||||
}
|
||||
|
||||
private Animation.Frame SetDisplayFrame(int frameIndex)
|
||||
{
|
||||
Monitor.Enter(_animation);
|
||||
Animation.Frame frame = _animation[frameIndex];
|
||||
display.Image = frame.Texture;
|
||||
Monitor.Exit(_animation);
|
||||
return frame;
|
||||
}
|
||||
}
|
||||
}
|
||||
545
PCK-Studio/Forms/Editor/AudioEditor.Designer.cs
generated
545
PCK-Studio/Forms/Editor/AudioEditor.Designer.cs
generated
@@ -29,304 +29,312 @@ namespace PckStudio.Forms.Editor
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AudioEditor));
|
||||
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.addCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.changeCategoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.catImages = new System.Windows.Forms.ImageList(this.components);
|
||||
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.creditsEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.deleteUnusedBINKAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.organizeTracksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.howToAddSongsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.whatAreTheCategoriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.howToEditCreditsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.optimizeDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.bINKACompressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.treeView2 = new System.Windows.Forms.TreeView();
|
||||
this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.addEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.verifyFileLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.playOverworldInCreative = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.compressionUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.menuStrip.SuspendLayout();
|
||||
this.contextMenuStrip2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// treeView1
|
||||
//
|
||||
resources.ApplyResources(this.treeView1, "treeView1");
|
||||
this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeView1.ContextMenuStrip = this.contextMenuStrip1;
|
||||
this.treeView1.ForeColor = System.Drawing.Color.White;
|
||||
this.treeView1.ImageList = this.catImages;
|
||||
this.treeView1.LabelEdit = true;
|
||||
this.treeView1.Name = "treeView1";
|
||||
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
|
||||
this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown);
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AudioEditor));
|
||||
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.addCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.changeCategoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.catImages = new System.Windows.Forms.ImageList(this.components);
|
||||
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.creditsEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.deleteUnusedBINKAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.organizeTracksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.howToAddSongsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.whatAreTheCategoriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.howToEditCreditsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.optimizeDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.bINKACompressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.treeView2 = new System.Windows.Forms.TreeView();
|
||||
this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.addEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.verifyFileLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.playOverworldInCreative = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.compressionUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.convertToWAVToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.menuStrip.SuspendLayout();
|
||||
this.contextMenuStrip2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// treeView1
|
||||
//
|
||||
resources.ApplyResources(this.treeView1, "treeView1");
|
||||
this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeView1.ContextMenuStrip = this.contextMenuStrip1;
|
||||
this.treeView1.ForeColor = System.Drawing.Color.White;
|
||||
this.treeView1.ImageList = this.catImages;
|
||||
this.treeView1.LabelEdit = true;
|
||||
this.treeView1.Name = "treeView1";
|
||||
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
|
||||
this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown);
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addCategoryStripMenuItem,
|
||||
this.removeCategoryStripMenuItem,
|
||||
this.changeCategoryToolStripMenuItem});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1");
|
||||
//
|
||||
// addCategoryStripMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.addCategoryStripMenuItem, "addCategoryStripMenuItem");
|
||||
this.addCategoryStripMenuItem.Name = "addCategoryStripMenuItem";
|
||||
this.addCategoryStripMenuItem.Click += new System.EventHandler(this.addCategoryStripMenuItem_Click);
|
||||
//
|
||||
// removeCategoryStripMenuItem
|
||||
//
|
||||
this.removeCategoryStripMenuItem.Name = "removeCategoryStripMenuItem";
|
||||
resources.ApplyResources(this.removeCategoryStripMenuItem, "removeCategoryStripMenuItem");
|
||||
this.removeCategoryStripMenuItem.Click += new System.EventHandler(this.removeCategoryStripMenuItem_Click);
|
||||
//
|
||||
// changeCategoryToolStripMenuItem
|
||||
//
|
||||
this.changeCategoryToolStripMenuItem.Name = "changeCategoryToolStripMenuItem";
|
||||
resources.ApplyResources(this.changeCategoryToolStripMenuItem, "changeCategoryToolStripMenuItem");
|
||||
this.changeCategoryToolStripMenuItem.Click += new System.EventHandler(this.setCategoryToolStripMenuItem_Click);
|
||||
//
|
||||
// catImages
|
||||
//
|
||||
this.catImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("catImages.ImageStream")));
|
||||
this.catImages.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.catImages.Images.SetKeyName(0, "0_overworld.png");
|
||||
this.catImages.Images.SetKeyName(1, "1_nether.png");
|
||||
this.catImages.Images.SetKeyName(2, "2_end.png");
|
||||
this.catImages.Images.SetKeyName(3, "4_creative.png");
|
||||
this.catImages.Images.SetKeyName(4, "3_menu.png");
|
||||
this.catImages.Images.SetKeyName(5, "5_mg01.png");
|
||||
this.catImages.Images.SetKeyName(6, "6_mg02.png");
|
||||
this.catImages.Images.SetKeyName(7, "7_mg03.png");
|
||||
this.catImages.Images.SetKeyName(8, "8_unused.png");
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
resources.ApplyResources(this.menuStrip, "menuStrip");
|
||||
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.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1");
|
||||
//
|
||||
// addCategoryStripMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.addCategoryStripMenuItem, "addCategoryStripMenuItem");
|
||||
this.addCategoryStripMenuItem.Name = "addCategoryStripMenuItem";
|
||||
this.addCategoryStripMenuItem.Click += new System.EventHandler(this.addCategoryStripMenuItem_Click);
|
||||
//
|
||||
// removeCategoryStripMenuItem
|
||||
//
|
||||
this.removeCategoryStripMenuItem.Name = "removeCategoryStripMenuItem";
|
||||
resources.ApplyResources(this.removeCategoryStripMenuItem, "removeCategoryStripMenuItem");
|
||||
this.removeCategoryStripMenuItem.Click += new System.EventHandler(this.removeCategoryStripMenuItem_Click);
|
||||
//
|
||||
// changeCategoryToolStripMenuItem
|
||||
//
|
||||
this.changeCategoryToolStripMenuItem.Name = "changeCategoryToolStripMenuItem";
|
||||
resources.ApplyResources(this.changeCategoryToolStripMenuItem, "changeCategoryToolStripMenuItem");
|
||||
this.changeCategoryToolStripMenuItem.Click += new System.EventHandler(this.setCategoryToolStripMenuItem_Click);
|
||||
//
|
||||
// catImages
|
||||
//
|
||||
this.catImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("catImages.ImageStream")));
|
||||
this.catImages.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.catImages.Images.SetKeyName(0, "0_overworld.png");
|
||||
this.catImages.Images.SetKeyName(1, "1_nether.png");
|
||||
this.catImages.Images.SetKeyName(2, "2_end.png");
|
||||
this.catImages.Images.SetKeyName(3, "4_creative.png");
|
||||
this.catImages.Images.SetKeyName(4, "3_menu.png");
|
||||
this.catImages.Images.SetKeyName(5, "5_mg01.png");
|
||||
this.catImages.Images.SetKeyName(6, "6_mg02.png");
|
||||
this.catImages.Images.SetKeyName(7, "7_mg03.png");
|
||||
this.catImages.Images.SetKeyName(8, "8_unused.png");
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
resources.ApplyResources(this.menuStrip, "menuStrip");
|
||||
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.toolsToolStripMenuItem,
|
||||
this.helpToolStripMenuItem});
|
||||
this.menuStrip.Name = "menuStrip";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.menuStrip.Name = "menuStrip";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.saveToolStripMenuItem1});
|
||||
this.fileToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
resources.ApplyResources(this.fileToolStripMenuItem, "fileToolStripMenuItem");
|
||||
//
|
||||
// saveToolStripMenuItem1
|
||||
//
|
||||
resources.ApplyResources(this.saveToolStripMenuItem1, "saveToolStripMenuItem1");
|
||||
this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1";
|
||||
this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click);
|
||||
//
|
||||
// toolsToolStripMenuItem
|
||||
//
|
||||
this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
resources.ApplyResources(this.fileToolStripMenuItem, "fileToolStripMenuItem");
|
||||
//
|
||||
// saveToolStripMenuItem1
|
||||
//
|
||||
resources.ApplyResources(this.saveToolStripMenuItem1, "saveToolStripMenuItem1");
|
||||
this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1";
|
||||
this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click);
|
||||
//
|
||||
// toolsToolStripMenuItem
|
||||
//
|
||||
this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.creditsEditorToolStripMenuItem,
|
||||
this.deleteUnusedBINKAsToolStripMenuItem,
|
||||
this.openDataFolderToolStripMenuItem,
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem,
|
||||
this.organizeTracksToolStripMenuItem});
|
||||
this.toolsToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
|
||||
resources.ApplyResources(this.toolsToolStripMenuItem, "toolsToolStripMenuItem");
|
||||
//
|
||||
// creditsEditorToolStripMenuItem
|
||||
//
|
||||
this.creditsEditorToolStripMenuItem.Name = "creditsEditorToolStripMenuItem";
|
||||
resources.ApplyResources(this.creditsEditorToolStripMenuItem, "creditsEditorToolStripMenuItem");
|
||||
this.creditsEditorToolStripMenuItem.Click += new System.EventHandler(this.creditsEditorToolStripMenuItem_Click);
|
||||
//
|
||||
// deleteUnusedBINKAsToolStripMenuItem
|
||||
//
|
||||
this.deleteUnusedBINKAsToolStripMenuItem.Name = "deleteUnusedBINKAsToolStripMenuItem";
|
||||
resources.ApplyResources(this.deleteUnusedBINKAsToolStripMenuItem, "deleteUnusedBINKAsToolStripMenuItem");
|
||||
this.deleteUnusedBINKAsToolStripMenuItem.Click += new System.EventHandler(this.deleteUnusedBINKAsToolStripMenuItem_Click);
|
||||
//
|
||||
// openDataFolderToolStripMenuItem
|
||||
//
|
||||
this.openDataFolderToolStripMenuItem.Name = "openDataFolderToolStripMenuItem";
|
||||
resources.ApplyResources(this.openDataFolderToolStripMenuItem, "openDataFolderToolStripMenuItem");
|
||||
this.openDataFolderToolStripMenuItem.Click += new System.EventHandler(this.openDataFolderToolStripMenuItem_Click);
|
||||
//
|
||||
// bulkReplaceExistingTracksToolStripMenuItem
|
||||
//
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem.Name = "bulkReplaceExistingTracksToolStripMenuItem";
|
||||
resources.ApplyResources(this.bulkReplaceExistingTracksToolStripMenuItem, "bulkReplaceExistingTracksToolStripMenuItem");
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem.Click += new System.EventHandler(this.bulkReplaceExistingFilesToolStripMenuItem_Click);
|
||||
//
|
||||
// organizeTracksToolStripMenuItem
|
||||
//
|
||||
this.organizeTracksToolStripMenuItem.Name = "organizeTracksToolStripMenuItem";
|
||||
resources.ApplyResources(this.organizeTracksToolStripMenuItem, "organizeTracksToolStripMenuItem");
|
||||
this.organizeTracksToolStripMenuItem.Click += new System.EventHandler(this.organizeTracksToolStripMenuItem_Click);
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolsToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
|
||||
resources.ApplyResources(this.toolsToolStripMenuItem, "toolsToolStripMenuItem");
|
||||
//
|
||||
// creditsEditorToolStripMenuItem
|
||||
//
|
||||
this.creditsEditorToolStripMenuItem.Name = "creditsEditorToolStripMenuItem";
|
||||
resources.ApplyResources(this.creditsEditorToolStripMenuItem, "creditsEditorToolStripMenuItem");
|
||||
this.creditsEditorToolStripMenuItem.Click += new System.EventHandler(this.creditsEditorToolStripMenuItem_Click);
|
||||
//
|
||||
// deleteUnusedBINKAsToolStripMenuItem
|
||||
//
|
||||
this.deleteUnusedBINKAsToolStripMenuItem.Name = "deleteUnusedBINKAsToolStripMenuItem";
|
||||
resources.ApplyResources(this.deleteUnusedBINKAsToolStripMenuItem, "deleteUnusedBINKAsToolStripMenuItem");
|
||||
this.deleteUnusedBINKAsToolStripMenuItem.Click += new System.EventHandler(this.deleteUnusedBINKAsToolStripMenuItem_Click);
|
||||
//
|
||||
// openDataFolderToolStripMenuItem
|
||||
//
|
||||
this.openDataFolderToolStripMenuItem.Name = "openDataFolderToolStripMenuItem";
|
||||
resources.ApplyResources(this.openDataFolderToolStripMenuItem, "openDataFolderToolStripMenuItem");
|
||||
this.openDataFolderToolStripMenuItem.Click += new System.EventHandler(this.openDataFolderToolStripMenuItem_Click);
|
||||
//
|
||||
// bulkReplaceExistingTracksToolStripMenuItem
|
||||
//
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem.Name = "bulkReplaceExistingTracksToolStripMenuItem";
|
||||
resources.ApplyResources(this.bulkReplaceExistingTracksToolStripMenuItem, "bulkReplaceExistingTracksToolStripMenuItem");
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem.Click += new System.EventHandler(this.bulkReplaceExistingFilesToolStripMenuItem_Click);
|
||||
//
|
||||
// organizeTracksToolStripMenuItem
|
||||
//
|
||||
this.organizeTracksToolStripMenuItem.Name = "organizeTracksToolStripMenuItem";
|
||||
resources.ApplyResources(this.organizeTracksToolStripMenuItem, "organizeTracksToolStripMenuItem");
|
||||
this.organizeTracksToolStripMenuItem.Click += new System.EventHandler(this.organizeTracksToolStripMenuItem_Click);
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.howToAddSongsToolStripMenuItem,
|
||||
this.whatAreTheCategoriesToolStripMenuItem,
|
||||
this.howToEditCreditsToolStripMenuItem,
|
||||
this.optimizeDataFolderToolStripMenuItem,
|
||||
this.bINKACompressionToolStripMenuItem});
|
||||
this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem");
|
||||
//
|
||||
// howToAddSongsToolStripMenuItem
|
||||
//
|
||||
this.howToAddSongsToolStripMenuItem.Name = "howToAddSongsToolStripMenuItem";
|
||||
resources.ApplyResources(this.howToAddSongsToolStripMenuItem, "howToAddSongsToolStripMenuItem");
|
||||
this.howToAddSongsToolStripMenuItem.Click += new System.EventHandler(this.howToAddSongsToolStripMenuItem_Click);
|
||||
//
|
||||
// whatAreTheCategoriesToolStripMenuItem
|
||||
//
|
||||
this.whatAreTheCategoriesToolStripMenuItem.Name = "whatAreTheCategoriesToolStripMenuItem";
|
||||
resources.ApplyResources(this.whatAreTheCategoriesToolStripMenuItem, "whatAreTheCategoriesToolStripMenuItem");
|
||||
this.whatAreTheCategoriesToolStripMenuItem.Click += new System.EventHandler(this.whatAreTheCategoriesToolStripMenuItem_Click);
|
||||
//
|
||||
// howToEditCreditsToolStripMenuItem
|
||||
//
|
||||
this.howToEditCreditsToolStripMenuItem.Name = "howToEditCreditsToolStripMenuItem";
|
||||
resources.ApplyResources(this.howToEditCreditsToolStripMenuItem, "howToEditCreditsToolStripMenuItem");
|
||||
this.howToEditCreditsToolStripMenuItem.Click += new System.EventHandler(this.howToEditCreditsToolStripMenuItem_Click);
|
||||
//
|
||||
// optimizeDataFolderToolStripMenuItem
|
||||
//
|
||||
this.optimizeDataFolderToolStripMenuItem.Name = "optimizeDataFolderToolStripMenuItem";
|
||||
resources.ApplyResources(this.optimizeDataFolderToolStripMenuItem, "optimizeDataFolderToolStripMenuItem");
|
||||
this.optimizeDataFolderToolStripMenuItem.Click += new System.EventHandler(this.optimizeDataFolderToolStripMenuItem_Click);
|
||||
//
|
||||
// bINKACompressionToolStripMenuItem
|
||||
//
|
||||
this.bINKACompressionToolStripMenuItem.Name = "bINKACompressionToolStripMenuItem";
|
||||
resources.ApplyResources(this.bINKACompressionToolStripMenuItem, "bINKACompressionToolStripMenuItem");
|
||||
this.bINKACompressionToolStripMenuItem.Click += new System.EventHandler(this.BINKACompressionToolStripMenuItem_Click);
|
||||
//
|
||||
// treeView2
|
||||
//
|
||||
this.treeView2.AllowDrop = true;
|
||||
resources.ApplyResources(this.treeView2, "treeView2");
|
||||
this.treeView2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeView2.ContextMenuStrip = this.contextMenuStrip2;
|
||||
this.treeView2.ForeColor = System.Drawing.Color.White;
|
||||
this.treeView2.Name = "treeView2";
|
||||
this.treeView2.DragDrop += new System.Windows.Forms.DragEventHandler(this.Binka_DragDrop);
|
||||
this.treeView2.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeView2_DragEnter);
|
||||
this.treeView2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView2_KeyDown);
|
||||
//
|
||||
// contextMenuStrip2
|
||||
//
|
||||
this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem");
|
||||
//
|
||||
// howToAddSongsToolStripMenuItem
|
||||
//
|
||||
this.howToAddSongsToolStripMenuItem.Name = "howToAddSongsToolStripMenuItem";
|
||||
resources.ApplyResources(this.howToAddSongsToolStripMenuItem, "howToAddSongsToolStripMenuItem");
|
||||
this.howToAddSongsToolStripMenuItem.Click += new System.EventHandler(this.howToAddSongsToolStripMenuItem_Click);
|
||||
//
|
||||
// whatAreTheCategoriesToolStripMenuItem
|
||||
//
|
||||
this.whatAreTheCategoriesToolStripMenuItem.Name = "whatAreTheCategoriesToolStripMenuItem";
|
||||
resources.ApplyResources(this.whatAreTheCategoriesToolStripMenuItem, "whatAreTheCategoriesToolStripMenuItem");
|
||||
this.whatAreTheCategoriesToolStripMenuItem.Click += new System.EventHandler(this.whatAreTheCategoriesToolStripMenuItem_Click);
|
||||
//
|
||||
// howToEditCreditsToolStripMenuItem
|
||||
//
|
||||
this.howToEditCreditsToolStripMenuItem.Name = "howToEditCreditsToolStripMenuItem";
|
||||
resources.ApplyResources(this.howToEditCreditsToolStripMenuItem, "howToEditCreditsToolStripMenuItem");
|
||||
this.howToEditCreditsToolStripMenuItem.Click += new System.EventHandler(this.howToEditCreditsToolStripMenuItem_Click);
|
||||
//
|
||||
// optimizeDataFolderToolStripMenuItem
|
||||
//
|
||||
this.optimizeDataFolderToolStripMenuItem.Name = "optimizeDataFolderToolStripMenuItem";
|
||||
resources.ApplyResources(this.optimizeDataFolderToolStripMenuItem, "optimizeDataFolderToolStripMenuItem");
|
||||
this.optimizeDataFolderToolStripMenuItem.Click += new System.EventHandler(this.optimizeDataFolderToolStripMenuItem_Click);
|
||||
//
|
||||
// bINKACompressionToolStripMenuItem
|
||||
//
|
||||
this.bINKACompressionToolStripMenuItem.Name = "bINKACompressionToolStripMenuItem";
|
||||
resources.ApplyResources(this.bINKACompressionToolStripMenuItem, "bINKACompressionToolStripMenuItem");
|
||||
this.bINKACompressionToolStripMenuItem.Click += new System.EventHandler(this.BINKACompressionToolStripMenuItem_Click);
|
||||
//
|
||||
// treeView2
|
||||
//
|
||||
this.treeView2.AllowDrop = true;
|
||||
resources.ApplyResources(this.treeView2, "treeView2");
|
||||
this.treeView2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeView2.ContextMenuStrip = this.contextMenuStrip2;
|
||||
this.treeView2.ForeColor = System.Drawing.Color.White;
|
||||
this.treeView2.Name = "treeView2";
|
||||
this.treeView2.DragDrop += new System.Windows.Forms.DragEventHandler(this.Binka_DragDrop);
|
||||
this.treeView2.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeView2_DragEnter);
|
||||
this.treeView2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView2_KeyDown);
|
||||
//
|
||||
// contextMenuStrip2
|
||||
//
|
||||
this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addEntryMenuItem,
|
||||
this.removeEntryMenuItem,
|
||||
this.verifyFileLocationToolStripMenuItem});
|
||||
this.contextMenuStrip2.Name = "contextMenuStrip1";
|
||||
resources.ApplyResources(this.contextMenuStrip2, "contextMenuStrip2");
|
||||
//
|
||||
// addEntryMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.addEntryMenuItem, "addEntryMenuItem");
|
||||
this.addEntryMenuItem.Name = "addEntryMenuItem";
|
||||
this.addEntryMenuItem.Click += new System.EventHandler(this.addEntryMenuItem_Click);
|
||||
//
|
||||
// removeEntryMenuItem
|
||||
//
|
||||
this.removeEntryMenuItem.Name = "removeEntryMenuItem";
|
||||
resources.ApplyResources(this.removeEntryMenuItem, "removeEntryMenuItem");
|
||||
this.removeEntryMenuItem.Click += new System.EventHandler(this.removeEntryMenuItem_Click);
|
||||
//
|
||||
// verifyFileLocationToolStripMenuItem
|
||||
//
|
||||
this.verifyFileLocationToolStripMenuItem.Name = "verifyFileLocationToolStripMenuItem";
|
||||
resources.ApplyResources(this.verifyFileLocationToolStripMenuItem, "verifyFileLocationToolStripMenuItem");
|
||||
this.verifyFileLocationToolStripMenuItem.Click += new System.EventHandler(this.verifyFileLocationToolStripMenuItem_Click);
|
||||
//
|
||||
// playOverworldInCreative
|
||||
//
|
||||
resources.ApplyResources(this.playOverworldInCreative, "playOverworldInCreative");
|
||||
this.playOverworldInCreative.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.playOverworldInCreative.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.playOverworldInCreative.Name = "playOverworldInCreative";
|
||||
this.playOverworldInCreative.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.playOverworldInCreative.UseCustomBackColor = true;
|
||||
this.playOverworldInCreative.UseCustomForeColor = true;
|
||||
this.playOverworldInCreative.UseSelectable = true;
|
||||
//
|
||||
// compressionUpDown
|
||||
//
|
||||
this.compressionUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.compressionUpDown.ForeColor = System.Drawing.SystemColors.Window;
|
||||
resources.ApplyResources(this.compressionUpDown, "compressionUpDown");
|
||||
this.compressionUpDown.Maximum = new decimal(new int[] {
|
||||
this.verifyFileLocationToolStripMenuItem,
|
||||
this.convertToWAVToolStripMenuItem});
|
||||
this.contextMenuStrip2.Name = "contextMenuStrip1";
|
||||
resources.ApplyResources(this.contextMenuStrip2, "contextMenuStrip2");
|
||||
//
|
||||
// addEntryMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.addEntryMenuItem, "addEntryMenuItem");
|
||||
this.addEntryMenuItem.Name = "addEntryMenuItem";
|
||||
this.addEntryMenuItem.Click += new System.EventHandler(this.addEntryMenuItem_Click);
|
||||
//
|
||||
// removeEntryMenuItem
|
||||
//
|
||||
this.removeEntryMenuItem.Name = "removeEntryMenuItem";
|
||||
resources.ApplyResources(this.removeEntryMenuItem, "removeEntryMenuItem");
|
||||
this.removeEntryMenuItem.Click += new System.EventHandler(this.removeEntryMenuItem_Click);
|
||||
//
|
||||
// verifyFileLocationToolStripMenuItem
|
||||
//
|
||||
this.verifyFileLocationToolStripMenuItem.Name = "verifyFileLocationToolStripMenuItem";
|
||||
resources.ApplyResources(this.verifyFileLocationToolStripMenuItem, "verifyFileLocationToolStripMenuItem");
|
||||
this.verifyFileLocationToolStripMenuItem.Click += new System.EventHandler(this.verifyFileLocationToolStripMenuItem_Click);
|
||||
//
|
||||
// playOverworldInCreative
|
||||
//
|
||||
resources.ApplyResources(this.playOverworldInCreative, "playOverworldInCreative");
|
||||
this.playOverworldInCreative.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.playOverworldInCreative.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.playOverworldInCreative.Name = "playOverworldInCreative";
|
||||
this.playOverworldInCreative.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.playOverworldInCreative.UseCustomBackColor = true;
|
||||
this.playOverworldInCreative.UseCustomForeColor = true;
|
||||
this.playOverworldInCreative.UseSelectable = true;
|
||||
//
|
||||
// compressionUpDown
|
||||
//
|
||||
this.compressionUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.compressionUpDown.ForeColor = System.Drawing.SystemColors.Window;
|
||||
resources.ApplyResources(this.compressionUpDown, "compressionUpDown");
|
||||
this.compressionUpDown.Maximum = new decimal(new int[] {
|
||||
9,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.compressionUpDown.Minimum = new decimal(new int[] {
|
||||
this.compressionUpDown.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.compressionUpDown.Name = "compressionUpDown";
|
||||
this.compressionUpDown.Value = new decimal(new int[] {
|
||||
this.compressionUpDown.Name = "compressionUpDown";
|
||||
this.compressionUpDown.Value = new decimal(new int[] {
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
resources.ApplyResources(this.metroLabel1, "metroLabel1");
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// AudioEditor
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Controls.Add(this.compressionUpDown);
|
||||
this.Controls.Add(this.playOverworldInCreative);
|
||||
this.Controls.Add(this.treeView1);
|
||||
this.Controls.Add(this.treeView2);
|
||||
this.Controls.Add(this.menuStrip);
|
||||
this.Name = "AudioEditor";
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AudioEditor_FormClosed);
|
||||
this.Shown += new System.EventHandler(this.AudioEditor_Shown);
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.menuStrip.ResumeLayout(false);
|
||||
this.menuStrip.PerformLayout();
|
||||
this.contextMenuStrip2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
resources.ApplyResources(this.metroLabel1, "metroLabel1");
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// convertToWAVToolStripMenuItem
|
||||
//
|
||||
this.convertToWAVToolStripMenuItem.Name = "convertToWAVToolStripMenuItem";
|
||||
resources.ApplyResources(this.convertToWAVToolStripMenuItem, "convertToWAVToolStripMenuItem");
|
||||
this.convertToWAVToolStripMenuItem.Click += new System.EventHandler(this.convertToWAVToolStripMenuItem_Click);
|
||||
//
|
||||
// AudioEditor
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Controls.Add(this.compressionUpDown);
|
||||
this.Controls.Add(this.playOverworldInCreative);
|
||||
this.Controls.Add(this.treeView1);
|
||||
this.Controls.Add(this.treeView2);
|
||||
this.Controls.Add(this.menuStrip);
|
||||
this.Name = "AudioEditor";
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AudioEditor_FormClosed);
|
||||
this.Shown += new System.EventHandler(this.AudioEditor_Shown);
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.menuStrip.ResumeLayout(false);
|
||||
this.menuStrip.PerformLayout();
|
||||
this.contextMenuStrip2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -361,5 +369,6 @@ namespace PckStudio.Forms.Editor
|
||||
private System.Windows.Forms.ToolStripMenuItem bulkReplaceExistingTracksToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem changeCategoryToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem organizeTracksToolStripMenuItem;
|
||||
}
|
||||
private System.Windows.Forms.ToolStripMenuItem convertToWAVToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace PckStudio.Forms.Editor
|
||||
public partial class AudioEditor : MetroForm
|
||||
{
|
||||
public string defaultType = "yes";
|
||||
PCKAudioFile audioFile = null;
|
||||
PckAudioFile audioFile = null;
|
||||
PckFile.FileData audioPCK;
|
||||
LOCFile loc;
|
||||
bool _isLittleEndian = false;
|
||||
@@ -44,15 +44,15 @@ namespace PckStudio.Forms.Editor
|
||||
"Unused?"
|
||||
};
|
||||
|
||||
private string GetCategoryFromId(PCKAudioFile.AudioCategory.EAudioType categoryId)
|
||||
=> categoryId >= PCKAudioFile.AudioCategory.EAudioType.Overworld &&
|
||||
categoryId <= PCKAudioFile.AudioCategory.EAudioType.Unused
|
||||
private string GetCategoryFromId(PckAudioFile.AudioCategory.EAudioType categoryId)
|
||||
=> categoryId >= PckAudioFile.AudioCategory.EAudioType.Overworld &&
|
||||
categoryId <= PckAudioFile.AudioCategory.EAudioType.Unused
|
||||
? Categories[(int)categoryId]
|
||||
: "Not valid";
|
||||
|
||||
private PCKAudioFile.AudioCategory.EAudioType GetCategoryId(string category)
|
||||
private PckAudioFile.AudioCategory.EAudioType GetCategoryId(string category)
|
||||
{
|
||||
return (PCKAudioFile.AudioCategory.EAudioType)Categories.IndexOf(category);
|
||||
return (PckAudioFile.AudioCategory.EAudioType)Categories.IndexOf(category);
|
||||
}
|
||||
|
||||
public AudioEditor(PckFile.FileData file, LOCFile locFile, bool isLittleEndian)
|
||||
@@ -64,7 +64,8 @@ namespace PckStudio.Forms.Editor
|
||||
audioPCK = file;
|
||||
using (var stream = new MemoryStream(file.Data))
|
||||
{
|
||||
audioFile = PCKAudioFileReader.Read(stream, isLittleEndian);
|
||||
var reader = new PckAudioFileReader(isLittleEndian ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
audioFile = reader.FromStream(stream);
|
||||
}
|
||||
|
||||
SetUpTree();
|
||||
@@ -76,10 +77,10 @@ namespace PckStudio.Forms.Editor
|
||||
treeView1.Nodes.Clear();
|
||||
foreach (var category in audioFile.Categories)
|
||||
{
|
||||
if(category.audioType == PCKAudioFile.AudioCategory.EAudioType.Creative)
|
||||
if(category.audioType == PckAudioFile.AudioCategory.EAudioType.Creative)
|
||||
{
|
||||
if (category.Name == "include_overworld" &&
|
||||
audioFile.TryGetCategory(PCKAudioFile.AudioCategory.EAudioType.Overworld, out PCKAudioFile.AudioCategory overworldCategory))
|
||||
audioFile.TryGetCategory(PckAudioFile.AudioCategory.EAudioType.Overworld, out PckAudioFile.AudioCategory overworldCategory))
|
||||
{
|
||||
foreach (var name in category.SongNames.ToList())
|
||||
{
|
||||
@@ -95,7 +96,7 @@ namespace PckStudio.Forms.Editor
|
||||
treeNode.Tag = category;
|
||||
treeView1.Nodes.Add(treeNode);
|
||||
}
|
||||
playOverworldInCreative.Enabled = audioFile.HasCategory(PCKAudioFile.AudioCategory.EAudioType.Creative);
|
||||
playOverworldInCreative.Enabled = audioFile.HasCategory(PckAudioFile.AudioCategory.EAudioType.Creative);
|
||||
treeView1.EndUpdate();
|
||||
}
|
||||
|
||||
@@ -120,7 +121,7 @@ namespace PckStudio.Forms.Editor
|
||||
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
treeView2.Nodes.Clear();
|
||||
if (e.Node.Tag is PCKAudioFile.AudioCategory category)
|
||||
if (e.Node.Tag is PckAudioFile.AudioCategory category)
|
||||
foreach (var name in category.SongNames)
|
||||
{
|
||||
treeView2.Nodes.Add(name);
|
||||
@@ -140,7 +141,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
var category = audioFile.GetCategory(GetCategoryId(add.SelectedItem));
|
||||
|
||||
if (GetCategoryId(add.SelectedItem) == PCKAudioFile.AudioCategory.EAudioType.Creative)
|
||||
if (GetCategoryId(add.SelectedItem) == PckAudioFile.AudioCategory.EAudioType.Creative)
|
||||
{
|
||||
playOverworldInCreative.Visible = true;
|
||||
playOverworldInCreative.Checked = false;
|
||||
@@ -160,7 +161,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void addEntryMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (treeView1.SelectedNode is TreeNode t && t.Tag is PCKAudioFile.AudioCategory)
|
||||
if (treeView1.SelectedNode is TreeNode t && t.Tag is PckAudioFile.AudioCategory)
|
||||
{
|
||||
if (!parent.CreateDataFolder()) return;
|
||||
|
||||
@@ -181,7 +182,7 @@ namespace PckStudio.Forms.Editor
|
||||
if (treeView1.SelectedNode is TreeNode main &&
|
||||
audioFile.RemoveCategory(GetCategoryId(treeView1.SelectedNode.Text)))
|
||||
{
|
||||
if(GetCategoryId(treeView1.SelectedNode.Text) == PCKAudioFile.AudioCategory.EAudioType.Creative)
|
||||
if(GetCategoryId(treeView1.SelectedNode.Text) == PckAudioFile.AudioCategory.EAudioType.Creative)
|
||||
{
|
||||
playOverworldInCreative.Visible = false;
|
||||
playOverworldInCreative.Checked = false;
|
||||
@@ -205,7 +206,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void removeEntryMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (treeView2.SelectedNode != null && treeView1.SelectedNode.Tag is PCKAudioFile.AudioCategory category)
|
||||
if (treeView2.SelectedNode != null && treeView1.SelectedNode.Tag is PckAudioFile.AudioCategory category)
|
||||
{
|
||||
category.SongNames.Remove(treeView2.SelectedNode.Text);
|
||||
treeView2.SelectedNode.Remove();
|
||||
@@ -260,7 +261,7 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
else if (user_prompt == DialogResult.No)
|
||||
{
|
||||
if (treeView1.SelectedNode is TreeNode node && node.Tag is PCKAudioFile.AudioCategory cat)
|
||||
if (treeView1.SelectedNode is TreeNode node && node.Tag is PckAudioFile.AudioCategory cat)
|
||||
{
|
||||
//adds song without affecting the binka file
|
||||
cat.SongNames.Add(songName);
|
||||
@@ -317,7 +318,7 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
|
||||
// this is repeated again becuase this is meant to prevent any files that fail to convert from being added to the category
|
||||
if (treeView1.SelectedNode is TreeNode t && t.Tag is PCKAudioFile.AudioCategory category)
|
||||
if (treeView1.SelectedNode is TreeNode t && t.Tag is PckAudioFile.AudioCategory category)
|
||||
{
|
||||
category.SongNames.Add(songName);
|
||||
treeView2.Nodes.Add(songName);
|
||||
@@ -344,15 +345,15 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void saveToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!audioFile.HasCategory(PCKAudioFile.AudioCategory.EAudioType.Overworld) ||
|
||||
!audioFile.HasCategory(PCKAudioFile.AudioCategory.EAudioType.Nether) ||
|
||||
!audioFile.HasCategory(PCKAudioFile.AudioCategory.EAudioType.End))
|
||||
if (!audioFile.HasCategory(PckAudioFile.AudioCategory.EAudioType.Overworld) ||
|
||||
!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");
|
||||
return;
|
||||
}
|
||||
|
||||
PCKAudioFile.AudioCategory overworldCategory = audioFile.GetCategory(PCKAudioFile.AudioCategory.EAudioType.Overworld);
|
||||
PckAudioFile.AudioCategory overworldCategory = audioFile.GetCategory(PckAudioFile.AudioCategory.EAudioType.Overworld);
|
||||
|
||||
bool songs_missing = false;
|
||||
foreach (var category in audioFile.Categories)
|
||||
@@ -374,7 +375,7 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
|
||||
category.Name = "";
|
||||
if (playOverworldInCreative.Checked && category.audioType == PCKAudioFile.AudioCategory.EAudioType.Creative)
|
||||
if (playOverworldInCreative.Checked && category.audioType == PckAudioFile.AudioCategory.EAudioType.Creative)
|
||||
{
|
||||
foreach (var name in overworldCategory.SongNames)
|
||||
{
|
||||
@@ -396,7 +397,8 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
PCKAudioFileWriter.Write(stream, audioFile, _isLittleEndian);
|
||||
var writer = new PckAudioFileWriter(audioFile, _isLittleEndian ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
writer.WriteToStream(stream);
|
||||
audioPCK.SetData(stream.ToArray());
|
||||
}
|
||||
DialogResult = DialogResult.OK;
|
||||
@@ -560,7 +562,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void convertToWAVToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (treeView2.SelectedNode != null && treeView1.SelectedNode.Tag is PCKAudioFile.AudioCategory)
|
||||
if (treeView2.SelectedNode != null && treeView1.SelectedNode.Tag is PckAudioFile.AudioCategory)
|
||||
{
|
||||
Binka.ToWav(Path.Combine(parent.GetDataPath(), treeView2.SelectedNode.Text + ".binka"), Path.Combine(parent.GetDataPath()));
|
||||
}
|
||||
@@ -568,7 +570,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void setCategoryToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!(treeView1.SelectedNode is TreeNode t && t.Tag is PCKAudioFile.AudioCategory category)) return;
|
||||
if (!(treeView1.SelectedNode is TreeNode t && t.Tag is PckAudioFile.AudioCategory category)) return;
|
||||
|
||||
string[] available = Categories.FindAll(str => !audioFile.HasCategory(GetCategoryId(str))).ToArray();
|
||||
if (available.Length > 0)
|
||||
@@ -579,7 +581,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
audioFile.RemoveCategory(category.audioType);
|
||||
|
||||
audioFile.AddCategory(category.parameterType, GetCategoryId(add.SelectedItem), category.audioType == PCKAudioFile.AudioCategory.EAudioType.Overworld && playOverworldInCreative.Checked ? "include_overworld" : "");
|
||||
audioFile.AddCategory(category.parameterType, GetCategoryId(add.SelectedItem), category.audioType == PckAudioFile.AudioCategory.EAudioType.Overworld && playOverworldInCreative.Checked ? "include_overworld" : "");
|
||||
|
||||
var newCategory = audioFile.GetCategory(GetCategoryId(add.SelectedItem));
|
||||
|
||||
|
||||
@@ -125,32 +125,6 @@
|
||||
<value>127, 8</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="addCategoryStripMenuItem.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="addCategoryStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 22</value>
|
||||
</data>
|
||||
<data name="addCategoryStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Add Category</value>
|
||||
</data>
|
||||
<data name="removeCategoryStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 22</value>
|
||||
</data>
|
||||
<data name="removeCategoryStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Remove Category</value>
|
||||
</data>
|
||||
<data name="changeCategoryToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 22</value>
|
||||
</data>
|
||||
<data name="changeCategoryToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Set Category</value>
|
||||
</data>
|
||||
<data name="contextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>169, 70</value>
|
||||
</data>
|
||||
@@ -172,7 +146,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADk
|
||||
MAAAAk1TRnQBSQFMAgEBCQEAAaABAAGgAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
||||
MAAAAk1TRnQBSQFMAgEBCQEAAagBAAGoAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
||||
AwABMAMAAQEBAAEgBgABMBIAAzgB/wM1Af8DNQH/AzMB/wMwAf8DLwH/Ay0B/wMtAf8DJAH/AzsB/wM4
|
||||
Af8DNQH/Ay0B/wMnAf8DNgH/AzIB/8AAAzgB/wN/Af8DeQH/A3kB/wN5Af8DcQH/A3EB/wN5Af8DeQH/
|
||||
A3EB/wNxAf8DcQH/A3kB/wN5Af8DfwH/AzIB/8AAAzIB/wN2Af8DsAH/A7AB/wOvAf8DrwH/A68B/wOo
|
||||
@@ -410,12 +384,68 @@
|
||||
<data name=">>treeView1.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="addCategoryStripMenuItem.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="addCategoryStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 22</value>
|
||||
</data>
|
||||
<data name="addCategoryStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Add Category</value>
|
||||
</data>
|
||||
<data name="removeCategoryStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 22</value>
|
||||
</data>
|
||||
<data name="removeCategoryStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Remove Category</value>
|
||||
</data>
|
||||
<data name="changeCategoryToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 22</value>
|
||||
</data>
|
||||
<data name="changeCategoryToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Set Category</value>
|
||||
</data>
|
||||
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>19, 8</value>
|
||||
</metadata>
|
||||
<data name="menuStrip.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="menuStrip.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 60</value>
|
||||
</data>
|
||||
<data name="menuStrip.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>410, 24</value>
|
||||
</data>
|
||||
<data name="menuStrip.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="menuStrip.Text" xml:space="preserve">
|
||||
<value>menuStrip1</value>
|
||||
</data>
|
||||
<data name=">>menuStrip.Name" xml:space="preserve">
|
||||
<value>menuStrip</value>
|
||||
</data>
|
||||
<data name=">>menuStrip.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuStrip.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>menuStrip.ZOrder" xml:space="preserve">
|
||||
<value>7</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
|
||||
@@ -432,11 +462,11 @@
|
||||
<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 name="toolsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>46, 20</value>
|
||||
</data>
|
||||
<data name="fileToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>File</value>
|
||||
<data name="toolsToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Tools</value>
|
||||
</data>
|
||||
<data name="creditsEditorToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>220, 22</value>
|
||||
@@ -468,11 +498,11 @@
|
||||
<data name="organizeTracksToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Organize Tracks</value>
|
||||
</data>
|
||||
<data name="toolsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>46, 20</value>
|
||||
<data name="helpToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>44, 20</value>
|
||||
</data>
|
||||
<data name="toolsToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Tools</value>
|
||||
<data name="helpToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Help</value>
|
||||
</data>
|
||||
<data name="howToAddSongsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
@@ -504,36 +534,6 @@
|
||||
<data name="bINKACompressionToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>BINKA Compression</value>
|
||||
</data>
|
||||
<data name="helpToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>44, 20</value>
|
||||
</data>
|
||||
<data name="helpToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Help</value>
|
||||
</data>
|
||||
<data name="menuStrip.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 60</value>
|
||||
</data>
|
||||
<data name="menuStrip.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>410, 24</value>
|
||||
</data>
|
||||
<data name="menuStrip.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="menuStrip.Text" xml:space="preserve">
|
||||
<value>menuStrip1</value>
|
||||
</data>
|
||||
<data name=">>menuStrip.Name" xml:space="preserve">
|
||||
<value>menuStrip</value>
|
||||
</data>
|
||||
<data name=">>menuStrip.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuStrip.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>menuStrip.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="treeView2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Bottom, Left, Right</value>
|
||||
</data>
|
||||
@@ -549,25 +549,31 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="addEntryMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>173, 22</value>
|
||||
<value>180, 22</value>
|
||||
</data>
|
||||
<data name="addEntryMenuItem.Text" xml:space="preserve">
|
||||
<value>Add Entry</value>
|
||||
</data>
|
||||
<data name="removeEntryMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>173, 22</value>
|
||||
<value>180, 22</value>
|
||||
</data>
|
||||
<data name="removeEntryMenuItem.Text" xml:space="preserve">
|
||||
<value>Remove Entry</value>
|
||||
</data>
|
||||
<data name="verifyFileLocationToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>173, 22</value>
|
||||
<value>180, 22</value>
|
||||
</data>
|
||||
<data name="verifyFileLocationToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Verify File Location</value>
|
||||
</data>
|
||||
<data name="convertToWAVToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
</data>
|
||||
<data name="convertToWAVToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Convert To WAV</value>
|
||||
</data>
|
||||
<data name="contextMenuStrip2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>174, 70</value>
|
||||
<value>181, 114</value>
|
||||
</data>
|
||||
<data name=">>contextMenuStrip2.Name" xml:space="preserve">
|
||||
<value>contextMenuStrip2</value>
|
||||
@@ -821,6 +827,12 @@
|
||||
<data name=">>verifyFileLocationToolStripMenuItem.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=">>convertToWAVToolStripMenuItem.Name" xml:space="preserve">
|
||||
<value>convertToWAVToolStripMenuItem</value>
|
||||
</data>
|
||||
<data name=">>convertToWAVToolStripMenuItem.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=">>$this.Name" xml:space="preserve">
|
||||
<value>AudioEditor</value>
|
||||
</data>
|
||||
|
||||
@@ -28,13 +28,13 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
TreeNode EntryNode = new TreeNode(entry.name);
|
||||
|
||||
foreach (JObject content in Utilities.BehaviourUtil.entityData["entities"].Children())
|
||||
foreach (JObject content in Utilities.BehaviourResources.entityData["behaviours"].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == entry.name);
|
||||
if (prop is JProperty)
|
||||
{
|
||||
EntryNode.Text = (string)prop.Value;
|
||||
EntryNode.ImageIndex = Utilities.BehaviourUtil.entityData["entities"].Children().ToList().IndexOf(content);
|
||||
EntryNode.ImageIndex = Utilities.BehaviourResources.entityData["behaviours"].Children().ToList().IndexOf(content);
|
||||
EntryNode.SelectedImageIndex = EntryNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
|
||||
treeView1.ImageList = new ImageList();
|
||||
treeView1.ImageList.Images.AddRange(Utilities.BehaviourUtil.entityImages);
|
||||
treeView1.ImageList.Images.AddRange(Utilities.BehaviourResources.entityImages);
|
||||
treeView1.ImageList.ColorDepth = ColorDepth.Depth32Bit;
|
||||
SetUpTree();
|
||||
}
|
||||
@@ -149,7 +149,7 @@ namespace PckStudio.Forms.Editor
|
||||
if (treeView1.SelectedNode == null) return;
|
||||
if (!(treeView1.SelectedNode.Tag is BehaviourFile.RiderPositionOverride entry)) return;
|
||||
|
||||
var diag = new Additional_Popups.EntityForms.AddEntry(Utilities.BehaviourUtil.entityData, Utilities.BehaviourUtil.entityImages);
|
||||
var diag = new Additional_Popups.EntityForms.AddEntry(Utilities.BehaviourResources.entityData, Utilities.BehaviourResources.entityImages);
|
||||
diag.acceptBtn.Text = "Save";
|
||||
|
||||
if (diag.ShowDialog() == DialogResult.OK)
|
||||
@@ -164,13 +164,13 @@ namespace PckStudio.Forms.Editor
|
||||
entry.name = diag.SelectedEntity;
|
||||
treeView1.SelectedNode.Tag = entry;
|
||||
|
||||
foreach (JObject content in Utilities.BehaviourUtil.entityData["entities"].Children())
|
||||
foreach (JObject content in Utilities.BehaviourResources.entityData["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 = Utilities.BehaviourUtil.entityData["entities"].Children().ToList().IndexOf(content);
|
||||
treeView1.SelectedNode.ImageIndex = Utilities.BehaviourResources.entityData["behaviours"].Children().ToList().IndexOf(content);
|
||||
treeView1.SelectedNode.SelectedImageIndex = treeView1.SelectedNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
@@ -203,7 +203,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void addNewEntryToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var diag = new AddEntry(Utilities.BehaviourUtil.entityData, Utilities.BehaviourUtil.entityImages);
|
||||
var diag = new AddEntry(Utilities.BehaviourResources.entityData, Utilities.BehaviourResources.entityImages);
|
||||
|
||||
if(diag.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
@@ -217,13 +217,13 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
TreeNode NewOverrideNode = new TreeNode(NewOverride.name);
|
||||
NewOverrideNode.Tag = NewOverride;
|
||||
foreach (JObject content in Utilities.BehaviourUtil.entityData["entities"].Children())
|
||||
foreach (JObject content in Utilities.BehaviourResources.entityData["behaviours"].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == NewOverride.name);
|
||||
if (prop is JProperty)
|
||||
{
|
||||
NewOverrideNode.Text = (string)prop.Value;
|
||||
NewOverrideNode.ImageIndex = Utilities.BehaviourUtil.entityData["entities"].Children().ToList().IndexOf(content);
|
||||
NewOverrideNode.ImageIndex = Utilities.BehaviourResources.entityData["behaviours"].Children().ToList().IndexOf(content);
|
||||
NewOverrideNode.SelectedImageIndex = NewOverrideNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PckStudio.Forms.Utilities.Skins
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
partial class BoxEditor
|
||||
{
|
||||
52
PCK-Studio/Forms/Editor/BoxEditor.cs
Normal file
52
PCK-Studio/Forms/Editor/BoxEditor.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using PckStudio.Classes.Models;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
public partial class BoxEditor : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
public string Result;
|
||||
|
||||
public BoxEditor(string inBOX, bool hasInflation)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
inflationUpDown.Enabled = hasInflation;
|
||||
|
||||
SkinBox box = new SkinBox(inBOX);
|
||||
|
||||
if (string.IsNullOrEmpty(box.Type) || !parentComboBox.Items.Contains(box.Type))
|
||||
{
|
||||
throw new Exception("Failed to parse BOX value");
|
||||
}
|
||||
|
||||
parentComboBox.SelectedItem = parentComboBox.Items[parentComboBox.Items.IndexOf(box.Type)];
|
||||
PosXUpDown.Value = (decimal)box.Pos.X;
|
||||
PosYUpDown.Value = (decimal)box.Pos.Y;
|
||||
PosZUpDown.Value = (decimal)box.Pos.Z;
|
||||
SizeXUpDown.Value = (decimal)box.Size.X;
|
||||
SizeYUpDown.Value = (decimal)box.Size.Y;
|
||||
SizeZUpDown.Value = (decimal)box.Size.Z;
|
||||
uvXUpDown.Value = (decimal)box.U;
|
||||
uvYUpDown.Value = (decimal)box.V;
|
||||
armorCheckBox.Checked = box.HideWithArmor;
|
||||
mirrorCheckBox.Checked = box.Mirror;
|
||||
inflationUpDown.Value = (decimal)box.Scale;
|
||||
}
|
||||
|
||||
private void saveButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Result =
|
||||
$"{parentComboBox.SelectedItem} " +
|
||||
$"{PosXUpDown.Value} {PosYUpDown.Value} {PosZUpDown.Value} " +
|
||||
$"{SizeXUpDown.Value} {SizeYUpDown.Value} {SizeZUpDown.Value} " +
|
||||
$"{uvXUpDown.Value} {uvYUpDown.Value} " +
|
||||
$"{Convert.ToInt32(armorCheckBox.Checked)} " +
|
||||
$"{Convert.ToInt32(mirrorCheckBox.Checked)} " +
|
||||
$"{inflationUpDown.Value}";
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
4
PCK-Studio/Forms/Editor/LOCEditor.Designer.cs
generated
4
PCK-Studio/Forms/Editor/LOCEditor.Designer.cs
generated
@@ -40,7 +40,7 @@
|
||||
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.locSort = new PckStudio.Forms.MyTablePanel();
|
||||
this.locSort = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.buttonReplaceAll = new System.Windows.Forms.Button();
|
||||
this.dataGridViewLocEntryData = new System.Windows.Forms.DataGridView();
|
||||
this.textBoxReplaceAll = new System.Windows.Forms.TextBox();
|
||||
@@ -202,7 +202,7 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem addDisplayIDToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem deleteDisplayIDToolStripMenuItem;
|
||||
private System.Windows.Forms.TextBox textBoxReplaceAll;
|
||||
private PckStudio.Forms.MyTablePanel locSort;
|
||||
private System.Windows.Forms.TableLayoutPanel locSort;
|
||||
private System.Windows.Forms.Button buttonReplaceAll;
|
||||
private MetroFramework.Controls.MetroContextMenu GridContextMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem addLanguageToolStripMenuItem;
|
||||
|
||||
@@ -143,7 +143,8 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
LOCFileWriter.Write(ms, currentLoc);
|
||||
var writer = new LOCFileWriter(currentLoc, 2);
|
||||
writer.WriteToStream(ms);
|
||||
_file.SetData(ms.ToArray());
|
||||
}
|
||||
DialogResult = DialogResult.OK;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
public partial class MaterialsEditor : MetroForm
|
||||
{
|
||||
// Behaviours File Format research by Miku and MattNL
|
||||
// Materials File Format research by PhoenixARC
|
||||
private readonly PckFile.FileData _file;
|
||||
MaterialContainer materialFile;
|
||||
|
||||
@@ -27,13 +27,13 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
TreeNode EntryNode = new TreeNode(entry.Name);
|
||||
|
||||
foreach (JObject content in Utilities.MaterialUtil.entityData["entities"].Children())
|
||||
foreach (JObject content in Utilities.MaterialResources.entityData["materials"].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == entry.Name);
|
||||
if (prop is JProperty)
|
||||
{
|
||||
EntryNode.Text = (string)prop.Value;
|
||||
EntryNode.ImageIndex = Utilities.MaterialUtil.entityData["entities"].Children().ToList().IndexOf(content);
|
||||
EntryNode.ImageIndex = Utilities.MaterialResources.entityData["materials"].Children().ToList().IndexOf(content);
|
||||
EntryNode.SelectedImageIndex = EntryNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
|
||||
treeView1.ImageList = new ImageList();
|
||||
Utilities.MaterialUtil.entityImages.ToList().ForEach(img => treeView1.ImageList.Images.Add(img));
|
||||
Utilities.MaterialResources.entityImages.ToList().ForEach(img => treeView1.ImageList.Images.Add(img));
|
||||
treeView1.ImageList.ColorDepth = ColorDepth.Depth32Bit;
|
||||
SetUpTree();
|
||||
}
|
||||
@@ -132,7 +132,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void addToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var diag = new Additional_Popups.EntityForms.AddEntry(Utilities.MaterialUtil.entityData, Utilities.MaterialUtil.entityImages);
|
||||
var diag = new Additional_Popups.EntityForms.AddEntry(Utilities.MaterialResources.entityData, Utilities.MaterialResources.entityImages);
|
||||
|
||||
if (diag.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
@@ -146,13 +146,13 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
TreeNode NewEntryNode = new TreeNode(NewEntry.Name);
|
||||
NewEntryNode.Tag = NewEntry;
|
||||
foreach (JObject content in Utilities.MaterialUtil.entityData["entities"].Children())
|
||||
foreach (JObject content in Utilities.MaterialResources.entityData["materials"].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == NewEntry.Name);
|
||||
if (prop is JProperty)
|
||||
{
|
||||
NewEntryNode.Text = (string)prop.Value;
|
||||
NewEntryNode.ImageIndex = Utilities.MaterialUtil.entityData["entities"].Children().ToList().IndexOf(content);
|
||||
NewEntryNode.ImageIndex = Utilities.MaterialResources.entityData["materials"].Children().ToList().IndexOf(content);
|
||||
NewEntryNode.SelectedImageIndex = NewEntryNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ using OMI.Formats.Model;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Workers.Model;
|
||||
using OMI.Formats.Behaviour;
|
||||
using PckStudio.Forms.Utilities;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
@@ -30,13 +31,13 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
TreeNode EntryNode = new TreeNode(entry.Name);
|
||||
|
||||
foreach (JObject content in Utilities.ModelsUtil.entityData["entities"].Children())
|
||||
foreach (JObject content in ModelsResources.entityData["entities"].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == entry.Name);
|
||||
if (prop is JProperty)
|
||||
{
|
||||
EntryNode.Text = (string)prop.Value;
|
||||
EntryNode.ImageIndex = Utilities.ModelsUtil.entityData["entities"].Children().ToList().IndexOf(content);
|
||||
EntryNode.ImageIndex = ModelsResources.entityData["entities"].Children().ToList().IndexOf(content);
|
||||
EntryNode.SelectedImageIndex = EntryNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
@@ -79,7 +80,7 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
|
||||
treeView1.ImageList = new ImageList();
|
||||
treeView1.ImageList.Images.AddRange(Utilities.ModelsUtil.entityImages);
|
||||
treeView1.ImageList.Images.AddRange(ModelsResources.entityImages);
|
||||
treeView1.ImageList.ColorDepth = ColorDepth.Depth32Bit;
|
||||
SetUpTree();
|
||||
}
|
||||
@@ -100,7 +101,7 @@ namespace PckStudio.Forms.Editor
|
||||
if (treeView1.SelectedNode is null || treeView1.SelectedNode.Tag is not Model entry)
|
||||
return;
|
||||
|
||||
var diag = new AddEntry(Utilities.ModelsUtil.entityData, Utilities.ModelsUtil.entityImages);
|
||||
var diag = new AddEntry(ModelsResources.entityData, ModelsResources.entityImages);
|
||||
diag.acceptBtn.Text = "Save";
|
||||
|
||||
if (diag.ShowDialog() == DialogResult.OK)
|
||||
@@ -117,13 +118,13 @@ namespace PckStudio.Forms.Editor
|
||||
entry.Name = diag.SelectedEntity;
|
||||
treeView1.SelectedNode.Tag = entry;
|
||||
|
||||
foreach (JObject content in Utilities.ModelsUtil.entityData["entities"].Children())
|
||||
foreach (JObject content in ModelsResources.entityData["entities"].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == entry.Name);
|
||||
if (prop is JProperty)
|
||||
{
|
||||
treeView1.SelectedNode.Text = (string)prop.Value;
|
||||
treeView1.SelectedNode.ImageIndex = Utilities.ModelsUtil.entityData["entities"].Children().ToList().IndexOf(content);
|
||||
treeView1.SelectedNode.ImageIndex = ModelsResources.entityData["entities"].Children().ToList().IndexOf(content);
|
||||
treeView1.SelectedNode.SelectedImageIndex = treeView1.SelectedNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
@@ -153,7 +154,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void addNewEntryToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var diag = new AddEntry(Utilities.ModelsUtil.entityData, Utilities.ModelsUtil.entityImages);
|
||||
var diag = new AddEntry(ModelsResources.entityData, ModelsResources.entityImages);
|
||||
|
||||
if(diag.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
@@ -173,13 +174,13 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
TreeNode modelNode = new TreeNode(newModel.Name);
|
||||
modelNode.Tag = newModel;
|
||||
foreach (JObject content in Utilities.ModelsUtil.entityData["entities"].Children())
|
||||
foreach (JObject content in ModelsResources.entityData["entities"].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == newModel.Name);
|
||||
if (prop is JProperty)
|
||||
{
|
||||
modelNode.Text = (string)prop.Value;
|
||||
modelNode.ImageIndex = Utilities.ModelsUtil.entityData["entities"].Children().ToList().IndexOf(content);
|
||||
modelNode.ImageIndex = ModelsResources.entityData["entities"].Children().ToList().IndexOf(content);
|
||||
modelNode.SelectedImageIndex = modelNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -5,9 +5,10 @@ using System.Windows.Forms;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Imaging;
|
||||
using PckStudio.Classes.Utils;
|
||||
using PckStudio.Classes._3ds.Utils;
|
||||
using OMI.Formats.Languages;
|
||||
using OMI.Formats.Pck;
|
||||
using PckStudio.Forms.Editor;
|
||||
using PckStudio.Classes.IO._3DST;
|
||||
|
||||
namespace PckStudio
|
||||
{
|
||||
@@ -86,7 +87,7 @@ namespace PckStudio
|
||||
//comboBoxSkinType.Text = "Steve (64x64)";
|
||||
skinType = eSkinType._64x64HD;
|
||||
}
|
||||
else if (img.Width == img.Height / 2) // 64x32 HD
|
||||
else if (img.Height == img.Width / 2) // 64x32 HD
|
||||
{
|
||||
anim.SetFlag(ANIM_EFFECTS.RESOLUTION_64x64, false);
|
||||
anim.SetFlag(ANIM_EFFECTS.SLIM_MODEL, false);
|
||||
@@ -282,14 +283,10 @@ namespace PckStudio
|
||||
if (MessageBox.Show("Create your own custom skin model?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) != DialogResult.Yes)
|
||||
return;
|
||||
|
||||
PictureBox preview = new PictureBox(); //Creates new picture for generated model preview
|
||||
generateModel generate = new generateModel(generatedModel, preview);
|
||||
generateModel generate = new generateModel(generatedModel, Properties.Resources.classic_template);
|
||||
|
||||
if (generate.ShowDialog() == DialogResult.OK) //Opens Model Generator Dialog
|
||||
{
|
||||
//comboBoxSkinType.Items.Add("Custom"); //Adds skin preset to combobox
|
||||
//comboBoxSkinType.Text = "Custom"; //Sets combo to custom preset
|
||||
displayBox.Image = preview.Image; //Sets displayBox to created model preview
|
||||
try
|
||||
{
|
||||
using (FileStream stream = File.OpenRead(Application.StartupPath + "\\temp.png"))
|
||||
@@ -346,7 +343,8 @@ namespace PckStudio
|
||||
{
|
||||
using (var fs = File.OpenRead(ofdd.FileName))
|
||||
{
|
||||
CheckImage(_3DSUtil.GetImageFrom3DST(fs));
|
||||
var reader = new _3DSTextureReader();
|
||||
CheckImage(reader.FromStream(fs));
|
||||
textSkinName.Text = Path.GetFileNameWithoutExtension(ofdd.FileName);
|
||||
}
|
||||
return;
|
||||
@@ -365,10 +363,10 @@ namespace PckStudio
|
||||
|
||||
private void buttonAnimGen_Click(object sender, EventArgs e)
|
||||
{
|
||||
using Forms.Utilities.Skins.ANIMEditor diag = new Forms.Utilities.Skins.ANIMEditor(anim.ToString());
|
||||
if (diag.ShowDialog(this) == DialogResult.OK && diag.saved)
|
||||
using ANIMEditor diag = new ANIMEditor(anim.ToString());
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
anim = new SkinANIM(diag.outANIM);
|
||||
anim = diag.ResultAnim;
|
||||
DrawModel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
this.tabBody = new System.Windows.Forms.TabControl();
|
||||
this.tabArmor = new System.Windows.Forms.TabPage();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.myTablePanel2 = new PckStudio.Forms.MyTablePanel();
|
||||
this.myTablePanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.offsetArms = new System.Windows.Forms.TextBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.offsetBody = new System.Windows.Forms.TextBox();
|
||||
@@ -370,8 +370,6 @@
|
||||
// checkTextureGenerate
|
||||
//
|
||||
resources.ApplyResources(this.checkTextureGenerate, "checkTextureGenerate");
|
||||
this.checkTextureGenerate.Checked = true;
|
||||
this.checkTextureGenerate.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkTextureGenerate.Name = "checkTextureGenerate";
|
||||
this.checkTextureGenerate.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.checkTextureGenerate.UseSelectable = true;
|
||||
@@ -503,13 +501,13 @@
|
||||
//
|
||||
resources.ApplyResources(this.Z, "Z");
|
||||
//
|
||||
// Width
|
||||
// _Width
|
||||
//
|
||||
resources.ApplyResources(this._Width, "Width");
|
||||
resources.ApplyResources(this._Width, "_Width");
|
||||
//
|
||||
// Height
|
||||
// _Height
|
||||
//
|
||||
resources.ApplyResources(this._Height, "Height");
|
||||
resources.ApplyResources(this._Height, "_Height");
|
||||
//
|
||||
// Length
|
||||
//
|
||||
@@ -637,7 +635,7 @@
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TabControl tabBody;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private Forms.MyTablePanel myTablePanel2;
|
||||
private System.Windows.Forms.TableLayoutPanel myTablePanel2;
|
||||
private System.Windows.Forms.TextBox offsetArms;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.TextBox offsetBody;
|
||||
|
||||
@@ -4,20 +4,22 @@ using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
using MetroFramework.Forms;
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using PckStudio.Classes.Models;
|
||||
using System.Text.RegularExpressions;
|
||||
using OMI.Formats.Pck;
|
||||
|
||||
namespace PckStudio
|
||||
{
|
||||
[Obsolete]
|
||||
public partial class generateModel : MetroForm
|
||||
{
|
||||
PictureBox skinPreview;
|
||||
PictureBox skinPreview = new PictureBox();
|
||||
|
||||
eViewDirection direction = eViewDirection.front;
|
||||
|
||||
@@ -46,12 +48,24 @@ namespace PckStudio
|
||||
// 64x64 Overlay Parts
|
||||
"HEADWEAR",
|
||||
"JACKET",
|
||||
"SHOULDER0",
|
||||
"SHOULDER1",
|
||||
"SLEEVE0",
|
||||
"SLEEVE1",
|
||||
"WAIST",
|
||||
"PANTS0",
|
||||
"PANTS1",
|
||||
"SOCK0",
|
||||
"SOCK1",
|
||||
|
||||
// Armor Parts
|
||||
"HELMET",
|
||||
"CHEST", "BODYARMOR",
|
||||
"SHOULDER0", "ARMARMOR0",
|
||||
"SHOULDER1", "ARMARMOR0",
|
||||
"BELT",
|
||||
"LEGGING0",
|
||||
"LEGGING1",
|
||||
"BOOT0",
|
||||
"BOOT1",
|
||||
};
|
||||
|
||||
private static readonly string[] ValidModelOffsetTypes = new string[]
|
||||
@@ -66,50 +80,22 @@ namespace PckStudio
|
||||
|
||||
// Armor Offsets
|
||||
"HELMET",
|
||||
"CHEST",
|
||||
"CHEST", "BODYARMOR",
|
||||
"SHOULDER0", "ARMARMOR0",
|
||||
"SHOULDER1", "ARMARMOR0",
|
||||
"BELT",
|
||||
"LEGGING0",
|
||||
"LEGGING1",
|
||||
"BOOT0",
|
||||
"BOOT1",
|
||||
"WAIST",
|
||||
"PANTS0",
|
||||
"PANTS1",
|
||||
|
||||
"TOOL0",
|
||||
"TOOL1",
|
||||
};
|
||||
|
||||
List<ModelPart> modelParts = new List<ModelPart>();
|
||||
List<SkinBox> modelBoxes = new List<SkinBox>();
|
||||
List<ModelOffset> modelOffsets = new List<ModelOffset>();
|
||||
|
||||
class ModelPart
|
||||
{
|
||||
public string Type;
|
||||
public float X, Y, Z;
|
||||
public float Width;
|
||||
public float Height;
|
||||
public float Length;
|
||||
public int U, V;
|
||||
|
||||
public ModelPart(string type, float x, float y, float z, float width, float height, float length, int u, int v)
|
||||
{
|
||||
Type = type;
|
||||
X = x;
|
||||
Y = y;
|
||||
Z = z;
|
||||
Width = width;
|
||||
Height = height;
|
||||
Length = length;
|
||||
U = u;
|
||||
V = v;
|
||||
}
|
||||
|
||||
public ValueTuple<string, string> ToProperty()
|
||||
{
|
||||
string value = $"{Type} {X} {Y} {Z} {Width} {Height} {Length} {U} {V}";
|
||||
return new ValueTuple<string, string>("BOX", value.Replace(',', '.'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ModelOffset
|
||||
{
|
||||
public string Name;
|
||||
@@ -127,14 +113,13 @@ namespace PckStudio
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public generateModel(PckFile.PCKProperties skinProperties, PictureBox preview)
|
||||
public generateModel(PckFile.PCKProperties skinProperties, Image texture)
|
||||
{
|
||||
InitializeComponent();
|
||||
boxes = skinProperties;
|
||||
skinPreview = preview;
|
||||
if (texturePreview.Image == null)
|
||||
texturePreview.Image = new Bitmap(64, 64);
|
||||
texturePreview.Image = texture;
|
||||
comboParent.Items.Clear();
|
||||
ValidModelBoxTypes.ToList().ForEach(p => comboParent.Items.Add(p));
|
||||
loadData();
|
||||
}
|
||||
private static readonly Regex sWhitespace = new Regex(@"\s+");
|
||||
@@ -152,56 +137,14 @@ namespace PckStudio
|
||||
{
|
||||
case "BOX":
|
||||
{
|
||||
string[] Format = ReplaceWhitespace(property.Item2, ",").TrimEnd('\n', '\r', ' ').Split(',');
|
||||
if (Format.Length < 9)
|
||||
{
|
||||
Console.WriteLine($"'{property.Item1}' property has too few arguments: {property.Item2}");
|
||||
continue;
|
||||
}
|
||||
string name = Format[0];
|
||||
SkinBox box = new SkinBox(property.Item2);
|
||||
|
||||
string name = box.Type;
|
||||
if (ValidModelBoxTypes.Contains(name))
|
||||
{
|
||||
// %10ls = name
|
||||
// %f
|
||||
// %f
|
||||
// %f
|
||||
// %f
|
||||
// %f
|
||||
// %f
|
||||
// %f
|
||||
// %f
|
||||
// %d
|
||||
// %d
|
||||
// %f
|
||||
try
|
||||
{
|
||||
float x = float.Parse(Format[1]);
|
||||
float y = float.Parse(Format[2]);
|
||||
float z = float.Parse(Format[3]);
|
||||
float sizeX = float.Parse(Format[4]);
|
||||
float sizeY = float.Parse(Format[5]);
|
||||
float sizeZ = float.Parse(Format[6]);
|
||||
int u = int.Parse(Format[7]);
|
||||
int v = int.Parse(Format[8]);
|
||||
modelParts.Add(new ModelPart(name, x, y, z, sizeX, sizeY, sizeZ, u, v));
|
||||
}
|
||||
catch (FormatException ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
MessageBox.Show("A Format Exception was thrown\nFailed to parse BOX value", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
catch (OverflowException ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
MessageBox.Show("An Overflow Exception was thrown\nFailed to parse BOX value", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
if (Format.Length >= 11)
|
||||
{
|
||||
string unk1 = Format[9];
|
||||
string unk2 = Format[10];
|
||||
Console.WriteLine($"{unk1} | {unk2}");
|
||||
modelBoxes.Add(box);
|
||||
}
|
||||
|
||||
comboParent.Enabled = true;
|
||||
break;
|
||||
}
|
||||
@@ -260,52 +203,76 @@ namespace PckStudio
|
||||
float legY = (displayBox.Height / 2) + 85; // -80;
|
||||
float groundLevel = (displayBox.Height / 2) + 145;
|
||||
graphics.DrawLine(Pens.White, 0, groundLevel, displayBox.Width, groundLevel);
|
||||
float gfx_scale = texturePreview.Image.Width / 64; // used for displaying larger graphics properly; 64 is the base skin width for all models
|
||||
|
||||
// Chooses Render settings based on current direction
|
||||
foreach (ListViewItem listViewItem in listViewBoxes.Items)
|
||||
{
|
||||
if (!(listViewItem.Tag is ModelPart)) continue;
|
||||
ModelPart part = listViewItem.Tag as ModelPart;
|
||||
if (!(listViewItem.Tag is SkinBox)) continue;
|
||||
SkinBox part = listViewItem.Tag as SkinBox;
|
||||
float x = displayBox.Width / 2;
|
||||
float y = 0;
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case eViewDirection.front:
|
||||
{
|
||||
//Sets X & Y based on model part class
|
||||
// listViewItem.Text -> part.Type
|
||||
// listViewItem.SubItems[1] -> part.X
|
||||
// listViewItem.SubItems[2] -> part.Y
|
||||
// listViewItem.SubItems[3] -> part.Z
|
||||
// listViewItem.SubItems[4] -> part.Width
|
||||
// listViewItem.SubItems[5] -> part.Height
|
||||
// listViewItem.SubItems[6] -> part.Length
|
||||
// listViewItem.SubItems[1] -> part.Pos.X
|
||||
// listViewItem.SubItems[2] -> part.Pos.Y
|
||||
// listViewItem.SubItems[3] -> part.Pos.Z
|
||||
// listViewItem.SubItems[4] -> part.Size.X
|
||||
// listViewItem.SubItems[5] -> part.Size.Y
|
||||
// listViewItem.SubItems[6] -> part.Size.Z
|
||||
// listViewItem.SubItems[7] -> part.U
|
||||
// listViewItem.SubItems[8] -> part.V
|
||||
switch (part.Type)
|
||||
{
|
||||
case "HEAD":
|
||||
case "HEADWEAR":
|
||||
case "HELMET":
|
||||
y = headbodyY + int.Parse(offsetHead.Text) * 5;
|
||||
break;
|
||||
case "BODY":
|
||||
case "JACKET":
|
||||
case "CHEST":
|
||||
case "BODYARMOR":
|
||||
case "BELT":
|
||||
case "WAIST":
|
||||
y = headbodyY + int.Parse(offsetBody.Text) * 5;
|
||||
break;
|
||||
|
||||
case "ARM0":
|
||||
case "ARMARMOR0":
|
||||
case "SLEEVE0":
|
||||
case "SHOULDER0":
|
||||
x -= 25;
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
|
||||
case "ARM1":
|
||||
case "ARMARMOR1":
|
||||
case "SLEEVE1":
|
||||
case "SHOULDER1":
|
||||
x += 25;
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
|
||||
case "LEG0":
|
||||
case "PANTS0":
|
||||
case "SOCK0":
|
||||
case "LEGGING0":
|
||||
case "BOOT0":
|
||||
x -= 10;
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
|
||||
case "LEG1":
|
||||
case "PANTS1":
|
||||
case "SOCK1":
|
||||
case "LEGGING1":
|
||||
case "BOOT1":
|
||||
x += 10;
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
@@ -315,20 +282,20 @@ namespace PckStudio
|
||||
if (!checkTextureGenerate.Checked)
|
||||
{
|
||||
RectangleF destRect = new RectangleF(
|
||||
x + part.X * 5,
|
||||
y + part.Y * 5,
|
||||
part.Width * 5,
|
||||
part.Height * 5);
|
||||
x + part.Pos.X * 5,
|
||||
y + part.Pos.Y * 5,
|
||||
part.Size.X * 5,
|
||||
part.Size.Y * 5);
|
||||
RectangleF srcRect = new RectangleF(
|
||||
part.U + part.Length,
|
||||
part.V + part.Length,
|
||||
part.Width,
|
||||
part.Height);
|
||||
(part.U + part.Size.Z) * gfx_scale,
|
||||
(part.V + part.Size.Z) * gfx_scale,
|
||||
part.Size.X * gfx_scale,
|
||||
part.Size.Y * gfx_scale);
|
||||
graphics.DrawImage(texturePreview.Image, destRect, srcRect, GraphicsUnit.Pixel);
|
||||
}
|
||||
else
|
||||
{
|
||||
graphics.FillRectangle(new SolidBrush(listViewItem.ForeColor), x + part.X * 5, y + part.Y * 5, part.Width * 5, part.Height * 5);
|
||||
graphics.FillRectangle(new SolidBrush(listViewItem.ForeColor), x + part.Pos.X * 5, y + part.Pos.Y * 5, part.Size.X * 5, part.Size.Y * 5);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -340,27 +307,47 @@ namespace PckStudio
|
||||
switch (part.Type)
|
||||
{
|
||||
case "HEAD":
|
||||
y = headbodyY + float.Parse(offsetHead.Text) * 5;
|
||||
case "HEADWEAR":
|
||||
case "HELMET":
|
||||
y = headbodyY + int.Parse(offsetHead.Text) * 5;
|
||||
break;
|
||||
|
||||
case "BODY":
|
||||
y = headbodyY + float.Parse(offsetBody.Text) * 5;
|
||||
case "JACKET":
|
||||
case "CHEST":
|
||||
case "BODYARMOR":
|
||||
case "BELT":
|
||||
case "WAIST":
|
||||
y = headbodyY + int.Parse(offsetBody.Text) * 5;
|
||||
break;
|
||||
|
||||
case "ARM0":
|
||||
y = armY + float.Parse(offsetArms.Text) * 5;
|
||||
case "ARMARMOR0":
|
||||
case "SLEEVE0":
|
||||
case "SHOULDER0":
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
|
||||
case "ARM1":
|
||||
y = armY + float.Parse(offsetArms.Text) * 5;
|
||||
case "ARMARMOR1":
|
||||
case "SLEEVE1":
|
||||
case "SHOULDER1":
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
|
||||
case "LEG0":
|
||||
y = legY + float.Parse(offsetLegs.Text) * 5;
|
||||
case "PANTS0":
|
||||
case "SOCK0":
|
||||
case "LEGGING0":
|
||||
case "BOOT0":
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
|
||||
case "LEG1":
|
||||
y = legY + float.Parse(offsetLegs.Text) * 5;
|
||||
case "PANTS1":
|
||||
case "SOCK1":
|
||||
case "LEGGING1":
|
||||
case "BOOT1":
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -368,21 +355,21 @@ namespace PckStudio
|
||||
if (!checkTextureGenerate.Checked)
|
||||
{
|
||||
RectangleF destRect = new RectangleF(
|
||||
x + part.Z * 5,
|
||||
y + part.Y * 5,
|
||||
part.Length * 5,
|
||||
part.Height * 5);
|
||||
x + part.Pos.Z * 5,
|
||||
y + part.Pos.Y * 5,
|
||||
part.Size.Z * 5,
|
||||
part.Size.Y * 5);
|
||||
RectangleF srcRect = new RectangleF(
|
||||
part.U + part.Length + part.Width,
|
||||
part.V + part.Length,
|
||||
part.Length,
|
||||
part.Height);
|
||||
(part.U + part.Size.Z + part.Size.X) * gfx_scale,
|
||||
(part.V + part.Size.Z) * gfx_scale,
|
||||
part.Size.Z * gfx_scale,
|
||||
part.Size.Y * gfx_scale);
|
||||
graphics.DrawImage(texturePreview.Image, destRect, srcRect, GraphicsUnit.Pixel);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Draws Part
|
||||
graphics.FillRectangle(new SolidBrush(listViewItem.ForeColor), x + part.Z * 5, y + part.Y * 5, part.Length * 5, part.Height * 5);
|
||||
graphics.FillRectangle(new SolidBrush(listViewItem.ForeColor), x + part.Pos.Z * 5, y + part.Pos.Y * 5, part.Size.Z * 5, part.Size.Y * 5);
|
||||
}
|
||||
bitmapModelPreview.RotateFlip(RotateFlipType.RotateNoneFlipX);
|
||||
break;
|
||||
@@ -394,26 +381,51 @@ namespace PckStudio
|
||||
switch (part.Type)
|
||||
{
|
||||
case "HEAD":
|
||||
y = headbodyY + float.Parse(offsetHead.Text) * 5;
|
||||
case "HEADWEAR":
|
||||
case "HELMET":
|
||||
y = headbodyY + int.Parse(offsetHead.Text) * 5;
|
||||
break;
|
||||
case "BODY":
|
||||
y = headbodyY + float.Parse(offsetBody.Text) * 5;
|
||||
case "JACKET":
|
||||
case "CHEST":
|
||||
case "BODYARMOR":
|
||||
case "BELT":
|
||||
case "WAIST":
|
||||
y = headbodyY + int.Parse(offsetBody.Text) * 5;
|
||||
break;
|
||||
|
||||
case "ARM0":
|
||||
case "ARMARMOR0":
|
||||
case "SLEEVE0":
|
||||
case "SHOULDER0":
|
||||
x -= 25;
|
||||
y = armY + float.Parse(offsetArms.Text) * 5;
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
|
||||
case "ARM1":
|
||||
case "ARMARMOR1":
|
||||
case "SLEEVE1":
|
||||
case "SHOULDER1":
|
||||
x += 25;
|
||||
y = armY + float.Parse(offsetArms.Text) * 5;
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
|
||||
case "LEG0":
|
||||
case "PANTS0":
|
||||
case "SOCK0":
|
||||
case "LEGGING0":
|
||||
case "BOOT0":
|
||||
x -= 10;
|
||||
y = legY + float.Parse(offsetLegs.Text) * 5;
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
|
||||
case "LEG1":
|
||||
case "PANTS1":
|
||||
case "SOCK1":
|
||||
case "LEGGING1":
|
||||
case "BOOT1":
|
||||
x += 10;
|
||||
y = legY + float.Parse(offsetLegs.Text) * 5;
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -421,21 +433,21 @@ namespace PckStudio
|
||||
if (!checkTextureGenerate.Checked)
|
||||
{
|
||||
RectangleF destRect = new RectangleF(
|
||||
x + part.X * 5,
|
||||
y + part.Y * 5,
|
||||
part.Width * 5,
|
||||
part.Height * 5);
|
||||
x + part.Pos.X * 5,
|
||||
y + part.Pos.Y * 5,
|
||||
part.Size.X * 5,
|
||||
part.Size.Y * 5);
|
||||
RectangleF srcRect = new RectangleF(
|
||||
part.U + part.Length * 2 + part.Width,
|
||||
part.V + part.Length,
|
||||
part.Width,
|
||||
part.Height);
|
||||
(part.U + part.Size.Z * 2 + part.Size.X) * gfx_scale,
|
||||
(part.V + part.Size.Z) * gfx_scale,
|
||||
part.Size.X * gfx_scale,
|
||||
part.Size.Y * gfx_scale);
|
||||
graphics.DrawImage(texturePreview.Image, destRect, srcRect, GraphicsUnit.Pixel);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Draws Part
|
||||
graphics.FillRectangle(new SolidBrush(listViewItem.ForeColor), x + part.X * 5, y + part.Y * 5, part.Width * 5, part.Height * 5);
|
||||
graphics.FillRectangle(new SolidBrush(listViewItem.ForeColor), x + part.Pos.X * 5, y + part.Pos.Y * 5, part.Size.X * 5, part.Size.Y * 5);
|
||||
}
|
||||
bitmapModelPreview.RotateFlip(RotateFlipType.RotateNoneFlipX);
|
||||
break;
|
||||
@@ -446,46 +458,68 @@ namespace PckStudio
|
||||
switch (part.Type)
|
||||
{
|
||||
case "HEAD":
|
||||
y = headbodyY + float.Parse(offsetHead.Text) * 5;
|
||||
case "HEADWEAR":
|
||||
case "HELMET":
|
||||
y = headbodyY + int.Parse(offsetHead.Text) * 5;
|
||||
break;
|
||||
case "BODY":
|
||||
y = headbodyY + float.Parse(offsetBody.Text) * 5;
|
||||
case "JACKET":
|
||||
case "CHEST":
|
||||
case "BODYARMOR":
|
||||
case "BELT":
|
||||
case "WAIST":
|
||||
y = headbodyY + int.Parse(offsetBody.Text) * 5;
|
||||
break;
|
||||
|
||||
case "ARM0":
|
||||
y = armY + float.Parse(offsetArms.Text) * 5;
|
||||
case "ARMARMOR0":
|
||||
case "SLEEVE0":
|
||||
case "SHOULDER0":
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
|
||||
case "ARM1":
|
||||
y = armY + float.Parse(offsetArms.Text) * 5;
|
||||
case "ARMARMOR1":
|
||||
case "SLEEVE1":
|
||||
case "SHOULDER1":
|
||||
y = armY + int.Parse(offsetArms.Text) * 5;
|
||||
break;
|
||||
|
||||
case "LEG0":
|
||||
y = legY + float.Parse(offsetLegs.Text) * 5;
|
||||
case "PANTS0":
|
||||
case "SOCK0":
|
||||
case "LEGGING0":
|
||||
case "BOOT0":
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
|
||||
case "LEG1":
|
||||
y = legY + float.Parse(offsetLegs.Text) * 5;
|
||||
case "PANTS1":
|
||||
case "SOCK1":
|
||||
case "LEGGING1":
|
||||
case "BOOT1":
|
||||
y = legY + int.Parse(offsetLegs.Text) * 5;
|
||||
break;
|
||||
}
|
||||
//Maps imported Texture if auto texture is disabled
|
||||
if (!checkTextureGenerate.Checked)
|
||||
{
|
||||
RectangleF destRect = new RectangleF(
|
||||
x + part.Z * 5,
|
||||
y + part.Y * 5,
|
||||
part.Length * 5,
|
||||
part.Height * 5);
|
||||
x + part.Pos.Z * 5,
|
||||
y + part.Pos.Y * 5,
|
||||
part.Size.Z * 5,
|
||||
part.Size.Y * 5);
|
||||
RectangleF srcRect = new RectangleF(
|
||||
part.U + part.Length + part.Width,
|
||||
part.V + part.Length,
|
||||
part.Length,
|
||||
part.Height);
|
||||
(part.U + part.Size.Z + part.Size.X) * gfx_scale,
|
||||
(part.V + part.Size.Z) * gfx_scale,
|
||||
part.Size.Z * gfx_scale,
|
||||
part.Size.Y * gfx_scale);
|
||||
graphics.DrawImage(texturePreview.Image, destRect, srcRect, GraphicsUnit.Pixel);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Draws Part
|
||||
graphics.FillRectangle(new SolidBrush(listViewItem.ForeColor), x + part.Z * 5, y + part.Y * 5, part.Length * 5, part.Height * 5);
|
||||
graphics.FillRectangle(new SolidBrush(listViewItem.ForeColor), x + part.Pos.Z * 5, y + part.Pos.Y * 5, part.Size.Z * 5, part.Size.Y * 5);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -507,13 +541,13 @@ namespace PckStudio
|
||||
Bitmap bitmapAutoTexture = new Bitmap(texturePreview.Width, texturePreview.Height);
|
||||
using (Graphics graphics = Graphics.FromImage(bitmapAutoTexture))
|
||||
{
|
||||
foreach (var part in modelParts)
|
||||
foreach (var part in modelBoxes)
|
||||
{
|
||||
float width = part.Width * 2;
|
||||
float height = part.Height * 2;
|
||||
float length = part.Length * 2;
|
||||
int u = part.U * 2;
|
||||
int v = part.V * 2;
|
||||
float width = part.Size.X * 2;
|
||||
float height = part.Size.Y * 2;
|
||||
float length = part.Size.Z * 2;
|
||||
float u = part.U * 2;
|
||||
float v = part.V * 2;
|
||||
Random r = new Random();
|
||||
Brush brush = new SolidBrush(Color.FromArgb(r.Next(int.MinValue, int.MaxValue)));
|
||||
graphics.FillRectangle(brush, u + length, v, width, length);
|
||||
@@ -839,7 +873,7 @@ namespace PckStudio
|
||||
//Creates Item
|
||||
private void createToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
modelParts.Add(new ModelPart("New Part", 0, 0, 0, 0, 0, 0, 0, 0));
|
||||
modelBoxes.Add(new SkinBox("NEW_BOX 0 0 0 1 1 1 0 0 0 0 0"));
|
||||
updateListView();
|
||||
render();
|
||||
}
|
||||
@@ -849,21 +883,21 @@ namespace PckStudio
|
||||
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
changeColorToolStripMenuItem.Visible = false;
|
||||
if (listViewBoxes.SelectedItems.Count != 0 && listViewBoxes.SelectedItems[0].Tag is ModelPart)
|
||||
if (listViewBoxes.SelectedItems.Count != 0 && listViewBoxes.SelectedItems[0].Tag is SkinBox)
|
||||
{
|
||||
changeColorToolStripMenuItem.Visible = true;
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as ModelPart;
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as SkinBox;
|
||||
//graphics.DrawRectangle(Pens.Yellow, x + (float)double.Parse(this.selected.SubItems[3].Text) * 5 - 1, y + (float)double.Parse(this.selected.SubItems[2].Text) * 5 - 1, (float)double.Parse(this.selected.SubItems[6].Text) * 5 + 2, (float)double.Parse(this.selected.SubItems[5].Text) * 5 + 2);
|
||||
//graphics.DrawRectangle(Pens.Black, x + (float)double.Parse(this.selected.SubItems[3].Text) * 5, y + (float)double.Parse(this.selected.SubItems[2].Text) * 5, (float)double.Parse(this.selected.SubItems[6].Text) * 5, (float)double.Parse(this.selected.SubItems[5].Text) * 5);
|
||||
comboParent.Text = part.Type;
|
||||
PosXUpDown.Value = (decimal)part.X;
|
||||
PosYUpDown.Value = (decimal)part.Y;
|
||||
PosZUpDown.Value = (decimal)part.Z;
|
||||
SizeXUpDown.Value = (decimal)part.Width;
|
||||
SizeYUpDown.Value = (decimal)part.Height;
|
||||
SizeZUpDown.Value = (decimal)part.Length;
|
||||
TextureXUpDown.Value = part.U;
|
||||
TextureYUpDown.Value = part.V;
|
||||
PosXUpDown.Value = (decimal)part.Pos.X;
|
||||
PosYUpDown.Value = (decimal)part.Pos.Y;
|
||||
PosZUpDown.Value = (decimal)part.Pos.Z;
|
||||
SizeXUpDown.Value = (decimal)part.Size.X;
|
||||
SizeYUpDown.Value = (decimal)part.Size.Y;
|
||||
SizeZUpDown.Value = (decimal)part.Size.Z;
|
||||
TextureXUpDown.Value = (decimal)part.U;
|
||||
TextureYUpDown.Value = (decimal)part.V;
|
||||
render();
|
||||
}
|
||||
}
|
||||
@@ -873,9 +907,9 @@ namespace PckStudio
|
||||
private void comboParent_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewBoxes.SelectedItems.Count != 0 &&
|
||||
listViewBoxes.SelectedItems[0].Tag is ModelPart)
|
||||
listViewBoxes.SelectedItems[0].Tag is SkinBox)
|
||||
{
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as ModelPart;
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as SkinBox;
|
||||
part.Type = comboParent.Text;
|
||||
buttonIMPORT.Enabled = true;
|
||||
buttonEXPORT.Enabled = true;
|
||||
@@ -894,10 +928,10 @@ namespace PckStudio
|
||||
private void SizeXUpDown_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewBoxes.SelectedItems.Count != 0 &&
|
||||
listViewBoxes.SelectedItems[0].Tag is ModelPart)
|
||||
listViewBoxes.SelectedItems[0].Tag is SkinBox)
|
||||
{
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as ModelPart;
|
||||
part.Width = (float)SizeXUpDown.Value;
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as SkinBox;
|
||||
part.Size.X = (float)SizeXUpDown.Value;
|
||||
}
|
||||
updateListView();
|
||||
render();
|
||||
@@ -906,10 +940,10 @@ namespace PckStudio
|
||||
private void SizeYUpDown_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewBoxes.SelectedItems.Count != 0 &&
|
||||
listViewBoxes.SelectedItems[0].Tag is ModelPart)
|
||||
listViewBoxes.SelectedItems[0].Tag is SkinBox)
|
||||
{
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as ModelPart;
|
||||
part.Height = (float)SizeYUpDown.Value;
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as SkinBox;
|
||||
part.Size.Y = (float)SizeYUpDown.Value;
|
||||
}
|
||||
updateListView();
|
||||
render();
|
||||
@@ -918,10 +952,10 @@ namespace PckStudio
|
||||
private void SizeZUpDown_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewBoxes.SelectedItems.Count != 0 &&
|
||||
listViewBoxes.SelectedItems[0].Tag is ModelPart)
|
||||
listViewBoxes.SelectedItems[0].Tag is SkinBox)
|
||||
{
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as ModelPart;
|
||||
part.Length = (float)SizeZUpDown.Value;
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as SkinBox;
|
||||
part.Size.Z = (float)SizeZUpDown.Value;
|
||||
}
|
||||
updateListView();
|
||||
render();
|
||||
@@ -930,10 +964,10 @@ namespace PckStudio
|
||||
private void PosXUpDown_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewBoxes.SelectedItems.Count != 0 &&
|
||||
listViewBoxes.SelectedItems[0].Tag is ModelPart)
|
||||
listViewBoxes.SelectedItems[0].Tag is SkinBox)
|
||||
{
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as ModelPart;
|
||||
part.X = (float)PosXUpDown.Value;
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as SkinBox;
|
||||
part.Pos.X = (float)PosXUpDown.Value;
|
||||
}
|
||||
updateListView();
|
||||
render();
|
||||
@@ -943,10 +977,10 @@ namespace PckStudio
|
||||
private void PosYUpDown_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewBoxes.SelectedItems.Count != 0 &&
|
||||
listViewBoxes.SelectedItems[0].Tag is ModelPart)
|
||||
listViewBoxes.SelectedItems[0].Tag is SkinBox)
|
||||
{
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as ModelPart;
|
||||
part.Y = (float)PosYUpDown.Value;
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as SkinBox;
|
||||
part.Pos.Y = (float)PosYUpDown.Value;
|
||||
}
|
||||
updateListView();
|
||||
render();
|
||||
@@ -956,10 +990,10 @@ namespace PckStudio
|
||||
private void PosZUpDown_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewBoxes.SelectedItems.Count != 0 &&
|
||||
listViewBoxes.SelectedItems[0].Tag is ModelPart)
|
||||
listViewBoxes.SelectedItems[0].Tag is SkinBox)
|
||||
{
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as ModelPart;
|
||||
part.Z = (float)PosZUpDown.Value;
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as SkinBox;
|
||||
part.Pos.Z = (float)PosZUpDown.Value;
|
||||
}
|
||||
updateListView();
|
||||
render();
|
||||
@@ -998,9 +1032,9 @@ namespace PckStudio
|
||||
private void TextureXUpDown_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewBoxes.SelectedItems.Count != 0 &&
|
||||
listViewBoxes.SelectedItems[0].Tag is ModelPart)
|
||||
listViewBoxes.SelectedItems[0].Tag is SkinBox)
|
||||
{
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as ModelPart;
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as SkinBox;
|
||||
part.U = (int)TextureXUpDown.Value;
|
||||
}
|
||||
updateListView();
|
||||
@@ -1012,9 +1046,9 @@ namespace PckStudio
|
||||
private void TextureYUpDown_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewBoxes.SelectedItems.Count != 0 &&
|
||||
listViewBoxes.SelectedItems[0].Tag is ModelPart)
|
||||
listViewBoxes.SelectedItems[0].Tag is SkinBox)
|
||||
{
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as ModelPart;
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as SkinBox;
|
||||
part.V = (int)TextureXUpDown.Value;
|
||||
}
|
||||
updateListView();
|
||||
@@ -1042,18 +1076,29 @@ namespace PckStudio
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||
openFileDialog.Filter = "PNG Image Files | *.png";
|
||||
openFileDialog.Title = "Select Skin Texture";
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK && Image.FromFile(openFileDialog.FileName).Width == Image.FromFile(openFileDialog.FileName).Height)
|
||||
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK) // skins can only be a 1:1 ratio (base 64x64) or a 2:1 ratio (base 64x32)
|
||||
{
|
||||
checkTextureGenerate.Checked = false;
|
||||
Bitmap bitmap = new Bitmap(64, 64);
|
||||
using (Graphics graphics = Graphics.FromImage(bitmap))
|
||||
{
|
||||
graphics.DrawImage(Image.FromFile(openFileDialog.FileName), 0, 0, 64, 64);
|
||||
graphics.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||
using (var img = Image.FromFile(openFileDialog.FileName))
|
||||
{
|
||||
if ((img.Width == img.Height || img.Height == img.Width / 2))
|
||||
{
|
||||
checkTextureGenerate.Checked = false;
|
||||
Bitmap bitmap = new Bitmap(img.Width, img.Width);
|
||||
using (Graphics graphics = Graphics.FromImage(bitmap))
|
||||
{
|
||||
graphics.DrawImage(img, 0, 0, img.Width, img.Height);
|
||||
graphics.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||
}
|
||||
texturePreview.Image = bitmap;
|
||||
render();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(this, "Not a valid skin file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
texturePreview.Image = bitmap;
|
||||
}
|
||||
render();
|
||||
}
|
||||
|
||||
|
||||
@@ -1061,7 +1106,7 @@ namespace PckStudio
|
||||
private void buttonDone_Click(object sender, EventArgs e)
|
||||
{
|
||||
Bitmap bitmap1 = new Bitmap(displayBox.Width, displayBox.Height);
|
||||
foreach (var part in modelParts)
|
||||
foreach (var part in modelBoxes)
|
||||
{
|
||||
boxes.Add(part.ToProperty());
|
||||
}
|
||||
@@ -1110,12 +1155,12 @@ namespace PckStudio
|
||||
//Loads in model template(Steve)
|
||||
private void buttonTemplate_Click(object sender, EventArgs e)
|
||||
{
|
||||
modelParts.Add(new ModelPart("HEAD", -4, -8, -4, 8, 8, 8, 0, 0));
|
||||
modelParts.Add(new ModelPart("BODY", -4, 0, -2, 8, 12, 4, 16, 16));
|
||||
modelParts.Add(new ModelPart("ARM0", -3, -2, -2, 4, 12, 4, 40, 16));
|
||||
modelParts.Add(new ModelPart("ARM1", -1, -2, -2, 4, 12, 4, 40, 16));
|
||||
modelParts.Add(new ModelPart("LEG0", -2, 0, -2, 4, 12, 4, 0, 16));
|
||||
modelParts.Add(new ModelPart("LEG1", -2, 0, -2, 4, 12, 4, 0, 16));
|
||||
modelBoxes.Add(new SkinBox("HEAD -4 -8 -4 8 8 8 0 0 0 0 0"));
|
||||
modelBoxes.Add(new SkinBox("BODY -4 0 -2 8 12 4 16 16 0 0 0"));
|
||||
modelBoxes.Add(new SkinBox("ARM0 -3 -2 -2 4 12 4 40 16 0 0 0"));
|
||||
modelBoxes.Add(new SkinBox("ARM1 -1 -2 -2 4 12 4 40 16 0 1 0"));
|
||||
modelBoxes.Add(new SkinBox("LEG0 -2 0 -2 4 12 4 0 16 0 0 0"));
|
||||
modelBoxes.Add(new SkinBox("LEG1 -2 0 -2 4 12 4 0 16 0 1 0"));
|
||||
comboParent.Enabled = true;
|
||||
updateListView();
|
||||
render();
|
||||
@@ -1124,16 +1169,16 @@ namespace PckStudio
|
||||
private void updateListView()
|
||||
{
|
||||
listViewBoxes.Items.Clear();
|
||||
foreach (var part in modelParts)
|
||||
foreach (var part in modelBoxes)
|
||||
{
|
||||
ListViewItem listViewItem = new ListViewItem(part.Type);
|
||||
listViewItem.Tag = part;
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.X.ToString()));
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.Y.ToString()));
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.Z.ToString()));
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.Width.ToString()));
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.Height.ToString()));
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.Length.ToString()));
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.Pos.X.ToString()));
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.Pos.Y.ToString()));
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.Pos.Z.ToString()));
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.Size.X.ToString()));
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.Size.Y.ToString()));
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.Size.Z.ToString()));
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.U.ToString()));
|
||||
listViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(listViewItem, part.V.ToString()));
|
||||
listViewBoxes.Items.Add(listViewItem);
|
||||
@@ -1174,11 +1219,10 @@ namespace PckStudio
|
||||
listViewBoxes.Items.Clear();
|
||||
string str1 = File.ReadAllText(openFileDialog.FileName);
|
||||
|
||||
modelParts.Clear();
|
||||
modelBoxes.Clear();
|
||||
List<string> lines = str1.Split(new[] { "\n\r", "\n" }, StringSplitOptions.None).ToList();
|
||||
if (string.IsNullOrEmpty(lines[lines.Count - 1]))
|
||||
lines.RemoveAt(lines.Count - 1);
|
||||
int currentLine = 0;
|
||||
int passedlines = 0;
|
||||
for (int i = 0; i < lines.Count;)
|
||||
{
|
||||
@@ -1190,11 +1234,12 @@ namespace PckStudio
|
||||
float SizeX = float.Parse(lines[6 + passedlines]);
|
||||
float SizeY = float.Parse(lines[7 + passedlines]);
|
||||
float SizeZ = float.Parse(lines[8 + passedlines]);
|
||||
int UvX = int.Parse(lines[9 + passedlines]);
|
||||
int UvY = int.Parse(lines[10 + passedlines]);
|
||||
float UvX = float.Parse(lines[9 + passedlines]);
|
||||
float UvY = float.Parse(lines[10 + passedlines]);
|
||||
passedlines += 11;
|
||||
i += 11;
|
||||
modelParts.Add(new ModelPart(parent, PosX, PosY, PosZ, SizeX, SizeY, SizeZ, UvX, UvY));
|
||||
// CSM doesn't support armor, mirror, or scale values as far as I know of - May
|
||||
modelBoxes.Add(new SkinBox($"{parent} {PosX} {PosY} {PosZ} {SizeX} {SizeY} {SizeZ} {UvX} {UvY} {false} {false} {0}"));
|
||||
}
|
||||
}
|
||||
comboParent.Enabled = true;
|
||||
@@ -1281,18 +1326,18 @@ namespace PckStudio
|
||||
private void listView1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewBoxes.SelectedItems.Count != 0 && listViewBoxes.SelectedItems[0] != null &&
|
||||
listViewBoxes.SelectedItems[0].Tag is ModelPart)
|
||||
listViewBoxes.SelectedItems[0].Tag is SkinBox)
|
||||
{
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as ModelPart;
|
||||
var part = listViewBoxes.SelectedItems[0].Tag as SkinBox;
|
||||
comboParent.Text = part.Type;
|
||||
PosXUpDown.Value = (decimal)part.X;
|
||||
PosYUpDown.Value = (decimal)part.Y;
|
||||
PosZUpDown.Value = (decimal)part.Z;
|
||||
SizeXUpDown.Value = (decimal)part.Width;
|
||||
SizeYUpDown.Value = (decimal)part.Height;
|
||||
SizeZUpDown.Value = (decimal)part.Length;
|
||||
TextureXUpDown.Value = part.U;
|
||||
TextureYUpDown.Value = part.V;
|
||||
PosXUpDown.Value = (decimal)part.Pos.X;
|
||||
PosYUpDown.Value = (decimal)part.Pos.Y;
|
||||
PosZUpDown.Value = (decimal)part.Pos.Z;
|
||||
SizeXUpDown.Value = (decimal)part.Size.X;
|
||||
SizeYUpDown.Value = (decimal)part.Size.Y;
|
||||
SizeZUpDown.Value = (decimal)part.Size.Z;
|
||||
TextureXUpDown.Value = (decimal)part.U;
|
||||
TextureYUpDown.Value = (decimal)part.V;
|
||||
SizeXUpDown.Enabled = true;
|
||||
SizeYUpDown.Enabled = true;
|
||||
SizeZUpDown.Enabled = true;
|
||||
@@ -1331,9 +1376,9 @@ namespace PckStudio
|
||||
private void delStuffUsingDelKey(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Delete && listViewBoxes.SelectedItems.Count != 0 &&
|
||||
listViewBoxes.SelectedItems[0].Tag is ModelPart)
|
||||
listViewBoxes.SelectedItems[0].Tag is SkinBox)
|
||||
{
|
||||
if (modelParts.Remove(listViewBoxes.SelectedItems[0].Tag as ModelPart))
|
||||
if (modelBoxes.Remove(listViewBoxes.SelectedItems[0].Tag as SkinBox))
|
||||
listViewBoxes.SelectedItems[0].Remove();
|
||||
render();
|
||||
}
|
||||
|
||||
@@ -610,7 +610,7 @@
|
||||
<value>myTablePanel2</value>
|
||||
</data>
|
||||
<data name=">>myTablePanel2.Type" xml:space="preserve">
|
||||
<value>PckStudio.Forms.MyTablePanel, PCK-Studio, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>myTablePanel2.Parent" xml:space="preserve">
|
||||
<value>tabPage1</value>
|
||||
@@ -1413,16 +1413,16 @@
|
||||
<data name="Z.Width" type="System.Int32, mscorlib">
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="Width.Text" xml:space="preserve">
|
||||
<data name="_Width.Text" xml:space="preserve">
|
||||
<value>Width</value>
|
||||
</data>
|
||||
<data name="Width.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<data name="_Width.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="Height.Text" xml:space="preserve">
|
||||
<data name="_Height.Text" xml:space="preserve">
|
||||
<value>Height</value>
|
||||
</data>
|
||||
<data name="Height.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<data name="_Height.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="Length.Text" xml:space="preserve">
|
||||
@@ -3267,16 +3267,16 @@
|
||||
<data name=">>Z.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>Width.Name" xml:space="preserve">
|
||||
<value>Width</value>
|
||||
<data name=">>_Width.Name" xml:space="preserve">
|
||||
<value>_Width</value>
|
||||
</data>
|
||||
<data name=">>Width.Type" xml:space="preserve">
|
||||
<data name=">>_Width.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>Height.Name" xml:space="preserve">
|
||||
<value>Height</value>
|
||||
<data name=">>_Height.Name" xml:space="preserve">
|
||||
<value>_Height</value>
|
||||
</data>
|
||||
<data name=">>Height.Type" xml:space="preserve">
|
||||
<data name=">>_Height.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>Length.Name" xml:space="preserve">
|
||||
|
||||
18
PCK-Studio/Forms/Utilities/AnimationResources.cs
Normal file
18
PCK-Studio/Forms/Utilities/AnimationResources.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Extensions;
|
||||
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public static class AnimationResources
|
||||
{
|
||||
public static string GetAnimationSection(bool isItem) => isItem ? "items" : "blocks";
|
||||
|
||||
public static readonly JObject tileData = JObject.Parse(Resources.tileData);
|
||||
private static Image[] _tileImages;
|
||||
public static Image[] tileImages => _tileImages ??= Resources.terrain_sheet.CreateImageList(16).Concat(Resources.items_sheet.CreateImageList(16)).ToArray();
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
using PckStudio.Properties;
|
||||
using System.Drawing.Imaging;
|
||||
using PckStudio.Classes.Extentions;
|
||||
using OMI.Formats.Pck;
|
||||
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public static class AnimationUtil
|
||||
{
|
||||
public static string GetAnimationSection(bool isItem) => isItem ? "items" : "blocks";
|
||||
|
||||
public static readonly JObject tileData = JObject.Parse(Resources.tileData);
|
||||
private static Image[] _tileImages;
|
||||
|
||||
public static Image[] tileImages => _tileImages ??= Resources.terrain_sheet.CreateImageList(16).Concat(Resources.items_sheet.CreateImageList(16)).ToArray();
|
||||
|
||||
public static PckFile.FileData CreateNewAnimationFile(Image source, string tileName, bool isItem)
|
||||
{
|
||||
PckFile.FileData file = new PckFile.FileData($"res/textures/{GetAnimationSection(isItem)}/{tileName}.png", PckFile.FileData.FileType.TextureFile);
|
||||
file.Properties.Add(("ANIM", string.Empty));
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
source.Save(stream, ImageFormat.Png);
|
||||
file.SetData(stream.ToArray());
|
||||
}
|
||||
return file;
|
||||
}
|
||||
}
|
||||
}
|
||||
28
PCK-Studio/Forms/Utilities/BehaviourResources.cs
Normal file
28
PCK-Studio/Forms/Utilities/BehaviourResources.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Extensions;
|
||||
using OMI.Formats.Behaviour;
|
||||
using OMI.Workers.Behaviour;
|
||||
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public static class BehaviourResources
|
||||
{
|
||||
public static readonly JObject entityData = JObject.Parse(Resources.entityData);
|
||||
private static Image[] _entityImages;
|
||||
|
||||
public static Image[] entityImages => _entityImages ??= Resources.entities_sheet.CreateImageList(32).ToArray();
|
||||
|
||||
internal static byte[] BehaviourFileInitializer()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
var writer = new BehavioursWriter(new BehaviourFile());
|
||||
writer.WriteToStream(stream);
|
||||
return stream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Classes.Extentions;
|
||||
using OMI.Formats.Behaviour;
|
||||
using OMI.Workers.Behaviour;
|
||||
using OMI.Formats.Pck;
|
||||
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public static class BehaviourUtil
|
||||
{
|
||||
public static readonly JObject entityData = JObject.Parse(Resources.entityBehaviourData);
|
||||
private static Image[] _entityImages;
|
||||
|
||||
public static Image[] entityImages => _entityImages ??= Resources.entities_sheet.CreateImageList(32).ToArray();
|
||||
|
||||
public static PckFile.FileData CreateNewBehaviourFile()
|
||||
{
|
||||
PckFile.FileData file = new PckFile.FileData($"behaviours.bin", PckFile.FileData.FileType.BehavioursFile);
|
||||
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
var writer = new BehavioursWriter(new BehaviourFile());
|
||||
writer.WriteToStream(stream);
|
||||
file.SetData(stream.ToArray());
|
||||
}
|
||||
|
||||
return file;
|
||||
}
|
||||
}
|
||||
}
|
||||
33
PCK-Studio/Forms/Utilities/MaterialResources.cs
Normal file
33
PCK-Studio/Forms/Utilities/MaterialResources.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Extensions;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Formats.Material;
|
||||
using OMI.Workers.Material;
|
||||
using System;
|
||||
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public static class MaterialResources
|
||||
{
|
||||
public static readonly JObject entityData = JObject.Parse(Resources.entityData);
|
||||
private static Image[] _entityImages;
|
||||
public static Image[] entityImages => _entityImages ??= Resources.entities_sheet.CreateImageList(32).ToArray();
|
||||
|
||||
public static byte[] MaterialsFileInitializer()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
var matFile = new MaterialContainer
|
||||
{
|
||||
new MaterialContainer.Material("bat", "entity_alphatest")
|
||||
};
|
||||
var writer = new MaterialFileWriter(matFile);
|
||||
writer.WriteToStream(stream);
|
||||
return stream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Classes.Extentions;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Formats.Material;
|
||||
using OMI.Workers.Material;
|
||||
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public static class MaterialUtil
|
||||
{
|
||||
public static readonly JObject entityData = JObject.Parse(Resources.entityMaterialData);
|
||||
private static Image[] _entityImages;
|
||||
public static Image[] entityImages => _entityImages ??= Resources.entities_sheet.CreateImageList(32).ToArray();
|
||||
|
||||
public static PckFile.FileData CreateNewMaterialsFile()
|
||||
{
|
||||
PckFile.FileData file = new PckFile.FileData($"entityMaterials.bin", PckFile.FileData.FileType.MaterialFile);
|
||||
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
var matFile = new MaterialContainer
|
||||
{
|
||||
new MaterialContainer.Material("bat", "entity_alphatest")
|
||||
};
|
||||
var writer = new MaterialFileWriter(matFile);
|
||||
writer.WriteToStream(stream);
|
||||
file.SetData(stream.ToArray());
|
||||
}
|
||||
|
||||
return file;
|
||||
}
|
||||
}
|
||||
}
|
||||
29
PCK-Studio/Forms/Utilities/ModelsResources.cs
Normal file
29
PCK-Studio/Forms/Utilities/ModelsResources.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Extensions;
|
||||
using OMI.Formats.Model;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Workers.Model;
|
||||
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public static class ModelsResources
|
||||
{
|
||||
public static readonly JObject entityData = JObject.Parse(Resources.entityData);
|
||||
private static Image[] _entityImages;
|
||||
|
||||
public static Image[] entityImages => _entityImages ??= Resources.entities_sheet.CreateImageList(32).ToArray();
|
||||
|
||||
public static byte[] ModelsFileInitializer()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
var writer = new ModelFileWriter(new ModelContainer());
|
||||
writer.WriteToStream(stream);
|
||||
return stream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Classes.Extentions;
|
||||
using OMI.Formats.Model;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Workers.Model;
|
||||
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public static class ModelsUtil
|
||||
{
|
||||
public static readonly JObject entityData = JObject.Parse(Resources.entityModelData);
|
||||
private static Image[] _entityImages;
|
||||
|
||||
public static Image[] entityImages => _entityImages ??= Resources.entities_sheet.CreateImageList(32).ToArray();
|
||||
|
||||
public static PckFile.FileData CreateNewModelsFile()
|
||||
{
|
||||
PckFile.FileData file = new PckFile.FileData($"models.bin", PckFile.FileData.FileType.ModelsFile);
|
||||
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
var writer = new ModelFileWriter(new ModelContainer());
|
||||
writer.WriteToStream(stream);
|
||||
file.SetData(stream.ToArray());
|
||||
}
|
||||
|
||||
return file;
|
||||
}
|
||||
}
|
||||
}
|
||||
782
PCK-Studio/Forms/Utilities/Skins/ANIMEditor.Designer.cs
generated
782
PCK-Studio/Forms/Utilities/Skins/ANIMEditor.Designer.cs
generated
@@ -1,782 +0,0 @@
|
||||
namespace PckStudio.Forms.Utilities.Skins
|
||||
{
|
||||
partial class ANIMEditor
|
||||
{
|
||||
/// <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.closeButton = new MetroFramework.Controls.MetroButton();
|
||||
this.effectsGroup = new System.Windows.Forms.GroupBox();
|
||||
this.rightLegOCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.headOCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.leftLegOCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.leftArmOCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.bodyOCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.rightLegCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.slimCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.headCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.leftLegCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.rightArmCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.leftArmCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.bodyCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.classicCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.rightArmOCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.effectsGroup2 = new System.Windows.Forms.GroupBox();
|
||||
this.rightLeggingCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.helmetCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.leftLeggingCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.rightArmorCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.leftArmorCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.chestplateCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.unknownCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.crouchCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.dinnerboneCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.noArmorCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.bobbingCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.santaCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.syncLegsCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.staticArmsCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.syncArmsCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.statueCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.zombieCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.staticLegsCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.copyButton = new MetroFramework.Controls.MetroButton();
|
||||
this.importButton = new MetroFramework.Controls.MetroButton();
|
||||
this.exportButton = new MetroFramework.Controls.MetroButton();
|
||||
this.animValue = new MetroFramework.Controls.MetroLabel();
|
||||
this.uncheckButton = new MetroFramework.Controls.MetroButton();
|
||||
this.checkButton = new MetroFramework.Controls.MetroButton();
|
||||
this.toolTip = new MetroFramework.Components.MetroToolTip();
|
||||
this.resetButton = new MetroFramework.Controls.MetroButton();
|
||||
this.templateButton = new MetroFramework.Controls.MetroButton();
|
||||
this.effectsGroup.SuspendLayout();
|
||||
this.effectsGroup2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// closeButton
|
||||
//
|
||||
this.closeButton.Location = new System.Drawing.Point(250, 514);
|
||||
this.closeButton.Name = "closeButton";
|
||||
this.closeButton.Size = new System.Drawing.Size(126, 23);
|
||||
this.closeButton.TabIndex = 1;
|
||||
this.closeButton.Text = "Save";
|
||||
this.closeButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.closeButton.UseSelectable = true;
|
||||
this.closeButton.Click += new System.EventHandler(this.closeButton_Click);
|
||||
//
|
||||
// effectsGroup
|
||||
//
|
||||
this.effectsGroup.Controls.Add(this.rightLegOCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.headOCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.leftLegOCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.leftArmOCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.bodyOCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.rightLegCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.slimCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.headCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.leftLegCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.rightArmCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.leftArmCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.bodyCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.classicCheckBox);
|
||||
this.effectsGroup.Controls.Add(this.rightArmOCheckBox);
|
||||
this.effectsGroup.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.effectsGroup.Location = new System.Drawing.Point(22, 148);
|
||||
this.effectsGroup.Name = "effectsGroup";
|
||||
this.effectsGroup.Size = new System.Drawing.Size(393, 238);
|
||||
this.effectsGroup.TabIndex = 2;
|
||||
this.effectsGroup.TabStop = false;
|
||||
this.effectsGroup.Text = "Skin Flags";
|
||||
//
|
||||
// rightLegOCheckBox
|
||||
//
|
||||
this.rightLegOCheckBox.AutoSize = true;
|
||||
this.rightLegOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.rightLegOCheckBox.Location = new System.Drawing.Point(180, 208);
|
||||
this.rightLegOCheckBox.Name = "rightLegOCheckBox";
|
||||
this.rightLegOCheckBox.Size = new System.Drawing.Size(199, 19);
|
||||
this.rightLegOCheckBox.TabIndex = 13;
|
||||
this.rightLegOCheckBox.Text = "Remove Right Leg Layer Box";
|
||||
this.rightLegOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.rightLegOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.rightLegOCheckBox.UseSelectable = true;
|
||||
//
|
||||
// headOCheckBox
|
||||
//
|
||||
this.headOCheckBox.AutoSize = true;
|
||||
this.headOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.headOCheckBox.Location = new System.Drawing.Point(180, 50);
|
||||
this.headOCheckBox.Name = "headOCheckBox";
|
||||
this.headOCheckBox.Size = new System.Drawing.Size(173, 19);
|
||||
this.headOCheckBox.TabIndex = 12;
|
||||
this.headOCheckBox.Text = "Remove Head Layer Box";
|
||||
this.headOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.headOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.headOCheckBox.UseSelectable = true;
|
||||
//
|
||||
// leftLegOCheckBox
|
||||
//
|
||||
this.leftLegOCheckBox.AutoSize = true;
|
||||
this.leftLegOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.leftLegOCheckBox.Location = new System.Drawing.Point(180, 174);
|
||||
this.leftLegOCheckBox.Name = "leftLegOCheckBox";
|
||||
this.leftLegOCheckBox.Size = new System.Drawing.Size(190, 19);
|
||||
this.leftLegOCheckBox.TabIndex = 11;
|
||||
this.leftLegOCheckBox.Text = "Remove Left Leg Layer Box";
|
||||
this.leftLegOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.leftLegOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.leftLegOCheckBox.UseSelectable = true;
|
||||
//
|
||||
// leftArmOCheckBox
|
||||
//
|
||||
this.leftArmOCheckBox.AutoSize = true;
|
||||
this.leftArmOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.leftArmOCheckBox.Location = new System.Drawing.Point(180, 112);
|
||||
this.leftArmOCheckBox.Name = "leftArmOCheckBox";
|
||||
this.leftArmOCheckBox.Size = new System.Drawing.Size(194, 19);
|
||||
this.leftArmOCheckBox.TabIndex = 9;
|
||||
this.leftArmOCheckBox.Text = "Remove Left Arm Layer Box";
|
||||
this.leftArmOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.leftArmOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.leftArmOCheckBox.UseSelectable = true;
|
||||
//
|
||||
// bodyOCheckBox
|
||||
//
|
||||
this.bodyOCheckBox.AutoSize = true;
|
||||
this.bodyOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.bodyOCheckBox.Location = new System.Drawing.Point(180, 81);
|
||||
this.bodyOCheckBox.Name = "bodyOCheckBox";
|
||||
this.bodyOCheckBox.Size = new System.Drawing.Size(172, 19);
|
||||
this.bodyOCheckBox.TabIndex = 8;
|
||||
this.bodyOCheckBox.Text = "Remove Body Layer Box";
|
||||
this.bodyOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.bodyOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.bodyOCheckBox.UseSelectable = true;
|
||||
//
|
||||
// rightLegCheckBox
|
||||
//
|
||||
this.rightLegCheckBox.AutoSize = true;
|
||||
this.rightLegCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.rightLegCheckBox.Location = new System.Drawing.Point(6, 208);
|
||||
this.rightLegCheckBox.Name = "rightLegCheckBox";
|
||||
this.rightLegCheckBox.Size = new System.Drawing.Size(162, 19);
|
||||
this.rightLegCheckBox.TabIndex = 7;
|
||||
this.rightLegCheckBox.Text = "Remove Right Leg Box";
|
||||
this.rightLegCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.rightLegCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.rightLegCheckBox.UseSelectable = true;
|
||||
//
|
||||
// slimCheckBox
|
||||
//
|
||||
this.slimCheckBox.AutoSize = true;
|
||||
this.slimCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.slimCheckBox.Location = new System.Drawing.Point(180, 19);
|
||||
this.slimCheckBox.Name = "slimCheckBox";
|
||||
this.slimCheckBox.Size = new System.Drawing.Size(151, 19);
|
||||
this.slimCheckBox.TabIndex = 6;
|
||||
this.slimCheckBox.Text = "64x64 Alex/Slim Skin";
|
||||
this.slimCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.slimCheckBox, " The 1.8 style skin type with slim arms, overlays for each part, and sep" +
|
||||
"arate textures for right and left limbs. Resolution is also set to 64x64. " +
|
||||
" ");
|
||||
this.slimCheckBox.UseSelectable = true;
|
||||
//
|
||||
// headCheckBox
|
||||
//
|
||||
this.headCheckBox.AutoSize = true;
|
||||
this.headCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.headCheckBox.Location = new System.Drawing.Point(6, 50);
|
||||
this.headCheckBox.Name = "headCheckBox";
|
||||
this.headCheckBox.Size = new System.Drawing.Size(136, 19);
|
||||
this.headCheckBox.TabIndex = 5;
|
||||
this.headCheckBox.Text = "Remove Head Box";
|
||||
this.headCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.headCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.headCheckBox.UseSelectable = true;
|
||||
//
|
||||
// leftLegCheckBox
|
||||
//
|
||||
this.leftLegCheckBox.AutoSize = true;
|
||||
this.leftLegCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.leftLegCheckBox.Location = new System.Drawing.Point(6, 174);
|
||||
this.leftLegCheckBox.Name = "leftLegCheckBox";
|
||||
this.leftLegCheckBox.Size = new System.Drawing.Size(153, 19);
|
||||
this.leftLegCheckBox.TabIndex = 4;
|
||||
this.leftLegCheckBox.Text = "Remove Left Leg Box";
|
||||
this.leftLegCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.leftLegCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.leftLegCheckBox.UseSelectable = true;
|
||||
//
|
||||
// rightArmCheckBox
|
||||
//
|
||||
this.rightArmCheckBox.AutoSize = true;
|
||||
this.rightArmCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.rightArmCheckBox.Location = new System.Drawing.Point(6, 143);
|
||||
this.rightArmCheckBox.Name = "rightArmCheckBox";
|
||||
this.rightArmCheckBox.Size = new System.Drawing.Size(166, 19);
|
||||
this.rightArmCheckBox.TabIndex = 3;
|
||||
this.rightArmCheckBox.Text = "Remove Right Arm Box";
|
||||
this.rightArmCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.rightArmCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.rightArmCheckBox.UseSelectable = true;
|
||||
//
|
||||
// leftArmCheckBox
|
||||
//
|
||||
this.leftArmCheckBox.AutoSize = true;
|
||||
this.leftArmCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.leftArmCheckBox.Location = new System.Drawing.Point(6, 112);
|
||||
this.leftArmCheckBox.Name = "leftArmCheckBox";
|
||||
this.leftArmCheckBox.Size = new System.Drawing.Size(157, 19);
|
||||
this.leftArmCheckBox.TabIndex = 2;
|
||||
this.leftArmCheckBox.Text = "Remove Left Arm Box";
|
||||
this.leftArmCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.leftArmCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.leftArmCheckBox.UseSelectable = true;
|
||||
//
|
||||
// bodyCheckBox
|
||||
//
|
||||
this.bodyCheckBox.AutoSize = true;
|
||||
this.bodyCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.bodyCheckBox.Location = new System.Drawing.Point(6, 81);
|
||||
this.bodyCheckBox.Name = "bodyCheckBox";
|
||||
this.bodyCheckBox.Size = new System.Drawing.Size(135, 19);
|
||||
this.bodyCheckBox.TabIndex = 1;
|
||||
this.bodyCheckBox.Text = "Remove Body Box";
|
||||
this.bodyCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.bodyCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.bodyCheckBox.UseSelectable = true;
|
||||
//
|
||||
// classicCheckBox
|
||||
//
|
||||
this.classicCheckBox.AutoSize = true;
|
||||
this.classicCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.classicCheckBox.Location = new System.Drawing.Point(6, 19);
|
||||
this.classicCheckBox.Name = "classicCheckBox";
|
||||
this.classicCheckBox.Size = new System.Drawing.Size(136, 19);
|
||||
this.classicCheckBox.TabIndex = 0;
|
||||
this.classicCheckBox.Text = "64x64 Classic Skin";
|
||||
this.classicCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.classicCheckBox, " The 1.8 style skin type with overlays for each part and separate textur" +
|
||||
"es for right and left limbs. Resolution is also set to 64x64. ");
|
||||
this.classicCheckBox.UseSelectable = true;
|
||||
//
|
||||
// rightArmOCheckBox
|
||||
//
|
||||
this.rightArmOCheckBox.AutoSize = true;
|
||||
this.rightArmOCheckBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.rightArmOCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.rightArmOCheckBox.Location = new System.Drawing.Point(180, 143);
|
||||
this.rightArmOCheckBox.Name = "rightArmOCheckBox";
|
||||
this.rightArmOCheckBox.Size = new System.Drawing.Size(203, 19);
|
||||
this.rightArmOCheckBox.TabIndex = 10;
|
||||
this.rightArmOCheckBox.Text = "Remove Right Arm Layer Box";
|
||||
this.rightArmOCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.rightArmOCheckBox, " Removes the parent Box for this part. You can still make new boxes f" +
|
||||
"or this part. Armor will be disabled for this part, but can be rendered again wi" +
|
||||
"th the armor flags. ");
|
||||
this.rightArmOCheckBox.UseSelectable = true;
|
||||
//
|
||||
// effectsGroup2
|
||||
//
|
||||
this.effectsGroup2.Controls.Add(this.rightLeggingCheckBox);
|
||||
this.effectsGroup2.Controls.Add(this.helmetCheckBox);
|
||||
this.effectsGroup2.Controls.Add(this.leftLeggingCheckBox);
|
||||
this.effectsGroup2.Controls.Add(this.rightArmorCheckBox);
|
||||
this.effectsGroup2.Controls.Add(this.leftArmorCheckBox);
|
||||
this.effectsGroup2.Controls.Add(this.chestplateCheckBox);
|
||||
this.effectsGroup2.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.effectsGroup2.Location = new System.Drawing.Point(421, 183);
|
||||
this.effectsGroup2.Name = "effectsGroup2";
|
||||
this.effectsGroup2.Size = new System.Drawing.Size(188, 203);
|
||||
this.effectsGroup2.TabIndex = 14;
|
||||
this.effectsGroup2.TabStop = false;
|
||||
this.effectsGroup2.Text = "Armor Flags";
|
||||
//
|
||||
// rightLeggingCheckBox
|
||||
//
|
||||
this.rightLeggingCheckBox.AutoSize = true;
|
||||
this.rightLeggingCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.rightLeggingCheckBox.Location = new System.Drawing.Point(6, 174);
|
||||
this.rightLeggingCheckBox.Name = "rightLeggingCheckBox";
|
||||
this.rightLeggingCheckBox.Size = new System.Drawing.Size(173, 19);
|
||||
this.rightLeggingCheckBox.TabIndex = 7;
|
||||
this.rightLeggingCheckBox.Text = "Render Right Leg Armor";
|
||||
this.rightLeggingCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.rightLeggingCheckBox, " Forcefully enables the specified armor piece.");
|
||||
this.rightLeggingCheckBox.UseSelectable = true;
|
||||
//
|
||||
// helmetCheckBox
|
||||
//
|
||||
this.helmetCheckBox.AutoSize = true;
|
||||
this.helmetCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.helmetCheckBox.Location = new System.Drawing.Point(6, 19);
|
||||
this.helmetCheckBox.Name = "helmetCheckBox";
|
||||
this.helmetCheckBox.Size = new System.Drawing.Size(147, 19);
|
||||
this.helmetCheckBox.TabIndex = 5;
|
||||
this.helmetCheckBox.Text = "Render Head Armor";
|
||||
this.helmetCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.helmetCheckBox, " Forcefully enables the specified armor piece.");
|
||||
this.helmetCheckBox.UseSelectable = true;
|
||||
//
|
||||
// leftLeggingCheckBox
|
||||
//
|
||||
this.leftLeggingCheckBox.AutoSize = true;
|
||||
this.leftLeggingCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.leftLeggingCheckBox.Location = new System.Drawing.Point(6, 143);
|
||||
this.leftLeggingCheckBox.Name = "leftLeggingCheckBox";
|
||||
this.leftLeggingCheckBox.Size = new System.Drawing.Size(164, 19);
|
||||
this.leftLeggingCheckBox.TabIndex = 4;
|
||||
this.leftLeggingCheckBox.Text = "Render Left Leg Armor";
|
||||
this.leftLeggingCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.leftLeggingCheckBox, " Forcefully enables the specified armor piece.");
|
||||
this.leftLeggingCheckBox.UseSelectable = true;
|
||||
//
|
||||
// rightArmorCheckBox
|
||||
//
|
||||
this.rightArmorCheckBox.AutoSize = true;
|
||||
this.rightArmorCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.rightArmorCheckBox.Location = new System.Drawing.Point(6, 112);
|
||||
this.rightArmorCheckBox.Name = "rightArmorCheckBox";
|
||||
this.rightArmorCheckBox.Size = new System.Drawing.Size(177, 19);
|
||||
this.rightArmorCheckBox.TabIndex = 3;
|
||||
this.rightArmorCheckBox.Text = "Render Right Arm Armor";
|
||||
this.rightArmorCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.rightArmorCheckBox, " Forcefully enables the specified armor piece.");
|
||||
this.rightArmorCheckBox.UseSelectable = true;
|
||||
//
|
||||
// leftArmorCheckBox
|
||||
//
|
||||
this.leftArmorCheckBox.AutoSize = true;
|
||||
this.leftArmorCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.leftArmorCheckBox.Location = new System.Drawing.Point(6, 81);
|
||||
this.leftArmorCheckBox.Name = "leftArmorCheckBox";
|
||||
this.leftArmorCheckBox.Size = new System.Drawing.Size(168, 19);
|
||||
this.leftArmorCheckBox.TabIndex = 2;
|
||||
this.leftArmorCheckBox.Text = "Render Left Arm Armor";
|
||||
this.leftArmorCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.leftArmorCheckBox, " Forcefully enables the specified armor piece.");
|
||||
this.leftArmorCheckBox.UseSelectable = true;
|
||||
//
|
||||
// chestplateCheckBox
|
||||
//
|
||||
this.chestplateCheckBox.AutoSize = true;
|
||||
this.chestplateCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.chestplateCheckBox.Location = new System.Drawing.Point(6, 50);
|
||||
this.chestplateCheckBox.Name = "chestplateCheckBox";
|
||||
this.chestplateCheckBox.Size = new System.Drawing.Size(146, 19);
|
||||
this.chestplateCheckBox.TabIndex = 1;
|
||||
this.chestplateCheckBox.Text = "Render Body Armor";
|
||||
this.chestplateCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.chestplateCheckBox, " Forcefully enables the specified armor piece.");
|
||||
this.chestplateCheckBox.UseSelectable = true;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.unknownCheckBox);
|
||||
this.groupBox1.Controls.Add(this.crouchCheckBox);
|
||||
this.groupBox1.Controls.Add(this.dinnerboneCheckBox);
|
||||
this.groupBox1.Controls.Add(this.noArmorCheckBox);
|
||||
this.groupBox1.Controls.Add(this.bobbingCheckBox);
|
||||
this.groupBox1.Controls.Add(this.santaCheckBox);
|
||||
this.groupBox1.Controls.Add(this.syncLegsCheckBox);
|
||||
this.groupBox1.Controls.Add(this.staticArmsCheckBox);
|
||||
this.groupBox1.Controls.Add(this.syncArmsCheckBox);
|
||||
this.groupBox1.Controls.Add(this.statueCheckBox);
|
||||
this.groupBox1.Controls.Add(this.zombieCheckBox);
|
||||
this.groupBox1.Controls.Add(this.staticLegsCheckBox);
|
||||
this.groupBox1.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.groupBox1.Location = new System.Drawing.Point(22, 388);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(587, 115);
|
||||
this.groupBox1.TabIndex = 15;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Special Animations";
|
||||
//
|
||||
// unknownCheckBox
|
||||
//
|
||||
this.unknownCheckBox.AutoSize = true;
|
||||
this.unknownCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.unknownCheckBox.Location = new System.Drawing.Point(126, 81);
|
||||
this.unknownCheckBox.Name = "unknownCheckBox";
|
||||
this.unknownCheckBox.Size = new System.Drawing.Size(84, 19);
|
||||
this.unknownCheckBox.TabIndex = 13;
|
||||
this.unknownCheckBox.Text = "Unknown";
|
||||
this.unknownCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.unknownCheckBox, " If you figure out what this is. Please reach out to MNL#8935 on Discord. (: " +
|
||||
"");
|
||||
this.unknownCheckBox.UseSelectable = true;
|
||||
//
|
||||
// crouchCheckBox
|
||||
//
|
||||
this.crouchCheckBox.AutoSize = true;
|
||||
this.crouchCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.crouchCheckBox.Location = new System.Drawing.Point(126, 50);
|
||||
this.crouchCheckBox.Name = "crouchCheckBox";
|
||||
this.crouchCheckBox.Size = new System.Drawing.Size(137, 19);
|
||||
this.crouchCheckBox.TabIndex = 12;
|
||||
this.crouchCheckBox.Text = "Backwards Crouch";
|
||||
this.crouchCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.crouchCheckBox, " The crouch animation is reversed so that the arms and body lean back. Usefu" +
|
||||
"l for small skins. ");
|
||||
this.crouchCheckBox.UseSelectable = true;
|
||||
//
|
||||
// dinnerboneCheckBox
|
||||
//
|
||||
this.dinnerboneCheckBox.AutoSize = true;
|
||||
this.dinnerboneCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.dinnerboneCheckBox.Location = new System.Drawing.Point(126, 19);
|
||||
this.dinnerboneCheckBox.Name = "dinnerboneCheckBox";
|
||||
this.dinnerboneCheckBox.Size = new System.Drawing.Size(97, 19);
|
||||
this.dinnerboneCheckBox.TabIndex = 11;
|
||||
this.dinnerboneCheckBox.Text = "Dinnerbone";
|
||||
this.dinnerboneCheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.dinnerboneCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.dinnerboneCheckBox, " Flips the skin upside down like Dinnerbone\'s skin, a Minecraft developer. ");
|
||||
this.dinnerboneCheckBox.UseSelectable = true;
|
||||
//
|
||||
// noArmorCheckBox
|
||||
//
|
||||
this.noArmorCheckBox.AutoSize = true;
|
||||
this.noArmorCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.noArmorCheckBox.Location = new System.Drawing.Point(420, 81);
|
||||
this.noArmorCheckBox.Name = "noArmorCheckBox";
|
||||
this.noArmorCheckBox.Size = new System.Drawing.Size(131, 19);
|
||||
this.noArmorCheckBox.TabIndex = 10;
|
||||
this.noArmorCheckBox.Text = "Disable All Armor";
|
||||
this.noArmorCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.noArmorCheckBox, " Disables all armor desptie the armor flags. ");
|
||||
this.noArmorCheckBox.UseSelectable = true;
|
||||
//
|
||||
// bobbingCheckBox
|
||||
//
|
||||
this.bobbingCheckBox.AutoSize = true;
|
||||
this.bobbingCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.bobbingCheckBox.Location = new System.Drawing.Point(272, 50);
|
||||
this.bobbingCheckBox.Name = "bobbingCheckBox";
|
||||
this.bobbingCheckBox.Size = new System.Drawing.Size(124, 19);
|
||||
this.bobbingCheckBox.TabIndex = 9;
|
||||
this.bobbingCheckBox.Text = "Disable Bobbing";
|
||||
this.bobbingCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.bobbingCheckBox, " Disables the bobbing effect in first person.");
|
||||
this.bobbingCheckBox.UseSelectable = true;
|
||||
//
|
||||
// santaCheckBox
|
||||
//
|
||||
this.santaCheckBox.AutoSize = true;
|
||||
this.santaCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.santaCheckBox.Location = new System.Drawing.Point(420, 50);
|
||||
this.santaCheckBox.Name = "santaCheckBox";
|
||||
this.santaCheckBox.Size = new System.Drawing.Size(86, 19);
|
||||
this.santaCheckBox.TabIndex = 8;
|
||||
this.santaCheckBox.Text = "Bad Santa";
|
||||
this.santaCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.santaCheckBox, " The skin sits down after about 10 seconds of no controller input. Made for" +
|
||||
" Bad Santa in the \"Festive\" skin pack. ");
|
||||
this.santaCheckBox.UseSelectable = true;
|
||||
//
|
||||
// syncLegsCheckBox
|
||||
//
|
||||
this.syncLegsCheckBox.AutoSize = true;
|
||||
this.syncLegsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.syncLegsCheckBox.Location = new System.Drawing.Point(272, 19);
|
||||
this.syncLegsCheckBox.Name = "syncLegsCheckBox";
|
||||
this.syncLegsCheckBox.Size = new System.Drawing.Size(136, 19);
|
||||
this.syncLegsCheckBox.TabIndex = 7;
|
||||
this.syncLegsCheckBox.Text = "Synchronous Legs";
|
||||
this.syncLegsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.syncLegsCheckBox, " These parts will move at the same time and angle as each other. ");
|
||||
this.syncLegsCheckBox.UseSelectable = true;
|
||||
//
|
||||
// staticArmsCheckBox
|
||||
//
|
||||
this.staticArmsCheckBox.AutoSize = true;
|
||||
this.staticArmsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.staticArmsCheckBox.Location = new System.Drawing.Point(6, 19);
|
||||
this.staticArmsCheckBox.Name = "staticArmsCheckBox";
|
||||
this.staticArmsCheckBox.Size = new System.Drawing.Size(94, 19);
|
||||
this.staticArmsCheckBox.TabIndex = 5;
|
||||
this.staticArmsCheckBox.Text = "Static Arms";
|
||||
this.staticArmsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.staticArmsCheckBox, " These parts will not move in most animations. ");
|
||||
this.staticArmsCheckBox.UseSelectable = true;
|
||||
//
|
||||
// syncArmsCheckBox
|
||||
//
|
||||
this.syncArmsCheckBox.AutoSize = true;
|
||||
this.syncArmsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.syncArmsCheckBox.Location = new System.Drawing.Point(420, 19);
|
||||
this.syncArmsCheckBox.Name = "syncArmsCheckBox";
|
||||
this.syncArmsCheckBox.Size = new System.Drawing.Size(140, 19);
|
||||
this.syncArmsCheckBox.TabIndex = 4;
|
||||
this.syncArmsCheckBox.Text = "Synchronous Arms";
|
||||
this.syncArmsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.syncArmsCheckBox, " These parts will move at the same time and angle as each other. ");
|
||||
this.syncArmsCheckBox.UseSelectable = true;
|
||||
//
|
||||
// statueCheckBox
|
||||
//
|
||||
this.statueCheckBox.AutoSize = true;
|
||||
this.statueCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.statueCheckBox.Location = new System.Drawing.Point(272, 81);
|
||||
this.statueCheckBox.Name = "statueCheckBox";
|
||||
this.statueCheckBox.Size = new System.Drawing.Size(126, 19);
|
||||
this.statueCheckBox.TabIndex = 3;
|
||||
this.statueCheckBox.Text = "Statue of Liberty";
|
||||
this.statueCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.statueCheckBox, " The right arm is lifted like the Statue of Liberty. Made for Angel of Libe" +
|
||||
"rty in the \"Doctor Who Volume I\" skin pack. ");
|
||||
this.statueCheckBox.UseSelectable = true;
|
||||
//
|
||||
// zombieCheckBox
|
||||
//
|
||||
this.zombieCheckBox.AutoSize = true;
|
||||
this.zombieCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.zombieCheckBox.Location = new System.Drawing.Point(6, 81);
|
||||
this.zombieCheckBox.Name = "zombieCheckBox";
|
||||
this.zombieCheckBox.Size = new System.Drawing.Size(107, 19);
|
||||
this.zombieCheckBox.TabIndex = 2;
|
||||
this.zombieCheckBox.Text = "Zombie Arms";
|
||||
this.zombieCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.zombieCheckBox, " Both arms will stick up like a Zombie. ");
|
||||
this.zombieCheckBox.UseSelectable = true;
|
||||
//
|
||||
// staticLegsCheckBox
|
||||
//
|
||||
this.staticLegsCheckBox.AutoSize = true;
|
||||
this.staticLegsCheckBox.FontSize = MetroFramework.MetroCheckBoxSize.Medium;
|
||||
this.staticLegsCheckBox.Location = new System.Drawing.Point(6, 50);
|
||||
this.staticLegsCheckBox.Name = "staticLegsCheckBox";
|
||||
this.staticLegsCheckBox.Size = new System.Drawing.Size(90, 19);
|
||||
this.staticLegsCheckBox.TabIndex = 1;
|
||||
this.staticLegsCheckBox.Text = "Static Legs";
|
||||
this.staticLegsCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.toolTip.SetToolTip(this.staticLegsCheckBox, " These parts will not move in most animations. ");
|
||||
this.staticLegsCheckBox.UseSelectable = true;
|
||||
//
|
||||
// copyButton
|
||||
//
|
||||
this.copyButton.Location = new System.Drawing.Point(425, 119);
|
||||
this.copyButton.Name = "copyButton";
|
||||
this.copyButton.Size = new System.Drawing.Size(173, 23);
|
||||
this.copyButton.TabIndex = 22;
|
||||
this.copyButton.Text = "Copy ANIM Value";
|
||||
this.copyButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.copyButton.UseSelectable = true;
|
||||
this.copyButton.Click += new System.EventHandler(this.copyButton_Click);
|
||||
//
|
||||
// importButton
|
||||
//
|
||||
this.importButton.Location = new System.Drawing.Point(32, 119);
|
||||
this.importButton.Name = "importButton";
|
||||
this.importButton.Size = new System.Drawing.Size(186, 23);
|
||||
this.importButton.TabIndex = 23;
|
||||
this.importButton.Text = "Import ANIM";
|
||||
this.importButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.importButton.UseSelectable = true;
|
||||
this.importButton.Click += new System.EventHandler(this.importButton_Click);
|
||||
//
|
||||
// exportButton
|
||||
//
|
||||
this.exportButton.Location = new System.Drawing.Point(229, 119);
|
||||
this.exportButton.Name = "exportButton";
|
||||
this.exportButton.Size = new System.Drawing.Size(186, 23);
|
||||
this.exportButton.TabIndex = 24;
|
||||
this.exportButton.Text = "Export Template Texture";
|
||||
this.exportButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.exportButton.UseSelectable = true;
|
||||
this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
|
||||
//
|
||||
// animValue
|
||||
//
|
||||
this.animValue.AutoSize = true;
|
||||
this.animValue.FontSize = MetroFramework.MetroLabelSize.Tall;
|
||||
this.animValue.FontWeight = MetroFramework.MetroLabelWeight.Regular;
|
||||
this.animValue.Location = new System.Drawing.Point(260, 60);
|
||||
this.animValue.Name = "animValue";
|
||||
this.animValue.Size = new System.Drawing.Size(110, 25);
|
||||
this.animValue.TabIndex = 25;
|
||||
this.animValue.Text = "0x00000000";
|
||||
this.animValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.animValue.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// uncheckButton
|
||||
//
|
||||
this.uncheckButton.Location = new System.Drawing.Point(229, 90);
|
||||
this.uncheckButton.Name = "uncheckButton";
|
||||
this.uncheckButton.Size = new System.Drawing.Size(186, 23);
|
||||
this.uncheckButton.TabIndex = 26;
|
||||
this.uncheckButton.Text = "Uncheck All";
|
||||
this.uncheckButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.uncheckButton.UseSelectable = true;
|
||||
this.uncheckButton.Click += new System.EventHandler(this.uncheckButton_Click);
|
||||
//
|
||||
// checkButton
|
||||
//
|
||||
this.checkButton.Location = new System.Drawing.Point(32, 90);
|
||||
this.checkButton.Name = "checkButton";
|
||||
this.checkButton.Size = new System.Drawing.Size(186, 23);
|
||||
this.checkButton.TabIndex = 27;
|
||||
this.checkButton.Text = "Check All";
|
||||
this.checkButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.checkButton.UseSelectable = true;
|
||||
this.checkButton.Click += new System.EventHandler(this.checkButton_Click);
|
||||
//
|
||||
// toolTip
|
||||
//
|
||||
this.toolTip.StripAmpersands = true;
|
||||
this.toolTip.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.toolTip.StyleManager = null;
|
||||
this.toolTip.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// resetButton
|
||||
//
|
||||
this.resetButton.Location = new System.Drawing.Point(425, 90);
|
||||
this.resetButton.Name = "resetButton";
|
||||
this.resetButton.Size = new System.Drawing.Size(173, 23);
|
||||
this.resetButton.TabIndex = 28;
|
||||
this.resetButton.Text = "Restore ANIM";
|
||||
this.resetButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.resetButton.UseSelectable = true;
|
||||
this.resetButton.Click += new System.EventHandler(this.resetButton_Click);
|
||||
//
|
||||
// templateButton
|
||||
//
|
||||
this.templateButton.Location = new System.Drawing.Point(425, 154);
|
||||
this.templateButton.Name = "templateButton";
|
||||
this.templateButton.Size = new System.Drawing.Size(173, 23);
|
||||
this.templateButton.TabIndex = 29;
|
||||
this.templateButton.Text = "Skin Presets";
|
||||
this.templateButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.templateButton.UseSelectable = true;
|
||||
this.templateButton.Click += new System.EventHandler(this.templateButton_Click);
|
||||
//
|
||||
// ANIMEditor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(630, 554);
|
||||
this.Controls.Add(this.templateButton);
|
||||
this.Controls.Add(this.effectsGroup);
|
||||
this.Controls.Add(this.resetButton);
|
||||
this.Controls.Add(this.checkButton);
|
||||
this.Controls.Add(this.uncheckButton);
|
||||
this.Controls.Add(this.animValue);
|
||||
this.Controls.Add(this.exportButton);
|
||||
this.Controls.Add(this.importButton);
|
||||
this.Controls.Add(this.copyButton);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.effectsGroup2);
|
||||
this.Controls.Add(this.closeButton);
|
||||
this.MaximumSize = new System.Drawing.Size(630, 554);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(630, 554);
|
||||
this.Name = "ANIMEditor";
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Text = "ANIM Editor";
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.effectsGroup.ResumeLayout(false);
|
||||
this.effectsGroup.PerformLayout();
|
||||
this.effectsGroup2.ResumeLayout(false);
|
||||
this.effectsGroup2.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private MetroFramework.Controls.MetroButton closeButton;
|
||||
private System.Windows.Forms.GroupBox effectsGroup;
|
||||
private MetroFramework.Controls.MetroCheckBox headCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox leftLegCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox rightArmCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox leftArmCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox bodyCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox classicCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox slimCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox rightLegCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox rightLegOCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox headOCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox leftLegOCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox rightArmOCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox leftArmOCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox bodyOCheckBox;
|
||||
private System.Windows.Forms.GroupBox effectsGroup2;
|
||||
private MetroFramework.Controls.MetroCheckBox rightLeggingCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox helmetCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox leftLeggingCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox rightArmorCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox leftArmorCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox chestplateCheckBox;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private MetroFramework.Controls.MetroCheckBox syncLegsCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox staticArmsCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox syncArmsCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox statueCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox zombieCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox staticLegsCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox bobbingCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox santaCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox noArmorCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox dinnerboneCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox crouchCheckBox;
|
||||
private MetroFramework.Controls.MetroCheckBox unknownCheckBox;
|
||||
private MetroFramework.Controls.MetroButton copyButton;
|
||||
private MetroFramework.Controls.MetroButton importButton;
|
||||
private MetroFramework.Controls.MetroButton exportButton;
|
||||
private MetroFramework.Controls.MetroLabel animValue;
|
||||
private MetroFramework.Controls.MetroButton uncheckButton;
|
||||
private MetroFramework.Controls.MetroButton checkButton;
|
||||
private MetroFramework.Components.MetroToolTip toolTip;
|
||||
private MetroFramework.Controls.MetroButton resetButton;
|
||||
private MetroFramework.Controls.MetroButton templateButton;
|
||||
}
|
||||
}
|
||||
@@ -1,280 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using PckStudio.Classes.Utils;
|
||||
using PckStudio.Forms.Additional_Popups;
|
||||
|
||||
namespace PckStudio.Forms.Utilities.Skins
|
||||
{
|
||||
public partial class ANIMEditor : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
public bool saved = false;
|
||||
readonly SkinANIM initialANIM;
|
||||
public string outANIM => animValue.Text;
|
||||
SkinANIM anim = new SkinANIM();
|
||||
|
||||
void processCheckBoxes(bool set_all = false, bool value = false)
|
||||
{
|
||||
#region processes every single checkbox with the correct ANIM flags
|
||||
helmetCheckBox.Enabled = set_all ? value : anim.GetFlag(ANIM_EFFECTS.HEAD_DISABLED);
|
||||
chestplateCheckBox.Enabled = set_all ? value : anim.GetFlag(ANIM_EFFECTS.BODY_DISABLED);
|
||||
leftArmorCheckBox.Enabled = set_all ? value : anim.GetFlag(ANIM_EFFECTS.LEFT_ARM_DISABLED);
|
||||
rightArmorCheckBox.Enabled = set_all ? value : anim.GetFlag(ANIM_EFFECTS.RIGHT_ARM_DISABLED);
|
||||
leftLeggingCheckBox.Enabled = set_all ? value : anim.GetFlag(ANIM_EFFECTS.LEFT_LEG_DISABLED);
|
||||
rightLeggingCheckBox.Enabled = set_all ? value : anim.GetFlag(ANIM_EFFECTS.RIGHT_LEG_DISABLED);
|
||||
|
||||
bobbingCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.HEAD_BOBBING_DISABLED);
|
||||
bodyCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.BODY_DISABLED);
|
||||
bodyOCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.BODY_OVERLAY_DISABLED);
|
||||
chestplateCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.FORCE_BODY_ARMOR);
|
||||
|
||||
classicCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.RESOLUTION_64x64);
|
||||
crouchCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.DO_BACKWARDS_CROUCH);
|
||||
dinnerboneCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.DINNERBONE);
|
||||
headCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.HEAD_DISABLED);
|
||||
|
||||
headOCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.HEAD_OVERLAY_DISABLED);
|
||||
helmetCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.FORCE_HEAD_ARMOR);
|
||||
leftArmCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.LEFT_ARM_DISABLED);
|
||||
leftArmOCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.LEFT_ARM_OVERLAY_DISABLED);
|
||||
|
||||
leftArmorCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.FORCE_LEFT_ARM_ARMOR);
|
||||
leftLegCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.LEFT_LEG_DISABLED);
|
||||
leftLeggingCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.FORCE_LEFT_LEG_ARMOR);
|
||||
leftLegOCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.LEFT_LEG_OVERLAY_DISABLED);
|
||||
|
||||
noArmorCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.ALL_ARMOR_DISABLED);
|
||||
rightArmCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.RIGHT_ARM_DISABLED);
|
||||
rightArmOCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.RIGHT_ARM_OVERLAY_DISABLED);
|
||||
rightArmorCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.FORCE_RIGHT_ARM_ARMOR);
|
||||
|
||||
rightLegCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.RIGHT_LEG_DISABLED);
|
||||
rightLeggingCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.FORCE_RIGHT_LEG_ARMOR);
|
||||
rightLegOCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.RIGHT_LEG_OVERLAY_DISABLED);
|
||||
santaCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.BAD_SANTA);
|
||||
|
||||
slimCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.SLIM_MODEL);
|
||||
staticArmsCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.STATIC_ARMS);
|
||||
staticLegsCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.STATIC_LEGS);
|
||||
statueCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.STATUE_OF_LIBERTY);
|
||||
|
||||
syncArmsCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.SYNCED_ARMS);
|
||||
syncLegsCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.SYNCED_LEGS);
|
||||
unknownCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.__BIT_4);
|
||||
zombieCheckBox.Checked = set_all ? value : anim.GetFlag(ANIM_EFFECTS.ZOMBIE_ARMS);
|
||||
#endregion
|
||||
}
|
||||
|
||||
public ANIMEditor(string ANIM)
|
||||
{
|
||||
InitializeComponent();
|
||||
if (!SkinANIM.IsValidANIM(ANIM))
|
||||
{
|
||||
DialogResult = DialogResult.Abort;
|
||||
Close();
|
||||
}
|
||||
initialANIM = anim = new SkinANIM(ANIM);
|
||||
|
||||
#region Event definitions, since the designer can't parse lambda experessions
|
||||
bobbingCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.HEAD_BOBBING_DISABLED); };
|
||||
bodyCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.BODY_DISABLED); };
|
||||
bodyOCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.BODY_OVERLAY_DISABLED); };
|
||||
chestplateCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.FORCE_BODY_ARMOR); };
|
||||
|
||||
classicCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.RESOLUTION_64x64); };
|
||||
crouchCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.DO_BACKWARDS_CROUCH); };
|
||||
dinnerboneCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.DINNERBONE); };
|
||||
headCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.HEAD_DISABLED); };
|
||||
|
||||
headOCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.HEAD_OVERLAY_DISABLED); };
|
||||
helmetCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.FORCE_HEAD_ARMOR); };
|
||||
leftArmCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.LEFT_ARM_DISABLED); };
|
||||
leftArmOCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.LEFT_ARM_OVERLAY_DISABLED); };
|
||||
|
||||
leftArmorCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.FORCE_LEFT_ARM_ARMOR); };
|
||||
leftLegCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.LEFT_LEG_DISABLED); };
|
||||
leftLeggingCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.FORCE_LEFT_LEG_ARMOR); };
|
||||
leftLegOCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.LEFT_LEG_OVERLAY_DISABLED); };
|
||||
|
||||
noArmorCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.ALL_ARMOR_DISABLED); };
|
||||
rightArmCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.RIGHT_ARM_DISABLED); };
|
||||
rightArmOCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.RIGHT_ARM_OVERLAY_DISABLED); };
|
||||
rightArmorCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.FORCE_RIGHT_ARM_ARMOR); };
|
||||
|
||||
rightLegCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.RIGHT_LEG_DISABLED); };
|
||||
rightLeggingCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.FORCE_RIGHT_LEG_ARMOR); };
|
||||
rightLegOCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.RIGHT_LEG_OVERLAY_DISABLED); };
|
||||
santaCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.BAD_SANTA); };
|
||||
|
||||
slimCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.SLIM_MODEL); };
|
||||
staticArmsCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.STATIC_ARMS); };
|
||||
staticLegsCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.STATIC_LEGS); };
|
||||
statueCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.STATUE_OF_LIBERTY); };
|
||||
|
||||
syncArmsCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.SYNCED_ARMS); };
|
||||
syncLegsCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.SYNCED_LEGS); };
|
||||
unknownCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.__BIT_4); };
|
||||
zombieCheckBox.CheckedChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.ZOMBIE_ARMS); };
|
||||
|
||||
helmetCheckBox.EnabledChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.FORCE_HEAD_ARMOR); };
|
||||
chestplateCheckBox.EnabledChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.FORCE_BODY_ARMOR); };
|
||||
rightArmorCheckBox.EnabledChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.FORCE_RIGHT_ARM_ARMOR); };
|
||||
leftArmorCheckBox.EnabledChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.FORCE_LEFT_ARM_ARMOR); };
|
||||
rightLeggingCheckBox.EnabledChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.FORCE_RIGHT_LEG_ARMOR); };
|
||||
leftLeggingCheckBox.EnabledChanged += (sender, EventArgs) => { flagChanged(sender, EventArgs, ANIM_EFFECTS.FORCE_LEFT_LEG_ARMOR); };
|
||||
#endregion
|
||||
processCheckBoxes();
|
||||
}
|
||||
|
||||
private void closeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
|
||||
saved = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void flagChanged(object sender, EventArgs e, ANIM_EFFECTS flag)
|
||||
{
|
||||
// Set value
|
||||
anim.SetFlag(flag, ((CheckBox)sender).Checked && ((CheckBox)sender).Enabled);
|
||||
|
||||
// Armor flags don't work if the respective parts are not enabled
|
||||
helmetCheckBox.Enabled = anim.GetFlag(ANIM_EFFECTS.HEAD_DISABLED);
|
||||
chestplateCheckBox.Enabled = anim.GetFlag(ANIM_EFFECTS.BODY_DISABLED);
|
||||
rightArmorCheckBox.Enabled = anim.GetFlag(ANIM_EFFECTS.RIGHT_ARM_DISABLED);
|
||||
leftArmorCheckBox.Enabled = anim.GetFlag(ANIM_EFFECTS.LEFT_ARM_DISABLED);
|
||||
rightLeggingCheckBox.Enabled = anim.GetFlag(ANIM_EFFECTS.RIGHT_LEG_DISABLED);
|
||||
leftLeggingCheckBox.Enabled = anim.GetFlag(ANIM_EFFECTS.LEFT_LEG_DISABLED);
|
||||
|
||||
animValue.Text = anim.ToString();
|
||||
}
|
||||
|
||||
private void copyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Clipboard.SetText(animValue.Text);
|
||||
}
|
||||
|
||||
private void importButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
string new_value = "";
|
||||
|
||||
bool first = true;
|
||||
while (!SkinANIM.IsValidANIM(new_value))
|
||||
{
|
||||
if (!first) MessageBox.Show($"The following value \"{new_value}\" is not valid. Please try again.");
|
||||
RenamePrompt diag = new RenamePrompt(new_value);
|
||||
diag.TextLabel.Text = "ANIM";
|
||||
diag.OKButton.Text = "Ok";
|
||||
if (diag.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
new_value = diag.NewText;
|
||||
}
|
||||
else return;
|
||||
first = false;
|
||||
}
|
||||
anim = new SkinANIM(new_value);
|
||||
processCheckBoxes();
|
||||
}
|
||||
|
||||
private void uncheckButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
processCheckBoxes(true);
|
||||
}
|
||||
|
||||
private void checkButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
processCheckBoxes(true, true);
|
||||
}
|
||||
|
||||
private void exportButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||
saveFileDialog.FileName = animValue.Text + ".png";
|
||||
saveFileDialog.Filter = "Skin textures|*.png";
|
||||
if (saveFileDialog.ShowDialog() != DialogResult.OK ||
|
||||
string.IsNullOrWhiteSpace(Path.GetDirectoryName(saveFileDialog.FileName))) return;
|
||||
bool isSlim = anim.GetFlag(ANIM_EFFECTS.SLIM_MODEL);
|
||||
bool isClassic64 = anim.GetFlag(ANIM_EFFECTS.RESOLUTION_64x64);
|
||||
bool isClassic32 = !isSlim && !isClassic64;
|
||||
|
||||
Image skin = isSlim ? Properties.Resources.slim_template : Properties.Resources.classic_template;
|
||||
|
||||
#region Image processing code for generating the skin templates based on the input ANIM value
|
||||
Bitmap nb = new Bitmap(64, (!isSlim && !isClassic64) ? 32 : 64);
|
||||
using (Graphics g = Graphics.FromImage(nb))
|
||||
{
|
||||
g.DrawImage(skin, new Rectangle(0, 0, 64, isClassic32 ? 32 : 64), new Rectangle(0, 0, 64, isClassic32 ? 32 : 64), GraphicsUnit.Pixel);
|
||||
if (anim.GetFlag(ANIM_EFFECTS.HEAD_OVERLAY_DISABLED)) g.FillRectangle(Brushes.Magenta, new Rectangle(32, 0, 32, 16));
|
||||
if (anim.GetFlag(ANIM_EFFECTS.HEAD_DISABLED)) g.FillRectangle(Brushes.Magenta, new Rectangle(0, 0, 32, 16));
|
||||
if (anim.GetFlag(ANIM_EFFECTS.BODY_DISABLED)) g.FillRectangle(Brushes.Magenta, new Rectangle(16, 16, 24, 16));
|
||||
if (nb.Height == 64)
|
||||
{
|
||||
if (anim.GetFlag(ANIM_EFFECTS.RIGHT_ARM_DISABLED)) g.FillRectangle(Brushes.Magenta, new Rectangle(40, 16, 16, 16));
|
||||
if (anim.GetFlag(ANIM_EFFECTS.RIGHT_LEG_DISABLED)) g.FillRectangle(Brushes.Magenta, new Rectangle(0, 16, 16, 16));
|
||||
if (anim.GetFlag(ANIM_EFFECTS.BODY_OVERLAY_DISABLED)) g.FillRectangle(Brushes.Magenta, new Rectangle(16, 32, 24, 16));
|
||||
if (anim.GetFlag(ANIM_EFFECTS.RIGHT_ARM_OVERLAY_DISABLED)) g.FillRectangle(Brushes.Magenta, new Rectangle(40, 32, 16, 16));
|
||||
if (anim.GetFlag(ANIM_EFFECTS.RIGHT_LEG_OVERLAY_DISABLED)) g.FillRectangle(Brushes.Magenta, new Rectangle(0, 32, 16, 16));
|
||||
if (anim.GetFlag(ANIM_EFFECTS.LEFT_LEG_OVERLAY_DISABLED)) g.FillRectangle(Brushes.Magenta, new Rectangle(0, 48, 16, 16));
|
||||
if (anim.GetFlag(ANIM_EFFECTS.LEFT_LEG_DISABLED)) g.FillRectangle(Brushes.Magenta, new Rectangle(16, 48, 16, 16));
|
||||
if (anim.GetFlag(ANIM_EFFECTS.LEFT_ARM_DISABLED)) g.FillRectangle(Brushes.Magenta, new Rectangle(32, 48, 16, 16));
|
||||
if (anim.GetFlag(ANIM_EFFECTS.LEFT_ARM_OVERLAY_DISABLED)) g.FillRectangle(Brushes.Magenta, new Rectangle(48, 48, 16, 16));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Since both classic 32 arms and legs use the same texture, removing the texture would remove both limbs instead of just one.
|
||||
// So both must be disabled by the user before they're removed from the texture;
|
||||
if (anim.GetFlag(ANIM_EFFECTS.RIGHT_ARM_DISABLED) && anim.GetFlag(ANIM_EFFECTS.LEFT_ARM_DISABLED))
|
||||
g.FillRectangle(Brushes.Magenta, new Rectangle(40, 16, 16, 16));
|
||||
if (anim.GetFlag(ANIM_EFFECTS.RIGHT_LEG_DISABLED) && anim.GetFlag(ANIM_EFFECTS.LEFT_LEG_DISABLED))
|
||||
g.FillRectangle(Brushes.Magenta, new Rectangle(0, 16, 16, 16));
|
||||
}
|
||||
nb.MakeTransparent(Color.Magenta);
|
||||
skin = nb;
|
||||
}
|
||||
#endregion
|
||||
|
||||
skin.Save(saveFileDialog.FileName);
|
||||
}
|
||||
|
||||
private void resetButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
anim = initialANIM;
|
||||
processCheckBoxes();
|
||||
}
|
||||
|
||||
static readonly Dictionary<string, ANIM_EFFECTS> Templates = new Dictionary<string, ANIM_EFFECTS>()
|
||||
{
|
||||
{ "Steve (64x32)", ANIM_EFFECTS.NONE },
|
||||
{ "Steve (64x64)", ANIM_EFFECTS.RESOLUTION_64x64 },
|
||||
{ "Alex (64x64)", ANIM_EFFECTS.SLIM_MODEL },
|
||||
{ "Zombie Skins", ANIM_EFFECTS.ZOMBIE_ARMS },
|
||||
{ "Cetacean Skins", ANIM_EFFECTS.SYNCED_ARMS | ANIM_EFFECTS.SYNCED_LEGS },
|
||||
{ "Ski Skins", ANIM_EFFECTS.SYNCED_ARMS | ANIM_EFFECTS.STATIC_LEGS },
|
||||
{ "Ghost Skins", ANIM_EFFECTS.STATIC_LEGS | ANIM_EFFECTS.ZOMBIE_ARMS },
|
||||
{ "Medusa (Greek Myth.)", ANIM_EFFECTS.SYNCED_LEGS },
|
||||
{ "Librarian (Halo)", ANIM_EFFECTS.STATIC_LEGS },
|
||||
{ "Grim Reaper (Halloween)", ANIM_EFFECTS.STATIC_LEGS | ANIM_EFFECTS.STATIC_ARMS }
|
||||
};
|
||||
|
||||
private void templateButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
var diag = new ItemSelectionPopUp(Templates.Keys.ToArray());
|
||||
diag.label2.Text = "Presets";
|
||||
diag.okBtn.Text = "Load";
|
||||
|
||||
if (diag.ShowDialog() != DialogResult.OK) return;
|
||||
|
||||
var templateANIM = Templates[diag.SelectedItem];
|
||||
DialogResult prompt = MessageBox.Show(this, "Would you like to add this preset's effects to your current ANIM? Otherwise all of your effects will be cleared. Either choice can be undone by pressing \"Restore ANIM\".", "", MessageBoxButtons.YesNo);
|
||||
if (prompt == DialogResult.Yes) anim |= templateANIM;
|
||||
else anim = templateANIM;
|
||||
SkinANIM backup = anim;
|
||||
processCheckBoxes();
|
||||
anim = backup;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,123 +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>
|
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,94 +0,0 @@
|
||||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PckStudio.Forms.Utilities.Skins
|
||||
{
|
||||
public partial class BoxEditor : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
public string Result;
|
||||
|
||||
class BOX
|
||||
{
|
||||
public string Parent;
|
||||
public (float X, float Y, float Z) Pos;
|
||||
public (float X, float Y, float Z) Size;
|
||||
public float uvX, uvY;
|
||||
public bool HideWithArmor;
|
||||
public bool Mirror;
|
||||
public float Inflation;
|
||||
|
||||
public BOX(string input)
|
||||
{
|
||||
string[] arguments = Regex.Split(input, @"\s+");
|
||||
|
||||
try
|
||||
{
|
||||
Parent = arguments[0].ToUpper(); // just in case a box has all lower, the editor still parses correctly
|
||||
Pos.X = float.Parse(arguments[1]);
|
||||
Pos.Y = float.Parse(arguments[2]);
|
||||
Pos.Z = float.Parse(arguments[3]);
|
||||
Size.X = float.Parse(arguments[4]);
|
||||
Size.Y = float.Parse(arguments[5]);
|
||||
Size.Z = float.Parse(arguments[6]);
|
||||
uvX = float.Parse(arguments[7]);
|
||||
uvY = float.Parse(arguments[8]);
|
||||
HideWithArmor = Convert.ToBoolean(Int32.Parse(arguments[9]));
|
||||
Mirror = Convert.ToBoolean(Int32.Parse(arguments[10]));
|
||||
Inflation = float.Parse(arguments[11]);
|
||||
}
|
||||
catch (IndexOutOfRangeException)
|
||||
{
|
||||
// This is normal as some box values can have less parameters but no more than 12
|
||||
return;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Parent = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public BoxEditor(string inBOX, bool hasInflation)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
inflationUpDown.Enabled = hasInflation;
|
||||
|
||||
BOX box = new BOX(inBOX);
|
||||
|
||||
if (string.IsNullOrEmpty(box.Parent) || !parentComboBox.Items.Contains(box.Parent))
|
||||
{
|
||||
throw new Exception("Failed to parse BOX value");
|
||||
}
|
||||
|
||||
parentComboBox.SelectedItem = parentComboBox.Items[parentComboBox.Items.IndexOf(box.Parent)];
|
||||
PosXUpDown.Value = (decimal)box.Pos.X;
|
||||
PosYUpDown.Value = (decimal)box.Pos.Y;
|
||||
PosZUpDown.Value = (decimal)box.Pos.Z;
|
||||
SizeXUpDown.Value = (decimal)box.Size.X;
|
||||
SizeYUpDown.Value = (decimal)box.Size.Y;
|
||||
SizeZUpDown.Value = (decimal)box.Size.Z;
|
||||
uvXUpDown.Value = (decimal)box.uvX;
|
||||
uvYUpDown.Value = (decimal)box.uvY;
|
||||
armorCheckBox.Checked = box.HideWithArmor;
|
||||
mirrorCheckBox.Checked = box.Mirror;
|
||||
inflationUpDown.Value = (decimal)box.Inflation;
|
||||
}
|
||||
|
||||
private void saveButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Result =
|
||||
$"{parentComboBox.SelectedItem} " +
|
||||
$"{PosXUpDown.Value} {PosYUpDown.Value} {PosZUpDown.Value} " +
|
||||
$"{SizeXUpDown.Value} {SizeYUpDown.Value} {SizeZUpDown.Value} " +
|
||||
$"{uvXUpDown.Value} {uvYUpDown.Value} " +
|
||||
$"{Convert.ToInt32(armorCheckBox.Checked)} " +
|
||||
$"{Convert.ToInt32(mirrorCheckBox.Checked)} " +
|
||||
$"{inflationUpDown.Value}";
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.metroTabPageMain = new MetroFramework.Controls.MetroTabPage();
|
||||
this.myTablePanel1 = new PckStudio.Forms.MyTablePanel();
|
||||
this.myTablePanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.EurDig = new System.Windows.Forms.RadioButton();
|
||||
this.USDig = new System.Windows.Forms.RadioButton();
|
||||
this.buttonServerToggle = new System.Windows.Forms.Button();
|
||||
@@ -339,7 +339,7 @@
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroTabPage metroTabPageMain;
|
||||
private MyTablePanel myTablePanel1;
|
||||
private System.Windows.Forms.TableLayoutPanel myTablePanel1;
|
||||
private System.Windows.Forms.RadioButton USDisc;
|
||||
private System.Windows.Forms.RadioButton JPDig;
|
||||
private System.Windows.Forms.RadioButton EurDisc;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace PckStudio.Forms
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.metroTabPageMain = new MetroFramework.Controls.MetroTabPage();
|
||||
this.myTablePanel1 = new PckStudio.Forms.MyTablePanel();
|
||||
this.myTablePanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.EurDig = new System.Windows.Forms.RadioButton();
|
||||
this.USDig = new System.Windows.Forms.RadioButton();
|
||||
this.buttonServerToggle = new System.Windows.Forms.Button();
|
||||
@@ -341,7 +341,7 @@ namespace PckStudio.Forms
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroTabPage metroTabPageMain;
|
||||
private MyTablePanel myTablePanel1;
|
||||
private System.Windows.Forms.TableLayoutPanel myTablePanel1;
|
||||
private System.Windows.Forms.RadioButton USDisc;
|
||||
private System.Windows.Forms.RadioButton JPDig;
|
||||
private System.Windows.Forms.RadioButton EurDisc;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(installWiiU));
|
||||
this.metroTabPageMain = new MetroFramework.Controls.MetroTabPage();
|
||||
this.myTablePanel1 = new PckStudio.Forms.MyTablePanel();
|
||||
this.myTablePanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.buttonServerToggle = new System.Windows.Forms.Button();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.radioButtonSystem = new System.Windows.Forms.RadioButton();
|
||||
@@ -330,7 +330,7 @@
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroTabPage metroTabPageMain;
|
||||
private MyTablePanel myTablePanel1;
|
||||
private System.Windows.Forms.TableLayoutPanel myTablePanel1;
|
||||
private System.Windows.Forms.RadioButton radioButtonJap;
|
||||
private System.Windows.Forms.RadioButton radioButtonEur;
|
||||
private System.Windows.Forms.RadioButton radioButtonUs;
|
||||
|
||||
2
PCK-Studio/Forms/Utilities/pckCenter.Designer.cs
generated
2
PCK-Studio/Forms/Utilities/pckCenter.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace PckStudio.Forms
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
partial class pckCenter
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ using PckStudio.Classes.Misc;
|
||||
using PckStudio.API.PCKCenter.model;
|
||||
using PckStudio.API.PCKCenter;
|
||||
|
||||
namespace PckStudio.Forms
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public partial class pckCenter : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
@@ -174,10 +174,6 @@ namespace PckStudio.Forms
|
||||
EInfo.Description = desc;
|
||||
PJSON.Data.Add((++x).ToString(), EInfo);
|
||||
File.Copy(cacheDir + mod + ".png", cacheDir + "images/" + ++x + ".png");
|
||||
|
||||
|
||||
PckPreview pckPreview = new PckPreview(pckName, author, desc, direct, ad, bmp, 0, mod, null, IsVita, Packname);
|
||||
pckLayout.Controls.Add(pckPreview);
|
||||
}
|
||||
}
|
||||
catch (Exception err) { Console.WriteLine(err.Message); }
|
||||
@@ -287,9 +283,6 @@ namespace PckStudio.Forms
|
||||
{
|
||||
bmp = (Bitmap)Image.FromStream(memStream);
|
||||
}
|
||||
|
||||
PckPreview pckPreview = new PckPreview(pckName, author, desc, direct, ad, bmp, 1, mod, loadCollectdion, PSVitaPCKCheckbox.Checked, "");
|
||||
pckLayout.Controls.Add(pckPreview);
|
||||
}
|
||||
pckLayout.Enabled = true;
|
||||
}
|
||||
@@ -319,7 +312,7 @@ namespace PckStudio.Forms
|
||||
|
||||
try
|
||||
{
|
||||
RPC.SetPresence("Viewing the PCK Center", "Program by PhoenixARC");
|
||||
RPC.SetPresence("Viewing the PCK Center");
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -400,143 +393,4 @@ namespace PckStudio.Forms
|
||||
else { MessageBox.Show("No Packs Avaliable!"); }
|
||||
}
|
||||
}
|
||||
|
||||
public class PckPreview : UserControl
|
||||
{
|
||||
string name;
|
||||
string author;
|
||||
string desc;
|
||||
string direct;
|
||||
string ad;
|
||||
int mode;
|
||||
string mod;
|
||||
bool IsVita;
|
||||
string Pack;
|
||||
|
||||
Bitmap icon;
|
||||
|
||||
PictureBox iconBox = new PictureBox();
|
||||
public MyNameLabel nameLabel = new MyNameLabel();
|
||||
MyTablePanel layout = new MyTablePanel();
|
||||
MethodInvoker reloader;
|
||||
|
||||
public PckPreview(string name, string author, string desc, string direct, string ad, Bitmap icon, int mode, string mod, MethodInvoker Reloader, bool vita, string packName) : base()
|
||||
{
|
||||
reloader = Reloader;
|
||||
nameLabel.parentPreview = this;
|
||||
layout.parentPreview = this;
|
||||
this.name = name;
|
||||
this.author = author;
|
||||
this.desc = desc;
|
||||
this.direct = direct;
|
||||
this.ad = ad;
|
||||
this.mode = mode;
|
||||
this.mod = mod;
|
||||
this.icon = icon;
|
||||
IsVita = vita;
|
||||
Pack = packName;
|
||||
layout.BackColor = Color.White;
|
||||
Size = new Size(250, 280);
|
||||
nameLabel.Dock = DockStyle.Fill;
|
||||
nameLabel.Location = new Point(0,0);
|
||||
nameLabel.Size = new Size(230, 30);
|
||||
iconBox.Image = icon;
|
||||
//iconBox.Dock = DockStyle.Fill;
|
||||
iconBox.Anchor = AnchorStyles.None;
|
||||
nameLabel.Text = name;
|
||||
iconBox.SizeMode = PictureBoxSizeMode.StretchImage;
|
||||
iconBox.Size = new Size(230, 230);
|
||||
layout.Margin = new Padding(0, 0, 0, 0);
|
||||
Margin = new Padding(20, 15, 20, 15);
|
||||
nameLabel.ForeColor = Color.Black;
|
||||
nameLabel.TextAlign = ContentAlignment.MiddleCenter;
|
||||
nameLabel.Font = new Font(nameLabel.Font.FontFamily, 14);
|
||||
layout.Controls.Add(iconBox, 0, 1);
|
||||
layout.Controls.Add(nameLabel, 0, 0);
|
||||
layout.Parent = this;
|
||||
layout.Dock = DockStyle.Fill;
|
||||
iconBox.Enabled = false;
|
||||
|
||||
}
|
||||
|
||||
public void setHover(bool hover)
|
||||
{
|
||||
layout.BackColor = hover ? Color.LightGray : Color.White;
|
||||
layout.Refresh();
|
||||
}
|
||||
public void onClick()
|
||||
{
|
||||
|
||||
layout.BackColor = Color.Gray;
|
||||
layout.Refresh();
|
||||
pckCenterOpen openPck = new pckCenterOpen(name, author, desc, direct, ad, icon, mode, mod, reloader, IsVita, Pack);
|
||||
openPck.ShowDialog();
|
||||
}
|
||||
|
||||
public void onDoubleClick()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class MyTablePanel : TableLayoutPanel
|
||||
{
|
||||
public PckPreview parentPreview;
|
||||
|
||||
protected override void OnMouseEnter(EventArgs e)
|
||||
{
|
||||
if (parentPreview != null)
|
||||
{
|
||||
parentPreview.setHover(true);
|
||||
base.OnMouseLeave(e);
|
||||
}
|
||||
}
|
||||
protected override void OnMouseLeave(EventArgs e)
|
||||
{
|
||||
if(parentPreview != null)
|
||||
{
|
||||
parentPreview.setHover(false);
|
||||
base.OnMouseLeave(e);
|
||||
}
|
||||
}
|
||||
protected override void OnMouseClick(MouseEventArgs e)
|
||||
{
|
||||
if (parentPreview != null)
|
||||
{
|
||||
parentPreview.onClick();
|
||||
base.OnMouseClick(e);
|
||||
}
|
||||
}
|
||||
protected override void OnMouseDoubleClick(MouseEventArgs e)
|
||||
{
|
||||
if (parentPreview != null)
|
||||
{
|
||||
parentPreview.onDoubleClick();
|
||||
base.OnMouseDoubleClick(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class MyNameLabel : Label
|
||||
{
|
||||
public PckPreview parentPreview;
|
||||
|
||||
protected override void OnMouseEnter(EventArgs e)
|
||||
{
|
||||
parentPreview.setHover(true);
|
||||
base.OnMouseEnter(e);
|
||||
}
|
||||
protected override void OnMouseLeave(EventArgs e)
|
||||
{
|
||||
parentPreview.setHover(false);
|
||||
base.OnMouseLeave(e);
|
||||
}
|
||||
protected override void OnMouseClick(MouseEventArgs e)
|
||||
{
|
||||
parentPreview.onClick();
|
||||
base.OnMouseClick(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
16
PCK-Studio/Forms/Utilities/pckCenterOpen.Designer.cs
generated
16
PCK-Studio/Forms/Utilities/pckCenterOpen.Designer.cs
generated
@@ -44,9 +44,9 @@
|
||||
//
|
||||
// buttonDirect
|
||||
//
|
||||
resources.ApplyResources(this.buttonDirect, "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;
|
||||
@@ -66,9 +66,9 @@
|
||||
//
|
||||
// buttonDelete
|
||||
//
|
||||
resources.ApplyResources(this.buttonDelete, "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;
|
||||
@@ -76,9 +76,9 @@
|
||||
//
|
||||
// buttonExport
|
||||
//
|
||||
resources.ApplyResources(this.buttonExport, "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;
|
||||
@@ -86,9 +86,9 @@
|
||||
//
|
||||
// buttonInstallPs3
|
||||
//
|
||||
resources.ApplyResources(this.buttonInstallPs3, "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";
|
||||
@@ -97,9 +97,9 @@
|
||||
//
|
||||
// buttonInstallXbox
|
||||
//
|
||||
resources.ApplyResources(this.buttonInstallXbox, "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";
|
||||
@@ -108,9 +108,9 @@
|
||||
//
|
||||
// buttonInstallWiiU
|
||||
//
|
||||
resources.ApplyResources(this.buttonInstallWiiU, "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";
|
||||
@@ -125,9 +125,9 @@
|
||||
//
|
||||
// buttonBedrock
|
||||
//
|
||||
resources.ApplyResources(this.buttonBedrock, "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;
|
||||
@@ -138,6 +138,7 @@
|
||||
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);
|
||||
@@ -146,7 +147,6 @@
|
||||
this.Controls.Add(this.buttonDelete);
|
||||
this.Controls.Add(this.labelDesc);
|
||||
this.Controls.Add(this.labelName);
|
||||
this.Controls.Add(this.buttonDirect);
|
||||
this.Controls.Add(this.pictureBoxDisplay);
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "pckCenterOpen";
|
||||
|
||||
@@ -19,6 +19,7 @@ using PckStudio.Classes.FileTypes;
|
||||
using PckStudio.Classes.IO.PCK;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Workers.Pck;
|
||||
using PckStudio.Extensions;
|
||||
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
@@ -1026,17 +1027,26 @@ namespace PckStudio.Forms
|
||||
{
|
||||
var ms = new MemoryStream(skinTexture.Data);
|
||||
Bitmap saveSkin = new Bitmap(Image.FromStream(ms));
|
||||
var config = new GraphicsConfig()
|
||||
{
|
||||
CompositingMode = CompositingMode.SourceCopy,
|
||||
CompositingQuality = CompositingQuality.HighQuality,
|
||||
InterpolationMode = InterpolationMode.NearestNeighbor,
|
||||
SmoothingMode = SmoothingMode.HighQuality,
|
||||
PixelOffsetMode = PixelOffsetMode.HighQuality,
|
||||
};
|
||||
|
||||
if (saveSkin.Width == saveSkin.Height)
|
||||
{
|
||||
ResizeImage(saveSkin, 64, 64);
|
||||
saveSkin.ResizeImage(64, 64, config);
|
||||
}
|
||||
else if (saveSkin.Height == saveSkin.Width / 2)
|
||||
{
|
||||
ResizeImage(saveSkin, 64, 32);
|
||||
saveSkin.ResizeImage(64, 32, config);
|
||||
}
|
||||
else
|
||||
{
|
||||
ResizeImage(saveSkin, 64, 64);
|
||||
saveSkin.ResizeImage(64, 64, config);
|
||||
}
|
||||
saveSkin.Save(root + "/" + skinTexture.Filename, ImageFormat.Png);
|
||||
}
|
||||
@@ -1077,32 +1087,6 @@ namespace PckStudio.Forms
|
||||
}
|
||||
}
|
||||
|
||||
public static Bitmap ResizeImage(Image image, int width, int height)
|
||||
{
|
||||
var destRect = new Rectangle(0, 0, width, height);
|
||||
var destImage = new Bitmap(width, height);
|
||||
|
||||
destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);
|
||||
|
||||
using (var graphics = Graphics.FromImage(destImage))
|
||||
{
|
||||
graphics.CompositingMode = CompositingMode.SourceCopy;
|
||||
graphics.CompositingQuality = CompositingQuality.HighQuality;
|
||||
graphics.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||
graphics.SmoothingMode = SmoothingMode.HighQuality;
|
||||
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
|
||||
using (var wrapMode = new ImageAttributes())
|
||||
{
|
||||
wrapMode.SetWrapMode(WrapMode.TileFlipXY);
|
||||
graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode);
|
||||
}
|
||||
}
|
||||
|
||||
return destImage;
|
||||
}
|
||||
|
||||
|
||||
private void buttonDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -117,155 +117,236 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name=">>pictureBoxDisplay.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name=">>buttonExport.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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="buttonInstallXbox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>30, 30</value>
|
||||
<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="buttonDelete.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
<data name="buttonDirect.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="buttonInstallWiiU.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>585, 338</value>
|
||||
<data name="buttonDirect.Text" xml:space="preserve">
|
||||
<value>DOWNLOAD TO COLLECTION</value>
|
||||
</data>
|
||||
<data name="buttonDelete.Text" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxDisplay.Name" xml:space="preserve">
|
||||
<value>pictureBoxDisplay</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="buttonInstallXbox.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
|
||||
<value>Stretch</value>
|
||||
</data>
|
||||
<data name="buttonInstallXbox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>621, 338</value>
|
||||
</data>
|
||||
<data name=">>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=">>buttonInstallPs3.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>labelName.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<data name="buttonDirect.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>buttonDirect.Name" xml:space="preserve">
|
||||
<value>buttonDirect</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>pckCenterOpen</value>
|
||||
<data name=">>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=">>buttonBedrock.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="buttonInstallPs3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="buttonBedrock.Text" xml:space="preserve">
|
||||
<value>Convert to Bedrock</value>
|
||||
</data>
|
||||
<data name=">>buttonInstallWiiU.Name" xml:space="preserve">
|
||||
<value>buttonInstallWiiU</value>
|
||||
</data>
|
||||
<data name=">>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=">>buttonDirect.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="buttonDirect.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>169, 43</value>
|
||||
</data>
|
||||
<data name="labelDesc.Text" xml:space="preserve">
|
||||
<value>labelDesc</value>
|
||||
</data>
|
||||
<data name="buttonBedrock.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name=">>buttonExport.Parent" xml:space="preserve">
|
||||
<data name=">>buttonDirect.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="buttonInstallWiiU.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<value>Flat</value>
|
||||
</data>
|
||||
<data name="pictureBoxDisplay.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>341, 341</value>
|
||||
</data>
|
||||
<data name="labelDesc.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>384, 64</value>
|
||||
</data>
|
||||
<data name="buttonInstallWiiU.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
|
||||
<value>Stretch</value>
|
||||
</data>
|
||||
<data name=">>buttonBedrock.Name" xml:space="preserve">
|
||||
<value>buttonBedrock</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
</data>
|
||||
<data name="buttonExport.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="labelDesc.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="buttonBedrock.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 30</value>
|
||||
</data>
|
||||
<data name=">>labelName.Name" xml:space="preserve">
|
||||
<value>labelName</value>
|
||||
</data>
|
||||
<data name="buttonInstallPs3.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
|
||||
<value>Stretch</value>
|
||||
</data>
|
||||
<data name="buttonDirect.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<value>Flat</value>
|
||||
<data name=">>buttonDirect.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="labelName.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>buttonInstallXbox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<data name="labelName.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 20.25pt</value>
|
||||
</data>
|
||||
<data name="buttonInstallWiiU.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>30, 30</value>
|
||||
<data name="labelName.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>24, 24</value>
|
||||
</data>
|
||||
<data name=">>buttonInstallXbox.Name" xml:space="preserve">
|
||||
<value>buttonInstallXbox</value>
|
||||
</data>
|
||||
<data name=">>buttonDelete.Name" xml:space="preserve">
|
||||
<value>buttonDelete</value>
|
||||
</data>
|
||||
<data name="buttonExport.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<value>Flat</value>
|
||||
</data>
|
||||
<data name=">>buttonInstallPs3.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<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=">>labelName.Name" xml:space="preserve">
|
||||
<value>labelName</value>
|
||||
</data>
|
||||
<data name=">>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=">>labelName.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>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=">>labelDesc.Name" xml:space="preserve">
|
||||
<value>labelDesc</value>
|
||||
</data>
|
||||
<data name=">>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=">>labelDesc.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>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="buttonExport.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>692, 338</value>
|
||||
</data>
|
||||
<data name="buttonBedrock.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<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=">>buttonDelete.Name" xml:space="preserve">
|
||||
<value>buttonDelete</value>
|
||||
</data>
|
||||
<data name=">>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=">>buttonDelete.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>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=">>buttonExport.Name" xml:space="preserve">
|
||||
<value>buttonExport</value>
|
||||
</data>
|
||||
<data name=">>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=">>buttonExport.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>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="buttonDirect.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>568, 362</value>
|
||||
<data name="buttonInstallPs3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name=">>buttonInstallPs3.Name" xml:space="preserve">
|
||||
<value>buttonInstallPs3</value>
|
||||
</data>
|
||||
<data name=">>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=">>buttonInstallPs3.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>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=">>buttonInstallXbox.Name" xml:space="preserve">
|
||||
<value>buttonInstallXbox</value>
|
||||
</data>
|
||||
<data name=">>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=">>buttonInstallXbox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>buttonInstallXbox.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="buttonInstallWiiU.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
|
||||
<value>Stretch</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=">>buttonInstallWiiU.Name" xml:space="preserve">
|
||||
<value>buttonInstallWiiU</value>
|
||||
</data>
|
||||
<data name=">>buttonInstallWiiU.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
@@ -273,160 +354,82 @@
|
||||
<data name=">>buttonInstallWiiU.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>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="buttonDirect.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
<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="buttonInstallWiiU.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 12pt</value>
|
||||
<data name="pictureBoxDisplay.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>buttonInstallPs3.Name" xml:space="preserve">
|
||||
<value>buttonInstallPs3</value>
|
||||
<data name=">>pictureBoxDisplay.Name" xml:space="preserve">
|
||||
<value>pictureBoxDisplay</value>
|
||||
</data>
|
||||
<data name=">>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="buttonExport.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 12pt</value>
|
||||
</data>
|
||||
<data name="buttonBedrock.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>585, 375</value>
|
||||
</data>
|
||||
<data name="labelName.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>135, 31</value>
|
||||
</data>
|
||||
<data name="labelName.Text" xml:space="preserve">
|
||||
<value>Skin Pack</value>
|
||||
</data>
|
||||
<data name=">>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=">>buttonDelete.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="buttonDirect.Text" xml:space="preserve">
|
||||
<value>DOWNLOAD TO COLLECTION</value>
|
||||
</data>
|
||||
<data name="buttonInstallPs3.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 12pt</value>
|
||||
</data>
|
||||
<data name=">>buttonDelete.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>buttonExport.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>buttonInstallXbox.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="buttonInstallPs3.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<value>Flat</value>
|
||||
</data>
|
||||
<data name="labelDesc.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>353, 286</value>
|
||||
</data>
|
||||
<data name="buttonDelete.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 12pt</value>
|
||||
</data>
|
||||
<data name=">>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=">>buttonDirect.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>labelDesc.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="buttonExport.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>45, 30</value>
|
||||
<data name=">>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=">>pictureBoxDisplay.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="labelDesc.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 12pt</value>
|
||||
</data>
|
||||
<data name="buttonDelete.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>178, 66</value>
|
||||
</data>
|
||||
<data name=">>buttonBedrock.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="buttonInstallXbox.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<value>Flat</value>
|
||||
</data>
|
||||
<data name=">>buttonInstallWiiU.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="buttonDelete.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>384, 338</value>
|
||||
</data>
|
||||
<data name=">>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="labelName.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>24, 24</value>
|
||||
</data>
|
||||
<data name=">>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="buttonInstallXbox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="labelName.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 20.25pt</value>
|
||||
</data>
|
||||
<data name=">>labelDesc.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="buttonInstallXbox.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 12pt</value>
|
||||
<data name=">>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=">>labelName.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<data name="buttonBedrock.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 12pt</value>
|
||||
</data>
|
||||
<data name="buttonInstallPs3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>657, 338</value>
|
||||
<data name="buttonBedrock.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>388, 293</value>
|
||||
</data>
|
||||
<data name="buttonExport.Text" xml:space="preserve">
|
||||
<value>Get</value>
|
||||
<data name="buttonBedrock.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 30</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>760, 418</value>
|
||||
<data name="buttonBedrock.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>MetroFramework.Forms.MetroForm, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
|
||||
<data name="buttonBedrock.Text" xml:space="preserve">
|
||||
<value>Convert to Bedrock</value>
|
||||
</data>
|
||||
<data name="buttonInstallWiiU.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>9</value>
|
||||
<data name=">>buttonBedrock.Name" xml:space="preserve">
|
||||
<value>buttonBedrock</value>
|
||||
</data>
|
||||
<data name=">>labelDesc.Name" xml:space="preserve">
|
||||
<value>labelDesc</value>
|
||||
</data>
|
||||
<data name="buttonDirect.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>buttonDelete.Type" xml:space="preserve">
|
||||
<data name=">>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=">>buttonExport.Name" xml:space="preserve">
|
||||
<value>buttonExport</value>
|
||||
<data name=">>buttonBedrock.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="pictureBoxDisplay.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
<data name=">>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.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>pckCenterOpen</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>MetroFramework.Forms.MetroForm, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
|
||||
</data>
|
||||
</root>
|
||||
1937
PCK-Studio/MainForm.Designer.cs
generated
1937
PCK-Studio/MainForm.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -8,26 +8,25 @@ using System.Drawing.Drawing2D;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing.Imaging;
|
||||
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Formats.GameRule;
|
||||
using OMI.Workers.GameRule;
|
||||
using OMI.Workers.Pck;
|
||||
using OMI.Formats.Languages;
|
||||
using OMI.Workers.Pck;
|
||||
using OMI.Workers.GameRule;
|
||||
using OMI.Workers.Language;
|
||||
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using PckStudio.Classes.Utils;
|
||||
using PckStudio.Classes.Utils.ARC;
|
||||
using PckStudio.Classes._3ds.Utils;
|
||||
using PckStudio.Forms;
|
||||
using PckStudio.Forms.Utilities.Skins;
|
||||
using PckStudio.Forms.Utilities;
|
||||
using PckStudio.Forms.Editor;
|
||||
using PckStudio.Forms.Additional_Popups.Animation;
|
||||
using PckStudio.Forms.Additional_Popups;
|
||||
using PckStudio.Classes.Misc;
|
||||
using OMI.Formats.Pck;
|
||||
using PckStudio.Classes.IO.PCK;
|
||||
using PckStudio.Classes.IO._3DST;
|
||||
|
||||
namespace PckStudio
|
||||
{
|
||||
@@ -73,7 +72,7 @@ namespace PckStudio
|
||||
labelVersion.Text = "PCK Studio: " + Application.ProductVersion;
|
||||
ChangelogRichTextBox.Text = Resources.CHANGELOG;
|
||||
#if DEBUG
|
||||
labelVersion.Text += Program.Info.BuildVersion + " " + Program.Info.LastCommitHash;
|
||||
labelVersion.Text += $" (Debug build: {Program.Info.BuildVersion}@{Program.Info.LastCommitHash})";
|
||||
#endif
|
||||
|
||||
pckFileTypeHandler = new Dictionary<PckFile.FileData.FileType, Action<PckFile.FileData>>(15)
|
||||
@@ -114,8 +113,7 @@ namespace PckStudio
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
RPC.Initialize();
|
||||
if (currentPCK == null)
|
||||
RPC.SetPresence("An Open Source .PCK File Editor", "Program by PhoenixARC");
|
||||
UpdateRPC();
|
||||
|
||||
skinToolStripMenuItem1.Click += (sender, e) => setFileType_Click(sender, e, PckFile.FileData.FileType.SkinFile);
|
||||
capeToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, PckFile.FileData.FileType.CapeFile);
|
||||
@@ -129,16 +127,6 @@ namespace PckStudio
|
||||
modelsFileBINToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, PckFile.FileData.FileType.ModelsFile);
|
||||
behavioursFileBINToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, PckFile.FileData.FileType.BehavioursFile);
|
||||
entityMaterialsFileBINToolStripMenuItem.Click += (sender, e) => setFileType_Click(sender, e, PckFile.FileData.FileType.MaterialFile);
|
||||
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(Program.AppDataCache + "\\mods\\");
|
||||
}
|
||||
catch (UnauthorizedAccessException ex)
|
||||
{
|
||||
MessageBox.Show("Could not Create directory due to Unauthorized Access");
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
|
||||
@@ -164,31 +152,26 @@ namespace PckStudio
|
||||
{
|
||||
isTemplateFile = false;
|
||||
saveLocation = filePath;
|
||||
var reader = new PckFileReader();
|
||||
PckFile pck = reader.FromFile(filePath);
|
||||
|
||||
metroLabel3.Text = "Current PCK File: " + Path.GetFileName(filePath);
|
||||
// using (var fileStream = File.OpenRead(filePath))
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// }
|
||||
// catch (OverflowException ex)
|
||||
// {
|
||||
// MessageBox.Show("Failed to open pck\n" +
|
||||
// $"Try {(LittleEndianCheckBox.Checked ? "unchecking" : "checking")} the 'Open/Save as Vita/PS4 pck' check box in the upper right corner.",
|
||||
// "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
// Debug.WriteLine(ex.Message);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// MessageBox.Show("Failed to open pck\n" +
|
||||
// "If this is an Audio/Music Cues pck, please use the specialized editor while inside of the parent pck.",
|
||||
// "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
// Debug.WriteLine("Can't open pck file of type: " + pck?.type.ToString());
|
||||
// }
|
||||
//}
|
||||
return pck;
|
||||
var reader = new PckFileReader(LittleEndianCheckBox.Checked ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
try
|
||||
{
|
||||
PckFile pck = reader.FromFile(filePath);
|
||||
return pck;
|
||||
}
|
||||
catch (OverflowException ex)
|
||||
{
|
||||
MessageBox.Show("Failed to open pck\n" +
|
||||
$"Try {(LittleEndianCheckBox.Checked ? "unchecking" : "checking")} the 'Open/Save as Vita/PS4 pck' check box in the upper right corner.",
|
||||
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show("Failed to open pck\n" +
|
||||
"If this is an Audio/Music Cues pck, please use the specialized editor while inside of the parent pck.",
|
||||
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void CheckForPasswordAndRemove()
|
||||
@@ -202,7 +185,11 @@ namespace PckStudio
|
||||
private void LoadEditorTab()
|
||||
{
|
||||
fileEntryCountLabel.Text = "Files:" + currentPCK.Files.Count;
|
||||
treeViewMain.Enabled = treeMeta.Enabled = true;
|
||||
if (isTemplateFile)
|
||||
pckFileLabel.Text = "Unsaved File!";
|
||||
else
|
||||
pckFileLabel.Text = "Current PCK File: " + Path.GetFileName(saveLocation);
|
||||
treeViewMain.Enabled = treeMeta.Enabled = true;
|
||||
closeToolStripMenuItem.Visible = true;
|
||||
saveToolStripMenuItem.Enabled = true;
|
||||
saveToolStripMenuItem1.Enabled = true;
|
||||
@@ -237,7 +224,8 @@ namespace PckStudio
|
||||
convertToBedrockToolStripMenuItem.Enabled = false;
|
||||
addCustomPackImageToolStripMenuItem.Enabled = false;
|
||||
fileEntryCountLabel.Text = string.Empty;
|
||||
UpdateRPC();
|
||||
pckFileLabel.Text = string.Empty;
|
||||
UpdateRPC();
|
||||
|
||||
}
|
||||
|
||||
@@ -386,7 +374,7 @@ namespace PckStudio
|
||||
{
|
||||
if (currentPCK == null)
|
||||
{
|
||||
RPC.SetPresence("An Open Source .PCK File Editor", "Program by PhoenixARC");
|
||||
RPC.SetPresence("An Open Source .PCK File Editor");
|
||||
return;
|
||||
};
|
||||
|
||||
@@ -394,11 +382,11 @@ namespace PckStudio
|
||||
locfile.HasLocEntry("IDS_DISPLAY_NAME") &&
|
||||
locfile.Languages.Contains("en-EN"))
|
||||
{
|
||||
RPC.SetPresence($"Editing a Pack: {locfile.GetLocEntry("IDS_DISPLAY_NAME", "en-EN")}", "Program by PhoenixARC");
|
||||
RPC.SetPresence($"Editing a Pack: {locfile.GetLocEntry("IDS_DISPLAY_NAME", "en-EN")}");
|
||||
return;
|
||||
}
|
||||
// default
|
||||
RPC.SetPresence("An Open Source .PCK File Editor", "Program by PhoenixARC");
|
||||
RPC.SetPresence("An Open Source .PCK File Editor");
|
||||
}
|
||||
|
||||
private void HandleAudioFile(PckFile.FileData file)
|
||||
@@ -436,7 +424,7 @@ namespace PckStudio
|
||||
{
|
||||
if (file.Properties.HasProperty("BOX"))
|
||||
{
|
||||
using (generateModel generate = new generateModel(file.Properties, new PictureBox()))
|
||||
using (generateModel generate = new generateModel(file.Properties, Image.FromStream(new MemoryStream(file.Data))))
|
||||
if (generate.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
entryDataTextBox.Text = entryTypeTextBox.Text = string.Empty;
|
||||
@@ -449,7 +437,7 @@ namespace PckStudio
|
||||
using (var ms = new MemoryStream(file.Data))
|
||||
{
|
||||
var texture = Image.FromStream(ms);
|
||||
SkinPreview frm = new SkinPreview(texture, file.Properties.GetPropertyValue("ANIM", s => new SkinANIM(s)));
|
||||
SkinPreview frm = new SkinPreview(texture, file.Properties.GetPropertyValue("ANIM", SkinANIM.FromString));
|
||||
frm.ShowDialog(this);
|
||||
frm.Dispose();
|
||||
}
|
||||
@@ -487,7 +475,7 @@ namespace PckStudio
|
||||
buttonEdit.Visible = true;
|
||||
}
|
||||
else if (file.Properties.HasProperty("ANIM") &&
|
||||
file.Properties.GetPropertyValue("ANIM", s => new SkinANIM(s)) == (ANIM_EFFECTS.RESOLUTION_64x64 | ANIM_EFFECTS.SLIM_MODEL))
|
||||
file.Properties.GetPropertyValue("ANIM", s => SkinANIM.FromString(s) == (ANIM_EFFECTS.RESOLUTION_64x64 | ANIM_EFFECTS.SLIM_MODEL)))
|
||||
{
|
||||
buttonEdit.Text = "View Skin";
|
||||
buttonEdit.Visible = true;
|
||||
@@ -838,16 +826,19 @@ namespace PckStudio
|
||||
private PckFile.FileData CreateNewAudioFile(bool isLittle)
|
||||
{
|
||||
// create actual valid pck file structure
|
||||
PCKAudioFile audioPck = new PCKAudioFile();
|
||||
audioPck.AddCategory(PCKAudioFile.AudioCategory.EAudioType.Overworld);
|
||||
audioPck.AddCategory(PCKAudioFile.AudioCategory.EAudioType.Nether);
|
||||
audioPck.AddCategory(PCKAudioFile.AudioCategory.EAudioType.End);
|
||||
PckFile.FileData pckFileData = currentPCK.CreateNew("audio.pck", PckFile.FileData.FileType.AudioFile);
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
PCKAudioFileWriter.Write(stream, audioPck, isLittle);
|
||||
pckFileData.SetData(stream.ToArray());
|
||||
}
|
||||
PckAudioFile audioPck = new PckAudioFile();
|
||||
audioPck.AddCategory(PckAudioFile.AudioCategory.EAudioType.Overworld);
|
||||
audioPck.AddCategory(PckAudioFile.AudioCategory.EAudioType.Nether);
|
||||
audioPck.AddCategory(PckAudioFile.AudioCategory.EAudioType.End);
|
||||
PckFile.FileData pckFileData = currentPCK.CreateNewFile("audio.pck", PckFile.FileData.FileType.AudioFile, () =>
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
var writer = new PckAudioFileWriter(audioPck, isLittle ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
writer.WriteToStream(stream);
|
||||
return stream.ToArray();
|
||||
}
|
||||
});
|
||||
return pckFileData;
|
||||
}
|
||||
|
||||
@@ -870,28 +861,37 @@ namespace PckStudio
|
||||
|
||||
private void createAnimatedTextureToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var ofd = new OpenFileDialog())
|
||||
using var ofd = new OpenFileDialog()
|
||||
{
|
||||
ofd.Filter = "PNG Files | *.png";
|
||||
ofd.Title = "Select a PNG File";
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
Filter = "PNG Files | *.png",
|
||||
Title = "Select a PNG File",
|
||||
};
|
||||
if (ofd.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
using ChangeTile diag = new ChangeTile();
|
||||
if (diag.ShowDialog(this) != DialogResult.OK)
|
||||
return;
|
||||
|
||||
using Image img = new Bitmap(ofd.FileName);
|
||||
var file = currentPCK.CreateNewFile(
|
||||
$"res/textures/{AnimationResources.GetAnimationSection(diag.IsItem)}/{diag.SelectedTile}.png",
|
||||
PckFile.FileData.FileType.TextureFile,
|
||||
() =>
|
||||
{
|
||||
using ChangeTile diag = new ChangeTile();
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
using Image img = new Bitmap(ofd.FileName);
|
||||
var file = AnimationUtil.CreateNewAnimationFile(img, diag.SelectedTile, diag.IsItem);
|
||||
using AnimationEditor animationEditor = new AnimationEditor(file);
|
||||
if (animationEditor.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
file.Filename = animationEditor.TileName;
|
||||
currentPCK.Files.Add(file);
|
||||
ReloadMetaTreeView();
|
||||
BuildMainTreeView();
|
||||
wasModified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
using var stream = new MemoryStream();
|
||||
img.Save(stream, ImageFormat.Png);
|
||||
return stream.ToArray();
|
||||
});
|
||||
file.Properties.Add(("ANIM", string.Empty));
|
||||
|
||||
using AnimationEditor animationEditor = new AnimationEditor(file);
|
||||
if (animationEditor.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
file.Filename = animationEditor.TileName;
|
||||
ReloadMetaTreeView();
|
||||
BuildMainTreeView();
|
||||
wasModified = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -950,21 +950,21 @@ namespace PckStudio
|
||||
if (parent_file.Filetype is PckFile.FileData.FileType.TexturePackInfoFile || parent_file.Filetype is PckFile.FileData.FileType.SkinDataFile)
|
||||
{
|
||||
Console.WriteLine("Rebuilding " + parent_file.Filename);
|
||||
PckFile newPCKFile = new PckFile(3);
|
||||
PckFile newPCKFile = new PckFile(3)
|
||||
{
|
||||
HasVerionString = parent_file.Filetype is PckFile.FileData.FileType.SkinDataFile
|
||||
};
|
||||
|
||||
foreach (TreeNode node in GetAllChildNodes(parent.Nodes))
|
||||
{
|
||||
if (node.Tag is PckFile.FileData node_file)
|
||||
{
|
||||
PckFile.FileData new_file = newPCKFile.CreateNew(node_file.Filename, node_file.Filetype);
|
||||
PckFile.FileData new_file = newPCKFile.CreateNewFile(node_file.Filename.Replace(parent_file.Filename + "/", String.Empty), node_file.Filetype);
|
||||
foreach (var prop in node_file.Properties) new_file.Properties.Add(prop);
|
||||
new_file.SetData(node_file.Data);
|
||||
}
|
||||
}
|
||||
|
||||
// Bool to add the XMLVersion property
|
||||
bool isSkinsPCK = parent_file.Filetype is PckFile.FileData.FileType.SkinDataFile;
|
||||
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
var writer = new PckFileWriter(newPCKFile, LittleEndianCheckBox.Checked ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
@@ -1008,9 +1008,9 @@ namespace PckStudio
|
||||
try
|
||||
{
|
||||
using ANIMEditor diag = new ANIMEditor(property.Item2);
|
||||
if (diag.ShowDialog(this) == DialogResult.OK && diag.saved)
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
file.Properties[i] = ("ANIM", diag.outANIM);
|
||||
file.Properties[i] = ("ANIM", diag.ResultAnim.ToString());
|
||||
if (IsSubPCKNode(treeViewMain.SelectedNode.FullPath))
|
||||
RebuildSubPCK(treeViewMain.SelectedNode);
|
||||
ReloadMetaTreeView();
|
||||
@@ -1021,7 +1021,7 @@ namespace PckStudio
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
MessageBox.Show("Failed to parse ANIM value, aborting to normal functionality. Please make sure the value only includes hexadecimal characters (0-9,A-F) and has no more than 8 characters. It can have an optional prefix of \"0x\".");
|
||||
MessageBox.Show("Failed to parse ANIM value, aborting to normal functionality. Please make sure the value only includes hexadecimal characters (0-9,A-F) and has no more than 8 characters.");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1073,21 +1073,19 @@ namespace PckStudio
|
||||
|
||||
// Creates new empty file entry
|
||||
PckFile.FileData mf = new PckFile.FileData(string.Empty, mfO.Filetype);
|
||||
mf.SetData(mfO.Data); // adds file data to minefile
|
||||
mf.SetData(mfO.Data);
|
||||
string dirName = Path.GetDirectoryName(mfO.Filename);
|
||||
|
||||
int clone_number = 0;
|
||||
string prev_clone_str = "_clone1";
|
||||
string nameWithoutExt = Path.GetFileNameWithoutExtension(mfO.Filename);
|
||||
string newFileName = mfO.Filename;
|
||||
do // Checks for existing clones and names it accordingly
|
||||
do
|
||||
{
|
||||
clone_number++;
|
||||
string clone_str = "_clone" + clone_number.ToString();
|
||||
bool isClone = nameWithoutExt.Contains("_clone");
|
||||
if (isClone) newFileName = nameWithoutExt.Remove(nameWithoutExt.Length - 7) + clone_str + Path.GetExtension(mfO.Filename);
|
||||
else newFileName = nameWithoutExt + clone_str + Path.GetExtension(mfO.Filename);
|
||||
prev_clone_str = clone_str;
|
||||
}
|
||||
while (currentPCK.HasFile(dirName + (string.IsNullOrEmpty(dirName) ? "" : "/") + newFileName, mf.Filetype));
|
||||
|
||||
@@ -1208,23 +1206,26 @@ namespace PckStudio
|
||||
private PckFile InitializePack(int packId, int packVersion, string packName, bool createSkinsPCK)
|
||||
{
|
||||
var newPck = new PckFile(3);
|
||||
var zeroFile = newPck.CreateNew("0", PckFile.FileData.FileType.InfoFile);
|
||||
|
||||
var zeroFile = newPck.CreateNewFile("0", PckFile.FileData.FileType.InfoFile);
|
||||
zeroFile.Properties.Add(("PACKID", packId.ToString()));
|
||||
zeroFile.Properties.Add(("PACKVERSION", packVersion.ToString()));
|
||||
var loc = newPck.CreateNew("localisation.loc", PckFile.FileData.FileType.LocalisationFile);
|
||||
var locFile = new LOCFile();
|
||||
locFile.InitializeDefault(packName);
|
||||
using (var stream = new MemoryStream())
|
||||
|
||||
var loc = newPck.CreateNewFile("localisation.loc", PckFile.FileData.FileType.LocalisationFile, () =>
|
||||
{
|
||||
LOCFileWriter.Write(stream, locFile);
|
||||
loc.SetData(stream.ToArray());
|
||||
}
|
||||
var locFile = new LOCFile();
|
||||
locFile.InitializeDefault(packName);
|
||||
using var stream = new MemoryStream();
|
||||
var writer = new LOCFileWriter(locFile, 2);
|
||||
writer.WriteToStream(stream);
|
||||
return stream.ToArray();
|
||||
});
|
||||
|
||||
if (createSkinsPCK)
|
||||
{
|
||||
PckFile.FileData skinsPCKFile = newPck.CreateNew("Skins.pck", PckFile.FileData.FileType.SkinDataFile);
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
PckFile.FileData skinsPCKFile = newPck.CreateNewFile("Skins.pck", PckFile.FileData.FileType.SkinDataFile, () =>
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
var writer = new PckFileWriter(new PckFile(3)
|
||||
{
|
||||
HasVerionString = true
|
||||
@@ -1233,8 +1234,8 @@ namespace PckStudio
|
||||
? OMI.Endianness.LittleEndian
|
||||
: OMI.Endianness.BigEndian);
|
||||
writer.WriteToStream(stream);
|
||||
skinsPCKFile.SetData(stream.ToArray());
|
||||
}
|
||||
return stream.ToArray();
|
||||
});
|
||||
}
|
||||
return newPck;
|
||||
}
|
||||
@@ -1242,7 +1243,17 @@ namespace PckStudio
|
||||
private PckFile InitializeTexturePack(int packId, int packVersion, string packName, string res, bool createSkinsPCK = false)
|
||||
{
|
||||
var newPck = InitializePack(packId, packVersion, packName, createSkinsPCK);
|
||||
var texturepackInfo = newPck.CreateNew($"{res}/{res}Info.pck", PckFile.FileData.FileType.TexturePackInfoFile);
|
||||
var texturepackInfo = newPck.CreateNewFile($"{res}/{res}Info.pck", PckFile.FileData.FileType.TexturePackInfoFile,
|
||||
() =>
|
||||
{
|
||||
using var ms = new MemoryStream();
|
||||
var writer = new PckFileWriter(new PckFile(3),
|
||||
LittleEndianCheckBox.Checked
|
||||
? OMI.Endianness.LittleEndian
|
||||
: OMI.Endianness.BigEndian);
|
||||
writer.WriteToStream(ms);
|
||||
return ms.ToArray();
|
||||
});
|
||||
texturepackInfo.Properties.Add(("PACKID", "0"));
|
||||
texturepackInfo.Properties.Add(("DATAPATH", $"{res}Data.pck"));
|
||||
|
||||
@@ -1250,34 +1261,25 @@ namespace PckStudio
|
||||
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
var icon = infoPCK.CreateNew("icon.png", PckFile.FileData.FileType.TextureFile);
|
||||
var icon = infoPCK.CreateNewFile("icon.png", PckFile.FileData.FileType.TextureFile);
|
||||
Resources.TexturePackIcon.Save(ms, ImageFormat.Png);
|
||||
icon.SetData(ms.ToArray());
|
||||
}
|
||||
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
var comparison = infoPCK.CreateNew("comparison.png", PckFile.FileData.FileType.TextureFile);
|
||||
var comparison = infoPCK.CreateNewFile("comparison.png", PckFile.FileData.FileType.TextureFile);
|
||||
Resources.Comparison.Save(ms, ImageFormat.Png);
|
||||
comparison.SetData(ms.ToArray());
|
||||
}
|
||||
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
var writer = new PckFileWriter(new PckFile(3),
|
||||
LittleEndianCheckBox.Checked
|
||||
? OMI.Endianness.LittleEndian
|
||||
: OMI.Endianness.BigEndian);
|
||||
writer.WriteToStream(ms);
|
||||
texturepackInfo.SetData(ms.ToArray());
|
||||
}
|
||||
return newPck;
|
||||
}
|
||||
|
||||
private PckFile InitializeMashUpPack(int packId, int packVersion, string packName, string res)
|
||||
{
|
||||
var newPck = InitializeTexturePack(packId, packVersion, packName, res, true);
|
||||
var gameRuleFile = newPck.CreateNew("GameRules.grf", PckFile.FileData.FileType.GameRulesFile);
|
||||
var gameRuleFile = newPck.CreateNewFile("GameRules.grf", PckFile.FileData.FileType.GameRulesFile);
|
||||
var grfFile = new GameRuleFile();
|
||||
grfFile.AddRule("MapOptions",
|
||||
new KeyValuePair<string, string>("seed", "0"),
|
||||
@@ -1319,10 +1321,10 @@ namespace PckStudio
|
||||
private void texturePackToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
checkSaveState();
|
||||
CreateTexturePack packPrompt = new CreateTexturePack("");
|
||||
CreateTexturePack packPrompt = new CreateTexturePack();
|
||||
if (packPrompt.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
currentPCK = InitializeTexturePack(new Random().Next(8000, int.MaxValue), 0, packPrompt.packName, packPrompt.packRes);
|
||||
currentPCK = InitializeTexturePack(new Random().Next(8000, int.MaxValue), 0, packPrompt.PackName, packPrompt.PackRes);
|
||||
isTemplateFile = true;
|
||||
wasModified = true;
|
||||
LoadEditorTab();
|
||||
@@ -1332,10 +1334,10 @@ namespace PckStudio
|
||||
private void mashUpPackToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
checkSaveState();
|
||||
CreateTexturePack packPrompt = new CreateTexturePack("");
|
||||
CreateTexturePack packPrompt = new CreateTexturePack();
|
||||
if (packPrompt.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
currentPCK = InitializeMashUpPack(new Random().Next(8000, int.MaxValue), 0, packPrompt.packName, packPrompt.packRes);
|
||||
currentPCK = InitializeMashUpPack(new Random().Next(8000, int.MaxValue), 0, packPrompt.PackName, packPrompt.PackRes);
|
||||
isTemplateFile = true;
|
||||
wasModified = false;
|
||||
LoadEditorTab();
|
||||
@@ -1581,7 +1583,8 @@ namespace PckStudio
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
LOCFileWriter.Write(stream, locFile);
|
||||
var writer = new LOCFileWriter(locFile, 2);
|
||||
writer.WriteToStream(stream);
|
||||
locdata.SetData(stream.ToArray());
|
||||
}
|
||||
return true;
|
||||
@@ -1605,7 +1608,7 @@ namespace PckStudio
|
||||
{
|
||||
string skinNameImport = Path.GetFileName(contents.FileName);
|
||||
byte[] data = File.ReadAllBytes(contents.FileName);
|
||||
PckFile.FileData mfNew = currentPCK.CreateNew(skinNameImport, PckFile.FileData.FileType.SkinFile);
|
||||
PckFile.FileData mfNew = currentPCK.CreateNewFile(skinNameImport, PckFile.FileData.FileType.SkinFile);
|
||||
mfNew.SetData(data);
|
||||
string propertyFile = Path.GetFileNameWithoutExtension(contents.FileName) + ".txt";
|
||||
if (File.Exists(propertyFile))
|
||||
@@ -1691,31 +1694,6 @@ namespace PckStudio
|
||||
MessageBox.Show("This feature is currently being reworked.", "Currently unavailable", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
public static Bitmap ResizeImage(Image image, int width, int height)
|
||||
{
|
||||
var destRect = new Rectangle(0, 0, width, height);
|
||||
var destImage = new Bitmap(width, height);
|
||||
|
||||
destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);
|
||||
|
||||
using (var graphics = Graphics.FromImage(destImage))
|
||||
{
|
||||
graphics.CompositingMode = CompositingMode.SourceCopy;
|
||||
graphics.CompositingQuality = CompositingQuality.HighQuality;
|
||||
graphics.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||
graphics.SmoothingMode = SmoothingMode.HighQuality;
|
||||
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
|
||||
using (var wrapMode = new ImageAttributes())
|
||||
{
|
||||
wrapMode.SetWrapMode(WrapMode.TileFlipXY);
|
||||
graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode);
|
||||
}
|
||||
}
|
||||
|
||||
return destImage;
|
||||
}
|
||||
|
||||
private void openToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
DateTime Begin = DateTime.Now;
|
||||
@@ -1983,7 +1961,7 @@ namespace PckStudio
|
||||
renamePrompt.TextLabel.Text = "Path";
|
||||
if (renamePrompt.ShowDialog() == DialogResult.OK && !string.IsNullOrEmpty(renamePrompt.NewText))
|
||||
{
|
||||
var file = currentPCK.CreateNew(renamePrompt.NewText, PckFile.FileData.FileType.TextureFile);
|
||||
var file = currentPCK.CreateNewFile(renamePrompt.NewText, PckFile.FileData.FileType.TextureFile);
|
||||
file.SetData(File.ReadAllBytes(fileDialog.FileName));
|
||||
BuildMainTreeView();
|
||||
wasModified = true;
|
||||
@@ -2056,14 +2034,13 @@ namespace PckStudio
|
||||
|
||||
private void colourscolToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
PckFile.FileData NewColorFile;
|
||||
if (currentPCK.TryGetFile("colours.col", PckFile.FileData.FileType.ColourTableFile, out NewColorFile))
|
||||
if (currentPCK.TryGetFile("colours.col", PckFile.FileData.FileType.ColourTableFile, out _))
|
||||
{
|
||||
MessageBox.Show("A color table file already exists in this PCK and a new one cannot be created.", "Operation aborted");
|
||||
return;
|
||||
}
|
||||
NewColorFile = currentPCK.CreateNew("colours.col", PckFile.FileData.FileType.ColourTableFile);
|
||||
NewColorFile.SetData(Resources.tu69colours);
|
||||
var newColorFile = currentPCK.CreateNewFile("colours.col", PckFile.FileData.FileType.ColourTableFile);
|
||||
newColorFile.SetData(Resources.tu69colours);
|
||||
BuildMainTreeView();
|
||||
}
|
||||
|
||||
@@ -2083,11 +2060,11 @@ namespace PckStudio
|
||||
saveFileDialog.DefaultExt = ".3dst";
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
using (var fs = saveFileDialog.OpenFile())
|
||||
using (var ms = new MemoryStream(file.Data))
|
||||
{
|
||||
using var ms = new MemoryStream(file.Data);
|
||||
Image img = Image.FromStream(ms);
|
||||
_3DSUtil.SetImageTo3DST(fs, img);
|
||||
var writer = new _3DSTextureWriter(img);
|
||||
writer.WriteToFile(saveFileDialog.FileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2169,19 +2146,14 @@ namespace PckStudio
|
||||
return;
|
||||
}
|
||||
|
||||
PckFile.FileData newSkinsPCKFile = currentPCK.CreateNew("Skins.pck", PckFile.FileData.FileType.SkinDataFile);
|
||||
using (var stream = new MemoryStream())
|
||||
currentPCK.CreateNewFile("Skins.pck", PckFile.FileData.FileType.SkinDataFile, () =>
|
||||
{
|
||||
var writer = new PckFileWriter(new PckFile(3)
|
||||
{
|
||||
HasVerionString = true
|
||||
},
|
||||
LittleEndianCheckBox.Checked
|
||||
? OMI.Endianness.LittleEndian
|
||||
: OMI.Endianness.BigEndian);
|
||||
writer.WriteToStream(stream);
|
||||
newSkinsPCKFile.SetData(stream.ToArray());
|
||||
}
|
||||
using var stream = new MemoryStream();
|
||||
var writer = new PckFileWriter(new PckFile(3) { HasVerionString = true },
|
||||
LittleEndianCheckBox.Checked ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
writer.WriteToStream(stream);
|
||||
return stream.ToArray();
|
||||
});
|
||||
|
||||
BuildMainTreeView();
|
||||
|
||||
@@ -2208,7 +2180,7 @@ namespace PckStudio
|
||||
int idx = line.IndexOf(' ');
|
||||
if (idx == -1 || line.Length - 1 == idx)
|
||||
continue;
|
||||
file.Properties.Add((line.Substring(0, idx), line.Substring(idx + 1)));
|
||||
file.Properties.Add((line.Substring(0, idx).Replace(":", string.Empty), line.Substring(idx + 1)));
|
||||
}
|
||||
ReloadMetaTreeView();
|
||||
if (IsSubPCKNode(node.FullPath)) RebuildSubPCK(node);
|
||||
@@ -2230,7 +2202,7 @@ namespace PckStudio
|
||||
using AddFilePrompt diag = new AddFilePrompt("res/" + Path.GetFileName(ofd.FileName));
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
PckFile.FileData file = currentPCK.CreateNew(diag.filepath, (PckFile.FileData.FileType)diag.filetype);
|
||||
PckFile.FileData file = currentPCK.CreateNewFile(diag.Filepath, (PckFile.FileData.FileType)diag.Filetype);
|
||||
file.SetData(File.ReadAllBytes(ofd.FileName));
|
||||
|
||||
if (IsSubPCKNode(treeViewMain.SelectedNode.FullPath)) RebuildSubPCK(treeViewMain.SelectedNode);
|
||||
@@ -2245,32 +2217,34 @@ namespace PckStudio
|
||||
|
||||
private void behavioursbinToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
PckFile.FileData NewBehaviourFile;
|
||||
if (currentPCK.TryGetFile("behaviours.bin", PckFile.FileData.FileType.BehavioursFile, out NewBehaviourFile))
|
||||
if (currentPCK.TryGetFile("behaviours.bin", PckFile.FileData.FileType.BehavioursFile, out _))
|
||||
{
|
||||
MessageBox.Show("A behaviours file already exists in this PCK and a new one cannot be created.", "Operation aborted");
|
||||
return;
|
||||
}
|
||||
NewBehaviourFile = BehaviourUtil.CreateNewBehaviourFile();
|
||||
currentPCK.Files.Add(NewBehaviourFile);
|
||||
|
||||
currentPCK.CreateNewFile("behaviours.bin", PckFile.FileData.FileType.BehavioursFile, BehaviourResources.BehaviourFileInitializer);
|
||||
BuildMainTreeView();
|
||||
}
|
||||
|
||||
private void entityMaterialsbinToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
PckFile.FileData NewMaterialsFile;
|
||||
if (currentPCK.TryGetFile("entityMaterials.bin", PckFile.FileData.FileType.MaterialFile, out NewMaterialsFile))
|
||||
if (currentPCK.TryGetFile("entityMaterials.bin", PckFile.FileData.FileType.MaterialFile, out _))
|
||||
{
|
||||
MessageBox.Show("A behaviours file already exists in this PCK and a new one cannot be created.", "Operation aborted");
|
||||
return;
|
||||
}
|
||||
NewMaterialsFile = MaterialUtil.CreateNewMaterialsFile();
|
||||
currentPCK.Files.Add(NewMaterialsFile);
|
||||
currentPCK.CreateNewFile("entityMaterials.bin", PckFile.FileData.FileType.MaterialFile, MaterialResources.MaterialsFileInitializer);
|
||||
BuildMainTreeView();
|
||||
}
|
||||
}
|
||||
|
||||
public class PckNodeSorter : System.Collections.IComparer, IComparer<TreeNode>
|
||||
private void trelloBoardToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start("https://trello.com/b/0XLNOEbe/pck-studio");
|
||||
}
|
||||
}
|
||||
|
||||
public class PckNodeSorter : System.Collections.IComparer, IComparer<TreeNode>
|
||||
{
|
||||
private bool CheckForSkinAndCapeFiles(TreeNode node)
|
||||
{
|
||||
|
||||
@@ -28483,6 +28483,12 @@
|
||||
<data name="joinDevelopmentDiscordToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Join Development Discord</value>
|
||||
</data>
|
||||
<data name="trelloBoardToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>212, 22</value>
|
||||
</data>
|
||||
<data name="trelloBoardToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Trello Board</value>
|
||||
</data>
|
||||
<data name="storeToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
@@ -30419,28 +30425,25 @@
|
||||
<data name="editorTab.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
|
||||
<value>None</value>
|
||||
</data>
|
||||
<data name="metroLabel3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>9, 28</value>
|
||||
<data name="pckFileLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 17</value>
|
||||
</data>
|
||||
<data name="metroLabel3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>326, 19</value>
|
||||
<data name="pckFileLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>332, 23</value>
|
||||
</data>
|
||||
<data name="metroLabel3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
<data name="pckFileLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="metroLabel3.Text" xml:space="preserve">
|
||||
<data name=">>pckFileLabel.Name" xml:space="preserve">
|
||||
<value>pckFileLabel</value>
|
||||
</data>
|
||||
<data name=">>metroLabel3.Name" xml:space="preserve">
|
||||
<value>metroLabel3</value>
|
||||
</data>
|
||||
<data name=">>metroLabel3.Type" xml:space="preserve">
|
||||
<data name=">>pckFileLabel.Type" xml:space="preserve">
|
||||
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
|
||||
</data>
|
||||
<data name=">>metroLabel3.Parent" xml:space="preserve">
|
||||
<data name=">>pckFileLabel.Parent" xml:space="preserve">
|
||||
<value>editorTab</value>
|
||||
</data>
|
||||
<data name=">>metroLabel3.ZOrder" xml:space="preserve">
|
||||
<data name=">>pckFileLabel.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="labelImageSize.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
@@ -33966,6 +33969,12 @@
|
||||
<data name=">>imageList.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ImageList, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>trelloBoardToolStripMenuItem.Name" xml:space="preserve">
|
||||
<value>trelloBoardToolStripMenuItem</value>
|
||||
</data>
|
||||
<data name=">>trelloBoardToolStripMenuItem.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=">>$this.Name" xml:space="preserve">
|
||||
<value>MainForm</value>
|
||||
</data>
|
||||
|
||||
@@ -170,24 +170,28 @@
|
||||
<Compile Include="Classes\API\PCKCenter\PCKCollections.cs" />
|
||||
<Compile Include="Classes\API\PCKCenter\PCKCollectionsLocal.cs" />
|
||||
<Compile Include="Classes\API\PCKCenter\SaveLocalJSON.cs" />
|
||||
<Compile Include="Classes\Extensions\BlendMode.cs" />
|
||||
<Compile Include="Classes\Extensions\ColorExtensions.cs" />
|
||||
<Compile Include="Classes\Extensions\EnumerableExtensions.cs" />
|
||||
<Compile Include="Classes\Extensions\GraphicsExtensions.cs" />
|
||||
<Compile Include="Classes\FileTypes\CSMBFile.cs" />
|
||||
<Compile Include="Classes\FileTypes\PCKAudioFile.cs" />
|
||||
<Compile Include="Classes\FileTypes\PckAudioFile.cs" />
|
||||
<Compile Include="Classes\FileTypes\Binka.cs" />
|
||||
<Compile Include="Classes\FileTypes\CSM.cs" />
|
||||
<Compile Include="Classes\IO\3DST\3DSTextureReader.cs" />
|
||||
<Compile Include="Classes\IO\3DST\3DSTextureWriter.cs" />
|
||||
<Compile Include="Classes\IO\CSMB\CSMBFileReader.cs" />
|
||||
<Compile Include="Classes\IO\CSMB\CSMBFileWriter.cs" />
|
||||
<Compile Include="Classes\IO\PCK\PCKAudioFileReader.cs" />
|
||||
<Compile Include="Classes\IO\PCK\PCKAudioFileWriter.cs" />
|
||||
<Compile Include="Classes\IO\PckAudio\PckAudioFileReader.cs" />
|
||||
<Compile Include="Classes\IO\PckAudio\PckAudioFileWriter.cs" />
|
||||
<Compile Include="Classes\IO\Sounds\SoundIO.cs" />
|
||||
<Compile Include="Classes\IO\Sounds\Sounds.cs" />
|
||||
<Compile Include="Classes\Misc\FTPClient.cs" />
|
||||
<Compile Include="Classes\Misc\FileCacher.cs" />
|
||||
<Compile Include="Classes\Models\DefaultModels\Steve64x64Model.cs" />
|
||||
<Compile Include="Classes\Utils\3DS\3DSUtil.cs" />
|
||||
<Compile Include="Classes\Models\SkinBox.cs" />
|
||||
<Compile Include="Classes\Utils\ARC\ARCUtil.cs" />
|
||||
<Compile Include="Classes\Extentions\ImageExtentions.cs" />
|
||||
<Compile Include="Classes\Extensions\ImageExtensions.cs" />
|
||||
<Compile Include="Classes\Utils\SkinANIM.cs" />
|
||||
<Compile Include="Classes\IO\StreamDataReader.cs" />
|
||||
<Compile Include="Classes\IO\StreamDataWriter.cs" />
|
||||
<Compile Include="Classes\Models\DefaultModels\Steve64x32Model.cs" />
|
||||
<Compile Include="Classes\Models\DefaultModels\ModelBase.cs" />
|
||||
<Compile Include="Classes\Models\DefaultModels\Texture.cs" />
|
||||
@@ -265,6 +269,8 @@
|
||||
<Compile Include="Forms\Editor\ModelsEditor.Designer.cs">
|
||||
<DependentUpon>ModelsEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Editor\Animation.cs" />
|
||||
<Compile Include="Forms\Editor\AnimationPlayer.cs" />
|
||||
<Compile Include="Forms\Editor\MaterialsEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -349,20 +355,20 @@
|
||||
<Compile Include="Forms\Additional-Popups\Audio\pleaseWait.Designer.cs">
|
||||
<DependentUpon>pleaseWait.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Utilities\ModelsUtil.cs" />
|
||||
<Compile Include="Forms\Utilities\MaterialUtil.cs" />
|
||||
<Compile Include="Forms\Utilities\BehaviourUtil.cs" />
|
||||
<Compile Include="Forms\Utilities\AnimationUtil.cs" />
|
||||
<Compile Include="Forms\Utilities\Skins\BoxEditor.cs">
|
||||
<Compile Include="Forms\Utilities\ModelsResources.cs" />
|
||||
<Compile Include="Forms\Utilities\MaterialResources.cs" />
|
||||
<Compile Include="Forms\Utilities\BehaviourResources.cs" />
|
||||
<Compile Include="Forms\Utilities\AnimationResources.cs" />
|
||||
<Compile Include="Forms\Editor\BoxEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Utilities\Skins\BoxEditor.Designer.cs">
|
||||
<Compile Include="Forms\Editor\BoxEditor.Designer.cs">
|
||||
<DependentUpon>BoxEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Utilities\Skins\ANIMEditor.cs">
|
||||
<Compile Include="Forms\Editor\ANIMEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Utilities\Skins\ANIMEditor.Designer.cs">
|
||||
<Compile Include="Forms\Editor\ANIMEditor.Designer.cs">
|
||||
<DependentUpon>ANIMEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainForm.cs">
|
||||
@@ -419,7 +425,7 @@
|
||||
<Compile Include="Forms\Utilities\installWiiU.Designer.cs">
|
||||
<DependentUpon>installWiiU.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Classes\Utils\ListUtils.cs" />
|
||||
<Compile Include="Classes\Extensions\ListExtensions.cs" />
|
||||
<Compile Include="Forms\Utilities\PCK Manager.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -467,7 +473,7 @@
|
||||
<DependentUpon>CreditsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Classes\Utils\3DS\TextureCodec.cs" />
|
||||
<Compile Include="Classes\IO\3DST\TextureCodec.cs" />
|
||||
<EmbeddedResource Include="Forms\Additional-Popups\EntityForms\AddEntry.resx">
|
||||
<DependentUpon>AddEntry.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -556,10 +562,10 @@
|
||||
<EmbeddedResource Include="Forms\Additional-Popups\Audio\pleaseWait.resx">
|
||||
<DependentUpon>pleaseWait.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Utilities\Skins\BoxEditor.resx">
|
||||
<EmbeddedResource Include="Forms\Editor\BoxEditor.resx">
|
||||
<DependentUpon>BoxEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Utilities\Skins\ANIMEditor.resx">
|
||||
<EmbeddedResource Include="Forms\Editor\ANIMEditor.resx">
|
||||
<DependentUpon>ANIMEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainForm.ja.resx">
|
||||
@@ -660,9 +666,7 @@
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\entityBehaviourData.json" />
|
||||
<None Include="Resources\entityMaterialData.json" />
|
||||
<None Include="Resources\entityModelData.json" />
|
||||
<None Include="Resources\entityData.json" />
|
||||
<None Include="Resources\TexturePackIcon.png" />
|
||||
<None Include="Resources\apps.zip" />
|
||||
<None Include="Resources\binka\binkawin.asi" />
|
||||
@@ -768,6 +772,10 @@
|
||||
<Project>{693AEBC1-293D-4DF0-BCAE-26A1099FE7BB}</Project>
|
||||
<Name>OMI Filetype Library</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Vendor\SharpMss32\SharpMss32\SharpMss32.csproj">
|
||||
<Project>{e8d0b671-3ab1-48b6-a767-58df67bd5d11}</Project>
|
||||
<Name>SharpMss32</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace PckStudio
|
||||
{
|
||||
// adopted Minecraft Java Edition Snapshot format (YYwWWn)
|
||||
// to keep better track of work in progress features and builds
|
||||
return string.Format("(Debug build #{0}w{1}{2})",
|
||||
return string.Format("#{0}w{1}{2}",
|
||||
date.ToString("yy"),
|
||||
BuildCalendar.GetWeekOfYear(date, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Monday),
|
||||
BuildType);
|
||||
@@ -37,6 +37,7 @@ namespace PckStudio
|
||||
|
||||
static class Program
|
||||
{
|
||||
public static readonly string ProjectUrl = "https://github.com/PhoenixARC/-PCK-Studio";
|
||||
public static readonly string BaseAPIUrl = "http://api.pckstudio.xyz/api/pck";
|
||||
public static readonly string BackUpAPIUrl = "https://raw.githubusercontent.com/PhoenixARC/pckstudio.tk/main/studio/PCK/api/";
|
||||
public static readonly string AppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "PCK-Studio");
|
||||
|
||||
@@ -7,13 +7,12 @@ 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: AssemblyProduct("PCK Studio")]
|
||||
[assembly: AssemblyProduct("PCK-Studio")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("PCK Studio")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
|
||||
65
PCK-Studio/Properties/Resources.Designer.cs
generated
65
PCK-Studio/Properties/Resources.Designer.cs
generated
@@ -285,64 +285,7 @@ namespace PckStudio.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "COMMENT": "Entity data research by NessieHax (Miku-666) and MattNL",
|
||||
/// "entities": [
|
||||
/// { "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" },
|
||||
/// { " [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string entityBehaviourData {
|
||||
get {
|
||||
return ResourceManager.GetString("entityBehaviourData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "COMMENT": "Entity data research by NessieHax (Miku-666) and MattNL",
|
||||
/// "entities": [
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "bat": "Bat" },
|
||||
/// { "blaze_head": "Blaze (Head Only)" },
|
||||
/// { "": "" },
|
||||
/// { "cat": "Cat (PS4 EXCLUSIVE)" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "drowned": "Drowned" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "ender_dragon": "Ender Dragon" }, [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string entityMaterialData {
|
||||
get {
|
||||
return ResourceManager.GetString("entityMaterialData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "COMMENT": "Entity data research by NessieHax (Miku-666) and MattNL",
|
||||
/// "entities": [
|
||||
/// "models": [
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
@@ -363,11 +306,11 @@ namespace PckStudio.Properties {
|
||||
/// { "zombie.drowned": "Drowned" },
|
||||
/// { "": "" },
|
||||
/// { "": "" },
|
||||
/// [rest of string was truncated]";.
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string entityModelData {
|
||||
public static string entityData {
|
||||
get {
|
||||
return ResourceManager.GetString("entityModelData", resourceCulture);
|
||||
return ResourceManager.GetString("entityData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -331,13 +331,7 @@
|
||||
<data name="entities_sheet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\entities.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="entityBehaviourData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\entityBehaviourData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="entityMaterialData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\entityMaterialData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="entityModelData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\entityModelData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
<data name="entityData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\entityData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,133 +0,0 @@
|
||||
{
|
||||
"COMMENT": "Entity data research by NessieHax (Miku-666) and MattNL",
|
||||
"entities": [
|
||||
{ "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" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" }
|
||||
]
|
||||
}
|
||||
369
PCK-Studio/Resources/entityData.json
Normal file
369
PCK-Studio/Resources/entityData.json
Normal file
@@ -0,0 +1,369 @@
|
||||
{
|
||||
"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": "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" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" }
|
||||
]
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
{
|
||||
"COMMENT": "Entity data research by NessieHax (Miku-666) and MattNL",
|
||||
"entities": [
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "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": "Villager (PS4 EXCLUSIVE)" },
|
||||
{ "": "" },
|
||||
{ "phantom_invisible": "Phantom (Second Layer)" },
|
||||
{ "enderman_invisible": "Enderman (Second Layer)" },
|
||||
{ "spider_invisible": "Spiders (Second Layer)" },
|
||||
{ "spider": "Spiders" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" }
|
||||
]
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
{
|
||||
"COMMENT": "Entity data research by NessieHax (Miku-666) and MattNL",
|
||||
"entities": [
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "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": "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)" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "": "" }
|
||||
]
|
||||
}
|
||||
@@ -9,6 +9,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Vendor", "Vendor", "{FC87F3
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OMI Filetype Library", "Vendor\OMI-Lib\OMI Filetypes Library\OMI Filetype Library.csproj", "{693AEBC1-293D-4DF0-BCAE-26A1099FE7BB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpMss32", "Vendor\SharpMss32\SharpMss32\SharpMss32.csproj", "{E8D0B671-3AB1-48B6-A767-58DF67BD5D11}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -43,12 +45,25 @@ Global
|
||||
{693AEBC1-293D-4DF0-BCAE-26A1099FE7BB}.Release|x64.Build.0 = Release|Any CPU
|
||||
{693AEBC1-293D-4DF0-BCAE-26A1099FE7BB}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{693AEBC1-293D-4DF0-BCAE-26A1099FE7BB}.Release|x86.Build.0 = Release|Any CPU
|
||||
{E8D0B671-3AB1-48B6-A767-58DF67BD5D11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E8D0B671-3AB1-48B6-A767-58DF67BD5D11}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E8D0B671-3AB1-48B6-A767-58DF67BD5D11}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{E8D0B671-3AB1-48B6-A767-58DF67BD5D11}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{E8D0B671-3AB1-48B6-A767-58DF67BD5D11}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{E8D0B671-3AB1-48B6-A767-58DF67BD5D11}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{E8D0B671-3AB1-48B6-A767-58DF67BD5D11}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E8D0B671-3AB1-48B6-A767-58DF67BD5D11}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E8D0B671-3AB1-48B6-A767-58DF67BD5D11}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{E8D0B671-3AB1-48B6-A767-58DF67BD5D11}.Release|x64.Build.0 = Release|Any CPU
|
||||
{E8D0B671-3AB1-48B6-A767-58DF67BD5D11}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E8D0B671-3AB1-48B6-A767-58DF67BD5D11}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{693AEBC1-293D-4DF0-BCAE-26A1099FE7BB} = {FC87F3E5-B07E-4FFB-889F-66FA3A3CFCAA}
|
||||
{E8D0B671-3AB1-48B6-A767-58DF67BD5D11} = {FC87F3E5-B07E-4FFB-889F-66FA3A3CFCAA}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {9A3BF1FB-950F-401E-9F58-EA7BBADCE6F2}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user