cutmanmike wrote:Because our current one sucks? keke tsunamiHirogen2 wrote:What do we need another "xwe" for? (Tech details on the original problem, please)
[util] WAD Mangle
-
HobbsTiger1
- Posts: 1235
- Joined: Fri Jan 07, 2005 7:29 pm
- Location: #DMClub
-
noddybox
- Posts: 15
- Joined: Tue Jun 14, 2005 4:50 pm
- Location: Manchester, UK
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.Costja wrote:Because not everybody can write plugin.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.
But I think I can write it so if your program as good as XWE (or better) I'll use it.
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
-
noddybox
- Posts: 15
- Joined: Tue Jun 14, 2005 4:50 pm
- Location: Manchester, UK
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.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.
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
-
noddybox
- Posts: 15
- Joined: Tue Jun 14, 2005 4:50 pm
- Location: Manchester, UK
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.Costja wrote:Or determine lump type and open it in a corresponding application
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
-
TheDarkArchon
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
-
noddybox
- Posts: 15
- Joined: Tue Jun 14, 2005 4:50 pm
- Location: Manchester, UK
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.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.
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
-
noddybox
- Posts: 15
- Joined: Tue Jun 14, 2005 4:50 pm
- Location: Manchester, UK
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.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.
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.
-
Cutmanmike
- Posts: 11354
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
You forgot it takes patience and stupidity too.HobbsTiger1 wrote:cutmanmike wrote:Because our current one sucks? keke tsunamiHirogen2 wrote:What do we need another "xwe" for? (Tech details on the original problem, please)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.
JEDI SLIME!!!TheDarkArchon wrote:Our survey says:cutmanmike wrote:Because our current one sucks? keke tsunamiHirogen2 wrote:What do we need another "xwe" for? (Tech details on the original problem, please)
X
Sorry, Cutman family, you have no lives left, the Taggart family have a chance to steal.
-
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
-
Cutmanmike
- Posts: 11354
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom