
            DeuTex version 1.5	 15/09/94

	 Copyright (C) Olivier Montanuy 1994. 

	 ********  beta test release ********
	     ****  handle with care! ****


Legal Stuff: see the end of this file.


DeuTex stands for DEU's Texture Companion
	This is a sequel to the most brilliant DOOM editor: DEU,
	  by Bendon Wybert and Raphael Quinet.
	  40% of the code was imported from DEU 5.21.
	  100% of the bugs were written by me all alone!
DeuTex is also a followup to DoomTex1.0 by Steve McCrea, 
	(DoomTex was the texture compiler used for Trinity.wad)  

********************* THANKS **********************

DeuTex would not have existed without the help of those people:
	Keith Wilkins		(spike@nectech.demon.co.uk)		
		(creator of Wacker, a texture composer. try it!)
	Elias Papavassilopoulos (ep104@cus.cam.ac.uk)	
		(Doom technical informations)
	Tom Neff (tneff)
		(Doom technical information)
	Matts Fell					
		(Doom specs version 1.3)
	ID software (John "to-win-the-day-you-must-beat-me" Romero)
		(for the DeuTex test bench, also refered as DOOM)   	
	And finaly, 
		thanks to my first beta testers for their kind support!
		But I changed the soft too much for them to report relevant bugs :-)

**************** EXECUTIVE SUMMARY ******************


 DeuTex was originaly a DOS based 'Texture compiler' for DOOM 
 but it now has some little adds on... see for yourself:
 
* DeuTex will strip lumps, graphics, sounds, levels, textures and lump
  out of your PWADS. 
   tested on TRINITY, MAKDOOM3, GALAXIA, DESTINY, LOST2 ...

* DeuTex will pack into a PWAD:
 -    your new definitions for the TEXTUREs of DOOM.
 -    your  graphics defining new parts of textures, if any. 
      (new wall patches, refered in your own textures)
 -    redefinitions of the ordinary graphics 
      (like the title screen, the title bars...) 
 -    your lumps  (all non graphic objects, like the text at the end of DOOM, or the Demos)
 -    your new floors (command "mergewad" to make use them)
 You cannot recreate the main IWAD that way. It is a voluntary limitation.

* DeuTex will modify almost any text strings in the DOOM executable
   if you are bold enough to request so.

* DeuTex will merge a PWAD into your IWAD, so that all PWAD
   limitations disappear like magic: new flats can be added.

* DeuTex will restore your IWAD *and* your PWAD if you don't want
   them merged anymore. (modification to the IWAD is limited to 4 bytes,
   and you can restore it by hand if all goes wrong)




**************** Technical Details ********************


 Graphics can be imported from:

  256 color BMP:   works ok. a bit slow.  (RGB format only, not RLE)
		   prefers the DOOM palete, supplied as doompal.pbm 

  16M color BMP:   works, but SLOW AS HELL!
		   (color quantisation is not really programmed yet. later.) 

  GIF images:	   by using DMGRAPH.
		   Deutex will make a fake IWAD for DMGRAPH, and 
	 	   will write a script to invoque DMGRAPH on that IWAD
		    and transform it back into a PWAD

****************** DIRECTORY STRUCTURE****************

DeuTex use this directory structure, to store DOOM informations:
	
	levels\		* for levels			as individual PWADS (11 entries)
	lumps\		* for lump			as binary raw data (.LMP)
	textures\	* for texture definitions	as text file
	sounds\		* for sounds			as individual PWADS (1 entry)
	graphics\	* for DOOM pictures		as bitmap .BMP
	sprites\	* for sprites			as bitmap .BMP
	floors\		* for floors			as 64x64 bitmap .BMP
	patches\	* for wall patches		as bitamp .BMP
	gif\		* for GIF images		put all the gifs here. a real mess...

****************** DISCLAIMER ************************

	This program is an ordinary DOS executable, compiled in HUGE memory model,
	with 386 instructions.It might not run under a 286, and works on my 486/33 (slow!) 
	To date, it never crashed the system, but...

	If all goes wrong I'll be very sorry but I will not be liable for
	any damages consecutive to the use of this program...
 
