-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
Squirrel: Default argument support for exposed C++ functions #3025
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested Level.spawn() with all transitions and everything works as expected.
I did not test the camera stuff.
This PR updates `simplesquirrel` to a branch which supports exposing C++ functions (including class constructors) wtih default arguments. It's not yet been merged into simplesquirrel `master`, because the Squirrel branch used is also not `master`, so an important change to Squirrel parameter checking is included to allow for default argument support. Only the `Camera::scale()` and `scripting::Level::spawn()` functions were modified to support default arguments and their respective other functions were marked as deprecated. In case more functions are found suitable for this, this PR would be updated.
4eb76e8
to
d9a8849
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As Patrick Star once said, "It can't be that bad. Looks good to me."
This PR updates the simplesquirrel submodule to a branch which supports exposing C++ functions (including class constructors) wtih default arguments. It's not yet been merged into simplesquirrel
master
, because the Squirrel submodule commit branch used is also notmaster
to allow for an important change to Squirrel parameter checking to be included.Only the
Camera::scale()
andscripting::Level::spawn()
functions were modified to support default arguments and their respective other functions were marked as deprecated. In case more functions are found suitable for this, this PR would be updated.