diff --git a/SpineViewer/Spine/Implementations/Spine/Spine21.cs b/SpineViewer/Spine/Implementations/Spine/Spine21.cs
index 49f127a..1162317 100644
--- a/SpineViewer/Spine/Implementations/Spine/Spine21.cs
+++ b/SpineViewer/Spine/Implementations/Spine/Spine21.cs
@@ -71,7 +71,7 @@ namespace SpineViewer.Spine.Implementations.Spine
catch
{
// 都不行就报错
- throw new ArgumentException($"Unknown skeleton file format {SkelPath}");
+ throw new InvalidDataException($"Unknown skeleton file format {SkelPath}");
}
}
diff --git a/SpineViewer/Spine/Implementations/Spine/Spine36.cs b/SpineViewer/Spine/Implementations/Spine/Spine36.cs
index 1163300..11a0ce6 100644
--- a/SpineViewer/Spine/Implementations/Spine/Spine36.cs
+++ b/SpineViewer/Spine/Implementations/Spine/Spine36.cs
@@ -70,7 +70,7 @@ namespace SpineViewer.Spine.Implementations.Spine
catch
{
// 都不行就报错
- throw new ArgumentException($"Unknown skeleton file format {SkelPath}");
+ throw new InvalidDataException($"Unknown skeleton file format {SkelPath}");
}
}
diff --git a/SpineViewer/Spine/Implementations/Spine/Spine37.cs b/SpineViewer/Spine/Implementations/Spine/Spine37.cs
index db74c92..521c815 100644
--- a/SpineViewer/Spine/Implementations/Spine/Spine37.cs
+++ b/SpineViewer/Spine/Implementations/Spine/Spine37.cs
@@ -68,7 +68,7 @@ namespace SpineViewer.Spine.Implementations.Spine
catch
{
// 都不行就报错
- throw new ArgumentException($"Unknown skeleton file format {SkelPath}");
+ throw new InvalidDataException($"Unknown skeleton file format {SkelPath}");
}
}
diff --git a/SpineViewer/Spine/Implementations/Spine/Spine38.cs b/SpineViewer/Spine/Implementations/Spine/Spine38.cs
index 0feaea1..8cfc2de 100644
--- a/SpineViewer/Spine/Implementations/Spine/Spine38.cs
+++ b/SpineViewer/Spine/Implementations/Spine/Spine38.cs
@@ -71,7 +71,7 @@ namespace SpineViewer.Spine.Implementations.Spine
catch
{
// 都不行就报错
- throw new ArgumentException($"Unknown skeleton file format {SkelPath}");
+ throw new InvalidDataException($"Unknown skeleton file format {SkelPath}");
}
}
diff --git a/SpineViewer/Spine/Implementations/Spine/Spine40.cs b/SpineViewer/Spine/Implementations/Spine/Spine40.cs
index 016e324..bbe847b 100644
--- a/SpineViewer/Spine/Implementations/Spine/Spine40.cs
+++ b/SpineViewer/Spine/Implementations/Spine/Spine40.cs
@@ -70,7 +70,7 @@ namespace SpineViewer.Spine.Implementations.Spine
catch
{
// 都不行就报错
- throw new ArgumentException($"Unknown skeleton file format {SkelPath}");
+ throw new InvalidDataException($"Unknown skeleton file format {SkelPath}");
}
}
diff --git a/SpineViewer/Spine/Implementations/Spine/Spine41.cs b/SpineViewer/Spine/Implementations/Spine/Spine41.cs
index b6ba485..45324a9 100644
--- a/SpineViewer/Spine/Implementations/Spine/Spine41.cs
+++ b/SpineViewer/Spine/Implementations/Spine/Spine41.cs
@@ -70,7 +70,7 @@ namespace SpineViewer.Spine.Implementations.Spine
catch
{
// 都不行就报错
- throw new ArgumentException($"Unknown skeleton file format {SkelPath}");
+ throw new InvalidDataException($"Unknown skeleton file format {SkelPath}");
}
}
diff --git a/SpineViewer/Spine/Implementations/Spine/Spine42.cs b/SpineViewer/Spine/Implementations/Spine/Spine42.cs
index babf205..3dfd280 100644
--- a/SpineViewer/Spine/Implementations/Spine/Spine42.cs
+++ b/SpineViewer/Spine/Implementations/Spine/Spine42.cs
@@ -70,7 +70,7 @@ namespace SpineViewer.Spine.Implementations.Spine
catch
{
// 都不行就报错
- throw new ArgumentException($"Unknown skeleton file format {SkelPath}");
+ throw new InvalidDataException($"Unknown skeleton file format {SkelPath}");
}
}
diff --git a/SpineViewer/Spine/SkeletonConverter.cs b/SpineViewer/Spine/SkeletonConverter.cs
index b5f39cd..7f1aede 100644
--- a/SpineViewer/Spine/SkeletonConverter.cs
+++ b/SpineViewer/Spine/SkeletonConverter.cs
@@ -98,7 +98,7 @@ namespace SpineViewer.Spine
if (JsonNode.Parse(input) is JsonObject root)
return root;
else
- throw new InvalidOperationException($"{jsonPath} is not a valid json object");
+ throw new InvalidDataException($"{jsonPath} is not a valid json object");
}
///
@@ -116,14 +116,17 @@ namespace SpineViewer.Spine
///
public abstract JsonObject ToVersion(JsonObject root, Version version);
- protected class SkeletonReader
+ ///
+ /// 二进制骨骼文件读
+ ///
+ public class BinaryReader
{
protected byte[] buffer = new byte[32];
protected byte[] bytesBigEndian = new byte[8];
public readonly List StringTable = new(32);
protected Stream input;
- public SkeletonReader(Stream input) { this.input = input; }
+ public BinaryReader(Stream input) { this.input = input; }
public int Read()
{
int val = input.ReadByte();
@@ -219,14 +222,17 @@ namespace SpineViewer.Spine
}
}
- protected class SkeletonWriter
+ ///
+ /// 二进制骨骼文件写
+ ///
+ protected class BinaryWriter
{
protected byte[] buffer = new byte[32];
protected byte[] bytesBigEndian = new byte[8];
public readonly List StringTable = new(32);
protected Stream output;
- public SkeletonWriter(Stream output) { this.output = output; }
+ public BinaryWriter(Stream output) { this.output = output; }
public void Write(int val) => output.WriteByte((byte)val);
public void WriteByte(byte val) => output.WriteByte(val);
public void WriteUByte(byte val) => output.WriteByte(val);