diff --git a/BUILD-SYSTEM.asc b/BUILD-SYSTEM.asc index 587cd088..f623ffef 100644 --- a/BUILD-SYSTEM.asc +++ b/BUILD-SYSTEM.asc @@ -18,29 +18,30 @@ following diagram illustrates the process: ................................................................ - buildcfg.txt textures/combined.txt + buildcfg.txt lumps/textures/textures.cfg + │ │ + │ ┌───┴────┐ + │ │ cpp │ + │ └───┬────┘ + │ │ + │ ┌─────────┴────────┐ + │ │ build-textures │ + │ └──┬────────────┬──┘ + │ │ │ + │ pnames.txt texture1.lmp, pnames.lmp + │ │ │ + ┌───┴────┐ │ │ + │ cpp ├───────────┘ │ + └───┬────┘ │ │ │ - │ ┌─────┴────┐ - │ │ cpp │ - │ └─────┬────┘ + ┌─────────┴──────────┐ │ + │ wadinfo─builder.py │ │ + └─────────┬──────────┘ │ │ │ - │ textures/(wad)/texture1.txt - │ │ │ - │ ┌────────┴──────────┐ │ - │ │ extract─pnames.py │ │ - │ └────────┬──────────┘ │ - ┌───┴────┐ │ │ - │ cpp ├───── textures/(wad)/pnames.txt │ - └───┬────┘ │ - │ │ - ┌─────────┴──────────┐ │ - │ wadinfo─builder.py │ │ - └─────────┬──────────┘ │ - │ │ - wadinfo.txt │ - │ │ - ┌───┴────┐ │ - │ ├───────────────────────────────────┘ + wadinfo.txt │ + │ │ + ┌───┴────┐ │ + │ ├────────────────────────┘ │ deutex │ │ ├───────── all other source files (graphics, etc) └───┬────┘ @@ -78,15 +79,17 @@ based on the type of output target desired: * +DOOM1+: Build for a Doom I WAD. * +ULTDOOM+: Include episode four levels. -=== Texture configuration file (+textures/combined.txt+) +=== Texture configuration file (+lumps/textures/textures.cfg+) -The texture configuration file is used to generate the +texture1.txt+ -file. This is a list of textures that is used by 'deutex' to generate -the +TEXTURE1+ lump that contains Doom's texture definitions. +The texture configuration file is used to generate the texture lumps. +These are +texture1.lmp+ (texture directory), +pnames.lmp+ (list of +patch names) and +texture2.lmp+ (Doom I only). They are generated +by the +build-textures+ script; deutex's internal texture builder +is deliberately not used for compatibility reasons. Similarly to the build configuration file, different textures are -included depending on the output WAD type. The file is processed by -the +simplecpp+ script to include the appropriate textures. Command +included depending on the output WAD type. The file is passed through +the +simplecpp+ script to include the appropriate textures. Command line variables are defined based on the desired build settings: * +DOOM1+: Include textures that only exist in Doom I. @@ -103,38 +106,25 @@ both. The following files are generated automatically by automated scripts during the build process. -=== +texture1.txt+ +=== Texture files -This file contains the texture definitions and is used by deutex to -generate the +TEXTURE1+ lump. It is generated automatically from -+textures/combined.txt+ as a template. ++texture1.lmp+ is a binary file that contains the texture definitions +and is built by the +build-textures+ script from ++lumps/textures/textures.cfg+ as a template. -Several different +texture1.txt+ files are generated for the different -WAD files that are built: ++pnames.txt+ contains a list of all of the patches used in the texture +definition file (+texture1.txt+). It is generated as an output by +the +build-textures+ script. -[frame="topbot",grid="none",options="header"] -|================================================================== -| Filename | WAD File | CPP Variables -| +textures/phase1/texture1.txt+ | +freedoom1.wad+ | DOOM1, ULTDOOM -| +textures/phase2/texture1.txt+ | +freedoom2.wad+ | DOOM1, DOOM2 -| +textures/freedm/texture1.txt+ | +freedm.wad+ | FREEDM -|================================================================== - -=== +pnames.txt+ - -This file contains a list of all of the patches used in the texture -definition file (+texture1.txt+). It is generated by the -+extract-pnames.py+ script. - -Several different +pnames.txt+ files are generated for the different -WAD files that are built: +Multiple sets of these files are generated with different +configurations for each IWAD file. [frame="topbot",grid="none",options="header"] |=============================================================== -| Filename | WAD File -| +textures/phase1/texture1+ | +freedoom1.wad+ -| +textures/phase2/texture1+ | +freedoom2.wad+ and resource WADs -| +textures/freedm/texture1+ | +freedm.wad+ +| Subdirectory | WAD File | CPP Variables +| +lumps/textures/phase1/+ | +freedoom1.wad+ | DOOM1, ULTDOOM +| +lumps/textures/phase2/+ | +freedoom2.wad+ | DOOM1, DOOM2 +| +lumps/textures/freedm/+ | +freedm.wad+ | FREEDM |=============================================================== === +wadinfo.txt+ @@ -150,7 +140,7 @@ WAD files that are built: |=============================================================== | Filename | WAD File | CPP Variables | +wadinfo.txt+ | Resource WAD files | DOOM2 -| +wadinfo_phase2.txt+ | +freedoom1.wad+ | DOOM1, ULTDOOM +| +wadinfo_phase1.txt+ | +freedoom1.wad+ | DOOM1, ULTDOOM | +wadinfo_phase2.txt+ | +freedoom2.wad+ | DOOM2 | +wadinfo_freedm.txt+ | +freedm.wad+ | FREEDM |=============================================================== @@ -192,12 +182,57 @@ WAD builds, the missing resources are commented out in the output file so that they are missing from the WAD that is built. This is the default behavior. -=== +extract-pnames.py+ +=== +build-textures+ -This script processes the texture file (+texture1.txt+) and outputs a -list of the names of all the required patches. This is used to -generate a file named +pnames.txt+ that is included in the -+wadinfo.txt+ configuration file in a section named ``[patches]''. +This script processes the texture file (+texture1.txt+) and outputs +the binary texture lumps +texture1.lmp+, +texture2.lmp+ and ++pnames.lmp+. + +Also output from the +build-textures+ script is a file named ++pnames.txt+ which is simply a text file containing the patches +listed in +pnames.lmp+. This is included in the wadinfo.txt file +so that all patches listed by the texture directory are automatically +included in the IWAD with no need for manual configuration. + +=== +textgen+ + +Found in +graphics/text+, this script generates various graphics +files that are used in the Doom menus and intermission screen. +It reads level names from the dehacked lumps. + +=== +playpal.py+ + +Found in +lumps/cph/misc-lumps+, this script builds the +PLAYPAL+ +lump which contains the 256-color palettes used for special +effects (injured "red" flash, the green "radiation suit" effect, +etc.) + +=== +colormap.py+ + +Found in +lumps/cph/misc-lumps+, this script builds the +COLORMAP+ +lump that is used for the diminished lighting within the game. +This script is also reused to generate additional colormaps that +can be used for special effects. It has a number of command line +options that allow it to do various different colorizing and +"fog" effects. + +=== +mkgenmidi+ + +Found in +lumps/genmidi+, this script builds the +GENMIDI+ lump used +for OPL MIDI synthesizer playback. The inputs for this script are a +collection of instrument files that are in the standard +SBI+ format +for OPL instruments. This lump is essential if you want to play using +a classic Adlib or Soundblaster card; these are emulated by several +source ports and some people still like to play using emulated OPL for +the authentic retro feel. + +=== +gen-ultramid+ + +Found in +lumps/dmxgus+, this script builds the +DMXGUS+ lump used for +GUS MIDI playback. The GUS (Gravis UltraSound) card was a gaming sound +card popular in the '90s. As with the +GENMIDI+ lump, few people are +still using a real GUS card nowadays, but several source ports emulate +them and require this file. == deutex @@ -233,11 +268,9 @@ around. Some of them are listed here. +-v0 -fullsnd -rate accept+ * deutex does not allow the exact path to the +texture1.txt+ file to - be specified; instead, it expects to find the file in - +textures/texture1.txt+. To work around this, a symlink is kept at - this location that points to the actual +texture1.txt+ being used. - A side effect of this issue is that parallel builds with +make+ are - not possible (the +-j+ option). + be specified in the configuration file; this used to be a problem + but the Freedoom's texture lumps are now built using a custom + script. * deutex requires an existing IWAD file in order to build WAD files, and includes the contents of the +TEXTURE1+ lump from the IWAD in