Package tv.porst.splib.binaryparser

Examples of tv.porst.splib.binaryparser.Flag


   *
   * @throws SWFParserException Thrown if the structure could not be parsed.
   */
  public static ClipEventFlags parse(final SWFBinaryParser parser, final int version, final String fieldName) throws SWFParserException {

    final Flag clipEventKeyUp = parseFlag(parser, 0x00006, fieldName + "::ClipEventKeyUp");
    final Flag clipEventKeyDown = parseFlag(parser, 0x00006, fieldName + "::ClipEventKeyDown");
    final Flag clipEventMouseUp = parseFlag(parser, 0x00006, fieldName + "::ClipEventMouseUp");
    final Flag clipEventMouseDown = parseFlag(parser, 0x00006, fieldName + "::ClipEventMouseDown");
    final Flag clipEventMouseMove = parseFlag(parser, 0x00006, fieldName + "::ClipEventMouseDown");
    final Flag clipEventUnload = parseFlag(parser, 0x00006, fieldName + "::ClipEventUnload");
    final Flag clipEventEnterFrame = parseFlag(parser, 0x00006, fieldName + "::ClipEventEnterFrame");
    final Flag clipEventLoad = parseFlag(parser, 0x00006, fieldName + "::ClipEventLoad");
    final Flag clipEventDragOver = parseFlag(parser, 0x00006, fieldName + "::ClipEventDragOver");
    final Flag clipEventRollOut = parseFlag(parser, 0x00006, fieldName + "::ClipEventRollOut");
    final Flag clipEventRollOver = parseFlag(parser, 0x00006, fieldName + "::ClipEventRollOver");
    final Flag clipEventReleaseOutside = parseFlag(parser, 0x00006, fieldName + "::ClipEventReleaseOutside");
    final Flag clipEventRelease = parseFlag(parser, 0x00006, fieldName + "::ClipEventRelease");
    final Flag clipEventPress = parseFlag(parser, 0x00006, fieldName + "::ClipEventPress");
    final Flag clipEventInitialize = parseFlag(parser, 0x00006, fieldName + "::ClipEventInitialize");
    final Flag clipEventData = parseFlag(parser, 0x00006, fieldName + "::ClipEventData");

    final UBits reserved = parseUBitsIf(parser, 5, 0x00006, version >= 6, fieldName + "::Reserved");
    final Flag clipEventConstruct = parseFlagIf(parser, 0x00006, version >= 6, fieldName + "::ClipEventConstruct");
    final Flag clipEventKeyPress = parseFlagIf(parser, 0x00006, version >= 6, fieldName + "::ClipEventKeyPress");
    final Flag clipEventDragOut = parseFlagIf(parser, 0x00006, version >= 6, fieldName + "::ClipEventDragOut");
    final UBits reserved2 = parseUBitsIf(parser, 8, 0x00006, version >= 6, fieldName + "::Reserved2");

    parser.align();

    return new ClipEventFlags(clipEventKeyUp, clipEventKeyDown,
View Full Code Here


   *
   * @throws SWFParserException Thrown if the structure could not be parsed.
   */
  public static StraightEdgeRecord parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {

    final Flag typeFlag = parseFlag(parser, 0x00006, fieldName + "::TypeFlag");
    final Flag straightFlag = parseFlag(parser, 0x00006, fieldName + "::StraightFlag");
    final UBits numBits = parseUBits(parser, 4, 0x00006, fieldName + "::NumBits");
    final Flag generalLineFlag = parseFlag(parser, 0x00006, fieldName + "::GeneralLineFlag");
    final Flag vertLineFlag =  parseFlagIf(parser, 0x00006, !generalLineFlag.value(), fieldName + "::VertLineFlag");
    final Bits deltaX = parseSBitsIf(parser, numBits.value() + 2, 0x00006, generalLineFlag.value() || !vertLineFlag.value(), fieldName + "::DeltaX");
    final Bits deltaY = parseSBitsIf(parser, numBits.value() + 2, 0x00006, generalLineFlag.value() || vertLineFlag.value(), fieldName + "::DeltaY");

    return new StraightEdgeRecord(typeFlag, straightFlag, numBits, generalLineFlag, vertLineFlag, deltaX, deltaY);
  }
View Full Code Here

   * @throws SWFParserException Thrown if the structure could not be parsed.
   */
  public static ButtonRecord parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {

    final UBits buttonReserved = parseUBits(parser, 2, 0x00006, fieldName + "::ButtonReserved");
    final Flag buttonHasBlendMode = parseFlag(parser, 0x00006, fieldName + "::ButtonHasBlendMode");
    final Flag buttonHasFilterList = parseFlag(parser, 0x00006, fieldName + "::ButtonHasFilterList");
    final Flag buttonStateHitTest = parseFlag(parser, 0x00006, fieldName + "::ButtonStateHitTest");
    final Flag buttonStateDown = parseFlag(parser, 0x00006, fieldName + "::ButtonStateDown");
    final Flag buttonStateOver = parseFlag(parser, 0x00006, fieldName + "::ButtonStateOver");
    final Flag buttonStateUp = parseFlag(parser, 0x00006, fieldName + "::ButtonStateUp");
    final UINT16 characterID = parseUINT16(parser, 0x00006, fieldName + "::CharacterID");
    final UINT16 placeDepth = parseUINT16(parser, 0x00006, fieldName + "::PlaceDepth");
    final Matrix placeMatrix = MatrixParser.parse(parser, fieldName + "::PlaceMatrix");

    return new ButtonRecord(buttonReserved, buttonHasBlendMode, buttonHasFilterList,
View Full Code Here

    final Fixed blurX = FixedParser.parse(parser, fieldName + "::BlurX");
    final Fixed blurY = FixedParser.parse(parser, fieldName + "::BlurY");
    final Fixed angle = FixedParser.parse(parser, fieldName + "::Angle");
    final Fixed distance = FixedParser.parse(parser, fieldName + "::Distance");
    final Fixed8 strength = Fixed8Parser.parse(parser, fieldName + "::Strength");
    final Flag innerShadow = parseFlag(parser, 0x00006, fieldName + "::InnerShadow");
    final Flag knockout = parseFlag(parser, 0x00006, fieldName + "::Knockout");
    final Flag compositeSource = parseFlag(parser, 0x00006, fieldName + "::CompositeSource");
    final Flag onTop = parseFlag(parser, 0x00006, fieldName + "::OnTop");
    final UBits passes = parseUBits(parser, 4, 0x00006, fieldName + "::Passes");

    return new BevelFilter(shadowColor, highlightColor, blurX, blurY, angle, distance, strength, innerShadow, knockout, compositeSource, onTop, passes);
  }
View Full Code Here

   *
   * @throws SWFParserException Thrown if the structure could not be parsed.
   */
  public static StyleChangeRecord3 parse(final SWFBinaryParser parser, final UBits fillBits, final UBits lineBits, final String fieldName) throws SWFParserException {

    final Flag typeFlag = parseFlag(parser, 0x00006, fieldName + "::TypeFlag");
    final Flag stateNewStyles = parseFlag(parser, 0x00006, fieldName + "::StateNewStyles");
    final Flag stateLineStyle = parseFlag(parser, 0x00006, fieldName + "::StateLineStyle");
    final Flag stateFillStyle1 = parseFlag(parser, 0x00006, fieldName + "::StateFillStyle1");
    final Flag stateFillStyle0 = parseFlag(parser, 0x00006, fieldName + "::StateFillStyle0");
    final Flag stateMoveTo = parseFlag(parser, 0x00006, fieldName + "::StateMoveTo");
    final UBits moveBits = parseUBitsIf(parser, 5, 0x00006, stateMoveTo, fieldName + "::MoveBits");
    final UBits moveDeltaX = parseUBitsIf(parser, moveBits == null ? 0 : moveBits.value(), 0x00006, stateMoveTo, fieldName + "::MoveDeltaX");
    final UBits moveDeltaY = parseUBitsIf(parser, moveBits == null ? 0 : moveBits.value(), 0x00006, stateMoveTo, fieldName + "::MoveDeltaY");
    final UBits fillStyle0 = parseUBitsIf(parser, fillBits == null ? 0 : fillBits.value(), 0x00006, stateFillStyle0, fieldName + "::FillStyle0");
    final UBits fillStyle1 = parseUBitsIf(parser, fillBits == null ? 0 : fillBits.value(), 0x00006, stateFillStyle1, fieldName + "::FillStyle1");
View Full Code Here

   * @throws SWFParserException Thrown if the structure could not be parsed.
   */
  public static SoundInfo parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {

    final UBits reserved = parseUBits(parser, 2, 0x00006, fieldName + "::Reserved");
    final Flag syncStop = parseFlag(parser, 0x00006, fieldName + "::SyncStopY");
    final Flag syncNoMultiple = parseFlag(parser, 0x00006, fieldName + "::SyncNoMultiple");
    final Flag hasEnvelope = parseFlag(parser, 0x00006, fieldName + "::HasMultiple");
    final Flag hasLoops = parseFlag(parser, 0x00006, fieldName + "::HasLoops");
    final Flag hasOutPoint= parseFlag(parser, 0x00006, fieldName + "::HasOutPoint");
    final Flag hasInPoint = parseFlag(parser, 0x00006, fieldName + "::HasInPoint");

    final UINT32 inPoint = parseUINT32If(parser, 0x00006, hasInPoint, fieldName + "::InPoint");
    final UINT32 outPoint = parseUINT32If(parser, 0x00006, hasOutPoint, fieldName + "::OutPoint");
    final UINT16 loopCount = parseUINT16If(parser, 0x000006, hasLoops, fieldName + "::LoopCount");
    final UINT8 envPoints = parseUINT8If(parser, 0x00006, hasEnvelope, fieldName + "::EnvPoints");
View Full Code Here

   *
   * @throws SWFParserException Thrown if the structure could not be parsed.
   */
  public static StyleChangeRecord4 parse(final SWFBinaryParser parser, final UBits fillBits, final UBits lineBits, final String fieldName) throws SWFParserException {

    final Flag typeFlag = parseFlag(parser, 0x00006, fieldName + "::TypeFlag");
    final Flag stateNewStyles = parseFlag(parser, 0x00006, fieldName + "::StateNewStyles");
    final Flag stateLineStyle = parseFlag(parser, 0x00006, fieldName + "::StateLineStyle");
    final Flag stateFillStyle1 = parseFlag(parser, 0x00006, fieldName + "::StateFillStyle1");
    final Flag stateFillStyle0 = parseFlag(parser, 0x00006, fieldName + "::StateFillStyle0");
    final Flag stateMoveTo = parseFlag(parser, 0x00006, fieldName + "::StateMoveTo");
    final UBits moveBits = parseUBitsIf(parser, 5, 0x00006, stateMoveTo, fieldName + "::MoveBits");
    final UBits moveDeltaX = parseUBitsIf(parser, moveBits == null ? 0 : moveBits.value(), 0x00006, stateMoveTo, fieldName + "::MoveDeltaX");
    final UBits moveDeltaY = parseUBitsIf(parser, moveBits == null ? 0 : moveBits.value(), 0x00006, stateMoveTo, fieldName + "::MoveDeltaY");
    final UBits fillStyle0 = parseUBitsIf(parser, fillBits == null ? 0 : fillBits.value(), 0x00006, stateFillStyle0, fieldName + "::FillStyle0");
    final UBits fillStyle1 = parseUBitsIf(parser, fillBits == null ? 0 : fillBits.value(), 0x00006, stateFillStyle1, fieldName + "::FillStyle1");
View Full Code Here

   *
   * @throws SWFParserException Thrown if the structure could not be parsed.
   */
  public static CurvedEdgeRecord parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {

    final Flag typeFlag = parseFlag(parser, 0x00006, fieldName + "::TypeFlag");
    final Flag straightFlag = parseFlag(parser, 0x00006, fieldName + "::StraightFlag");
    final UBits numBits = parseUBits(parser, 4, 0x00006, fieldName + "::NumBits");
    final Bits controlDeltaX = parseSBits(parser, numBits.value() + 2, 0x00006, fieldName + "::ControlDeltaX");
    final Bits controlDeltaY = parseSBits(parser, numBits.value() + 2, 0x00006, fieldName + "::ControlDeltaY");
    final Bits anchorDeltaX = parseSBits(parser, numBits.value() + 2, 0x00006, fieldName + "::AnchorDeltaX");
    final Bits anchorDeltaY = parseSBits(parser, numBits.value() + 2, 0x00006, fieldName + "::AnchorDeltaY");
View Full Code Here

    final Fixed blurX = FixedParser.parse(parser, fieldName + "::BlurX");
    final Fixed blurY = FixedParser.parse(parser, fieldName + "::BlurY");
    final Fixed angle = FixedParser.parse(parser, fieldName + "::Angle");
    final Fixed distance = FixedParser.parse(parser, fieldName + "::Distance");
    final Fixed8 strength = Fixed8Parser.parse(parser, fieldName + "::Strength");
    final Flag innerShadow = parseFlag(parser, 0x00006, fieldName + "::InnerShadow");
    final Flag knockout = parseFlag(parser, 0x00006, fieldName + "::KnockOut");
    final Flag compositeSource = parseFlag(parser, 0x00006, fieldName + "::CompositeSource");
    final Flag onTop = parseFlag(parser, 0x00006, fieldName + "::OnTop");
    final UBits passes = parseUBits(parser, 4, 0x00006, fieldName + "::Passes");

    return new GradientBevelFilter(numColors, new RGBAList(gradientColors), new UINT8List(gradientRatio), blurX, blurY, angle, distance, strength, innerShadow, knockout, compositeSource, onTop, passes);
  }
View Full Code Here

  public static ActionTry parse(final SWFBinaryParser parser, final UINT8 actionCode, final String fieldName) throws SWFParserException {

    final UINT16 length = parseUINT16(parser, 0x00006, fieldName + "::Length");
    final UBits reserved = parseUBits(parser, 5, 0x00006, fieldName + "::Reserved");
    final Flag catchInRegisterFlag = parseFlag(parser, 0x00006, fieldName + "::CatchInRegisterFlag");
    final Flag finallyBlockFlag = parseFlag(parser, 0x00006, fieldName + "::FinallyBlockFlag");
    final Flag catchBlockFlag = parseFlag(parser, 0x00006, fieldName + "::CatchBlockFlag");
    final UINT16 trySize = parseUINT16(parser, 0x00006, fieldName + "::TrySize");
    final UINT16 catchSize = parseUINT16(parser, 0x00006, fieldName + "::CatchSize");
    final UINT16 finallySize = parseUINT16(parser, 0x00006, fieldName + "::FinallySize");

    final AsciiString catchName = parseStringIf(parser, 0x00006, !catchInRegisterFlag.value(), "::CatchName");
View Full Code Here

TOP

Related Classes of tv.porst.splib.binaryparser.Flag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.