def __init__(self, chunk): RiffObject.__init__(self, chunk) data = self.chunk #<loda> chunk header processing self.data_num = dword2py_int(data[12:16]) self.cache_fields.append((12, 4, 'number of data')) self.data_start = dword2py_int(data[16:20]) self.cache_fields.append((16, 4, 'data start')) self.data_type_start = dword2py_int(data[20:24]) self.cache_fields.append((20, 4, 'data types start')) self.object_type = dword2py_int(data[24:28]) self.cache_fields.append((24, 4, 'object type')) self.data_list = [] num = self.data_num start = self.data_start + 8 start_t = self.data_type_start + 8 self.cache_fields.append((start, 4 * num, 'data offsets')) self.cache_fields.append((start_t, 4 * num, 'data type offsets')) for i in range(self.data_num): offset = dword2py_int(data[start + i * 4:start + i * 4 + 4]) argtype = dword2py_int(data[start_t + (num - 1 - i) * 4:start_t + (num - 1 - i) * 4 + 4]) self.data_list.append([argtype, offset])
def __init__(self, chunk): RiffObject.__init__(self, chunk)