This allows you to use one single texture for multiple images, and to
specify the coordinates that a sprite needs to use so that you don't need
to keep track of them.
This was a hack that was added to make up for an incorrect 2D projection
setup. It sometimes compensated the distortion caused by that
projection in order to display the 2D sprites correctly.
Commit 193a50c939 ("library: Fix 2D projection") fixed it, so this
patch removes the hack.
The current factor of 12 is too big, and it causes significant Y axis
distortion in the 2D projection. It has been lowered to 2.
Check the comment in the code for more information.
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.
This helps the compiler issue warning if there is some logical error in
the code, and it helps the developer realize if some assumption with
the code is wrong.
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.