File: textures.wl

package info (click to toggle)
wadc 3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 7,352 kB
  • sloc: java: 3,808; ansic: 1,950; xml: 135; makefile: 67; sh: 34
file content (44 lines) | stat: -rw-r--r-- 1,074 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * textures.wl: Simple example of composing textures in WadC
 * part of WadC
 *
 * Copyright © 2015-2017 Jonathan Dowland <jon@dow.land>
 *
 * Distributed under the terms of the GNU GPL Version 2
 * See file LICENSE.txt
 */

#"standard.h"

main {

    -- simple example of a new texture with two patches
    texture("ZOMG", 64, 128)
    addpatch("RW24_2", 0, 64)
    addpatch("RW24_2", 48, 8)

    -- generate 4 textures with a different BFALLx on each
    set("i", 1)
    for(1, 4,
      texture(cat("ZOMG", get("i")), 128, 128)
      addpatch("RW24_2", 0, 0)
      addpatch("RW24_2",64, 0)
      addpatch(cat("BFALL",get("i")), 32, 0)
      inc("i", 1)
    )

    -- generate a bunch of new textures, adding some new lumps
    -- onto them (the WINUMx menu graphics)
    set("i", 0)
    for(0, 9,
      texture(cat("LOL", get("i")), 64, 128)
      addpatch("RW24_2", 0, 0)
      addpatch(cat("WINUM",get("i")), 32, 0)
      inc("i", 1)
    )

    -- a room so we can see this in DOOM
    pushpop(movestep(32,32) thing)
    mid("LOL3")
    box(0, 128, 140, 256, 256)
}