Example #1
0
 def add_image(self, hot_x, hot_y, act_x, act_y, data):
     writer = ByteReader()
     writer.writeShort(hot_x)
     writer.writeShort(hot_y)
     writer.writeShort(act_x)
     writer.writeShort(act_y)
     writer.writeIntString(data)
     self.images.append(str(writer))
Example #2
0
 def add_image(self, hot_x, hot_y, act_x, act_y, data):
     writer = ByteReader()
     writer.writeShort(hot_x)
     writer.writeShort(hot_y)
     writer.writeShort(act_x)
     writer.writeShort(act_y)
     writer.writeIntString(data)
     self.images.append(str(writer))
Example #3
0
    def add_sound(self, name, ext=None, data=None):
        if ext is None:
            audio_type = NONE_TYPE
        else:
            audio_type = AUDIO_TYPES.get(ext, NATIVE_TYPE)

        index = len(self.sounds)
        sound_id = get_asset_name('SOUND', name, index)
        self.sound_ids[name.lower()] = sound_id
        self.header.putdefine(sound_id, index)

        writer = ByteReader()
        writer.writeInt(audio_type)

        if data:
            writer.writeIntString(data)

        self.sounds.append(str(writer))
Example #4
0
    def add_sound(self, name, ext=None, data=None):
        if ext is None:
            audio_type = NONE_TYPE
        else:
            audio_type = AUDIO_TYPES.get(ext, NATIVE_TYPE)

        index = len(self.sounds)
        sound_id = get_asset_name('SOUND', name, index)
        self.sound_ids[name.lower()] = sound_id
        self.header.putdefine(sound_id, index)

        writer = ByteReader()
        writer.writeInt(audio_type)

        if data:
            writer.writeIntString(data)

        self.sounds.append(str(writer))
Example #5
0
def get_sized_data(data):
    writer = ByteReader()
    writer.writeIntString(data)
    return str(writer)
Example #6
0
def get_sized_data(data):
    writer = ByteReader()
    writer.writeIntString(data)
    return str(writer)