[util] WAD Mangle

Projects that have specifically been abandoned or considered "dead" get moved here, so people will quit bumping them. If your project has wound up here and it should not be, contact a moderator to have it moved back to the land of the living.
User avatar
HobbsTiger1
Posts: 1235
Joined: Fri Jan 07, 2005 7:29 pm
Location: #DMClub

Post by HobbsTiger1 »

cutmanmike wrote:
Hirogen2 wrote:What do we need another "xwe" for? (Tech details on the original problem, please)
Because our current one sucks? keke tsunami
:yup: Using XWE is like climbing a rock wall with bricks strapped to your hands and feet. It can be done, but it takes lots of skil, and trial and error.
noddybox
Posts: 15
Joined: Tue Jun 14, 2005 4:50 pm
Location: Manchester, UK

Post by noddybox »

Costja wrote:
noddybox wrote: I did wonder about that, but can't really envisage a neat way you can pass the lump data to the external program -- I suppose you could have a temporary binary file with the lump in it, but if that's the only thing that the external program understands I can't really see the advantage of doing it that way rather than just using a plugin.
Because not everybody can write plugin.
But I think I can write it so if your program as good as XWE (or better) I'll use it.
Ah, I think I see what you mean -- that plugins are required to be written in C# (or VB.NET). I could see a case for an 'external' tool plugin then.

I'm sure it'll get written sometime soon them probably. I don't get out much. :)
Russell
Posts: 9
Joined: Sat Jun 19, 2004 10:27 pm

Post by Russell »

You could do it the old fashioned way:

1) write the contents of the lump to a file
2) shellexecute the external program to process the file in the background
3) import the processed file.
noddybox
Posts: 15
Joined: Tue Jun 14, 2005 4:50 pm
Location: Manchester, UK

Post by noddybox »

Russell wrote:You could do it the old fashioned way:

1) write the contents of the lump to a file
2) shellexecute the external program to process the file in the background
3) import the processed file.
Yes, that's the lines I was thinking of; basically wrapping the above in a plugin, so that a right click and edit on the lump works just the same as everything else.

Trying to work out how the tools would be configured though. And obviously I'd like to be able to configure as many tools as possible through the same plugin, but popping up a dialog to select one each time may get a bit tiresome. Perhaps some method of allowing plugins to specify a custom sub-menu.

Sure something will come to me tomorrow when I'm more awake.
Costja
Posts: 188
Joined: Mon Oct 18, 2004 3:58 pm
Location: Russia, Moscow

Post by Costja »

Or determine lump type and open it in a corresponding application
noddybox
Posts: 15
Joined: Tue Jun 14, 2005 4:50 pm
Location: Manchester, UK

Post by noddybox »

Costja wrote:Or determine lump type and open it in a corresponding application
That could be trickier -- at the minute it doesn't do anything to determine lump type except look at the name. A plugin provides a regular expression and it's only considered for the editing, viewing or exporting of the lump if the name matches. For instance the graphical viewer will happily try opening any old lump and simply complain if it looks like gibberish. I just prefer doing it that way as the core of WAD Mangle doesn't (and shouldn't) really have a clue what it is editing.

Also then you run into problems like resolving who gets a graphical lump? The 'normal' plugin or the newly defined external one?

The idea I was currenly mulling over would be to have an external tool plugin that provides a sub-menu of configured tools (and a config option obviously) and simply let you launch one for the currently selected lump. That way it's infinitely extendable.
Costja
Posts: 188
Joined: Mon Oct 18, 2004 3:58 pm
Location: Russia, Moscow

Post by Costja »

A regular expression is not enough. Not every lump type can be determined by checking a lump name, for example sprite/texture/flat lumps and map markers.
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

cutmanmike wrote:
Hirogen2 wrote:What do we need another "xwe" for? (Tech details on the original problem, please)
Because our current one sucks? keke tsunami
Our survey says:

X

Sorry, Cutman family, you have no lives left, the Taggart family have a chance to steal.

:P
noddybox
Posts: 15
Joined: Tue Jun 14, 2005 4:50 pm
Location: Manchester, UK

Post by noddybox »

Costja wrote:A regular expression is not enough. Not every lump type can be determined by checking a lump name, for example sprite/texture/flat lumps and map markers.
Yes, I agree it's not enough to identify it safely, but it was just a design decision I made early on. I didn't want the plugins being asked to try processing a large lump of data just to set the menu states.

I'd rather have it gives a vague idea of lumps it handles (most of the plugins just set a RE of '.' and will have a stab at anything), and simply error when you try viewing it or whatever to remove an expensive operation being needlessly carried out too often (like iterating over a large number of bytes just to see if it's all in ASCII).
Costja
Posts: 188
Joined: Mon Oct 18, 2004 3:58 pm
Location: Russia, Moscow

Post by Costja »

Most (if not all) lump types can be determined using directory information, so main application can determine it and pass it to plug-ins. To determine "complex" type needed info only about next lumps (map), namespace (sprites, flats etc.) and first bytes (png).
Correct me if i'm wrong.
noddybox
Posts: 15
Joined: Tue Jun 14, 2005 4:50 pm
Location: Manchester, UK

Post by noddybox »

Costja wrote:Most (if not all) lump types can be determined using directory information, so main application can determine it and pass it to plug-ins. To determine "complex" type needed info only about next lumps (map), namespace (sprites, flats etc.) and first bytes (png).
Correct me if i'm wrong.
I could be just as wrong (won't be the first time), but I'd have thought just using the directory information is not enough as all it holds is the name and length of the lump; discounting the name, lengths certainly wouldn't give you all the info.

For instance is that 4096 bytes a flat, a short sample, a very verbose ASCII lump or even just some random nonsense someone has stuck in a WAD?

I just think that getting the plugin to see if the data makes any sense before editing or viewing it is the best solution for me.

Using the namespace you could make more informed decisions, but that means putting intelligence in the editor. All the editor knows is that it's manipulating a bunch of named binary objects collected into a WAD file -- all the intelligence is in the plugins.

But, as with all areas of programming, I'll say tomato and someone else will say tomato... Which doesn't quite come out right typing it. :)
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Post by Cutmanmike »

HobbsTiger1 wrote:
cutmanmike wrote:
Hirogen2 wrote:What do we need another "xwe" for? (Tech details on the original problem, please)
Because our current one sucks? keke tsunami
:yup: Using XWE is like climbing a rock wall with bricks strapped to your hands and feet. It can be done, but it takes lots of skil, and trial and error.
You forgot it takes patience and stupidity too.
TheDarkArchon wrote:
cutmanmike wrote:
Hirogen2 wrote:What do we need another "xwe" for? (Tech details on the original problem, please)
Because our current one sucks? keke tsunami
Our survey says:

X

Sorry, Cutman family, you have no lives left, the Taggart family have a chance to steal.

:P
JEDI SLIME!!!
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany

Post by Hirogen2 »

cutmanmike wrote:Because our current one sucks? keke tsunami
What please sucks in XWE? And if, you can contact Csabo.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Post by Cutmanmike »

The program. And i'd rather not go complain to him/her. Instead i'll use the better alternative.

Return to “Abandoned/Dead Projects”