pink_doom.wad package

Submodules

pink_doom.wad.loader module

The Doom WAD reader.

class pink_doom.wad.loader.FileLump(file_pos: int, size: int, name: str)[source]

Bases: object

A single directory entry in the WAD.

file_pos: int
name: str
size: int
class pink_doom.wad.loader.LumpInfo(handle: BinaryIO, position: int, size: int, name: str)[source]

Bases: object

Information about a lump in the lump_cache.

handle: BinaryIO
name: str
position: int
size: int
class pink_doom.wad.loader.WadInfo(identification: str, num_lumps: int, info_table_offset: int)[source]

Bases: object

The WAD header.

identification: str

Should be IWAD or PWAD.

info_table_offset: int
num_lumps: int
pink_doom.wad.loader.cache_lump_name(name: str) bytes[source]

Like cache_lump_num(), but uses a name instead of an index.

pink_doom.wad.loader.cache_lump_num(lump: int) bytes[source]

Get the data within a lump, cached for efficiency.

pink_doom.wad.loader.check_num_for_name(name: str) int[source]

Return -1 if lump not found.

pink_doom.wad.loader.get_num_for_name(name: str) int[source]

Crash if not found.

pink_doom.wad.loader.init_multiple_files(filenames)[source]

Initialize and read multiple WADs.

Lump names can appear multiple times. The name searcher looks backwards, so a later file does override all earlier ones.

pink_doom.wad.loader.lump_length(lump: int) int[source]

Return the buffer size needed to load the given lump.

pink_doom.wad.loader.read_lump(lump: int) bytes[source]

Load the lump into a buffer.

Module contents

Wad loading routines and data structures.