-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Support for Doom WAD Files #686
Comments
Hey! sure i'm willing to add any format that is used publicly. Want to work on adding support? as it seems to be a quite basic archive format i'm guessing it shouldn't be that much work. |
Definitely! I can't say I'm familiar with the internals of |
Nice! hopefully you should not need to know much about most internals, the decode API used by a format decoders don't know much a the rest of fq on puropse. Maybe a good start is to look at some existing format decode that is similar, maybe ar, tar or zip? also i'm happy to help out, you can for example open a PR with a early draft and then we work from that. |
Here's a very rudimentary decoder you can use in def num_le: tobytes|explode|reverse|map(. band 0xff)|tobytes|tonumber;
tobytes as $file | {}
| .type = $file[:4]
| .n_lumps = ($file[4:8]|num_le)
| .offset = ($file[8:12]|num_le)
| ($file[.offset:]) as $lumpdir
| .lumps = [
range(.n_lumps)
| ($lumpdir[16* . :16*( . +1)]) as $rec | {}
| .offset = ($rec[:4]|num_le)
|.size = ($rec[4:8]|num_le)
|.name = ($rec[8:16]|gsub("\u0000";""))
|.data = $file[.offset:.offset+.size]
]
|
Nice! tip is to put the code into a file btw is this for an older version of fq? the |
Can
fq
run Doom?I have a small pet project based around exporting data from Doom WADs and would love to add the functionality to
fq
here. Unsure if it's within the scope of the project, but Doom WADs have been around for almost 30 years at this point, so I figured why not ask? It's not a terribly complex format.The text was updated successfully, but these errors were encountered: