Example #1
0
class ScriptString(mrc.Block):
    length = mrc.UInt32_BE(0x00)
    value = mrc.CString(0x04, length=mrc.Ref('length'), encoding='latin1')

    @property
    def repr(self):
        return self.value
Example #2
0
class SoundCastV4Extra(mrc.Block):
    name_size = mrc.UInt8(0x00)
    name = mrc.CString(0x01, length=mrc.Ref('name_size'))

    @property
    def repr(self):
        return 'name={}'.format(self.name)
Example #3
0
class VOCText(mrc.Block):
    text = mrc.CString(0x00)
Example #4
0
class SNDS( mrc.Block ):
    unknown1 =  mrc.Int16_LE( 0x00 )
    files =     mrc.CString( 0x02, length_field=mrc.UInt16_LE, stream=True )