0.7.Here's the switches you type at the command line:
CLI switches!! Yahoo!! I said I'd do it, and it's done. Uses Getopt.c, which I think is okay to use. New syntax:
uninform -switches [input file] [output file]
Example:
uninform -aoj -Izinfoobj -Dzorkatts.txt zork1.z3 zork1.inf
or, if you're using the batch file:
deinform zork1.z3 zork1.inf -aoj -Izinfoobj -Dzorkatts.txt
If you just enter the filenames with no switches before them, Disinformation will not have a problem with this.
Here's the switches (none of which are set by default, except for indenting, which is normally set to 1) are:
- d - print all numeric values in decimal (not global variables, they're hex by default as for now)(now defaults to hex)
- b - print the hex bytes of an instruction before every instruction.
- i - (small i, not capital I) - with a number after it (ie, i5), is the number of spaces to indent before opening '{' brackets, etc. 0 specifies no indenting.
- D - followed by a filename, is the name of the definitions file. DIM defaults to 'zorkatts.txt'
- I - followed by a filename, is the name of the INFODUMP output. DIM defaults to 'zinfoobj'
- l - DIM prints a 'low' number (ie, 2-digit hex) as an object every time.
- h - DIM prints 'high' number (ie, 4-digit hex) as an object every time.
- j - print every jump command, and label every address that corresponds to a jump (handy for finding out where a routine breaks out of a loop... without this switch set, the program defaults to only printing a jump that jumps to a Z-code address earlier than the address of the jump commmand).
- a - print Z-code address before every instruction in output file.
- o - overwrite existing file
- p - patch gamefile. With this switch, arguments change to this:
uninform -p [file to 'patch'] [name of new patched file] [6-digit hex address, ie: 00000c, 00001d or 011293, must be padded to 6 letters with '0's or we get a CRASH] [2-digit hex bytes to patch at address, ie: 1b b1 ff 1b]
Example:
uninform -p zork1.z3 zork1a.z3 010645 b1
A new file is then created (no checking is made to see if it already exists, so be careful about overwriting existing files) which is the patched file. The original file is not touched (this isn't for safety reasons or anything... I just don't know how to change bytes in an existing file, so it just copies the entire file changing bytes when it needs to!!) If you're worried about the checksum being incorrect (which it will be), for now you'll have to 'check