model/d3map: Doom 3 / Quake 4 editor .map (Version 2 / 3): brushDef3 through codecs/model/Brush, patchDef2 / 3 through codecs/model/Patch, entities as nodes; side areas checked against qhull
This commit is contained in:
1 parent
4bd59a30c8
commit
0f0da6e8ea
13 files changed
+2945
-1101
No files matched your search
@@ -1,5 +1,5 @@
|
||||
# Docs inputs for the id Tech sections of the scene / tilemap / archive pages (tools/fixtures.py; tools/docs_check.py
|
||||
# explains the inputs), made by the format fixtures' writers: the hand-written UDMF room (udmf.py), a dmap-layout
|
||||
# explains the inputs), a hand-written Doom 3 .map, and inputs made by the format fixtures' writers: the hand-written UDMF room (udmf.py), a dmap-layout
|
||||
# .proc (proc.py), a VSWAP and a one-map GAMEMAPS + MAPHEAD with a random palette (wolf3d.py).
|
||||
# tests/gen/docs_idtech.luau { files = { [name] = bytes }, vars = { udmfText = "room.udmf", ... } }
|
||||
import importlib.util, os, struct
|
||||
@@ -7,6 +7,33 @@ import importlib.util, os, struct
|
||||
INPUTS = ["tools/docs_check.py", "tools/fixtures/udmf.py", "tools/fixtures/proc.py", "tools/fixtures/wolf3d.py"]
|
||||
|
||||
|
||||
D3MAP = """Version 2
|
||||
// entity 0
|
||||
{
|
||||
"classname" "worldspawn"
|
||||
// primitive 0
|
||||
{
|
||||
brushDef3
|
||||
{
|
||||
( 0 0 -1 -16 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/base_floor/a_sofloor1_d" 0 0 0
|
||||
( 0 0 1 0 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/base_floor/a_sofloor1_d" 0 0 0
|
||||
( 0 -1 0 -128 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
|
||||
( 1 0 0 -128 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
|
||||
( 0 1 0 -128 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
|
||||
( -1 0 0 -128 ) ( ( 0.0078125 0 0 ) ( 0 0.0078125 0 ) ) "textures/common/caulk" 0 0 0
|
||||
}
|
||||
}
|
||||
}
|
||||
// entity 1
|
||||
{
|
||||
"classname" "info_player_start"
|
||||
"name" "info_player_start_1"
|
||||
"origin" "0 0 1"
|
||||
"angle" "90"
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
def mod(ctx, name):
|
||||
spec = importlib.util.spec_from_file_location("fx_" + name, os.path.join(ctx.root, "tools", name + ".py") if name == "docs_check"
|
||||
else os.path.join(ctx.root, "tools", "fixtures", name + ".py"))
|
||||
@@ -37,6 +64,7 @@ def generate(ctx):
|
||||
body += struct.pack("<iiiHHHHH16s", *starts, *(len(pl) for pl in planes), 16, 16, b"Tiny map") + b"!ID!"
|
||||
files["GAMEMAPS.WL6"] = bytes(body)
|
||||
files["MAPHEAD.WL6"] = struct.pack("<H100i", W.TAG, head, *([0] * 99))
|
||||
vars = {"udmfText": "room.udmf", "procText": "level.proc", "vswapBytes": "VSWAP.WL6", "wolfPaletteBytes": "wolf.pal",
|
||||
files["room.map"] = D3MAP.encode()
|
||||
vars = {"d3mapText": "room.map", "udmfText": "room.udmf", "procText": "level.proc", "vswapBytes": "VSWAP.WL6", "wolfPaletteBytes": "wolf.pal",
|
||||
"gamemapsBytes": "GAMEMAPS.WL6", "mapheadBytes": "MAPHEAD.WL6"}
|
||||
check.emit_inputs(ctx, files, vars)
|
||||
Reference in new issue
Block a user