Skip to content

Commit

Permalink
Add support for long array tags
Browse files Browse the repository at this point in the history
  • Loading branch information
jaquadro committed Nov 24, 2017
1 parent 931ac75 commit d29f249
Show file tree
Hide file tree
Showing 22 changed files with 570 additions and 390 deletions.
Binary file modified NBTExplorer.Installer/License.rtf
Binary file not shown.
2 changes: 1 addition & 1 deletion NBTExplorer.Installer/Product.wxs
Expand Up @@ -3,7 +3,7 @@
<Product Id="*"
Name="NBTExplorer"
Language="1033"
Version="2.7.6.0"
Version="2.8.0.0"
Manufacturer="Justin Aquadro"
UpgradeCode="0bfb1026-21f2-4552-ad71-ca90aae10a25">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
Expand Down
24 changes: 22 additions & 2 deletions NBTExplorer.sln
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBTExplorer", "NBTExplorer\NBTExplorer.csproj", "{8A458245-8176-4599-95CD-3CA39F2435CE}"
EndProject
Expand All @@ -16,6 +16,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBTUtil", "NBTUtil\NBTUtil.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBTModel", "NBTModel\NBTModel.csproj", "{20D7CBA3-5B6D-40B0-8D28-4C9A58E4FFBC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Substrate (NET2)", "..\Substrate\SubstrateCS\Substrate (NET2).csproj", "{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
AppStore|Any CPU = AppStore|Any CPU
Expand Down Expand Up @@ -93,6 +95,24 @@ Global
{20D7CBA3-5B6D-40B0-8D28-4C9A58E4FFBC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{20D7CBA3-5B6D-40B0-8D28-4C9A58E4FFBC}.Release|x86.ActiveCfg = Release|Any CPU
{20D7CBA3-5B6D-40B0-8D28-4C9A58E4FFBC}.Release|x86.Build.0 = Release|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.AppStore|Any CPU.Build.0 = Release|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.AppStore|Mixed Platforms.ActiveCfg = Release|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.AppStore|Mixed Platforms.Build.0 = Release|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.AppStore|x86.ActiveCfg = Release|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.AppStore|x86.Build.0 = Release|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Debug|x86.ActiveCfg = Debug|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Debug|x86.Build.0 = Debug|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Release|Any CPU.Build.0 = Release|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Release|x86.ActiveCfg = Release|Any CPU
{AFE30E14-3F2F-4461-9F7D-147AB4DCA4C3}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
9 changes: 8 additions & 1 deletion NBTExplorer/Controllers/NodeTreeController.cs
Expand Up @@ -763,7 +763,8 @@ private void InitializeIconRegistry ()
_iconRegistry.Register(typeof(NbtFileDataNode), 12);
_iconRegistry.Register(typeof(TagIntArrayDataNode), 14);
_iconRegistry.Register(typeof(TagShortArrayDataNode), 16);
_iconRegistry.Register(typeof(RootDataNode), 17);
_iconRegistry.Register(typeof(TagLongArrayDataNode), 17);
_iconRegistry.Register(typeof(RootDataNode), 18);
}

private void UpdateNodeText (TreeNode node)
Expand Down Expand Up @@ -956,6 +957,12 @@ public static bool CreateIntArrayNodePred (DataNode dataNode, out GroupCapabilit
return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_INT_ARRAY);
}

public static bool CreateLongArrayNodePred (DataNode dataNode, out GroupCapabilities caps)
{
caps = GroupCapabilities.Single;
return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_LONG_ARRAY);
}

public static bool CreateStringNodePred (DataNode dataNode, out GroupCapabilities caps)
{
caps = GroupCapabilities.Single;
Expand Down
8 changes: 4 additions & 4 deletions NBTExplorer/Controllers/RuleTreeController.cs
Expand Up @@ -30,10 +30,10 @@ private void InitializeIconRegistry ()
_iconRegistry = new IconRegistry();
_iconRegistry.DefaultIcon = 15;

_iconRegistry.Register(typeof(RootRule), 16);
_iconRegistry.Register(typeof(UnionRule), 19);
_iconRegistry.Register(typeof(IntersectRule), 18);
_iconRegistry.Register(typeof(WildcardRule), 17);
_iconRegistry.Register(typeof(RootRule), 18);
_iconRegistry.Register(typeof(UnionRule), 21);
_iconRegistry.Register(typeof(IntersectRule), 20);
_iconRegistry.Register(typeof(WildcardRule), 19);
_iconRegistry.Register(typeof(ByteTagRule), 0);
_iconRegistry.Register(typeof(ShortTagRule), 1);
_iconRegistry.Register(typeof(IntTagRule), 2);
Expand Down
6 changes: 3 additions & 3 deletions NBTExplorer/Properties/AssemblyInfo.cs
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NBTExplorer")]
[assembly: AssemblyCopyright("Copyright © Justin Aquadro 2011-2014")]
[assembly: AssemblyCopyright("Copyright © Justin Aquadro 2011-2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.7.6.0")]
[assembly: AssemblyFileVersion("2.7.6.0")]
[assembly: AssemblyVersion("2.8.0.0")]
[assembly: AssemblyFileVersion("2.8.0.0")]
Binary file added NBTExplorer/Resources/edit-code-l.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion NBTExplorer/Windows/About.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion NBTExplorer/Windows/About.resx
Expand Up @@ -119,7 +119,7 @@
</resheader>
<data name="linkLabel1.Text" xml:space="preserve">
<value>NBTExplorer {ver}
Copyright ©2011-2014 Justin Aquadro
Copyright ©2011-2017 Justin Aquadro

NBTExplorer is based on NBTEdit by copygirl
Fugue icon set: p.yusukekamiyamane.com
Expand Down
3 changes: 3 additions & 0 deletions NBTExplorer/Windows/CreateNode.cs
Expand Up @@ -107,6 +107,8 @@ private TagNode CreateTag ()
return new TagNodeList(TagType.TAG_BYTE);
case TagType.TAG_LONG:
return new TagNodeLong();
case TagType.TAG_LONG_ARRAY:
return new TagNodeLongArray(new long[_size]);
case TagType.TAG_SHORT:
return new TagNodeShort();
case TagType.TAG_STRING:
Expand Down Expand Up @@ -164,6 +166,7 @@ private bool IsTagSizedType
case TagType.TAG_BYTE_ARRAY:
case TagType.TAG_INT_ARRAY:
case TagType.TAG_SHORT_ARRAY:
case TagType.TAG_LONG_ARRAY:
return true;
default:
return false;
Expand Down
54 changes: 34 additions & 20 deletions NBTExplorer/Windows/FindReplace.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions NBTExplorer/Windows/FindReplace.cs
Expand Up @@ -162,6 +162,11 @@ private void _tbReplaceIntArray_Click (object sender, EventArgs e)
_replaceController.CreateNode(TagType.TAG_INT_ARRAY);
}

private void _tbReplaceLongArray_Click(object sender, EventArgs e)
{
_replaceController.CreateNode(TagType.TAG_LONG_ARRAY);
}

private void _tbReplaceString_Click (object sender, EventArgs e)
{
_replaceController.CreateNode(TagType.TAG_STRING);
Expand Down

0 comments on commit d29f249

Please sign in to comment.