Examples of UINT8


Examples of tv.porst.splib.binaryparser.UINT8

*/
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

Examples of tv.porst.splib.binaryparser.UINT8

   *
   * @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

Examples of tv.porst.splib.binaryparser.UINT8

   * @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

Examples of tv.porst.splib.binaryparser.UINT8

  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

Examples of tv.porst.splib.binaryparser.UINT8

    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

Examples of tv.porst.splib.binaryparser.UINT8

    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

Examples of tv.porst.splib.binaryparser.UINT8

*/
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

Examples of tv.porst.splib.binaryparser.UINT8

public class ActionPushParser {

  private static PushedValue<?> parsePushedValue(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {

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

    switch (type.value()) {
    case 0: return new PushedString(type, SWFParserHelpers.parseString(parser, 0x00006, fieldName + "::String"));
    case 1: return new PushedFloat(type, SWFParserHelpers.parseFloat(parser, 0x00006, fieldName + "::Float"));
    case 2: return new PushedNull(type);
    case 3: return new PushedUndefined(type);
    case 4: return new PushedRegisterNumber(type, parseUINT8(parser, 0x00006, fieldName + "::RegisterNumber"));
View Full Code Here

Examples of tv.porst.splib.binaryparser.UINT8

*/
public class AS3LookupswitchParser {

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

    final UINT8 opcode = parseUINT8(parser, 0x00006, fieldName + "::opcode");
    final INT24 defaultOffset = parseINT24(parser, 0x00006, fieldName + "::default_offset");
    final EncodedU30 caseCounts = EncodedU30Parser.parse(parser, fieldName + "::case_counts");

    final List<INT24> caseOffsets = new ArrayList<INT24>();

View Full Code Here

Examples of tv.porst.splib.binaryparser.UINT8

* Parses ActionScript 3 'setlocal0' instructions.
*/
public final class AS3Setlocal0Parser {

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

    return new AS3Setlocal0(opcode);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.