Add PCKFile.cs super buggy build state!!!!

This commit is contained in:
miku-666
2022-06-01 09:23:27 +02:00
parent 712544d22c
commit f3b1b654eb
41 changed files with 2365 additions and 3411 deletions

View File

@@ -81,7 +81,6 @@ namespace CSM_Visualiser
sw.Write("");
sw.Close();
string data = System.IO.File.ReadAllText(url);
int splitnum = 11;
string[] data0 = data.Split('\n');
foreach (string str in data0)

View File

@@ -75,7 +75,7 @@ namespace PckStudio
int unk1 = f.readInt();
if (unk1 != 2)
throw new NotImplementedException("Not localization data");
throw new NotImplementedException("Unsupported localization data");
int langCount = f.readInt();
f.skip(1);

View File

@@ -1,369 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Windows.Forms;
namespace PckStudio
{
public class PCK
{
public class MineFile
{
public int filesize;
public int type;
public string name;
public byte[] data;
public List<object[]> entries = new List<object[]>();
}
public Dictionary<int, string> types = new Dictionary<int, string>();
public Dictionary<string, int> typeCodes = new Dictionary<string, int>();
public List<MineFile> mineFiles = new List<MineFile>();
public bool IsLittleEndian = false;
public int pckType = 0;
public PCK()
{
}
public PCK(string filename)
{
try
{
IsLittleEndian = !(Read(File.ReadAllBytes(filename)));
if (IsLittleEndian)
ReadVita(File.ReadAllBytes(filename));
}
catch (Exception err)
{
Console.WriteLine(err.Message);
}
}
#region NormalPCK
private static byte[] endianReverseUnicode(byte[] str)
{
byte[] newStr = new byte[str.Length];
for (int i = 0; i < str.Length; i += 2)
{
newStr[i] = str[i + 1];
newStr[i + 1] = str[i];
}
return newStr;
}
static string readMineString(FileData f)
{
int length = f.readInt() * 2;
return Encoding.Unicode.GetString(endianReverseUnicode(f.readBytes(length)));
}
public bool Read(byte[] data, bool isAudio = false)
{
try
{
pckType = 0;
types = new Dictionary<int, string>();
typeCodes = new Dictionary<string, int>();
mineFiles = new List<MineFile>();
FileData fileData = new FileData(data);
fileData.Endian = Endianness.Big;
fileData.readInt();
int entryTypeCount = fileData.readInt();
for (int i = 0; i < entryTypeCount; i++)
{
int unk = fileData.readInt();
string text = "";
try
{
text = readMineString(fileData);
}
catch
{
text = "Hello!";
}
types.Add(unk, text);
typeCodes.Add(text, unk);
fileData.skip(4);
}
int itemCount = fileData.readInt();
// no metadata
if (entryTypeCount == 0)
{
Console.WriteLine("PckType0");
}
// type 1 or 2
else if (itemCount < 3)
{
pckType = itemCount;
if (pckType == 1)
{
Console.WriteLine("PckType1");
/* Not really sure if this is accurate or not
* but it seems that when there is only one file in the pck,
* the following line causes it to fail. Since I don't want to potentially break PCK loading for this type,
* I simply added this parameter to the read function. Since the parameter is false by default,
* you won't have to worry about setting it. -MattNL
*/
if (!isAudio) itemCount = fileData.readInt();
}
if (pckType == 2)
Console.WriteLine("PckType2");
}
// regular pck
else
{
Console.WriteLine("NormalPCK");
}
for (int i = 0; i < itemCount; i++)
{
MineFile mf = new MineFile();
mf.filesize = fileData.readInt();
mf.type = fileData.readInt();
int length = fileData.readInt() * 2;
mf.name = Encoding.Unicode.GetString(endianReverseUnicode(fileData.readBytes(length)));
fileData.skip(4);
mineFiles.Add(mf);
}
foreach (MineFile mf in mineFiles)
{
int entryCount = fileData.readInt();
for (int i = 0; i < entryCount; i++)
{
object[] temp = new object[2];
int entryTypeInt = fileData.readInt();
temp[0] = types[entryTypeInt]; //Entry type
temp[1] = readMineString(fileData); //Entry data
fileData.skip(4);
mf.entries.Add(temp);
}
mf.data = fileData.readBytes(mf.filesize);
}
return true;
}
catch
{
return false;
}
}
private static void writeMinecraftString(FileOutput f, string str)
{
byte[] d = Encoding.Unicode.GetBytes(str);
f.writeInt(d.Length / 2);
f.writeBytes(endianReverseUnicode(d));
f.writeInt(0);
}
public byte[] Rebuild()
{
FileOutput f = new FileOutput();
f.Endian = Endianness.Big;
f.writeInt(3);
f.writeInt(types.Count);
foreach (int type in types.Keys)
{
f.writeInt(type);
writeMinecraftString(f, types[type]);
}
f.writeInt(mineFiles.Count);
foreach (MineFile mf in mineFiles)
{
f.writeInt(mf.data.Length);
f.writeInt(mf.type);
writeMinecraftString(f, mf.name);
}
foreach (MineFile mf in mineFiles)
{
string missing = "";
try
{
f.writeInt(mf.entries.Count);
foreach (object[] entry in mf.entries)
{
missing = entry[0].ToString();
f.writeInt(typeCodes[(string)entry[0]]);
writeMinecraftString(f, (string)entry[1]);
}
f.writeBytes(mf.data);
}
catch (Exception)
{
MessageBox.Show(missing + " is not in the main metadatabase");
break;
}
}
return f.getBytes();
}
#endregion
#region Vita/PS4 PCK
static string readMineStringVita(FileData f)
{
int length = f.readIntVita() * 2;
Console.WriteLine(length.ToString());
return Encoding.Unicode.GetString((f.readBytes(length)));
}
public void ReadVita(byte[] data, bool isAudio = false)
{
pckType = 0;
types = new Dictionary<int, string>();
typeCodes = new Dictionary<string, int>();
mineFiles = new List<MineFile>();
FileData fileData = new FileData(data);
fileData.Endian = Endianness.Big;
fileData.readIntVita();
int entryTypeCount = fileData.readIntVita();
//int a = 0;
for (int i = 0; i < entryTypeCount; i++)
{
int unk = fileData.readIntVita();
string text = "";
try
{
text = readMineStringVita(fileData);
//File.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + "\\exp\\PCKDump" + a + ".bin", text);
//a++;
}
catch
{
text = "Hello!";
}
types.Add(unk, text);
typeCodes.Add(text, unk);
fileData.skip(4);
}
int itemCount = fileData.readIntVita();
Console.WriteLine(itemCount);
// no metadata
if (entryTypeCount == 0)
{
Console.WriteLine("PckType0");
}
// type 1 or 2
else if (itemCount < 3)
{
pckType = itemCount;
if (pckType == 1)
{
/* Not really sure if this is accurate or not
* but it seems that when there is only one file in the pck,
* the following line causes it to fail. Since I don't want to potentially break PCK loading for this type,
* I simply added this defaultly disabled parameter to the read function. -MattNL
*/
if (!isAudio) itemCount = fileData.readIntVita();
}
if (pckType == 2)
Console.WriteLine("PckType2");
}
// regular pck
else
{
Console.WriteLine("NormalPCK");
}
for (int j = 0; j < itemCount; j++)
{
MineFile mineFile = new MineFile();
mineFile.filesize = fileData.readIntVita();
mineFile.type = fileData.readIntVita();
int length = fileData.readIntVita() * 2;
mineFile.name = Encoding.Unicode.GetString((fileData.readBytes(length)));
fileData.skip(4);
mineFiles.Add(mineFile);
}
foreach (MineFile mineFile2 in mineFiles)
{
int num4 = fileData.readIntVita();
for (int k = 0; k < num4; k++)
{
object[] array = new object[2];
int key = fileData.readIntVita();
array[0] = types[key];
array[1] = readMineStringVita(fileData);
fileData.skip(4);
mineFile2.entries.Add(array);
}
mineFile2.data = fileData.readBytes(mineFile2.filesize);
}
}
private static void writeMinecraftStringVita(FileOutput f, string str)
{
Console.WriteLine("WriteVita -- " + str);
byte[] bytes = Encoding.Unicode.GetBytes(str);
f.writeIntVita(bytes.Length / 2);
f.writeBytes((bytes));
f.writeIntVita(0);
}
public byte[] RebuildVita()
{
FileOutput fileOutput = new FileOutput();
fileOutput.Endian = Endianness.Big;
fileOutput.writeIntVita(3);
fileOutput.writeIntVita(this.types.Count);
foreach (int num in this.types.Keys)
{
fileOutput.writeIntVita(num);
PCK.writeMinecraftStringVita(fileOutput, this.types[num]);
}
fileOutput.writeIntVita(this.mineFiles.Count);
foreach (PCK.MineFile mineFile in this.mineFiles)
{
fileOutput.writeIntVita(mineFile.data.Length);
fileOutput.writeIntVita(mineFile.type);
PCK.writeMinecraftStringVita(fileOutput, mineFile.name);
}
foreach (PCK.MineFile mineFile2 in this.mineFiles)
{
string str = "";
try
{
fileOutput.writeIntVita(mineFile2.entries.Count);
foreach (object[] array in mineFile2.entries)
{
str = array[0].ToString();
fileOutput.writeIntVita(this.typeCodes[(string)array[0]]);
PCK.writeMinecraftStringVita(fileOutput, (string)array[1]);
}
fileOutput.writeBytes(mineFile2.data);
}
catch (Exception)
{
MessageBox.Show(str + " is not in the main metadatabase");
break;
}
}
return fileOutput.getBytes();
}
#endregion
}
}

View File

@@ -0,0 +1,147 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PckStudio.Classes.FileTypes
{
using PCKProperties = Dictionary<string, string>;
public class PCKFile
{
public int type { get; } = -1;
public Dictionary<int, string> meta_data { get; } = new Dictionary<int, string>();
public List<FileData> file_entries { get; set; } = new List<FileData>();
public bool isLittleEndian { get; } = false;
public class FileData
{
public enum EDLCType : int
{
DLCSkinFile,
DLCCapeFile,
DLCTextureFile,
DLCUIDataFile,
DLCLocalisationFile = 6,
DLCGameRulesFile,
DLCAudioFile,
DLCColourTableFile,
DLCGameRulesHeader,
DLCModelsFile = 12,
DLCBehavioursFile,
DLCMaterialFile,
}
public string name;
public int type { get; }
public byte[] data { get; set; } = null;
public int size { get; set; }
public PCKProperties properties { get; set; } = new PCKProperties();
public FileData(string name, int type, int size)
{
this.type = type;
this.name = name;
this.size = size;
}
public FileData(int type)
{
name = "no_name";
this.type = type;
}
}
public PCKFile(Stream stream, bool isLittleEndian = false)
{
this.isLittleEndian = isLittleEndian;
type = ReadInt(stream);
ReadMetaData(stream);
ReadFileEntries(stream);
}
public PCKFile(int type, bool isLittleEndian = false)
{
this.type = type;
this.isLittleEndian = isLittleEndian;
}
internal void ReadMetaData(Stream stream)
{
int meta_entry_count = ReadInt(stream);
bool has_xml_tag = false;
for (; 0 < meta_entry_count; meta_entry_count--)
{
int index = ReadInt(stream);
string value = ReadString(stream);
if (value.Equals("XMLVERSION")) has_xml_tag = true;
meta_data[index] = value;
ReadInt(stream); // padding ????
}
if (has_xml_tag)
Console.WriteLine(ReadInt(stream).ToString("X08"));
}
internal void ReadFileEntries(Stream stream)
{
int file_entry_count = ReadInt(stream);
for (;0 < file_entry_count; file_entry_count--)
{
int file_size = ReadInt(stream);
int file_type = ReadInt(stream);
string name = ReadString(stream);
file_entries.Add(new FileData(name, file_type, file_size));
ReadInt(stream);
}
foreach (var file_entry in file_entries)
{
int property_count = ReadInt(stream);
var properties = new PCKProperties();
for(;0 < property_count; property_count--)
{
int index = ReadInt(stream);
string key = meta_data[index];
string value = ReadString(stream);
ReadInt(stream); // padding ???
properties[key] = value;
}
file_entry.properties = properties;
file_entry.data = new byte[file_entry.size];
stream.Read(file_entry.data, 0, file_entry.size);
}
}
internal string ReadString(Stream stream)
{
int len = ReadInt(stream);
byte[] stringBuffer = new byte[len * 2];
stream.Read(stringBuffer, 0, len * 2);
return Encoding.BigEndianUnicode.GetString(stringBuffer, 0, len * 2);
}
internal int ReadInt(Stream stream)
{
byte[] buffer = new byte[4];
stream.Read(buffer, 0, 4);
if (BitConverter.IsLittleEndian && !isLittleEndian)
Array.Reverse(buffer);
return BitConverter.ToInt32(buffer, 0);
}
internal short ReadShort(Stream stream)
{
byte[] buffer = new byte[2];
stream.Read(buffer, 0, 2);
if (BitConverter.IsLittleEndian && !isLittleEndian)
Array.Reverse(buffer);
return BitConverter.ToInt16(buffer, 0);
}
public override string ToString()
{
return $"type: {type}\nmeta entry count: {meta_data.Count}\nfile entry count: {file_entries.Count}";
}
}
}

View File

@@ -51,9 +51,7 @@ namespace PckStudio
{
return (b[p++] & 0xFF) | ((b[p++] & 0xFF) << 8) | ((b[p++] & 0xFF) << 16) | ((b[p++] & 0xFF) << 24);
}
int d = p;
int oot = ((b[p++] & 0xFF) << 24) | ((b[p++] & 0xFF) << 16) | ((b[p++] & 0xFF) << 8) | (b[p++] & 0xFF);
return oot;
return ((b[p++] & 0xFF) << 24) | ((b[p++] & 0xFF) << 16) | ((b[p++] & 0xFF) << 8) | (b[p++] & 0xFF);
}
public int readThree()

View File

