mrcrowbar.lib.games.lemmings module¶
File format classes for the game Lemmings (DOS, 1991).
Sources: DAT compressor http://www.camanis.net/lemmings/files/docs/lemmings_dat_file_format.txt
Level file format http://www.camanis.net/lemmings/files/docs/lemmings_lvl_file_format.txt
Vgagr/Ground DAT file formats http://www.camanis.net/lemmings/files/docs/lemmings_vgagrx_dat_groundxo_dat_file_format.txt
Main DAT file format http://www.camanis.net/lemmings/files/docs/lemmings_main_dat_file_format.txt
Vgaspec compressor/DAT file format http://www.camanis.net/lemmings/files/docs/lemmings_vgaspecx_dat_file_format.txt
Extra special thanks to ccexplore and Mindless
-
class
mrcrowbar.lib.games.lemmings.
Anim
(width, height, bpp, frame_count, *args, **kwargs)[source]¶ Bases:
mrcrowbar.blocks.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.
-
image_data
= <Bytes: offset=0x0, transform=<mrcrowbar.lib.images.base.Planarizer object>>¶
-
mrcrowbar.lib.games.lemmings.
AnimField
(offset, width, height, bpp, frame_count)¶
-
class
mrcrowbar.lib.games.lemmings.
DATCompressor
[source]¶
-
class
mrcrowbar.lib.games.lemmings.
GroundDAT
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
interactive_info
= <BlockField: 0x00000000f5dead18>¶ Information for every type of interactive piece.
-
property
palette
¶
-
palette_ega_custom
= <Palette: 0x00000000f5dead78>¶ EGA palette used for rendering interactive/terrain pieces.
-
palette_ega_preview
= <Palette: 0x00000000f5dead48>¶ Extended EGA palette used for rendering the level preview.
-
palette_ega_standard
= <Palette: 0x00000000f5dead60>¶ Copy of EGA palette used for rendering lemmings/action bar. Colours 0-6 are not used by the game, instead there is a palette embedded in the executable. Colour 7 is used for drawing the minimap and dirt particles.
-
palette_vga_custom
= <Palette: 0x00000000f5dead90>¶ VGA palette used for rendering interactive/terrain pieces.
-
palette_vga_preview
= <Palette: 0x00000000f5deadc0>¶ VGA palette used for rendering the level preview.
-
palette_vga_standard
= <Palette: 0x00000000f5deada8>¶ Copy of VGA palette used for rendering lemmings/action bar. Colours 0-6 are not used by the game, instead there is a palette embedded in the executable. Colour 7 is used for drawing the minimap and dirt particles.
-
terrain_info
= <BlockField: 0x00000000f5dead30>¶ Information for every type of terrain piece.
-
class
mrcrowbar.lib.games.lemmings.
Interactive
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
draw_back
= <Bits: offset=0x6, bits=0b10000000>¶ If 1, blit image behind background.
-
draw_masked
= <Bits: offset=0x6, bits=0b1000000>¶ If 1, draw piece flipped vertically.
-
draw_upsidedown
= <Bits: offset=0x7, bits=0b10000000>¶ If 1, draw piece as a hole.
-
mod_check
= <UInt16_BE: offset=0x6, bitmask=b'?\x7f'>¶ Check to ensure the last chunk of the block is empty.
-
obj_id
= <UInt16_BE: offset=0x4, range=range(0, 16)>¶ Index of the InteractiveInfo block in the accompanying GroundDAT.
-
property
repr
¶ Plaintext summary of the Block.
-
property
x
¶ The x position of the left edge.
-
x_raw
= <Int16_BE: offset=0x0, range=range(-8, 1601)>¶ Raw value for the x position of the left edge.
-
y
= <Int16_BE: offset=0x2, range=range(-41, 201)>¶ The y position of the top edge.
-
class
mrcrowbar.lib.games.lemmings.
InteractiveImage
(*args, **kwargs)[source]¶ Bases:
mrcrowbar.blocks.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.
-
image_data
= <Bytes: offset=0x0, transform=<mrcrowbar.lib.images.base.Planarizer object>>¶
-
mask_data
= <Bytes: offset=<Ref: _parent.mask_rel_offset (rw)>, transform=<mrcrowbar.lib.images.base.Planarizer object>>¶
-
class
mrcrowbar.lib.games.lemmings.
InteractiveInfo
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
anim_flags
= <UInt16_LE: offset=0x0>¶
-
base_offset
= <UInt16_LE: offset=0x15>¶
-
end_frame
= <UInt8: offset=0x3>¶
-
frame_data_size
= <UInt16_LE: offset=0x6>¶
-
height
= <UInt8: offset=0x5>¶
-
mask_rel_offset
= <UInt16_LE: offset=0x8>¶
-
property
plane_padding
¶
-
preview_frame
= <UInt16_LE: offset=0x17>¶
-
property
size
¶
-
sound_effect
= <UInt8: offset=0x1b>¶ Sound effect to play. Only used when trigger_effect is set to TRAP.
-
start_frame
= <UInt8: offset=0x2>¶
-
trigger_effect
= <UInt8: offset=0x14>¶
-
property
trigger_height
¶
-
trigger_height_raw
= <UInt8: offset=0x13>¶
-
property
trigger_width
¶
-
trigger_width_raw
= <UInt8: offset=0x12>¶
-
property
trigger_x
¶
-
trigger_x_raw
= <UInt16_LE: offset=0xe>¶
-
property
trigger_y
¶
-
trigger_y_raw
= <UInt16_LE: offset=0x10>¶
-
unknown_1
= <UInt16_LE: offset=0xa>¶
-
unknown_2
= <UInt16_LE: offset=0xc>¶
-
unknown_3
= <UInt16_LE: offset=0x19>¶
-
vgagr
= <StoreRef: 0x00000000f5dea460>¶
-
width
= <UInt8: offset=0x4>¶
-
class
mrcrowbar.lib.games.lemmings.
Level
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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
camera_x
¶ Start x position of the camera.
-
camera_x_raw
= <UInt16_BE: offset=0x18, range=range(0, 1265)>¶ Raw value for the start x position of the camera.
-
custom_index
= <UInt16_BE: offset=0x1c>¶ Index denoting which Special graphic to use (optional).
-
interactives
= <BlockField: 0x00000000f5de6dd8>¶ List of Interactive object references (32 slots).
-
name
= <Bytes: offset=0x7e0, length=32, default=b' '>¶ Name of the level (ASCII string).
-
num_bashers
= <UInt16_BE: offset=0x12, range=range(0, 251)>¶ Number of Basher skills.
-
num_blockers
= <UInt16_BE: offset=0xe, range=range(0, 251)>¶ Number of Blocker skills.
-
num_bombers
= <UInt16_BE: offset=0xc, range=range(0, 251)>¶ Number of Bomber skills.
-
num_builders
= <UInt16_BE: offset=0x10, range=range(0, 251)>¶ Number of Builder skills.
-
num_climbers
= <UInt16_BE: offset=0x8, range=range(0, 251)>¶ Number of Climber skills.
-
num_diggers
= <UInt16_BE: offset=0x16, range=range(0, 251)>¶ Number of Digger skills.
-
num_floaters
= <UInt16_BE: offset=0xa, range=range(0, 251)>¶ Number of Floater skills.
-
num_miners
= <UInt16_BE: offset=0x14, range=range(0, 251)>¶ Number of Miner skills.
-
num_released
= <UInt16_BE: offset=0x2, range=range(0, 115)>¶ Number of Lemmings released.
-
num_to_save
= <UInt16_BE: offset=0x4, range=range(0, 115)>¶ Number of Lemmings required to be saved.
-
release_rate
= <UInt16_BE: offset=0x0, range=range(0, 251)>¶ Minimum Lemming release-rate.
-
property
repr
¶ Plaintext summary of the Block.
-
steel_areas
= <BlockField: 0x00000000f5de6e08>¶ List of SteelArea object references (32 slots).
-
style_index
= <UInt16_BE: offset=0x1a>¶ Index denoting which graphical Style to use.
-
terrains
= <BlockField: 0x00000000f5de6df0>¶ List of Terrain object references (400 slots).
-
time_limit_mins
= <UInt16_BE: offset=0x6, range=range(0, 256)>¶ Time limit for the level (minutes).
-
class
mrcrowbar.lib.games.lemmings.
LevelDAT
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
levels
= <BlockField: 0x00000000f5deb220>¶
-
class
mrcrowbar.lib.games.lemmings.
Loader
[source]¶ Bases:
mrcrowbar.loaders.Loader
-
class
mrcrowbar.lib.games.lemmings.
MainAnims
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
anim_basher_l
= <BlockField: 0x00000000f5df2310>¶
-
anim_basher_r
= <BlockField: 0x00000000f5df22f8>¶
-
anim_blocker
= <BlockField: 0x00000000f5df2430>¶
-
anim_bounder_l
= <BlockField: 0x00000000f5df2220>¶
-
anim_bounder_r
= <BlockField: 0x00000000f5df21f0>¶
-
anim_builder_l
= <BlockField: 0x00000000f5df22e0>¶
-
anim_builder_r
= <BlockField: 0x00000000f5df22c8>¶
-
anim_burner
= <BlockField: 0x00000000f5df2418>¶
-
anim_climber_l
= <BlockField: 0x00000000f5df2268>¶
-
anim_climber_r
= <BlockField: 0x00000000f5df2250>¶
-
anim_digger
= <BlockField: 0x00000000f5df2238>¶
-
anim_drowner
= <BlockField: 0x00000000f5df2280>¶
-
anim_exploder
= <BlockField: 0x00000000f5df2490>¶
-
anim_faller_l
= <BlockField: 0x00000000f5df2370>¶
-
anim_faller_r
= <BlockField: 0x00000000f5df2358>¶
-
anim_floater_l
= <BlockField: 0x00000000f5df23d0>¶
-
anim_floater_r
= <BlockField: 0x00000000f5df23a0>¶
-
anim_goner
= <BlockField: 0x00000000f5df2478>¶
-
anim_leaver
= <BlockField: 0x00000000f5df2400>¶
-
anim_miner_l
= <BlockField: 0x00000000f5df2340>¶
-
anim_miner_r
= <BlockField: 0x00000000f5df2328>¶
-
anim_postclimber_l
= <BlockField: 0x00000000f5df22b0>¶
-
anim_postclimber_r
= <BlockField: 0x00000000f5df2298>¶
-
anim_prefloater_l
= <BlockField: 0x00000000f5df23b8>¶
-
anim_prefloater_r
= <BlockField: 0x00000000f5df2388>¶
-
anim_shrugger_l
= <BlockField: 0x00000000f5df2460>¶
-
anim_shrugger_r
= <BlockField: 0x00000000f5df2448>¶
-
anim_splatter
= <BlockField: 0x00000000f5df23e8>¶
-
anim_walker_l
= <BlockField: 0x00000000f5df2208>¶
-
anim_walker_r
= <BlockField: 0x00000000f5df21d8>¶
-
class
mrcrowbar.lib.games.lemmings.
MainDAT
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
class
mrcrowbar.lib.games.lemmings.
MainHUDGraphics
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
class
mrcrowbar.lib.games.lemmings.
MainHUDGraphicsHP
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
class
mrcrowbar.lib.games.lemmings.
MainMasks
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
mask_basher_l
= <BlockField: 0x00000000f5df2a78>¶
-
mask_basher_r
= <BlockField: 0x00000000f5df2a60>¶
-
mask_exploder
= <BlockField: 0x00000000f5df2ac0>¶
-
mask_miner_l
= <BlockField: 0x00000000f5df2aa8>¶
-
mask_miner_r
= <BlockField: 0x00000000f5df2a90>¶
-
number_0
= <BlockField: 0x00000000f5df2bb0>¶
-
number_1
= <BlockField: 0x00000000f5df2b98>¶
-
number_2
= <BlockField: 0x00000000f5df2b80>¶
-
number_3
= <BlockField: 0x00000000f5df2b68>¶
-
number_4
= <BlockField: 0x00000000f5df2b50>¶
-
number_5
= <BlockField: 0x00000000f5df2b38>¶
-
number_6
= <BlockField: 0x00000000f5df2b20>¶
-
number_7
= <BlockField: 0x00000000f5df2b08>¶
-
number_8
= <BlockField: 0x00000000f5df2af0>¶
-
number_9
= <BlockField: 0x00000000f5df2ad8>¶
-
class
mrcrowbar.lib.games.lemmings.
MainMenuAnims
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
class
mrcrowbar.lib.games.lemmings.
MainMenuGraphics
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
class
mrcrowbar.lib.games.lemmings.
MainSection5
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
class
mrcrowbar.lib.games.lemmings.
OddRecord
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
name
= <Bytes: offset=0x18, length=32, default=b' '>¶ Name of the level (ASCII string).
-
num_bashers
= <UInt16_BE: offset=0x12, range=range(0, 251)>¶ Number of Basher skills.
-
num_blockers
= <UInt16_BE: offset=0xe, range=range(0, 251)>¶ Number of Blocker skills.
-
num_bombers
= <UInt16_BE: offset=0xc, range=range(0, 251)>¶ Number of Bomber skills.
-
num_builders
= <UInt16_BE: offset=0x10, range=range(0, 251)>¶ Number of Builder skills.
-
num_climbers
= <UInt16_BE: offset=0x8, range=range(0, 251)>¶ Number of Climber skills.
-
num_diggers
= <UInt16_BE: offset=0x16, range=range(0, 251)>¶ Number of Digger skills.
-
num_floaters
= <UInt16_BE: offset=0xa, range=range(0, 251)>¶ Number of Floater skills.
-
num_miners
= <UInt16_BE: offset=0x14, range=range(0, 251)>¶ Number of Miner skills.
-
num_released
= <UInt16_BE: offset=0x2, range=range(0, 115)>¶ Number of Lemmings released.
-
num_to_save
= <UInt16_BE: offset=0x4, range=range(0, 115)>¶ Number of Lemmings required to be saved.
-
release_rate
= <UInt16_BE: offset=0x0, range=range(0, 251)>¶ Minimum Lemming release-rate.
-
property
repr
¶ Plaintext summary of the Block.
-
time_limit_mins
= <UInt16_BE: offset=0x6, range=range(0, 256)>¶ Time limit for the level (minutes).
-
class
mrcrowbar.lib.games.lemmings.
OddtableDAT
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
records
= <BlockField: 0x00000000f5deb9a0>¶ List of OddRecord objects (80 slots).
-
class
mrcrowbar.lib.games.lemmings.
SoundEffect
[source]¶ Bases:
enum.IntEnum
An enumeration.
-
ASSIGN
= 4¶
-
BEAR_TRAP
= 15¶
-
BOMBER
= 12¶
-
BUILDER
= 18¶
-
CRUSH_TRAP
= 7¶
-
DROWN
= 17¶
-
ELECTRIC_TRAP
= 6¶
-
FIRE_TRAP
= 13¶
-
HATCH_OPEN
= 2¶
-
HEAVY_TRAP
= 14¶
-
HIT_STEEL
= 10¶
-
LETS_GO
= 3¶
-
NONE
= 0¶
-
OH_NO
= 5¶
-
ROPE_TRAP
= 9¶
-
SKILL_SELECT
= 1¶
-
SPLAT
= 8¶
-
UNKNOWN_1
= 11¶
-
YIPPEE
= 16¶
-
-
class
mrcrowbar.lib.games.lemmings.
Special
(*args, **kwargs)[source]¶ Bases:
mrcrowbar.blocks.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.
-
image_data
= <Bytes: offset=0x28, transform=<mrcrowbar.lib.games.lemmings.SpecialCompressor object>>¶
-
palette_ega
= <Palette: 0x00000000f5df2f70>¶
-
palette_ega_preview
= <Palette: 0x00000000f5df2f88>¶
-
palette_vga
= <Palette: 0x00000000f5df2f58>¶
-
class
mrcrowbar.lib.games.lemmings.
SpecialCompressor
[source]¶ Bases:
mrcrowbar.transforms.Transform
-
DECOMPRESSED_SIZE
= 14400¶
-
export_data
(buffer, parent=None)[source]¶ Perform a transform on a byte string.
- buffer
Source byte string.
- parent
Parent object of the source (to provide context for Refs).
-
import_data
(buffer, parent=None)[source]¶ Perform a reverse-transform on a byte string.
- buffer
Source byte string.
- parent
Parent object of the source (to provide context for Refs).
-
plan
= <mrcrowbar.lib.images.base.Planarizer object>¶
-
-
class
mrcrowbar.lib.games.lemmings.
SteelArea
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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
height
¶ Height of the steel area.
-
height_raw
= <Bits: offset=0x2, bits=0b1111>¶ Raw value for the height.
-
mod_check
= <UInt8: offset=0x3>¶ Check to ensure the last byte of the block is empty.
-
property
repr
¶ Plaintext summary of the Block.
-
property
width
¶ Width of the steel area.
-
width_raw
= <Bits: offset=0x2, bits=0b11110000>¶ Raw value for the width.
-
property
x
¶ The x position of the left edge.
-
x_raw_coarse
= <UInt8: offset=0x0, range=range(0, 200)>¶ Raw value (coarse component) for the x position of the left edge.
-
x_raw_fine
= <Bits: offset=0x1, bits=0b10000000>¶ Raw value (fine component) for the x position of the left edge.
-
property
y
¶ The y position of the top edge.
-
y_raw
= <UInt8: offset=0x1, range=range(0, 128), bitmask=b'\x7f'>¶ Raw value for the y position of the area’s top edge.
-
class
mrcrowbar.lib.games.lemmings.
Terrain
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
draw_back
= <Bits: offset=0x0, bits=0b10000000>¶ If 1, blit image behind background.
-
draw_erase
= <Bits: offset=0x0, bits=0b100000>¶ If 1, draw piece as a hole.
-
draw_upsidedown
= <Bits: offset=0x0, bits=0b1000000>¶ If 1, draw piece flipped vertically.
-
obj_id
= <UInt8: offset=0x3, range=range(0, 64), bitmask=b'?'>¶ Index of the TerrainInfo block in the accompanying GroundDAT.
-
property
repr
¶ Plaintext summary of the Block.
-
unknown_1
= <Bits: offset=0x3, bits=0b1000000>¶
-
property
x
¶ The x position of the left edge.
-
x_raw
= <UInt16_BE: offset=0x0, bitmask=b'\x0f\xff'>¶ Raw value for the x position of the left edge.
-
property
y
¶ The y position of the top edge.
-
y_raw_coarse
= <Int8: offset=0x2>¶ Raw value (coarse component) for the y position of the top edge.
-
y_raw_fine
= <Bits: offset=0x3, bits=0b10000000>¶ Raw value (fine component) for the y position of the top edge.
-
class
mrcrowbar.lib.games.lemmings.
TerrainImage
(*args, **kwargs)[source]¶ Bases:
mrcrowbar.blocks.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.
-
image_data
= <Bytes: offset=0x0, transform=<mrcrowbar.lib.images.base.Planarizer object>>¶
-
mask_data
= <Bytes: offset=<Ref: _parent.mask_offset (rw)>, transform=<mrcrowbar.lib.images.base.Planarizer object>>¶
-
class
mrcrowbar.lib.games.lemmings.
TerrainInfo
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
base_offset
= <UInt16_LE: offset=0x2>¶
-
height
= <UInt8: offset=0x1>¶
-
property
mask_offset
¶
-
mask_rel_offset
= <UInt16_LE: offset=0x4>¶
-
property
mask_size
¶
-
property
mask_stride
¶
-
property
size
¶
-
unknown_1
= <UInt16_LE: offset=0x6>¶
-
vgagr
= <StoreRef: 0x00000000f5deabc8>¶
-
width
= <UInt8: offset=0x0>¶
-
class
mrcrowbar.lib.games.lemmings.
TriggerEffect
[source]¶ Bases:
enum.IntEnum
An enumeration.
-
DISINTEGRATE
= 6¶
-
DROWN
= 5¶
-
EXIT_LEVEL
= 1¶
-
NONE
= 0¶
-
ONEWAY_LEFT
= 7¶
-
ONEWAY_RIGHT
= 8¶
-
STEEL
= 9¶
-
TRAP
= 4¶
-
-
class
mrcrowbar.lib.games.lemmings.
VgagrDAT
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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
interact_store
¶
-
stores
= <BlockField: 0x00000000f5df2028>¶
-
property
terrain_store
¶
-
class
mrcrowbar.lib.games.lemmings.
VgagrStore
(*args, **kwargs)[source]¶ Bases:
mrcrowbar.blocks.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.
-
data
= <Bytes: offset=0x0>¶
-
class
mrcrowbar.lib.games.lemmings.
VgaspecDAT
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.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.
-
special
= <BlockField: 0x00000000f5d3f0e8>¶