Who the heck needs DeuTex in this day and age (V441)?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
MartinHowe
Posts: 2068
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Who the heck needs DeuTex in this day and age (V441)?

Post by MartinHowe »

Well, I do. Scripting complicated WAD builds at a command line can save a lot of headaches, but DeuTex is too old to know about 22050Hz sounds, TX_ textures and so on, or modern C compilers. Well, it was until today :)

* EDIT - 2007/10/10 - UPDATED *

http://www.martinsobservationpost.net/s ... elease.zip

Code: Select all

PRERELEASE SOFTWARE! SEEMS TO WORK OK BUT DON'T BET YOUR LIFE ON IT!

DeuTex 4.4.2 2007-10-10

Conditional (new in deutex.h):

#define USESND22050 /* allow 22050Hz sounds instead of complaining */
#define USEOLDTRANS /* use 0,255,255 transparency color by default */
#define SCRIPTINMAP /* recognise SCRIPTS as map lump (hexen/zdoom) */

These are all turned on in the included deutex.exe. Comment out and
recompile if ya don't like em.

Unconditional:

Support for MSVC on Win32. Especially fixed problems in endianio.c
caused by assumption that the expressions would not be reordered;
with older compilers that was probably true, but there is a reason
your CS tutor told you not to use side-effect-bearing functions in
arithmetic expressions and (s)he was right. So there :P

Support for TX_START/TX_END single-patch textures (ZDoom). This version
of Deutex calls 'em "singles"; use -singles to select on command line
and [singles] (optionally with insertion point) in a wadinfo.txt file.

Default insertion point set to (width/2,height-5) because that is what
is used for wall patches and that is what these really are.

Tested for extract and compose, but not for merge. Testing and, if
needed fixing, for this is not a priority, since after all, who the
heck needs DeuSF nowadays :)

No support yet for PNGs etc., only the normal Doom Pic format.
Write the code yourself (or pay me £8,000,000 in used banknotes :))

This is not the full deutex distribution, that will come later; it
would normally be passed on to André Majorel, but want a bit of
peer-review from the (G)ZDoomers first. Expect release eventually.

Updated 2007-10-10:

New options:

    -acslibs               (opt.) Select acslibs (ACS libraries between A_START/A_END).
        Does what it says in the summary. These are now extracted to/composed from
	new directory "acslibs" / wadinfo.txt section "[acslibs]". Physically, they
	are loaded/saved as raw lumps so are completely unmodified by the program.
	
	EXTRACTION
	DeuTex looks between A_START and A_END markers and checks for the magic code
	ACS and a size of 4 or more; such a lump is saved as LUMPNAME.o. If the lump
	IMMEDIATELY following is SCRIPTS/SCRIPT[0-9][0-9] it is saved as LUMPNAME.acs.

	COMPOSITION
	Use [acslibs] as section header in wadinfo.txt. There is no need to explicitly
	name the ACS file as well as the object file; given LUMPNAME, DeuTex expects
	to find LUMPNAME.o in the ACSLIBS subdirectory. There doesn't also have to be
	LUMPNAME.acs, but if it is present, DeuTex positions it immediately after
	LUMPNAME in the WAD directory and calls it SCRIPTS. Of course, DeuTex creates
	the A_START and A_END markers automatically.

    -clrmaps               (opt.) Select clrmaps (colormaps between C_START/C_END).
        Does what it says in the summary. These are now extracted to/composed from
	new directory "clrmaps" / wadinfo.txt section "[clrmaps]". Physically, they
	are loaded/saved as raw lumps so are completely unmodified by the program.

    -sndid                 (opt.) Use old sound identification method.
        By default, 4.4.2 checks the contents of a sound lump and ignores
        the name; needed because several mods use raw wave files and/or
	non ds-named doom-format sound lumps. To force normal "DS..."
	behaviour use this options.

    -modern                (opt.) Compose using S_START/S_END/F_START/F_END/P_START/P_END.
        Like the -george/-s_end option, but used for all six markers. Intended for
	modern source ports that don't need list marker hacks in PWADs AT ALL.

    -convwav               (opt.) Use WAVes by converting them to DOOM sound format.
        This merely specifies the default behaviour. WAVe files are loaded by
	converting to DOOM SND format.

    -keepwav               (opt.) Use WAVes directly; don't convert to DOOM sound format.
        This tells DeuTex to load WAV files without converting them; in other words,
	they are loaded byte for byte like plain data lumps. This option is provided
	because some PWAD authors prefer to embed normal "WAV" files in PWADs, as
	many source ports can read them.
	
    -keepmid               (opt.) Use MIDIs directly; don't convert to DOOM music format.
        This merely specifies the default behaviour that has been added in this version.
	MIDI files are loaded byte for byte like plain data lumps. This option is
	provided because some PWAD authors prefer to embed full MIDI files in PWADs,
	as many source ports can read them.

    NOTE:
    -convmid               (opt.) Use MIDIs by converting them to DOOM music format.
        This option DOES NOT EXIST! It would involve a fair amount of work to do, but
	since most modern source ports can read full MIDI files, there isn't a lot of
	point in adding it. I can add it if somebody points me to a good code source.

