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

image_data
mrcrowbar.lib.games.lemmings.AnimField(offset, width, height, bpp, frame_count)
class mrcrowbar.lib.games.lemmings.DATCompressor[source]

Bases: mrcrowbar.transforms.Transform

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).
class mrcrowbar.lib.games.lemmings.GroundDAT(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
interactive_info

Information for every type of interactive piece.

palette
palette_ega_custom

EGA palette used for rendering interactive/terrain pieces.

palette_ega_preview

Extended EGA palette used for rendering the level preview.

palette_ega_standard

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

VGA palette used for rendering interactive/terrain pieces.

palette_vga_preview

VGA palette used for rendering the level preview.

palette_vga_standard

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

Information for every type of terrain piece.

class mrcrowbar.lib.games.lemmings.Interactive(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
draw_back

If 1, blit image behind background.

draw_masked

If 1, draw piece flipped vertically.

draw_upsidedown

If 1, draw piece as a hole.

mod_check

Check to ensure the last chunk of the block is empty.

obj_id

Index of the InteractiveInfo block in the accompanying GroundDAT.

x

The x position of the left edge.

x_raw

Raw value for the x position of the left edge.

y

The y position of the top edge.

class mrcrowbar.lib.games.lemmings.InteractiveImage(*args, **kwargs)[source]

Bases: mrcrowbar.blocks.Block

Represents the sprite data for an interactive object.

image_data
mask_data
class mrcrowbar.lib.games.lemmings.InteractiveInfo(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
anim_flags
base_offset
end_frame
frame_data_size
height
mask_rel_offset
plane_padding
preview_frame
size
sound_effect

Sound effect to play. Only used when trigger_effect is set to TRAP.

start_frame
trigger_effect
trigger_height
trigger_height_raw
trigger_width
trigger_width_raw
trigger_x
trigger_x_raw
trigger_y
trigger_y_raw
unknown_1
unknown_2
unknown_3
vgagr = <StoreRef: 0x00007f5d71d25210>
width
class mrcrowbar.lib.games.lemmings.Level(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
camera_x

Start x position of the camera.

camera_x_raw

Raw value for the start x position of the camera.

custom_index

Index denoting which Special graphic to use (optional).

interactives

List of Interactive object references (32 slots).

name

Name of the level (ASCII string).

num_bashers

Number of Basher skills.

num_blockers

Number of Blocker skills.

num_bombers

Number of Bomber skills.

num_builders

Number of Builder skills.

num_climbers

Number of Climber skills.

num_diggers

Number of Digger skills.

num_floaters

Number of Floater skills.

num_miners

Number of Miner skills.

num_released

Number of Lemmings released.

num_to_save

Number of Lemmings required to be saved.

release_rate

Minimum Lemming release-rate.

repr

Plaintext summary of the Block.

steel_areas

List of SteelArea object references (32 slots).

style_index

Index denoting which graphical Style to use.

terrains

List of Terrain object references (400 slots).

time_limit_mins

Time limit for the level (minutes).

class mrcrowbar.lib.games.lemmings.LevelDAT(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
levels
class mrcrowbar.lib.games.lemmings.Loader[source]

Bases: mrcrowbar.loaders.Loader

post_load()[source]
class mrcrowbar.lib.games.lemmings.MainAnims(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
anim_basher_l
anim_basher_r
anim_blocker
anim_bounder_l
anim_bounder_r
anim_builder_l
anim_builder_r
anim_burner
anim_climber_l
anim_climber_r
anim_digger
anim_drowner
anim_exploder
anim_faller_l
anim_faller_r
anim_floater_l
anim_floater_r
anim_goner
anim_leaver
anim_miner_l
anim_miner_r
anim_postclimber_l
anim_postclimber_r
anim_prefloater_l
anim_prefloater_r
anim_shrugger_l
anim_shrugger_r
anim_splatter
anim_walker_l
anim_walker_r
class mrcrowbar.lib.games.lemmings.MainDAT(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
class mrcrowbar.lib.games.lemmings.MainHUDGraphics(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
class mrcrowbar.lib.games.lemmings.MainHUDGraphicsHP(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
class mrcrowbar.lib.games.lemmings.MainMasks(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
mask_basher_l
mask_basher_r
mask_exploder
mask_miner_l
mask_miner_r
number_0
number_1
number_2
number_3
number_4
number_5
number_6
number_7
number_8
number_9
class mrcrowbar.lib.games.lemmings.MainMenuAnims(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
class mrcrowbar.lib.games.lemmings.MainMenuGraphics(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
class mrcrowbar.lib.games.lemmings.MainSection5(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
class mrcrowbar.lib.games.lemmings.OddRecord(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
name

Name of the level (ASCII string).

num_bashers

Number of Basher skills.

num_blockers

Number of Blocker skills.

num_bombers

Number of Bomber skills.

num_builders

Number of Builder skills.

num_climbers

Number of Climber skills.

num_diggers

Number of Digger skills.

num_floaters

Number of Floater skills.

num_miners

Number of Miner skills.

num_released

Number of Lemmings released.

num_to_save

Number of Lemmings required to be saved.

release_rate

Minimum Lemming release-rate.

repr

Plaintext summary of the Block.

time_limit_mins

Time limit for the level (minutes).

class mrcrowbar.lib.games.lemmings.OddtableDAT(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
records

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

image_data
palette_ega
palette_ega_preview
palette_vga
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: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
height

Height of the steel area.

height_raw

Raw value for the height.

mod_check

Check to ensure the last byte of the block is empty.

width

Width of the steel area.

width_raw

Raw value for the width.

x

The x position of the left edge.

x_raw_coarse

Raw value (coarse component) for the x position of the left edge.

x_raw_fine

Raw value (fine component) for the x position of the left edge.

y

The y position of the top edge.

y_raw

Raw value for the y position of the area’s top edge.

class mrcrowbar.lib.games.lemmings.Terrain(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
draw_back

If 1, blit image behind background.

draw_erase

If 1, draw piece as a hole.

draw_upsidedown

If 1, draw piece flipped vertically.

obj_id

Index of the TerrainInfo block in the accompanying GroundDAT.

unknown_1
x

The x position of the left edge.

x_raw

Raw value for the x position of the left edge.

y

The y position of the top edge.

y_raw_coarse

Raw value (coarse component) for the y position of the top edge.

y_raw_fine

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

image_data
mask_data
class mrcrowbar.lib.games.lemmings.TerrainInfo(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
base_offset
height
mask_offset
mask_rel_offset
mask_size
mask_stride
size
unknown_1
vgagr = <StoreRef: 0x00007f5d71d271d0>
width
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: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
interact_store
stores
terrain_store
class mrcrowbar.lib.games.lemmings.VgagrStore(*args, **kwargs)[source]

Bases: mrcrowbar.blocks.Block

Represents a blob store for style graphics.

data
class mrcrowbar.lib.games.lemmings.VgaspecDAT(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
special