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

Remove texture reutilisation when the texture loading failed. #88

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

tioui
Copy link

@tioui tioui commented Feb 26, 2024

There is an error in the game that makes it load an empty white texture when there is no cape to load and the game put it transparent. So everything is fine. But, sometimes, the cape is reloaded and since the false texture has been put in the game resources, it is considered valid and shown.

image

So in this pull request, I disable the resources reuse for texture that has failed to load.

@fgenesis
Copy link
Member

(Oh, hey, for some reason i only got the email with these commits now. Sorry.)

That's a lot of stuff going on there, of which i've fixed most in the experimental branch (i think).
But i need to go over this and check all you've done.
Very quick on top of my head:

  • the cape texture becoming a white square was fixed long ago but never made it into master so far
  • texture loading has changed completely and is multi-threaded now
  • i've reworked the cmakefile entirely
  • no more prebuilt SDL/AL in the repo
  • you're breaking msvc compat by linking in -lmingw32 unconditionally

I'd also prefer if you did future commits against experimental because i'll merge that into master once everything is good and ready. Also note that the currently active branch is tile-optimization but i'm not confident yet that it's stable enough to be merged into experimental.

@tioui
Copy link
Author

tioui commented Jun 10, 2024

Ok. Next time, I will pull request to experimental. You can pick whatever you want from this pull request (nothing if you do not think it is needed). My objective was to create a Workflow to generate a binary release. I tried to keep it simple. I will make a condition for the -lmingw32.

@fgenesis
Copy link
Member

Thanks! I don't usually check the build with mingw so good catch. It used to work way back but it's quite possible something broke over time.
Ideally what i'd like to have eventually is an alternative build process based on 'zig build', because that allows to build for any platform out of the box (no more cross-compiling woes!)

@tioui
Copy link
Author

tioui commented Jun 11, 2024

I develop on Linux. So using MSYS2 with mingw is more intuitive for me. Also, I tried with the latest Visual Studo and I had like 1000 compilation error. Since Github Workflow do not handle VisualStudio 2008 or 2010, MinGW was the best option I had.

I do not know Zig build. It looks interesting. I will certainly have a look at that.

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.

2 participants