Using `mulf32()` while compiling functions to Thumb makes the compiler
add calls to `__aeabi_lmul()` once per multiplication. This routine is
quite slow, so the cost of any function that uses `mulf32()` a lot is
quite high.
Switching math-heavy functions to ARM increases performance and reduces
code size.
The previous code relied too much on assertions, even for things that
are just regular things that may happen while the application is running
(like running out of memory).
- Many assertions have been turned into permanent checks
- Some functions now return "success" or "failure".
- NE_Init3D() and NE_InitDual3D() (and others) have been reworked to
handle failures gracefully.
It was only used in sinLerp and cosLerp because in the very early days
of the library libnds didn't have the functions and the arrays SIN_LUT
and COS_LUT were used directly. When libnds was updated and it stopped
exposing the arrays Nitro Engine had to adapt. The masking wasn't needed
back then either, it was a mistake, but I forgot to remove it then.
In the case of the noise screen effect, it was just being misused.
With a bit of help of `indent -linux`, but mostly by hand. Also used
`iconv -f ISO-8859-1 -t UTF-8//TRANSLIT` to convert to UTF-8.
There is still some refactoring left to do.