New functionality:

    DeuTex can recognise raw WAVE and MIDI files and output them during extract, and
    to the correct directories, instead of treating them as lumps. It will also accept
    them during compose, as described above.
    
    When extracting, if sound format is set to AU or VOC, a warning will be issued
    if a raw WAVE lump is encountered and the lump will be saved in the SOUNDS
    directory, but as a WAVE file. Conversion from raw WAVE to AU or VOC is likely
    possible, but not a priority. Does anybody still use these formats?

Martin Howe
10th October 2007
Nice to know that some people remember DeuTex and even USE IT :)
Last edited by MartinHowe on Wed Oct 10, 2007 5:19 pm, edited 1 time in total.
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Deutex is the way and the light

By the way, wouldn't simply dumping the png contents into a wad as a lump do the trick? Or if you wanted to do anything extra, couldn't you just use a png library?
User avatar
Nash
 
 
Posts: 17492
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

I used DeuTex all the time for compiling my ACS libraries. Example...

Code: Select all

@echo off

del *.o

if exist acs.err del acs.err
if exist errors.txt del errors.txt

acc darkadia darkadia
if exist acs.err goto error

copy *.o deutex\lumps\*.lmp

cd deutex

if exist acs.wad del acs.wad

deutex -doom2 d:\games\doom\iwads -make darkadia.txt acs.wad

cd lumps

ren a_start.lmp a_start.lol
ren a_end.lmp a_end.lol

del *.lmp

ren a_start.lol a_start.lmp
ren a_end.lol a_end.lmp

cd..

copy acs.wad d:\games\gzdoom\nashwads\darkadia\data\acs.wad

if exist acs.wad del acs.wad

cd..

del *.o

goto noerror

:error
ren acs.err errors.txt
type errors.txt
echo Errors :(
goto end

:noerror
echo No errors :)
goto end

:end
It does all I'll ever need it to do so I don't think I'll actually need a new version but keep up the good work anyway! What I think you should do though is create a simple command line WAD tool from scratch (something like Randy's PUTLUMP, but something that actually runs :P).
User avatar
MartinHowe
Posts: 2068
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Post by MartinHowe »

Chilvence wrote:By the way, wouldn't simply dumping the png contents into a wad as a lump do the trick? Or if you wanted to do anything extra, couldn't you just use a png library?
Good point. I am by no means an expert on graphics; however, I do recall people using PNGs as TX patches and graphics, which is why I mentioned it.

What about the palette though? I assume that PNGs can't be used as FF flats because of the flat format and presumably nor as PP patches either; so for PNGs used as graphics and TX patches, what effect would dumping a PNG into a WAD have when the game tries to use them?
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

This is awesome! I loved this tool back in the day and would love to be able to use it again. A graphical GUI is nice but only gets you so far...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Here's my list of features Deutex needs to make it useful again:

