I've gotten to an important milestone I think

I've attached a zip file with 210 decompiled script files from SQ5. I renamed the extensions to .txt (instead of .sc) just to make it easier to browse them in Windows.
A few notes:
- I've made no attempt at compiling these files (in fact the code that generates SCI1.1 script resources (with the separate heap/scr) is still not implemented). So you may see stuff that certainly looks like it won't compile. An example is having strings in a script's local vars. SCIStudio doesn't allow this, but it's required for decompiling scripts, really. So I'll need to add this syntax support.
- Almost all the variable naming (and all the file naming) was done automatically, with no interaction from me. So it is pretty much just "click and go" to get the results you see. Of course, you'll see that exported procedures have nonsense names, so there will need to be some interaction from the user to supply names to these functions based on what it looks like they do (and then the next recompile will pick up those changes).
- I did a quick search for ERROR in these files, and I found a handful of places where this appears. This is indicative of some problem with resolving symbols, so I need to look at those cases
- There are still lots of issues with detecting the higher level control flow structures, and making sense out of some code. So I often have to fall back to asm. So you'll see some asm in there, but not *too* much. I put in some stats calculations, and the result of decompiling the entire game (which took 9 minutes) was:
Decompiled 3079 of 3121 functions successfully (98%).
Overall bytecount success rate: 96%.
So that's really not too bad, I can "successfully" decompile roughly 95% of the code. I say "successfully", because the only validation I can do now is when my decompiler logic runs into things it doesn't know how to handle. In the 95% "successful" code, there still may be a lot of it that is incorrect. So there's still lots of work to do.
- There are a few turds leftover from previous compilation attempts (for example you'll see n000.txt, which was an old version of main.txt (before I wrote the code to auto-detect script filenames), and it's full of asm). I'm too lazy to re-upload the zip.
- I still have bugs in the formatting of the code output, so parentheses may be in weird places.