Exemple #1
0
 def __init__(self,shape=1):
     VStruct.__init__(self)
     self.Ratio  = v_uint8()
     if shape <= 2:
         self.Color = RGB()
     else:
         self.Color = RGBA()
Exemple #2
0
 def __init__(self):
     VStruct.__init__(self)
     self.msgsize    = v_uint16(bigend=True)
     self.msgtype    = v_uint16(bigend=True)
     self.pptpmagic  = v_uint32(bigend=True)
     self.ctrltype   = v_uint16(bigend=True)
     self.res0       = v_uint16(bigend=True)
 def __init__(self):
     VStruct.__init__(self)
     self.a = v_uint8()
     self.b = v_uint16()
     self.c = v_uint32()
     self.d = v_uint8()
     self.e = VArray((v_uint32(), v_uint32(), v_uint32(), v_uint32()))
Exemple #4
0
 def __init__(self):
     VStruct.__init__(self)
     self.a = v_uint8()
     self.b = v_uint16()
     self.c = v_uint32()
     self.d = v_uint8()
     self.e = VArray(
         (v_uint32(), v_uint32(), v_uint32(), v_uint32()))
Exemple #5
0
 def __init__(self,shape=1):
     VStruct.__init__(self)
     self._swf_shape = shape
     self.BitFields       = VBitField()
     self.BitFields.SpreadMode           = v_bits(2)
     self.BitFields.InterpolationMode    = v_bits(2)
     self.BitFields.NumGradients         = v_bits(4)
     self.GradientRecords = VArray()
Exemple #6
0
 def __init__(self, shape=1):
     VStruct.__init__(self)
     self.FillStyles     = FILLSTYLEARRAY(shape=shape)
     self.LineStyles     = LINESTYLEARRAY(shape=shape)
     self.NumBits        = VBitField()
     self.NumBits.NumFillBits    = v_bits(4)
     self.NumBits.NumLineBits    = v_bits(4)
     self.ShapeRecords           = VArray()
Exemple #7
0
    def __init__(self, size):
        VStruct.__init__(self)
        self.CharacterId    = v_uint16()
        self.Depth          = v_uint16()
        self.Matrix         = MATRIX()
        self.ColorTransform = SwfColorTransform()

        self._swf_tagsize = size
Exemple #8
0
 def __init__(self):
     VStruct.__init__(self)
     self.Signature  = v_str(3)
     self.Version    = v_uint8()
     self.FileLength = v_uint32()
     self.FrameSize  = RECT()
     self.FrameRate  = v_uint16()
     self.FrameCount = v_uint16()
Exemple #9
0
 def __init__(self,shape=1):
     VStruct.__init__(self)
     self._swf_shape = shape
     self.Width  = v_uint16()
     colorcls = RGB
     if shape >= 3:
         colorcls = RGBA
     self.Color = colorcls()
Exemple #10
0
 def __init__(self):
     VStruct.__init__(self)
     self.opcode = v_uint32(enum=PATCH_ACTIONS)
     self.action_size = v_uint32()  # size of entire structure
     self.pattern_size = v_uint32()  # size of pattern field
     self.rva = v_uint32()
     self.unknown = v_uint32()
     self.module_name = v_wstr(size=MAX_MODULE)
     self.pattern = v_bytes(size=0)
 def __init__(self):
     VStruct.__init__(self)
     self.opcode = v_uint32(enum=PATCH_ACTIONS)
     self.action_size = v_uint32()  # size of entire structure
     self.pattern_size = v_uint32()  # size of pattern field
     self.rva = v_uint32()
     self.unknown = v_uint32()
     self.module_name = v_wstr(size=MAX_MODULE)
     self.pattern = v_bytes(size=0)
Exemple #12
0
 def __init__(self, shape=1):
     VStruct.__init__(self)
     self._swf_shape = shape
     self.FillStyleType      = v_uint8()
     self.Color              = RGB()
     self.GradientMatrix     = MATRIX()
     self.Gradient           = GRADIENT(shape=shape)
     self.BitmapId           = v_uint16()
     self.BitmapMatrix       = MATRIX()
