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

CLEANUP Label Never Reached #22

Open
nsmryan opened this issue Apr 26, 2022 · 4 comments
Open

CLEANUP Label Never Reached #22

nsmryan opened this issue Apr 26, 2022 · 4 comments

Comments

@nsmryan
Copy link
Contributor

nsmryan commented Apr 26, 2022

The wfc__create_allowed_tiles function has a CLEANUP section that is not reachable. There is a return before this label, and no goto to jump to it.
Is there are missing check that should jump to this label, such as on the return of malloc?

wfc/wfc.h

Line 899 in 38b08ab

CLEANUP:

@krychu
Copy link
Owner

krychu commented Nov 9, 2022

good catch yes 👍 I'll prep a PR. Thanks for reporting.

How's your game going? Are you using wfc with any success? :)

@nsmryan
Copy link
Contributor Author

nsmryan commented Nov 10, 2022

I am using it with good success! I still plan to do more with this at some point but I am using this library to generate levels for my roguelike, and they are generally pretty good. I think the main thing is really just playing with the seed, while the wfc library itself does a great job.

I don't know if I mentioned this, but I also wrapped wfc as a TCL extension to play with seed interactively in TCL.
https://github.com/nsmryan/tclwfc

@krychu
Copy link
Owner

krychu commented Nov 12, 2022

oh nice! great to hear it's useful.

Nice about TCL bindings, I can link to that in the docs when I update them next time.

I'm currently testing various custom rand() implementations. High chance one is going to end up in wfc. Generally this means another boost in performance, but also cross platform stability.

Quick question: do you use max_collapse_cnt in wfc_run? I think it might not be an useful argument.

@nsmryan
Copy link
Contributor Author

nsmryan commented Nov 13, 2022

I have never tried using that option.
I'm glad to hear about a speed boost- always welcome even though its been fast enough for me so far.

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

No branches or pull requests

2 participants