-
-
Notifications
You must be signed in to change notification settings - Fork 492
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
simplesquirrel
library for creating Squirrel API binds (#2792)
Incorporates a SuperTux fork of the `simplesquirrel` library. Most important feature of this library in the context of SuperTux is the ability to easily expose functions, classes (which can include properties) and other entries to Squirrel in one or a few lines. Every exposed class, variable and function has been migrated to incorporate this change. As a result, the `scripting/` directory, which included all scripting functions, classes and variables, as well as the API wrapper, has been removed, since it is no longer needed for the new binds. Some scripting functions have been deprecated (currently only via a tag in comment, later to be migrated to docmentation) for several reasons: * Some `get_` and `set_` functions have been deprecated, since a class property has been added and should replace their usage. * Functions with the names `get_pos_x` or `get_pos_y` have been replaced with `get_x` and `get_y` for consistency, thus are now deprecated. This way of creating Squirrel binds would allow for way more flexibility in exposing functions, classes and properties. **Additionally:** * Removed the `camera()` function, as it only printed the camera position, which is already accessible through methods from the `Camera` itself. * `Granito` and `GranitoBig` are now scriptable. ## Documentation Doxygen scripting documentation is now generated for the entire codebase as well, since scripting classes might be found anywhere. The `@scripting` tag for classes, functions, constants and variables indicates the item should be added to the scripting documentation. Otherwise, it should be ignored. Added support for the following: * Enumerators * Member variables * Listing of base and derived classes # TODO - [x] Expand usage of simplesquirrel functions, instead of ones in `SquirrelVM`, to reduce code duplication. - [x] Update the scripting API documentation/reference generator to incorporate all changes. Closes #2736. Co-authored-by: Tobias Markus <[email protected]> Co-authored-by: MatusGuy <[email protected]>
- Loading branch information
1 parent
c62ffdd
commit 19e2884
Showing
227 changed files
with
8,132 additions
and
29,357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule simplesquirrel
added at
e7eab2
Submodule squirrel
deleted from
b31e5b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
if(EMSCRIPTEN) | ||
set(SQ_DISABLE_INSTALLER ON) | ||
endif() | ||
|
||
add_subdirectory("${CMAKE_SOURCE_DIR}/external/simplesquirrel/") | ||
|
||
if(MSVC) | ||
add_library(LibSimpleSquirrel ALIAS simplesquirrel_static) | ||
else() | ||
add_library(LibSimpleSquirrel ALIAS simplesquirrel) | ||
endif() | ||
|
||
# Set variables | ||
set(SQUIRREL_PREFIX ${CMAKE_BINARY_DIR}/external/simplesquirrel/libs/squirrel) |
Oops, something went wrong.