Пример #1
0
 def write_classic(self, data: ScnDataWriter, file_version: float):
     data.float32(self.position[0])
     data.float32(self.position[1])
     data.float32(self.position[2])
     data.uint32(self.id),
     data.uint16(self.type_id),
     data.uint8(self.state),
     data.float32(self.angle),
     if file_version >= 1.15:
         data.uint16(self.frame)
     if file_version > 1.13:
         data.uint32(self.garrisoned_in)
 def write(self, data: ScnDataWriter):
     data.string16(self.field1)
     data.float32(self.field2)
     data.float32(self.field3)
     data.uint16(self.field4)
     data.uint16(self.field5)
     data.uint8(self.field6)
     data.uint16(self.field7)
     for j in range(0, 9):
         data.uint8(self.field8[j])
     for j in range(0, 9):
         data.uint32(self.field9[j])
     data.float32(self.field10)  # 1.00
     data.float32(self.field11)
     for j in range(0, 9):
         data.uint8(self.field12[j])
Пример #3
0
 def write(self, data: ScnDataWriter):
     data.uint8(self.terrain)
     data.uint8(self.elevation)
     data.uint8(self.zone)