Csabo
Moderator
Posts: 541
Registered: 02-02 |
It's definitely difficult to determine the 'used' status of a texture. I've started writing this routine, not done yet though. It's already available in the beta, click File|List unused textures. (As the name implies, so far it only lists them, they won't be removed. The output is hardcoded to c:\not_used.txt)
There are lots of lumps that have to be processed. Right now XWE processes all SIDEDEFS and MAPINFO lumps. For SIDEDEFS, the default switches and animations are taken into consideration! E.g if you use BFALL2, the BFALL1-BFALL4 sequence (including any texture's you've manually added into this animation) will be marked 'used'.
XWE still has to deal with these lumps in addition: ANIMDEFS, BEHAVIOR, TX_START/TX_END markers. Probably a few others as well. I will also have to add something to mark SKY1-SKY3 depending on which MAPS are present, since maps implicitly use them. (If you run the existing function on Doom2, it lists 4 unused switch pairs, plus all the SKY textures, since there's no explicit reference to those.)
Bottom line: if you don't do 'advanced stuff' (ACS scripts, port specific stuff etc.) you can already use this function, and carefully delete the textures listed by XWE. For advanced stuff, I'm still hoping it _is_ possible to detect which textures are actually used or not, even though difficult.
|