TEXTURES lump utility

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.

TEXTURES lump utility

Postby Daniel » Tue May 26, 2009 1:47 pm

Hello,

Is there any utility that creates an TEXTURES lump from any given directory with image files?

Thanks!
User avatar
Daniel
 
Joined: 04 Jul 2004

Re: TEXTURES lump utility

Postby theDooMguy47 » Tue May 26, 2009 2:24 pm

I don't know of any utility made specifically for this, but in SLumpEd, you can hilight a texture or group of textures, right click, and click "add to pnames", then do that again and click "add to texture1", and you're ready to go.
User avatar
theDooMguy47
Are you threatening me!?
 
Joined: 14 Apr 2009
Location: Lake Titicaca, Nicaragua

Re: TEXTURES lump utility

Postby Nash » Tue May 26, 2009 2:26 pm

Didn't SoulPriestess write something to do this? Or was it bagheadspidey?

I recall it being a PHP script or something.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: TEXTURES lump utility

Postby Gez » Tue May 26, 2009 2:33 pm

TEXTUREx != TEXTURES

The whole point of TEXTURES is that you don't have to bother with PNAMES.

Hey, try this:
1. Open command line window in relevant directory
2. Type
Code: Select allExpand view
dir /b *.png > textures.txt

3. Open textures.txt in a regexp-capable text editor
4. Use the following search & replace command:
Code: Select allExpand view
Search:
\([A-Za-z0-9]+\).png
Replace:
Texture \1, width, height\n{\tXScale 1.0\n\tYScale 1.0\n\tPatch \1, 0, 0 {}\n}


Now the only thing you have to do manually is replace each texture's width and height entry by the actual values. (If they all have the same size, or if most of them do, you can do that directly in the replacement expression.)
Gez
 
 
 
Joined: 06 Jul 2007

Re: TEXTURES lump utility

Postby Daniel » Tue May 26, 2009 3:42 pm

Hi,

Sorry, but TEXTURE# won't do the desired customization; it must be TEXTURES instead.

@Gez: nice trick, I'll try that. Before I have to add about 4,000 PNGs with notepad... :3:
User avatar
Daniel
 
Joined: 04 Jul 2004

Re: TEXTURES lump utility

Postby Gez » Tue May 26, 2009 3:49 pm

4000? Ouch. At this point a dedicated tool is needed. (Unless, as said, they're all of the same size.)
Gez
 
 
 
Joined: 06 Jul 2007

Re: TEXTURES lump utility

Postby NiGHTMARE » Tue May 26, 2009 4:28 pm

Gez wrote:The whole point of TEXTURES is that you don't have to bother with PNAMES.


Not quite the whole point; there are plenty of other things TEXTURES can do which TEXTURE1 can't.
NiGHTMARE
.now.
 
Joined: 19 Jul 2003

Re: TEXTURES lump utility

Postby Enjay » Wed May 27, 2009 1:03 pm

And, on most occasions for most textures, if all you want to do is avoid PNAMES, the TX system would work and that doesn't require a control lump at all.

Back to Nash's point, I too remember talk of someone making a "dir to TEXTURES" tool and I too would have suggested SP or BHS as likely authors.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: TEXTURES lump utility

Postby carlcyber » Wed May 27, 2009 6:38 pm

carlcyber
 
Joined: 27 Jan 2005

Re: TEXTURES lump utility

Postby Enjay » Thu May 28, 2009 11:21 am

Ah, thank you. SoulPriestess it was then.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland


Return to Editing (Archive)

Who is online

Users browsing this forum: xrom and 2 guests