* Update meson.build
- add logic to loop over more lua names (in the future more names might be discovered)
- disable warnings and errors on dependencies
* adding missing includes and checks, correct data types, pointer mess […]
- various functions from string.h were used but never defined
- logic was done across multiple different data types with different signedness, got all of them up to snuff
- give 0 sized array size of 1 (array of size 0 is illegal, but rewriting the code is out of the scope of this commit)
- add preprocessor that marks possibly unused argument as such (does not mean they will get optimized out or anything)
- correctly initialize structs with all data needed
All these were found by generating the project using `meson -Dwarning_level=3 -Dwerror=true`
* remove undefined behavior, correct data types
* Comment manual bit manipulation to be investigated
* check for more edge cases, replace multiple cleanups with goto
* remove system specific includes
For the option when we use the SDL_Renderer we change:
- the order of calls to SDL_DestroyTexture/Renderer.
Reported by valgrind on linux as an error to destroy the
renderer before the texture.
- the SDL_Renderer and texture are created when the surface is
initialized before the window is shown
It seems that creating the SDL_Renderer and Texture between the
moment the window was shown and the renderer present was introducing
a flashing blank window because of the time taken to create the
renderer/texture resources.