mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-04 08:45:10 +00:00
Annotations for shaperecords
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user