Ejemplo n.º 1
0
 def read_mdx(self, stream: BinaryStream):
     self.name = stream.read(80)
     self.interval = stream.read_uint32_array(2)
     self.move_speed = stream.read_float32()
     self.flags = stream.read_uint32()
     self.rarity = stream.read_float32()
     self.sync_point = stream.read_uint32()
     self.extent.read_mdx(stream)
Ejemplo n.º 2
0
 def read_mdx(self, stream: BinaryStream, version):
     size = stream.read_uint32()
     self.name = stream.read(80)
     self.position = stream.read_float32_array(3)
     self.field_of_view = stream.read_float32()
     self.far_clipping_plane = stream.read_float32()
     self.near_clipping_plane = stream.read_float32()
     self.target_position = stream.read_float32_array(3)
     self.read_animations(stream, size - 120)
Ejemplo n.º 3
0
 def read_mdx(self, stream: BinaryStream, version):
     start = stream.index
     size = stream.read_uint32()
     super().read_mdx(stream, version)
     self.speed = stream.read_float32()
     self.variation = stream.read_float32()
     self.latitude = stream.read_float32()
     self.gravity = stream.read_float32()
     self.life_span = stream.read_float32()
     self.emission_rate = stream.read_float32()
     self.width = stream.read_float32()
     self.length = stream.read_float32()
     self.filter_mode = stream.read_uint32()
     self.rows = stream.read_uint32()
     self.columns = stream.read_uint32()
     self.head_or_tail = stream.read_uint32()
     self.tail_length = stream.read_float32()
     self.time_middle = stream.read_float32()
     self.segment_colors[0] = stream.read_float32_array(3)
     self.segment_colors[1] = stream.read_float32_array(3)
     self.segment_colors[2] = stream.read_float32_array(3)
     self.segment_alphas = stream.read_uint8_array(3)
     self.segment_scaling = stream.read_float32_array(3)
     self.head_intervals[0] = stream.read_uint32_array(3)
     self.head_intervals[1] = stream.read_uint32_array(3)
     self.tail_intervals[0] = stream.read_uint32_array(3)
     self.tail_intervals[1] = stream.read_uint32_array(3)
     self.texture_id = stream.read_int32()
     self.squirt = stream.read_uint32()
     self.priority_plane = stream.read_int32()
     self.replaceable_id = stream.read_uint32()
     self.read_animations(stream, size - (stream.index - start))
Ejemplo n.º 4
0
 def read_mdx(self, stream: BinaryStream, version):
     start = stream.index
     size = stream.read_uint32()
     super().read_mdx(stream, version)
     self.type = stream.read_uint32()
     self.attenuation = stream.read_float32_array(2)
     self.color = stream.read_float32_array(3)
     self.intensity = stream.read_float32()
     self.ambient_color = stream.read_float32_array(3)
     self.ambient_intensity = stream.read_float32()
     self.read_animations(stream, size - (stream.index - start))
 def read_mdx(self, stream: BinaryStream, version):
     start = stream.index
     size = stream.read_uint32()
     super().read_mdx(stream, version)
     self.life_span = stream.read_float32()
     self.emission_rate = stream.read_float32()
     self.speed = stream.read_float32()
     self.color = stream.read_float32_array(3)
     self.alpha = stream.read_float32()
     self.replaceable_id = stream.read_uint32()
     self.path = stream.read(260)
     self.animation_visibility_guide = stream.read(260)
     self.read_animations(stream, size - (stream.index - start))
Ejemplo n.º 6
0
 def read_mdx(self, stream: BinaryStream, version: int):
     start = stream.index
     size = stream.read_uint32()
     self.filter_mode = stream.read_uint32()
     self.flags = stream.read_uint32()
     self.texture_id = stream.read_int32()
     self.texture_animation_id = stream.read_int32()
     self.coord_id = stream.read_uint32()
     self.alpha = stream.read_float32()
     if version > 800:
         self.emissive_gain = stream.read_float32()
         self.fresnel_color = stream.read_float32_array(3)
         self.fresnel_opacity = stream.read_float32()
         self.fresnel_team_color = stream.read_float32()
     self.read_animations(stream, size - (stream.index - start))
Ejemplo n.º 7
0
 def read_mdx(self, stream: BinaryStream, version):
     size = stream.read_uint32()
     self.alpha = stream.read_float32()
     self.flags = stream.read_uint32()
     self.color = stream.read_float32_array(3)
     self.geoset_id = stream.read_int32()
     self.read_animations(stream, size - 28)
Ejemplo n.º 8
0
 def read_mdx(self, stream: BinaryStream, version):
     start = stream.index
     size = stream.read_uint32()
     super().read_mdx(stream, version)
     self.height_above = stream.read_float32()
     self.height_below = stream.read_float32()
     self.alpha = stream.read_float32()
     self.color = stream.read_float32_array(3)
     self.lifespan = stream.read_float32()
     self.texture_slot = stream.read_uint32()
     self.emission_rate = stream.read_uint32()
     self.rows = stream.read_uint32()
     self.columns = stream.read_uint32()
     self.material_id = stream.read_int32()
     self.gravity = stream.read_float32()
     self.read_animations(stream, size - (stream.index - start))
Ejemplo n.º 9
0
 def read_mdx(self, stream: BinaryStream, version):
     super().read_mdx(stream, version)
     self.type = stream.read_uint32()
     self.vertices[0] = stream.read_float32_array(3)
     if self.type != 2:
         self.vertices[1] = stream.read_float32_array(3)
     if self.type == 2 or self.type == 3:
         self.bounds_radius = stream.read_float32()
Ejemplo n.º 10
0
 def read_mdx(self, stream: BinaryStream, version):
     start = stream.index
     size = stream.read_uint32()
     super().read_mdx(stream, version)
     self.emission_rate = stream.read_float32()
     self.gravity = stream.read_float32()
     self.longitude = stream.read_float32()
     self.latitude = stream.read_float32()
     self.path = stream.read(260)
     self.life_span = stream.read_float32()
     self.speed = stream.read_float32()
     self.read_animations(stream, size - (stream.index - start))
Ejemplo n.º 11
0
 def read_mdx_value(self, stream: BinaryStream) -> tuple:
     self.byte_value = 4
     return stream.read_float32()
Ejemplo n.º 12
0
 def read_mdx(self, stream: BinaryStream):
     self.bounds_radius = stream.read_float32()
     self.min = stream.read_float32_array(3)
     self.max = stream.read_float32_array(3)