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('