redeclipse package

class redeclipse.Map(magic, version, headersize, meta, map_vars, texmru, ents, vslots, chg, worldroot)[source]

Bases: object

Base redeclipse map object, contains everything needed for the rendering a map to disk.

The first four bytes should be MAPZ. The code specifies BFGZ as well, but I haven’t seen these myself.

{‘numvars’: 155, ‘numvslots’: 909, ‘lightmaps’: 0, ‘worldsize’: 1024, ‘revision’: 2, ‘gamever’: 229, ‘blendmap’: 0, ‘numpvs’: 0, ‘gameident’: b’fps’, ‘numents’: 3} This essentially marks the end of the header

classmethod from_dict(data)[source]

Re-construct map from to_dict output.

skybox(sb)[source]

Attach a skybox to the map

to_dict()[source]

return represnetation of map as dictionary

to_json()[source]

Return self.to_dict as json

write(path)[source]

Write map to disk

Parameters:path (str) – Path to write to
class redeclipse.MapParser[source]

Bases: object

read(base_path)[source]

Parse a map into a redeclipse.Map object

Parameters:base_path (str) – path to gzipped map file.
redeclipse.tb(str_or_bytes)[source]

Auto-convert string or bytes to a bytes