Jon Posted August 30, 2017 For those ports which supports levels outside of the vanilla sequence: do they attempt to recognise map markers in WAD files by some kind of pattern (E*M* or MAP**) at all? I'm guessing no, I expect they rely on MAPINFO or BEHAVIOR lumps or something similar. But I just wanted to check. The reason I am asking is I am writing a tool which needs to recognise and collate lumps relating to maps, and I'm wondering whether to look for a set of fixed lump names (MAP12 etc) or attempt some kind of pattern, and if a pattern, what the limits of it should be (E10M1? etc.) 0 Share this post Link to post
Voros Posted August 30, 2017 I'm certain ports like ZDoom rely on something like MAPINFO to look for maps, but if that lump isn't present, then it probably resorts to looking for ExMx/MAPxx lumps.DeuTex mainly recognises ExMy/ExMyz, where x y z are values between 1-9, so highest is probably E9M99. Same for MAPxy, which technically means it can read upto MAP99. Any other digits are ignored (eg MAP456 is recognised as MAP45). Just saying. 1 Share this post Link to post
fraggle Posted August 30, 2017 The level lumps are in a fixed layout, so maybe just look for lumps named THINGS and then look at the previous lump in the list. 0 Share this post Link to post
Jon Posted August 30, 2017 (edited) 1 hour ago, fraggle said: The level lumps are in a fixed layout, so maybe just look for lumps named THINGS and then look at the previous lump in the list. This is a good suggestion, thanks! Does THINGS always follow the label? I see that Hexen's extensions (BEHAVIOR) are at the end of the list, good. But what about port specific lumps? I noticed deutex doesn't handle GL nodes, FWIW. 0 Share this post Link to post
fraggle Posted August 30, 2017 2 hours ago, Jon said: This is a good suggestion, thanks! Does THINGS always follow the label? Compare with this code. It's actually done based on ordering and the lump names don't even matter. But in practice you can rely on any real WADs having the right lump names. 0 Share this post Link to post
Voros Posted August 30, 2017 (edited) I noticed deutex doesn't handle GL nodes It does unless you're referring to something else. 0 Share this post Link to post
Graf Zahl Posted August 31, 2017 ZDoom checks the lump names to recognize a level. Not all are required for proper functioning so it only complains if one of the essential lumps is missing. It should be noted that a small number of 1994 levels contains bogus names for the map lumps and will be rejected as a result. 0 Share this post Link to post
Jon Posted August 31, 2017 11 hours ago, Voros said: It does unless you're referring to something else. Ah thanks, the copy of the source code I had lying around is older than that. 1 hour ago, Graf Zahl said: ZDoom checks the lump names to recognize a level. Not all are required for proper functioning so it only complains if one of the essential lumps is missing. Could I ask for a pointer to this source code, please? 0 Share this post Link to post
Graf Zahl Posted August 31, 2017 p_setup.cpp, P_OpenMapData and its subfunction GetMapIndex. 1 Share this post Link to post
Jon Posted September 1, 2017 Thanks that was helpful. I've got a few more lump names to consider now too (TEXTMAP, ENDMAP, ZNODES, DIALOGUE) that I wasn't yet aware of, too. Thanks again! 0 Share this post Link to post