Merge branch 'main' of https://github.com/PhoenixARC/-PCK-Studio
@@ -38,7 +38,19 @@ namespace PckStudio.Controls
|
||||
|
||||
private PckFile _pck;
|
||||
private string _location = string.Empty;
|
||||
private bool _wasModified = false;
|
||||
bool __modified = false;
|
||||
bool _wasModified
|
||||
{
|
||||
get => __modified;
|
||||
set
|
||||
{
|
||||
if (__modified == value)
|
||||
return;
|
||||
__modified = value;
|
||||
pckFileLabel.Text = !pckFileLabel.Text.StartsWith("*") && __modified ? "*" + pckFileLabel.Text : pckFileLabel.Text.Substring(1);
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isTemplateFile = false;
|
||||
private int _timesSaved = 0;
|
||||
|
||||
@@ -86,19 +98,49 @@ namespace PckStudio.Controls
|
||||
[PckFileType.TextureFile] = HandleTextureFile,
|
||||
[PckFileType.UIDataFile] = _ => throw new NotSupportedException("unused in-game"),
|
||||
[PckFileType.InfoFile] = null,
|
||||
[PckFileType.TexturePackInfoFile] = null,
|
||||
[PckFileType.TexturePackInfoFile] = HandleInnerPckFile,
|
||||
[PckFileType.LocalisationFile] = HandleLocalisationFile,
|
||||
[PckFileType.GameRulesFile] = HandleGameRuleFile,
|
||||
[PckFileType.AudioFile] = HandleAudioFile,
|
||||
[PckFileType.ColourTableFile] = HandleColourFile,
|
||||
[PckFileType.GameRulesHeader] = HandleGameRuleFile,
|
||||
[PckFileType.SkinDataFile] = null,
|
||||
[PckFileType.SkinDataFile] = HandleInnerPckFile,
|
||||
[PckFileType.ModelsFile] = HandleModelsFile,
|
||||
[PckFileType.BehavioursFile] = HandleBehavioursFile,
|
||||
[PckFileType.MaterialFile] = HandleMaterialFile,
|
||||
};
|
||||
}
|
||||
|
||||
private void HandleInnerPckFile(PckFileData file)
|
||||
{
|
||||
if (Settings.Default.LoadSubPcks &&
|
||||
(file.Filetype == PckFileType.SkinDataFile || file.Filetype == PckFileType.TexturePackInfoFile) &&
|
||||
file.Size > 0 && treeViewMain.SelectedNode.Nodes.Count == 0)
|
||||
{
|
||||
using (var stream = new MemoryStream(file.Data))
|
||||
{
|
||||
try
|
||||
{
|
||||
var reader = new PckFileReader(LittleEndianCheckBox.Checked ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
PckFile subPCKfile = reader.FromStream(stream);
|
||||
BuildPckTreeView(treeViewMain.SelectedNode.Nodes, subPCKfile);
|
||||
treeViewMain.SelectedNode.ExpandAll();
|
||||
|
||||
}
|
||||
catch (OverflowException ex)
|
||||
{
|
||||
MessageBox.Show("Failed to open pck\n" +
|
||||
"Try checking the 'Open/Save as Switch/Vita/PS4 pck' checkbox in the upper right corner.",
|
||||
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
treeViewMain.SelectedNode.Nodes.Clear();
|
||||
treeViewMain.SelectedNode.Collapse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// wrapper that allows the use of <paramref name="name"/> in <code>TreeNode.Nodes.Find(<paramref name="name"/>, ...)</code> and <code>TreeNode.Nodes.ContainsKey(<paramref name="name"/>)</code>
|
||||
/// </summary>
|
||||
@@ -117,7 +159,7 @@ namespace PckStudio.Controls
|
||||
{
|
||||
if (_pck.TryGetFile("0", PckFileType.InfoFile, out PckFileData file))
|
||||
{
|
||||
file.Properties.RemoveAll(t => t.Key.Equals("LOCK"));
|
||||
file.RemoveProperties("LOCK");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,7 +376,8 @@ namespace PckStudio.Controls
|
||||
if (node.Tag is PckFileData node_file)
|
||||
{
|
||||
PckFileData new_file = newPCKFile.CreateNewFile(node_file.Filename.Replace(parent_file.Filename + "/", String.Empty), node_file.Filetype);
|
||||
foreach (var prop in node_file.Properties) new_file.Properties.Add(prop);
|
||||
foreach (var prop in node_file.GetProperties())
|
||||
new_file.AddProperty(prop);
|
||||
new_file.SetData(node_file.Data);
|
||||
}
|
||||
}
|
||||
@@ -408,7 +451,7 @@ namespace PckStudio.Controls
|
||||
if (treeViewMain.SelectedNode is TreeNode node &&
|
||||
node.Tag is PckFileData file)
|
||||
{
|
||||
foreach (var property in file.Properties)
|
||||
foreach (var property in file.GetProperties())
|
||||
{
|
||||
treeMeta.Nodes.Add(CreateNode(property.Key, property));
|
||||
}
|
||||
@@ -527,7 +570,7 @@ namespace PckStudio.Controls
|
||||
{
|
||||
|
||||
}
|
||||
mfNew.Properties.Add(new KeyValuePair<string, string>(key, value));
|
||||
mfNew.AddProperty(key, value);
|
||||
}
|
||||
_wasModified = true;
|
||||
}
|
||||
@@ -590,13 +633,13 @@ namespace PckStudio.Controls
|
||||
if (e.Node is TreeNode t && t.Tag is PckFileData file)
|
||||
{
|
||||
viewFileInfoToolStripMenuItem.Visible = true;
|
||||
if (file.Properties.HasProperty("BOX"))
|
||||
if (file.HasProperty("BOX"))
|
||||
{
|
||||
buttonEdit.Text = "EDIT BOXES";
|
||||
buttonEdit.Visible = true;
|
||||
}
|
||||
else if (file.Properties.HasProperty("ANIM") &&
|
||||
file.Properties.GetPropertyValue("ANIM", s => SkinANIM.FromString(s) == (SkinAnimMask.RESOLUTION_64x64 | SkinAnimMask.SLIM_MODEL)))
|
||||
else if (file.HasProperty("ANIM") &&
|
||||
file.GetProperty("ANIM", s => SkinANIM.FromString(s) == (SkinAnimMask.RESOLUTION_64x64 | SkinAnimMask.SLIM_MODEL)))
|
||||
{
|
||||
buttonEdit.Text = "View Skin";
|
||||
buttonEdit.Visible = true;
|
||||
@@ -679,55 +722,52 @@ namespace PckStudio.Controls
|
||||
|
||||
private void createSkinToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!TryGetLocFile(out LOCFile locFile))
|
||||
LOCFile locFile = null;
|
||||
TryGetLocFile(out locFile);
|
||||
using AddNewSkin add = new AddNewSkin(locFile);
|
||||
if (add.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
MessageBox.Show("No .loc file found", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
using (AddNewSkin add = new AddNewSkin(locFile))
|
||||
if (add.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
|
||||
if (_pck.HasFile("Skins.pck", PckFileType.SkinDataFile)) // Prioritize Skins.pck
|
||||
{
|
||||
TreeNode subPCK = treeViewMain.Nodes.Find("Skins.pck", false).FirstOrDefault();
|
||||
if (subPCK.Nodes.ContainsKey("Skins")) add.SkinFile.Filename = add.SkinFile.Filename.Insert(0, "Skins/");
|
||||
add.SkinFile.Filename = add.SkinFile.Filename.Insert(0, "Skins.pck/");
|
||||
TreeNode newNode = new TreeNode(Path.GetFileName(add.SkinFile.Filename));
|
||||
newNode.Tag = add.SkinFile;
|
||||
SetNodeIcon(newNode, PckFileType.SkinFile);
|
||||
subPCK.Nodes.Add(newNode);
|
||||
RebuildSubPCK(newNode.FullPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (treeViewMain.Nodes.ContainsKey("Skins")) add.SkinFile.Filename = add.SkinFile.Filename.Insert(0, "Skins/"); // Then Skins folder
|
||||
_pck.AddFile(add.SkinFile);
|
||||
}
|
||||
if (add.HasCape)
|
||||
{
|
||||
if (_pck.HasFile("Skins.pck", PckFileType.SkinDataFile)) // Prioritize Skins.pck
|
||||
{
|
||||
TreeNode subPCK = treeViewMain.Nodes.Find("Skins.pck", false).FirstOrDefault();
|
||||
if (subPCK.Nodes.ContainsKey("Skins")) add.SkinFile.Filename = add.SkinFile.Filename.Insert(0, "Skins/");
|
||||
add.SkinFile.Filename = add.SkinFile.Filename.Insert(0, "Skins.pck/");
|
||||
TreeNode newNode = new TreeNode(Path.GetFileName(add.SkinFile.Filename));
|
||||
newNode.Tag = add.SkinFile;
|
||||
SetPckFileIcon(newNode, PckFileType.SkinFile);
|
||||
if (subPCK.Nodes.ContainsKey("Skins")) add.CapeFile.Filename = add.CapeFile.Filename.Insert(0, "Skins/");
|
||||
add.CapeFile.Filename = add.CapeFile.Filename.Insert(0, "Skins.pck/");
|
||||
TreeNode newNode = new TreeNode(Path.GetFileName(add.CapeFile.Filename));
|
||||
newNode.Tag = add.CapeFile;
|
||||
SetNodeIcon(newNode, PckFileType.SkinFile);
|
||||
subPCK.Nodes.Add(newNode);
|
||||
RebuildSubPCK(newNode.FullPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (treeViewMain.Nodes.ContainsKey("Skins")) add.SkinFile.Filename = add.SkinFile.Filename.Insert(0, "Skins/"); // Then Skins folder
|
||||
_pck.AddFile(add.SkinFile);
|
||||
if (treeViewMain.Nodes.ContainsKey("Skins")) add.CapeFile.Filename = add.CapeFile.Filename.Insert(0, "Skins/"); // Then Skins folder
|
||||
_pck.AddFile(add.CapeFile);
|
||||
}
|
||||
if (add.HasCape)
|
||||
{
|
||||
if (_pck.HasFile("Skins.pck", PckFileType.SkinDataFile)) // Prioritize Skins.pck
|
||||
{
|
||||
TreeNode subPCK = treeViewMain.Nodes.Find("Skins.pck", false).FirstOrDefault();
|
||||
if (subPCK.Nodes.ContainsKey("Skins")) add.CapeFile.Filename = add.CapeFile.Filename.Insert(0, "Skins/");
|
||||
add.CapeFile.Filename = add.CapeFile.Filename.Insert(0, "Skins.pck/");
|
||||
TreeNode newNode = new TreeNode(Path.GetFileName(add.CapeFile.Filename));
|
||||
newNode.Tag = add.CapeFile;
|
||||
SetPckFileIcon(newNode, PckFileType.SkinFile);
|
||||
subPCK.Nodes.Add(newNode);
|
||||
RebuildSubPCK(newNode.FullPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (treeViewMain.Nodes.ContainsKey("Skins")) add.CapeFile.Filename = add.CapeFile.Filename.Insert(0, "Skins/"); // Then Skins folder
|
||||
_pck.AddFile(add.CapeFile);
|
||||
}
|
||||
}
|
||||
|
||||
TrySetLocFile(locFile);
|
||||
_wasModified = true;
|
||||
BuildMainTreeView();
|
||||
}
|
||||
|
||||
TrySetLocFile(locFile);
|
||||
_wasModified = true;
|
||||
BuildMainTreeView();
|
||||
}
|
||||
}
|
||||
|
||||
private void createAnimatedTextureToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
@@ -870,7 +910,7 @@ namespace PckStudio.Controls
|
||||
{
|
||||
string[] param = property.Split(':');
|
||||
if (param.Length < 2) continue;
|
||||
newFile.Properties.Add((param[0], param[1]));
|
||||
newFile.AddProperty(param[0], param[1]);
|
||||
//switch (param[0])
|
||||
//{
|
||||
// case "DISPLAYNAMEID":
|
||||
@@ -1000,7 +1040,7 @@ namespace PckStudio.Controls
|
||||
"File path: " + file.Filename +
|
||||
"\nAssigned File type: " + (int)file.Filetype + " (" + file.Filetype + ")" +
|
||||
"\nFile size: " + file.Size +
|
||||
"\nProperties count: " + file.Properties.Count
|
||||
"\nProperties count: " + file.PropertyCount
|
||||
, Path.GetFileName(file.Filename) + " file info");
|
||||
}
|
||||
}
|
||||
@@ -1009,9 +1049,10 @@ namespace PckStudio.Controls
|
||||
{
|
||||
if (treeViewMain.SelectedNode is TreeNode node && node.Tag is PckFileData file && file.Filetype == PckFileType.SkinFile)
|
||||
{
|
||||
foreach (var p in file.Properties.FindAll(s => s.Key == "BOX" || s.Key == "OFFSET"))
|
||||
foreach (var p in file.GetProperties())
|
||||
{
|
||||
file.Properties[file.Properties.IndexOf(p)] = new KeyValuePair<string, string>(p.Key, p.Value.Replace(',', '.'));
|
||||
if (p.Key == "BOX" || p.Key == "OFFSET")
|
||||
file.SetProperty(file.GetPropertyIndex(p), new KeyValuePair<string, string>(p.Key, p.Value.Replace(',', '.')));
|
||||
}
|
||||
ReloadMetaTreeView();
|
||||
RebuildSubPCK(node.FullPath);
|
||||
@@ -1034,10 +1075,13 @@ namespace PckStudio.Controls
|
||||
string extractFilePath = exFile.FileName;
|
||||
|
||||
File.WriteAllBytes(extractFilePath, file.Data);
|
||||
if (file.Properties.Count > 0)
|
||||
if (file.PropertyCount > 0)
|
||||
{
|
||||
using var fs = File.CreateText($"{extractFilePath}.txt");
|
||||
file.Properties.ForEach(property => fs.WriteLine($"{property.Key}: {property.Value}"));
|
||||
foreach (var property in file.GetProperties())
|
||||
{
|
||||
fs.WriteLine($"{property.Key}: {property.Value}");
|
||||
}
|
||||
}
|
||||
// Verification that file extraction path was successful
|
||||
MessageBox.Show("File Extracted");
|
||||
@@ -1058,10 +1102,13 @@ namespace PckStudio.Controls
|
||||
{
|
||||
Directory.CreateDirectory($"{dialog.SelectedPath}/{Path.GetDirectoryName(file.Filename)}");
|
||||
File.WriteAllBytes($"{dialog.SelectedPath}/{file.Filename}", file.Data);
|
||||
if (file.Properties.Count > 0)
|
||||
if (file.PropertyCount > 0)
|
||||
{
|
||||
using var fs = File.CreateText($"{dialog.SelectedPath}/{file.Filename}.txt");
|
||||
file.Properties.ForEach(property => fs.WriteLine($"{property.Key}: {property.Value}"));
|
||||
foreach (var property in file.GetProperties())
|
||||
{
|
||||
fs.WriteLine($"{property.Key}: {property.Value}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1075,10 +1122,13 @@ namespace PckStudio.Controls
|
||||
{
|
||||
Directory.CreateDirectory($"{dialog.SelectedPath}/{Path.GetDirectoryName(_file.Filename)}");
|
||||
File.WriteAllBytes($"{dialog.SelectedPath}/{_file.Filename}", _file.Data);
|
||||
if (_file.Properties.Count > 0)
|
||||
if (_file.PropertyCount > 0)
|
||||
{
|
||||
using var fs = File.CreateText($"{dialog.SelectedPath}/{_file.Filename}.txt");
|
||||
_file.Properties.ForEach(property => fs.WriteLine($"{property.Key}: {property.Value}"));
|
||||
foreach (var property in _file.GetProperties())
|
||||
{
|
||||
fs.WriteLine($"{property.Key}: {property.Value}");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1105,7 +1155,10 @@ namespace PckStudio.Controls
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = Path.GetFileName(diag.NewText);
|
||||
var NewFile = new PckFileData(diag.NewText, file.Filetype);
|
||||
file.Properties.ForEach(p => NewFile.Properties.Add(p));
|
||||
foreach (var property in file.GetProperties())
|
||||
{
|
||||
NewFile.AddProperty(property);
|
||||
}
|
||||
NewFile.SetData(file.Data);
|
||||
NewFile.Filename = diag.NewText;
|
||||
newNode.Tag = NewFile;
|
||||
@@ -1145,6 +1198,11 @@ namespace PckStudio.Controls
|
||||
{
|
||||
if (node.Tag is PckFileData file)
|
||||
{
|
||||
if (_pck.TryGetFile(diag.NewText, file.Filetype, out _))
|
||||
{
|
||||
MessageBox.Show($"{diag.NewText} already exists", "File already exists");
|
||||
return;
|
||||
}
|
||||
file.Filename = diag.NewText;
|
||||
}
|
||||
else // folders
|
||||
@@ -1154,6 +1212,7 @@ namespace PckStudio.Controls
|
||||
{
|
||||
if (childNode.Tag is PckFileData folderFile)
|
||||
{
|
||||
if (folderFile.Filename == diag.NewText) continue;
|
||||
folderFile.Filename = childNode.FullPath;
|
||||
}
|
||||
}
|
||||
@@ -1198,41 +1257,50 @@ namespace PckStudio.Controls
|
||||
MessageBox.Show("Can't replace a folder.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Action to run before a file will be deleted
|
||||
/// </summary>
|
||||
/// <param name="file">File to remove</param>
|
||||
/// <returns>True if the remove should be canceled, otherwise False</returns>
|
||||
private bool BeforeFileRemove(PckFileData file)
|
||||
{
|
||||
string itemPath = "res/textures/items/";
|
||||
|
||||
// warn the user about deleting compass.png and clock.png
|
||||
if (file.Filetype == PckFileType.TextureFile &&
|
||||
(file.Filename == itemPath + "compass.png" || file.Filename == itemPath + "clock.png"))
|
||||
{
|
||||
if (MessageBox.Show("Are you sure want to delete this file? If \"compass.png\" or \"clock.png\" are missing, your game will crash upon loading this pack.", "Warning",
|
||||
MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
|
||||
return true;
|
||||
}
|
||||
|
||||
// remove loc key if its a skin/cape
|
||||
if (file.Filetype == PckFileType.SkinFile || file.Filetype == PckFileType.CapeFile)
|
||||
{
|
||||
if (TryGetLocFile(out LOCFile locFile))
|
||||
{
|
||||
if (file.TryGetProperty("THEMENAMEID", out string value))
|
||||
locFile.RemoveLocKey(value);
|
||||
if (file.TryGetProperty("DISPLAYNAMEID", out value))
|
||||
locFile.RemoveLocKey(value);
|
||||
TrySetLocFile(locFile);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void deleteFileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var node = treeViewMain.SelectedNode;
|
||||
if (node == null) return;
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
string path = node.FullPath;
|
||||
|
||||
if (node.Tag is PckFileData)
|
||||
if (node.TryGetTagData(out PckFileData file))
|
||||
{
|
||||
PckFileData file = node.Tag as PckFileData;
|
||||
|
||||
string itemPath = "res/textures/items/";
|
||||
|
||||
// warn the user about deleting compass.png and clock.png
|
||||
if (file.Filetype == PckFileType.TextureFile &&
|
||||
(file.Filename == itemPath + "compass.png" || file.Filename == itemPath + "clock.png"))
|
||||
{
|
||||
if (MessageBox.Show("Are you sure want to delete this file? If \"compass.png\" or \"clock.png\" are missing, your game will crash upon loading this pack.", "Warning",
|
||||
MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) return;
|
||||
}
|
||||
|
||||
// remove loc key if its a skin/cape
|
||||
if (file.Filetype == PckFileType.SkinFile || file.Filetype == PckFileType.CapeFile)
|
||||
{
|
||||
if (TryGetLocFile(out LOCFile locFile))
|
||||
{
|
||||
foreach (var property in file.Properties)
|
||||
{
|
||||
if (property.Key == "THEMENAMEID" || property.Key == "DISPLAYNAMEID")
|
||||
locFile.RemoveLocKey(property.Value);
|
||||
}
|
||||
TrySetLocFile(locFile);
|
||||
}
|
||||
}
|
||||
if (_pck.RemoveFile(file))
|
||||
if (!BeforeFileRemove(file) && _pck.RemoveFile(file))
|
||||
{
|
||||
node.Remove();
|
||||
_wasModified = true;
|
||||
@@ -1242,7 +1310,7 @@ namespace PckStudio.Controls
|
||||
MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
|
||||
{
|
||||
string pckFolderDir = node.FullPath;
|
||||
_pck.RemoveAll(file => file.Filename.StartsWith(pckFolderDir));
|
||||
_pck.RemoveAll(file => !BeforeFileRemove(file) && file.Filename.StartsWith(pckFolderDir));
|
||||
node.Remove();
|
||||
_wasModified = true;
|
||||
}
|
||||
@@ -1284,18 +1352,18 @@ namespace PckStudio.Controls
|
||||
if (treeViewMain.SelectedNode is TreeNode node &&
|
||||
node.Tag is PckFileData file)
|
||||
{
|
||||
var props = file.Properties.Select(p => p.Key + " " + p.Value);
|
||||
var props = file.GetProperties().Select(p => p.Key + " " + p.Value);
|
||||
using (var input = new MultiTextPrompt(props.ToArray()))
|
||||
{
|
||||
if (input.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
file.Properties.Clear();
|
||||
file.ClearProperties();
|
||||
foreach (var line in input.TextOutput)
|
||||
{
|
||||
int idx = line.IndexOf(' ');
|
||||
if (idx == -1 || line.Length - 1 == idx)
|
||||
continue;
|
||||
file.Properties.Add((line.Substring(0, idx).Replace(":", string.Empty), line.Substring(idx + 1)));
|
||||
file.AddProperty(line.Substring(0, idx).Replace(":", string.Empty), line.Substring(idx + 1));
|
||||
}
|
||||
ReloadMetaTreeView();
|
||||
RebuildSubPCK(node.FullPath);
|
||||
@@ -1310,7 +1378,7 @@ namespace PckStudio.Controls
|
||||
if (treeMeta.SelectedNode is TreeNode subnode && subnode.Tag is KeyValuePair<string, string> property &&
|
||||
treeViewMain.SelectedNode is TreeNode node && node.Tag is PckFileData file)
|
||||
{
|
||||
int i = file.Properties.IndexOf(property);
|
||||
int i = file.GetPropertyIndex(property);
|
||||
if (i != -1)
|
||||
{
|
||||
switch (property.Key)
|
||||
@@ -1321,7 +1389,7 @@ namespace PckStudio.Controls
|
||||
using ANIMEditor diag = new ANIMEditor(property.Value);
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
file.Properties[i] = new KeyValuePair<string, string>("ANIM", diag.ResultAnim.ToString());
|
||||
file.SetProperty(i, new KeyValuePair<string, string>("ANIM", diag.ResultAnim.ToString()));
|
||||
RebuildSubPCK(treeViewMain.SelectedNode.FullPath);
|
||||
ReloadMetaTreeView();
|
||||
_wasModified = true;
|
||||
@@ -1341,7 +1409,7 @@ namespace PckStudio.Controls
|
||||
using BoxEditor diag = new BoxEditor(property.Value, IsSubPCKNode(treeViewMain.SelectedNode.FullPath));
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
file.Properties[i] = new KeyValuePair<string, string>("BOX", diag.Result.ToString());
|
||||
file.SetProperty(i, new KeyValuePair<string, string>("BOX", diag.Result.ToString()));
|
||||
RebuildSubPCK(treeViewMain.SelectedNode.FullPath);
|
||||
ReloadMetaTreeView();
|
||||
_wasModified = true;
|
||||
@@ -1364,7 +1432,7 @@ namespace PckStudio.Controls
|
||||
{
|
||||
if (addProperty.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
file.Properties[i] = addProperty.Property;
|
||||
file.SetProperty(i, addProperty.Property);
|
||||
RebuildSubPCK(treeViewMain.SelectedNode.FullPath);
|
||||
ReloadMetaTreeView();
|
||||
_wasModified = true;
|
||||
@@ -1394,7 +1462,7 @@ namespace PckStudio.Controls
|
||||
int idx = line.IndexOf(' ');
|
||||
if (idx == -1 || line.Length - 1 == idx)
|
||||
continue;
|
||||
file.Properties.Add((line.Substring(0, idx), line.Substring(idx + 1)));
|
||||
file.AddProperty(line.Substring(0, idx), line.Substring(idx + 1));
|
||||
}
|
||||
ReloadMetaTreeView();
|
||||
RebuildSubPCK(node.FullPath);
|
||||
@@ -1411,7 +1479,7 @@ namespace PckStudio.Controls
|
||||
using BoxEditor diag = new BoxEditor(SkinBOX.Empty, IsSubPCKNode(treeViewMain.SelectedNode.FullPath));
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
file.Properties.Add("BOX", diag.Result);
|
||||
file.AddProperty("BOX", diag.Result);
|
||||
RebuildSubPCK(treeViewMain.SelectedNode.FullPath);
|
||||
ReloadMetaTreeView();
|
||||
_wasModified = true;
|
||||
@@ -1427,7 +1495,7 @@ namespace PckStudio.Controls
|
||||
using ANIMEditor diag = new ANIMEditor(SkinANIM.Empty);
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
file.Properties.Add("ANIM", diag.ResultAnim);
|
||||
file.AddProperty("ANIM", diag.ResultAnim);
|
||||
RebuildSubPCK(treeViewMain.SelectedNode.FullPath);
|
||||
ReloadMetaTreeView();
|
||||
_wasModified = true;
|
||||
@@ -1440,7 +1508,7 @@ namespace PckStudio.Controls
|
||||
{
|
||||
if (treeMeta.SelectedNode is TreeNode t && t.Tag is KeyValuePair<string, string> property &&
|
||||
treeViewMain.SelectedNode is TreeNode main && main.Tag is PckFileData file &&
|
||||
file.Properties.Remove(property))
|
||||
file.RemoveProperty(property))
|
||||
{
|
||||
treeMeta.SelectedNode.Remove();
|
||||
RebuildSubPCK(treeViewMain.SelectedNode.FullPath);
|
||||
@@ -1456,7 +1524,7 @@ namespace PckStudio.Controls
|
||||
using AddPropertyPrompt addProperty = new AddPropertyPrompt();
|
||||
if (addProperty.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
file.Properties.Add(addProperty.Property);
|
||||
file.AddProperty(addProperty.Property);
|
||||
RebuildSubPCK(treeViewMain.SelectedNode.FullPath);
|
||||
ReloadMetaTreeView();
|
||||
_wasModified = true;
|
||||
@@ -1474,39 +1542,90 @@ namespace PckStudio.Controls
|
||||
return;
|
||||
}
|
||||
|
||||
if (file.Filename == "res/terrain.png" || file.Filename == "res/items.png")
|
||||
{
|
||||
using var ms = new MemoryStream(file.Data);
|
||||
bool isTerrain = file.Filename == "res/terrain.png";
|
||||
bool isItems = file.Filename == "res/items.png";
|
||||
bool isParticles = file.Filename == "res/particles.png";
|
||||
bool isMoonPhases = file.Filename == "res/terrain/moon_phases.png";
|
||||
bool isMapIcons = file.Filename == "res/misc/mapicons.png";
|
||||
bool isAdditionalMapIcons = file.Filename == "res/misc/additionalmapicons.png";
|
||||
bool isXPOrbs = file.Filename == "res/item/xporb.png";
|
||||
bool isExplosions = file.Filename == "res/misc/explosion.png";
|
||||
bool isPaintings = file.Filename == "res/art/kz.png";
|
||||
bool isBanners = file.Filename == "res/item/banner/Banner_Atlas.png";
|
||||
|
||||
var img = Image.FromStream(ms);
|
||||
var res = img.Width / 16; // texture count on X axes
|
||||
var size = new Size(res, res);
|
||||
var viewer = new TextureAtlasEditor(_pck, file.Filename, img, size);
|
||||
if (
|
||||
isTerrain || isItems || isParticles || isMoonPhases || isPaintings ||
|
||||
isMapIcons || isAdditionalMapIcons || isXPOrbs || isExplosions || isBanners
|
||||
)
|
||||
{
|
||||
var img = file.GetTexture();
|
||||
var tile_size = new Size();
|
||||
|
||||
var banner_scale = img.Width / Resources.banners_atlas.Width;
|
||||
|
||||
if (isBanners)
|
||||
{
|
||||
// The banner atlas has extra space on it that has to be truncated for the editor
|
||||
img = img.GetArea(new Rectangle(0, 0, img.Width - (4 * banner_scale), img.Height - (1 * banner_scale)));
|
||||
|
||||
// banners are 42x41 because of course they are
|
||||
tile_size = new Size(42 * banner_scale, 41 * banner_scale);
|
||||
}
|
||||
|
||||
// most atlases have 4 columns
|
||||
var columnCount = isBanners ? 6 : 4;
|
||||
|
||||
if (isTerrain || isItems || isParticles || isPaintings) columnCount = 16;
|
||||
|
||||
if (!isBanners)
|
||||
{
|
||||
var resolution = img.Width / columnCount;
|
||||
tile_size = new Size(resolution, resolution);
|
||||
}
|
||||
|
||||
var viewer = new TextureAtlasEditor(_pck, file.Filename, img, tile_size);
|
||||
if (viewer.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
using (var result = new MemoryStream())
|
||||
var texture = viewer.FinalTexture;
|
||||
if (isBanners)
|
||||
{
|
||||
viewer.FinalTexture.Save(result, ImageFormat.Png);
|
||||
file.SetData(result.ToArray());
|
||||
var graphicsConfig = new GraphicsConfig()
|
||||
{
|
||||
InterpolationMode = InterpolationMode.NearestNeighbor,
|
||||
PixelOffsetMode = PixelOffsetMode.HighQuality
|
||||
};
|
||||
|
||||
var _img = new Bitmap((Resources.banners_atlas.Width + 4) * banner_scale,
|
||||
(Resources.banners_atlas.Height + 1) * banner_scale);
|
||||
|
||||
using (var g = Graphics.FromImage(_img))
|
||||
{
|
||||
g.ApplyConfig(graphicsConfig);
|
||||
g.DrawImage(texture, 0, 0, texture.Width, texture.Height);
|
||||
}
|
||||
|
||||
texture = _img;
|
||||
}
|
||||
|
||||
file.SetData(texture, ImageFormat.Png);
|
||||
_wasModified = true;
|
||||
BuildMainTreeView();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (file.Filename.StartsWith("res/textures/blocks/") || file.Filename.StartsWith("res/textures/items/"))
|
||||
{
|
||||
var animation = AnimationHelper.GetAnimationFromFile(file);
|
||||
using (AnimationEditor animationEditor = new AnimationEditor(animation, Path.GetFileNameWithoutExtension(file.Filename)))
|
||||
{
|
||||
if (animationEditor.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
_wasModified = true;
|
||||
BuildMainTreeView();
|
||||
}
|
||||
}
|
||||
if (!file.Filename.StartsWith("res/textures/blocks/") && !file.Filename.StartsWith("res/textures/items/"))
|
||||
return;
|
||||
var animation = AnimationHelper.GetAnimationFromFile(file);
|
||||
using (AnimationEditor animationEditor = new AnimationEditor(animation, Path.GetFileNameWithoutExtension(file.Filename)))
|
||||
{
|
||||
if (animationEditor.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
_wasModified = true;
|
||||
file.Filename = animationEditor.FinalPath;
|
||||
AnimationHelper.SaveAnimationToFile(file, animation);
|
||||
BuildMainTreeView();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1550,7 +1669,7 @@ namespace PckStudio.Controls
|
||||
using (var ms = new MemoryStream(file.Data))
|
||||
{
|
||||
var texture = Image.FromStream(ms);
|
||||
if (file.Properties.HasProperty("BOX"))
|
||||
if (file.HasProperty("BOX"))
|
||||
{
|
||||
using generateModel generate = new generateModel(file);
|
||||
if (generate.ShowDialog() == DialogResult.OK)
|
||||
@@ -1562,7 +1681,7 @@ namespace PckStudio.Controls
|
||||
}
|
||||
else
|
||||
{
|
||||
SkinPreview frm = new SkinPreview(texture, file.Properties.GetPropertyValue("ANIM", SkinANIM.FromString));
|
||||
SkinPreview frm = new SkinPreview(texture, file.GetProperty("ANIM", SkinANIM.FromString));
|
||||
frm.ShowDialog(this);
|
||||
frm.Dispose();
|
||||
}
|
||||
@@ -1676,14 +1795,117 @@ namespace PckStudio.Controls
|
||||
BuildMainTreeView();
|
||||
}
|
||||
|
||||
private void SetNodeIcon(TreeNode node, PckFileType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case PckFileType.AudioFile:
|
||||
node.ImageIndex = 1;
|
||||
node.SelectedImageIndex = 1;
|
||||
break;
|
||||
case PckFileType.LocalisationFile:
|
||||
node.ImageIndex = 3;
|
||||
node.SelectedImageIndex = 3;
|
||||
break;
|
||||
case PckFileType.TexturePackInfoFile:
|
||||
node.ImageIndex = 4;
|
||||
node.SelectedImageIndex = 4;
|
||||
break;
|
||||
case PckFileType.ColourTableFile:
|
||||
node.ImageIndex = 6;
|
||||
node.SelectedImageIndex = 6;
|
||||
break;
|
||||
case PckFileType.ModelsFile:
|
||||
node.ImageIndex = 8;
|
||||
node.SelectedImageIndex = 8;
|
||||
break;
|
||||
case PckFileType.SkinDataFile:
|
||||
node.ImageIndex = 7;
|
||||
node.SelectedImageIndex = 7;
|
||||
break;
|
||||
case PckFileType.GameRulesFile:
|
||||
node.ImageIndex = 9;
|
||||
node.SelectedImageIndex = 9;
|
||||
break;
|
||||
case PckFileType.GameRulesHeader:
|
||||
node.ImageIndex = 10;
|
||||
node.SelectedImageIndex = 10;
|
||||
break;
|
||||
case PckFileType.InfoFile:
|
||||
node.ImageIndex = 11;
|
||||
node.SelectedImageIndex = 11;
|
||||
break;
|
||||
case PckFileType.SkinFile:
|
||||
node.ImageIndex = 12;
|
||||
node.SelectedImageIndex = 12;
|
||||
break;
|
||||
case PckFileType.CapeFile:
|
||||
node.ImageIndex = 13;
|
||||
node.SelectedImageIndex = 13;
|
||||
break;
|
||||
case PckFileType.TextureFile:
|
||||
node.ImageIndex = 14;
|
||||
node.SelectedImageIndex = 14;
|
||||
break;
|
||||
case PckFileType.BehavioursFile:
|
||||
node.ImageIndex = 15;
|
||||
node.SelectedImageIndex = 15;
|
||||
break;
|
||||
case PckFileType.MaterialFile:
|
||||
node.ImageIndex = 16;
|
||||
node.SelectedImageIndex = 16;
|
||||
break;
|
||||
default: // unknown file format
|
||||
node.ImageIndex = 5;
|
||||
node.SelectedImageIndex = 5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
treeViewMain_DoubleClick(sender, e);
|
||||
}
|
||||
|
||||
[Obsolete] // the move functions are to eventually be removed in favor of drag and drop
|
||||
private void moveFile(int amount)
|
||||
{
|
||||
if (treeViewMain.SelectedNode is not TreeNode t || t.Tag is null) return;
|
||||
|
||||
var file = t.Tag as PckFileData;
|
||||
var path = t.FullPath;
|
||||
|
||||
// skin and cape files only
|
||||
if (!(file.Filetype == PckFileType.SkinFile || file.Filetype == PckFileType.CapeFile)) return;
|
||||
|
||||
PckFile pck = _pck;
|
||||
bool IsSubPCK = IsSubPCKNode(path);
|
||||
if (IsSubPCK)
|
||||
{
|
||||
using (var stream = new MemoryStream((GetSubPCK(path).Tag as PckFileData).Data))
|
||||
{
|
||||
var reader = new PckFileReader(LittleEndianCheckBox.Checked ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
pck = reader.FromStream(stream);
|
||||
}
|
||||
}
|
||||
|
||||
int index = pck.IndexOfFile(file);
|
||||
|
||||
if (index + amount < 0 || index + amount > pck.FileCount) return;
|
||||
pck.RemoveFile(file);
|
||||
pck.InsertFile(index + amount, file);
|
||||
|
||||
if (IsSubPCK)
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
var writer = new PckFileWriter(pck, LittleEndianCheckBox.Checked ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
writer.WriteToStream(stream);
|
||||
(GetSubPCK(path).Tag as PckFileData).SetData(stream.ToArray());
|
||||
}
|
||||
}
|
||||
BuildMainTreeView();
|
||||
_wasModified = true;
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
|
||||
22
PCK-Studio/Extensions/LocFileExtensions.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OMI.Formats.Languages;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
internal static class LocFileExtensions
|
||||
{
|
||||
|
||||
public static void InitializeDefault(this LOCFile locFile, string packName) => locFile.Initialize("en-EN", ("IDS_DISPLAY_NAME", packName));
|
||||
|
||||
public static void Initialize(this LOCFile locFile, string language, params (string, string)[] locKeyValuePairs)
|
||||
{
|
||||
locFile.AddLanguage(language);
|
||||
foreach (var locKeyValue in locKeyValuePairs)
|
||||
locFile.AddLocKey(locKeyValue.Item1, locKeyValue.Item2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,7 +237,7 @@ namespace PckStudio.Features
|
||||
currentPCK = reader.FromFile(filepath);
|
||||
if (currentPCK is null) return string.Empty;
|
||||
return currentPCK.TryGetFile("0", PckFileType.InfoFile, out var file)
|
||||
? file.Properties.GetPropertyValue("PACKID")
|
||||
? file.GetProperty("PACKID")
|
||||
: string.Empty;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
internal partial class ChangeTile : MetroForm
|
||||
{
|
||||
string selectedTile = "";
|
||||
Internal.AnimationCategory category = Internal.AnimationCategory.Blocks;
|
||||
AnimationCategory category = AnimationCategory.Blocks;
|
||||
|
||||
public string SelectedTile => selectedTile;
|
||||
public Internal.AnimationCategory Category => category;
|
||||
public AnimationCategory Category => category;
|
||||
|
||||
List<TreeNode> treeViewBlockCache = new List<TreeNode>();
|
||||
List<TreeNode> treeViewItemCache = new List<TreeNode>();
|
||||
@@ -31,8 +31,8 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
private void InitializeTreeviews()
|
||||
{
|
||||
Profiler.Start();
|
||||
GetTileDataToView(Internal.AnimationCategory.Blocks, treeViewBlocks.Nodes, treeViewBlockCache.Add);
|
||||
GetTileDataToView(Internal.AnimationCategory.Items, treeViewItems.Nodes, treeViewItemCache.Add);
|
||||
GetTileDataToView(AnimationCategory.Blocks, treeViewBlocks.Nodes, treeViewBlockCache.Add);
|
||||
GetTileDataToView(AnimationCategory.Items, treeViewItems.Nodes, treeViewItemCache.Add);
|
||||
Profiler.Stop();
|
||||
}
|
||||
|
||||
@@ -41,35 +41,34 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
if (e.Node.Tag is JsonTileInfo tileData)
|
||||
{
|
||||
selectedTile = tileData.InternalName;
|
||||
Debug.WriteLine(selectedTile);
|
||||
category = e.Node.TreeView == treeViewItems
|
||||
? Internal.AnimationCategory.Items
|
||||
: Internal.AnimationCategory.Blocks;
|
||||
? AnimationCategory.Items
|
||||
: AnimationCategory.Blocks;
|
||||
}
|
||||
}
|
||||
|
||||
private void GetTileDataToView(Internal.AnimationCategory key, TreeNodeCollection collection, Action<TreeNode> additinalAction)
|
||||
private void GetTileDataToView(AnimationCategory key, TreeNodeCollection collection, Action<TreeNode> additionalAction)
|
||||
{
|
||||
List<JsonTileInfo> textureInfos = key switch
|
||||
{
|
||||
Internal.AnimationCategory.Blocks => Tiles.BlockTileInfos,
|
||||
Internal.AnimationCategory.Items => Tiles.ItemTileInfos,
|
||||
AnimationCategory.Blocks => Tiles.BlockTileInfos,
|
||||
AnimationCategory.Items => Tiles.ItemTileInfos,
|
||||
_ => throw new InvalidOperationException(nameof(key))
|
||||
};
|
||||
Profiler.Start();
|
||||
if (textureInfos is not null)
|
||||
{
|
||||
foreach ((int i, var content) in textureInfos.enumerate())
|
||||
foreach ((int i, var tileData) in textureInfos.enumerate())
|
||||
{
|
||||
if (string.IsNullOrEmpty(content.InternalName) || collection.ContainsKey(content.InternalName))
|
||||
if (string.IsNullOrEmpty(tileData.InternalName) || collection.ContainsKey(tileData.InternalName))
|
||||
continue;
|
||||
TreeNode tileNode = new TreeNode(content.DisplayName, i, i)
|
||||
TreeNode tileNode = new TreeNode(tileData.DisplayName, i, i)
|
||||
{
|
||||
Name = content.InternalName,
|
||||
Tag = content
|
||||
Name = tileData.InternalName,
|
||||
Tag = tileData
|
||||
};
|
||||
collection.Add(tileNode);
|
||||
additinalAction(tileNode);
|
||||
additionalAction(tileNode);
|
||||
}
|
||||
}
|
||||
Profiler.Stop();
|
||||
@@ -90,7 +89,7 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
foreach (TreeNode _node in treeViewBlockCache)
|
||||
{
|
||||
if (_node.Text.ToLower().Contains(metroTextBox1.Text.ToLower()) ||
|
||||
(_node.Tag as string).ToLower().Contains(metroTextBox1.Text.ToLower()))
|
||||
(_node.Tag as JsonTileInfo).InternalName.ToLower().Contains(metroTextBox1.Text.ToLower()))
|
||||
{
|
||||
treeViewBlocks.Nodes.Add((TreeNode)_node.Clone());
|
||||
}
|
||||
@@ -98,7 +97,7 @@ namespace PckStudio.Forms.Additional_Popups.Animation
|
||||
foreach (TreeNode _node in treeViewItemCache)
|
||||
{
|
||||
if (_node.Text.ToLower().Contains(metroTextBox1.Text.ToLower()) ||
|
||||
(_node.Tag as string).ToLower().Contains(metroTextBox1.Text.ToLower()))
|
||||
(_node.Tag as JsonTileInfo).InternalName.ToLower().Contains(metroTextBox1.Text.ToLower()))
|
||||
{
|
||||
treeViewItems.Nodes.Add((TreeNode)_node.Clone());
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private string _tileName = string.Empty;
|
||||
|
||||
public string FinalPath => $"res/textures/{_animation.CategoryString}/{_tileName}.png";
|
||||
|
||||
private static readonly string[] specialTileNames = { "clock", "compass" };
|
||||
|
||||
private static bool IsSpecialTile(string name)
|
||||
@@ -72,14 +74,20 @@ namespace PckStudio.Forms.Editor
|
||||
animationPictureBox.BlendColor = blendColor;
|
||||
}
|
||||
|
||||
private void ValidateToolStrip()
|
||||
{
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled =
|
||||
importToolStripMenuItem.Enabled =
|
||||
exportAsToolStripMenuItem.Enabled =
|
||||
changeTileToolStripMenuItem.Enabled =
|
||||
InterpolationCheckbox.Visible = !IsSpecialTile(_tileName);
|
||||
}
|
||||
|
||||
private void AnimationEditor_Load(object sender, EventArgs e)
|
||||
{
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled =
|
||||
importToolStripMenuItem.Enabled =
|
||||
exportAsToolStripMenuItem.Enabled =
|
||||
InterpolationCheckbox.Visible = !IsSpecialTile(_tileName);
|
||||
ValidateToolStrip();
|
||||
|
||||
SetTileLabel();
|
||||
SetTileLabel();
|
||||
LoadAnimationTreeView();
|
||||
}
|
||||
|
||||
@@ -124,12 +132,17 @@ namespace PckStudio.Forms.Editor
|
||||
animationPictureBox.SelectFrame(_animation, frameTreeView.SelectedNode.Index);
|
||||
}
|
||||
|
||||
private void StopAnimation()
|
||||
{
|
||||
animationPictureBox.Stop();
|
||||
AnimationStartStopBtn.Text = "Play Animation";
|
||||
}
|
||||
|
||||
private void AnimationStartStopBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (animationPictureBox.IsPlaying)
|
||||
{
|
||||
animationPictureBox.Stop();
|
||||
AnimationStartStopBtn.Text = "Play Animation";
|
||||
StopAnimation();
|
||||
return;
|
||||
}
|
||||
if (_animation.FrameCount > 1)
|
||||
@@ -157,7 +170,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void saveToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsSpecialTile(_tileName) && _animation is not null)
|
||||
if (!IsSpecialTile(_tileName) && _animation is not null && _animation.FrameCount > 0)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
return;
|
||||
@@ -337,19 +350,17 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void changeTileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
StopAnimation();
|
||||
using (ChangeTile diag = new ChangeTile())
|
||||
{
|
||||
if (diag.ShowDialog(this) != DialogResult.OK)
|
||||
return;
|
||||
|
||||
Debug.WriteLine(diag.SelectedTile);
|
||||
Debug.WriteLine($"{diag.SelectedTile}");
|
||||
_animation.Category = diag.Category;
|
||||
_tileName = diag.SelectedTile;
|
||||
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled =
|
||||
importToolStripMenuItem.Enabled =
|
||||
exportAsToolStripMenuItem.Enabled =
|
||||
InterpolationCheckbox.Visible = !IsSpecialTile(_tileName);
|
||||
ValidateToolStrip();
|
||||
|
||||
SetTileLabel();
|
||||
}
|
||||
@@ -364,19 +375,6 @@ namespace PckStudio.Forms.Editor
|
||||
_ => throw new ArgumentOutOfRangeException(_animation.Category.ToString())
|
||||
};
|
||||
tileLabel.Text = textureInfos.FirstOrDefault(p => p.InternalName == _tileName)?.DisplayName ?? _tileName;
|
||||
|
||||
//switch (MessageBox.Show(this,
|
||||
// $"{TileName} is not a valid tile for animation, and will not play in game. Would you like to choose a new tile?",
|
||||
// "Not a valid tile",
|
||||
// MessageBoxButtons.YesNo))
|
||||
//{
|
||||
// case DialogResult.Yes:
|
||||
// changeTileToolStripMenuItem_Click(null, EventArgs.Empty);
|
||||
// break;
|
||||
// default:
|
||||
// DialogResult = DialogResult.Abort;
|
||||
// break;
|
||||
//}
|
||||
}
|
||||
|
||||
private void exportJavaAnimationToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
@@ -454,6 +452,8 @@ namespace PckStudio.Forms.Editor
|
||||
return;
|
||||
}
|
||||
|
||||
var oldResolution = _animation.BuildTexture().Width;
|
||||
|
||||
FrameDimension dimension = new FrameDimension(gif.FrameDimensionsList[0]);
|
||||
int frameCount = gif.GetFrameCount(dimension);
|
||||
|
||||
@@ -462,9 +462,15 @@ namespace PckStudio.Forms.Editor
|
||||
for (int i = 0; i < frameCount; i++)
|
||||
{
|
||||
gif.SelectActiveFrame(dimension, i);
|
||||
textures.Add(new Bitmap(gif));
|
||||
|
||||
textures.Add(new Bitmap(gif, oldResolution, oldResolution));
|
||||
}
|
||||
|
||||
var animCat = _animation.Category;
|
||||
|
||||
_animation = new Animation(textures, string.Empty);
|
||||
_animation.Interpolate = InterpolationCheckbox.Checked;
|
||||
_animation.Category = animCat;
|
||||
LoadAnimationTreeView();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
**/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
@@ -272,7 +271,7 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
try
|
||||
{
|
||||
_pckfile?.SetData(new GameRuleFileWriter(_file, compressionLevel, compressionType));
|
||||
_pckfile?.SetData(new GameRuleFileWriter(_file));
|
||||
DialogResult = DialogResult.OK;
|
||||
MessageBox.Show("Saved!");
|
||||
}
|
||||
|
||||
13
PCK-Studio/Forms/Editor/MaterialsEditor.Designer.cs
generated
@@ -54,12 +54,11 @@
|
||||
this.treeView1.Location = new System.Drawing.Point(20, 84);
|
||||
this.treeView1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.treeView1.Name = "treeView1";
|
||||
this.treeView1.Size = new System.Drawing.Size(136, 176);
|
||||
this.treeView1.Size = new System.Drawing.Size(246, 234);
|
||||
this.treeView1.TabIndex = 13;
|
||||
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
|
||||
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
|
||||
this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown);
|
||||
this.treeView1.MouseHover += new System.EventHandler(this.treeView1_MouseHover);
|
||||
//
|
||||
// metroContextMenu1
|
||||
//
|
||||
@@ -92,7 +91,7 @@
|
||||
this.helpToolStripMenuItem});
|
||||
this.menuStrip.Location = new System.Drawing.Point(20, 60);
|
||||
this.menuStrip.Name = "menuStrip";
|
||||
this.menuStrip.Size = new System.Drawing.Size(348, 24);
|
||||
this.menuStrip.Size = new System.Drawing.Size(246, 24);
|
||||
this.menuStrip.TabIndex = 14;
|
||||
this.menuStrip.Text = "menuStrip1";
|
||||
//
|
||||
@@ -123,7 +122,7 @@
|
||||
// xLabel
|
||||
//
|
||||
this.xLabel.AutoSize = true;
|
||||
this.xLabel.Location = new System.Drawing.Point(159, 147);
|
||||
this.xLabel.Location = new System.Drawing.Point(98, 325);
|
||||
this.xLabel.Name = "xLabel";
|
||||
this.xLabel.Size = new System.Drawing.Size(91, 19);
|
||||
this.xLabel.TabIndex = 30;
|
||||
@@ -141,9 +140,9 @@
|
||||
"entity_emissive_alpha_only",
|
||||
"entity_alphatest_change_color",
|
||||
"entity_change_color"});
|
||||
this.materialComboBox.Location = new System.Drawing.Point(159, 169);
|
||||
this.materialComboBox.Location = new System.Drawing.Point(20, 347);
|
||||
this.materialComboBox.Name = "materialComboBox";
|
||||
this.materialComboBox.Size = new System.Drawing.Size(209, 29);
|
||||
this.materialComboBox.Size = new System.Drawing.Size(246, 29);
|
||||
this.materialComboBox.TabIndex = 31;
|
||||
this.materialComboBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.materialComboBox.UseSelectable = true;
|
||||
@@ -153,7 +152,7 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(388, 280);
|
||||
this.ClientSize = new System.Drawing.Size(286, 399);
|
||||
this.Controls.Add(this.materialComboBox);
|
||||
this.Controls.Add(this.xLabel);
|
||||
this.Controls.Add(this.menuStrip);
|
||||
|
||||
@@ -23,6 +23,11 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private readonly JObject EntityJSONData = JObject.Parse(Properties.Resources.entityData);
|
||||
|
||||
private bool showInvalidEntries;
|
||||
|
||||
//Holds invalid entries so they can be added back to the material file on save should the user decide to hide them
|
||||
List<MaterialContainer.Material> hiddenInvalidEntries = new List<MaterialContainer.Material>();
|
||||
|
||||
void SetUpTree()
|
||||
{
|
||||
treeView1.BeginUpdate();
|
||||
@@ -31,6 +36,8 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
TreeNode EntryNode = new TreeNode(entry.Name);
|
||||
|
||||
EntryNode.ImageIndex = -1;
|
||||
|
||||
foreach (JObject content in EntityJSONData["materials"].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == entry.Name);
|
||||
@@ -38,13 +45,27 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
EntryNode.Text = (string)prop.Value;
|
||||
EntryNode.ImageIndex = EntityJSONData["materials"].Children().ToList().IndexOf(content);
|
||||
EntryNode.SelectedImageIndex = EntryNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
EntryNode.Tag = entry;
|
||||
|
||||
// check for invalid material entry
|
||||
if (EntryNode.ImageIndex == -1)
|
||||
{
|
||||
EntryNode.ImageIndex = 127; // icon for invalid entry
|
||||
EntryNode.Text += " (Invalid)";
|
||||
|
||||
if (!showInvalidEntries)
|
||||
{
|
||||
hiddenInvalidEntries.Add(entry);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
EntryNode.SelectedImageIndex = EntryNode.ImageIndex;
|
||||
|
||||
treeView1.Nodes.Add(EntryNode);
|
||||
}
|
||||
treeView1.EndUpdate();
|
||||
@@ -58,13 +79,20 @@ namespace PckStudio.Forms.Editor
|
||||
using (var stream = new MemoryStream(file.Data))
|
||||
{
|
||||
var reader = new MaterialFileReader();
|
||||
materialFile = reader.FromStream(stream);
|
||||
}
|
||||
materialFile = reader.FromStream(stream);
|
||||
|
||||
treeView1.ImageList = new ImageList();
|
||||
ApplicationScope.EntityImages.ToList().ForEach(treeView1.ImageList.Images.Add);
|
||||
treeView1.ImageList.ColorDepth = ColorDepth.Depth32Bit;
|
||||
SetUpTree();
|
||||
if (materialFile.hasInvalidEntries())
|
||||
{
|
||||
DialogResult dr = MessageBox.Show(this, "Unsupported entities were found in this file. Would you like to display them?", "Invalid data found", MessageBoxButtons.YesNo);
|
||||
|
||||
showInvalidEntries = dr == DialogResult.Yes;
|
||||
}
|
||||
|
||||
treeView1.ImageList = new ImageList();
|
||||
ApplicationScope.EntityImages.ToList().ForEach(treeView1.ImageList.Images.Add);
|
||||
treeView1.ImageList.ColorDepth = ColorDepth.Depth32Bit;
|
||||
SetUpTree();
|
||||
}
|
||||
}
|
||||
|
||||
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
@@ -93,26 +121,11 @@ namespace PckStudio.Forms.Editor
|
||||
materialComboBox.Enabled = false;
|
||||
}
|
||||
|
||||
private void addNewPositionOverrideToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void addNewEntryToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void treeView1_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Delete) removeToolStripMenuItem_Click(sender, e);
|
||||
}
|
||||
|
||||
private void treeView1_MouseHover(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void saveToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
materialFile = new MaterialContainer();
|
||||
@@ -125,6 +138,11 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
}
|
||||
|
||||
foreach (MaterialContainer.Material mat in hiddenInvalidEntries)
|
||||
{
|
||||
materialFile.Add(mat);
|
||||
}
|
||||
|
||||
_file.SetData(new MaterialFileWriter(materialFile));
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
@@ -158,8 +176,6 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
}
|
||||
treeView1.Nodes.Add(NewEntryNode);
|
||||
|
||||
addNewPositionOverrideToolStripMenuItem_Click(sender, e); // adds a Position Override to the new Override
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -127,11 +127,11 @@
|
||||
<data name="saveToolStripMenuItem1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAADfSURBVDhPYxg8
|
||||
QLt++3yTGbf/Fm599P/Nh49wfPXxq/+rTt37f+Dak/8gOSBgAGEMANIMxGBFyAasPf/0v8GE8//z1t8C
|
||||
y4HU4DIALIluwLpLL+HiMANAGKoNAWASCavv/n/57gPcgOvP3oENOXj7NViOoAFGU6791+k4ghWD5Aga
|
||||
QCyGakMAkODcU89R/I8Ng9TgNADk14dPn/8/c+kqVgySgwUqVBsCwAx49urN/zsPHmPFIDmaGvAXJInN
|
||||
38gYasBfqDYE0K7dOn/Wvut/sfkdGYPUgJI9VNuAAwYGAGn6yvdevWgPAAAAAElFTkSuQmCC
|
||||
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAADdSURBVDhPzZJB
|
||||
CoJQEIa9jy0iPFAnCDpAtG3ZooUE4b6oVtIuClpJIAgqZEVlKpqEHUAm5pGPmhTbRA18G//5P5iHgvA3
|
||||
I7ZniiQ7aVM9QZzcOKYbwVDbw8I6A2YAICBvg2VJdtjSs2Cse1Dt6tCYbliGO0UCFlLBxAj590yA0D4X
|
||||
1Ec7CK8JF9j+lUmWzoVlpYJaz4JKZ5ULZqWCT6F9Jhhowcv9eeBOoQBvPXoBrA0zF8yyR6V9LvCjGLYH
|
||||
NxfMvipIMaQ3Ux6ClPYFsaUq/bmd0rspuIO/Pe3/bu5p+sr3gTvFEQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
|
||||
214
PCK-Studio/Forms/Editor/TextureAtlasEditor.Designer.cs
generated
@@ -29,11 +29,10 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TextureAtlasEditor));
|
||||
this.variantLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.internalTileNameLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.extractTileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.applyColorMaskToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.playAnimationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -41,8 +40,13 @@
|
||||
this.originalPictureBox = new PckStudio.ToolboxItems.InterpolationPictureBox();
|
||||
this.selectTilePictureBox = new PckStudio.ToolboxItems.AnimationPictureBox();
|
||||
this.replaceButton = new MetroFramework.Controls.MetroButton();
|
||||
this.animationButton = new MetroFramework.Controls.MetroButton();
|
||||
this.tileNameLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.setColorButton = new MetroFramework.Controls.MetroButton();
|
||||
this.animationButton = new MetroFramework.Controls.MetroButton();
|
||||
this.clearColorButton = new MetroFramework.Controls.MetroButton();
|
||||
this.extractButton = new MetroFramework.Controls.MetroButton();
|
||||
this.colorSlider = new MetroFramework.Controls.MetroTrackBar();
|
||||
this.colorSliderLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.variantComboBox = new MetroFramework.Controls.MetroComboBox();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
@@ -50,19 +54,20 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.selectTilePictureBox)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// variantLabel
|
||||
// internalTileNameLabel
|
||||
//
|
||||
this.variantLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
this.internalTileNameLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.variantLabel.AutoSize = true;
|
||||
this.variantLabel.Location = new System.Drawing.Point(3, 254);
|
||||
this.variantLabel.Name = "variantLabel";
|
||||
this.variantLabel.Size = new System.Drawing.Size(82, 28);
|
||||
this.variantLabel.TabIndex = 18;
|
||||
this.variantLabel.Text = "Variant:";
|
||||
this.variantLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.variantLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.internalTileNameLabel, 2);
|
||||
this.internalTileNameLabel.FontSize = MetroFramework.MetroLabelSize.Small;
|
||||
this.internalTileNameLabel.Location = new System.Drawing.Point(3, 281);
|
||||
this.internalTileNameLabel.Name = "internalTileNameLabel";
|
||||
this.internalTileNameLabel.Size = new System.Drawing.Size(208, 15);
|
||||
this.internalTileNameLabel.TabIndex = 18;
|
||||
this.internalTileNameLabel.Text = "InternalTileName";
|
||||
this.internalTileNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.internalTileNameLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.internalTileNameLabel.WrapToLine = true;
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
@@ -80,8 +85,7 @@
|
||||
//
|
||||
this.fileToolStripMenuItem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.saveToolStripMenuItem,
|
||||
this.extractTileToolStripMenuItem});
|
||||
this.saveToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.ForeColor = System.Drawing.SystemColors.Menu;
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
@@ -90,17 +94,10 @@
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(98, 22);
|
||||
this.saveToolStripMenuItem.Text = "Save";
|
||||
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
|
||||
//
|
||||
// extractTileToolStripMenuItem
|
||||
//
|
||||
this.extractTileToolStripMenuItem.Name = "extractTileToolStripMenuItem";
|
||||
this.extractTileToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
|
||||
this.extractTileToolStripMenuItem.Text = "Extract Tile";
|
||||
this.extractTileToolStripMenuItem.Click += new System.EventHandler(this.extractTileToolStripMenuItem_Click);
|
||||
//
|
||||
// viewToolStripMenuItem
|
||||
//
|
||||
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@@ -136,38 +133,49 @@
|
||||
this.tableLayoutPanel1.AutoSize = true;
|
||||
this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.tableLayoutPanel1.ColumnCount = 3;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 60F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10.43842F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 26.09603F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 63.46555F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.originalPictureBox, 2, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.selectTilePictureBox, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.replaceButton, 0, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.animationButton, 0, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.replaceButton, 0, 8);
|
||||
this.tableLayoutPanel1.Controls.Add(this.tileNameLabel, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.variantComboBox, 1, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.variantLabel, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.setColorButton, 0, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.animationButton, 1, 8);
|
||||
this.tableLayoutPanel1.Controls.Add(this.clearColorButton, 1, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.extractButton, 0, 7);
|
||||
this.tableLayoutPanel1.Controls.Add(this.colorSlider, 1, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.colorSliderLabel, 0, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.variantComboBox, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.internalTileNameLabel, 0, 2);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(20, 84);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 6;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 42.82212F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.938088F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.943623F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.943623F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.943623F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5.352765F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5.350623F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5.352765F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5.352765F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(590, 565);
|
||||
this.tableLayoutPanel1.TabIndex = 17;
|
||||
//
|
||||
// originalPictureBox
|
||||
//
|
||||
this.originalPictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.originalPictureBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.originalPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.originalPictureBox.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
|
||||
this.originalPictureBox.Location = new System.Drawing.Point(238, 3);
|
||||
this.originalPictureBox.Location = new System.Drawing.Point(217, 3);
|
||||
this.originalPictureBox.Name = "originalPictureBox";
|
||||
this.tableLayoutPanel1.SetRowSpan(this.originalPictureBox, 6);
|
||||
this.originalPictureBox.Size = new System.Drawing.Size(349, 559);
|
||||
this.tableLayoutPanel1.SetRowSpan(this.originalPictureBox, 9);
|
||||
this.originalPictureBox.Size = new System.Drawing.Size(370, 535);
|
||||
this.originalPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.originalPictureBox.TabIndex = 4;
|
||||
this.originalPictureBox.TabStop = false;
|
||||
@@ -186,7 +194,7 @@
|
||||
this.selectTilePictureBox.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
|
||||
this.selectTilePictureBox.Location = new System.Drawing.Point(3, 3);
|
||||
this.selectTilePictureBox.Name = "selectTilePictureBox";
|
||||
this.selectTilePictureBox.Size = new System.Drawing.Size(229, 220);
|
||||
this.selectTilePictureBox.Size = new System.Drawing.Size(208, 227);
|
||||
this.selectTilePictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.selectTilePictureBox.TabIndex = 0;
|
||||
this.selectTilePictureBox.TabStop = false;
|
||||
@@ -198,53 +206,131 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.replaceButton.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.replaceButton, 2);
|
||||
this.replaceButton.Location = new System.Drawing.Point(3, 539);
|
||||
this.replaceButton.Location = new System.Drawing.Point(3, 515);
|
||||
this.replaceButton.Name = "replaceButton";
|
||||
this.replaceButton.Size = new System.Drawing.Size(229, 23);
|
||||
this.replaceButton.Size = new System.Drawing.Size(208, 23);
|
||||
this.replaceButton.TabIndex = 14;
|
||||
this.replaceButton.Text = "Replace";
|
||||
this.replaceButton.Text = "Replace Tile on Atlas";
|
||||
this.replaceButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.replaceButton.UseSelectable = true;
|
||||
this.replaceButton.Click += new System.EventHandler(this.replaceButton_Click);
|
||||
//
|
||||
// tileNameLabel
|
||||
//
|
||||
this.tileNameLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.tileNameLabel, 2);
|
||||
this.tileNameLabel.Location = new System.Drawing.Point(3, 233);
|
||||
this.tileNameLabel.Name = "tileNameLabel";
|
||||
this.tileNameLabel.Size = new System.Drawing.Size(208, 48);
|
||||
this.tileNameLabel.TabIndex = 19;
|
||||
this.tileNameLabel.Text = "TileName";
|
||||
this.tileNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.tileNameLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.tileNameLabel.WrapToLine = true;
|
||||
//
|
||||
// setColorButton
|
||||
//
|
||||
this.setColorButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.setColorButton, 2);
|
||||
this.setColorButton.Location = new System.Drawing.Point(3, 434);
|
||||
this.setColorButton.Name = "setColorButton";
|
||||
this.setColorButton.Size = new System.Drawing.Size(208, 17);
|
||||
this.setColorButton.TabIndex = 25;
|
||||
this.setColorButton.Text = "Set Custom Colour";
|
||||
this.setColorButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.setColorButton.UseSelectable = true;
|
||||
this.setColorButton.Click += new System.EventHandler(this.setColorButton_Click);
|
||||
//
|
||||
// animationButton
|
||||
//
|
||||
this.animationButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.animationButton.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.animationButton, 2);
|
||||
this.animationButton.Location = new System.Drawing.Point(3, 511);
|
||||
this.animationButton.Location = new System.Drawing.Point(3, 544);
|
||||
this.animationButton.Name = "animationButton";
|
||||
this.animationButton.Size = new System.Drawing.Size(229, 22);
|
||||
this.animationButton.Size = new System.Drawing.Size(208, 18);
|
||||
this.animationButton.TabIndex = 16;
|
||||
this.animationButton.Text = "Animation";
|
||||
this.animationButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.animationButton.UseSelectable = true;
|
||||
this.animationButton.Click += new System.EventHandler(this.animationButton_Click);
|
||||
//
|
||||
// tileNameLabel
|
||||
// clearColorButton
|
||||
//
|
||||
this.tileNameLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.clearColorButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tileNameLabel.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.tileNameLabel, 2);
|
||||
this.tileNameLabel.Location = new System.Drawing.Point(3, 235);
|
||||
this.tileNameLabel.Name = "tileNameLabel";
|
||||
this.tileNameLabel.Size = new System.Drawing.Size(229, 19);
|
||||
this.tileNameLabel.TabIndex = 19;
|
||||
this.tileNameLabel.Text = "TileName";
|
||||
this.tileNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.tileNameLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.clearColorButton.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.clearColorButton, 2);
|
||||
this.clearColorButton.Location = new System.Drawing.Point(3, 457);
|
||||
this.clearColorButton.Name = "clearColorButton";
|
||||
this.clearColorButton.Size = new System.Drawing.Size(208, 23);
|
||||
this.clearColorButton.TabIndex = 24;
|
||||
this.clearColorButton.Text = "Clear Custom Colour";
|
||||
this.clearColorButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.clearColorButton.UseSelectable = true;
|
||||
this.clearColorButton.Click += new System.EventHandler(this.clearColorButton_Click);
|
||||
//
|
||||
// extractButton
|
||||
//
|
||||
this.extractButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.extractButton.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.extractButton, 2);
|
||||
this.extractButton.Location = new System.Drawing.Point(3, 486);
|
||||
this.extractButton.Name = "extractButton";
|
||||
this.extractButton.Size = new System.Drawing.Size(208, 23);
|
||||
this.extractButton.TabIndex = 27;
|
||||
this.extractButton.Text = "Extract Tile from Atlas";
|
||||
this.extractButton.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.extractButton.UseSelectable = true;
|
||||
this.extractButton.Click += new System.EventHandler(this.extractTileToolStripMenuItem_Click);
|
||||
//
|
||||
// colorSlider
|
||||
//
|
||||
this.colorSlider.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
|
||||
this.colorSlider.BackColor = System.Drawing.Color.Transparent;
|
||||
this.colorSlider.Location = new System.Drawing.Point(64, 380);
|
||||
this.colorSlider.Maximum = 255;
|
||||
this.colorSlider.Name = "colorSlider";
|
||||
this.colorSlider.Size = new System.Drawing.Size(147, 42);
|
||||
this.colorSlider.TabIndex = 26;
|
||||
this.colorSlider.Text = "metroTrackBar1";
|
||||
this.colorSlider.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.colorSlider.Value = 255;
|
||||
this.colorSlider.Visible = false;
|
||||
this.colorSlider.ValueChanged += new System.EventHandler(this.colorSlider_ValueChanged);
|
||||
//
|
||||
// colorSliderLabel
|
||||
//
|
||||
this.colorSliderLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.colorSliderLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.colorSliderLabel.FontSize = MetroFramework.MetroLabelSize.Small;
|
||||
this.colorSliderLabel.Location = new System.Drawing.Point(3, 377);
|
||||
this.colorSliderLabel.Name = "colorSliderLabel";
|
||||
this.colorSliderLabel.Size = new System.Drawing.Size(55, 48);
|
||||
this.colorSliderLabel.TabIndex = 19;
|
||||
this.colorSliderLabel.Text = "Color Value:";
|
||||
this.colorSliderLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.colorSliderLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.colorSliderLabel.Visible = false;
|
||||
this.colorSliderLabel.WrapToLine = true;
|
||||
//
|
||||
// variantComboBox
|
||||
//
|
||||
this.variantComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.variantComboBox, 2);
|
||||
this.variantComboBox.Enabled = false;
|
||||
this.variantComboBox.FormattingEnabled = true;
|
||||
this.variantComboBox.ItemHeight = 23;
|
||||
this.variantComboBox.Location = new System.Drawing.Point(91, 257);
|
||||
this.variantComboBox.Location = new System.Drawing.Point(3, 338);
|
||||
this.variantComboBox.Name = "variantComboBox";
|
||||
this.variantComboBox.Size = new System.Drawing.Size(141, 29);
|
||||
this.variantComboBox.Size = new System.Drawing.Size(208, 29);
|
||||
this.variantComboBox.TabIndex = 17;
|
||||
this.variantComboBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.variantComboBox.UseSelectable = true;
|
||||
@@ -287,12 +373,16 @@
|
||||
private PckStudio.ToolboxItems.InterpolationPictureBox originalPictureBox;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
|
||||
private MetroFramework.Controls.MetroButton animationButton;
|
||||
private System.Windows.Forms.ToolStripMenuItem extractTileToolStripMenuItem;
|
||||
private MetroFramework.Controls.MetroComboBox variantComboBox;
|
||||
private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem applyColorMaskToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem playAnimationsToolStripMenuItem;
|
||||
private MetroFramework.Controls.MetroLabel tileNameLabel;
|
||||
private MetroFramework.Controls.MetroLabel variantLabel;
|
||||
private MetroFramework.Controls.MetroLabel internalTileNameLabel;
|
||||
private MetroFramework.Controls.MetroButton clearColorButton;
|
||||
private MetroFramework.Controls.MetroButton setColorButton;
|
||||
private MetroFramework.Controls.MetroTrackBar colorSlider;
|
||||
private MetroFramework.Controls.MetroLabel colorSliderLabel;
|
||||
private MetroFramework.Controls.MetroButton extractButton;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2023-present miku-666
|
||||
/* Copyright (c) 2023-present miku-666, MattNL
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
@@ -37,13 +37,14 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
internal partial class TextureAtlasEditor : MetroForm
|
||||
{
|
||||
private Image _workingTexture;
|
||||
public Image FinalTexture
|
||||
{
|
||||
get
|
||||
{
|
||||
if (DialogResult != DialogResult.OK)
|
||||
return null;
|
||||
return (Image)originalPictureBox.Image.Clone();
|
||||
return _workingTexture;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +57,8 @@ namespace PckStudio.Forms.Editor
|
||||
private readonly List<AtlasTile> _tiles;
|
||||
|
||||
private AtlasTile _selectedTile;
|
||||
// the "parent" tile for tiles that share name; i.e. parts of water_flow
|
||||
private AtlasTile dataTile;
|
||||
private sealed class AtlasTile
|
||||
{
|
||||
internal readonly int Index;
|
||||
@@ -74,7 +77,17 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private int SelectedIndex
|
||||
{
|
||||
set => SetImageDisplayed(value);
|
||||
set {
|
||||
if (value < 0)
|
||||
{
|
||||
value = _tiles.Count + value;
|
||||
}
|
||||
else if (value >= _tiles.Count)
|
||||
{
|
||||
value = value - _tiles.Count;
|
||||
}
|
||||
SetImageDisplayed(value);
|
||||
}
|
||||
}
|
||||
|
||||
private const ImageLayoutDirection _imageLayout = ImageLayoutDirection.Horizontal;
|
||||
@@ -84,6 +97,9 @@ namespace PckStudio.Forms.Editor
|
||||
InitializeComponent();
|
||||
|
||||
AcquireColorTable(pckFile);
|
||||
|
||||
_workingTexture = atlas;
|
||||
|
||||
_areaSize = areaSize;
|
||||
_pckFile = pckFile;
|
||||
_rowCount = atlas.Width / areaSize.Width;
|
||||
@@ -92,17 +108,61 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
"terrain" => (Tiles.BlockTileInfos, "blocks"),
|
||||
"items" => (Tiles.ItemTileInfos, "items"),
|
||||
"particles" => (Tiles.ParticleTileInfos, "particles"),
|
||||
"mapicons" => (Tiles.MapIconTileInfos, "map_icons"),
|
||||
"additionalmapicons" => (Tiles.AdditionalMapIconTileInfos, "additional_map_icons"),
|
||||
"moon_phases" => (Tiles.MoonPhaseTileInfos, "moon_phases"),
|
||||
"xporb" => (Tiles.ExperienceOrbTileInfos, "experience_orbs"),
|
||||
"explosion" => (Tiles.ExplosionTileInfos, "explosions"),
|
||||
"kz" => (Tiles.PaintingTileInfos, "paintings"),
|
||||
"Banner_Atlas" => (Tiles.BannerTileInfos, "banners"),
|
||||
_ => (null, null),
|
||||
};
|
||||
originalPictureBox.Image = atlas;
|
||||
|
||||
originalPictureBox.Image = atlas.GetArea(new Rectangle(0, 0, atlas.Width, atlas.Height));
|
||||
|
||||
var images = atlas.Split(_areaSize, _imageLayout);
|
||||
|
||||
var tiles = images.enumerate().Select(
|
||||
p => new AtlasTile(p.index, GetAtlasArea(p.index, _rowCount, _columnCount, _areaSize, _imageLayout), tileInfos.IndexInRange(p.index) ? tileInfos[p.index] : null, p.value)
|
||||
p => new AtlasTile(
|
||||
p.index,
|
||||
|
||||
GetAtlasArea(
|
||||
p.index,
|
||||
tileInfos.IndexInRange(p.index)
|
||||
? tileInfos[p.index].Width : 1,
|
||||
tileInfos.IndexInRange(p.index)
|
||||
? tileInfos[p.index].Height : 1,
|
||||
_rowCount,
|
||||
_columnCount,
|
||||
_areaSize,
|
||||
_imageLayout),
|
||||
|
||||
tileInfos.IndexInRange(p.index)
|
||||
? tileInfos[p.index] : null,
|
||||
|
||||
// get texture for tiles that are not 1x1 tiles
|
||||
tileInfos.IndexInRange(p.index)
|
||||
? atlas.GetArea(
|
||||
new Rectangle(
|
||||
GetSelectedPoint(p.index, _rowCount, _columnCount, _imageLayout).X * _areaSize.Width,
|
||||
GetSelectedPoint(p.index, _rowCount, _columnCount, _imageLayout).Y * _areaSize.Height,
|
||||
tileInfos[p.index].Width * _areaSize.Width,
|
||||
tileInfos[p.index].Height * _areaSize.Height))
|
||||
: p.value)
|
||||
);
|
||||
_tiles = new List<AtlasTile>(tiles);
|
||||
|
||||
SelectedIndex = 0;
|
||||
|
||||
bool isParticles = _atlasType == "particles";
|
||||
|
||||
// this is directly based on Java's source code for handling enchanted hits
|
||||
// the particle is assigned a random grayscale color between roughly 154 and 230
|
||||
// since critical hit is the only particle with this distinction, we just need to check the atlas type
|
||||
colorSlider.Maximum = isParticles ? 230 : 255;
|
||||
colorSlider.Minimum = isParticles ? 154 : 0;
|
||||
colorSlider.Value = isParticles ? colorSlider.Maximum : colorSlider.Minimum;
|
||||
}
|
||||
|
||||
private bool AcquireColorTable(PckFile pckFile)
|
||||
@@ -119,11 +179,37 @@ namespace PckStudio.Forms.Editor
|
||||
return false;
|
||||
}
|
||||
|
||||
private void UpdateAtlasDisplay()
|
||||
{
|
||||
var graphicsConfig = new GraphicsConfig()
|
||||
{
|
||||
InterpolationMode = selectTilePictureBox.InterpolationMode,
|
||||
PixelOffsetMode = PixelOffsetMode.HighQuality
|
||||
};
|
||||
using (var g = Graphics.FromImage(originalPictureBox.Image))
|
||||
{
|
||||
g.ApplyConfig(graphicsConfig);
|
||||
g.Clear(Color.Transparent);
|
||||
g.DrawImage(_workingTexture, 0, 0, _workingTexture.Width, _workingTexture.Height);
|
||||
|
||||
SolidBrush brush = new SolidBrush(Color.FromArgb(127, 255, 255, 255));
|
||||
|
||||
var rect = new Rectangle(_selectedTile.Area.X, _selectedTile.Area.Y,
|
||||
_areaSize.Width, _areaSize.Height);
|
||||
|
||||
g.FillRectangle(brush, rect);
|
||||
}
|
||||
|
||||
originalPictureBox.Invalidate();
|
||||
}
|
||||
|
||||
private void SetImageDisplayed(int index)
|
||||
{
|
||||
tileNameLabel.Text = string.Empty;
|
||||
|
||||
variantLabel.Visible = false;
|
||||
internalTileNameLabel.Text = string.Empty;
|
||||
|
||||
colorSlider.Visible = false;
|
||||
colorSliderLabel.Visible = false;
|
||||
variantComboBox.Visible = false;
|
||||
variantComboBox.Items.Clear();
|
||||
variantComboBox.SelectedItem = null;
|
||||
@@ -137,37 +223,58 @@ namespace PckStudio.Forms.Editor
|
||||
if (_tiles is null || !_tiles.IndexInRange(index) || (_selectedTile = _tiles[index]) is null)
|
||||
return;
|
||||
|
||||
if(string.IsNullOrEmpty(_selectedTile.Tile.DisplayName))
|
||||
{
|
||||
// changes the selected tile to the base flowing tile (carries all properties over) - Matt
|
||||
_selectedTile = _tiles.Find(t => t.Tile.InternalName == _selectedTile.Tile.InternalName);
|
||||
}
|
||||
dataTile = _selectedTile;
|
||||
|
||||
tileNameLabel.Text = $"{_selectedTile.Tile.DisplayName}";
|
||||
UpdateAtlasDisplay();
|
||||
|
||||
if (string.IsNullOrEmpty(dataTile.Tile.DisplayName) && !string.IsNullOrEmpty(dataTile.Tile.InternalName))
|
||||
{
|
||||
dataTile = _tiles.Find(t => t.Tile.InternalName == _selectedTile.Tile.InternalName);
|
||||
}
|
||||
|
||||
selectTilePictureBox.Image = dataTile.Texture;
|
||||
tileNameLabel.Text = $"{dataTile.Tile.DisplayName}";
|
||||
internalTileNameLabel.Text = $"{dataTile.Tile.InternalName}";
|
||||
selectTilePictureBox.BlendColor = GetBlendColor();
|
||||
selectTilePictureBox.UseBlendColor = applyColorMaskToolStripMenuItem.Checked;
|
||||
|
||||
bool hasAnimation =
|
||||
_pckFile.TryGetValue($"res/textures/{_atlasType}/{_selectedTile.Tile.InternalName}.png", PckFileType.TextureFile, out var animationFile);
|
||||
animationButton.Text = hasAnimation ? "Edit Animation" : "Create Animation";
|
||||
replaceButton.Enabled = !hasAnimation;
|
||||
|
||||
if (playAnimationsToolStripMenuItem.Checked &&
|
||||
hasAnimation &&
|
||||
animationFile.Size > 0)
|
||||
if (animationButton.Enabled = _atlasType == "blocks" || _atlasType == "items")
|
||||
{
|
||||
var animation = AnimationHelper.GetAnimationFromFile(animationFile);
|
||||
selectTilePictureBox.Start(animation);
|
||||
return;
|
||||
bool hasAnimation =
|
||||
_pckFile.TryGetValue($"res/textures/{_atlasType}/{dataTile.Tile.InternalName}.png", PckFileType.TextureFile, out var animationFile);
|
||||
animationButton.Text = hasAnimation ? "Edit Animation" : "Create Animation";
|
||||
|
||||
if (playAnimationsToolStripMenuItem.Checked &&
|
||||
hasAnimation &&
|
||||
animationFile.Size > 0)
|
||||
{
|
||||
var animation = AnimationHelper.GetAnimationFromFile(animationFile);
|
||||
selectTilePictureBox.Start(animation);
|
||||
}
|
||||
}
|
||||
|
||||
if (variantComboBox.Enabled = variantLabel.Visible = variantComboBox.Visible = _selectedTile.Tile.HasColourEntry && _selectedTile.Tile.ColourEntry.Variants.Length > 1)
|
||||
if (setColorButton.Enabled = clearColorButton.Enabled = dataTile.Tile.HasColourEntry)
|
||||
{
|
||||
variantComboBox.Items.AddRange(_selectedTile.Tile.ColourEntry.Variants);
|
||||
variantComboBox.SelectedItem = _selectedTile.Tile.ColourEntry.DefaultName;
|
||||
setColorButton.Enabled = clearColorButton.Enabled = dataTile.Tile.ColourEntry.HasCustomColour;
|
||||
clearColorButton.Enabled = false;
|
||||
|
||||
variantComboBox.Enabled = variantComboBox.Visible = dataTile.Tile.ColourEntry.Variants.Length > 1;
|
||||
|
||||
if (dataTile.Tile.ColourEntry.IsWaterColour && _colourTable.WaterColors.Count > 0)
|
||||
{
|
||||
foreach (var col in _colourTable.WaterColors)
|
||||
{
|
||||
if(!variantComboBox.Items.Contains(col.Name))
|
||||
variantComboBox.Items.Add(col.Name);
|
||||
}
|
||||
|
||||
dataTile.Tile.ColourEntry.DefaultName = _colourTable.WaterColors[0].Name;
|
||||
}
|
||||
|
||||
variantComboBox.Items.AddRange(dataTile.Tile.ColourEntry.Variants);
|
||||
|
||||
variantComboBox.SelectedItem = dataTile.Tile.ColourEntry.DefaultName;
|
||||
}
|
||||
|
||||
selectTilePictureBox.Image = _selectedTile.Texture;
|
||||
}
|
||||
|
||||
private static int GetSelectedImageIndex(
|
||||
@@ -253,11 +360,11 @@ namespace PckStudio.Forms.Editor
|
||||
};
|
||||
}
|
||||
|
||||
private static Rectangle GetAtlasArea(int index, int rowCount, int columnCount, Size size, ImageLayoutDirection imageLayout)
|
||||
private static Rectangle GetAtlasArea(int index, int width, int height, int rowCount, int columnCount, Size size, ImageLayoutDirection imageLayout)
|
||||
{
|
||||
var p = GetSelectedPoint(index, rowCount, columnCount, imageLayout);
|
||||
var ap = new Point(p.X * size.Width, p.Y * size.Height);
|
||||
return new Rectangle(ap, size);
|
||||
return new Rectangle(ap, new Size(size.Width * width, size.Height * height));
|
||||
}
|
||||
|
||||
private static Point GetSelectedPoint(int index, int rowCount, int columnCount, ImageLayoutDirection imageLayout)
|
||||
@@ -277,41 +384,78 @@ namespace PckStudio.Forms.Editor
|
||||
};
|
||||
if (texture.Size != _areaSize)
|
||||
texture = texture.Resize(_areaSize, graphicsConfig);
|
||||
using (var g = Graphics.FromImage(originalPictureBox.Image))
|
||||
using (var g = Graphics.FromImage(_workingTexture))
|
||||
{
|
||||
g.ApplyConfig(graphicsConfig);
|
||||
g.Fill(_selectedTile.Area, Color.Transparent);
|
||||
g.DrawImage(texture, _selectedTile.Area);
|
||||
g.Fill(dataTile.Area, Color.Transparent);
|
||||
g.DrawImage(texture, dataTile.Area);
|
||||
}
|
||||
|
||||
_tiles[_selectedTile.Index] = new AtlasTile(_selectedTile.Index, _selectedTile.Area, _selectedTile.Tile, texture);
|
||||
selectTilePictureBox.Image = texture;
|
||||
originalPictureBox.Invalidate();
|
||||
var _finalTexture = _workingTexture.GetArea(new Rectangle(dataTile.Area.X, dataTile.Area.Y, dataTile.Area.Width, dataTile.Area.Height));
|
||||
|
||||
if(_selectedTile != dataTile)
|
||||
_tiles[dataTile.Index] = new AtlasTile(dataTile.Index, dataTile.Area, dataTile.Tile, _finalTexture);
|
||||
else
|
||||
_tiles[_selectedTile.Index] = new AtlasTile(_selectedTile.Index, _selectedTile.Area, _selectedTile.Tile, _finalTexture);
|
||||
selectTilePictureBox.Image = _finalTexture;
|
||||
|
||||
UpdateAtlasDisplay();
|
||||
}
|
||||
|
||||
private Color GetBlendColor()
|
||||
{
|
||||
if (_selectedTile.Tile.HasColourEntry && _selectedTile.Tile.ColourEntry is not null)
|
||||
return FindBlendColorByKey(_selectedTile.Tile.ColourEntry.DefaultName);
|
||||
if (dataTile.Tile.HasColourEntry && dataTile.Tile.ColourEntry is not null)
|
||||
{
|
||||
var col = FindBlendColorByKey(dataTile.Tile.ColourEntry.DefaultName);
|
||||
return col;
|
||||
}
|
||||
|
||||
return Color.White;
|
||||
}
|
||||
|
||||
private Color HandleSpecialTiles(string colorKey)
|
||||
{
|
||||
colorSlider.Visible = colorSliderLabel.Visible = true;
|
||||
|
||||
// Simply, Experience orbs red value is just sliding between 255 and 0
|
||||
if (colorKey == "experience_orb") return Color.FromArgb(colorSlider.Value, 255, 0);
|
||||
|
||||
//similar story for critical hits, but for all values
|
||||
var final_color = Color.FromArgb(colorSlider.Value, colorSlider.Value, colorSlider.Value);
|
||||
|
||||
// enchanted hits are modified critical hit particles
|
||||
if (dataTile.Tile.InternalName == "enchanted_hit")
|
||||
// this is directly based on Java's source code for handling enchanted hits
|
||||
// it just multiplies the red by 0.3 and green by .8 of the color assigned to the critical hit particle
|
||||
final_color = Color.FromArgb((int)(final_color.R * 0.3f), (int)(final_color.R * 0.8f), final_color.B);
|
||||
|
||||
return final_color;
|
||||
}
|
||||
|
||||
private Color FindBlendColorByKey(string colorKey)
|
||||
{
|
||||
// The following tiles are hardcoded within a range and do not have color table entries
|
||||
if (colorKey == "experience_orb" || colorKey == "critical_hit")
|
||||
return HandleSpecialTiles(colorKey);
|
||||
|
||||
if (_colourTable is not null &&
|
||||
_selectedTile.Tile.HasColourEntry &&
|
||||
_selectedTile.Tile.ColourEntry is not null)
|
||||
dataTile.Tile.HasColourEntry &&
|
||||
dataTile.Tile.ColourEntry is not null)
|
||||
{
|
||||
if (_selectedTile.Tile.ColourEntry.IsWaterColour &&
|
||||
_colourTable.WaterColors.FirstOrDefault(entry => entry.Name == colorKey) is ColorContainer.WaterColor waterColor)
|
||||
// basic way to check for classic water colors
|
||||
if(!dataTile.Tile.ColourEntry.IsWaterColour || colorKey.StartsWith("Water_"))
|
||||
{
|
||||
if (_colourTable.Colors.FirstOrDefault(entry => entry.Name == colorKey) is ColorContainer.Color color)
|
||||
{
|
||||
return color.ColorPallette;
|
||||
}
|
||||
}
|
||||
else if (_colourTable.WaterColors.FirstOrDefault(entry => entry.Name == colorKey) is ColorContainer.WaterColor waterColor)
|
||||
{
|
||||
return waterColor.SurfaceColor;
|
||||
}
|
||||
else if (_colourTable.Colors.FirstOrDefault(entry => entry.Name == colorKey) is ColorContainer.Color color)
|
||||
{
|
||||
return color.ColorPallette;
|
||||
}
|
||||
}
|
||||
|
||||
return Color.White;
|
||||
}
|
||||
|
||||
@@ -319,35 +463,22 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
switch (keyData)
|
||||
{
|
||||
case Keys.R:
|
||||
// Refreshes the specific tile
|
||||
SelectedIndex = _selectedTile.Index;
|
||||
return true;
|
||||
case Keys.Left:
|
||||
if (_tiles.IndexInRange(_selectedTile.Index - 1))
|
||||
{
|
||||
SelectedIndex = _selectedTile.Index - 1;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
SelectedIndex = _selectedTile.Index - 1;
|
||||
return true;
|
||||
case Keys.Right:
|
||||
if (_tiles.IndexInRange(_selectedTile.Index + 1))
|
||||
{
|
||||
SelectedIndex = _selectedTile.Index + 1;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
SelectedIndex = _selectedTile.Index + 1;
|
||||
return true;
|
||||
case Keys.Up:
|
||||
if (_tiles.IndexInRange(_selectedTile.Index - _rowCount))
|
||||
{
|
||||
SelectedIndex = _selectedTile.Index - _rowCount;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
SelectedIndex = _selectedTile.Index - _rowCount;
|
||||
return true;
|
||||
case Keys.Down:
|
||||
if (_tiles.IndexInRange(_selectedTile.Index + _rowCount))
|
||||
{
|
||||
SelectedIndex = _selectedTile.Index + _rowCount;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
SelectedIndex = _selectedTile.Index + _rowCount;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -358,9 +489,11 @@ namespace PckStudio.Forms.Editor
|
||||
if (e.Button != MouseButtons.Left)
|
||||
return;
|
||||
|
||||
ActiveControl = null;
|
||||
|
||||
int index = GetSelectedImageIndex(
|
||||
originalPictureBox.Size,
|
||||
originalPictureBox.Image.Size,
|
||||
_workingTexture.Size,
|
||||
_areaSize,
|
||||
e.Location,
|
||||
originalPictureBox.SizeMode,
|
||||
@@ -408,6 +541,8 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
|
||||
AnimationHelper.SaveAnimationToFile(file, animation);
|
||||
// so animations can automatically update upon saving
|
||||
SelectedIndex = _selectedTile.Index;
|
||||
}
|
||||
|
||||
private void extractTileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
@@ -419,18 +554,18 @@ namespace PckStudio.Forms.Editor
|
||||
};
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
selectTilePictureBox.Image.Save(saveFileDialog.FileName, ImageFormat.Png);
|
||||
dataTile.Texture.Save(saveFileDialog.FileName, ImageFormat.Png);
|
||||
}
|
||||
}
|
||||
|
||||
private void variantComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (_selectedTile.Tile.ColourEntry is not null &&
|
||||
_selectedTile.Tile.ColourEntry.Variants.IndexInRange(variantComboBox.SelectedIndex))
|
||||
if (dataTile.Tile.ColourEntry is not null)
|
||||
{
|
||||
string colorKey = _selectedTile.Tile.ColourEntry.Variants[variantComboBox.SelectedIndex];
|
||||
string colorKey = variantComboBox.SelectedItem.ToString();
|
||||
|
||||
selectTilePictureBox.BlendColor = FindBlendColorByKey(colorKey);
|
||||
selectTilePictureBox.Image = _selectedTile.Texture;
|
||||
selectTilePictureBox.Image = dataTile.Texture;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,5 +584,57 @@ namespace PckStudio.Forms.Editor
|
||||
if (selectTilePictureBox.IsPlaying)
|
||||
selectTilePictureBox.Stop();
|
||||
}
|
||||
|
||||
private void setColorButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ColorDialog colorPick = new ColorDialog();
|
||||
colorPick.AllowFullOpen = true;
|
||||
colorPick.AnyColor = true;
|
||||
colorPick.SolidColorOnly = true;
|
||||
|
||||
// custom colors are read as BGR for some reason, so hex values are "backwards"
|
||||
// values below are the default Minecraft dyed leather armor values for convenience
|
||||
|
||||
colorPick.CustomColors = new int[] {
|
||||
0xfefff9, // White
|
||||
0x1d80f9, // Orange
|
||||
0xbd4ec7, // Magenta
|
||||
0xdab33a, // Light Blue
|
||||
0x3dd8fe, // Yellow
|
||||
0x1fc780, // Lime
|
||||
0xaa8bf3, // Pink
|
||||
0x524f47, // Gray
|
||||
0x979d9d, // Light Gray
|
||||
0x9c9c16, // Cyan
|
||||
0xb83289, // Purple
|
||||
0xaa443c, // Blue
|
||||
0x325483, // Brown
|
||||
0x167c5e, // Green
|
||||
0x262eb0, // Red
|
||||
0x211d1d // Black
|
||||
};
|
||||
|
||||
if (colorPick.ShowDialog() != DialogResult.OK) return;
|
||||
|
||||
selectTilePictureBox.BlendColor = colorPick.Color;
|
||||
selectTilePictureBox.Image = dataTile.Texture;
|
||||
variantComboBox.Enabled = false;
|
||||
clearColorButton.Enabled = true;
|
||||
}
|
||||
|
||||
private void clearColorButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
variantComboBox.Enabled = true;
|
||||
|
||||
variantComboBox_SelectedIndexChanged(sender, e);
|
||||
|
||||
clearColorButton.Enabled = false;
|
||||
}
|
||||
|
||||
private void colorSlider_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
selectTilePictureBox.BlendColor = GetBlendColor();
|
||||
selectTilePictureBox.Image = dataTile.Texture;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -242,24 +242,32 @@ namespace PckStudio.Popups
|
||||
}
|
||||
string skinId = _skinId.ToString("d08");
|
||||
skin.Filename = $"dlcskin{skinId}.png";
|
||||
string skinDisplayNameLocKey = $"IDS_dlcskin{skinId}_DISPLAYNAME";
|
||||
currentLoc.AddLocKey(skinDisplayNameLocKey, textSkinName.Text);
|
||||
skin.Properties.Add("DISPLAYNAME", textSkinName.Text);
|
||||
skin.Properties.Add("DISPLAYNAMEID", skinDisplayNameLocKey);
|
||||
skin.AddProperty("DISPLAYNAME", textSkinName.Text);
|
||||
|
||||
if (currentLoc is not null)
|
||||
{
|
||||
string skinDisplayNameLocKey = $"IDS_dlcskin{skinId}_DISPLAYNAME";
|
||||
skin.AddProperty("DISPLAYNAMEID", skinDisplayNameLocKey);
|
||||
currentLoc.AddLocKey(skinDisplayNameLocKey, textSkinName.Text);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(textThemeName.Text))
|
||||
{
|
||||
skin.Properties.Add("THEMENAME", textThemeName.Text);
|
||||
skin.Properties.Add("THEMENAMEID", $"IDS_dlcskin{skinId}_THEMENAME");
|
||||
currentLoc.AddLocKey($"IDS_dlcskin{skinId}_THEMENAME", textThemeName.Text);
|
||||
skin.AddProperty("THEMENAME", textThemeName.Text);
|
||||
if (currentLoc is not null)
|
||||
{
|
||||
skin.AddProperty("THEMENAMEID", $"IDS_dlcskin{skinId}_THEMENAME");
|
||||
currentLoc.AddLocKey($"IDS_dlcskin{skinId}_THEMENAME", textThemeName.Text);
|
||||
}
|
||||
}
|
||||
skin.Properties.Add("ANIM", anim);
|
||||
skin.Properties.Add("GAME_FLAGS", "0x18");
|
||||
skin.Properties.Add("FREE", "1");
|
||||
skin.AddProperty("ANIM", anim);
|
||||
skin.AddProperty("GAME_FLAGS", "0x18");
|
||||
skin.AddProperty("FREE", "1");
|
||||
|
||||
if (HasCape)
|
||||
{
|
||||
cape.Filename = $"dlccape{skinId}.png";
|
||||
skin.Properties.Add("CAPEPATH", cape.Filename);
|
||||
skin.AddProperty("CAPEPATH", cape.Filename);
|
||||
}
|
||||
skin.SetData(skinPictureBox.Image, ImageFormat.Png);
|
||||
DialogResult = DialogResult.OK;
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace PckStudio.Popups
|
||||
|
||||
if (index == -1 || (Enum.IsDefined(typeof(PckFileType), index) && (int)file.Filetype == index))
|
||||
{
|
||||
file.Properties.Add(propertyKeyTextBox.Text, propertyValueTextBox.Text);
|
||||
file.AddProperty(propertyKeyTextBox.Text, propertyValueTextBox.Text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace PckStudio.Forms
|
||||
}
|
||||
comboParent.Items.Clear();
|
||||
comboParent.Items.AddRange(ValidModelBoxTypes);
|
||||
LoadData(file.Properties);
|
||||
LoadData(file);
|
||||
}
|
||||
private static readonly Regex sWhitespace = new Regex(@"\s+");
|
||||
public static string ReplaceWhitespace(string input, string replacement)
|
||||
@@ -149,9 +149,9 @@ namespace PckStudio.Forms
|
||||
return sWhitespace.Replace(input, replacement);
|
||||
}
|
||||
|
||||
private void LoadData(PckFileProperties properties)
|
||||
private void LoadData(PckFileData file)
|
||||
{
|
||||
comboParent.Enabled = properties.GetProperties("BOX").All(kv => {
|
||||
comboParent.Enabled = file.GetMultipleProperties("BOX").All(kv => {
|
||||
var box = SkinBOX.FromString(kv.Value);
|
||||
if (ValidModelBoxTypes.Contains(box.Type))
|
||||
{
|
||||
@@ -160,7 +160,7 @@ namespace PckStudio.Forms
|
||||
}
|
||||
return false;
|
||||
});
|
||||
properties.GetProperties("OFFSET").All(kv => {
|
||||
file.GetMultipleProperties("OFFSET").All(kv => {
|
||||
string[] offset = ReplaceWhitespace(kv.Value, ",").TrimEnd('\n', '\r', ' ').Split(',');
|
||||
if (offset.Length < 3)
|
||||
return false;
|
||||
@@ -176,7 +176,7 @@ namespace PckStudio.Forms
|
||||
return false;
|
||||
});
|
||||
|
||||
_ANIM = properties.GetPropertyValue("ANIM", SkinANIM.FromString);
|
||||
_ANIM = file.GetProperty("ANIM", SkinANIM.FromString);
|
||||
UpdateListView();
|
||||
Rerender();
|
||||
}
|
||||
@@ -1094,7 +1094,7 @@ namespace PckStudio.Forms
|
||||
{
|
||||
foreach (var part in modelBoxes)
|
||||
{
|
||||
_file.Properties.Add("BOX", part);
|
||||
_file.AddProperty("BOX", part);
|
||||
}
|
||||
|
||||
//Bitmap bitmap2 = new Bitmap(64, 64);
|
||||
|
||||
@@ -182,7 +182,7 @@ namespace PckStudio.Forms
|
||||
string capePath = "";
|
||||
bool hasCape = false;
|
||||
|
||||
foreach (var entry in newSkin.Properties)
|
||||
foreach (var entry in newSkin.GetProperties())
|
||||
{
|
||||
if (entry.Key == "DISPLAYNAME")
|
||||
{
|
||||
@@ -264,7 +264,7 @@ namespace PckStudio.Forms
|
||||
if (skinPicture.Height == skinPicture.Width)
|
||||
{
|
||||
//determines skin type based on image dimensions, existence of BOX tags, and the ANIM value
|
||||
foreach (var entry in newSkin.Properties)
|
||||
foreach (var entry in newSkin.GetProperties())
|
||||
{
|
||||
if (entry.Key == "BOX")
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace PckStudio.Helper
|
||||
internal static void SaveAnimationToFile(PckFileData file, Animation animation)
|
||||
{
|
||||
string anim = animation.BuildAnim();
|
||||
file.Properties.SetProperty("ANIM", anim);
|
||||
file.SetProperty("ANIM", anim);
|
||||
var texture = animation.BuildTexture();
|
||||
file.SetData(texture, ImageFormat.Png);
|
||||
}
|
||||
@@ -30,7 +30,7 @@ namespace PckStudio.Helper
|
||||
{
|
||||
var texture = file.GetTexture();
|
||||
var frameTextures = texture.Split(ImageLayoutDirection.Vertical);
|
||||
var _animation = new Animation(frameTextures, file.Properties.GetPropertyValue("ANIM"));
|
||||
var _animation = new Animation(frameTextures, file.GetProperty("ANIM"));
|
||||
_animation.Category = file.Filename.Split('/').Contains("items")
|
||||
? AnimationCategory.Items
|
||||
: AnimationCategory.Blocks;
|
||||
|
||||
@@ -21,11 +21,24 @@ namespace PckStudio.Internal
|
||||
{
|
||||
Profiler.Start();
|
||||
{
|
||||
_entityImages ??= Resources.entities_sheet.SplitHorizontal(32).ToArray();
|
||||
_entityImages ??= Resources.entities_atlas.SplitHorizontal(32).ToArray();
|
||||
DataCacher ??= new FileCacher(Program.AppDataCache);
|
||||
_ = Tiles.JsonTileData;
|
||||
_ = Tiles.ItemImageList;
|
||||
_ = Tiles.JsonBlockData;
|
||||
_ = Tiles.JsonItemData;
|
||||
_ = Tiles.JsonParticleData;
|
||||
_ = Tiles.JsonMoonPhaseData;
|
||||
_ = Tiles.JsonExplosionData;
|
||||
_ = Tiles.JsonMapIconData;
|
||||
_ = Tiles.JsonExperienceOrbData;
|
||||
_ = Tiles.JsonPaintingData;
|
||||
_ = Tiles.BlockImageList;
|
||||
_ = Tiles.ItemImageList;
|
||||
_ = Tiles.ParticleImageList;
|
||||
_ = Tiles.ExplosionImageList;
|
||||
_ = Tiles.MapIconImageList;
|
||||
_ = Tiles.ExperienceOrbImageList;
|
||||
_ = Tiles.MoonPhaseImageList;
|
||||
_ = Tiles.PaintingImageList;
|
||||
SettingsManager.Initialize();
|
||||
CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,9 @@ namespace PckStudio.Internal.Json
|
||||
[JsonProperty("isWaterColour", DefaultValueHandling = DefaultValueHandling.Populate)]
|
||||
public bool IsWaterColour { get; set; }
|
||||
|
||||
[JsonProperty("hasCustomColour", DefaultValueHandling = DefaultValueHandling.Populate)]
|
||||
public bool HasCustomColour { get; set; }
|
||||
|
||||
[JsonProperty("variants", DefaultValueHandling = DefaultValueHandling.Populate)]
|
||||
public string[] Variants { get; set; }
|
||||
}
|
||||
|
||||
@@ -15,6 +15,12 @@ namespace PckStudio.Internal.Json
|
||||
[JsonProperty("internalName")]
|
||||
public string InternalName { get; set; }
|
||||
|
||||
[JsonProperty("width")]
|
||||
public int Width { get; set; } = 1;
|
||||
|
||||
[JsonProperty("height")]
|
||||
public int Height { get; set; } = 1;
|
||||
|
||||
[JsonProperty("hasColourEntry", DefaultValueHandling = DefaultValueHandling.Populate)]
|
||||
public bool HasColourEntry { get; set; }
|
||||
|
||||
|
||||
@@ -13,55 +13,108 @@ namespace PckStudio.Internal.Json
|
||||
{
|
||||
internal class JsonTiles
|
||||
{
|
||||
[JsonProperty("blocks")]
|
||||
public List<JsonTileInfo> Blocks { get; set; }
|
||||
[JsonProperty("items")]
|
||||
public List<JsonTileInfo> Items { get; set; }
|
||||
[JsonProperty("entries")]
|
||||
public List<JsonTileInfo> Entries { get; set; }
|
||||
|
||||
[JsonProperty("additional_entries")]
|
||||
public List<JsonTileInfo> AdditionalEntries { get; set; }
|
||||
}
|
||||
|
||||
internal static class Tiles
|
||||
{
|
||||
private static JsonTiles _jsonData;
|
||||
internal static JsonTiles JsonTileData => _jsonData ??= JsonConvert.DeserializeObject<JsonTiles>(Resources.tileData);
|
||||
private static JsonTiles
|
||||
_jsonBlockData, _jsonItemData,
|
||||
_jsonParticleData, _jsonMoonPhaseData,
|
||||
_jsonMapIconData, _jsonExplosionData,
|
||||
_jsonExperienceOrbData, _jsonPaintingData, _jsonBannerData;
|
||||
internal static JsonTiles JsonBlockData => _jsonBlockData ??= JsonConvert.DeserializeObject<JsonTiles>(Resources.blockData);
|
||||
internal static JsonTiles JsonItemData => _jsonItemData ??= JsonConvert.DeserializeObject<JsonTiles>(Resources.itemData);
|
||||
internal static JsonTiles JsonParticleData => _jsonParticleData ??= JsonConvert.DeserializeObject<JsonTiles>(Resources.particleData);
|
||||
internal static JsonTiles JsonMoonPhaseData => _jsonMoonPhaseData ??= JsonConvert.DeserializeObject<JsonTiles>(Resources.moonPhaseData);
|
||||
internal static JsonTiles JsonMapIconData => _jsonMapIconData ??= JsonConvert.DeserializeObject<JsonTiles>(Resources.mapIconData);
|
||||
internal static JsonTiles JsonExplosionData => _jsonExplosionData ??= JsonConvert.DeserializeObject<JsonTiles>(Resources.explosionData);
|
||||
internal static JsonTiles JsonExperienceOrbData => _jsonExperienceOrbData ??= JsonConvert.DeserializeObject<JsonTiles>(Resources.experienceOrbData);
|
||||
internal static JsonTiles JsonPaintingData => _jsonPaintingData ??= JsonConvert.DeserializeObject<JsonTiles>(Resources.paintingData);
|
||||
internal static JsonTiles JsonBannerData => _jsonBannerData ??= JsonConvert.DeserializeObject<JsonTiles>(Resources.bannerData);
|
||||
|
||||
internal static List<JsonTileInfo> ItemTileInfos => JsonTileData.Items;
|
||||
|
||||
internal static List<JsonTileInfo> BlockTileInfos => JsonTileData.Blocks;
|
||||
internal static List<JsonTileInfo> ItemTileInfos => JsonItemData.Entries;
|
||||
internal static List<JsonTileInfo> BlockTileInfos => JsonBlockData.Entries;
|
||||
internal static List<JsonTileInfo> ParticleTileInfos => JsonParticleData.Entries;
|
||||
internal static List<JsonTileInfo> MoonPhaseTileInfos => JsonMoonPhaseData.Entries;
|
||||
internal static List<JsonTileInfo> MapIconTileInfos => JsonMapIconData.Entries;
|
||||
internal static List<JsonTileInfo> AdditionalMapIconTileInfos => JsonMapIconData.AdditionalEntries;
|
||||
internal static List<JsonTileInfo> ExperienceOrbTileInfos => JsonExperienceOrbData.Entries;
|
||||
internal static List<JsonTileInfo> ExplosionTileInfos => JsonExplosionData.Entries;
|
||||
internal static List<JsonTileInfo> PaintingTileInfos => JsonPaintingData.Entries;
|
||||
internal static List<JsonTileInfo> BannerTileInfos => JsonBannerData.Entries;
|
||||
|
||||
private static Image[] _itemImages;
|
||||
public static Image[] ItemImages => _itemImages ??= Resources.items_sheet.SplitHorizontal(16).ToArray();
|
||||
public static Image[] ItemImages => _itemImages ??= Resources.items_atlas.SplitHorizontal(16).ToArray();
|
||||
|
||||
private static Image[] _blockImages;
|
||||
public static Image[] BlockImages => _blockImages ??= Resources.terrain_sheet.SplitHorizontal(16).ToArray();
|
||||
public static Image[] BlockImages => _blockImages ??= Resources.terrain_atlas.SplitHorizontal(16).ToArray();
|
||||
|
||||
private static ImageList _itemImageList;
|
||||
public static ImageList ItemImageList
|
||||
private static Image[] _particleImages;
|
||||
public static Image[] ParticleImages => _particleImages ??= Resources.particles_atlas.SplitHorizontal(16).ToArray();
|
||||
|
||||
private static Image[] _moonPhaseImages;
|
||||
public static Image[] MoonPhaseImages => _moonPhaseImages ??= Resources.moon_phases_atlas.SplitHorizontal(4).ToArray();
|
||||
|
||||
private static Image[] _mapIconImages;
|
||||
public static Image[] MapIconImages => _mapIconImages ??= Resources.map_icons_atlas.SplitHorizontal(4).ToArray();
|
||||
|
||||
private static Image[] _additionalMapIconImages;
|
||||
public static Image[] AdditionalMapIconImages => _additionalMapIconImages ??= Resources.additional_map_icons_atlas.SplitHorizontal(4).ToArray();
|
||||
|
||||
private static Image[] _experienceOrbIconImages;
|
||||
public static Image[] ExperienceOrbImages => _experienceOrbIconImages ??= Resources.experience_orbs_atlas.SplitHorizontal(4).ToArray();
|
||||
|
||||
private static Image[] _explosionImages;
|
||||
public static Image[] ExplosionImages => _explosionImages ??= Resources.explosions_atlas.SplitHorizontal(4).ToArray();
|
||||
|
||||
private static Image[] _paintingImages;
|
||||
public static Image[] PaintingImages => _paintingImages ??= Resources.paintings_atlas.SplitHorizontal(16).ToArray();
|
||||
|
||||
private static Image[] _bannerImages;
|
||||
public static Image[] BannerImages => _bannerImages ??= Resources.banners_atlas.SplitHorizontal(6).ToArray();
|
||||
|
||||
private static ImageList GetImageList(Image[] images)
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_itemImageList is null)
|
||||
{
|
||||
_itemImageList = new ImageList();
|
||||
_itemImageList.ColorDepth = ColorDepth.Depth32Bit;
|
||||
_itemImageList.Images.AddRange(ItemImages);
|
||||
}
|
||||
return _itemImageList;
|
||||
}
|
||||
ImageList _imageList = new ImageList();
|
||||
_imageList.ColorDepth = ColorDepth.Depth32Bit;
|
||||
_imageList.Images.AddRange(images);
|
||||
|
||||
return _imageList;
|
||||
}
|
||||
|
||||
private static ImageList _blockImageList;
|
||||
public static ImageList BlockImageList
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_blockImageList is null)
|
||||
{
|
||||
_blockImageList = new ImageList();
|
||||
_blockImageList.ColorDepth = ColorDepth.Depth32Bit;
|
||||
_blockImageList.Images.AddRange(BlockImages);
|
||||
}
|
||||
return _blockImageList;
|
||||
}
|
||||
}
|
||||
private static ImageList _blockImageList = GetImageList(BlockImages);
|
||||
public static ImageList BlockImageList { get { return _blockImageList; } }
|
||||
|
||||
private static ImageList _itemImageList = GetImageList(ItemImages);
|
||||
public static ImageList ItemImageList { get { return _itemImageList; } }
|
||||
|
||||
private static ImageList _particleImageList = GetImageList(ParticleImages);
|
||||
public static ImageList ParticleImageList { get { return _particleImageList; } }
|
||||
|
||||
private static ImageList _moonPhaseImageList = GetImageList(MoonPhaseImages);
|
||||
public static ImageList MoonPhaseImageList { get { return _moonPhaseImageList; } }
|
||||
|
||||
private static ImageList _mapIconImageList = GetImageList(MapIconImages);
|
||||
public static ImageList MapIconImageList { get { return _mapIconImageList; } }
|
||||
|
||||
private static ImageList _additionalMapIconImageList = GetImageList(AdditionalMapIconImages);
|
||||
public static ImageList AdditionalMapIconImageList { get { return _additionalMapIconImageList; } }
|
||||
|
||||
private static ImageList _experienceOrbsImageList = GetImageList(ExperienceOrbImages);
|
||||
public static ImageList ExperienceOrbImageList { get { return _experienceOrbsImageList; } }
|
||||
|
||||
private static ImageList _explosionImageList = GetImageList(ExplosionImages);
|
||||
public static ImageList ExplosionImageList { get { return _explosionImageList; } }
|
||||
|
||||
private static ImageList _paintingImageList = GetImageList(PaintingImages);
|
||||
public static ImageList PaintingImageList { get { return _paintingImageList; } }
|
||||
|
||||
private static ImageList _bannerImageList = GetImageList(BannerImages);
|
||||
public static ImageList BannerImageList { get { return _bannerImageList; } }
|
||||
}
|
||||
}
|
||||
|
||||
298
PCK-Studio/MainForm.Designer.cs
generated
@@ -87,9 +87,7 @@
|
||||
this.closeAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.quickChangeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.convertToBedrockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.miscToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addCustomPackImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openPckManagerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.convertMusicFilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.wavBinkaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -174,12 +172,12 @@
|
||||
this.renameFileToolStripMenuItem,
|
||||
this.replaceToolStripMenuItem,
|
||||
this.deleteFileToolStripMenuItem});
|
||||
this.contextMenuPCKEntries.Name = "contextMenuStrip1";
|
||||
resources.ApplyResources(this.contextMenuPCKEntries, "contextMenuPCKEntries");
|
||||
//
|
||||
// createToolStripMenuItem
|
||||
//
|
||||
this.createToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.contextMenuPCKEntries.Name = "contextMenuStrip1";
|
||||
resources.ApplyResources(this.contextMenuPCKEntries, "contextMenuPCKEntries");
|
||||
//
|
||||
// createToolStripMenuItem
|
||||
//
|
||||
this.createToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.folderToolStripMenuItem,
|
||||
this.skinToolStripMenuItem,
|
||||
this.createAnimatedTextureToolStripMenuItem,
|
||||
@@ -295,72 +293,72 @@
|
||||
this.modelsFileBINToolStripMenuItem,
|
||||
this.behavioursFileBINToolStripMenuItem,
|
||||
this.entityMaterialsFileBINToolStripMenuItem});
|
||||
this.setFileTypeToolStripMenuItem.Name = "setFileTypeToolStripMenuItem";
|
||||
resources.ApplyResources(this.setFileTypeToolStripMenuItem, "setFileTypeToolStripMenuItem");
|
||||
//
|
||||
// skinToolStripMenuItem1
|
||||
//
|
||||
this.skinToolStripMenuItem1.Name = "skinToolStripMenuItem1";
|
||||
resources.ApplyResources(this.skinToolStripMenuItem1, "skinToolStripMenuItem1");
|
||||
//
|
||||
// capeToolStripMenuItem
|
||||
//
|
||||
this.capeToolStripMenuItem.Name = "capeToolStripMenuItem";
|
||||
resources.ApplyResources(this.capeToolStripMenuItem, "capeToolStripMenuItem");
|
||||
//
|
||||
// textureToolStripMenuItem
|
||||
//
|
||||
this.textureToolStripMenuItem.Name = "textureToolStripMenuItem";
|
||||
resources.ApplyResources(this.textureToolStripMenuItem, "textureToolStripMenuItem");
|
||||
//
|
||||
// languagesFileLOCToolStripMenuItem
|
||||
//
|
||||
this.languagesFileLOCToolStripMenuItem.Name = "languagesFileLOCToolStripMenuItem";
|
||||
resources.ApplyResources(this.languagesFileLOCToolStripMenuItem, "languagesFileLOCToolStripMenuItem");
|
||||
//
|
||||
// gameRulesFileGRFToolStripMenuItem
|
||||
//
|
||||
this.gameRulesFileGRFToolStripMenuItem.Name = "gameRulesFileGRFToolStripMenuItem";
|
||||
resources.ApplyResources(this.gameRulesFileGRFToolStripMenuItem, "gameRulesFileGRFToolStripMenuItem");
|
||||
//
|
||||
// audioPCKFileToolStripMenuItem
|
||||
//
|
||||
this.audioPCKFileToolStripMenuItem.Name = "audioPCKFileToolStripMenuItem";
|
||||
resources.ApplyResources(this.audioPCKFileToolStripMenuItem, "audioPCKFileToolStripMenuItem");
|
||||
//
|
||||
// coloursCOLFileToolStripMenuItem
|
||||
//
|
||||
this.coloursCOLFileToolStripMenuItem.Name = "coloursCOLFileToolStripMenuItem";
|
||||
resources.ApplyResources(this.coloursCOLFileToolStripMenuItem, "coloursCOLFileToolStripMenuItem");
|
||||
//
|
||||
// gameRulesHeaderGRHToolStripMenuItem
|
||||
//
|
||||
this.gameRulesHeaderGRHToolStripMenuItem.Name = "gameRulesHeaderGRHToolStripMenuItem";
|
||||
resources.ApplyResources(this.gameRulesHeaderGRHToolStripMenuItem, "gameRulesHeaderGRHToolStripMenuItem");
|
||||
//
|
||||
// skinsPCKToolStripMenuItem
|
||||
//
|
||||
this.skinsPCKToolStripMenuItem.Name = "skinsPCKToolStripMenuItem";
|
||||
resources.ApplyResources(this.skinsPCKToolStripMenuItem, "skinsPCKToolStripMenuItem");
|
||||
//
|
||||
// modelsFileBINToolStripMenuItem
|
||||
//
|
||||
this.modelsFileBINToolStripMenuItem.Name = "modelsFileBINToolStripMenuItem";
|
||||
resources.ApplyResources(this.modelsFileBINToolStripMenuItem, "modelsFileBINToolStripMenuItem");
|
||||
//
|
||||
// behavioursFileBINToolStripMenuItem
|
||||
//
|
||||
this.behavioursFileBINToolStripMenuItem.Name = "behavioursFileBINToolStripMenuItem";
|
||||
resources.ApplyResources(this.behavioursFileBINToolStripMenuItem, "behavioursFileBINToolStripMenuItem");
|
||||
//
|
||||
// entityMaterialsFileBINToolStripMenuItem
|
||||
//
|
||||
this.entityMaterialsFileBINToolStripMenuItem.Name = "entityMaterialsFileBINToolStripMenuItem";
|
||||
resources.ApplyResources(this.entityMaterialsFileBINToolStripMenuItem, "entityMaterialsFileBINToolStripMenuItem");
|
||||
//
|
||||
// miscFunctionsToolStripMenuItem
|
||||
//
|
||||
this.miscFunctionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.setFileTypeToolStripMenuItem.Name = "setFileTypeToolStripMenuItem";
|
||||
resources.ApplyResources(this.setFileTypeToolStripMenuItem, "setFileTypeToolStripMenuItem");
|
||||
//
|
||||
// skinToolStripMenuItem1
|
||||
//
|
||||
this.skinToolStripMenuItem1.Name = "skinToolStripMenuItem1";
|
||||
resources.ApplyResources(this.skinToolStripMenuItem1, "skinToolStripMenuItem1");
|
||||
//
|
||||
// capeToolStripMenuItem
|
||||
//
|
||||
this.capeToolStripMenuItem.Name = "capeToolStripMenuItem";
|
||||
resources.ApplyResources(this.capeToolStripMenuItem, "capeToolStripMenuItem");
|
||||
//
|
||||
// textureToolStripMenuItem
|
||||
//
|
||||
this.textureToolStripMenuItem.Name = "textureToolStripMenuItem";
|
||||
resources.ApplyResources(this.textureToolStripMenuItem, "textureToolStripMenuItem");
|
||||
//
|
||||
// languagesFileLOCToolStripMenuItem
|
||||
//
|
||||
this.languagesFileLOCToolStripMenuItem.Name = "languagesFileLOCToolStripMenuItem";
|
||||
resources.ApplyResources(this.languagesFileLOCToolStripMenuItem, "languagesFileLOCToolStripMenuItem");
|
||||
//
|
||||
// gameRulesFileGRFToolStripMenuItem
|
||||
//
|
||||
this.gameRulesFileGRFToolStripMenuItem.Name = "gameRulesFileGRFToolStripMenuItem";
|
||||
resources.ApplyResources(this.gameRulesFileGRFToolStripMenuItem, "gameRulesFileGRFToolStripMenuItem");
|
||||
//
|
||||
// audioPCKFileToolStripMenuItem
|
||||
//
|
||||
this.audioPCKFileToolStripMenuItem.Name = "audioPCKFileToolStripMenuItem";
|
||||
resources.ApplyResources(this.audioPCKFileToolStripMenuItem, "audioPCKFileToolStripMenuItem");
|
||||
//
|
||||
// coloursCOLFileToolStripMenuItem
|
||||
//
|
||||
this.coloursCOLFileToolStripMenuItem.Name = "coloursCOLFileToolStripMenuItem";
|
||||
resources.ApplyResources(this.coloursCOLFileToolStripMenuItem, "coloursCOLFileToolStripMenuItem");
|
||||
//
|
||||
// gameRulesHeaderGRHToolStripMenuItem
|
||||
//
|
||||
this.gameRulesHeaderGRHToolStripMenuItem.Name = "gameRulesHeaderGRHToolStripMenuItem";
|
||||
resources.ApplyResources(this.gameRulesHeaderGRHToolStripMenuItem, "gameRulesHeaderGRHToolStripMenuItem");
|
||||
//
|
||||
// skinsPCKToolStripMenuItem
|
||||
//
|
||||
this.skinsPCKToolStripMenuItem.Name = "skinsPCKToolStripMenuItem";
|
||||
resources.ApplyResources(this.skinsPCKToolStripMenuItem, "skinsPCKToolStripMenuItem");
|
||||
//
|
||||
// modelsFileBINToolStripMenuItem
|
||||
//
|
||||
this.modelsFileBINToolStripMenuItem.Name = "modelsFileBINToolStripMenuItem";
|
||||
resources.ApplyResources(this.modelsFileBINToolStripMenuItem, "modelsFileBINToolStripMenuItem");
|
||||
//
|
||||
// behavioursFileBINToolStripMenuItem
|
||||
//
|
||||
this.behavioursFileBINToolStripMenuItem.Name = "behavioursFileBINToolStripMenuItem";
|
||||
resources.ApplyResources(this.behavioursFileBINToolStripMenuItem, "behavioursFileBINToolStripMenuItem");
|
||||
//
|
||||
// entityMaterialsFileBINToolStripMenuItem
|
||||
//
|
||||
this.entityMaterialsFileBINToolStripMenuItem.Name = "entityMaterialsFileBINToolStripMenuItem";
|
||||
resources.ApplyResources(this.entityMaterialsFileBINToolStripMenuItem, "entityMaterialsFileBINToolStripMenuItem");
|
||||
//
|
||||
// miscFunctionsToolStripMenuItem
|
||||
//
|
||||
this.miscFunctionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.generateMipMapTextureToolStripMenuItem1,
|
||||
this.viewFileInfoToolStripMenuItem,
|
||||
this.correctSkinDecimalsToolStripMenuItem});
|
||||
@@ -441,42 +439,42 @@
|
||||
this.skinPackToolStripMenuItem,
|
||||
this.texturePackToolStripMenuItem,
|
||||
this.mashUpPackToolStripMenuItem});
|
||||
resources.ApplyResources(this.newToolStripMenuItem, "newToolStripMenuItem");
|
||||
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
|
||||
//
|
||||
// skinPackToolStripMenuItem
|
||||
//
|
||||
this.skinPackToolStripMenuItem.Name = "skinPackToolStripMenuItem";
|
||||
resources.ApplyResources(this.skinPackToolStripMenuItem, "skinPackToolStripMenuItem");
|
||||
this.skinPackToolStripMenuItem.Click += new System.EventHandler(this.skinPackToolStripMenuItem_Click);
|
||||
//
|
||||
// texturePackToolStripMenuItem
|
||||
//
|
||||
this.texturePackToolStripMenuItem.Name = "texturePackToolStripMenuItem";
|
||||
resources.ApplyResources(this.texturePackToolStripMenuItem, "texturePackToolStripMenuItem");
|
||||
this.texturePackToolStripMenuItem.Click += new System.EventHandler(this.texturePackToolStripMenuItem_Click);
|
||||
//
|
||||
// mashUpPackToolStripMenuItem
|
||||
//
|
||||
this.mashUpPackToolStripMenuItem.Name = "mashUpPackToolStripMenuItem";
|
||||
resources.ApplyResources(this.mashUpPackToolStripMenuItem, "mashUpPackToolStripMenuItem");
|
||||
this.mashUpPackToolStripMenuItem.Click += new System.EventHandler(this.mashUpPackToolStripMenuItem_Click);
|
||||
//
|
||||
// openToolStripMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.openToolStripMenuItem, "openToolStripMenuItem");
|
||||
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
||||
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
|
||||
//
|
||||
// extractToolStripMenuItem1
|
||||
//
|
||||
resources.ApplyResources(this.extractToolStripMenuItem1, "extractToolStripMenuItem1");
|
||||
this.extractToolStripMenuItem1.Name = "extractToolStripMenuItem1";
|
||||
this.extractToolStripMenuItem1.Click += new System.EventHandler(this.extractToolStripMenuItem1_Click);
|
||||
//
|
||||
// packSettingsToolStripMenuItem
|
||||
//
|
||||
this.packSettingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
resources.ApplyResources(this.newToolStripMenuItem, "newToolStripMenuItem");
|
||||
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
|
||||
//
|
||||
// skinPackToolStripMenuItem
|
||||
//
|
||||
this.skinPackToolStripMenuItem.Name = "skinPackToolStripMenuItem";
|
||||
resources.ApplyResources(this.skinPackToolStripMenuItem, "skinPackToolStripMenuItem");
|
||||
this.skinPackToolStripMenuItem.Click += new System.EventHandler(this.skinPackToolStripMenuItem_Click);
|
||||
//
|
||||
// texturePackToolStripMenuItem
|
||||
//
|
||||
this.texturePackToolStripMenuItem.Name = "texturePackToolStripMenuItem";
|
||||
resources.ApplyResources(this.texturePackToolStripMenuItem, "texturePackToolStripMenuItem");
|
||||
this.texturePackToolStripMenuItem.Click += new System.EventHandler(this.texturePackToolStripMenuItem_Click);
|
||||
//
|
||||
// mashUpPackToolStripMenuItem
|
||||
//
|
||||
this.mashUpPackToolStripMenuItem.Name = "mashUpPackToolStripMenuItem";
|
||||
resources.ApplyResources(this.mashUpPackToolStripMenuItem, "mashUpPackToolStripMenuItem");
|
||||
this.mashUpPackToolStripMenuItem.Click += new System.EventHandler(this.mashUpPackToolStripMenuItem_Click);
|
||||
//
|
||||
// openToolStripMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.openToolStripMenuItem, "openToolStripMenuItem");
|
||||
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
||||
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
|
||||
//
|
||||
// extractToolStripMenuItem1
|
||||
//
|
||||
resources.ApplyResources(this.extractToolStripMenuItem1, "extractToolStripMenuItem1");
|
||||
this.extractToolStripMenuItem1.Name = "extractToolStripMenuItem1";
|
||||
this.extractToolStripMenuItem1.Click += new System.EventHandler(this.extractToolStripMenuItem1_Click);
|
||||
//
|
||||
// packSettingsToolStripMenuItem
|
||||
//
|
||||
this.packSettingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fullBoxSupportToolStripMenuItem});
|
||||
this.packSettingsToolStripMenuItem.Image = global::PckStudio.Properties.Resources.ranch;
|
||||
this.packSettingsToolStripMenuItem.Name = "packSettingsToolStripMenuItem";
|
||||
@@ -516,8 +514,7 @@
|
||||
// editToolStripMenuItem
|
||||
//
|
||||
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.quickChangeToolStripMenuItem,
|
||||
this.convertToBedrockToolStripMenuItem});
|
||||
this.quickChangeToolStripMenuItem});
|
||||
this.editToolStripMenuItem.ForeColor = System.Drawing.Color.Silver;
|
||||
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||
resources.ApplyResources(this.editToolStripMenuItem, "editToolStripMenuItem");
|
||||
@@ -528,57 +525,44 @@
|
||||
this.quickChangeToolStripMenuItem.Name = "quickChangeToolStripMenuItem";
|
||||
this.quickChangeToolStripMenuItem.Click += new System.EventHandler(this.quickChangeToolStripMenuItem_Click);
|
||||
//
|
||||
// convertToBedrockToolStripMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.convertToBedrockToolStripMenuItem, "convertToBedrockToolStripMenuItem");
|
||||
this.convertToBedrockToolStripMenuItem.Name = "convertToBedrockToolStripMenuItem";
|
||||
this.convertToBedrockToolStripMenuItem.Click += new System.EventHandler(this.convertToBedrockToolStripMenuItem_Click);
|
||||
//
|
||||
// miscToolStripMenuItem
|
||||
//
|
||||
this.miscToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addCustomPackImageToolStripMenuItem,
|
||||
this.openPckManagerToolStripMenuItem,
|
||||
this.convertMusicFilesToolStripMenuItem});
|
||||
this.miscToolStripMenuItem.ForeColor = System.Drawing.Color.Silver;
|
||||
this.miscToolStripMenuItem.Name = "miscToolStripMenuItem";
|
||||
resources.ApplyResources(this.miscToolStripMenuItem, "miscToolStripMenuItem");
|
||||
//
|
||||
// addCustomPackImageToolStripMenuItem
|
||||
//
|
||||
this.addCustomPackImageToolStripMenuItem.Name = "addCustomPackImageToolStripMenuItem";
|
||||
resources.ApplyResources(this.addCustomPackImageToolStripMenuItem, "addCustomPackImageToolStripMenuItem");
|
||||
this.addCustomPackImageToolStripMenuItem.Click += new System.EventHandler(this.addCustomPackIconToolStripMenuItem_Click);
|
||||
//
|
||||
// openPckManagerToolStripMenuItem
|
||||
//
|
||||
this.openPckManagerToolStripMenuItem.Name = "openPckManagerToolStripMenuItem";
|
||||
resources.ApplyResources(this.openPckManagerToolStripMenuItem, "openPckManagerToolStripMenuItem");
|
||||
this.openPckManagerToolStripMenuItem.Click += new System.EventHandler(this.openPckManagerToolStripMenuItem_Click);
|
||||
//
|
||||
// convertMusicFilesToolStripMenuItem
|
||||
//
|
||||
this.convertMusicFilesToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.miscToolStripMenuItem.ForeColor = System.Drawing.Color.Silver;
|
||||
this.miscToolStripMenuItem.Name = "miscToolStripMenuItem";
|
||||
resources.ApplyResources(this.miscToolStripMenuItem, "miscToolStripMenuItem");
|
||||
//
|
||||
// openPckManagerToolStripMenuItem
|
||||
//
|
||||
this.openPckManagerToolStripMenuItem.Name = "openPckManagerToolStripMenuItem";
|
||||
resources.ApplyResources(this.openPckManagerToolStripMenuItem, "openPckManagerToolStripMenuItem");
|
||||
this.openPckManagerToolStripMenuItem.Click += new System.EventHandler(this.openPckManagerToolStripMenuItem_Click);
|
||||
//
|
||||
// convertMusicFilesToolStripMenuItem
|
||||
//
|
||||
this.convertMusicFilesToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.wavBinkaToolStripMenuItem,
|
||||
this.binkaWavToolStripMenuItem});
|
||||
this.convertMusicFilesToolStripMenuItem.Name = "convertMusicFilesToolStripMenuItem";
|
||||
resources.ApplyResources(this.convertMusicFilesToolStripMenuItem, "convertMusicFilesToolStripMenuItem");
|
||||
//
|
||||
// wavBinkaToolStripMenuItem
|
||||
//
|
||||
this.wavBinkaToolStripMenuItem.Name = "wavBinkaToolStripMenuItem";
|
||||
resources.ApplyResources(this.wavBinkaToolStripMenuItem, "wavBinkaToolStripMenuItem");
|
||||
this.wavBinkaToolStripMenuItem.Click += new System.EventHandler(this.wavBinkaToolStripMenuItem_Click);
|
||||
//
|
||||
// binkaWavToolStripMenuItem
|
||||
//
|
||||
this.binkaWavToolStripMenuItem.Name = "binkaWavToolStripMenuItem";
|
||||
resources.ApplyResources(this.binkaWavToolStripMenuItem, "binkaWavToolStripMenuItem");
|
||||
this.binkaWavToolStripMenuItem.Click += new System.EventHandler(this.binkaWavToolStripMenuItem_Click);
|
||||
//
|
||||
// storeToolStripMenuItem
|
||||
//
|
||||
this.storeToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.convertMusicFilesToolStripMenuItem.Name = "convertMusicFilesToolStripMenuItem";
|
||||
resources.ApplyResources(this.convertMusicFilesToolStripMenuItem, "convertMusicFilesToolStripMenuItem");
|
||||
//
|
||||
// wavBinkaToolStripMenuItem
|
||||
//
|
||||
this.wavBinkaToolStripMenuItem.Name = "wavBinkaToolStripMenuItem";
|
||||
resources.ApplyResources(this.wavBinkaToolStripMenuItem, "wavBinkaToolStripMenuItem");
|
||||
this.wavBinkaToolStripMenuItem.Click += new System.EventHandler(this.wavBinkaToolStripMenuItem_Click);
|
||||
//
|
||||
// binkaWavToolStripMenuItem
|
||||
//
|
||||
this.binkaWavToolStripMenuItem.Name = "binkaWavToolStripMenuItem";
|
||||
resources.ApplyResources(this.binkaWavToolStripMenuItem, "binkaWavToolStripMenuItem");
|
||||
this.binkaWavToolStripMenuItem.Click += new System.EventHandler(this.binkaWavToolStripMenuItem_Click);
|
||||
//
|
||||
// storeToolStripMenuItem
|
||||
//
|
||||
this.storeToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.openPckCenterToolStripMenuItem,
|
||||
this.joinDevelopmentDiscordToolStripMenuItem,
|
||||
this.trelloBoardToolStripMenuItem});
|
||||
@@ -875,7 +859,6 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem folderToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem skinToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem createAnimatedTextureToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem convertToBedrockToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem storeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem openPckCenterToolStripMenuItem;
|
||||
private PckStudio.Controls.CustomTabControl tabControl;
|
||||
@@ -923,7 +906,6 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem viewFileInfoToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem correctSkinDecimalsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem miscToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem addCustomPackImageToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem CreateSkinsPCKToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem editAllEntriesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem addFileToolStripMenuItem;
|
||||
|
||||
@@ -153,8 +153,8 @@ namespace PckStudio
|
||||
var pack = new PckFile(3);
|
||||
|
||||
var zeroFile = pack.CreateNewFile("0", PckFileType.InfoFile);
|
||||
zeroFile.Properties.Add("PACKID", packId.ToString());
|
||||
zeroFile.Properties.Add("PACKVERSION", packVersion.ToString());
|
||||
zeroFile.AddProperty("PACKID", packId);
|
||||
zeroFile.AddProperty("PACKVERSION", packVersion);
|
||||
|
||||
var locFile = new LOCFile();
|
||||
locFile.InitializeDefault(packName);
|
||||
@@ -181,8 +181,8 @@ namespace PckStudio
|
||||
|
||||
var texturepackInfo = pack.CreateNewFile($"{res}/{res}Info.pck", PckFileType.TexturePackInfoFile);
|
||||
|
||||
texturepackInfo.Properties.Add("PACKID", "0");
|
||||
texturepackInfo.Properties.Add("DATAPATH", $"{res}Data.pck");
|
||||
texturepackInfo.AddProperty("PACKID", "0");
|
||||
texturepackInfo.AddProperty("DATAPATH", $"{res}Data.pck");
|
||||
|
||||
texturepackInfo.SetData(new PckFileWriter(infoPCK, LittleEndianCheckBox.Checked ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian));
|
||||
|
||||
@@ -346,7 +346,7 @@ namespace PckStudio
|
||||
//attempts to generate reimportable metadata file out of minefiles metadata
|
||||
string metaData = "";
|
||||
|
||||
foreach (var entry in file.Properties)
|
||||
foreach (var entry in file.GetProperties())
|
||||
{
|
||||
metaData += $"{entry.Key}: {entry.Value}{Environment.NewLine}";
|
||||
}
|
||||
@@ -393,11 +393,6 @@ namespace PckStudio
|
||||
//System.Diagnostics.Process.Start(hosturl + "pckStudio#faq");
|
||||
}
|
||||
|
||||
private void convertToBedrockToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("This feature is currently being reworked.", "Currently unavailable", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
private void openPckCenterToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("This feature is currently being reworked.", "Currently unavailable", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
@@ -522,91 +517,6 @@ namespace PckStudio
|
||||
}
|
||||
}
|
||||
|
||||
private void addCustomPackIconToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
string packID = "0";
|
||||
|
||||
using NumericPrompt numericPrompt = new NumericPrompt(0);
|
||||
numericPrompt.Minimum = 0; // TODO: put min pack ID value (keeping this 0 just to be safe)
|
||||
numericPrompt.Maximum = int.MinValue; // TODO: put max pack ID value
|
||||
numericPrompt.ContextLabel.Text = "Please insert the desired Pack ID";
|
||||
numericPrompt.TextLabel.Text = "Pack ID";
|
||||
|
||||
if (TryGetEditor(out var editor))
|
||||
{
|
||||
DialogResult prompt = MessageBox.Show(this,
|
||||
"Would you like to use the current PackID? You can enter any PackID if not.",
|
||||
"",
|
||||
MessageBoxButtons.YesNoCancel);
|
||||
|
||||
switch (prompt)
|
||||
{
|
||||
case DialogResult.Yes:
|
||||
if (!editor.Value.TryGetFile("0", PckFileType.InfoFile, out PckFileData file) ||
|
||||
string.IsNullOrEmpty(file.Properties.GetPropertyValue("PACKID")))
|
||||
{
|
||||
MessageBox.Show(this,
|
||||
"No PackID is present in this PCK. " +
|
||||
"To avoid this error, ensure that the PCK has a proper PackID property on the \"0\" Info file before trying again.",
|
||||
"Operation Aborted", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
packID = file.Properties.GetPropertyValue("PACKID");
|
||||
break;
|
||||
case DialogResult.No:
|
||||
break;
|
||||
case DialogResult.Cancel:
|
||||
default:
|
||||
MessageBox.Show(this, "Operation cancelled");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (numericPrompt.ShowDialog(this) == DialogResult.OK) packID = numericPrompt.SelectedValue.ToString();
|
||||
else
|
||||
{
|
||||
MessageBox.Show(this, "Operation cancelled");
|
||||
return;
|
||||
}
|
||||
|
||||
OpenFileDialog fileDialog = new OpenFileDialog();
|
||||
fileDialog.Filter = "Minecraft Archive|*.arc";
|
||||
if (fileDialog.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
var reader = new ARCFileReader();
|
||||
ConsoleArchive archive = reader.FromFile(fileDialog.FileName);
|
||||
|
||||
fileDialog.Filter = "Pack Icon|*.png";
|
||||
if (fileDialog.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
string key = string.Format("Graphics\\PackGraphics\\{0}.png", packID);
|
||||
|
||||
if (archive.Keys.Contains(key))
|
||||
{
|
||||
DialogResult prompt = MessageBox.Show(this,
|
||||
"This pack already has a pack icon present in the chosen file. Would you like to replace the pack icon?",
|
||||
"Icon already exists",
|
||||
MessageBoxButtons.YesNoCancel);
|
||||
switch (prompt)
|
||||
{
|
||||
case DialogResult.Yes:
|
||||
archive.Remove(key); // remove file so it can be injected
|
||||
break;
|
||||
case DialogResult.No:
|
||||
case DialogResult.Cancel:
|
||||
default:
|
||||
Trace.WriteLine("Operation cancelled", category: nameof(addCustomPackIconToolStripMenuItem_Click));
|
||||
return;
|
||||
}
|
||||
}
|
||||
archive.Add(key, File.ReadAllBytes(fileDialog.FileName));
|
||||
var writer = new ARCFileWriter(archive);
|
||||
writer.WriteToFile(fileDialog.FileName);
|
||||
MessageBox.Show($"Successfully added {key} to Archive!", "Successfully Added", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void trelloBoardToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start("https://trello.com/b/0XLNOEbe/pck-studio");
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="createToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>157, 22</value>
|
||||
</data>
|
||||
<data name="createToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Create</value>
|
||||
@@ -314,7 +314,7 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="importSkinsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>157, 22</value>
|
||||
</data>
|
||||
<data name="importSkinsToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Import</value>
|
||||
@@ -326,7 +326,7 @@
|
||||
<value>Export as 3DS Texture</value>
|
||||
</data>
|
||||
<data name="exportToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>157, 22</value>
|
||||
</data>
|
||||
<data name="exportToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Export</value>
|
||||
@@ -404,7 +404,7 @@
|
||||
<value>Entity Materials File (.BIN)</value>
|
||||
</data>
|
||||
<data name="setFileTypeToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>157, 22</value>
|
||||
</data>
|
||||
<data name="setFileTypeToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Set File Type</value>
|
||||
@@ -428,19 +428,19 @@
|
||||
<value>Correct Skin Decimals</value>
|
||||
</data>
|
||||
<data name="miscFunctionsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>157, 22</value>
|
||||
</data>
|
||||
<data name="miscFunctionsToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Misc. Functions</value>
|
||||
</data>
|
||||
<data name="moveUpToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>157, 22</value>
|
||||
</data>
|
||||
<data name="moveUpToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Move Up</value>
|
||||
</data>
|
||||
<data name="moveDownToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>157, 22</value>
|
||||
</data>
|
||||
<data name="moveDownToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Move Down</value>
|
||||
@@ -455,13 +455,13 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="extractToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>157, 22</value>
|
||||
</data>
|
||||
<data name="extractToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Extract</value>
|
||||
</data>
|
||||
<data name="cloneFileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>157, 22</value>
|
||||
</data>
|
||||
<data name="cloneFileToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Clone</value>
|
||||
@@ -474,7 +474,7 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="renameFileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>157, 22</value>
|
||||
</data>
|
||||
<data name="renameFileToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Rename</value>
|
||||
@@ -490,7 +490,7 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="replaceToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>157, 22</value>
|
||||
</data>
|
||||
<data name="replaceToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Replace</value>
|
||||
@@ -505,13 +505,13 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="deleteFileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>157, 22</value>
|
||||
</data>
|
||||
<data name="deleteFileToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
</data>
|
||||
<data name="contextMenuPCKEntries.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>181, 290</value>
|
||||
<value>158, 268</value>
|
||||
</data>
|
||||
<data name=">>contextMenuPCKEntries.Name" xml:space="preserve">
|
||||
<value>contextMenuPCKEntries</value>
|
||||
@@ -686,46 +686,14 @@
|
||||
<data name="quickChangeToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Quick Change</value>
|
||||
</data>
|
||||
<data name="convertToBedrockToolStripMenuItem.Enabled" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="convertToBedrockToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAAJeSURBVDhPhVFp
|
||||
TxNRFH1/RbGdlsQElaWzdaQgbadFtnkznWlLCm2Q2UCxTqdFFAzTRONSYheIoCjRpmoErBiKW/hi4q+q
|
||||
bxpoSPzgyfnw7r3nvHvveyD92W/UQ5l9Vt6h5B1S2/Wntnr1977lHxDltVr/7FtaqTLJbc/YU+f8x0GQ
|
||||
rgfmPgw9aoj390dX6uMSgWlVMvkGT7zqLR5PF34lzL3w9HZXunZNfuedr/nAw+9RnnZt/dHl1+SN2lWO
|
||||
cS3sDsVxbOEgsPwTFo9Tz38nRdIRK15MvvRIlBtIFKboSoTGRMp5e4+VaEeEdoi0Y2r7kkBjyqcBjsEW
|
||||
x3s4xomUWUiAkhoweLqiBRurEFLujVl/lvfkICESFyK0M0qc1xU5KxAlOSzQbtuQm+iWiHMVjd2Q++9A
|
||||
b0X3C2SHSHYIpNPgGZMnRbIzLeBZrs8QmH1rEuw+iEVo1xLfl+O6nqzcvQd7MpDay6cQm2fwTBnO8sQL
|
||||
xQcaFq+GLm/eGtm8OfY4N2NN+VBhbWawmhmzhQDYbDatSSafGECDgC/WFFLUrdTBanRNGUbLoDADiTVt
|
||||
5KwBJQvaaFG9Dspq0Ji4YghEWQtlJvCCHLJ1bZwa2rANJZ2VvO5FAUdEh1a6pfuXJ4a5EdTxWz6GaPL4
|
||||
fw0hkydysK+khdFUh5ZkG9o41bUBDA6HjGsd7Qo9ZR0tzR5ZcdRwietu1U8M6NKv+XjDioIM5ylqYfRB
|
||||
izwRoZwmpCoqW9KDJjwzW7N5aMXLGoveEBRV1uQ9EarzKB/LQlyiXOj/JS+GmtiGU6BwXQ2sa8G/5oRp
|
||||
fQPDL0EAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="convertToBedrockToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>192, 22</value>
|
||||
</data>
|
||||
<data name="convertToBedrockToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Convert to Bedrock</value>
|
||||
</data>
|
||||
<data name="editToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>39, 20</value>
|
||||
</data>
|
||||
<data name="editToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Edit</value>
|
||||
</data>
|
||||
<data name="addCustomPackImageToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>195, 22</value>
|
||||
</data>
|
||||
<data name="addCustomPackImageToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Add Custom Pack Icon</value>
|
||||
</data>
|
||||
<data name="openPckManagerToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>195, 22</value>
|
||||
<value>180, 22</value>
|
||||
</data>
|
||||
<data name="openPckManagerToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Pck Manager</value>
|
||||
@@ -743,7 +711,7 @@
|
||||
<value>Binka -> Wav</value>
|
||||
</data>
|
||||
<data name="convertMusicFilesToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>195, 22</value>
|
||||
<value>180, 22</value>
|
||||
</data>
|
||||
<data name="convertMusicFilesToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Audio Converter</value>
|
||||
@@ -25404,24 +25372,12 @@
|
||||
<data name=">>quickChangeToolStripMenuItem.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=">>convertToBedrockToolStripMenuItem.Name" xml:space="preserve">
|
||||
<value>convertToBedrockToolStripMenuItem</value>
|
||||
</data>
|
||||
<data name=">>convertToBedrockToolStripMenuItem.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=">>miscToolStripMenuItem.Name" xml:space="preserve">
|
||||
<value>miscToolStripMenuItem</value>
|
||||
</data>
|
||||
<data name=">>miscToolStripMenuItem.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=">>addCustomPackImageToolStripMenuItem.Name" xml:space="preserve">
|
||||
<value>addCustomPackImageToolStripMenuItem</value>
|
||||
</data>
|
||||
<data name=">>addCustomPackImageToolStripMenuItem.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=">>openPckManagerToolStripMenuItem.Name" xml:space="preserve">
|
||||
<value>openPckManagerToolStripMenuItem</value>
|
||||
</data>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<PropertyGroup>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<DisableFody Condition="'$(Configuration)' == 'Debug'">true</DisableFody>
|
||||
<DefineConstants Condition="'$(Configuration)' != 'Debug'">NDEBUG</DefineConstants>
|
||||
<DefineConstants Condition="'$(Configuration)' != 'Debug'">NDEBUG</DefineConstants>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
@@ -133,12 +133,18 @@
|
||||
<Reference Include="WindowsFormsIntegration" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Extensions\LocFileExtensions.cs" />
|
||||
<Compile Include="Extensions\PckFileDataExtensions.cs" />
|
||||
<Compile Include="Extensions\TreeNodeExtensions.cs" />
|
||||
<Compile Include="Helper\AnimationHelper.cs" />
|
||||
<Compile Include="Internal\AnimationCategory.cs" />
|
||||
<Compile Include="Internal\SkinAnimFlag.cs" />
|
||||
<Compile Include="Internal\SkinAnimMask.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ToolboxItems\BlendPictureBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@@ -470,6 +476,7 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Additional-Popups\EntityForms\AddEntry.resx">
|
||||
<DependentUpon>AddEntry.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Additional-Popups\Loc\AddLanguage.resx">
|
||||
<DependentUpon>AddLanguage.cs</DependentUpon>
|
||||
@@ -545,6 +552,7 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Additional-Popups\Grf\AddParameter.resx">
|
||||
<DependentUpon>AddParameter.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Additional-Popups\InProgressPrompt.resx">
|
||||
<DependentUpon>InProgressPrompt.cs</DependentUpon>
|
||||
@@ -625,11 +633,6 @@
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
@@ -640,7 +643,16 @@
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\entityData.json" />
|
||||
<None Include="Resources\atlases\bannerData.json" />
|
||||
<None Include="Resources\atlases\blockData.json" />
|
||||
<None Include="Resources\atlases\entityData.json" />
|
||||
<None Include="Resources\atlases\experienceOrbData.json" />
|
||||
<None Include="Resources\atlases\explosionData.json" />
|
||||
<None Include="Resources\atlases\itemData.json" />
|
||||
<None Include="Resources\atlases\mapIconData.json" />
|
||||
<None Include="Resources\atlases\moonPhaseData.json" />
|
||||
<None Include="Resources\atlases\paintingData.json" />
|
||||
<None Include="Resources\atlases\particleData.json" />
|
||||
<None Include="Resources\TexturePackIcon.png" />
|
||||
<None Include="Resources\binka\binkawin.asi" />
|
||||
<None Include="Resources\fileTemplates\1.91_colours.col" />
|
||||
@@ -656,16 +668,13 @@
|
||||
<None Include="Resources\fileTemplates\tu53colours.col" />
|
||||
<None Include="Resources\fileTemplates\tu54colours.col" />
|
||||
<None Include="Resources\fileTemplates\tu69colours.col" />
|
||||
<None Include="Resources\tileData.json" />
|
||||
<None Include="Resources\external\Youtube.png" />
|
||||
<None Include="Resources\pckClosed.png" />
|
||||
<None Include="Resources\external\Discord.png" />
|
||||
<None Include="Resources\icons\clock.png" />
|
||||
<None Include="Resources\changeTile.png" />
|
||||
<None Include="Resources\items.png" />
|
||||
<None Include="Resources\HamburgerMenuIcon.png" />
|
||||
<None Include="Resources\pack.png" />
|
||||
<None Include="Resources\terrain.png" />
|
||||
<None Include="Resources\external\Xbox.png" />
|
||||
<None Include="Resources\external\PS3.png" />
|
||||
<None Include="Resources\external\WiiU.png" />
|
||||
@@ -691,7 +700,17 @@
|
||||
<None Include="Resources\Comparison.png" />
|
||||
<None Include="Resources\iconImageList\ENTITY MATERIALS ICON.png" />
|
||||
<None Include="Resources\iconImageList\blank.png" />
|
||||
<None Include="Resources\entities.png" />
|
||||
<None Include="Resources\atlases\additional_mapicons.png" />
|
||||
<None Include="Resources\atlases\map_icons.png" />
|
||||
<None Include="Resources\atlases\banners.png" />
|
||||
<Content Include="Resources\atlases\entities.png" />
|
||||
<None Include="Resources\atlases\experience_orbs.png" />
|
||||
<None Include="Resources\atlases\explosion.png" />
|
||||
<Content Include="Resources\atlases\items.png" />
|
||||
<Content Include="Resources\atlases\moon_phases.png" />
|
||||
<None Include="Resources\atlases\particles.png" />
|
||||
<None Include="Resources\atlases\paintings.png" />
|
||||
<Content Include="Resources\atlases\terrain.png" />
|
||||
<Content Include="Resources\icons\file_delete.png" />
|
||||
<Content Include="Resources\icons\file_empty.png" />
|
||||
<None Include="Resources\icons\file_export.png" />
|
||||
|
||||
416
PCK-Studio/Properties/Resources.Designer.cs
generated
@@ -70,6 +70,16 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap additional_map_icons_atlas {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("additional_map_icons_atlas", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -90,6 +100,53 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "COMMENT_1": "JSON by MattNL",
|
||||
/// "banners": [
|
||||
/// {
|
||||
/// "internalName": "base",
|
||||
/// "displayName": "Base"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "border",
|
||||
/// "displayName": "Bordure"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "bricks",
|
||||
/// "displayName": "Field Masoned"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "circle",
|
||||
/// "displayName": "Roundel"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "creeper",
|
||||
/// "displayName": "Creeper Charge"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "cross",
|
||||
/// "displayName": "Saltire"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "curly_bo [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string bannerData {
|
||||
get {
|
||||
return ResourceManager.GetString("bannerData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap banners_atlas {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("banners_atlas", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -140,6 +197,38 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "COMMENT_1": "Tile data research by MattNL",
|
||||
/// "COMMENT_2": "JSON by PhoenixARC, MattNL, and NessieHax (Miku-666)",
|
||||
/// "blocks": [
|
||||
/// {
|
||||
/// "internalName": "grass_top",
|
||||
/// "displayName": "Grass Block (Top)",
|
||||
/// "hasColourEntry": true,
|
||||
/// "colourEntry": {
|
||||
/// "defaultName": "Grass_Common",
|
||||
/// "variants": [
|
||||
/// "Grass_Common",
|
||||
/// "Grass_Mesa",
|
||||
/// "Grass_Swamp1",
|
||||
/// "Grass_Swamp2"
|
||||
/// ]
|
||||
/// }
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "stone",
|
||||
/// "displayName": "Stone"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string blockData {
|
||||
get {
|
||||
return ResourceManager.GetString("blockData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -235,9 +324,9 @@ namespace PckStudio.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap entities_sheet {
|
||||
public static System.Drawing.Bitmap entities_atlas {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("entities_sheet", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("entities_atlas", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -284,6 +373,87 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap experience_orbs_atlas {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("experience_orbs_atlas", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "COMMENT_1": "JSON by MattNL",
|
||||
/// "experience_orbs": [
|
||||
/// {
|
||||
/// "internalName": "experience_orb_0",
|
||||
/// "displayName": "Experience Orb (Size 1)",
|
||||
/// "hasColourEntry": true,
|
||||
/// "colourEntry": {
|
||||
/// "defaultName": "experience_orb",
|
||||
/// "variants": ["experience_orb"]
|
||||
/// }
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "experience_orb_1",
|
||||
/// "displayName": "Experience Orb (Size 2)",
|
||||
/// "hasColourEntry": true,
|
||||
/// "colourEntry": {
|
||||
/// "defaultName": "experience_orb",
|
||||
/// "variants": ["experience_orb"]
|
||||
/// }
|
||||
/// },
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string experienceOrbData {
|
||||
get {
|
||||
return ResourceManager.GetString("experienceOrbData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "COMMENT_1": "JSON by MattNL",
|
||||
/// "explosions": [
|
||||
/// {
|
||||
/// "internalName": "explosion_0",
|
||||
/// "displayName": "Explosion (Stage 1)",
|
||||
/// "hasColourEntry": true,
|
||||
/// "colourEntry": {
|
||||
/// "defaultName": "Particle_Explode",
|
||||
/// "variants": [
|
||||
/// "Particle_Explode",
|
||||
/// "Particle_HugeExplosion"
|
||||
/// ]
|
||||
/// }
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "explosion_1",
|
||||
/// "displayName": "Explosion (Stage 2)",
|
||||
/// "hasColourEntry": true,
|
||||
/// "colourEntry": {
|
||||
/// "defaultName": "Particle_Explode",
|
||||
/// "variants": [
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string explosionData {
|
||||
get {
|
||||
return ResourceManager.GetString("explosionData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap explosions_atlas {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("explosions_atlas", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -384,12 +554,40 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "COMMENT_1": "Tile data research by MattNL",
|
||||
/// "COMMENT_2": "JSON by PhoenixARC, MattNL, and NessieHax (Miku-666)",
|
||||
/// "items": [
|
||||
/// {
|
||||
/// "internalName": "helmetCloth",
|
||||
/// "displayName": "Leather Cap",
|
||||
/// "hasColourEntry": true,
|
||||
/// "colourEntry": {
|
||||
/// "hasCustomColour": true,
|
||||
/// "defaultName": "Armour_Default_Leather_Colour",
|
||||
/// "variants": [ "Armour_Default_Leather_Colour" ]
|
||||
/// }
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "helmetChain",
|
||||
/// "displayName": "Chain Helmet"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "he [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string itemData {
|
||||
get {
|
||||
return ResourceManager.GetString("itemData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap items_sheet {
|
||||
public static System.Drawing.Bitmap items_atlas {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("items_sheet", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("items_atlas", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -404,6 +602,53 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap map_icons_atlas {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("map_icons_atlas", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "COMMENT_1": "JSON by MattNL",
|
||||
/// "map_icons": [
|
||||
/// {
|
||||
/// "internalName": "player_1",
|
||||
/// "displayName": "Player 1"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "player_2",
|
||||
/// "displayName": "Player 2"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "player_3",
|
||||
/// "displayName": "Player 3"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "player_4",
|
||||
/// "displayName": "Player 4"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "target_x",
|
||||
/// "displayName": "Unused"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "target_point",
|
||||
/// "displayName": "Target Point (Unused)"
|
||||
/// },
|
||||
/// {
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string mapIconData {
|
||||
get {
|
||||
return ResourceManager.GetString("mapIconData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -414,6 +659,50 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap moon_phases_atlas {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("moon_phases_atlas", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "COMMENT_1": "JSON by MattNL",
|
||||
/// "moon_phases": [
|
||||
/// {
|
||||
/// "internalName": "moon_phase_0",
|
||||
/// "displayName": "Full Moon"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "moon_phase_1",
|
||||
/// "displayName": "Waning Gibbous"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "moon_phase_2",
|
||||
/// "displayName": "Last Quarter"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "moon_phase_3",
|
||||
/// "displayName": "Waning Crescent"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "moon_phase_4",
|
||||
/// "displayName": "New Moon"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "moon_phase_5",
|
||||
/// "displayNa [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string moonPhaseData {
|
||||
get {
|
||||
return ResourceManager.GetString("moonPhaseData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
@@ -454,6 +743,87 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "COMMENT_1": "JSON by MattNL",
|
||||
/// "paintings": [
|
||||
/// {
|
||||
/// "internalName": "Kebab",
|
||||
/// "displayName": "\"Kebab med tre pepperoni\" by Kristoffer Zetterstrand"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "Aztec",
|
||||
/// "displayName": "\"de_aztec\" by Kristoffer Zetterstrand"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "Alban",
|
||||
/// "displayName": "\"Albanian\" by Kristoffer Zetterstrand"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "Aztec2",
|
||||
/// "displayName": "\"de_aztec\" by Kristoffer Zetterstrand"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "Bomb",
|
||||
/// "di [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string paintingData {
|
||||
get {
|
||||
return ResourceManager.GetString("paintingData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap paintings_atlas {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("paintings_atlas", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "COMMENT_1": "JSON by MattNL",
|
||||
/// "particles": [
|
||||
/// {
|
||||
/// "internalName": "generic_0",
|
||||
/// "displayName": "Generic (Stage 1)",
|
||||
/// "hasColourEntry": true,
|
||||
/// "colourEntry": {
|
||||
/// "defaultName": "None",
|
||||
/// "variants": [
|
||||
/// "None",
|
||||
/// "Particle_Smoke",
|
||||
/// "Particle_NetherPortal",
|
||||
/// "Particle_EnderPortal",
|
||||
/// "Particle_Ender",
|
||||
/// "Particle_DragonBreathMin",
|
||||
/// "Particle_DragonBreathMax"
|
||||
/// ]
|
||||
/// }
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "generic_1",
|
||||
/// "displayName": "Generic (Stage 2)", [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string particleData {
|
||||
get {
|
||||
return ResourceManager.GetString("particleData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap particles_atlas {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("particles_atlas", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -587,9 +957,9 @@ namespace PckStudio.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap terrain_sheet {
|
||||
public static System.Drawing.Bitmap terrain_atlas {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("terrain_sheet", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("terrain_atlas", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -614,40 +984,6 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {
|
||||
/// "COMMENT_1": "Tile data research by MattNL",
|
||||
/// "COMMENT_2": "JSON conversion by PhoenixARC",
|
||||
/// "blocks": [
|
||||
/// {
|
||||
/// "internalName": "grass_top",
|
||||
/// "displayName": "Grass Block (Top)"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "stone",
|
||||
/// "displayName": "Stone"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "dirt",
|
||||
/// "displayName": "Dirt"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "grass_side",
|
||||
/// "displayName": "Grass Block (Side)"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": "planks_oak",
|
||||
/// "displayName": "Oak Planks"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string tileData {
|
||||
get {
|
||||
return ResourceManager.GetString("tileData", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
|
||||
@@ -172,9 +172,6 @@
|
||||
<data name="GRH_ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\iconImageList\GRH ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="tileData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\tileData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="pckClosed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\pckClosed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -226,8 +223,8 @@
|
||||
<data name="INFO_ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\iconImageList\INFO ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="terrain_sheet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\terrain.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="terrain_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\terrain.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="tu53colours" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileTemplates\tu53colours.col;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
@@ -235,8 +232,8 @@
|
||||
<data name="clock" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\clock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="items_sheet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\items.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="items_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\items.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="CHANGELOG" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\..\CHANGELOG.md;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
@@ -280,11 +277,11 @@
|
||||
<data name="blank" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\iconImageList\blank.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="entities_sheet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\entities.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="entities_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\entities.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="entityData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\entityData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
<value>..\Resources\atlases\entityData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="file_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\file_delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@@ -328,4 +325,55 @@
|
||||
<data name="ProjectLogo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\..\ProjectLogo.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="moon_phases_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\moon_phases.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="additional_map_icons_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\additional_mapicons.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="map_icons_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\map_icons.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="experience_orbs_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\experience_orbs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="blockData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\blockData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="experienceOrbData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\experienceOrbData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="explosionData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\explosionData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="explosions_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\explosion.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="itemData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\itemData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="mapIconData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\mapIconData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="moonPhaseData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\moonPhaseData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="particleData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\particleData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="particles_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\particles.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="bannerData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\bannerData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="banners_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\banners.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="paintingData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\paintingData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="paintings_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\paintings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
PCK-Studio/Resources/atlases/additional_mapicons.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
1053
PCK-Studio/Resources/atlases/bannerData.json
Normal file
BIN
PCK-Studio/Resources/atlases/banners.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
PCK-Studio/Resources/atlases/entities.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
@@ -225,7 +225,7 @@
|
||||
{ "": "" },
|
||||
{ "": "" },
|
||||
{ "villager": "Villager (PS4 EXCLUSIVE)" },
|
||||
{ "zombie_villager": "Villager (PS4 EXCLUSIVE)" },
|
||||
{ "zombie_villager": "Zombie Villager (PS4 EXCLUSIVE)" },
|
||||
{ "": "" },
|
||||
{ "phantom_invisible": "Phantom (Second Layer)" },
|
||||
{ "enderman_invisible": "Enderman (Second Layer)" },
|
||||
124
PCK-Studio/Resources/atlases/experienceOrbData.json
Normal file
@@ -0,0 +1,124 @@
|
||||
{
|
||||
"COMMENT_1": "JSON by MattNL",
|
||||
"entries": [
|
||||
{
|
||||
"internalName": "experience_orb_0",
|
||||
"displayName": "Experience Orb (Size 1)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "experience_orb",
|
||||
"variants": ["experience_orb"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "experience_orb_1",
|
||||
"displayName": "Experience Orb (Size 2)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "experience_orb",
|
||||
"variants": ["experience_orb"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "experience_orb_2",
|
||||
"displayName": "Experience Orb (Size 3)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "experience_orb",
|
||||
"variants": ["experience_orb"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "experience_orb_3",
|
||||
"displayName": "Experience Orb (Size 4)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "experience_orb",
|
||||
"variants": ["experience_orb"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "experience_orb_4",
|
||||
"displayName": "Experience Orb (Size 5)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "experience_orb",
|
||||
"variants": ["experience_orb"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "experience_orb_5",
|
||||
"displayName": "Experience Orb (Size 6)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "experience_orb",
|
||||
"variants": ["experience_orb"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "experience_orb_6",
|
||||
"displayName": "Experience Orb (Size 7)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "experience_orb",
|
||||
"variants": ["experience_orb"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "experience_orb_7",
|
||||
"displayName": "Experience Orb (Size 8)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "experience_orb",
|
||||
"variants": ["experience_orb"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "experience_orb_8",
|
||||
"displayName": "Experience Orb (Size 9)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "experience_orb",
|
||||
"variants": ["experience_orb"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "experience_orb_9",
|
||||
"displayName": "Experience Orb (Size 10)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "experience_orb",
|
||||
"variants": ["experience_orb"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "experience_orb_10",
|
||||
"displayName": "Experience Orb (Size 11)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "experience_orb",
|
||||
"variants": ["experience_orb"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "",
|
||||
"displayName": ""
|
||||
},
|
||||
{
|
||||
"internalName": "",
|
||||
"displayName": ""
|
||||
},
|
||||
{
|
||||
"internalName": "",
|
||||
"displayName": ""
|
||||
},
|
||||
{
|
||||
"internalName": "",
|
||||
"displayName": ""
|
||||
},
|
||||
{
|
||||
"internalName": "",
|
||||
"displayName": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
PCK-Studio/Resources/atlases/experience_orbs.png
Normal file
|
After Width: | Height: | Size: 583 B |
BIN
PCK-Studio/Resources/atlases/explosion.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
197
PCK-Studio/Resources/atlases/explosionData.json
Normal file
@@ -0,0 +1,197 @@
|
||||
{
|
||||
"COMMENT_1": "JSON by MattNL",
|
||||
"entries": [
|
||||
{
|
||||
"internalName": "explosion_0",
|
||||
"displayName": "Explosion (Stage 1)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_1",
|
||||
"displayName": "Explosion (Stage 2)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_2",
|
||||
"displayName": "Explosion (Stage 3)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_3",
|
||||
"displayName": "Explosion (Stage 4)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_4",
|
||||
"displayName": "Explosion (Stage 5)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_5",
|
||||
"displayName": "Explosion (Stage 6)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_6",
|
||||
"displayName": "Explosion (Stage 7)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_7",
|
||||
"displayName": "Explosion (Stage 8)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_8",
|
||||
"displayName": "Explosion (Stage 9)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_9",
|
||||
"displayName": "Explosion (Stage 10)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_10",
|
||||
"displayName": "Explosion (Stage 11)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_11",
|
||||
"displayName": "Explosion (Stage 12)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_12",
|
||||
"displayName": "Explosion (Stage 13)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_13",
|
||||
"displayName": "Explosion (Stage 14)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_14",
|
||||
"displayName": "Explosion (Stage 15)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"internalName": "explosion_15",
|
||||
"displayName": "Explosion (Stage 16)",
|
||||
"hasColourEntry": true,
|
||||
"colourEntry": {
|
||||
"defaultName": "Particle_Explode",
|
||||
"variants": [
|
||||
"Particle_Explode",
|
||||
"Particle_HugeExplosion"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1366
PCK-Studio/Resources/atlases/itemData.json
Normal file
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
135
PCK-Studio/Resources/atlases/mapIconData.json
Normal file
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"COMMENT_1": "JSON by MattNL",
|
||||
"entries": [
|
||||
{
|
||||
"internalName": "player_1",
|
||||
"displayName": "Player 1"
|
||||
},
|
||||
{
|
||||
"internalName": "player_2",
|
||||
"displayName": "Player 2"
|
||||
},
|
||||
{
|
||||
"internalName": "player_3",
|
||||
"displayName": "Player 3"
|
||||
},
|
||||
{
|
||||
"internalName": "player_4",
|
||||
"displayName": "Player 4"
|
||||
},
|
||||
{
|
||||
"internalName": "target_x",
|
||||
"displayName": "Unused"
|
||||
},
|
||||
{
|
||||
"internalName": "target_point",
|
||||
"displayName": "Target Point (Unused)"
|
||||
},
|
||||
{
|
||||
"internalName": "player_off_map",
|
||||
"displayName": "Player (Off Map) (Unused)"
|
||||
},
|
||||
{
|
||||
"internalName": "frame",
|
||||
"displayName": "Item Frame"
|
||||
},
|
||||
{
|
||||
"internalName": "player_5",
|
||||
"displayName": "Player 5"
|
||||
},
|
||||
{
|
||||
"internalName": "player_6",
|
||||
"displayName": "Player 6"
|
||||
},
|
||||
{
|
||||
"internalName": "player_7",
|
||||
"displayName": "Player 7"
|
||||
},
|
||||
{
|
||||
"internalName": "player_8",
|
||||
"displayName": "Player 8"
|
||||
},
|
||||
{
|
||||
"internalName": "structure",
|
||||
"displayName": "Structure (Explorer Map)"
|
||||
},
|
||||
{
|
||||
"internalName": "player_off_limits",
|
||||
"displayName": "Player (Off Limits) (Unused)"
|
||||
},
|
||||
{
|
||||
"internalName": "mansion",
|
||||
"displayName": "Woodland Mansion (Explorer Map)"
|
||||
},
|
||||
{
|
||||
"internalName": "monument",
|
||||
"displayName": "Ocean Monument (Explorer Map)"
|
||||
}
|
||||
],
|
||||
"additional_entries": [
|
||||
{
|
||||
"internalName": "player_1_off_map",
|
||||
"displayName": "Player 1 (Off Map)"
|
||||
},
|
||||
{
|
||||
"internalName": "player_2_off_map",
|
||||
"displayName": "Player 2 (Off Map)"
|
||||
},
|
||||
{
|
||||
"internalName": "player_3_off_map",
|
||||
"displayName": "Player 3 (Off Map)"
|
||||
},
|
||||
{
|
||||
"internalName": "player_4_off_map",
|
||||
"displayName": "Player 4 (Off Map)"
|
||||
},
|
||||
{
|
||||
"internalName": "treasure",
|
||||
"displayName": "Buried Treasure"
|
||||
},
|
||||
{
|
||||
"internalName": "",
|
||||
"displayName": ""
|
||||
},
|
||||
{
|
||||
"internalName": "",
|
||||
"displayName": ""
|
||||
},
|
||||
{
|
||||
"internalName": "",
|
||||
"displayName": ""
|
||||
},
|
||||
{
|
||||
"internalName": "player_5_off_map",
|
||||
"displayName": "Player 5 (Off Map)"
|
||||
},
|
||||
{
|
||||
"internalName": "player_6_off_map",
|
||||
"displayName": "Player 6 (Off Map)"
|
||||
},
|
||||
{
|
||||
"internalName": "player_7_off_map",
|
||||
"displayName": "Player 7 (Off Map)"
|
||||
},
|
||||
{
|
||||
"internalName": "player_8_off_map",
|
||||
"displayName": "Player 8 (Off Map)"
|
||||
},
|
||||
{
|
||||
"internalName": "",
|
||||
"displayName": ""
|
||||
},
|
||||
{
|
||||
"internalName": "",
|
||||
"displayName": ""
|
||||
},
|
||||
{
|
||||
"internalName": "",
|
||||
"displayName": ""
|
||||
},
|
||||
{
|
||||
"internalName": "",
|
||||
"displayName": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
PCK-Studio/Resources/atlases/map_icons.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
37
PCK-Studio/Resources/atlases/moonPhaseData.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"COMMENT_1": "JSON by MattNL",
|
||||
"entries": [
|
||||
{
|
||||
"internalName": "moon_phase_0",
|
||||
"displayName": "Full Moon"
|
||||
},
|
||||
{
|
||||
"internalName": "moon_phase_1",
|
||||
"displayName": "Waning Gibbous"
|
||||
},
|
||||
{
|
||||
"internalName": "moon_phase_2",
|
||||
"displayName": "Last Quarter"
|
||||
},
|
||||
{
|
||||
"internalName": "moon_phase_3",
|
||||
"displayName": "Waning Crescent"
|
||||
},
|
||||
{
|
||||
"internalName": "moon_phase_4",
|
||||
"displayName": "New Moon"
|
||||
},
|
||||
{
|
||||
"internalName": "moon_phase_5",
|
||||
"displayName": "Waxing Crescent"
|
||||
},
|
||||
{
|
||||
"internalName": "moon_phase_6",
|
||||
"displayName": "First Quarter"
|
||||
},
|
||||
{
|
||||
"internalName": "moon_phase_7",
|
||||
"displayName": "Waxing Gibbous"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
PCK-Studio/Resources/atlases/moon_phases.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
1062
PCK-Studio/Resources/atlases/paintingData.json
Normal file
BIN
PCK-Studio/Resources/atlases/paintings.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
2112
PCK-Studio/Resources/atlases/particleData.json
Normal file
BIN
PCK-Studio/Resources/atlases/particles.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
|
Before Width: | Height: | Size: 45 KiB |