********************* Known problems ****************************

-	DeuTex is not a graphic editor
		A front end is under development in Visual Basic 3.0
		Soon on your screens if I master the windows API calls...
		.gif included. comments welcome.
-	DeuTex assume that the name of the lumps, BMP or GIF file is the 
		same as the name of the entry in directory
-	GIF support is discontinued, due to BMP support.
		however, it is still available, with a batch for DMGRAPH :-)
-	No detection of void columns in wall patches.
		It would be usefull though, because DOOM exits when
		it finds a completely transparent column in a wall.
		planned for the future...
-	BMP 16M color quantisation  is slow.
		I didn't bother to write a correct code for it. yet.
-	BMP format was hacked, not read from documentation.
		And though I don't understand all fields, it works! puzzling...
-	TYPE of ENTRY identification is not perfect (no way to do it correctly?)
		But it works for the tested PWADS... report bugs! 
-      Sprites support: 
		it works for DeuTex, but I couldn't manage to get it running with
		DOOM. Tell me if what is wrong, or if you managed to do it...
		but you can merge WAD as a temporary subsidiary
-       Insertion of new flats: not perfect yet.
		Only works by merging WAD.
		Later on, I'll put an option to regenerate all flats, a la DMADDF
-	Merging of IWAD and PWAD
		Care has been taken to make it secure, and to limit modifications
		to the IWAD to only 8 bytes.
 -	Source is NOT included.
		not yet. but who wants to see it anyway?


**************** Hardware Requirements **********************

 None specific. *might* run on a 286. a shame in itself.
 Didn't optimise memory allocation. You could run out of memory
 if you have other applications using large chunk of the base 640kb memory.

**************** User Requirements ****************************

  By using this program, you take the morale engagement to report
  any bugs, defects, misbehaviours that you may detect. 

  You also take the engagement to read the manual before asking questions.
  My mailbox is used for work too (sometime) so I don't want to have it flooded.
  Also: my answers might not be less confusing than the manual itself.
	Remember: *I* wrote the manual. too bad...

**************** 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 .BMP pictures in PWAD  
	 Avoid the 32bit 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.

-   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.


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

 All the optionnal commands must appear in the order: -doom, then -dir, then -deu...
 then the main command itself. rely on the existing examples. 

* Help commands

DEUTEX -help
	won't help you a lot, but will give you the parameters.

DEUTEX -format
	won't explain much about the ascii format. self explanatory
	enough. format.gif says it all.



* Optionnal commands

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

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

DEUTEX -deu
	OPTIONAL COMMAND
	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.



* Commands to decompose and recompose PWADs

DEUTEX -wadir <thatcool.wad>
	Directory list, with entry identification.
	report incorrect identifications please!

DEUTEX -xtractwad <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 and TEXTURES\TEXTURE1.TXT 
	and TEXTURES\TEXTURE2.TXT.

DEUTEX -mergewad  <myown.wad>
	merge mywad.wad and DOOM.WAD, recreating the DOOM directory.
	sprites, (resp. flats, patchs) are recognised only if between
	S_START S_END (resp. F_START F_END, P_START P_END).
	But it is safer in PWAD to use SS_START SS_END and FF_START FF_END,
	as then DOOM won't crash if PWAD is used separately.  

DEUTEX -restorwad
	will restore DOOM.WAD to it's original size and content
	like magic! Well, it should, at least. shame if it doesn't...


DEUTEX -textures
	list the textures contained in DOOM.WAD (or redefined
	in a PWAD) into a text file. TEXTURE1 and TEXTURE2 are listed.		
	

DEUTEX -makepwad <wadinfo.txt>  <myown.wad>
	<textures.txt> is read only and define textures
		use DEUTEX textures as a reference for textures, or the
		examples provided in the EXAMPLES\ directory.
		if you redefine textures wich are in the registred version
		then TEXTURES\TEXTURE2.TXT must be redefined
	<myown.wad> is written, as the PWAD you always dreamed of.
		If you redefine a TEXTUREx, it will only contain
		the New Patches (entry names that cannot be found in 
		DOOM.WAD or the optionnal PWADS)
			
