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

game_restart() throws an error #50

Closed
JujuAdams opened this issue Apr 15, 2020 · 0 comments
Closed

game_restart() throws an error #50

JujuAdams opened this issue Apr 15, 2020 · 0 comments
Labels
bug 😅 Juju did a bad thing

Comments

@JujuAdams
Copy link
Owner

Scribble actively prevents the user from reinitialising the library as this causes a ton of issues. This causes issues when someone wants to use game_restart(), however.

...not sure why people are using game_restart() but here we are.

SCRIBBLE_WARNING_REINITIALIZE should be added as a macro to control whether a warning is shown when trying to reinitialize Scribble. Additionally, scribble_init() should return whether the library was initialized successfully. This allows the following design pattern:

if (scribble_init(...))
{
    //Initialized for the first time, define things that we need
    scribble_add_spritefont(...);
    scribble_add_font(...);
    scribble_add_color(...);
    scribble_autotype_add_event(...);
}
@JujuAdams JujuAdams added the bug 😅 Juju did a bad thing label Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 😅 Juju did a bad thing
Projects
None yet
Development

No branches or pull requests

1 participant