1. Handling of all the sound formats ZDoom can handle (e.g. WAV, FLAC, MP3, OGG) and an option that disables sound format conversion during WAD building (if it's doing such a thing.)
2. Same for music. I don't know what's there but limiting it to MUS recognition is too limited.
3. Any graphics format other than Doom patch (PNG, JPG, PCX, TGA, IMGZ) should be at least recognizable both during import and export. All the necessary identification code can be retrieved from ZDoom's texture classes. Conversion is not needed. ZDoom can use any supported graphics format in any place where graphics are loaded.
User avatar
Nash
 
 
Posts: 17492
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

What I really think would be a useful command line tool is something that does NO conversion at all. Plain and simple.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

That's great until you want something converted to Doom's flat format. :P

Admittedly there's not as great a need for it now, since ZDoom supports so many common formats, but I don't see why we need to remove the ability to convert images. Maybe just change the default to no conversion and add a command-line option to enable it for those cases where it is desired?
User avatar
MartinHowe
Posts: 2068
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Post by MartinHowe »

Blimey, that's a bit steep! I didn't expect the Spanish Inquisition! I make a quick hack of an old tool to implement some mission-critical functionality, submit it for a bit of peer-review, expect a few murmurs of YAY or NAY and instead get a ton of feature requests rolling in during less than two hours :P Still, the response seems to be positive, so let's have a to-do list:
  • Spend a bit of time with a code reformatter - this code has lots of styles, wildly inconsistent indentation and is now almost unreadable.
  • Contact André Majorel, who is still the official maintainer of DeuTex and ask for his opinion.
  • If he's not interested any more, we need to ask him if the ZDoom Community can take over maintainance of DeuTex or at least be permitted to maintain our own source port thereof. I know it's been GPL'd, but it would be courtesy to ask André first.
  • Somehow decide who gets the poisoned chalice. Right now, I simply do not have the time to maintain a multi-platform tool that needs a lot of work done on it and for personal situation reasons have absolutely no hope of using Linux myself for the forseeable future. If anybody wants more, this will HAVE to be a community effort.
That covers the basics of updating DeuTex for the 21st century. How could it actually be done, though?
User avatar
MartinHowe
Posts: 2068
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Who the heck needs DeuTex in this day and age (V442)?

Post by MartinHowe »

Updated. A few tidyings up, but especially recognises BOOM colormap lists (C_START/C_END) and ZDOOM ACS libraries (A_START/A_END); so this should interest Nash at least :)

Updated README file in the first post (edited). I have extracted and recomposed some of my mission-critical WADs with this and it's done OK, but as with all prerelease software, don't bet your work on it until fully tested; make backups. I do!

NB: TITLEMAP extraction works, but not composition. Have to fix that.

Have fun!
User avatar
MartinHowe
Posts: 2068
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Re: Who the heck needs DeuTex in this day and age (V442)?

Post by MartinHowe »

MartinHowe wrote:NB: TITLEMAP extraction works, but not composition.
Fixed and re-uploaded.
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

If you are worried about getting community input, why not stick it in a subverion repository of some sort? Is it even eligible for eg sourceforge?

It might seem ridiculous for something so old and obscure at face level, but every project needs a decent command line tool, since via shell scripts or batch files it is the basis of any good project management system.
User avatar
Nash
 
 
Posts: 17492
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Very nice Martin. Now I can finally get rid of my old DeuTex binaries.

Keep up the good work!
Gez
 
 
Posts: 17943
Joined: Fri Jul 06, 2007 3:22 pm

Post by Gez »

If it could extract graphics (flats, patches, sprites) as indexed PNGs (in addition to BMP and GIF), thus preserving the whole palette AND transparency, and keeping the offsets directly in the resulting PNG (something that SLumpEd is able to do), then I'd be quite interested by it. :)
User avatar
Doomguy0505
Posts: 625
Joined: Tue Mar 29, 2005 4:53 am
Contact:

Post by Doomguy0505 »

Here is a makefile for those who use a different compiler
Attachments
Makefile.tar.gz
Makefile for deutex
(1.02 KiB) Downloaded 32 times
Locked

Return to “Editing (Archive)”