@@ -14,13 +14,8 @@ namespace PckStudio.Classes.IO
public string[] GetLocalCategories()
{
string cat = "";
try
{
if (File.Exists(cache + "PCKCategories.txt"))
cat = File.ReadAllText(cache + "PCKCategories.txt");
}
catch
{
}
return cat.Split(new[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
}

View File

@@ -1,6 +0,0 @@
namespace PckStudio
{
internal class KeyValuePair<T>
{
}
}

View File

@@ -1,4 +1,5 @@
using System.Runtime.InteropServices;
using System;
using System.Runtime.InteropServices;
using DiscordRPC;
namespace RichPresenceClient
@@ -8,31 +9,36 @@ namespace RichPresenceClient
public static DiscordRpcClient client;
public static void SetRPC(string ClientID, string details, string state, string imageLarge, string imageLargeText, string imageSmall)
public static void Initialize(string ClientID)
{
client = new DiscordRpcClient(ClientID);
//client = new DiscordRpcClient(ClientID);
//if (!client.Initialize())
//{
// throw new Exception("ERROR initializing Discord RPC");
//}
}
client.Initialize();
client.SetPresence(new RichPresence()
{
Details = details,
State = state,
Assets = new Assets()
{
LargeImageKey = imageLarge,
LargeImageText = imageLargeText,
SmallImageKey = imageSmall
}
});
public static void SetRPC(string details, string state, string imageLarge, string imageLargeText, string imageSmall)
{
//if (client == null) return;
//client.SetPresence(new RichPresence()
//{
// Details = details,
// State = state,
// Assets = new Assets()
// {
// LargeImageKey = imageLarge,
// LargeImageText = imageLargeText,
// SmallImageKey = imageSmall
// }
//});
}
public static void CloseRPC()
{
if (client != null)
client.Dispose();
//if (client != null)
// client.Deinitialize();
// client.Dispose();
}
}

View File

@@ -16,29 +16,14 @@ namespace PckStudio
public static string baseurl = "https://www.pckstudio.xyz/studio/PCK/api/";
public static string backurl = "https://raw.githubusercontent.com/PhoenixARC/pckstudio.tk/main/studio/PCK/api/";
public static string Appdata = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/PCK Studio/";
public static bool IsDev = false;
public static FormMain formMain;
public static bool IsDev;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
try
{
if (args[0] == "-dev")
IsDev = true;
}
catch { }
PckStudio.Forms.goodbye gg = new PckStudio.Forms.goodbye();
PckStudio.Forms.Job gj = new PckStudio.Forms.Job();
if(!System.IO.File.Exists(Appdata + "\\goodbyemark"))
gg.ShowDialog();
if(!System.IO.File.Exists(Appdata + "\\discordmark"))
gj.ShowDialog();
IsDev = args.Length > 0 && args[0] == "-dev";
Application.Run(new PckStudio.FormMain());
}
}

View File

