Package tv.porst.splib.binaryparser

Examples of tv.porst.splib.binaryparser.UINT16


import tv.porst.swfretools.parser.SWFParserException;

public class ActionGotoFrameParser {

  public static ActionGotoFrame parse(final SWFBinaryParser parser, final UINT8 actionCode, final String fieldName) throws SWFParserException {
    final UINT16 length = parseUINT16(parser, 0x00006, fieldName + "::Length");
    final UINT16 frame = parseUINT16(parser, 0x00006, fieldName + "::Frame");

    return new ActionGotoFrame(actionCode, length, frame);
  }
View Full Code Here


import tv.porst.swfretools.parser.SWFParserException;

public class ActionJumpParser {

  public static ActionJump parse(final SWFBinaryParser parser, final UINT8 actionCode, final String fieldName) throws SWFParserException {
    final UINT16 length = parseUINT16(parser, 0x00006, fieldName + "::Length");
    final INT16 branchOffset = parseINT16(parser, 0x00006, fieldName + "::BranchOffset");

    return new ActionJump(actionCode, length, branchOffset);
  }
View Full Code Here

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

    final UINT8 lineStyleCount = parseUINT8(parser, 0x00006, fieldName + "::LineStyleCount");
    final UINT16 lineStyleCountExtended = parseUINT16If(parser, 0x00006, lineStyleCount.value() == 0xFF, fieldName + "::LineStyleCountExtended");

    final int normalizedCount = lineStyleCount.value() == 0xFF ? lineStyleCountExtended.value() : lineStyleCount.value();

    final List<LineStyle4> lineStyles = new ArrayList<LineStyle4>();

    for (int i=0;i<normalizedCount;i++) {
      lineStyles.add(LineStyle4Parser.parse(parser, String.format(fieldName + "::LineStyles[%d]", lineStyles.size())));
View Full Code Here

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

    final UINT8 lineStyleCount = parseUINT8(parser, 0x00006, fieldName + "::LineStyleCount");
    final UINT16 lineStyleCountExtended = parseUINT16If(parser, 0x00006, lineStyleCount.value() == 0xFF, fieldName + "::LineStyleCountExtended");

    final int normalizedCount = lineStyleCount.value() == 0xFF ? lineStyleCountExtended.value() : lineStyleCount.value();

    final List<LineStyle3> lineStyles = new ArrayList<LineStyle3>();

    for (int i=0;i<normalizedCount;i++) {
      lineStyles.add(LineStyle3Parser.parse(parser, String.format(fieldName + "::LineStyles[%d]", i)));
View Full Code Here

    final RGBA startColor = RGBAParser.parseIf(parser, fillStyleTypeValue == 0x00, fieldName + "::StartColor");
    final RGBA endColor = RGBAParser.parseIf(parser, fillStyleTypeValue == 0x00, fieldName + "::EndColor");
    final Matrix startGradientMatrix = MatrixParser.parseIf(parser, fillStyleTypeValue == 0x10 || fillStyleTypeValue == 0x12, fieldName + "::StartGradientMatrix");
    final Matrix endGradientMatrix = MatrixParser.parseIf(parser, fillStyleTypeValue == 0x10 || fillStyleTypeValue == 0x12, fieldName + "::EndGradientMatrix");
    final MorphGradient gradient = MorphGradientParser.parseIf(parser, fillStyleTypeValue == 0x10 || fillStyleTypeValue == 0x12, fieldName + "::Gradient");
    final UINT16 bitmapId = parseUINT16If(parser, 0x00006, fillStyleTypeValue >= 0x40 && fillStyleTypeValue <= 0x43, fieldName + "::BitmapId");
    final Matrix startBitmapMatrix = MatrixParser.parseIf(parser, fillStyleTypeValue >= 0x40 && fillStyleTypeValue <= 0x43, fieldName + "::StartBitmapMatrix");
    final Matrix endBitmapMatrix = MatrixParser.parseIf(parser, fillStyleTypeValue >= 0x40 && fillStyleTypeValue <= 0x43, fieldName + "::EndBitmapMatrix");

    return new MorphFillStyle(fillStyleType, startColor, endColor, startGradientMatrix, endGradientMatrix, gradient, bitmapId, startBitmapMatrix, endBitmapMatrix);
  }
View Full Code Here

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

    final UINT16 integer = parseUINT16(parser, 0x00006, fieldName + "::Integer");
    final UINT16 decimal = parseUINT16(parser, 0x00006, fieldName + "::Decimal");

    return new Fixed(integer, decimal);
  }
View Full Code Here

import tv.porst.swfretools.parser.SWFParserException;

public class ActionGetURL2Parser {

  public static ActionGetURL2 parse(final SWFBinaryParser parser, final UINT8 actionCode, final String fieldName) throws SWFParserException {
    final UINT16 length = parseUINT16(parser, 0x00006, fieldName + "::Length");
    final UBits sendVarsMethod = parseUBits(parser, 2, 0x00006, fieldName + "::SendVarsMethod");
    final UBits reserved = parseUBits(parser, 4, 0x00006, fieldName + "::Reserved");
    final Flag loadTargetFlag = parseFlag(parser, 0x00006, fieldName + "::LoadTargetFlag");
    final Flag loadVariablesFlag = parseFlag(parser, 0x00006, fieldName + "::LoadVariablesFlag");
View Full Code Here

import tv.porst.swfretools.parser.SWFParserException;

public class ActionGotoFrame2Parser {

  public static ActionGotoFrame2 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, 6, 0x00006, fieldName + "::Reserved");
    final Flag sceneBiasFlag = parseFlag(parser, 0x00006, fieldName + "::SceneBiasFlag");
    final Flag playFlag = parseFlag(parser, 0x00006, fieldName + "::PlayFlag");
    final UINT16 sceneBias = parseUINT16If(parser, 0x00006, sceneBiasFlag, fieldName + "::SceneBias");

    return new ActionGotoFrame2(actionCode, length, reserved, sceneBiasFlag, playFlag, sceneBias);
  }
View Full Code Here

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

    final UINT8 lineStyleCount = parseUINT8(parser, 0x00006, fieldName + "::LineStyleCount");
    final UINT16 lineStyleCountExtended = parseUINT16If(parser, 0x00006, lineStyleCount.value() == 0xFF, fieldName + "::LineStyleCountExtended");

    final int normalizedCount = lineStyleCount.value() == 0xFF ? lineStyleCountExtended.value() : lineStyleCount.value();

    final List<MorphLineStyle> lineStyles = new ArrayList<MorphLineStyle>();

    for (int i=0;i<normalizedCount;i++) {
      lineStyles.add(MorphLineStyleParser.parse(parser, String.format(fieldName + "::LineStyles[%d]", i)));
View Full Code Here

    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");
    final CxFormWithAlpha colorTransform = CxFormWithAlphaParser.parse(parser, fieldName + "::CxFormWithAlpha");
    final FilterList filterList = FilterListParser.parseIf(parser, buttonHasFilterList, fieldName + "::FilterList");
    final UINT8 blendMode = parseUINT8If(parser, 0x00006, buttonHasBlendMode, fieldName + "::BlendMode");
View Full Code Here

TOP

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

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.