To protect the world from the soft float library...
To unite all arithmetic within our binary...
To denounce the evils of floating point precision...
To save more kilobytes - that's our vision....
(god this is cringe)
All floating point math has been eliminated, and replaced with
equivalent or near-equivalent fixed-point math.
sprite_data.cpp uses Q16, and get_rand_range uses a full Q32 to
ensure that the exact same results are generated as before, at
the cost of some inline assembly to do a umull (__aeabi_lmul is a
little excessive when the lower 32 bits are discarded)
This eliminates all of the expensive double precision float library,
saving a few kilobytes.
Additionally, the unneccessary parts of nanoprintf have been
disabled. There is no need for precision specifiers, long longs, or
floats.
This greatly decreases the ROM size, from 245 KB to 198 KB with no visual
changes (that I am aware of)
Changes:
- Enable compression on every graphic but the Pokemon sprites (which are
too large for the GBA to decompress).
- Change grit from emitting .s files to .c files so GCC can strip unused
palettes and maps
- Fix the empty tiles
- Trim down the font to skip 00-1F and 80-FF which were all zeroes
- needs a slight workaround because the Pokemon name display was printing
an invisible FF byte
- Switch memcpy to tonccpy which is vram safe
- Limit palette sizes.
Signed-off-by: easyaspi314 <6258309+easyaspi314@users.noreply.github.com>