Added a color ANSI escape version for Linux. This checks if stdout
is a tty and is a supported tty.
Based on some code from rom-properties' GcnFstPrint, which is based
on Google Test.
524155/524288 should round down to 99.9%, not round up to 100.0%.
Process the percentage as an integer after the division to make this
a bit easier.
build-gcc.sh: Link to -lm, which is required for trunc(), which is
used by floor() on Linux.
This program will detect if a hacked ROM is a simple binary hex-edit
of the source ROM. It does this by checking how many bytes are the
same between the two ROMs. If more than 50% of the common size is
the same, the ROM is assumed to be a binary edit.
The "common size" is the size of the smallest ROM. Padding bytes from
the source ROM are ignored, so it will likely be smaller than the
source ROM.
TODO:
- Fancy colorization on terminals on Windows and Linux.
- Unicode filenames on Windows.
- Round percentages down.