Package tv.porst.splib.binaryparser

Examples of tv.porst.splib.binaryparser.UINT16


   *
   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static PlaceObjectTag parse(final SWFBinaryParser parser, final RecordHeader header) throws SWFParserException {

    final UINT16 characterId = parseUINT16(parser, 0x00006, "PlaceObject::CharacterId");
    final UINT16 depth = parseUINT16(parser, 0x00006, "PlaceObject::Depth");
    final Matrix matrix = MatrixParser.parse(parser, "PlaceObject::Matrix");
    final CxForm colorTransform = CxFormParser.parse(parser, "PlaceObject::CxForm");

    return new PlaceObjectTag(header, characterId, depth, matrix, colorTransform);
  }
View Full Code Here


   *
   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static DefineButtonTag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 buttonId = parseUINT16(parser, 0x00006, "DefineButton::ButtonId");

    final List<ButtonRecord> characters = new ArrayList<ButtonRecord>();

    do {
      if (parser.peekUInt8().value() == 0) {
View Full Code Here

   *
   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static RemoveObjectTag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 characterId = parseUINT16(parser, 0x00006, "RemoveObject::CharacterId");
    final UINT16 depth = parseUINT16(parser, 0x00006, "RemoveObject::Depth");

    return new RemoveObjectTag(header, characterId, depth);
  }
View Full Code Here

   *
   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static DefineShape3Tag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 shapeId = parseUINT16(parser, 0x00006, "DefineShape3::ShapeID");
    final Rect shapeBounds = RectParser.parse(parser, "DefineShape3::ShapeBounds");
    final ShapeWithStyle3 shapes = ShapeWithStyle3Parser.parse(parser, "DefineShape3::Shapes");

    return new DefineShape3Tag(header, shapeId, shapeBounds, shapes);
  }
View Full Code Here

   *
   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static DefineBitsTag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 characterId = parseUINT16(parser, 0x00006, "DefineBits::CharacterId");
    final ByteArray jpegData = parseByteArray(parser, header.getNormalizedLength() - 2, 0x00006, "DefineBits::JPEGData");

    return new DefineBitsTag(header, characterId, jpegData);
  }
View Full Code Here

    final Flag placeFlagHasImage = parseFlag(parser, 0x00006, "PlaceObject3::PlaceFlagHasImage");
    final Flag placeFlagHasClassName = parseFlag(parser, 0x00006, "PlaceObject3::PlaceFlagHasClassName");
    final Flag placeFlagHasCacheAsBitmap = parseFlag(parser, 0x00006, "PlaceObject3::PlaceFlagHasCacheAsBitmap");
    final Flag placeFlagHasBlendMode = parseFlag(parser, 0x00006, "PlaceObject3::PlaceFlagHasBlendMode");
    final Flag placeFlagHasFilterList = parseFlag(parser, 0x00006, "PlaceObject3::PlaceFlagHasFilterList");
    final UINT16 depth = parseUINT16(parser, 0x00005, "PlaceObject3::Depth");
    final AsciiString className = parseStringIf(parser, 0x00006, placeFlagHasClassName.value() || (placeFlagHasImage.value() && placeFlagHasCharacter.value()), "PlaceObject3::ClassName");
    final UINT16 characterId = parseUINT16If(parser, 0x00006, placeFlagHasCharacter, "PlaceObject3::CharacterId");
    final Matrix matrix = MatrixParser.parseIf(parser, placeFlagHasMatrix, "PlaceObject3::Matrix");
    final CxFormWithAlpha colorTransform = CxFormWithAlphaParser.parseIf(parser, placeFlagHasColorTransform, "PlaceObject3::CxFormWithAlpha");
    final UINT16 ratio = parseUINT16If(parser, 0x00006, placeFlagHasRatio, "PlaceObject3::Ratio");
    final AsciiString name = parseStringIf(parser, 0x00006, placeFlagHasName, "PlaceObject3::Name");
    final UINT16 clipDepth = parseUINT16If(parser, 0x00006, placeFlagHasClipDepth, "PlaceObject3::ClipDepth");
    final FilterList surfaceFilterList = FilterListParser.parseIf(parser, placeFlagHasFilterList, "PlaceObject3::SurfaceFilterList");
    final UINT8 blendMode = parseUINT8If(parser, 0x00006, placeFlagHasBlendMode, "PlaceObject3::BlendMode");
    final UINT8 bitmapCache = parseUINT8If(parser, 0x00006, placeFlagHasCacheAsBitmap, "PlaceObject3::BitmapCache");
    final ClipActions clipActions = parseIf(parser, version, placeFlagHasClipActions, "PlaceObject3::ClipActions");
View Full Code Here

   *
   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static DefineShape2Tag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 shapeId = parseUINT16(parser, 0x00006, "DefineShape2::ShapeID");
    final Rect shapeBounds = RectParser.parse(parser, "DefineShape2::ShapeBounds");
    final ShapeWithStyle shapes = ShapeWithStyleParser.parse(parser, "DefineShape2::Shapes");

    return new DefineShape2Tag(header, shapeId, shapeBounds, shapes);
  }
View Full Code Here

   *
   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static SetTabIndexTag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 depth = parseUINT16(parser, 0x00006, "SetTabIndex::Depth");
    final UINT16 tabIndex = parseUINT16(parser, 0x00006, "SetTabIndex::TabIndex");

    return new SetTabIndexTag(header, depth, tabIndex);
  }
View Full Code Here

   *
   * @throws SWFParserException Thrown if the tag header could not be parsed
   */
  private static RecordHeader parseRecordHeader(final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 tagCodeAndLength = SWFParserHelpers.parseUINT16(parser, 0x00006, "RecordHeader::TagCodeAndLength");

    final int length = tagCodeAndLength.value() & 0x3F;

    if (length == 0x3F) {
      final INT32 extraLength = SWFParserHelpers.parseINT32(parser, 0x00006, "RecordHeader::Length");
      return new RecordHeader(tagCodeAndLength, extraLength);
    }
View Full Code Here

   *
   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static DefineButton2Tag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 buttonId = parseUINT16(parser, 0x00006, "DefineButton2::ButtonId");
    final UBits reservedFlags = parseUBits(parser, 7, 0x00006, "DefineButton2::ReservedFlags");
    final Flag trackAsMenu = parseFlag(parser, 0x00006, "DefineButton2::TrackAsMenu");
    final UINT16 actionOffset = parseUINT16(parser, 0x00006, "DefineButton2::ActionOffset");

    final List<ButtonRecord2> characters = new ArrayList<ButtonRecord2>();

    do {
      if (parser.peekUInt8().value() == 0) {
        break;
      }

      characters.add(ButtonRecord2Parser.parse(parser, String.format("DefineButton2::Characters[%d]", characters.size())));

    } while (true);

    final UINT8 characterEndFlag = parseUINT8(parser, 0x00006, "DefineButton2::CharacterEndFlag");

    final List<ButtonCondAction> actions = new ArrayList<ButtonCondAction>();

    if (actionOffset.value() != 0) {

      do {
        final ButtonCondAction action = ButtonCondActionParser.parse(parser, header, String.format("DefineButton2::ButtonCondAction[%d]", actions.size()));

        actions.add(action);
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.