@@ -8,16 +8,16 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MetroFramework.Forms;
using PckStudio.Classes.FileTypes;
namespace PckStudio.Forms
{
public partial class AddPCKPassword : MetroForm
{
PckStudio.PCK currentPCK;
PckStudio.PCK.MineFile file;
public AddPCKPassword(PckStudio.PCK.MineFile fileIn, PckStudio.PCK currentPCKIn)
PCKFile currentPCK;
PCKFile.FileData file;
public AddPCKPassword(PCKFile.FileData fileIn, PCKFile currentPCKIn)
{
InitializeComponent();
file = fileIn;
currentPCK = currentPCKIn;
@@ -25,9 +25,8 @@ namespace PckStudio.Forms
private void buttonUnlocked_Click(object sender, EventArgs e)
{
object[] obj = { "LOCK", MD5(textBoxPass.Text) };
file.entries.Add(obj);
this.Close();
file.properties.Add("LOCK", MD5(textBoxPass.Text));
Close();
}
public string MD5(string s)

View File

@@ -1,4 +1,5 @@
using System;
using PckStudio.Classes.FileTypes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -12,10 +13,10 @@ namespace PckStudio
{
public partial class MetaADD : Form
{
PCK currentPCK;
PCKFile currentPCK;
TreeView treeView1;
public MetaADD(PCK currentPCKIn, TreeView treeView1In)
public MetaADD(PCKFile currentPCKIn, TreeView treeView1In)
{
InitializeComponent();
@@ -26,16 +27,13 @@ namespace PckStudio
private void button1_Click(object sender, EventArgs e)
{
try
{
currentPCK.typeCodes.Add(textBox1.Text, treeView1.Nodes.Count);
currentPCK.types.Add(treeView1.Nodes.Count, textBox1.Text);
}
catch (Exception)
if (currentPCK.meta_data.ContainsValue(textBox1.Text))
{
MessageBox.Show("This metatag already exits");
return;
}
this.Close();
currentPCK.meta_data.Add(currentPCK.meta_data.Count, textBox1.Text);
Close();
}
}
}

View File

@@ -1,4 +1,5 @@
using System;
using PckStudio.Classes.FileTypes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -12,9 +13,9 @@ namespace PckStudio
{
public partial class meta : MetroFramework.Forms.MetroForm
{
PCK currentPCK;
PCKFile currentPCK;
public meta(PCK currentPCKIn)
public meta(PCKFile currentPCKIn)
{
InitializeComponent();
@@ -32,17 +33,17 @@ namespace PckStudio
{
try
{
treeView1.Nodes.Clear();
foreach (string key in currentPCK.typeCodes.Keys)
foreach (string key in currentPCK.meta_data.Values)
{
treeView1.Nodes.Add(key);
}
}
catch (Exception)
catch (Exception ex)
{
this.Close();
MessageBox.Show(ex.ToString());
Close();
}
}
@@ -65,7 +66,8 @@ namespace PckStudio
{
try
{
currentPCK.typeCodes.Remove(treeView1.SelectedNode.Text);
MessageBox.Show("TODO");
//currentPCK.meta_data.Remove();
refresh();
}catch (Exception)
{

View File

@@ -15,7 +15,7 @@ namespace PckStudio.Forms
{
string pass;
public pckLocked(string pass, bool correct)
public pckLocked(string pass)
{
this.pass = pass;
@@ -31,12 +31,13 @@ namespace PckStudio.Forms
{
if (MD5(textBoxPass.Text) == pass || MD5(textBoxPass.Text) == MD5(pass))
{
FormMain.correct = true;
this.Close();
DialogResult = DialogResult.OK;
Close();
}
else
{
MessageBox.Show("Incorrect password!");
DialogResult = DialogResult.Abort;
textBoxPass.Text = "";
}
}

View File

@@ -1,4 +1,5 @@
using System;
using PckStudio.Classes.FileTypes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -13,15 +14,13 @@ namespace PckStudio
{
public partial class presetMeta : MetroFramework.Forms.MetroForm
{
PCK currentPCK;
PCK.MineFile file;
string appData = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/PCK Studio/";
PCKFile.FileData file;
string appData = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/PCK Studio/";
public presetMeta(PCK.MineFile fileIn, PCK currentPCKIn)
public presetMeta(PCKFile.FileData fileIn)
{
InitializeComponent();
file = fileIn;
currentPCK = currentPCKIn;
FormBorderStyle = FormBorderStyle.None;
}
@@ -90,8 +89,7 @@ namespace PckStudio
}
else
{
object[] ENTRY = { entryName, entryValue };
file.entries.Add(ENTRY);
file.properties.Add(entryName, entryValue);
entryName = "";
entryValue = "";
entryStart = true;

View File

@@ -1,4 +1,5 @@
using System;
using PckStudio.Classes.FileTypes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -13,8 +14,8 @@ namespace PckStudio
{
public partial class rename : MetroFramework.Forms.MetroForm
{
String oldName;
String newName;
string oldName;
string newName;
TreeNode node;
public rename(TreeNode nodeIn)
@@ -41,7 +42,7 @@ namespace PckStudio
fixDirectoryNameForFiles(n);
continue;
}
PCK.MineFile mf = (PCK.MineFile)n.Tag;
PCKFile.FileData mf = (PCKFile.FileData)n.Tag;
string fullNew = mf.name.Replace(oldName + "/", newName + "/");
Console.WriteLine("Full old - " + mf.name + " - Old: " + oldName + " - New: " + newName + " - " + fullNew);
mf.name = fullNew;
@@ -56,7 +57,7 @@ namespace PckStudio
if (node.Tag == null) fixDirectoryNameForFiles(node);
else
{
PCK.MineFile mf = (PCK.MineFile)node.Tag;
PCKFile.FileData mf = (PCKFile.FileData)node.Tag;
string path = Path.GetDirectoryName(node.FullPath.Replace("\\", "/"));
string fullNew = path + "/" + newName;
mf.name = fullNew;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -130,7 +130,7 @@
</value>
</data>
<data name="folderToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>167, 22</value>
</data>
<data name="folderToolStripMenuItem.Text" xml:space="preserve">
<value>Folder</value>
@@ -152,7 +152,7 @@
</value>
</data>
<data name="skinToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>167, 22</value>
</data>
<data name="skinToolStripMenuItem.Text" xml:space="preserve">
<value>Skin</value>
@@ -174,25 +174,25 @@
</value>
</data>
<data name="createAnimatedTextureToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>167, 22</value>
</data>
<data name="createAnimatedTextureToolStripMenuItem.Text" xml:space="preserve">
<value>Animated Texture</value>
</data>
<data name="normalAudiopckToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>175, 22</value>
</data>
<data name="normalAudiopckToolStripMenuItem.Text" xml:space="preserve">
<value>Normal Audio.pck</value>
</data>
<data name="vitaPS4AudiopckToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>175, 22</value>
</data>
<data name="vitaPS4AudiopckToolStripMenuItem.Text" xml:space="preserve">
<value>Vita/PS4 Audio.pck</value>
</data>
<data name="audiopckToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>167, 22</value>
</data>
<data name="audiopckToolStripMenuItem.Text" xml:space="preserve">
<value>Audio.pck</value>
@@ -206,7 +206,7 @@
</value>
</data>
<data name="createToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>138, 22</value>
</data>
<data name="createToolStripMenuItem.Text" xml:space="preserve">
<value>Create</value>
@@ -220,7 +220,7 @@
</value>
</data>
<data name="cloneFileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>138, 22</value>
</data>
<data name="cloneFileToolStripMenuItem.Text" xml:space="preserve">
<value>Clone</value>
@@ -290,7 +290,7 @@
</value>
</data>
<data name="importSkinsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>138, 22</value>
</data>
<data name="importSkinsToolStripMenuItem.Text" xml:space="preserve">
<value>Import</value>
@@ -305,7 +305,7 @@
</value>
</data>
<data name="extractToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>138, 22</value>
</data>
<data name="extractToolStripMenuItem.Text" xml:space="preserve">
<value>Extract</value>
@@ -318,7 +318,7 @@
</value>
</data>
<data name="renameFileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>138, 22</value>
</data>
<data name="renameFileToolStripMenuItem.Text" xml:space="preserve">
<value>Rename</value>
@@ -334,7 +334,7 @@
</value>
</data>
<data name="replaceToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>138, 22</value>
</data>
<data name="replaceToolStripMenuItem.Text" xml:space="preserve">
<value>Replace</value>
@@ -349,7 +349,7 @@
</value>
</data>
<data name="moveUpToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>138, 22</value>
</data>
<data name="moveUpToolStripMenuItem.Text" xml:space="preserve">
<value>Move Up</value>
@@ -364,7 +364,7 @@
</value>
</data>
<data name="deleteFileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>138, 22</value>
</data>
<data name="deleteFileToolStripMenuItem.Text" xml:space="preserve">
<value>Delete</value>
@@ -379,13 +379,13 @@
</value>
</data>
<data name="moveDownToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>138, 22</value>
</data>
<data name="moveDownToolStripMenuItem.Text" xml:space="preserve">
<value>Move Down</value>
</data>
<data name="contextMenuPCKEntries.Size" type="System.Drawing.Size, System.Drawing">
<value>181, 224</value>
<value>139, 202</value>
</data>
<data name="&gt;&gt;contextMenuPCKEntries.Name" xml:space="preserve">
<value>contextMenuPCKEntries</value>
@@ -3263,24 +3263,6 @@
<data name="storeToolStripMenuItem.Text" xml:space="preserve">
<value>More</value>
</data>
<data name="uPDATEToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 20</value>
</data>
<data name="uPDATEToolStripMenuItem1.Text" xml:space="preserve">
<value>UPDATE</value>
</data>
<data name="uPDATEToolStripMenuItem1.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="tSTToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 20</value>
</data>
<data name="tSTToolStripMenuItem.Text" xml:space="preserve">
<value>TST</value>
</data>
<data name="tSTToolStripMenuItem.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="menuStrip.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 60</value>
</data>
@@ -3303,7 +3285,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;menuStrip.ZOrder" xml:space="preserve">
<value>10</value>
<value>9</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -3413,14 +3395,8 @@
<value>$this</value>
</data>
<data name="&gt;&gt;labelVersion.ZOrder" xml:space="preserve">
<value>9</value>
<value>8</value>
</data>
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>463, 23</value>
</metadata>
<metadata name="directorySearcher1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>627, 23</value>
</metadata>
<data name="myTablePanelPckEdit.ColumnCount" type="System.Int32, mscorlib">
<value>3</value>
</data>
@@ -4053,7 +4029,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;openedPCKS.ZOrder" xml:space="preserve">
<value>7</value>
<value>6</value>
</data>
<data name="pictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@@ -4739,7 +4715,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;pictureBox2.ZOrder" xml:space="preserve">
<value>8</value>
<value>7</value>
</data>
<data name="DBGLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
@@ -4772,7 +4748,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;DBGLabel.ZOrder" xml:space="preserve">
<value>6</value>
<value>5</value>
</data>
<data name="myTablePanel2.ColumnCount" type="System.Int32, mscorlib">
<value>3</value>
@@ -5430,41 +5406,11 @@
<value>$this</value>
</data>
<data name="&gt;&gt;metroTabControl1.ZOrder" xml:space="preserve">
<value>5</value>
<value>4</value>
</data>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>781, 23</value>
<value>449, 27</value>
</metadata>
<data name="ChangeURL.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="ChangeURL.Location" type="System.Drawing.Point, System.Drawing">
<value>715, -10</value>
</data>
<data name="ChangeURL.Size" type="System.Drawing.Size, System.Drawing">
<value>116, 19</value>
</data>
<data name="ChangeURL.TabIndex" type="System.Int32, mscorlib">
<value>20</value>
</data>
<data name="ChangeURL.Text" xml:space="preserve">
<value>PCKChangeLog.txt</value>
</data>
<data name="ChangeURL.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;ChangeURL.Name" xml:space="preserve">
<value>ChangeURL</value>
</data>
<data name="&gt;&gt;ChangeURL.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;ChangeURL.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;ChangeURL.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="LittleEndianCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@@ -5619,7 +5565,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;myTablePanelStartScreen.ZOrder" xml:space="preserve">
<value>4</value>
<value>3</value>
</data>
<data name="myTablePanelStartScreen.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="richTextBoxChangelog" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label5" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pckOpen" Row="0" RowSpan="2" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,57.96915,Percent,42.03085" /&gt;&lt;Rows Styles="Absolute,70,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
@@ -8487,18 +8433,6 @@
<data name="&gt;&gt;joinDevelopmentDiscordToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;uPDATEToolStripMenuItem1.Name" xml:space="preserve">
<value>uPDATEToolStripMenuItem1</value>
</data>
<data name="&gt;&gt;uPDATEToolStripMenuItem1.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tSTToolStripMenuItem.Name" xml:space="preserve">
<value>tSTToolStripMenuItem</value>
</data>
<data name="&gt;&gt;tSTToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;addPresetToolStripMenuItem1.Name" xml:space="preserve">
<value>addPresetToolStripMenuItem1</value>
</data>
@@ -8517,18 +8451,6 @@
<data name="&gt;&gt;deleteEntryToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;backgroundWorker1.Name" xml:space="preserve">
<value>backgroundWorker1</value>
</data>
<data name="&gt;&gt;backgroundWorker1.Type" xml:space="preserve">
<value>System.ComponentModel.BackgroundWorker, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;directorySearcher1.Name" xml:space="preserve">
<value>directorySearcher1</value>
</data>
<data name="&gt;&gt;directorySearcher1.Type" xml:space="preserve">
<value>System.DirectoryServices.DirectorySearcher, System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="&gt;&gt;timer1.Name" xml:space="preserve">
<value>timer1</value>
</data>

View File

@@ -1,4 +1,5 @@
using System;
using PckStudio.Classes.FileTypes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -13,10 +14,10 @@ namespace PckStudio
{
public partial class AdvancedOptions : MetroFramework.Forms.MetroForm
{
PCK.MineFile mf;
PCK currentPCK;
PCKFile.FileData mf;
PCKFile currentPCK;
public AdvancedOptions(PCK currentPCKIn)
public AdvancedOptions(PCKFile currentPCKIn)
{
InitializeComponent();
currentPCK = currentPCKIn;
@@ -52,19 +53,15 @@ namespace PckStudio
{
if (comboBox1.Text == "All")
{
int count = treeMeta.Nodes.Count;
int i = 0;
do
{
foreach (PCK.MineFile mf in currentPCK.mineFiles)
{
object[] obj = { treeMeta.Nodes[i].Text, treeMeta.Nodes[i].Tag };
mf.entries.Add(obj);
}
i += 1;
count -= 1;
} while (count != 0);
MessageBox.Show("Data Added to All Entries");
MessageBox.Show("TODO!!!!");
//foreach (var node in treeMeta.Nodes)
//{
// foreach (PCKFile.FileData mf in currentPCK.file_entries)
// {
// mf.properties.Add(node.Text, node.Tag);
// }
//}
//MessageBox.Show("Data Added to All Entries");
}
else if (comboBox1.Text == "64x64")
{
@@ -72,15 +69,14 @@ namespace PckStudio
int i = 0;
do
{
foreach (PCK.MineFile mf in currentPCK.mineFiles)
foreach (PCKFile.FileData mf in currentPCK.file_entries)
{
MemoryStream png = new MemoryStream(mf.data);
if (Path.GetExtension(mf.name) == ".png")
{
if (Image.FromStream(png).Size.Height == Image.FromStream(png).Size.Width)
{
object[] obj = { treeMeta.Nodes[i].Text, treeMeta.Nodes[i].Tag };
mf.entries.Add(obj);
mf.properties.Add(treeMeta.Nodes[i].Text, treeMeta.Nodes[i].Tag.ToString());
}
}
}
@@ -96,15 +92,14 @@ namespace PckStudio
do
{
foreach (PCK.MineFile mf in currentPCK.mineFiles)
foreach (PCKFile.FileData mf in currentPCK.file_entries)
{
MemoryStream png = new MemoryStream(mf.data);
if (Path.GetExtension(mf.name) == ".png")
{
if (Image.FromStream(png).Size.Height == Image.FromStream(png).Size.Width / 2)
{
object[] obj = { treeMeta.Nodes[i].Text, treeMeta.Nodes[i].Tag };
mf.entries.Add(obj);
mf.properties.Add(treeMeta.Nodes[i].Text, treeMeta.Nodes[i].Tag.ToString());
}
}
}
@@ -120,12 +115,11 @@ namespace PckStudio
do
{
foreach (PCK.MineFile mf in currentPCK.mineFiles)
foreach (PCKFile.FileData mf in currentPCK.file_entries)
{
if (Path.GetExtension(mf.name) == ".png")
{
object[] obj = { treeMeta.Nodes[i].Text, treeMeta.Nodes[i].Tag };
mf.entries.Add(obj);
mf.properties.Add(treeMeta.Nodes[i].Text, treeMeta.Nodes[i].Tag.ToString());
}
}
i += 1;

View File

@@ -1,4 +1,5 @@
using System;
using PckStudio.Classes.FileTypes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -12,7 +13,7 @@ namespace PckStudio
{
public partial class EntryEditor : Form
{
public EntryEditor(Dictionary<int,string> types, PCK.MineFile file)
public EntryEditor(Dictionary<int,string> types, PCKFile.FileData file)
{
InitializeComponent();
this.types = types;
@@ -20,8 +21,7 @@ namespace PckStudio
}
Dictionary<int, string> types;
PCK.MineFile file;
string entryName = "";
PCKFile.FileData file;
private void renameProperly()
{
@@ -33,13 +33,10 @@ namespace PckStudio
foreach(int type in types.Keys)
comboBox1.Items.Add(types[type]);
foreach (object[] entry in file.entries)
foreach (var entry in file.properties)
{
object[] strings = (object[])entry;
TreeNode meta = new TreeNode();
TreeNode meta = new TreeNode(entry.Key);
foreach (object[] entryy in file.entries)
meta.Text = (string)strings[0];
meta.Tag = entry;
treeView1.Nodes.Add(meta);
}
@@ -73,9 +70,8 @@ namespace PckStudio
private void addEntryToolStripMenuItem_Click(object sender, EventArgs e)
{
object[] obj = { "Replace me", "Or it won't save" };
file.entries.Add(obj);
TreeNode t = new TreeNode("temp name") { Tag = obj };
file.properties.Add("Replace me", "Or it won't save");
TreeNode t = new TreeNode("temp name");
treeView1.Nodes.Add(t);
renameProperly();
treeView1.SelectedNode = t;
@@ -85,8 +81,8 @@ namespace PckStudio
{
if (treeView1.SelectedNode != null)
{
object[] temp = (object[])treeView1.SelectedNode.Tag;
file.entries.Remove(temp);
var temp = (string)treeView1.SelectedNode.Tag;
file.properties.Remove(temp);
treeView1.Nodes.Remove(treeView1.SelectedNode);
}
}

View File

@@ -21,16 +21,15 @@ namespace PckStudio.Forms
}
private void SkinPreview_Load(object sender, EventArgs e)
{
Texture[] txt = new Texture[] { new Texture(Texture) };
RenderModl(txt);
RenderModl(Texture);
}
public void RenderModl(Texture[] Textures)
public void RenderModl(Image Source)
{
//RenderBox
System.Drawing.Image source = Textures[0].Source;
Image source = Source;
Object3D object3D = new Box(source, new System.Drawing.Rectangle(8, 0, 0x10, 8), new System.Drawing.Rectangle(0, 8, 0x20, 8), new Point3D(0f, 0f, 0f), Effects.None);
Object3D object3D2 = new Box(source, new System.Drawing.Rectangle(0x28, 0, 0x10, 8), new System.Drawing.Rectangle(0x20, 8, 0x20, 8), new Point3D(0f, 0f, 0f), Effects.None);
Object3D object3D3 = new Box(source, new System.Drawing.Rectangle(0x2C, 0x10, 8, 4), new System.Drawing.Rectangle(0x28, 0x14, 0x20, 0xC), new Point3D(0f, 4f, 0f), Effects.FlipHorizontally);

View File

@@ -86,7 +86,6 @@
this.ShadowType = MetroFramework.Forms.MetroFormShadowType.DropShadow;
this.Style = MetroFramework.MetroColorStyle.Silver;
this.Theme = MetroFramework.MetroThemeStyle.Dark;
this.Load += new System.EventHandler(this.addMeta_Load);
this.ResumeLayout(false);
this.PerformLayout();

View File

@@ -1,4 +1,5 @@
using System;
using PckStudio.Classes.FileTypes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -12,27 +13,19 @@ namespace PckStudio
{
public partial class addMeta : MetroFramework.Forms.MetroForm
{
PCK currentPCK;
PCK.MineFile file;
PCKFile.FileData file;
public addMeta(PCK.MineFile fileIn, PCK currentPCKIn)
public addMeta(PCKFile.FileData fileIn)
{
InitializeComponent();
file = fileIn;
currentPCK = currentPCKIn;
FormBorderStyle = FormBorderStyle.None;
}
private void button1_Click(object sender, EventArgs e)
{
object[] obj = { textBox1.Text, textBox2.Text };
file.entries.Add(obj);
this.Close();
}
private void addMeta_Load(object sender, EventArgs e)
{
file.properties.Add(textBox1.Text, textBox2.Text);
Close();
}
}
}

View File

@@ -12,16 +12,17 @@ using System.Drawing.Drawing2D;
using MySql.Data.MySqlClient;
using System.Net;
using PckStudio;
using PckStudio.Classes.FileTypes;
namespace PckStudio
{
public partial class addnewskin : MetroFramework.Forms.MetroForm
{
PCK currentPCK;
PCKFile currentPCK;
DataTable tbl;
LOC currentLoc;
PCK.MineFile mf = new PCK.MineFile();
PCK.MineFile mfc = new PCK.MineFile();
PCKFile.FileData mf = null;
PCKFile.FileData mfc = null;
TreeView treeView1;
string skinId = "";
TreeNode skin = new TreeNode();
@@ -43,10 +44,12 @@ namespace PckStudio
string skinid;
List<object[]> generatedModel = new List<object[]>();
public addnewskin(PCK currentPCKIn, TreeView treeView1In, string tempIDIn, LOC loc)
public addnewskin(PCKFile currentPCKIn, TreeView treeView1In, string tempIDIn, LOC loc)
{
InitializeComponent();
mf = new PCKFile.FileData(0);
mfc = new PCKFile.FileData(0);
currentLoc = loc;
tbl = new DataTable();
tbl.Columns.Add(new DataColumn("Language") { ReadOnly = true });
@@ -67,7 +70,8 @@ namespace PckStudio
private void checkImage()
{
//Checks image dimensions and sets things accordingly
if (Image.FromFile(ofd).Height == 64)//If skins is 64x64
var img = Image.FromFile(ofd);
if (img.Height == 64) //If skins is 64x64
{
MessageBox.Show("64x64 Skin Detected");
pictureBoxTexture.Width = pictureBoxTexture.Height;
@@ -83,7 +87,7 @@ namespace PckStudio
}
skinType = "64x64";
}
else if (Image.FromFile(ofd).Height == 32)//If skins is 64x32
else if (img.Height == 32)//If skins is 64x32
{
MessageBox.Show("64x32 Skin Detected");
pictureBoxTexture.Width = pictureBoxTexture.Height * 2;
@@ -99,7 +103,7 @@ namespace PckStudio
comboBoxSkinType.Enabled = false;
skinType = "64x32";
}
else if (Image.FromFile(ofd).Width == Image.FromFile(ofd).Height / 1)//If skins is 64x64 HD
else if (img.Width == img.Height / 1)//If skins is 64x64 HD
{
MessageBox.Show("64x64 HD Skin Detected");
pictureBoxTexture.Width = pictureBoxTexture.Height;
@@ -115,7 +119,7 @@ namespace PckStudio
}
skinType = "64x64";
}
else if (Image.FromFile(ofd).Width == Image.FromFile(ofd).Height / 2)//If skins is 64x32 HD
else if (img.Width == img.Height / 2)//If skins is 64x32 HD
{
MessageBox.Show("64x32 HD Skin Detected");
pictureBoxTexture.Width = pictureBoxTexture.Height * 2;
@@ -285,10 +289,10 @@ namespace PckStudio
ofd1.Filter = "PNG Files | *.png";
ofd1.Title = "Select a PNG File";
if (Image.FromFile(ofd1.FileName).Width == Image.FromFile(ofd1.FileName).Height * 2)
var img = Image.FromFile(ofd1.FileName);
if (img.Width == img.Height * 2)
{
useCape = true;
pictureBoxWithInterpolationMode1.SizeMode = PictureBoxSizeMode.StretchImage;
pictureBoxWithInterpolationMode1.InterpolationMode = InterpolationMode.NearestNeighbor;
pictureBoxWithInterpolationMode1.Image = Image.FromFile(ofd1.FileName);
@@ -330,12 +334,11 @@ namespace PckStudio
capePath.Text = "CAPEPATH";
capePath.Tag = "dlccape" + textSkinID.Text + ".png";
object[] CAPE = { capePath.Text, capePath.Tag };
mf.entries.Add(CAPE);
mf.properties.Add(capePath.Text, capePath.Tag.ToString());
currentPCK.mineFiles.Add(mfc);
currentPCK.file_entries.Add(mfc);
mfc.filesize = mf.data.Length; if (mashupStructure == true)
mfc.size = mf.data.Length; if (mashupStructure == true)
{
mfc.name = "Skins/" + "dlccape" + textSkinID.Text + ".png";
}
@@ -344,7 +347,7 @@ namespace PckStudio
mfc.name = "dlccape" + textSkinID.Text + ".png";
}
mfc.type = 1;
//mfc.type = 1;
cape.Text = "dlccape" + textSkinID.Text + ".png";
cape.Tag = mfc;
@@ -367,7 +370,7 @@ namespace PckStudio
}
}
currentPCK.mineFiles.Add(mf);
currentPCK.file_entries.Add(mf);
free.Text = "FREE";
free.Tag = "1";
themeName.Text = "THEMENAME";
@@ -378,12 +381,9 @@ namespace PckStudio
skinName.Tag = textSkinName.Text;
anim.Text = "ANIM";
mf.properties.Add(skinName.Text, textSkinName.Text);
object[] DISPLAY = { skinName.Text, skinName.Tag };
mf.entries.Add(DISPLAY);
object[] DISPLAYID = { displayNameId.Text, displayNameId.Tag };
mf.entries.Add(DISPLAYID);
mf.properties.Add(displayNameId.Text, "IDS_dlcskin" + textSkinID.Text + "_DISPLAYNAME");
if (comboBoxSkinType.Text == "Default (64x32)")
@@ -395,31 +395,20 @@ namespace PckStudio
anim.Tag = "0x80000";
object[] ANIM = { anim.Text, anim.Tag };
mf.entries.Add(ANIM);
mf.properties.Add("ANIM", "0x80000");
}
else if (comboBoxSkinType.Text == "Steve (64x64)" && skinType != "64x32")
{
anim.Tag = "0x40000";
object[] ANIM = { anim.Text, anim.Tag };
mf.entries.Add(ANIM);
mf.properties.Add("ANIM", "0x40000");
}
else if (comboBoxSkinType.Text == "Custom")
{
anim.Tag = "0x7ff5fc10";
//mf.entries.Add(new object[2] { (object)"BOX", new ListViewItem() { Tag = ((object)(listViewItem.Tag.ToString() + " " + listViewItem.SubItems[1].Text + " " + listViewItem.SubItems[2].Text + " " + listViewItem.SubItems[3].Text + " " + listViewItem.SubItems[4].Text + " " + listViewItem.SubItems[5].Text + " " + listViewItem.SubItems[6].Text + " " + listViewItem.SubItems[7].Text + " " + listViewItem.SubItems[8].Text)) }.Tag });
foreach (object[] item in generatedModel)
{
mf.entries.Add((object[])item);
}
object[] ANIM = { anim.Text, anim.Tag };
mf.entries.Add(ANIM);
}
else
{
//foreach (object[] item in generatedModel)
//{
// mf.properties.Add((object[])item);
//}
mf.properties.Add("ANIM", "0x7ff5fc10");
}
if (generatedModel != null)
{
@@ -428,17 +417,13 @@ namespace PckStudio
if (themeName.Tag.ToString() != "")
{
object[] THEME = { themeName.Text, themeName.Tag };
mf.entries.Add(THEME);
mf.properties.Add(themeName.Text, themeName.Tag.ToString());
}
object[] GAMEFLAGS = { "GAME_FLAGS", "0x18" };
mf.entries.Add(GAMEFLAGS);
mf.properties.Add("GAME_FLAGS", "0x18");
mf.properties.Add("FREE", "1");
object[] FREE = { free.Text, free.Tag };
mf.entries.Add(FREE);
mf.filesize = mf.data.Length;
mf.size = mf.data.Length;
if (mashupStructure == true)
{
mf.name = "Skins/" + "dlcskin" + textSkinID.Text + ".png";
@@ -447,7 +432,7 @@ namespace PckStudio
{
mf.name = "dlcskin" + textSkinID.Text + ".png";
}
mf.type = 0;
//mf.type = 0;
skin.Text = "dlcskin" + textSkinID.Text + ".png";
skin.Tag = mf;
@@ -594,7 +579,6 @@ namespace PckStudio
{
try
{
string tempstr = "";
Random random = new Random();
int num = random.Next(10000000, 99999999);
textSkinID.Text = num.ToString();

View File

@@ -137,10 +137,19 @@
<metadata name="contextMenuSkin.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="contextMenuSkin.Size" type="System.Drawing.Size, System.Drawing">
<value>116, 26</value>
</data>
<data name="&gt;&gt;contextMenuSkin.Name" xml:space="preserve">
<value>contextMenuSkin</value>
</data>
<data name="&gt;&gt;contextMenuSkin.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="replaceToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAAC/SURBVDhPlVHB
wgAADsIBFShKgAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAAC/SURBVDhPlVHB
DQMhDEOIfwfoOuzFoPxhAd5c6/SMAgq0tRQFmdgXfA5IKUkBMcbHPxyJCxVCkK7rm+EwaK1dQO9dClzO
WfpOTM7hy1oMGNvY4pucxNY2p6cAWzFw2oZuMmiJweGeHM634UdLg50YwD05vQ2fYoaoDTEMrJyIfw3R
4qYQWUZgg6OwlDJyMH8LcwF2T8FZ5kYQb4Lde/9Et8S6Dy1z0LUGi7VpWGvl3Lw2V98ZrtwIUYktwwPn
@@ -153,22 +162,22 @@
<data name="replaceToolStripMenuItem.Text" xml:space="preserve">
<value>Replace</value>
</data>
<data name="contextMenuSkin.Size" type="System.Drawing.Size, System.Drawing">
<value>116, 26</value>
</data>
<data name="&gt;&gt;contextMenuSkin.Name" xml:space="preserve">
<value>contextMenuSkin</value>
</data>
<data name="&gt;&gt;contextMenuSkin.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<metadata name="contextMenuCape.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>172, 17</value>
</metadata>
<data name="contextMenuCape.Size" type="System.Drawing.Size, System.Drawing">
<value>127, 26</value>
</data>
<data name="&gt;&gt;contextMenuCape.Name" xml:space="preserve">
<value>contextMenuCape</value>
</data>
<data name="&gt;&gt;contextMenuCape.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="replaceToolStripMenuItem1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wQAADsEBuJFr7QAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xOdTWsmQAAAA3SURBVDhPY/j/
wAAADsABataJCQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xOdTWsmQAAAA3SURBVDhPY/j/
/z9FGKsgGIsCKWSMTQ0QYxUE45FmALpiYvFwMgAbxqIYG8YqCMajBhCJ/zMAAPGwpV/Xje8RAAAAAElF
TkSuQmCC
</value>
@@ -179,15 +188,6 @@
<data name="replaceToolStripMenuItem1.Text" xml:space="preserve">
<value>Add Cape</value>
</data>
<data name="contextMenuCape.Size" type="System.Drawing.Size, System.Drawing">
<value>127, 26</value>
</data>
<data name="&gt;&gt;contextMenuCape.Name" xml:space="preserve">
<value>contextMenuCape</value>
</data>
<data name="&gt;&gt;contextMenuCape.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="buttonDone.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
</data>

View File

@@ -1,74 +0,0 @@

namespace PckStudio.Forms
{
partial class Testx_12
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.minecraftModelView1 = new PckStudio.Models.MinecraftModelView(this.components);
this.SuspendLayout();
//
// minecraftModelView1
//
this.minecraftModelView1.BackColor = System.Drawing.Color.Black;
this.minecraftModelView1.BackGradientColor1 = System.Drawing.SystemColors.ActiveCaptionText;
this.minecraftModelView1.BackGradientColor2 = System.Drawing.SystemColors.ActiveCaptionText;
this.minecraftModelView1.BackgroundType = PckStudio.Models.BackgroundTypes.Color;
this.minecraftModelView1.DegreesX = 0;
this.minecraftModelView1.DegreesY = 0;
this.minecraftModelView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.minecraftModelView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.minecraftModelView1.ForeColor = System.Drawing.Color.Black;
this.minecraftModelView1.FOV = 70;
this.minecraftModelView1.Location = new System.Drawing.Point(0, 0);
this.minecraftModelView1.Name = "minecraftModelView1";
this.minecraftModelView1.Projection = PckStudio.Models.ProjectionTypes.Perspective;
this.minecraftModelView1.ShowUsername = false;
this.minecraftModelView1.Size = new System.Drawing.Size(323, 375);
this.minecraftModelView1.TabIndex = 0;
this.minecraftModelView1.Text = "minecraftModelView1";
this.minecraftModelView1.Username = "";
//
// Testx_12
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(323, 375);
this.Controls.Add(this.minecraftModelView1);
this.Name = "Testx_12";
this.Text = "Skin Preview";
this.Load += new System.EventHandler(this.Testx_12_Load);
this.ResumeLayout(false);
}
#endregion
private PckStudio.Models.MinecraftModelView minecraftModelView1;
}
}

View File

@@ -1,46 +0,0 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using PckStudio.Models;
namespace PckStudio.Forms
{
public partial class Testx_12 : Form
{
public Testx_12()
{
InitializeComponent();
foreach (ModelBase modelBase in this.models)
{
modelBase.Updated += this.model_Updated;
}
}
private void model_Updated(object sender, EventArgs e)
{
this.minecraftModelView1.Model = (sender as ModelBase);
}
private void Testx_12_Load(object sender, EventArgs e)
{
PckStudio.Classes.CSM.TryParse(File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\export.CSM"), minecraftModelView1);
//ModelBase modelBase = models[0];
//this.minecraftModelView1.Model = modelBase;
//this.minecraftModelView1.Invalidate();
}
private ModelBase[] models = new ModelBase[]
{
new CharacterModel()
};
}
}

View File

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

View File

@@ -1,6 +1,7 @@
using MetroFramework.Forms;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PckStudio.Classes.FileTypes;
using System;
using System.Collections.Generic;
using System.Drawing;
@@ -14,7 +15,7 @@ namespace PckStudio
public partial class AnimationEditor : MetroForm
{
TreeView treeViewMain = new TreeView();
PCK.MineFile mf = new PCK.MineFile();
PCKFile.FileData mf = null;
List<Image> frames = new List<Image>();
Newtonsoft.Json.Linq.JObject tileData = Newtonsoft.Json.Linq.JObject.Parse(System.Text.Encoding.Default.GetString(Properties.Resources.tileData));
Image texture;
@@ -38,11 +39,11 @@ namespace PckStudio
{
InitializeComponent();
treeViewMain = treeViewIn;
if (String.IsNullOrEmpty(createdFileName))
if (string.IsNullOrEmpty(createdFileName))
{
newTileName = Path.GetFileNameWithoutExtension(treeViewMain.SelectedNode.Text);
if (treeViewMain.SelectedNode.Parent.Text.ToLower() == "items") isItem = true;
mf = treeViewMain.SelectedNode.Tag as PCK.MineFile;
mf = treeViewMain.SelectedNode.Tag as PCKFile.FileData;
if (newTileName.EndsWith("MipMapLevel2") || newTileName.EndsWith("MipMapLevel3"))
{
string mipMapLvl = newTileName.Last().ToString();
@@ -54,12 +55,10 @@ namespace PckStudio
else
{
create = true;
PCK.MineFile newMf = new PCK.MineFile();
object[] animEntry = { "ANIM", "" };
newMf.entries.Add(animEntry);
PCKFile.FileData newMf = new PCKFile.FileData("", 2, 0);
newMf.properties.Add("ANIM", "");
newMf.data = File.ReadAllBytes(createdFileName);
newMf.filesize = newMf.data.Length;//gets filesize for minefile
newMf.type = 2;
newMf.size = newMf.data.Length;//gets filesize for minefile
mf = newMf;
Forms.Utilities.AnimationEditor.ChangeTile diag = new Forms.Utilities.AnimationEditor.ChangeTile();
diag.ShowDialog(this);
@@ -73,14 +72,11 @@ namespace PckStudio
List<string> strEntries = new List<string>();
List<string> strEntryData = new List<string>();
foreach (object[] entry in mf.entries) //object = metadata entry(name:value)
foreach (var entry in mf.properties) //object = metadata entry(name:value)
{
object[] strings = (object[])entry;
TreeNode meta = new TreeNode();
foreach (object[] entryy in mf.entries)
strEntries.Add((string)strings[0]);
strEntryData.Add((string)strings[1]);
strEntries.Add(entry.Value);
strEntryData.Add(entry.Value);
}
//if (strEntries.Find(entry => entry == "ANIM") == null) throw new System.Exception("ANIM tag is missing. No animation code is present.");
@@ -417,7 +413,7 @@ namespace PckStudio
{
texture.Save(m, texture.RawFormat);
mf.data = m.ToArray();
mf.filesize = mf.data.Length;
mf.size = mf.data.Length;
}
if (metroCheckBox2.Checked)
@@ -427,7 +423,6 @@ namespace PckStudio
if (!create && treeViewMain.SelectedNode.Tag != null) treeViewMain.SelectedNode.Text = newTileName + ".png";
int animIndex = mf.entries.FindIndex(entry => (string)entry[0] == "ANIM");
string animationData = "";
if (metroCheckBox1.Checked) animationData += "#"; // does the animation interpolate?
foreach (TreeNode node in treeView1.Nodes)
@@ -435,14 +430,9 @@ namespace PckStudio
Tuple<string, string> frameData = node.Tag as Tuple<string, string>;
animationData += frameData.Item1 + "*" + frameData.Item2 + ",";
}
animationData.TrimEnd(',');
object[] newEntry = new object[]
{
"ANIM",
animationData
};
if (animIndex != -1) mf.entries[animIndex] = newEntry;
else mf.entries.Add(newEntry);
animationData.TrimEnd(',');
if (mf.properties.ContainsKey("ANIM")) mf.properties["ANIM"] = animationData;
else mf.properties.Add("ANIM", animationData);
if (create)
{

View File

@@ -3,12 +3,14 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MetroFramework.Forms;
using PckStudio;
using PckStudio.Classes.FileTypes;
// Audio Editor by MattNL
@@ -65,10 +67,10 @@ namespace PckStudio.Forms.Utilities
}
}
PCK audioPCK = new PCK();
PCKFile audioPCK;
bool isVita;
PCK.MineFile mf;
public AudioEditor(PCK.MineFile MineFile, bool littleEndian)
PCKFile.FileData mf;
public AudioEditor(PCKFile.FileData MineFile, bool littleEndian)
{
isVita = littleEndian;
ImageList catImages = new ImageList();
@@ -87,36 +89,37 @@ namespace PckStudio.Forms.Utilities
treeView1.ImageList = catImages;
mf = MineFile;
if (isVita) audioPCK.ReadVita(mf.data, true);
else audioPCK.Read(mf.data, true);
defaultType = audioPCK.types[0];
int check; // This is needed for the TryGetValue function which is annoying
if (!audioPCK.typeCodes.TryGetValue("CUENAME", out check))
using (var stream = new MemoryStream(mf.data))
{
if (isVita) audioPCK = new PCKFile(stream, true);
else audioPCK = new PCKFile(stream);
}
defaultType = audioPCK.meta_data[0];
if (!audioPCK.meta_data.ContainsValue("CUENAME"))
{
throw new System.Exception("This is not a valid audio.pck file");
throw new Exception("This is not a valid audio.pck file");
}
int index = 0;
List<PCK.MineFile> tempMineFiles = audioPCK.mineFiles;
foreach (PCK.MineFile mineFile in tempMineFiles)
List<PCKFile.FileData> tempMineFiles = audioPCK.file_entries;
foreach (PCKFile.FileData mineFile in tempMineFiles)
{
mineFile.name = getCatString(mineFile.type);
Console.WriteLine("Category Found: " + mineFile.name);
if (cats.Contains<int>(mineFile.type))
if (cats.Contains(mineFile.type))
{
Console.WriteLine("Duplicate category found, " + getCatString(mineFile.type) + ". Combining...");
List<object[]> newEntries = mineFile.entries;
audioPCK.mineFiles.Remove(mineFile);
audioPCK.mineFiles.Find(category => category.name == getCatString(mineFile.type)).entries.AddRange(newEntries);
audioPCK.file_entries.Remove(mineFile);
audioPCK.file_entries.Find(category => category.name == getCatString(mineFile.type)).properties = mineFile.properties;
}
else
{
TreeNode treeNode = new TreeNode();
treeNode.Text = mineFile.name;
treeNode.Tag = mineFile;
treeNode.ImageIndex = mineFile.type;
treeNode.SelectedImageIndex = mineFile.type;
//treeNode.ImageIndex = mineFile.type;
//treeNode.SelectedImageIndex = mineFile.type;
treeView1.Nodes.Add(treeNode);
cats.Add(mineFile.type);
cats.Add((int)mineFile.type);
}
index++;
@@ -129,18 +132,17 @@ namespace PckStudio.Forms.Utilities
private void treeView2_AfterSelect(object sender, TreeViewEventArgs e)
{
comboBox1.Items.Clear();//Resets metadata combobox of selectable entry names
object[] strings = (object[])e.Node.Tag;
string type = audioPCK.types[0];
if (e.Node.Tag == null) return;
var strings = (KeyValuePair<string, string>)e.Node.Tag;
string type = audioPCK.meta_data[0];
defaultType = type;
string value = "";
if (strings != null)
{
type = (string)strings[0];
value = (string)strings[1];
}
type = (string)strings.Key;
value = (string)strings.Value;
foreach (int metaType in audioPCK.types.Keys)
comboBox1.Items.Add(audioPCK.types[metaType]);//fills combobox with metadata from the main metadatabase
foreach (int metaType in audioPCK.meta_data.Keys)
comboBox1.Items.Add(audioPCK.meta_data[metaType]);//fills combobox with metadata from the main metadatabase
comboBox1.Text = type;//Sets currently selected metadata type to type selected in selected metadata node
textBox1.Text = value;//Sets currently selected metadata value to value selected in selected metadata node
}
@@ -148,14 +150,11 @@ namespace PckStudio.Forms.Utilities
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
{
treeView2.Nodes.Clear();
PCK.MineFile mineFile = (PCK.MineFile)e.Node.Tag;
foreach (object[] entry in mineFile.entries) //object = metadata entry(name:value)
PCKFile.FileData mineFile = (PCKFile.FileData)e.Node.Tag;
foreach (var entry in mineFile.properties) //object = metadata entry(name:value)
{
object[] strings = (object[])entry;
TreeNode meta = new TreeNode();
foreach (object[] entryy in mineFile.entries)
meta.Text = (string)strings[0];
meta.Text = entry.Key;
meta.Tag = entry;
treeView2.Nodes.Add(meta);
}
@@ -166,8 +165,8 @@ namespace PckStudio.Forms.Utilities
{
if (treeView2.SelectedNode != null)
{
object[] strings = (object[])treeView2.SelectedNode.Tag;
strings[1] = textBox1.Text;
//object[] strings = (object[])treeView2.SelectedNode.Tag;
//strings[1] = textBox1.Text;
}
}
@@ -176,9 +175,9 @@ namespace PckStudio.Forms.Utilities
if (treeView2.SelectedNode != null)
{
//Sets metadata type to new chosen one
object[] strings = (object[])treeView2.SelectedNode.Tag;
treeView2.SelectedNode.Text = comboBox1.Text;
strings[0] = comboBox1.Text;
//object[] strings = (object[])treeView2.SelectedNode.Tag;
//treeView2.SelectedNode.Text = comboBox1.Text;
//strings[0] = comboBox1.Text;
}
}
@@ -194,19 +193,13 @@ namespace PckStudio.Forms.Utilities
add.Dispose();//diposes generated metadata adding dialog data
if (!cats.Contains(getCatID(cat))) cats.Add(getCatID(cat));
else return;
PCK.MineFile mf = new PCK.MineFile();//Creates new minefile template
PCKFile.FileData mf = new PCKFile.FileData(cat, getCatID(cat), 0); //Creates new minefile template
mf.data = new byte[0]; //adds file data to minefile
var emptyBytes = new List<byte>(); // the category files are empty to not take up space
byte[] emptyBytesArray = emptyBytes.ToArray();
mf.data = emptyBytesArray;//adds file data to minefile
mf.filesize = mf.data.Length;//gets filesize for minefile
mf.name = cat;//sets minfile name to file name
mf.type = getCatID(cat);//sets minefile type to default
TreeNode addNode = new TreeNode(mf.name) { Tag = mf };//creates node for minefile
addNode.ImageIndex = mf.type;
addNode.SelectedImageIndex = mf.type;
//audioPCK.mineFiles.Add(mf);
//addNode.ImageIndex = mf.type;
//addNode.SelectedImageIndex = mf.type;
//audioPCKFile.FileDatas.Add(mf);
treeView1.Nodes.Add(addNode);
treeView1.Sort();
}
@@ -220,20 +213,18 @@ namespace PckStudio.Forms.Utilities
private void addEntryMenuItem_Click(object sender, EventArgs e)
{
if (treeView1.SelectedNode == null) return;
object[] obj = { defaultType, "New Entry" };
TreeNode meta = new TreeNode();
meta.Text = "New Entry";
meta.Tag = obj;
TreeNode meta = new TreeNode("New Entry");
//meta.Tag = obj;
treeView2.Nodes.Add(meta);
((PCK.MineFile)treeView1.SelectedNode.Tag).entries.Add(obj);
((PCKFile.FileData)treeView1.SelectedNode.Tag).properties.Add(defaultType, "New Entry");
}
public void treeView2_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Delete && treeView2.SelectedNode != null)
{
if (treeView1.SelectedNode == null) return; // makes sure you don't run this if there is nothing to delete
((PCK.MineFile)treeView1.SelectedNode.Tag).entries.Remove((object[])treeView2.SelectedNode.Tag);
((PCKFile.FileData)treeView1.SelectedNode.Tag).properties.Remove((string)treeView2.SelectedNode.Tag);
treeView2.SelectedNode.Remove();
}
}
@@ -242,19 +233,15 @@ namespace PckStudio.Forms.Utilities
{
if (treeView1.SelectedNode == null) return; // makes sure you don't run this if there is nothing to delete
cats.Remove(getCatID(treeView1.SelectedNode.Text));
//audioPCK.mineFiles.Remove((PCK.MineFile)treeView1.SelectedNode.Tag);
//audioPCKFile.FileDatas.Remove((PCKFile.FileData)treeView1.SelectedNode.Tag);
treeView1.SelectedNode.Remove();
treeView2.Nodes.Clear();
if(treeView1.SelectedNode != null)
{
PCK.MineFile mineFile = (PCK.MineFile)treeView1.SelectedNode.Tag;
foreach (object[] entry in mineFile.entries) //object = metadata entry(name:value)
PCKFile.FileData mineFile = (PCKFile.FileData)treeView1.SelectedNode.Tag;
foreach (var entry in mineFile.properties)
{
object[] strings = (object[])entry;
TreeNode meta = new TreeNode();
foreach (object[] entryy in mineFile.entries)
meta.Text = (string)strings[0];
TreeNode meta = new TreeNode(entry.Key);
meta.Tag = entry;
treeView2.Nodes.Add(meta);
}
@@ -263,7 +250,7 @@ namespace PckStudio.Forms.Utilities
private void removeEntryMenuItem_Click(object sender, EventArgs e)
{
((PCK.MineFile)treeView1.SelectedNode.Tag).entries.Remove((object[])treeView2.SelectedNode.Tag);
//((PCKFile.FileData)treeView1.SelectedNode.Tag).properties.Remove((object[])treeView2.SelectedNode.Tag);
treeView2.SelectedNode.Remove();
}
@@ -277,34 +264,23 @@ namespace PckStudio.Forms.Utilities
{
if(System.IO.Path.GetExtension(binka) == ".binka")
{
object[] obj = { "CUENAME", System.IO.Path.GetFileNameWithoutExtension(binka) };
object[] obj = { };
TreeNode meta = new TreeNode();
meta.Text = "CUENAME";
meta.Tag = obj;
treeView2.Nodes.Add(meta);
((PCK.MineFile)treeView1.SelectedNode.Tag).entries.Add(obj);
((PCKFile.FileData)treeView1.SelectedNode.Tag).properties.Add("CUENAME", System.IO.Path.GetFileNameWithoutExtension(binka));
}
}
}
}
private static byte[] endianReverseUnicode(byte[] str)
{
byte[] newStr = new byte[str.Length];
for (int i = 0; i < str.Length; i += 2)
{
newStr[i] = str[i + 1];
newStr[i + 1] = str[i];
}
return newStr;
}
private static void writeMinecraftString(FileOutput f, string str)
{
byte[] d = Encoding.Unicode.GetBytes(str);
byte[] d = Encoding.BigEndianUnicode.GetBytes(str);
f.writeInt(d.Length / 2);
f.writeBytes(endianReverseUnicode(d));
f.writeBytes(d);
f.writeInt(0);
}
@@ -317,92 +293,92 @@ namespace PckStudio.Forms.Utilities
f.writeIntVita(0);
}
public static byte[] buildAudioPCKVita(PCK pck)
public static byte[] buildAudioPCKVita(PCKFile pck)
{
FileOutput fileOutput = new FileOutput();
fileOutput.Endian = Endianness.Big;
fileOutput.writeIntVita(1);
fileOutput.writeIntVita(pck.types.Count);
foreach (int num in pck.types.Keys)
fileOutput.writeIntVita(pck.meta_data.Count);
foreach (int num in pck.meta_data.Keys)
{
fileOutput.writeIntVita(num);
writeMinecraftStringVita(fileOutput, pck.types[num]);
}
fileOutput.writeIntVita(pck.mineFiles.Count);
foreach (PCK.MineFile mineFile in pck.mineFiles)
{
mineFile.name = "";
fileOutput.writeIntVita(mineFile.data.Length);
fileOutput.writeIntVita(mineFile.type);
writeMinecraftStringVita(fileOutput, mineFile.name);
}
foreach (PCK.MineFile mineFile2 in pck.mineFiles)
{
string str = "";
try
{
fileOutput.writeIntVita(mineFile2.entries.Count);
foreach (object[] array in mineFile2.entries)
{
str = array[0].ToString();
fileOutput.writeIntVita(pck.typeCodes[(string)array[0]]);
writeMinecraftStringVita(fileOutput, (string)array[1]);
}
fileOutput.writeBytes(mineFile2.data);
}
catch (Exception)
{
MessageBox.Show(str + " is not in the main metadatabase");
break;
}
writeMinecraftStringVita(fileOutput, pck.meta_data[num]);
}
//fileOutput.writeIntVita(PCKFile.FileDatas.Count);
//foreach (PCKFile.FileData mineFile in PCKFile.FileDatas)
//{
// mineFile.name = "";
// fileOutput.writeIntVita(mineFile.data.Length);
// fileOutput.writeIntVita(mineFile.type);
// writeMinecraftStringVita(fileOutput, mineFile.name);
//}
//foreach (PCKFile.FileData mineFile2 in PCKFile.FileDatas)
//{
// string str = "";
// try
// {
// fileOutput.writeIntVita(mineFile2.properties.Count);
// foreach (var array in mineFile2.properties)
// {
// str = array.Key;
// fileOutput.writeIntVita(pck.typeCodes[array.Key]);
// writeMinecraftStringVita(fileOutput, array.Value);
// }
// fileOutput.writeBytes(mineFile2.data);
// }
// catch (Exception)
// {
// MessageBox.Show(str + " is not in the main metadatabase");
// break;
// }
//}
return fileOutput.getBytes();
}
public static byte[] buildAudioPCK(PCK pck)
public static byte[] buildAudioPCK(PCKFile pck)
{
FileOutput f = new FileOutput();
f.Endian = pck.IsLittleEndian ? Endianness.Little : Endianness.Big;
f.Endian = pck.isLittleEndian ? Endianness.Little : Endianness.Big;
f.writeInt(1);
f.writeInt(pck.types.Count);
foreach (int type in pck.types.Keys)
f.writeInt(pck.meta_data.Count);
foreach (int type in pck.meta_data.Keys)
{
f.writeInt(type);
writeMinecraftString(f, pck.types[type]);
writeMinecraftString(f, pck.meta_data[type]);
}
f.writeInt(pck.mineFiles.Count);
Console.WriteLine(pck.mineFiles.Count);
foreach (PCK.MineFile mf in pck.mineFiles)
{
mf.name = "";
f.writeInt(mf.data.Length);
f.writeInt(mf.type);
writeMinecraftString(f, mf.name);
}
//f.writeInt(PCKFile.FileDatas.Count);
//Console.WriteLine(PCKFile.FileDatas.Count);
//foreach (PCKFile.FileData mf in PCKFile.FileDatas)
//{
// mf.name = "";
// f.writeInt(mf.data.Length);
// f.writeInt(mf.type);
// writeMinecraftString(f, mf.name);
//}
foreach (PCK.MineFile mf in pck.mineFiles)
{
string missing = "";
try
{
f.writeInt(mf.entries.Count);
foreach (object[] entry in mf.entries)
{
missing = entry[0].ToString();
f.writeInt(pck.typeCodes[(string)entry[0]]);
writeMinecraftString(f, (string)entry[1]);
}
//foreach (PCKFile.FileData mf in PCKFile.FileDatas)
//{
// string missing = "";
// try
// {
// f.writeInt(mf.properties.Count);
// foreach (var entry in mf.properties)
// {
// missing = entry.Key;
// f.writeInt(pck.typeCodes[entry.Key]);
// writeMinecraftString(f, entry.Value);
// }
f.writeBytes(mf.data);
}
catch (Exception)
{
MessageBox.Show(missing + " is not in the main metadatabase");
break;
}
}
// f.writeBytes(mf.data);
// }
// catch (Exception)
// {
// MessageBox.Show(missing + " is not in the main metadatabase");
// break;
// }
//}
return f.getBytes();
}
@@ -418,7 +394,8 @@ namespace PckStudio.Forms.Utilities
bool emptyCat = false;
foreach (PCK.MineFile mf in audioPCK.mineFiles) if (mf.entries.Count == 0) emptyCat = true;
foreach (PCKFile.FileData mf in audioPCK.file_entries)
emptyCat = mf.properties.Count == 0;
if (emptyCat)
{
@@ -426,7 +403,7 @@ namespace PckStudio.Forms.Utilities
return;
}
mf.data = isVita ? buildAudioPCKVita(audioPCK) : buildAudioPCK(audioPCK);
//mf.data = isVita ? buildAudioPCKVita(audioPCK) : buildAudioPCK(audioPCK);
saved = true;
}

View File

@@ -29,247 +29,247 @@ namespace PckStudio.Forms.Utilities
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(COLEditor));
this.metroPanel1 = new MetroFramework.Controls.MetroPanel();
this.numericUpDown5 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.metroLabel6 = new MetroFramework.Controls.MetroLabel();
this.metroLabel5 = new MetroFramework.Controls.MetroLabel();
this.metroLabel4 = new MetroFramework.Controls.MetroLabel();
this.metroLabel3 = new MetroFramework.Controls.MetroLabel();
this.metroTextBox1 = new MetroFramework.Controls.MetroTextBox();
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.menuStrip = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.tabControl = new MetroFramework.Controls.MetroTabControl();
this.colorsTab = new System.Windows.Forms.TabPage();
this.waterTab = new System.Windows.Forms.TabPage();
this.metroPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.menuStrip.SuspendLayout();
this.tabControl.SuspendLayout();
this.SuspendLayout();
//
// metroPanel1
//
this.metroPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.metroPanel1.Controls.Add(this.numericUpDown5);
this.metroPanel1.Controls.Add(this.numericUpDown4);
this.metroPanel1.Controls.Add(this.numericUpDown3);
this.metroPanel1.Controls.Add(this.numericUpDown2);
this.metroPanel1.Controls.Add(this.metroLabel6);
this.metroPanel1.Controls.Add(this.metroLabel5);
this.metroPanel1.Controls.Add(this.metroLabel4);
this.metroPanel1.Controls.Add(this.metroLabel3);
this.metroPanel1.Controls.Add(this.metroTextBox1);
this.metroPanel1.Controls.Add(this.metroLabel1);
this.metroPanel1.Controls.Add(this.pictureBox1);
resources.ApplyResources(this.metroPanel1, "metroPanel1");
this.metroPanel1.HorizontalScrollbarBarColor = true;
this.metroPanel1.HorizontalScrollbarHighlightOnWheel = false;
this.metroPanel1.HorizontalScrollbarSize = 10;
this.metroPanel1.Name = "metroPanel1";
this.metroPanel1.Style = MetroFramework.MetroColorStyle.Silver;
this.metroPanel1.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroPanel1.VerticalScrollbarBarColor = true;
this.metroPanel1.VerticalScrollbarHighlightOnWheel = false;
this.metroPanel1.VerticalScrollbarSize = 10;
//
// numericUpDown5
//
this.numericUpDown5.BackColor = System.Drawing.SystemColors.Desktop;
this.numericUpDown5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
resources.ApplyResources(this.numericUpDown5, "numericUpDown5");
this.numericUpDown5.Maximum = new decimal(new int[] {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(COLEditor));
this.metroPanel1 = new MetroFramework.Controls.MetroPanel();
this.numericUpDown5 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.metroLabel6 = new MetroFramework.Controls.MetroLabel();
this.metroLabel5 = new MetroFramework.Controls.MetroLabel();
this.metroLabel4 = new MetroFramework.Controls.MetroLabel();
this.metroLabel3 = new MetroFramework.Controls.MetroLabel();
this.metroTextBox1 = new MetroFramework.Controls.MetroTextBox();
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.menuStrip = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.tabControl = new MetroFramework.Controls.MetroTabControl();
this.colorsTab = new System.Windows.Forms.TabPage();
this.waterTab = new System.Windows.Forms.TabPage();
this.metroPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.menuStrip.SuspendLayout();
this.tabControl.SuspendLayout();
this.SuspendLayout();
//
// metroPanel1
//
this.metroPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.metroPanel1.Controls.Add(this.numericUpDown5);
this.metroPanel1.Controls.Add(this.numericUpDown4);
this.metroPanel1.Controls.Add(this.numericUpDown3);
this.metroPanel1.Controls.Add(this.numericUpDown2);
this.metroPanel1.Controls.Add(this.metroLabel6);
this.metroPanel1.Controls.Add(this.metroLabel5);
this.metroPanel1.Controls.Add(this.metroLabel4);
this.metroPanel1.Controls.Add(this.metroLabel3);
this.metroPanel1.Controls.Add(this.metroTextBox1);
this.metroPanel1.Controls.Add(this.metroLabel1);
this.metroPanel1.Controls.Add(this.pictureBox1);
resources.ApplyResources(this.metroPanel1, "metroPanel1");
this.metroPanel1.HorizontalScrollbarBarColor = true;
this.metroPanel1.HorizontalScrollbarHighlightOnWheel = false;
this.metroPanel1.HorizontalScrollbarSize = 10;
this.metroPanel1.Name = "metroPanel1";
this.metroPanel1.Style = MetroFramework.MetroColorStyle.Silver;
this.metroPanel1.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroPanel1.VerticalScrollbarBarColor = true;
this.metroPanel1.VerticalScrollbarHighlightOnWheel = false;
this.metroPanel1.VerticalScrollbarSize = 10;
//
// numericUpDown5
//
this.numericUpDown5.BackColor = System.Drawing.SystemColors.Desktop;
this.numericUpDown5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
resources.ApplyResources(this.numericUpDown5, "numericUpDown5");
this.numericUpDown5.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.numericUpDown5.Name = "numericUpDown5";
this.numericUpDown5.ValueChanged += new System.EventHandler(this.color_ValueChanged);
//
// numericUpDown4
//
this.numericUpDown4.BackColor = System.Drawing.SystemColors.Desktop;
this.numericUpDown4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
resources.ApplyResources(this.numericUpDown4, "numericUpDown4");
this.numericUpDown4.Maximum = new decimal(new int[] {
this.numericUpDown5.Name = "numericUpDown5";
this.numericUpDown5.ValueChanged += new System.EventHandler(this.color_ValueChanged);
//
// numericUpDown4
//
this.numericUpDown4.BackColor = System.Drawing.SystemColors.Desktop;
this.numericUpDown4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
resources.ApplyResources(this.numericUpDown4, "numericUpDown4");
this.numericUpDown4.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.numericUpDown4.Name = "numericUpDown4";
this.numericUpDown4.ValueChanged += new System.EventHandler(this.color_ValueChanged);
//
// numericUpDown3
//
this.numericUpDown3.BackColor = System.Drawing.SystemColors.Desktop;
this.numericUpDown3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
resources.ApplyResources(this.numericUpDown3, "numericUpDown3");
this.numericUpDown3.Maximum = new decimal(new int[] {
this.numericUpDown4.Name = "numericUpDown4";
this.numericUpDown4.ValueChanged += new System.EventHandler(this.color_ValueChanged);
//
// numericUpDown3
//
this.numericUpDown3.BackColor = System.Drawing.SystemColors.Desktop;
this.numericUpDown3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
resources.ApplyResources(this.numericUpDown3, "numericUpDown3");
this.numericUpDown3.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.numericUpDown3.Name = "numericUpDown3";
this.numericUpDown3.ValueChanged += new System.EventHandler(this.color_ValueChanged);
//
// numericUpDown2
//
this.numericUpDown2.BackColor = System.Drawing.SystemColors.Desktop;
this.numericUpDown2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
resources.ApplyResources(this.numericUpDown2, "numericUpDown2");
this.numericUpDown2.Maximum = new decimal(new int[] {
this.numericUpDown3.Name = "numericUpDown3";
this.numericUpDown3.ValueChanged += new System.EventHandler(this.color_ValueChanged);
//
// numericUpDown2
//
this.numericUpDown2.BackColor = System.Drawing.SystemColors.Desktop;
this.numericUpDown2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
resources.ApplyResources(this.numericUpDown2, "numericUpDown2");
this.numericUpDown2.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.ValueChanged += new System.EventHandler(this.color_ValueChanged);
//
// metroLabel6
//
resources.ApplyResources(this.metroLabel6, "metroLabel6");
this.metroLabel6.Name = "metroLabel6";
this.metroLabel6.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// metroLabel5
//
resources.ApplyResources(this.metroLabel5, "metroLabel5");
this.metroLabel5.Name = "metroLabel5";
this.metroLabel5.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// metroLabel4
//
resources.ApplyResources(this.metroLabel4, "metroLabel4");
this.metroLabel4.Name = "metroLabel4";
this.metroLabel4.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// metroLabel3
//
resources.ApplyResources(this.metroLabel3, "metroLabel3");
this.metroLabel3.Name = "metroLabel3";
this.metroLabel3.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// metroTextBox1
//
//
//
//
this.metroTextBox1.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image")));
this.metroTextBox1.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode")));
this.metroTextBox1.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location")));
this.metroTextBox1.CustomButton.Name = "";
this.metroTextBox1.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size")));
this.metroTextBox1.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
this.metroTextBox1.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex")));
this.metroTextBox1.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
this.metroTextBox1.CustomButton.UseSelectable = true;
this.metroTextBox1.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible")));
this.metroTextBox1.Lines = new string[0];
resources.ApplyResources(this.metroTextBox1, "metroTextBox1");
this.metroTextBox1.MaxLength = 32767;
this.metroTextBox1.Name = "metroTextBox1";
this.metroTextBox1.PasswordChar = '\0';
this.metroTextBox1.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.metroTextBox1.SelectedText = "";
this.metroTextBox1.SelectionLength = 0;
this.metroTextBox1.SelectionStart = 0;
this.metroTextBox1.ShortcutsEnabled = true;
this.metroTextBox1.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroTextBox1.UseSelectable = true;
this.metroTextBox1.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
this.metroTextBox1.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
this.metroTextBox1.TextChanged += new System.EventHandler(this.metroTextBox1_TextChanged);
//
// metroLabel1
//
resources.ApplyResources(this.metroLabel1, "metroLabel1");
this.metroLabel1.Name = "metroLabel1";
this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Gray;
resources.ApplyResources(this.pictureBox1, "pictureBox1");
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.TabStop = false;
//
// 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.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.ValueChanged += new System.EventHandler(this.color_ValueChanged);
//
// metroLabel6
//
resources.ApplyResources(this.metroLabel6, "metroLabel6");
this.metroLabel6.Name = "metroLabel6";
this.metroLabel6.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// metroLabel5
//
resources.ApplyResources(this.metroLabel5, "metroLabel5");
this.metroLabel5.Name = "metroLabel5";
this.metroLabel5.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// metroLabel4
//
resources.ApplyResources(this.metroLabel4, "metroLabel4");
this.metroLabel4.Name = "metroLabel4";
this.metroLabel4.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// metroLabel3
//
resources.ApplyResources(this.metroLabel3, "metroLabel3");
this.metroLabel3.Name = "metroLabel3";
this.metroLabel3.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// metroTextBox1
//
//
//
//
this.metroTextBox1.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image")));
this.metroTextBox1.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode")));
this.metroTextBox1.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location")));
this.metroTextBox1.CustomButton.Name = "";
this.metroTextBox1.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size")));
this.metroTextBox1.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
this.metroTextBox1.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex")));
this.metroTextBox1.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
this.metroTextBox1.CustomButton.UseSelectable = true;
this.metroTextBox1.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible")));
this.metroTextBox1.Lines = new string[0];
resources.ApplyResources(this.metroTextBox1, "metroTextBox1");
this.metroTextBox1.MaxLength = 32767;
this.metroTextBox1.Name = "metroTextBox1";
this.metroTextBox1.PasswordChar = '\0';
this.metroTextBox1.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.metroTextBox1.SelectedText = "";
this.metroTextBox1.SelectionLength = 0;
this.metroTextBox1.SelectionStart = 0;
this.metroTextBox1.ShortcutsEnabled = true;
this.metroTextBox1.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroTextBox1.UseSelectable = true;
this.metroTextBox1.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
this.metroTextBox1.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
this.metroTextBox1.TextChanged += new System.EventHandler(this.metroTextBox1_TextChanged);
//
// metroLabel1
//
resources.ApplyResources(this.metroLabel1, "metroLabel1");
this.metroLabel1.Name = "metroLabel1";
this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Gray;
resources.ApplyResources(this.pictureBox1, "pictureBox1");
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.TabStop = false;
//
// 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.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);
//
// tabControl
//
this.tabControl.Controls.Add(this.colorsTab);
this.tabControl.Controls.Add(this.waterTab);
resources.ApplyResources(this.tabControl, "tabControl");
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Style = MetroFramework.MetroColorStyle.White;
this.tabControl.Theme = MetroFramework.MetroThemeStyle.Dark;
this.tabControl.UseSelectable = true;
//
// colorsTab
//
this.colorsTab.BackColor = System.Drawing.SystemColors.WindowFrame;
resources.ApplyResources(this.colorsTab, "colorsTab");
this.colorsTab.Name = "colorsTab";
//
// waterTab
//
this.waterTab.BackColor = System.Drawing.SystemColors.WindowFrame;
resources.ApplyResources(this.waterTab, "waterTab");
this.waterTab.Name = "waterTab";
//
// COLEditor
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.menuStrip);
this.Controls.Add(this.tabControl);
this.Controls.Add(this.metroPanel1);
this.ForeColor = System.Drawing.SystemColors.ControlText;
this.Name = "COLEditor";
this.Style = MetroFramework.MetroColorStyle.Silver;
this.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroPanel1.ResumeLayout(false);
this.metroPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.menuStrip.ResumeLayout(false);
this.menuStrip.PerformLayout();
this.tabControl.ResumeLayout(false);
this.ResumeLayout(false);
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);
//
// tabControl
//
this.tabControl.Controls.Add(this.colorsTab);
this.tabControl.Controls.Add(this.waterTab);
resources.ApplyResources(this.tabControl, "tabControl");
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Style = MetroFramework.MetroColorStyle.White;
this.tabControl.Theme = MetroFramework.MetroThemeStyle.Dark;
this.tabControl.UseSelectable = true;
//
// colorsTab
//
this.colorsTab.BackColor = System.Drawing.SystemColors.WindowFrame;
resources.ApplyResources(this.colorsTab, "colorsTab");
this.colorsTab.Name = "colorsTab";
//
// waterTab
//
this.waterTab.BackColor = System.Drawing.SystemColors.WindowFrame;
resources.ApplyResources(this.waterTab, "waterTab");
this.waterTab.Name = "waterTab";
//
// COLEditor
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.menuStrip);
this.Controls.Add(this.tabControl);
this.Controls.Add(this.metroPanel1);
this.ForeColor = System.Drawing.SystemColors.ControlText;
this.Name = "COLEditor";
this.Style = MetroFramework.MetroColorStyle.Silver;
this.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroPanel1.ResumeLayout(false);
this.metroPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.menuStrip.ResumeLayout(false);
this.menuStrip.PerformLayout();
this.tabControl.ResumeLayout(false);
this.ResumeLayout(false);
}

View File

@@ -9,16 +9,17 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using MetroFramework.Forms;
using PckStudio;
using PckStudio.Classes.FileTypes;
namespace PckStudio.Forms.Utilities
{
public partial class COLEditor : MetroForm
{
Classes.COL.COLFile cf = new Classes.COL.COLFile();
PCK.MineFile mf;
PCKFile.FileData mf;
TreeView treeView1 = new TreeView(); // Normal Color Table
TreeView treeView2 = new TreeView(); // Water Color Table
public COLEditor(byte[] data, PCK.MineFile MineFile)
public COLEditor(byte[] data, PCKFile.FileData MineFile)
{
InitializeComponent();
metroLabel6.Visible = false;

View File

@@ -117,171 +117,14 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="&gt;&gt;numericUpDown5.Name" xml:space="preserve">
<value>numericUpDown5</value>
</data>
<data name="&gt;&gt;numericUpDown5.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;numericUpDown5.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;numericUpDown5.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;numericUpDown4.Name" xml:space="preserve">
<value>numericUpDown4</value>
</data>
<data name="&gt;&gt;numericUpDown4.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;numericUpDown4.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;numericUpDown4.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;numericUpDown3.Name" xml:space="preserve">
<value>numericUpDown3</value>
</data>
<data name="&gt;&gt;numericUpDown3.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;numericUpDown3.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;numericUpDown3.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;numericUpDown2.Name" xml:space="preserve">
<value>numericUpDown2</value>
</data>
<data name="&gt;&gt;numericUpDown2.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;numericUpDown2.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;numericUpDown2.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;metroLabel6.Name" xml:space="preserve">
<value>metroLabel6</value>
</data>
<data name="&gt;&gt;metroLabel6.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroLabel6.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;metroLabel6.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="&gt;&gt;metroLabel5.Name" xml:space="preserve">
<value>metroLabel5</value>
</data>
<data name="&gt;&gt;metroLabel5.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroLabel5.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;metroLabel5.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="&gt;&gt;metroLabel4.Name" xml:space="preserve">
<value>metroLabel4</value>
</data>
<data name="&gt;&gt;metroLabel4.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroLabel4.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;metroLabel4.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="&gt;&gt;metroLabel3.Name" xml:space="preserve">
<value>metroLabel3</value>
</data>
<data name="&gt;&gt;metroLabel3.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroLabel3.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;metroLabel3.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="&gt;&gt;metroTextBox1.Name" xml:space="preserve">
<value>metroTextBox1</value>
</data>
<data name="&gt;&gt;metroTextBox1.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroTextBox, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroTextBox1.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;metroTextBox1.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="&gt;&gt;metroLabel1.Name" xml:space="preserve">
<value>metroLabel1</value>
</data>
<data name="&gt;&gt;metroLabel1.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroLabel1.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;metroLabel1.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="&gt;&gt;pictureBox1.Name" xml:space="preserve">
<value>pictureBox1</value>
</data>
<data name="&gt;&gt;pictureBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox1.Parent" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="metroPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="metroPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 60</value>
</data>
<data name="metroPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>612, 523</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="metroPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;metroPanel1.Name" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;metroPanel1.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroPanel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroPanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;metroPanel1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="numericUpDown5.Location" type="System.Drawing.Point, System.Drawing">
<value>373, 338</value>
<value>341, 406</value>
</data>
<data name="numericUpDown5.Size" type="System.Drawing.Size, System.Drawing">
<value>127, 20</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="numericUpDown5.TabIndex" type="System.Int32, mscorlib">
<value>21</value>
</data>
@@ -298,7 +141,7 @@
<value>2</value>
</data>
<data name="numericUpDown4.Location" type="System.Drawing.Point, System.Drawing">
<value>373, 312</value>
<value>341, 380</value>
</data>
<data name="numericUpDown4.Size" type="System.Drawing.Size, System.Drawing">
<value>127, 20</value>
@@ -319,7 +162,7 @@
<value>3</value>
</data>
<data name="numericUpDown3.Location" type="System.Drawing.Point, System.Drawing">
<value>373, 286</value>
<value>341, 354</value>
</data>
<data name="numericUpDown3.Size" type="System.Drawing.Size, System.Drawing">
<value>127, 20</value>
@@ -340,7 +183,7 @@
<value>4</value>
</data>
<data name="numericUpDown2.Location" type="System.Drawing.Point, System.Drawing">
<value>373, 260</value>
<value>341, 328</value>
</data>
<data name="numericUpDown2.Size" type="System.Drawing.Size, System.Drawing">
<value>127, 20</value>
@@ -364,7 +207,7 @@
<value>True</value>
</data>
<data name="metroLabel6.Location" type="System.Drawing.Point, System.Drawing">
<value>350, 260</value>
<value>318, 328</value>
</data>
<data name="metroLabel6.Size" type="System.Drawing.Size, System.Drawing">
<value>21, 19</value>
@@ -391,7 +234,7 @@
<value>True</value>
</data>
<data name="metroLabel5.Location" type="System.Drawing.Point, System.Drawing">
<value>350, 335</value>
<value>318, 403</value>
</data>
<data name="metroLabel5.Size" type="System.Drawing.Size, System.Drawing">
<value>20, 19</value>
@@ -418,7 +261,7 @@
<value>True</value>
</data>
<data name="metroLabel4.Location" type="System.Drawing.Point, System.Drawing">
<value>350, 310</value>
<value>318, 378</value>
</data>
<data name="metroLabel4.Size" type="System.Drawing.Size, System.Drawing">
<value>21, 19</value>
@@ -445,7 +288,7 @@
<value>True</value>
</data>
<data name="metroLabel3.Location" type="System.Drawing.Point, System.Drawing">
<value>350, 285</value>
<value>318, 353</value>
</data>
<data name="metroLabel3.Size" type="System.Drawing.Size, System.Drawing">
<value>20, 19</value>
@@ -468,6 +311,7 @@
<data name="&gt;&gt;metroLabel3.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="resource.Image" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
@@ -487,7 +331,7 @@
<value>False</value>
</data>
<data name="metroTextBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>373, 231</value>
<value>341, 299</value>
</data>
<data name="metroTextBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>127, 23</value>
@@ -511,7 +355,7 @@
<value>True</value>
</data>
<data name="metroLabel1.Location" type="System.Drawing.Point, System.Drawing">
<value>327, 231</value>
<value>295, 299</value>
</data>
<data name="metroLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>46, 19</value>
@@ -535,7 +379,7 @@
<value>11</value>
</data>
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>327, 38</value>
<value>295, 106</value>
</data>
<data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>173, 163</value>
@@ -555,12 +399,58 @@
<data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="metroPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="metroPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 60</value>
</data>
<data name="metroPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>612, 523</value>
</data>
<data name="metroPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;metroPanel1.Name" xml:space="preserve">
<value>metroPanel1</value>
</data>
<data name="&gt;&gt;metroPanel1.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroPanel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;metroPanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;metroPanel1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="menuStrip.AutoSize" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="saveToolStripMenuItem1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wgAADsIBFShKgAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAADfSURBVDhPYxg8
QLt++3yTGbf/Fm599P/Nh49wfPXxq/+rTt37f+Dak/8gOSBgAGEMANIMxGBFyAasPf/0v8GE8//z1t8C
y4HU4DIALIluwLpLL+HiMANAGKoNAWASCavv/n/57gPcgOvP3oENOXj7NViOoAFGU6791+k4ghWD5Aga
QCyGakMAkODcU89R/I8Ng9TgNADk14dPn/8/c+kqVgySgwUqVBsCwAx49urN/zsPHmPFIDmaGvAXJInN
38gYasBfqDYE0K7dOn/Wvut/sfkdGYPUgJI9VNuAAwYGAGn6yvdevWgPAAAAAElFTkSuQmCC
</value>
</data>
<data name="saveToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>98, 22</value>
</data>
<data name="saveToolStripMenuItem1.Text" xml:space="preserve">
<value>Save</value>
</data>
<data name="fileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 20</value>
</data>
<data name="fileToolStripMenuItem.Text" xml:space="preserve">
<value>File</value>
</data>
<data name="menuStrip.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 60</value>
</data>
@@ -585,73 +475,6 @@
<data name="&gt;&gt;menuStrip.ZOrder" xml:space="preserve">
<value>0</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
wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAADfSURBVDhPYxg8
QLt++3yTGbf/Fm599P/Nh49wfPXxq/+rTt37f+Dak/8gOSBgAGEMANIMxGBFyAasPf/0v8GE8//z1t8C
y4HU4DIALIluwLpLL+HiMANAGKoNAWASCavv/n/57gPcgOvP3oENOXj7NViOoAFGU6791+k4ghWD5Aga
QCyGakMAkODcU89R/I8Ng9TgNADk14dPn/8/c+kqVgySgwUqVBsCwAx49urN/zsPHmPFIDmaGvAXJInN
38gYasBfqDYE0K7dOn/Wvut/sfkdGYPUgJI9VNuAAwYGAGn6yvdevWgPAAAAAElFTkSuQmCC
</value>
</data>
<data name="saveToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>98, 22</value>
</data>
<data name="saveToolStripMenuItem1.Text" xml:space="preserve">
<value>Save</value>
</data>
<data name="&gt;&gt;colorsTab.Name" xml:space="preserve">
<value>colorsTab</value>
</data>
<data name="&gt;&gt;colorsTab.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;colorsTab.Parent" xml:space="preserve">
<value>tabControl</value>
</data>
<data name="&gt;&gt;colorsTab.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;waterTab.Name" xml:space="preserve">
<value>waterTab</value>
</data>
<data name="&gt;&gt;waterTab.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;waterTab.Parent" xml:space="preserve">
<value>tabControl</value>
</data>
<data name="&gt;&gt;waterTab.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tabControl.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 83</value>
</data>
<data name="tabControl.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 500</value>
</data>
<data name="tabControl.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="&gt;&gt;tabControl.Name" xml:space="preserve">
<value>tabControl</value>
</data>
<data name="&gt;&gt;tabControl.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroTabControl, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;tabControl.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tabControl.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="colorsTab.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 38</value>
</data>
@@ -700,6 +523,27 @@
<data name="&gt;&gt;waterTab.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tabControl.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 83</value>
</data>
<data name="tabControl.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 500</value>
</data>
<data name="tabControl.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="&gt;&gt;tabControl.Name" xml:space="preserve">
<value>tabControl</value>
</data>
<data name="&gt;&gt;tabControl.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroTabControl, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;tabControl.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tabControl.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>

View File

@@ -21,11 +21,13 @@ namespace PckStudio.Forms
private void Pref_Load(object sender, EventArgs e)
{
string host = File.ReadAllText(Environment.CurrentDirectory + "\\settings.ini").Split(new[] { "\r\n", "\n"}, StringSplitOptions.None)[0];
metroTextBox1.Text = host;
string host1 = File.ReadAllText(Environment.CurrentDirectory + "\\settings.ini").Split(new[] { "\r\n", "\n"}, StringSplitOptions.None)[1];
metroTextBox2.Text = host1;
if (File.Exists(Environment.CurrentDirectory + "\\settings.ini"))
{
string host = File.ReadAllText(Environment.CurrentDirectory + "\\settings.ini").Split(new[] { "\r\n", "\n" }, StringSplitOptions.None)[0];
metroTextBox1.Text = host;
string host1 = File.ReadAllText(Environment.CurrentDirectory + "\\settings.ini").Split(new[] { "\r\n", "\n" }, StringSplitOptions.None)[1];
metroTextBox2.Text = host1;
}
}
private void buttonDonate_Click(object sender, EventArgs e)

View File

@@ -23,12 +23,13 @@ using PckStudio;
using PckStudio.Forms;
using System.IO.Packaging;
using RichPresenceClient;
using PckStudio.Classes.FileTypes;
namespace PckStudio.Forms.Utilities
{
public partial class TextureConverterUtility : MetroForm
{
public TextureConverterUtility(TreeView tv0, PckStudio.PCK pck)
public TextureConverterUtility(TreeView tv0, PCKFile pck)
{
InitializeComponent();
TView = tv0;
@@ -43,7 +44,7 @@ namespace PckStudio.Forms.Utilities
bool ToPC = true;
PckStudio.PCK Pck;
PCKFile Pck;
TreeView TView;
@@ -329,13 +330,13 @@ namespace PckStudio.Forms.Utilities
switch (tn.Text)
{
case ("terrain.png"):
Terrain = Image.FromStream(new MemoryStream(((PckStudio.PCK.MineFile)(tn.Tag)).data));
Terrain = Image.FromStream(new MemoryStream(((PCKFile.FileData)(tn.Tag)).data));
break;
case ("items.png"):
Items = Image.FromStream(new MemoryStream(((PckStudio.PCK.MineFile)(tn.Tag)).data));
Items = Image.FromStream(new MemoryStream(((PCKFile.FileData)(tn.Tag)).data));
break;
case ("art"):
painting = Image.FromStream(new MemoryStream(((PckStudio.PCK.MineFile)(tn.Nodes[0].Tag)).data));
painting = Image.FromStream(new MemoryStream(((PCKFile.FileData)(tn.Nodes[0].Tag)).data));
break;
case ("mob"):
EntityNode = tn;
@@ -448,7 +449,7 @@ namespace PckStudio.Forms.Utilities
string Outpath = "assets\\minecraft\\textures\\";
foreach (PckStudio.PCK.MineFile mf in Pck.mineFiles)
foreach (PCKFile.FileData mf in Pck.file_entries)
{
System.IO.FileInfo file = new System.IO.FileInfo(Environment.CurrentDirectory + "\\Temp\\" + @"\" + mf.name);
file.Directory.Create(); // If the directory already exists, this method does nothing.
@@ -473,7 +474,7 @@ namespace PckStudio.Forms.Utilities
string Outpath = "assets\\minecraft\\textures\\";
foreach (PckStudio.PCK.MineFile mf in Pck.mineFiles)
foreach (PCKFile.FileData mf in Pck.file_entries)
{
System.IO.FileInfo file = new System.IO.FileInfo(Environment.CurrentDirectory + "\\Temp\\" + @"\" + mf.name);
file.Directory.Create(); // If the directory already exists, this method does nothing.
@@ -498,7 +499,7 @@ namespace PckStudio.Forms.Utilities
string Outpath = "assets\\minecraft\\textures\\";
foreach (PckStudio.PCK.MineFile mf in Pck.mineFiles)
foreach (PCKFile.FileData mf in Pck.file_entries)
{
System.IO.FileInfo file = new System.IO.FileInfo(Environment.CurrentDirectory + "\\Temp\\" + @"\" + mf.name);
file.Directory.Create(); // If the directory already exists, this method does nothing.

View File

@@ -252,7 +252,6 @@ namespace PckStudio.Forms
List<string> pckFiles = Directory.GetFiles(appData + "/PCK Center/myPcks/", "*.*", SearchOption.AllDirectories).Where(file => new string[] { ".pck" }.Contains(Path.GetExtension(file))).ToList();
foreach (string pck in pckFiles)
{
int line = 0;
string pckName = "";
string author = "";
string desc = "";
@@ -309,7 +308,7 @@ namespace PckStudio.Forms
try
{
RPC.SetRPC("825875166574673940", "Viewing the PCK Center", "Program by PhoenixARC", "pcklogo", "PCK Studio", "pcklogo");
RPC.SetRPC("Viewing the PCK Center", "Program by PhoenixARC", "pcklogo", "PCK Studio", "pcklogo");
}
catch
{

View File

@@ -16,6 +16,7 @@ using System.IO.Packaging;
using PckStudio;
using System.IO.Compression;
using static PckStudio.FormMain;
using PckStudio.Classes.FileTypes;
namespace PckStudio.Forms
{
@@ -132,11 +133,16 @@ namespace PckStudio.Forms
//MessageBox.Show(root);//debug thingy to make sure filepath is correct
//add all skins to a list
List<PCK.MineFile> skinsList = new List<PCK.MineFile>();
List<PCK.MineFile> capesList = new List<PCK.MineFile>();
PCK pck = new PCK(appData + "/PCK Center/myPcks/" + mod + ".pck"); //sets opened pck
PCK currentPCK = pck; //sets opened pck
foreach (PCK.MineFile skin in currentPCK.mineFiles)
List<PCKFile.FileData> skinsList = new List<PCKFile.FileData>();
List<PCKFile.FileData> capesList = new List<PCKFile.FileData>();
PCKFile pck = null;
using (var stream = File.OpenRead(appData + "/PCK Center/myPcks/" + mod + ".pck"))
{
pck = new PCKFile(stream); //sets opened pck
}
PCKFile currentPCK = pck; //sets opened pck
foreach (PCKFile.FileData skin in currentPCK.file_entries)
{
if (skin.name.Count() == 19)
{
@@ -170,24 +176,24 @@ namespace PckStudio.Forms
writeSkins.WriteLine(" \"skins\": [");
int skinAmount = 0;
foreach (PCK.MineFile newSkin in skinsList)
foreach (PCKFile.FileData newSkin in skinsList)
{
skinAmount += 1;
string skinName = "skinName";
string capePath = "";
bool hasCape = false;
foreach (Object[] entry in newSkin.entries)
foreach (var entry in newSkin.properties)
{
if (entry[0].ToString() == "DISPLAYNAME")
if (entry.Key.ToString() == "DISPLAYNAME")
{
skinName = entry[1].ToString();
skinDisplayNames.Add(new Item() { Id = newSkin.name.Remove(15, 4), Name = entry[1].ToString() });
skinName = entry.Value.ToString();
skinDisplayNames.Add(new Item() { Id = newSkin.name.Remove(15, 4), Name = entry.Value.ToString() });
}
if (entry[0].ToString() == "CAPEPATH")
if (entry.Key.ToString() == "CAPEPATH")
{
hasCape = true;
capePath = entry[1].ToString();
capePath = entry.Value.ToString();
}
}
@@ -227,7 +233,7 @@ namespace PckStudio.Forms
{
writeSkins.WriteLine("{");
int newSkinCount = 0;
foreach (PCK.MineFile newSkin in skinsList)
foreach (PCKFile.FileData newSkin in skinsList)
{
newSkinCount += 1;
@@ -259,13 +265,13 @@ namespace PckStudio.Forms
if (skinPicture.Height == skinPicture.Width)
{
//determines skin type based on image dimensions, existence of BOX tags, and the ANIM value
foreach (Object[] entry in newSkin.entries)
foreach (var entry in newSkin.properties)
{
if (entry[0].ToString() == "BOX")
if (entry.Key.ToString() == "BOX")
{
string mClass = "";
string mData = "";
foreach (char dCheck in entry[1].ToString())
foreach (char dCheck in entry.Value.ToString())
{
if (dCheck.ToString() != " ")
{
@@ -273,7 +279,7 @@ namespace PckStudio.Forms
}
else
{
mData = entry[1].ToString().Remove(0, mClass.Count() + 1);
mData = entry.Value.ToString().Remove(0, mClass.Count() + 1);
break;
}
}
@@ -310,13 +316,13 @@ namespace PckStudio.Forms
}
}
if (entry[0].ToString() == "OFFSET")
if (entry.Key.ToString() == "OFFSET")
{
string oClass = "";
string oData = "";
foreach (char oCheck in entry[1].ToString())
foreach (char oCheck in entry.Value.ToString())
{
oData = entry[1].ToString();
oData = entry.Value.ToString();
if (oCheck.ToString() != " ")
{
oClass += oCheck.ToString();
@@ -345,13 +351,13 @@ namespace PckStudio.Forms
}
}
if (entry[0].ToString() == "ANIM")
if (entry.Key.ToString() == "ANIM")
{
if (entry[1].ToString() == "0x40000")
if (entry.Value.ToString() == "0x40000")
{
}
else if (entry[1].ToString() == "0x80000")
else if (entry.Value.ToString() == "0x80000")
{
skinType = "alex";
}
@@ -1015,7 +1021,7 @@ namespace PckStudio.Forms
}
//adds skin textures
foreach (PCK.MineFile skinTexture in skinsList)
foreach (PCKFile.FileData skinTexture in skinsList)
{
var ms = new MemoryStream(skinTexture.data);
Bitmap saveSkin = new Bitmap(Image.FromStream(ms));
@@ -1035,7 +1041,7 @@ namespace PckStudio.Forms
}
//adds cape textures
foreach (PCK.MineFile capeTexture in capesList)
foreach (PCKFile.FileData capeTexture in capesList)
{
File.WriteAllBytes(root + "/" + capeTexture.name, capeTexture.data);
}

View File

@@ -1,6 +0,0 @@
namespace PckStudio
{
internal class ZipArchive
{
}
}

View File

@@ -139,6 +139,7 @@
<Compile Include="Classes\FileTypes\Bink.cs" />
<Compile Include="Classes\FileTypes\COL.cs" />
<Compile Include="Classes\FileTypes\CSM.cs" />
<Compile Include="Classes\FileTypes\PCKFile.cs" />
<Compile Include="Classes\IO\PCKCollectionsLocal.cs" />
<Compile Include="Classes\Models\DefaultModels\CharacterModel.cs" />
<Compile Include="Classes\Models\DefaultModels\ModelBase.cs" />
@@ -168,7 +169,6 @@
<Compile Include="Classes\Models\TexturePlane.cs" />
<Compile Include="Classes\Networking\Network.cs" />
<Compile Include="Classes\Networking\PCKCollections.cs" />
<Compile Include="Classes\FileTypes\PCK.cs" />
<Compile Include="Classes\Misc\RichPresenceClient.cs" />
<Compile Include="Classes\Networking\Update.cs" />
<Compile Include="Forms\Additional-Popups\FakeProgressBar.cs">
@@ -270,12 +270,6 @@
<Compile Include="Forms\Skins-And-Textures\SkinPreview.Designer.cs">
<DependentUpon>SkinPreview.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Testx-12.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\Testx-12.Designer.cs">
<DependentUpon>Testx-12.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Utilities\Animation\AnimationEditor.cs">
<SubType>Form</SubType>
</Compile>
@@ -378,7 +372,6 @@
<Compile Include="Forms\Utilities\TextureConverterUtility.Designer.cs">
<DependentUpon>TextureConverterUtility.cs</DependentUpon>
</Compile>
<Compile Include="Forms\ZipArchive.cs" />
<Compile Include="generateModelOLD.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@@ -387,7 +380,6 @@
<Compile Include="Classes\ToolboxItems\InterpolationPictureBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Classes\Misc\KeyValuePair.cs" />
<Compile Include="Classes\FileTypes\LOC.cs" />
<Compile Include="Forms\Utilities\LOCEditor.cs">
<SubType>Form</SubType>
@@ -502,9 +494,6 @@
<EmbeddedResource Include="Forms\Skins-And-Textures\SkinPreview.resx">
<DependentUpon>SkinPreview.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Testx-12.resx">
<DependentUpon>Testx-12.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Utilities\Animation\AnimationEditor.resx">
<DependentUpon>AnimationEditor.cs</DependentUpon>
</EmbeddedResource>
@@ -635,7 +624,7 @@
</ItemGroup>
<ItemGroup>
<None Include="Resources\apps.zip" />
<None Include="Resources\binkawin.asi" />
<None Include="Resources\binka\binkawin.asi" />
<None Include="Resources\settings.ini" />
<None Include="Resources\tileData.json" />
<None Include="Resources\UntitledSkinPCK.pck" />
@@ -649,7 +638,6 @@
<None Include="Resources\wii-u-games-tool.png" />
<None Include="Resources\turn-off %281%291.png" />
<None Include="Resources\bg2.png" />
<Content Include="Resources\binka_encode.exe" />
<None Include="Resources\discord.png" />
<None Include="Resources\man.png" />
<None Include="Resources\external-content.duckduckgo.png" />
@@ -665,13 +653,10 @@
<None Include="Resources\iconImageList\AudioEditor\6_mg02.png" />
<None Include="Resources\iconImageList\AudioEditor\7_mg03.png" />
<None Include="Resources\MROE.png" />
<Content Include="Resources\mss32.dll" />
<None Include="Resources\sdDownload.png" />
<None Include="Resources\Replace.png" />
<None Include="Resources\pack.png" />
<None Include="Resources\TileData.txt" />
<None Include="Resources\terrain.png" />
<None Include="Resources\xbox.bmp" />
<None Include="Resources\xbox.png" />
<None Include="Resources\ps3.png" />
<None Include="Resources\wiiu.png" />
@@ -679,6 +664,8 @@
<None Include="Resources\pckOpen.png" />
<None Include="Resources\pckDrop.png" />
<None Include="Resources\pckCenterHeader.png" />
<None Include="Resources\binka\binka_encode.exe" />
<None Include="Resources\binka\mss32.dll" />
<Content Include="Sin_titulo991.ico" />
<None Include="Resources\bg1.png" />
<Content Include="favicon %285%29.ico" />
@@ -714,9 +701,6 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -180,6 +180,16 @@ namespace PckStudio.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] binka_encode {
get {
object obj = ResourceManager.GetObject("binka_encode", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -190,6 +200,16 @@ namespace PckStudio.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] binkawin {
get {
object obj = ResourceManager.GetObject("binkawin", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -300,6 +320,16 @@ namespace PckStudio.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] mss32 {
get {
object obj = ResourceManager.GetObject("mss32", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@@ -262,4 +262,13 @@
<data name="pckCenterHeader" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\pckCenterHeader.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="binkawin" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\binka\binkawin.asi;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="binka_encode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\binka\binka_encode.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="mss32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\binka\mss32.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>