mrcrowbar.lib.games.tyrian module

File format classes for the Tyrian engine (DOS, 1995).

class mrcrowbar.lib.games.tyrian.MUSFile(*args, **kwargs)[source]

Bases: Block

Base class for Blocks.

source_data

Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.

parent

Parent Block object where this Block is defined. Used for e.g. evaluating Refs.

preload_attrs

Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.

endian

Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.

cache_bytes

Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.

path_hint

Cache a string containing the path of the current Block, relative to the root.

song_count = <UInt16_LE: offset=0x0>
song_offsets = <UInt32_LE: offset=0x2>
songs_raw = <Bytes: offset=<EndOffset: song_offsets (rw)>>
class mrcrowbar.lib.games.tyrian.Song(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]

Bases: Block

Base class for Blocks.

source_data

Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.

parent

Parent Block object where this Block is defined. Used for e.g. evaluating Refs.

preload_attrs

Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.

endian

Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.

cache_bytes

Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.

path_hint

Cache a string containing the path of the current Block, relative to the root.

chandelay = <UInt8: offset=0x5>
mode = <UInt8: offset=0x0>
num_digital = <UInt16_LE: offset=<EndOffset: positions (rw)>>
patch_count = <UInt16_LE: offset=0xf>
patches = <BlockField: 0x00007f0c833f1470>
patterns = <BlockField: 0x00007f0c833f17f0>
pattlen = <UInt8: offset=0x4>
position_count = <UInt16_LE: offset=<EndOffset: patches (rw)>>
positions = <BlockField: 0x00007f0c833f0910>
regbd = <UInt8: offset=0xe>
speed = <UInt16_LE: offset=0x1>
tempo = <UInt8: offset=0x3>
class mrcrowbar.lib.games.tyrian.SongPatch(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]

Bases: Block

Base class for Blocks.

source_data

Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.

parent

Parent Block object where this Block is defined. Used for e.g. evaluating Refs.

preload_attrs

Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.

endian

Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.

cache_bytes

Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.

path_hint

Cache a string containing the path of the current Block, relative to the root.

arp_tab = <UInt8: offset=0x15>
arpeggio = <UInt8: offset=0x14>
car_ad = <UInt8: offset=0x7>
car_misc = <UInt8: offset=0x5>
car_sr = <UInt8: offset=0x8>
car_trem = <UInt8: offset=0x12>
car_vol = <UInt8: offset=0x6>
car_wave = <UInt8: offset=0x9>
feedback = <UInt8: offset=0xa>
finetune = <UInt8: offset=0xe>
fms = <UInt8: offset=0x25>
glide = <UInt8: offset=0xd>
keyoff = <UInt8: offset=0xb>
middum1 = <UInt8: offset=0x2c>
middum2 = <UInt8: offset=0x2d>
midinst = <UInt8: offset=0x28>
midkey = <UInt8: offset=0x2a>
midtrans = <UInt8: offset=0x2b>
midvelo = <UInt8: offset=0x29>
mod_ad = <UInt8: offset=0x2>
mod_sr = <UInt8: offset=0x3>
mod_trem = <UInt8: offset=0x11>
mod_visc = <UInt8: offset=0x0>
mod_vol = <UInt8: offset=0x1>
mod_wave = <UInt8: offset=0x4>
portamento = <UInt8: offset=0xc>
size = <UInt16_LE: offset=0x23>
start = <UInt16_LE: offset=0x21>
transp = <UInt16_LE: offset=0x26>
tremwait = <UInt8: offset=0x13>
vibdelay = <UInt8: offset=0x10>
vibrato = <UInt8: offset=0xf>
class mrcrowbar.lib.games.tyrian.SongPattern(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]

Bases: Block

Base class for Blocks.

source_data

Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.

parent

Parent Block object where this Block is defined. Used for e.g. evaluating Refs.

preload_attrs

Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.

endian

Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.

cache_bytes

Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.

path_hint

Cache a string containing the path of the current Block, relative to the root.

func = <UInt8: offset=0x0>
value = <UInt8: offset=0x1>
class mrcrowbar.lib.games.tyrian.SongPosition(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]

Bases: Block

Base class for Blocks.

source_data

Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.

parent

Parent Block object where this Block is defined. Used for e.g. evaluating Refs.

preload_attrs

Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.

endian

Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.

cache_bytes

Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.

path_hint

Cache a string containing the path of the current Block, relative to the root.

channels = <BlockField: 0x00007f0c833f0d70>
class mrcrowbar.lib.games.tyrian.SongPositionChannel(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]

Bases: Block

Base class for Blocks.

source_data

Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.

parent

Parent Block object where this Block is defined. Used for e.g. evaluating Refs.

preload_attrs

Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.

endian

Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.

cache_bytes

Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.

path_hint

Cache a string containing the path of the current Block, relative to the root.

property pattern_num
pattern_num_raw = <UInt16_LE: offset=0x0>
transpose = <UInt8: offset=0x2>