2025-04-07 02:19:25 -04:00
|
|
|
import io
|
|
|
|
import pathlib
|
|
|
|
import os
|
|
|
|
import re
|
|
|
|
|
|
|
|
DOOM=pathlib.Path.home().joinpath("doom")
|
|
|
|
DSDA_DIR=DOOM.joinpath("dsda-doom")
|
|
|
|
DSDA_VER='0.28.3'
|
|
|
|
DSDA=DSDA_DIR.joinpath('dsda-doom-{}-Linux.appimage'.format(DSDA_VER))
|
|
|
|
IWADS=DOOM.joinpath("iwads")
|
|
|
|
PWADS=DOOM.joinpath("pwads")
|
|
|
|
DEMOS=DOOM.joinpath("demos")
|
|
|
|
OUTPUT=DOOM.joinpath("fabricate")
|
|
|
|
|
|
|
|
DEFAULT_IWAD=IWADS.joinpath("DOOM2.WAD")
|
|
|
|
|
2025-04-16 02:55:14 -04:00
|
|
|
THUMB_WIDTH=1280
|
|
|
|
THUMB_HEIGHT=720
|
2025-04-20 14:16:44 -04:00
|
|
|
FONT="League-Spartan-Bold"
|
|
|
|
TEXT_FILL_COLOR="white"
|
|
|
|
TEXT_STROKE_COLOR="srgb(176,0,0)"
|
2025-04-16 02:55:14 -04:00
|
|
|
|
2025-04-19 23:05:38 -04:00
|
|
|
MIRROR="https://youfailit.net/pub/idgames" # NYC
|
|
|
|
|
2025-04-28 18:31:36 -04:00
|
|
|
def Complevel(wad):
|
|
|
|
complevel = PwadPath(wad).joinpath("complevel")
|
|
|
|
if not complevel.exists():
|
|
|
|
raise Exception("No complevel set in PWAD dir {}.".format(pwadpath))
|
|
|
|
|
|
|
|
with io.open(complevel) as f:
|
|
|
|
return f.read().strip()
|
|
|
|
|
|
|
|
def IwadPath(wad):
|
|
|
|
iwad = DEFAULT_IWAD
|
|
|
|
iwadpath = PwadPath(wad).joinpath("iwad")
|
|
|
|
if iwadpath.exists():
|
|
|
|
with io.open(iwadpath) as f:
|
|
|
|
iwad = IWADS.joinpath(f.read().strip() + ".WAD")
|
|
|
|
return iwad
|
|
|
|
|
2025-04-19 23:05:38 -04:00
|
|
|
def PwadPath(wad):
|
2025-05-13 05:46:26 -04:00
|
|
|
return PWADS.joinpath(wad)
|