Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On tmx_img_load_func, add a void *data argument which allows the user… #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

insaane00
Copy link

… 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.

… 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. Such example would be an SDL_Renderer pointer defined inside a scope.
@baylej
Copy link
Owner

baylej commented Jan 12, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants