Package tv.porst.splib.binaryparser

Examples of tv.porst.splib.binaryparser.UINT8


    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");

    return new ButtonRecord2(buttonReserved, buttonHasBlendMode, buttonHasFilterList,
        buttonStateHitTest, buttonStateDown, buttonStateOver,
        buttonStateUp, characterID, placeDepth, placeMatrix,
        colorTransform, filterList, blendMode);
View Full Code Here


* Parses ActionScript 3 'iftrue' instructions.
*/
public final class AS3IftrueParser {

  public static AS3Iftrue parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {
    final UINT8 opcode = parseUINT8(parser, 0x00006, fieldName + "::opcode");
    final INT24 offset = parseINT24(parser, 0x00006, fieldName + "::offset");

    return new AS3Iftrue(opcode, offset);
  }
View Full Code Here

* Parses ActionScript 3 'strictequals' instructions.
*/
public final class AS3StrictequalsParser {

  public static AS3Strictequals parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {
    final UINT8 opcode = parseUINT8(parser, 0x00006, fieldName + "::opcode");

    return new AS3Strictequals(opcode);
  }
View Full Code Here

*/
public final class AS3BitorParser {

  public static AS3Bitor parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {

    final UINT8 opcode = parseUINT8(parser, 0x00006, fieldName + "::opcode");

    return new AS3Bitor(opcode);
  }
View Full Code Here

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

    final UINT8 fillStyleType = parseUINT8(parser, 0x00006, fieldName + "::FillStyleType");
    final int fillStyleTypeValue = fillStyleType.value();
    final RGBA color = RGBAParser.parseIf(parser, fillStyleTypeValue == 0x00, fieldName + "::Color");
    final Matrix gradientMatrix = MatrixParser.parseIf(parser, fillStyleTypeValue == 0x10 || fillStyleTypeValue == 0x12 || fillStyleTypeValue == 0x13, fieldName + "::GradientMatrix");
    final IGradient gradient = getGradient(parser, fillStyleTypeValue, fieldName + "::Gradient");
    final UINT16 bitmapId = parseUINT16If(parser, 0x00006, fillStyleTypeValue >= 0x40 && fillStyleTypeValue <= 0x43, fieldName + "::BitmapID");
    final Matrix bitmapMatrix= MatrixParser.parseIf(parser, fillStyleTypeValue >= 0x40 && fillStyleTypeValue <= 0x43, fieldName + "::BitmapMatrix");
View Full Code Here

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

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

    final int bitmapFormatValue = bitmapFormat.value();

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

    final int numberOfBytes = header.getNormalizedLength() - 2 - 1 - 2 - 2 - (bitmapColorTableSize == null ? 0 : 1);
    final ByteArray zlibBitmapData = parseByteArray(parser, numberOfBytes, 0x00006, "DefineBitsLossless::ZlibBitmapData");

    return new DefineBitsLosslessTag(header, characterId, bitmapFormat, bitmapWidth, bitmapHeight, bitmapColorTableSize, zlibBitmapData);
View Full Code Here

  public static DefineTextTag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 characterId = parseUINT16(parser, 0x00006, "DefineText::CharacterId");
    final Rect textBounds = RectParser.parse(parser, "DefineText::TextBounds");
    final Matrix textMatrix = MatrixParser.parse(parser, "DefineText::TextMatrix");
    final UINT8 glyphBits = parseUINT8(parser, 0x00006, "DefineText::GlyphBits");
    final UINT8 advanceBits = parseUINT8(parser, 0x00006, "DefineText::AdvanceBits");

    final List<TextRecord> textRecords = new ArrayList<TextRecord>();

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

      textRecords.add(TextRecordParser.parse(parser, glyphBits.value(), advanceBits.value(), String.format("DefineText::TextRecords[%d]", textRecords.size())));

    } while (true);

    final UINT8 end = parseUINT8(parser, 0x00006, "DefineTextParser::EndOfRecordsFlag");

    return new DefineTextTag(header, characterId, textBounds, textMatrix, glyphBits, advanceBits, new TextRecordList(textRecords), end);
  }
View Full Code Here

    final UBits useFlashType = parseUBits(parser, 2, 0x00006, "CSMTextSettings::UseFlashType");
    final UBits gridFit = parseUBits(parser, 3, 0x00006, "CSMTextSettings::GridFit");
    final UBits reserved = parseUBits(parser, 3, 0x00006, "CSMTextSettings::Reserved");
    final Float32 thickness = parseFloat(parser, 0x00006, "CSMTextSettings::Thickness");
    final Float32 sharpness = parseFloat(parser, 0x00006, "CSMTextSettings::Sharpness");
    final UINT8 reserved2 = parseUINT8(parser, 0x00006, "CSMTextSettings::Reserveds");

    return new CSMTextSettingsTag(header, textId, useFlashType, gridFit, reserved, thickness, sharpness, reserved2);
  }
View Full Code Here

    final UINT16 width = parseUINT16(parser, 0x00006, "DefineVideoStream::Width");
    final UINT16 height = parseUINT16(parser, 0x00006, "DefineVideoStream::Height");
    final UBits videoFlagsReserved = parseUBits(parser, 4, 0x00006, "DefineVideoStream::VideoFlagsReserved");
    final UBits videoFlagsDeblocking = parseUBits(parser, 3, 0x00006, "DefineVideoStream::VideoFlagsDeblocking");
    final Flag videoFlagsSmoothing = parseFlag(parser, 0x00006, "DefineVideoStream::VideoFlagsSmoothing");
    final UINT8 codecId = parseUINT8(parser, 0x00006, "DefineVideoStream::CodecID");

    return new DefineVideoStreamTag(header, characterId, numFrames, width, height,
        videoFlagsReserved, videoFlagsDeblocking, videoFlagsSmoothing,
        codecId);
  }
View Full Code Here

*/
public final class AS3ConvertsParser {

  public static AS3Converts parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {

    final UINT8 opcode = parseUINT8(parser, 0x00006, fieldName + "::opcode");

    return new AS3Converts(opcode);
  }
View Full Code Here

TOP

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

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.