mrcrowbar.lib.games.sam module¶
File format classes for the Secret Agent engine (DOS, 1992)
Sources: ProGraphx tileset format http://www.shikadi.net/moddingwiki/ProGraphx_Toolbox_tileset_format
Secret Agent encryption http://www.shikadi.net/moddingwiki/Secret_Agent_encryption
-
class
mrcrowbar.lib.games.sam.Loader[source]¶ Bases:
mrcrowbar.loaders.Loader
-
class
mrcrowbar.lib.games.sam.SAMEncryption(length=None)[source]¶ Bases:
mrcrowbar.transforms.Transform-
KEY= b'Copyright 1991 Peder Jungck\x00'¶
-
-
class
mrcrowbar.lib.games.sam.SAMGfx16(source_data=None, *, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None, strict=False)[source]¶ Bases:
mrcrowbar.blocks.BlockBase 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.
- strict
- Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
-
tilesets= <BlockField: 0x00007f3bde033b90>¶
-
class
mrcrowbar.lib.games.sam.SAMGfx8(source_data=None, *, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None, strict=False)[source]¶ Bases:
mrcrowbar.blocks.BlockBase 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.
- strict
- Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
-
tilesets= <BlockField: 0x00007f3bde039c10>¶
-
class
mrcrowbar.lib.games.sam.SAMTileset16(*args, **kwargs)[source]¶ Bases:
mrcrowbar.blocks.Block-
count= <UInt8: offset=0x0>¶
-
height= <UInt8: offset=0x2>¶
-
image_data= <Bytes: offset=0x3, length=8061, transform=<mrcrowbar.lib.images.base.Planarizer object>>¶
-
mask_data= <Bytes: offset=0x3, length=8061, transform=<mrcrowbar.lib.images.base.Planarizer object>>¶
-
plane_size¶
-
width¶
-
width_raw= <UInt8: offset=0x1>¶
-
-
class
mrcrowbar.lib.games.sam.SAMTileset8(*args, **kwargs)[source]¶ Bases:
mrcrowbar.blocks.Block-
count= <UInt8: offset=0x0>¶
-
height= <UInt8: offset=0x2>¶
-
image_data= <Bytes: offset=0x3, length=2045, transform=<mrcrowbar.lib.images.base.Planarizer object>>¶
-
mask_data= <Bytes: offset=0x3, length=2045, transform=<mrcrowbar.lib.images.base.Planarizer object>>¶
-
plane_size¶
-
width¶
-
width_raw= <UInt8: offset=0x1>¶
-