            DeuTex version 2.6	 11/94

	 Copyright (C) Olivier Montanuy 1994. 

       DeuTex code was originaly derived from DEU5.21 
	  by Brendon Wyber and Raphael Quinet
	   DeuTex uses various contributions, 
	    for some particular file formats.

 
 
********************  DeuTex Commands  ****************************


COMPLETE COMMAND REFERENCE

 I am lying: it's not complete. But those commands not mentionned here
 you shall never need to use (it's for Visual Basic).
 Commands with an '*' are not implemented in the VB version. I forgot them.

 All the optionnal commands must appear before the non optional ones
 else they will be ignored.

* Help commands

DEUTEX -help
DEUTEX -syntax
	will print the format of WAD creation directives (wadinfo.txt).
	You might wish to have a look at format.txt for more thourough
	explanations.

* Optional commands

DEUTEX -doom <doom directory>
 	DEFAULT IS: CURRENT DIRECTORY or \DOOM or \DOOM2
	use that command to indicate the directory where you put your DOOM.WAD and DOOM.EX
	example:        -doom C:\DOOM

DEUTEX -dir <working directory>
 	DEFAULT IS: CURRENT DIRECTORY	
	This defines the working directory, which contains WAD creation directives
	and all the subdirectories containing PWAD parts 

DEUTEX* -deu 
 	Use this if you want DeuTex to add 64k of junk at the end of your PWAD.
	What for? to compensate a bug of DEU 5.21, that make it crash sometimes,
	when viewing pictures.

DEUTEX* -rgb <R> <G> <B> 
 	When you include GIF or BMP with DeuTex, the color CYAN
	(R=0 G=255 B=255) is assumed to be transparent.
	You can specify here an alternate color to represent transparency.
	*only* the pixel of *exactly* that color will be transparent.

DEUTEX -gif
DEUTEX -bmp
	Save pictures as GIF (default on Unix) or as BMP (default on DOS)
DEUTEX -au
DEUTEX -wave
	Save sounds as AU (default on Unix) or as WAV (default on DOS)
DEUTEX* -fullsnd
	If the declared sound length os smaller than the real size of the
	sound entry, -fullsnd enables you to extract the complete sound entry.

DEUTEX -level
DEUTEX -lump
DEUTEX -sound
DEUTEX -sprite
DEUTEX -patch
DEUTEX -flat
	This tells DeuTex to select sprites, or patch, or sounds, or ... 
	when composing/decomposing/merging PWADS. 
	These commands can be combined. 
	By default, all entries are selected.
 
DEUTEX -iwad
	to be used with -make, to make an IWAD instead of a PWAD.
	This is necessary if you are building a PWAD which contains all 
	the sprites or all the flats.
	Enables you to rebuild DOOM.WAD if really needed.


* Commands to decompose and recompose PWADs

DEUTEX -wadir <thatcool.wad>
	Directory list, with entry identification.
	in PWADs, exact entry identification is sometime impossible. 
	then SPRITES or FLATS or PATCHES might be reported as GRAPHICS.

DEUTEX -xtract <thatcool.wad>
DEUTEX -extract <thatcool.wad>
	will extract lumps, graphics, floors, patches, sprites, sounds, levels
	from a WAD and put them in mydir, into the relevant subdirectory.
	the file WADINFO.TXT will contain the WAD creation directives.
	use -dir to specify the working directory
	See format.txt for the format of WADINFO.TXT 

DEUTEX -textures
	list the textures contained in DOOM.WAD (or redefined
	in a PWAD) into a text file. TEXTURE1 and TEXTURE2 are listed.		
	
DEUTEX -make     <wadinfo.txt>  <myown.wad>
DEUTEX -build    <wadinfo.txt>  <myown.wad>
DEUTEX -create   <wadinfo.txt>  <myown.wad>
	<wadinfo.txt> is read only and defines the entries to put
		into MYOWN.WAD. see format.txt for explanations.
		also use DEUTEX -xtractwad
	<myown.wad> will be created, unless it already exist in
		which case the command will fail. delete it first.
	this command replaces the utilities DMGRAPH,DMMUS,DMTEX,DMAUD
	(however DMAUD recognise more than just .WAV and .AU)

DEUTEX -check  <myown.wad>
	Will check if the textures defined in myown.wad don't contain
	void column that would crash DOOM. use this after modifying 
	textures.

DEUTEX -unused <thatlame.wad>
	Checks for unused bytes in a PWAD.
	report all the unused zones, total number of byte wasted,
	and the repartition depending on size of wasted areas.


* command to merge a PWAD into the main IWAD

DEUTEX -restore
	Will restore DOOM.WAD and the merged MYOWN.WAD.
	To be used after the -merge command, to undo the job.

DEUTEX -merge  <myown.wad>
	Will put entries of MYOWN.WAD into the main DOOM.WAD file,
	removing all restrictions DOOM puts on PWAD.
	This is much safer and much cleaner than inserting/restoring
	entries with DMGRAPH or such. But your IWAD is modified.

	This is meant to help you deal with editors that can't read
	external PWADS. 

	Note on safety:
	- ONLY 8 BYTES of DOOM.WAD are modified (but file size increase...)
	- You can restore you IWAD by hand, if all fails.
	- MYOWN.WAD is put INTACT into DOOM.WAD. you can delete it because
	  it will be restored intact. (really: no modifications at all)
	- Only about 32k of additional disk space are needed.

	How does it work?
	- Restoration information is added at the end of IWAD. 
	- Then the PWAD is pasted intact. 
	- Then the IWAD directory is entirely rebuilt (about 32K).
	- The pointer to the DOOM directory is modified (8 bytes) 

	I did my best so that command is the safest possible.
	I tested this command thouroughly and believe it can be trusted.
	
	However, the resulting IWAD might not work with DOOM if the PWAD
	you are including does not respect some conventions about SPRITES and
	FLATS. In that case, just restore it.

	The convention is: 
	there must be F_START or FF_START before the first floor
	there must be S_START or SS_START before the first sprite
	This is compatible with DMADDS.
	Sorry but there is NO OTHER WAY if we want to be able to 
	add new sprites and floors, unreferenced in DOOM.WAD.

* command to hack text strings in DOOM.EXE
  (equivalent and somehow safer functionnality exist in DEHACKED
   use only to edit strings that are too long for dehacked but then
   distribute the dehacked patch: They are not very safe, you know)

DEUTEX* -strings
	Will list in a text file some of the strings existing in DOOM.EXE
	and suitable for replacement. Result can be found in file
	SUBSTIT\ORIGINAL.TXT

	BEWARE:
	this list is huge. copy into MODIFIED.TXT only those strings that you
	want to modify. see format.txt for explanations on the format of
	ORIGINAL.TXT and MODIFIED.TXT

DEUTEX* -substitute
	the file SUBSTIT\MODIFIED.TXT will indicate which strings must 
	be changed in DOOMFAKE.EXE.
	This command replaces the utility DMSTR.
	It is a bit slower because it does NOT depend on a particular
	version of DOOM.EXE. If a string exists, it can be substituted.


**************** Special Features ************************

-   Particular to this program:

      *	DeuTex can list text strings in DOOM.EXE
	DeuTex can replace strings among those listed. CAREFUL WITH THIS.
	(it is not 100% possible for a prog to decide what is a C string and what is not)
	FUNNY:
	-   Replace the names of objects,
	-   Replace messages from DOOM (in game, but also at the end of missions)
	-  Choose the names of the animated walls and Floors.
	-  Choose the names of the walls with switches
	NOT FUNNY:
	  DO NOT REPLACE THE COPYRIGHTS AND COMMERCIAL NOTICES
	  OF IDsoftware. YOU ARE NOT ALLOWED TO USE DeuTex FOR THIS. 

      * DeuTex directly loads .GIF and .BMP pictures in PWAD  
	 Avoid the 24bit BMP format! use 8bit (256 color) and have the
	 color quantisation done by a serious program. mine is lame.

      * DeuTex can merge a PWAD into the IWAD, and recreate the	whole WAD directory, 
	so that all kind of FLOORS can be defined. (in fact, all can be redefined,
	keeping only the adds on in PWAD)

     * DeuTex can ripp off graphics .BMP and lumps out of your favorite
	PWAD, for contemplation or reuse WITH WAD AUTHOR AGREEMENT ONLY.

     * DeuTex can check your PWAD for errors in TEXTURE definitions

     * DeuTex can load sounds as WAVE, PC sounds as text (don't laught)
	and Music as MUS format.

-   Valid for all textures editors/compilers:

      * Create any texture you want for DOOM walls
 	 DOOM will ignore heights above 128. 
         Width should be rounded to the next power of 2. (8,16,64,128,256,512,1024 are usable)
	 The patches composing textures shall not be more than 320 wide.
         
      * Create textures for transparent walls
	 beware: composed of one patch only, else you'll get the Medusa Effect.

      *	Create animated walls with (almost) any sequence of pictures.
	No known limit in number of frame. 12 is OK.
	See DOOM SPECS 1.3 for more info.
	2 ways:
	-	You declare your animated walls, in the texture list between two other DOOM 
		animated walls (which you shall redefine also)
	- 	You use DeuTex to change, inside DOOM.EXE, the name
		of the extremity of the animated walls and flats.
      * you can change the definition of the walls bearing switches.
	 let them swith to something else.

      * You can use almost all the graphic entries for texture composition:
	 - sprites (like in TRINITY.WAD)
	 - existing wall patches 
	 - newly defined wall patches 
	But DON'T use the DOOM font STCFNxxx, or reload it with another name, like in
	TRINITY version 2. (info from Elias Papavassilopoulos)

      * Create a non repeating sky texture:    see TRINITY version 2.
	define the SKY1 (or SKY2, or SKY3) entry as a 1024x128 area
	and place your patches so as to cover it all.
	Your patches will appear horizontaly inverted, though.
	0=south, 256=east, 512=north, 768=west.

      * for best results, see the explanations of TRINITY.WAD by Steve McCrea


******************* Known problems **********************

-	DeuTex makes limited check on your PWAD
 		I check only texture consitency, and cohenrency of
		S_START/S_END F_START/F_END. suggestions?
-	BMP 24bit color quantisation  is slow.
		I have a quite fast quantiser but it's a bit lossy, and
		needs *some* init time. Not implemented here.
-	Entry type identification does not always work with PWAD.
		no general solution to this problem, only best effort.
		- void entries are saved as LUMPS,
		- sprites and flats are missed if conventions are not
		  respected. (files generated by hand or by wackerb7)
-	GIF format defaults to GIF87
-	BMP format is a bit hacked
		My painting toolsaccept it, but Visual Basic refuses
		it. If this happen, load the file with a good prog and
		overwrite it with a save from the prog. then it work :-)
-	WAVE and AUDIO file format are hacked
		might not *always* work correctly. No one ever sent me
		the specs! If you have the specs, then my mailbox is waiting
		your kind contribution!
-	No MIDI support 
		I dunno how to write the code. But I'm looking to the code
		of Just_Joe (that I don't understand at all).
-	Levels must be complete before being inserted in a PWAD
		by DeuTex. Means: nodes, reject and such must exist.
-	Source is NOT included.
		not yet.
 

* Limitations of DOOM

-       Sprites PWADs only work if you don't reuse existing sprites
		Use DeuSF or DMADDS if you want to replace sprites
		Anyway, deutex -merge will work also (and better)
-       Flats don't work in PWAD
		Use DeuSF or DMADDS if you want to replace sprites
		Anyway, deutex -merge will work also (and better)
