From 4f81732675dbcffb228037c4d60d8e85be18f16d Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Wed, 3 Mar 2021 20:34:47 +0000 Subject: [PATCH 1/4] blocky: generates flat color patches and textures --- demo/blocky.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 demo/blocky.py diff --git a/demo/blocky.py b/demo/blocky.py new file mode 100644 index 0000000..dfdb6a2 --- /dev/null +++ b/demo/blocky.py @@ -0,0 +1,42 @@ +#!/usr/bin/python +# generates a PWAD with 256 64x64-sized flat color patches and textures named +# COLORXXX and 256 flats named FOLORXXX where XXX is a decimal index into the +# palette + +from omg import * +from omg.txdef import * +import struct + +out = WAD() +editor = omg.txdef.Textures() + +for i in range(0,256): + + # generate raw patch data for palette index i + topdelta = 0 + length = 64 + unused = 0 + data = i + post = struct.pack(' Date: Sat, 6 Mar 2021 15:21:32 +0000 Subject: [PATCH 2/4] demo/blocky: append to IWAD textures/patches There's something appealing about not doing this, but without doing so vanilla will crash at the menu. --- demo/blocky.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/demo/blocky.py b/demo/blocky.py index dfdb6a2..a519d30 100644 --- a/demo/blocky.py +++ b/demo/blocky.py @@ -7,8 +7,9 @@ from omg.txdef import * import struct +iwad = WAD('doom2.wad') out = WAD() -editor = omg.txdef.Textures() +editor = omg.txdef.Textures(iwad.txdefs) for i in range(0,256): From 228254fafdae08428ec3db7c57dc35bfb11eebe5 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Sat, 6 Mar 2021 15:22:55 +0000 Subject: [PATCH 3/4] demo/blocky: fix flat markers for vanilla --- demo/blocky.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/demo/blocky.py b/demo/blocky.py index a519d30..fce2280 100644 --- a/demo/blocky.py +++ b/demo/blocky.py @@ -39,5 +39,8 @@ flat.load_raw(bytes([i])*4096) out.flats[name] = flat +# fix flats in vanilla +out.flats.prefix='FF*_START' + out.txdefs = editor.to_lumps() out.to_file('out.wad') From 4f060798b2078a53d59671659150a519f38a5598 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Sun, 7 Mar 2021 19:56:02 +0000 Subject: [PATCH 4/4] demo/blocky: generate 128-tall textures & patches Avoid tutti frutti on Vanilla. --- demo/blocky.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/demo/blocky.py b/demo/blocky.py index fce2280..82f97aa 100644 --- a/demo/blocky.py +++ b/demo/blocky.py @@ -15,11 +15,12 @@ # generate raw patch data for palette index i topdelta = 0 - length = 64 + length = 128 unused = 0 data = i - post = struct.pack('