Exemple #13
0
    def __init__(self, format):
        VStruct.__init__(self)
        self.format = format

        self.flags = v_uint32()
        self.name = v_zstr_utf8()
        self.ordinal = v_uint32()
        self.type_info = v_zbytes()
        self.cmt = v_zstr_utf8()
        self.fields_buf = v_zbytes()
        self.fieldcmts = v_zbytes()
        self.sclass = v_uint8()
Exemple #14
0
    def __init__(self, size):
        VStruct.__init__(self)
        self.ShapeId        = v_uint16()
        self.ShapeBounds    = RECT()
        self.EdgeBounds     = RECT()
        self.ShapeFlags     = VBitField()
        self.Shapes         = SHAPEWITHSTYLE(shape=4)

        self.ShapeFlags.Reserved                = v_bits(5)
        self.ShapeFlags.UsesFillWindingRule     = v_bits(1)
        self.ShapeFlags.UsesNonScalingStrokes   = v_bits(1)
        self.ShapeFlags.UsesScalingStrokes      = v_bits(1)
Exemple #15
0
    def __init__(self, flags, format):
        VStruct.__init__(self)

        self.flags = flags
        self.format = format
        self.defs = None

        self.ndefs = v_uint32()
        self.size = v_uint32()

        if self.flags & TIL_ZIP:
            self.csize = v_uint32()
        else:
            self.csize = None

        self.buf = v_bytes()
Exemple #16
0
    def vsParse(self, sbytes, offset=0, fast=False):
        sbytes = sbytes.tobytes() if isinstance(sbytes, memoryview) else sbytes
        result = VStruct.vsParse(self, sbytes, offset, fast)

        self.types.defs.sort(key=lambda x: x.ordinal)
        self.deserialize_bucket(self.syms)
        self.deserialize_bucket(self.types)
        return result
Exemple #17
0
    def __init__(self, buf=None, wordsize=4, inf=None):
        VStruct.__init__(self)
        self.wordsize = wordsize
        self.inf = inf

        self.signature = v_str(size=0x06)

        # https://github.com/aerosoul94/tilutil/blob/master/distil.py#L545

        self.format = v_uint32()
        self.flags = v_uint32()

        self.title_len = v_uint8()
        self.title = v_str()

        self.base_len = v_uint8()
        self.base = v_str()

        self.id = v_uint8()
        self.cm = v_uint8()
        self.size_i = v_uint8()
        self.size_b = v_uint8()
        self.size_e = v_uint8()
        self.def_align = v_uint8()
Exemple #18
0
 def __init__(self,shape=1):
     VStruct.__init__(self)
     self._swf_shape = 1
     self.LineStyleCount     = v_uint8()
     self.LineStyleCountEx   = v_uint16()
     self.LineStyles         = VArray()
Exemple #19
0
 def __init__(self):
     VStruct.__init__(self)
     self.Header = SwfHeader()
     self.Tags = VArray()
Exemple #20
0
 def __init__(self):
     VStruct.__init__(self)
     self.TagHeader = SwfTagHeader()
     self.TagData = VStruct()
Exemple #21
0
 def __init__(self):
     VStruct.__init__(self)
Exemple #22
0
 def __init__(self, size):
     VStruct.__init__(self)
     self.SceneCount         = EncodedU32()
     self.Scenes             = VArray()
     self.FrameLabelCount    = EncodedU32()
     self.Frames             = VArray()
Exemple #23
0
 def __init__(self):
     VStruct.__init__(self)
     self.Offset     = EncodedU32()
     self.Name       = v_zstr()
Exemple #24
0
 def __init__(self, size):
     VStruct.__init__(self)
     self.BackgroundColor = RGB()
Exemple #25
0
 def vsAddField(self, name, value):
     if not isinstance(value, v_bits):
         raise Exception('VBitField *must* use v_bits() kids!')
     return VStruct.vsAddField(self, name, value)
Exemple #26
0
 def __init__(self):
     VStruct.__init__(self)
     self.TagCodeAndLength = v_uint16()
     self.OptionalLength   = v_uint32()
Exemple #27
0
 def __init__(self):
     VStruct.__init__(self)
     self.Red    = v_uint8()
     self.Green  = v_uint8()
     self.Blue   = v_uint8()
     self.Alpha  = v_uint8()
Exemple #28
0
 def __init__(self):
     VStruct.__init__(self)
     # break it up into fixed header and dyn fields
     self.pptphdr = PPTPHeader()
     self.pptpmsg = VStruct()