DEUTEX -fakeiwad  <wadinfo.txt> <mywad.wad>
	will read a wad creation directive file and create a fake IWAD for 
	texture insertion by DMGRAPH. The batch file to do this is generated too.
	assumes GIF files are to be found in gif\ subdirectory. 

DEUTEX -hackiwad  <mywad.wad>
	for use after 'fakeiwad'. destroys some directory entries in an IWAD and transform it
	into a PWAD. necessary to clean the mess after DMGRAPH was used.
	Don't do this on DOOM.WAD itself. (it should be foolsafe... but I woudn't rely on it)

DEUTEX -exe2list
	will list in a text file the strings existing in DOOM.EXE
	and suitable for replacement into a file SUBSTIT\ORIGINAL.TXT
	use -dir to specify the working directory

	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 -list2exe
	the file SUBSTIT\MODIFIED.TXT indicates which strings must be changed
	in DOOMFAKE.EXE, provided they are only referenced ONCE.
	use -dir to specify the working directory



	*********************************************************************** 
	*  I have no relations with IDsoftware (except as a registred user)   *
	*	They don't ware about this program, and certainly never will! *
	*  I have no relations with Bendon Wybert and Raphael Quinet          *
	*	They are NOT supposed to answer questions about this program. *	
	*  I have good relations with Steve McCrea, but they will get poor    *
	*       if he receives questions about my program                     *
	* so please:							      *
	*  Direct all comments to me, don't bother them.                      *
	***********************************************************************



References:
DEU	by  Brendon Wybert and Raphael Quinet (bonjour, une fois!)
DMGRAPH by  Bill Neisius 
DOOMTEX by  Steve McCrea
WACKER  by  Keith Wilkins


********************* Legal Stuff *********************



The software modules included from DEU are Public Domain.
DeuTex is Copyright (C) Olivier Montanuy 1994.
DeuTex is Freeware but NOT public domain.

Why is DeuTex Copyrighted? so that I can make the following
requirement, which would be impossible with Public Domain status:


YOU ARE NOT ALLOWED TO MAKE ANY MODIFICATIONS TO THIS PROGRAM
AND TO ALL THE INCLUDED FILES. ALL THE FILES INCLUDED IN THIS
PACKAGE SHALL BE RELEASED TOGETHER.

If you want modifications, ask me, I'll do my best. Later on
I'll release the source, when stabilised.

USE AT YOUR OWN RISKS. NO LIABILITY.

It runs under DOS, so behaviour is unpredictable :-)
 
YOU ARE NOT ALLOWED TO MAKE ANY KIND OF PERSONNAL PROFIT BY
SELLING, RENTING, LEASING, OR USING THIS PROGRAM, WITHOUT MY
EXPRESS CONSENT.

If you are interested in distributing it on a priced CD or 
any other media contact me first. I should accept, provided:
- you keep the price low, for maximum availabilty.
- you send me a free copy...

The consent of the author if DEU is recommended but not necessary,
as their work is public domain.


NOTE TO "SHAREWARE DISTRIBUTORS":  
  THIS IS FREEWARE. FREE. GET IT? 
  MAKE OTHERS PAY FOR IT AND I'LL MAKE YOU PAY FOR IT.
  


* Alright folks, it's a shame, but it had to be stated somewhere...





************** LAST WORDS   (AT LEAST!)  **************


Thanx for Beta Testing DeuTex.

I wasted long hours on it, so I could hope it will be of use.
Though in fact I just wanted to program *something that works*,
It's a kind of moral crisis that I had to atone in an orgy of
programmation. Such things happen when you spend too much time 
dealing with norms and specifications...
 

	Olivier Montanuy,

E-Mail:
	montanuy@lannion.cnet.fr	Work time mailbox
	montanuy@dmi.ens.fr		Leasure time mailbox
	montanuy@idsoftware.com		Dream time mailbox
Address:
	Manoir de Keringant, St Quay Perros, 22700 Perros Guirec, FRANCE
	(I live in Bretagne, the westernmost part of France.)
	(help! I'm lost in the middle of nowhere!)
Phone:
	+33 96482047, 
	modem: 1 bit of usable information per second (vocal emulation)
