changes so this cmake file can be used as a subdirectory
```
add_subdirectory(godot-cpp)
project(project-name)
add_library(project-name SHARED src/init.cpp)
target_link_libraries(project-name godot-cpp)
```
This change gets rid of the call-time method binding query, instead it queries
all method bindings up-front at initialization time so that no extra cost is
added at function call time.
In addition, also converted the "icall" code to a header-only library so one
level of unnecessary call-stack is eliminated.
Also changed binding generator to use real_t instead of double everywhere
(except at the GDNative interface where unfortunately using doubles is hard-coded
on the engine side).
All this comes at a minimal increase in binary size (for the library, as actual
native modules might not even increase in size in practice).
Per https://github.com/godotengine/godot/issues/14553:
Godot stores Basis in row-major layout for more change for efficiently
taking advantage of SIMD instructions, but in scripts Basis looks like and
is accessible in a column-major format.
This change modifies the C++ binding so that from the script's perspective
Basis does look like if it was column-major while retaining a row-major
in-memory representation. This is achieved using a set of helper template
classes which allow accessing individual columns whose components are
non-continues in memory as if it was a Vector3 type. This ensures script
interface compatibility without needing to transpose the Basis every time
it is passed over the script-engine boundary.
Also made most of the Vector2 and Vector3 class interfaces inlined in the
process for increased performance.
While unrelated (but didn't want to file a separate PR for it), this change
adds the necessary flags to have debug symbol information under MSVC.
Fixes#241.
- Fix automatic architecture detection
- Fix compiling with MinGW on Linux
- MinGW on Windows is still not working though
- Default to Clang on macOS
- Remove redundant `use_custom_api_file` option
- Format SConstruct using Flake8
This closes#245.
Git submodules are a little tricky to use, but are the default
way to go when adding a github project as a dependency in C++.
Add instructions on how to add godot-cpp as a dependency when
working from an existing repository.