Package tv.porst.splib.binaryparser

Examples of tv.porst.splib.binaryparser.UINT16


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

    final UINT16 characterId = parseUINT16(parser, 0x00006, "DefineMorphShape::CharacterId");
    final Rect startBounds = RectParser.parse(parser, "DefineMorphShape::StartBounds");
    final Rect endBounds = RectParser.parse(parser, "DefineMorphShape::EndBounds");
    final UINT32 offset = parseUINT32(parser, 0x00006, "DefineMorphShape::Offset");
    final MorphFillStyleArray morphFillStyles = MorphFillStyleArrayParser.parse(parser, "DefineMorphShape::MorphFillStyles");
    final MorphLineStyleArray morphLineStyles = MorphLineStyleArrayParser.parse(parser, "DefineMorphShape::MorphLineStyles");
View Full Code Here


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

    final UINT16 count= parseUINT16(parser, 0x00006, "ExportAssets::Count");

    final List<Symbol> tags = new ArrayList<Symbol>();

    for (int i=0;i<count.value();i++) {
      tags.add(SymbolParser.parse(parser, String.format("ExportAssets::Tags[%d]", i)));
    }

    return new ExportAssetsTag(header, count, new SymbolList(tags));
  }
View Full Code Here

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

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

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

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

    final UINT16 characterId = parseUINT16(parser, 0x00006, "DefineBitsLossless2::CharacterId");
    final UINT8 bitmapFormat = parseUINT8(parser, 0x00006, "DefineBitsLossless2::BitmapFormat");
    final UINT16 bitmapWidth = parseUINT16(parser, 0x00006, "DefineBitsLossless2::BitmapWidth");
    final UINT16 bitmapHeight = parseUINT16(parser, 0x00006, "DefineBitsLossless2::BitmapHeight");

    final int bitmapFormatValue = bitmapFormat.value();

    final UINT8 bitmapColorTableSize = parseUINT8If(parser, 0x00006, bitmapFormatValue == 3, "DefineBitsLossless2::BitmapColorTableSize");

View Full Code Here

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

    final UINT16 shapeId = parseUINT16(parser, 0x00006, "DefineShape4::ShapeID");

    final Rect shapeBounds = RectParser.parse(parser, "DefineShape4::ShapeBounds");
    final Rect edgeBounds = RectParser.parse(parser, "DefineShape4::EdgeBounds");
    final UBits reserved = parseUBits(parser, 5, 0x00006, "DefineShape4::Reserved");
    final Flag usesFillWindingRule = parseFlag(parser, 0x00006, "DefineShape4::UsesFillWindingRule");
View Full Code Here

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

    final UINT16 fontId = parseUINT16(parser, 0x00006, "DefineFontInfo::FontId");
    final UINT8 fontNameLen = parseUINT8(parser, 0x00006, "DefineFontInfo::FontNameLen");
    final AsciiString fontName = parseString(parser, fontNameLen.value(), 0x00006, "DefineFontInfo::FontName");
    final UBits fontFlagsReserved = parseUBits(parser, 2, 0x00006, "DefineFontInfo::FontFlagsReserved");
    final Flag fontFlagsSmallText = parseFlag(parser, 0x00006, "DefineFontInfo::FontFlagsSmallText");
    final Flag fontFlagsShiftJIS = parseFlag(parser, 0x00006, "DefineFontInfo::FontFlagsShiftJIS");
View Full Code Here

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

    final UINT16 fontId = parseUINT16(parser, 0x00006, "DefineText2::FontId");
    final UBits fontFlagsReserved = parseUBits(parser, 5, 0x00006, "DefineFont4::FontFlagsReserved");
    final Flag fontFlagsHasFontData = parseFlag(parser, 0x00006, "DefineFont4::FontFlagsHasFontData");
    final Flag fontFlagsItalic = parseFlag(parser, 0x00006, "DefineFont4::FontFlagsItalic");
    final Flag fontFlagsBold = parseFlag(parser, 0x00006, "DefineFont4::FontFlagsBold");
    final AsciiString fontName = parseString(parser, 0x00006, "DefineFont4::FontName");
View Full Code Here

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

    final UINT16 characterId = parseUINT16(parser, 0x00006, "DefineScalingGrid::CharacterId");
    final Rect splitter = RectParser.parse(parser, "DefineScalingGrid::Splitter");

    return new DefineScalingGridTag(header, characterId, splitter);
  }
View Full Code Here

import tv.porst.swfretools.parser.SWFParserException;

public class ActionGetURLParser {

  public static ActionGetURL parse(final SWFBinaryParser parser, final UINT8 actionCode, final String fieldName) throws SWFParserException {
    final UINT16 length = parseUINT16(parser, 0x00006, fieldName + "::Length");
    final AsciiString urlString = parseString(parser, 0x00006, "::UrlString");
    final AsciiString targetString = parseString(parser, 0x00006, "::TargetString");

    return new ActionGetURL(actionCode, length, urlString, targetString);
  }
View Full Code Here

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

    final UINT8 fillStyleCount = parseUINT8(parser, 0x00006, fieldName + "::FillStyleCount");
    final UINT16 fillStyleCountExtended = fillStyleCount.value() == 0xFF ? parseUINT16(parser, 0x00006, fieldName + "::FillStyleCountExtended") : null;

    final int normalizedCount = fillStyleCount.value() == 0xFF ? fillStyleCountExtended.value() : fillStyleCount.value();

    final List<FillStyle> fillStyles = new ArrayList<FillStyle>();

    for (int i=0;i<normalizedCount;i++) {
      fillStyles.add(FillStyleParser.parse(parser, String.format(fieldName + "::FillStyles[%d]", fillStyles.size())));
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.