def initialize(self): self.up = Key() self.down = Key() self.left = Key() self.right = Key() self.button1 = Key() self.button2 = Key() self.button3 = Key() self.button4 = Key()
class KeyParameter(ParameterCommon): key = None def read(self, reader): self.key = Key(reader.readShort()) def write(self, reader): reader.writeShort(self.key.getValue())
def read(self): reader = self.reader current_position = reader.tell() self.header_size = reader.read_uint32() self.menu_offset = reader.read_int32() self.menu_size = reader.read_int32() if self.menu_size == 0: return self.accel_offset = reader.read_int32() self.accel_size = reader.read_int32() reader.seek(current_position + self.menu_offset) reader.skip(4) self.load() reader.seek(current_position + self.accel_offset) for i in range(self.accel_size // 8): self.accelShift.append(Key(reader.read_int8())) reader.skip(1) self.accelKey.append(Key(reader.read_int16())) self.accelId.append(reader.read_int16()) reader.skip(2)
class KeyParameter(ParameterCommon): def __init__(self, reader: ByteIO): self.reader = reader self.key = None def read(self): reader = self.reader self.key = Key(reader.read_int16()) def write(self, reader: ByteIO): reader.write_int16(self.key.getValue())
def read(self, reader): self.controlType = reader.readInt() count = reader.readInt(True) # 16 checkDefault(reader, count, 16) self.up = Key(reader.readInt()) self.down = Key(reader.readInt()) self.left = Key(reader.readInt()) self.right = Key(reader.readInt()) self.button1 = Key(reader.readInt()) self.button2 = Key(reader.readInt()) self.button3 = Key(reader.readInt()) self.button4 = Key(reader.readInt()) for _ in xrange(8): checkDefault(reader, reader.readInt(), 0)
def read(self, reader): self.key = Key(reader.readShort())
def read(self): reader = self.reader self.key = Key(reader.read_int16())