mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-09-23 09:53:12 +00:00
Changed default PCK endianness to little
-Changed "Save as PS4/Switch/Vita PCK" checkbox to list old gen platforms instead to reflect this change
This commit is contained in:
@@ -62,7 +62,7 @@
|
|||||||
<setting name="AutoSaveChanges" serializeAs="String">
|
<setting name="AutoSaveChanges" serializeAs="String">
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="UseLittleEndianAsDefault" serializeAs="String">
|
<setting name="UseBigEndianAsDefault" serializeAs="String">
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="LoadSubPcks" serializeAs="String">
|
<setting name="LoadSubPcks" serializeAs="String">
|
||||||
|
|||||||
+22
-22
@@ -47,8 +47,9 @@ namespace PckStudio.Controls
|
|||||||
this.contextMenuParameterTree = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.contextMenuParameterTree = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.addParameterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.addParameterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.addParameterToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
this.addParameterToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.addBOXEntryToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.addANIMEntryToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
this.addANIMEntryToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.addBOXEntryToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.addOFFSETParameterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.addMultipleEntriesToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
this.addMultipleEntriesToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.deleteEntryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.deleteEntryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.editAllEntriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.editAllEntriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
@@ -112,9 +113,8 @@ namespace PckStudio.Controls
|
|||||||
this.deleteFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.deleteFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.imageList = new System.Windows.Forms.ImageList(this.components);
|
this.imageList = new System.Windows.Forms.ImageList(this.components);
|
||||||
this.addMultipleEntriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.addMultipleEntriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.LittleEndianCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
this.BigEndianCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||||
this.previewPictureBox = new PckStudio.ToolboxItems.InterpolationPictureBox();
|
this.previewPictureBox = new PckStudio.ToolboxItems.InterpolationPictureBox();
|
||||||
this.addOFFSETParameterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
logoPictureBox = new System.Windows.Forms.PictureBox();
|
logoPictureBox = new System.Windows.Forms.PictureBox();
|
||||||
((System.ComponentModel.ISupportInitialize)(logoPictureBox)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(logoPictureBox)).BeginInit();
|
||||||
this.ParametersTabControl.SuspendLayout();
|
this.ParametersTabControl.SuspendLayout();
|
||||||
@@ -297,17 +297,23 @@ namespace PckStudio.Controls
|
|||||||
resources.ApplyResources(this.addParameterToolStripMenuItem1, "addParameterToolStripMenuItem1");
|
resources.ApplyResources(this.addParameterToolStripMenuItem1, "addParameterToolStripMenuItem1");
|
||||||
this.addParameterToolStripMenuItem1.Click += new System.EventHandler(this.addParameterToolStripMenuItem_Click);
|
this.addParameterToolStripMenuItem1.Click += new System.EventHandler(this.addParameterToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
// addANIMEntryToolStripMenuItem1
|
||||||
|
//
|
||||||
|
this.addANIMEntryToolStripMenuItem1.Name = "addANIMEntryToolStripMenuItem1";
|
||||||
|
resources.ApplyResources(this.addANIMEntryToolStripMenuItem1, "addANIMEntryToolStripMenuItem1");
|
||||||
|
this.addANIMEntryToolStripMenuItem1.Click += new System.EventHandler(this.addSkinAdjustmentParametersToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// addBOXEntryToolStripMenuItem1
|
// addBOXEntryToolStripMenuItem1
|
||||||
//
|
//
|
||||||
this.addBOXEntryToolStripMenuItem1.Name = "addBOXEntryToolStripMenuItem1";
|
this.addBOXEntryToolStripMenuItem1.Name = "addBOXEntryToolStripMenuItem1";
|
||||||
resources.ApplyResources(this.addBOXEntryToolStripMenuItem1, "addBOXEntryToolStripMenuItem1");
|
resources.ApplyResources(this.addBOXEntryToolStripMenuItem1, "addBOXEntryToolStripMenuItem1");
|
||||||
this.addBOXEntryToolStripMenuItem1.Click += new System.EventHandler(this.addBOXParameterToolStripMenuItem1_Click);
|
this.addBOXEntryToolStripMenuItem1.Click += new System.EventHandler(this.addBOXParameterToolStripMenuItem1_Click);
|
||||||
//
|
//
|
||||||
// addANIMEntryToolStripMenuItem1
|
// addOFFSETParameterToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.addANIMEntryToolStripMenuItem1.Name = "addANIMEntryToolStripMenuItem1";
|
this.addOFFSETParameterToolStripMenuItem.Name = "addOFFSETParameterToolStripMenuItem";
|
||||||
resources.ApplyResources(this.addANIMEntryToolStripMenuItem1, "addANIMEntryToolStripMenuItem1");
|
resources.ApplyResources(this.addOFFSETParameterToolStripMenuItem, "addOFFSETParameterToolStripMenuItem");
|
||||||
this.addANIMEntryToolStripMenuItem1.Click += new System.EventHandler(this.addSkinAdjustmentParametersToolStripMenuItem_Click);
|
this.addOFFSETParameterToolStripMenuItem.Click += new System.EventHandler(this.addOFFSETParameterToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// addMultipleEntriesToolStripMenuItem1
|
// addMultipleEntriesToolStripMenuItem1
|
||||||
//
|
//
|
||||||
@@ -765,14 +771,14 @@ namespace PckStudio.Controls
|
|||||||
resources.ApplyResources(this.addMultipleEntriesToolStripMenuItem, "addMultipleEntriesToolStripMenuItem");
|
resources.ApplyResources(this.addMultipleEntriesToolStripMenuItem, "addMultipleEntriesToolStripMenuItem");
|
||||||
this.addMultipleEntriesToolStripMenuItem.Name = "addMultipleEntriesToolStripMenuItem";
|
this.addMultipleEntriesToolStripMenuItem.Name = "addMultipleEntriesToolStripMenuItem";
|
||||||
//
|
//
|
||||||
// LittleEndianCheckBox
|
// BigEndianCheckBox
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.LittleEndianCheckBox, "LittleEndianCheckBox");
|
resources.ApplyResources(this.BigEndianCheckBox, "BigEndianCheckBox");
|
||||||
this.LittleEndianCheckBox.BackColor = System.Drawing.Color.Transparent;
|
this.BigEndianCheckBox.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.LittleEndianCheckBox.Name = "LittleEndianCheckBox";
|
this.BigEndianCheckBox.Name = "BigEndianCheckBox";
|
||||||
this.LittleEndianCheckBox.Style = MetroFramework.MetroColorStyle.White;
|
this.BigEndianCheckBox.Style = MetroFramework.MetroColorStyle.White;
|
||||||
this.LittleEndianCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
this.BigEndianCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||||
this.LittleEndianCheckBox.UseSelectable = true;
|
this.BigEndianCheckBox.UseSelectable = true;
|
||||||
//
|
//
|
||||||
// previewPictureBox
|
// previewPictureBox
|
||||||
//
|
//
|
||||||
@@ -784,18 +790,12 @@ namespace PckStudio.Controls
|
|||||||
this.previewPictureBox.Name = "previewPictureBox";
|
this.previewPictureBox.Name = "previewPictureBox";
|
||||||
this.previewPictureBox.TabStop = false;
|
this.previewPictureBox.TabStop = false;
|
||||||
//
|
//
|
||||||
// addOFFSETParameterToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.addOFFSETParameterToolStripMenuItem.Name = "addOFFSETParameterToolStripMenuItem";
|
|
||||||
resources.ApplyResources(this.addOFFSETParameterToolStripMenuItem, "addOFFSETParameterToolStripMenuItem");
|
|
||||||
this.addOFFSETParameterToolStripMenuItem.Click += new System.EventHandler(this.addOFFSETParameterToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// PckEditor
|
// PckEditor
|
||||||
//
|
//
|
||||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
|
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
|
||||||
resources.ApplyResources(this, "$this");
|
resources.ApplyResources(this, "$this");
|
||||||
this.Controls.Add(this.previewPictureBox);
|
this.Controls.Add(this.previewPictureBox);
|
||||||
this.Controls.Add(this.LittleEndianCheckBox);
|
this.Controls.Add(this.BigEndianCheckBox);
|
||||||
this.Controls.Add(this.pckFileLabel);
|
this.Controls.Add(this.pckFileLabel);
|
||||||
this.Controls.Add(this.labelImageSize);
|
this.Controls.Add(this.labelImageSize);
|
||||||
this.Controls.Add(this.fileEntryCountLabel);
|
this.Controls.Add(this.fileEntryCountLabel);
|
||||||
@@ -870,7 +870,7 @@ namespace PckStudio.Controls
|
|||||||
private MetroFramework.Controls.MetroTextBox parameterValueTextBox;
|
private MetroFramework.Controls.MetroTextBox parameterValueTextBox;
|
||||||
private MetroFramework.Controls.MetroButton buttonEdit;
|
private MetroFramework.Controls.MetroButton buttonEdit;
|
||||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||||
private MetroFramework.Controls.MetroCheckBox LittleEndianCheckBox;
|
private MetroFramework.Controls.MetroCheckBox BigEndianCheckBox;
|
||||||
private System.Windows.Forms.ToolStripMenuItem setSubPCKEndiannessToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem setSubPCKEndiannessToolStripMenuItem;
|
||||||
private ToolStripMenuItem bigEndianXbox360PS3WiiUToolStripMenuItem;
|
private ToolStripMenuItem bigEndianXbox360PS3WiiUToolStripMenuItem;
|
||||||
private ToolStripMenuItem littleEndianPS4PSVitaSwitchToolStripMenuItem;
|
private ToolStripMenuItem littleEndianPS4PSVitaSwitchToolStripMenuItem;
|
||||||
|
|||||||
@@ -80,8 +80,8 @@ namespace PckStudio.Controls
|
|||||||
_originalEndianness = packInfo.Endianness;
|
_originalEndianness = packInfo.Endianness;
|
||||||
_currentEndianness = packInfo.Endianness;
|
_currentEndianness = packInfo.Endianness;
|
||||||
|
|
||||||
LittleEndianCheckBox.Visible = packInfo.AllowEndianSwap;
|
BigEndianCheckBox.Visible = packInfo.AllowEndianSwap;
|
||||||
LittleEndianCheckBox.Checked = packInfo.Endianness == OMI.ByteOrder.LittleEndian;
|
BigEndianCheckBox.Checked = packInfo.Endianness == OMI.ByteOrder.BigEndian;
|
||||||
|
|
||||||
treeViewMain.TreeViewNodeSorter = new PckNodeSorter();
|
treeViewMain.TreeViewNodeSorter = new PckNodeSorter();
|
||||||
treeViewMain.DrawMode = TreeViewDrawMode.OwnerDrawText;
|
treeViewMain.DrawMode = TreeViewDrawMode.OwnerDrawText;
|
||||||
@@ -186,7 +186,7 @@ namespace PckStudio.Controls
|
|||||||
|
|
||||||
protected override void PreSave()
|
protected override void PreSave()
|
||||||
{
|
{
|
||||||
EditorValue.Endianness = LittleEndianCheckBox.Checked ? OMI.ByteOrder.LittleEndian : OMI.ByteOrder.BigEndian;
|
EditorValue.Endianness = BigEndianCheckBox.Checked ? OMI.ByteOrder.BigEndian : OMI.ByteOrder.LittleEndian;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PostSave()
|
protected override void PostSave()
|
||||||
@@ -1526,11 +1526,11 @@ namespace PckStudio.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
PckAudioFile newAudioFile = CreateNewAudioFile();
|
PckAudioFile newAudioFile = CreateNewAudioFile();
|
||||||
PckAsset newAudioAsset = CreateNewAudioAsset(LittleEndianCheckBox.Checked, newAudioFile);
|
PckAsset newAudioAsset = CreateNewAudioAsset(BigEndianCheckBox.Checked, newAudioFile);
|
||||||
|
|
||||||
ISaveContext<PckAudioFile> saveContext = new DelegatedSaveContext<PckAudioFile>(Settings.Default.AutoSaveChanges, (audioFile) =>
|
ISaveContext<PckAudioFile> saveContext = new DelegatedSaveContext<PckAudioFile>(Settings.Default.AutoSaveChanges, (audioFile) =>
|
||||||
{
|
{
|
||||||
newAudioAsset.SetData(new PckAudioFileWriter(audioFile, LittleEndianCheckBox.Checked ? OMI.ByteOrder.LittleEndian : OMI.ByteOrder.BigEndian));
|
newAudioAsset.SetData(new PckAudioFileWriter(audioFile, BigEndianCheckBox.Checked ? OMI.ByteOrder.BigEndian : OMI.ByteOrder.LittleEndian));
|
||||||
});
|
});
|
||||||
|
|
||||||
AudioEditor diag = new AudioEditor(newAudioFile, saveContext);
|
AudioEditor diag = new AudioEditor(newAudioFile, saveContext);
|
||||||
@@ -1563,7 +1563,7 @@ namespace PckStudio.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
EditorValue.File.CreateNewAsset("Skins.pck", PckAssetType.SkinDataFile, new PckFileWriter(new PckFile(3, 3),
|
EditorValue.File.CreateNewAsset("Skins.pck", PckAssetType.SkinDataFile, new PckFileWriter(new PckFile(3, 3),
|
||||||
LittleEndianCheckBox.Checked ? OMI.ByteOrder.LittleEndian : OMI.ByteOrder.BigEndian));
|
BigEndianCheckBox.Checked ? OMI.ByteOrder.BigEndian : OMI.ByteOrder.LittleEndian));
|
||||||
|
|
||||||
BuildMainTreeView();
|
BuildMainTreeView();
|
||||||
}
|
}
|
||||||
@@ -2352,13 +2352,13 @@ namespace PckStudio.Controls
|
|||||||
|
|
||||||
private void SetPckXMLVersion(int xmlVersion)
|
private void SetPckXMLVersion(int xmlVersion)
|
||||||
{
|
{
|
||||||
bool isLittleEndian = LittleEndianCheckBox.Checked;
|
bool isBigEndian = BigEndianCheckBox.Checked;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (treeViewMain.SelectedNode.Tag is PckAsset asset && (asset.Type is PckAssetType.AudioFile || asset.Type is PckAssetType.SkinDataFile || asset.Type is PckAssetType.TexturePackInfoFile))
|
if (treeViewMain.SelectedNode.Tag is PckAsset asset && (asset.Type is PckAssetType.AudioFile || asset.Type is PckAssetType.SkinDataFile || asset.Type is PckAssetType.TexturePackInfoFile))
|
||||||
{
|
{
|
||||||
OMI.ByteOrder endianness = isLittleEndian ? OMI.ByteOrder.LittleEndian : OMI.ByteOrder.BigEndian;
|
OMI.ByteOrder endianness = isBigEndian ? OMI.ByteOrder.BigEndian : OMI.ByteOrder.LittleEndian;
|
||||||
IDataFormatReader reader = new PckFileReader(endianness);
|
IDataFormatReader reader = new PckFileReader(endianness);
|
||||||
object pck = reader.FromStream(new MemoryStream(asset.Data));
|
object pck = reader.FromStream(new MemoryStream(asset.Data));
|
||||||
|
|
||||||
@@ -2370,7 +2370,7 @@ namespace PckStudio.Controls
|
|||||||
}
|
}
|
||||||
catch (OverflowException)
|
catch (OverflowException)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, $"\"PCK cannot be set because the file endianness is not {(isLittleEndian ? "little" : "big")}.", "Unable to set PCK BOX Version");
|
MessageBox.Show(this, $"\"PCK cannot be set because the file endianness is not {(isBigEndian ? "big" : "little")}.", "Unable to set PCK BOX Version");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
@@ -912,7 +912,7 @@
|
|||||||
<value>True</value>
|
<value>True</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="metroLabel2.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="metroLabel2.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>76, 72</value>
|
<value>76, 69</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="metroLabel2.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="metroLabel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
@@ -957,7 +957,7 @@
|
|||||||
<value>False</value>
|
<value>False</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ParameterTypeTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="ParameterTypeTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>215, 42</value>
|
<value>215, 39</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ParameterTypeTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="ParameterTypeTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>146, 20</value>
|
<value>146, 20</value>
|
||||||
@@ -1002,7 +1002,7 @@
|
|||||||
<value>False</value>
|
<value>False</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="parameterValueTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="parameterValueTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>215, 74</value>
|
<value>215, 71</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="parameterValueTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="parameterValueTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>146, 20</value>
|
<value>146, 20</value>
|
||||||
@@ -1026,7 +1026,7 @@
|
|||||||
<value>Bottom, Right</value>
|
<value>Bottom, Right</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="buttonEdit.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="buttonEdit.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>215, 100</value>
|
<value>215, 97</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="buttonEdit.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="buttonEdit.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>146, 33</value>
|
<value>146, 33</value>
|
||||||
@@ -1059,7 +1059,7 @@
|
|||||||
<value>True</value>
|
<value>True</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="metroLabel1.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="metroLabel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>138, -35</value>
|
<value>138, -38</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="metroLabel1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="metroLabel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
@@ -1139,7 +1139,7 @@
|
|||||||
<value>Edit All Parameters</value>
|
<value>Edit All Parameters</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="contextMenuParameterTree.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="contextMenuParameterTree.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>206, 114</value>
|
<value>206, 92</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>contextMenuParameterTree.Name" xml:space="preserve">
|
<data name=">>contextMenuParameterTree.Name" xml:space="preserve">
|
||||||
<value>contextMenuParameterTree</value>
|
<value>contextMenuParameterTree</value>
|
||||||
@@ -1743,34 +1743,34 @@
|
|||||||
<data name="addMultipleEntriesToolStripMenuItem.Text" xml:space="preserve">
|
<data name="addMultipleEntriesToolStripMenuItem.Text" xml:space="preserve">
|
||||||
<value>Add Multiple Entries</value>
|
<value>Add Multiple Entries</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LittleEndianCheckBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
<data name="BigEndianCheckBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||||
<value>Top, Right</value>
|
<value>Top, Right</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LittleEndianCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
<data name="BigEndianCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LittleEndianCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="BigEndianCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>831, 0</value>
|
<value>819, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LittleEndianCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="BigEndianCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>173, 15</value>
|
<value>185, 15</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LittleEndianCheckBox.TabIndex" type="System.Int32, mscorlib">
|
<data name="BigEndianCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>22</value>
|
<value>22</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LittleEndianCheckBox.Text" xml:space="preserve">
|
<data name="BigEndianCheckBox.Text" xml:space="preserve">
|
||||||
<value>Save as Switch/Vita/PS4 PCK</value>
|
<value>Set as Xbox 360/PS3/Wii U PCK</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LittleEndianCheckBox.Name" xml:space="preserve">
|
<data name=">>BigEndianCheckBox.Name" xml:space="preserve">
|
||||||
<value>LittleEndianCheckBox</value>
|
<value>BigEndianCheckBox</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LittleEndianCheckBox.Type" xml:space="preserve">
|
<data name=">>BigEndianCheckBox.Type" xml:space="preserve">
|
||||||
<value>MetroFramework.Controls.MetroCheckBox, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
|
<value>MetroFramework.Controls.MetroCheckBox, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LittleEndianCheckBox.Parent" xml:space="preserve">
|
<data name=">>BigEndianCheckBox.Parent" xml:space="preserve">
|
||||||
<value>$this</value>
|
<value>$this</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LittleEndianCheckBox.ZOrder" xml:space="preserve">
|
<data name=">>BigEndianCheckBox.ZOrder" xml:space="preserve">
|
||||||
<value>3</value>
|
<value>3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="previewPictureBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
<data name="previewPictureBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||||
@@ -1833,16 +1833,22 @@
|
|||||||
<data name=">>addParameterToolStripMenuItem1.Type" xml:space="preserve">
|
<data name=">>addParameterToolStripMenuItem1.Type" xml:space="preserve">
|
||||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name=">>addANIMEntryToolStripMenuItem1.Name" xml:space="preserve">
|
||||||
|
<value>addANIMEntryToolStripMenuItem1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>addANIMEntryToolStripMenuItem1.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=">>addBOXEntryToolStripMenuItem1.Name" xml:space="preserve">
|
<data name=">>addBOXEntryToolStripMenuItem1.Name" xml:space="preserve">
|
||||||
<value>addBOXEntryToolStripMenuItem1</value>
|
<value>addBOXEntryToolStripMenuItem1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>addBOXEntryToolStripMenuItem1.Type" xml:space="preserve">
|
<data name=">>addBOXEntryToolStripMenuItem1.Type" xml:space="preserve">
|
||||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>addANIMEntryToolStripMenuItem1.Name" xml:space="preserve">
|
<data name=">>addOFFSETParameterToolStripMenuItem.Name" xml:space="preserve">
|
||||||
<value>addANIMEntryToolStripMenuItem1</value>
|
<value>addOFFSETParameterToolStripMenuItem</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>addANIMEntryToolStripMenuItem1.Type" xml:space="preserve">
|
<data name=">>addOFFSETParameterToolStripMenuItem.Type" xml:space="preserve">
|
||||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>addMultipleEntriesToolStripMenuItem1.Name" xml:space="preserve">
|
<data name=">>addMultipleEntriesToolStripMenuItem1.Name" xml:space="preserve">
|
||||||
@@ -2205,12 +2211,6 @@
|
|||||||
<data name=">>addMultipleEntriesToolStripMenuItem.Type" xml:space="preserve">
|
<data name=">>addMultipleEntriesToolStripMenuItem.Type" xml:space="preserve">
|
||||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>addOFFSETParameterToolStripMenuItem.Name" xml:space="preserve">
|
|
||||||
<value>addOFFSETParameterToolStripMenuItem</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>addOFFSETParameterToolStripMenuItem.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>$this.Name" xml:space="preserve">
|
<data name=">>$this.Name" xml:space="preserve">
|
||||||
<value>PckEditor</value>
|
<value>PckEditor</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace PckStudio.Forms
|
|||||||
{
|
{
|
||||||
["ShowRichPresence"] = "Show Rich Presence",
|
["ShowRichPresence"] = "Show Rich Presence",
|
||||||
["AutoSaveChanges"] = "Auto Save",
|
["AutoSaveChanges"] = "Auto Save",
|
||||||
["UseLittleEndianAsDefault"] = "Open as Little Endian",
|
["UseBigEndianAsDefault"] = "Open as Big Endian",
|
||||||
["AutoUpdate"] = "Auto Update",
|
["AutoUpdate"] = "Auto Update",
|
||||||
["LoadSubPcks"] = "Load Sub Pcks",
|
["LoadSubPcks"] = "Load Sub Pcks",
|
||||||
["UsePrerelease"] = "Use Prerelease",
|
["UsePrerelease"] = "Use Prerelease",
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ namespace PckStudio.Popups
|
|||||||
{
|
{
|
||||||
public partial class AdvancedOptions : MetroFramework.Forms.MetroForm
|
public partial class AdvancedOptions : MetroFramework.Forms.MetroForm
|
||||||
{
|
{
|
||||||
public bool IsLittleEndian
|
public bool IsBigEndian
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_endianness = value ? ByteOrder.LittleEndian : ByteOrder.BigEndian;
|
_endianness = value ? ByteOrder.BigEndian : ByteOrder.LittleEndian;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private readonly PckFile _pckFile;
|
private readonly PckFile _pckFile;
|
||||||
|
|||||||
@@ -95,7 +95,8 @@ namespace PckStudio
|
|||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
OMI.ByteOrder byteOrder = OMI.ByteOrder.BigEndian;
|
// Try first with Little Endian as more platforms use that
|
||||||
|
OMI.ByteOrder byteOrder = OMI.ByteOrder.LittleEndian;
|
||||||
PckFile pckFile = ReadPck(filepath, byteOrder);
|
PckFile pckFile = ReadPck(filepath, byteOrder);
|
||||||
packInfo = PackInfo.Create(pckFile, byteOrder, true);
|
packInfo = PackInfo.Create(pckFile, byteOrder, true);
|
||||||
return packInfo.IsValid;
|
return packInfo.IsValid;
|
||||||
@@ -104,8 +105,8 @@ namespace PckStudio
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// if failed, attempt again in the reverse. THEN throw an error if failed
|
// if failed, attempt check again for Old Gen Platforms
|
||||||
OMI.ByteOrder byteOrder = OMI.ByteOrder.LittleEndian;
|
OMI.ByteOrder byteOrder = OMI.ByteOrder.BigEndian;
|
||||||
PckFile pckFile = ReadPck(filepath, byteOrder);
|
PckFile pckFile = ReadPck(filepath, byteOrder);
|
||||||
packInfo = PackInfo.Create(pckFile, byteOrder, true);
|
packInfo = PackInfo.Create(pckFile, byteOrder, true);
|
||||||
return packInfo.IsValid;
|
return packInfo.IsValid;
|
||||||
@@ -441,7 +442,7 @@ namespace PckStudio
|
|||||||
if (TryGetCurrentEditor(out IEditor<PackInfo> editor))
|
if (TryGetCurrentEditor(out IEditor<PackInfo> editor))
|
||||||
{
|
{
|
||||||
using AdvancedOptions advanced = new AdvancedOptions(editor.EditorValue.File);
|
using AdvancedOptions advanced = new AdvancedOptions(editor.EditorValue.File);
|
||||||
advanced.IsLittleEndian = editor.EditorValue.Endianness == OMI.ByteOrder.LittleEndian;
|
advanced.IsBigEndian = editor.EditorValue.Endianness == OMI.ByteOrder.BigEndian;
|
||||||
if (advanced.ShowDialog() == DialogResult.OK)
|
if (advanced.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
editor.UpdateView();
|
editor.UpdateView();
|
||||||
|
|||||||
+3
-3
@@ -47,12 +47,12 @@ namespace PckStudio.Properties {
|
|||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||||
public bool UseLittleEndianAsDefault {
|
public bool UseBigEndianAsDefault {
|
||||||
get {
|
get {
|
||||||
return ((bool)(this["UseLittleEndianAsDefault"]));
|
return ((bool)(this["UseBigEndianAsDefault"]));
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this["UseLittleEndianAsDefault"] = value;
|
this["UseBigEndianAsDefault"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<Setting Name="AutoSaveChanges" Type="System.Boolean" Scope="User">
|
<Setting Name="AutoSaveChanges" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">False</Value>
|
<Value Profile="(Default)">False</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="UseLittleEndianAsDefault" Type="System.Boolean" Scope="User">
|
<Setting Name="UseBigEndianAsDefault" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">False</Value>
|
<Value Profile="(Default)">False</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="LoadSubPcks" Type="System.Boolean" Scope="User">
|
<Setting Name="LoadSubPcks" Type="System.Boolean" Scope="User">
|
||||||
|
|||||||
Reference in New Issue
Block a user