tmx
tmx copied to clipboard
On tmx_img_load_func, add a void *data argument which allows the user…
… to point to any memory needed by their loader function which defeats the need of making more globals for them and allows for cleaner code.
Update documentation to reflect the changes. Add global pointer tmx_img_load_data which allows the user to supply any additional memory needed by their loader in a clean way like a struct making the lib more flexible. Such example would be an SDL_Renderer pointer defined inside a scope.
Sorry for not writing earlier... In the end, it still uses a global, it is just added in libTMX code instead of the user's code, I don't really see the added value here. Thanks for the time and effort.