little fixes

This commit is contained in:
2016-07-18 16:37:03 +06:00
parent 2888fb64da
commit 7484176735
9 changed files with 30 additions and 22 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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));
}
}
}

View File

@@ -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() {

View File

@@ -40,7 +40,7 @@ namespace FlashTools.Internal.SwfTools.SwfTypes {
A / 255.0f);
}
public Color ToUnityColor32() {
public Color32 ToUnityColor32() {
return new Color32(
R,
G,

View File

@@ -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));
}
}
}

View File

@@ -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(

View File

@@ -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() {