Spectere / Wadinator

A command line tool that allows users to pick a random WAD from a directory or run an analysis on a single WAD.
MIT License
13 stars 2 forks source link

Map markers with trailing junk are not detected #4

Closed Spectere closed 1 year ago

Spectere commented 1 year ago

Example WAD: DZone2-150/DOOM2/K12.WAD Issue: MAP01 is not detected.

I'm not sure if WadReader isn't respecting the null terminator or if Doom simply allows map markers to have extra junk characters after the MAPxx or ExMy filenames (probably the former). Either way, it's not picking up MAP01 in this WAD. 🙃

Spectere commented 1 year ago

After looking at K12.WAD in a hex editor, it turns out the name of the MAP01 lump is actually "MAP01 L" (4D 41 50 30 31 20 4C 00).

Now that I think about it, Doom doesn't really care what comes after ExMy or MAPxx—it only matches those characters. This will probably cause issues with ZDoom-based ports, though, but that can be addressed in #6.