mirror of
https://github.com/BlackMATov/unity-flash-tools.git
synced 2025-12-16 22:19:31 +07:00
little fixes
This commit is contained in:
@@ -50,9 +50,9 @@ namespace FlashTools.Internal.SwfTools.SwfTags {
|
||||
result[i * 4 + 3] = (byte)((pix32 >> 24) & 0xFF);
|
||||
}
|
||||
} else {
|
||||
//TODO: implme
|
||||
//TODO: IMPLME
|
||||
throw new UnityException(string.Format(
|
||||
"Unsupported DefineBitsLosslessTag Format: {0}", BitmapFormat));
|
||||
"Unsupported DefineBitsLossless2 Format: {0}", BitmapFormat));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -50,9 +50,9 @@ namespace FlashTools.Internal.SwfTools.SwfTags {
|
||||
result[i * 4 + 3] = (byte)((pix24 >> 24) & 0xFF);
|
||||
}
|
||||
} else {
|
||||
//TODO: implme
|
||||
//TODO: IMPLME
|
||||
throw new UnityException(string.Format(
|
||||
"Unsupported DefineBitsLosslessTag Format: {0}", BitmapFormat));
|
||||
"Unsupported DefineBitsLossless Format: {0}", BitmapFormat));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace FlashTools.Internal.SwfTools.SwfTags {
|
||||
? (0 != reader.ReadByte())
|
||||
: false;
|
||||
|
||||
tag.Visible = tag.HasVisible
|
||||
tag.Visible = tag.HasVisible && !reader.IsEOF
|
||||
? (0 != reader.ReadByte())
|
||||
: true;
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ namespace FlashTools.Internal.SwfTools.SwfTypes {
|
||||
case 13: return Mode.Overlay;
|
||||
case 14: return Mode.Hardlight;
|
||||
default:
|
||||
Debug.LogWarningFormat("Incorrect BlendMode Id: {0}", mode_id);
|
||||
return Mode.Normal;
|
||||
throw new UnityException(string.Format(
|
||||
"Incorrect blend mode id: {0}", mode_id));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace FlashTools.Internal.SwfTools.SwfTypes {
|
||||
using UnityEngine;
|
||||
|
||||
namespace FlashTools.Internal.SwfTools.SwfTypes {
|
||||
public struct SwfClipActions {
|
||||
public static SwfClipActions identity {
|
||||
get {
|
||||
@@ -8,7 +10,7 @@
|
||||
|
||||
public static SwfClipActions Read(SwfStreamReader reader) {
|
||||
//TODO: IMPLME
|
||||
return SwfClipActions.identity;
|
||||
throw new UnityException("Clip actions is unsupported");
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace FlashTools.Internal.SwfTools.SwfTypes {
|
||||
A / 255.0f);
|
||||
}
|
||||
|
||||
public Color ToUnityColor32() {
|
||||
public Color32 ToUnityColor32() {
|
||||
return new Color32(
|
||||
R,
|
||||
G,
|
||||
|
||||
@@ -66,8 +66,8 @@ namespace FlashTools.Internal.SwfTools.SwfTypes {
|
||||
case 0x42: return Type.NonSmoothedRepeatingBitmap;
|
||||
case 0x43: return Type.NonSmoothedClippedBitmap;
|
||||
default:
|
||||
Debug.LogWarningFormat("Incorrect FillStyleType Id: {0}", type_id);
|
||||
return Type.SolidColor;
|
||||
throw new UnityException(string.Format(
|
||||
"Incorrect fill stype type id: {0}", type_id));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,23 +37,27 @@ namespace FlashTools.Internal.SwfTools.SwfTypes {
|
||||
switch ( style_type ) {
|
||||
case ShapeStyleType.Shape:
|
||||
shapes.FillStyles = ReadFillStyles(reader, false, false);
|
||||
SkipLineStyles(reader, false, false, false);
|
||||
SkipShapeRecords(reader, false, false, false);
|
||||
//TODO: IMPLME
|
||||
//SkipLineStyles(reader, false, false, false);
|
||||
//SkipShapeRecords(reader, false, false, false);
|
||||
break;
|
||||
case ShapeStyleType.Shape2:
|
||||
shapes.FillStyles = ReadFillStyles(reader, true, false);
|
||||
SkipLineStyles(reader, true, false, false);
|
||||
SkipShapeRecords(reader, true, false, false);
|
||||
//TODO: IMPLME
|
||||
//SkipLineStyles(reader, true, false, false);
|
||||
//SkipShapeRecords(reader, true, false, false);
|
||||
break;
|
||||
case ShapeStyleType.Shape3:
|
||||
shapes.FillStyles = ReadFillStyles(reader, true, true);
|
||||
SkipLineStyles(reader, true, true, false);
|
||||
SkipShapeRecords(reader, true, true, false);
|
||||
//TODO: IMPLME
|
||||
//SkipLineStyles(reader, true, true, false);
|
||||
//SkipShapeRecords(reader, true, true, false);
|
||||
break;
|
||||
case ShapeStyleType.Shape4:
|
||||
shapes.FillStyles = ReadFillStyles(reader, true, true);
|
||||
SkipLineStyles(reader, true, true, true);
|
||||
SkipShapeRecords(reader, true, true, true);
|
||||
//TODO: IMPLME
|
||||
//SkipLineStyles(reader, true, true, true);
|
||||
//SkipShapeRecords(reader, true, true, true);
|
||||
break;
|
||||
default:
|
||||
throw new UnityException(string.Format(
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace FlashTools.Internal.SwfTools.SwfTypes {
|
||||
using UnityEngine;
|
||||
|
||||
namespace FlashTools.Internal.SwfTools.SwfTypes {
|
||||
public struct SwfSurfaceFilters {
|
||||
public static SwfSurfaceFilters identity {
|
||||
get {
|
||||
@@ -8,7 +10,7 @@
|
||||
|
||||
public static SwfSurfaceFilters Read(SwfStreamReader reader) {
|
||||
//TODO: IMPLME
|
||||
return SwfSurfaceFilters.identity;
|
||||
throw new UnityException("Surface filters is unsupported");
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
|
||||
Reference in New Issue
Block a user