diff --git a/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/CurvedEdgeRecord.java b/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/CurvedEdgeRecord.java index 1ab222650..5e9f19e81 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/CurvedEdgeRecord.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/CurvedEdgeRecord.java @@ -17,6 +17,8 @@ package com.jpexs.decompiler.flash.types.shaperecords; import com.jpexs.decompiler.flash.SWFOutputStream; +import com.jpexs.decompiler.flash.types.BasicType; +import com.jpexs.decompiler.flash.types.annotations.SWFType; /** * @@ -24,12 +26,22 @@ import com.jpexs.decompiler.flash.SWFOutputStream; */ public class CurvedEdgeRecord extends SHAPERECORD { - public int typeFlag = 1; - public int straightFlag = 0; + public boolean typeFlag = true; + public boolean straightFlag = false; + + @SWFType(value=BasicType.UB,count=4) public int numBits; + + @SWFType(value=BasicType.SB,countField = "numBits",countAdd = 2) public int controlDeltaX; + + @SWFType(value=BasicType.SB,countField = "numBits",countAdd = 2) public int controlDeltaY; + + @SWFType(value=BasicType.SB,countField = "numBits",countAdd = 2) public int anchorDeltaX; + + @SWFType(value=BasicType.SB,countField = "numBits",countAdd = 2) public int anchorDeltaY; @Override diff --git a/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/EndShapeRecord.java b/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/EndShapeRecord.java index 9a317fa9d..2b194d502 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/EndShapeRecord.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/EndShapeRecord.java @@ -16,13 +16,17 @@ */ package com.jpexs.decompiler.flash.types.shaperecords; +import com.jpexs.decompiler.flash.types.BasicType; +import com.jpexs.decompiler.flash.types.annotations.SWFType; + /** * * @author JPEXS */ public class EndShapeRecord extends SHAPERECORD { - public int typeFlag = 0; + public boolean typeFlag = false; + @SWFType(value=BasicType.UB,count=5) public int endOfShape = 0; @Override diff --git a/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/StraightEdgeRecord.java b/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/StraightEdgeRecord.java index 6ca557bd5..e72659dd9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/StraightEdgeRecord.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/StraightEdgeRecord.java @@ -17,6 +17,9 @@ package com.jpexs.decompiler.flash.types.shaperecords; import com.jpexs.decompiler.flash.SWFOutputStream; +import com.jpexs.decompiler.flash.types.BasicType; +import com.jpexs.decompiler.flash.types.annotations.Conditional; +import com.jpexs.decompiler.flash.types.annotations.SWFType; /** * @@ -24,12 +27,32 @@ import com.jpexs.decompiler.flash.SWFOutputStream; */ public class StraightEdgeRecord extends SHAPERECORD { + /* + if (!ser.generalLineFlag) { + ser.vertLineFlag = readUB(1) == 1; + } + if (ser.generalLineFlag || (!ser.vertLineFlag)) { + ser.deltaX = (int) readSB(ser.numBits + 2); + } + if (ser.generalLineFlag || (ser.vertLineFlag)) { + ser.deltaY = (int) readSB(ser.numBits + 2); + } + */ public int typeFlag = 1; public int straightFlag = 1; + @SWFType(value=BasicType.UB,count=4) public int numBits; public boolean generalLineFlag; + + @Conditional(value="generalLineFlag",revert = true) public boolean vertLineFlag; + + @SWFType(value=BasicType.SB,countField = "numBits",countAdd = 2) + @Conditional("generalLineFlag|!vertLineFlag") public int deltaX; + + @SWFType(value=BasicType.SB,countField = "numBits",countAdd = 2) + @Conditional("generalLineFlag|vertLineFlag") public int deltaY; @Override diff --git a/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/StyleChangeRecord.java b/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/StyleChangeRecord.java index 43114e558..e1fe5bd24 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/StyleChangeRecord.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/StyleChangeRecord.java @@ -17,8 +17,11 @@ package com.jpexs.decompiler.flash.types.shaperecords; import com.jpexs.decompiler.flash.SWFOutputStream; +import com.jpexs.decompiler.flash.types.BasicType; import com.jpexs.decompiler.flash.types.FILLSTYLEARRAY; import com.jpexs.decompiler.flash.types.LINESTYLEARRAY; +import com.jpexs.decompiler.flash.types.annotations.Conditional; +import com.jpexs.decompiler.flash.types.annotations.SWFType; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; @@ -29,21 +32,47 @@ import java.util.logging.Logger; */ public class StyleChangeRecord extends SHAPERECORD implements Cloneable { - public int typeFlag = 0; + public boolean typeFlag = false; public boolean stateNewStyles; public boolean stateLineStyle; public boolean stateFillStyle1; public boolean stateFillStyle0; public boolean stateMoveTo; + + @SWFType(value=BasicType.UB,count=5) + @Conditional("stateMoveTo") public int moveBits; + + @SWFType(value=BasicType.SB,countField = "moveBits") + @Conditional("stateMoveTo") public int moveDeltaX; + + @SWFType(value=BasicType.SB,countField = "moveBits") + @Conditional("stateMoveTo") public int moveDeltaY; + + @SWFType(value=BasicType.UB,countField = "fillBits") //last defined fillBits + @Conditional("stateFillStyle0") public int fillStyle0; + + @SWFType(value=BasicType.UB,countField = "fillBits") //last defined fillBits + @Conditional("stateFillStyle1") public int fillStyle1; + + @SWFType(value=BasicType.UB,countField = "lineBits") //last defined lineBits + @Conditional("stateLineStyle") public int lineStyle; + + @Conditional("stateNewStyles") public FILLSTYLEARRAY fillStyles; + + @Conditional("stateNewStyles") public LINESTYLEARRAY lineStyles; + + @Conditional("stateNewStyles") public int numFillBits; + + @Conditional("stateNewStyles") public int numLineBits; @Override