Commit Graph

20 Commits

Author SHA1 Message Date
cba90d6301 Update clang-format to version 11
This is taken from the Godot repository, so formatting is similar. This
updates the style rules as well.

Also fix style in files to conform with this version.
2021-02-28 16:57:34 -03:00
fb71edd45b Fix container and string leaks
Some functions return a new instance of such containers,
but instead we made a copy of them, without taking ownership of the
original created by the function.
Now we use a specific constructor taking ownership on the godot_* struct.
2021-01-07 01:05:12 +00:00
0939d0f6d1 Fixed memory leak with String objects
The member _godot_string should never be straight out overwritten ever without
first destroying the underlying string object's memory. This change solves the
problem through the introduction of a new private constructor to create String
objects with a pre-existing godot_string handle.
2020-08-15 09:46:23 +02:00
b895d3c326 Add missing class methods 2019-08-05 00:23:42 +02:00
fc20fa3fce Implementing clang-format and applying it to all classes 2018-11-24 09:09:41 +11:00
39445f144c Add missing String::(r)find(n) form argument
Add missing String::(*)casecmp_to functions
2018-11-18 14:37:06 +02:00
200bf226bf Nativescript 1.1
implemented instance binding data usage

This commit changes the way C++ wrapper classes work.
Previously, wrapper classes were merely wrapper *interfaces*.
They used the `this` pointer to store the actual foreign Godot
Object.

With the NativeScript 1.1 extension it is now possible to have
low-overhead language binding data attached to Objects.

The C++ bindings use that feature to implement *proper* wrappers
and enable regular C++ inheritance usage that way.

Some things might still be buggy and untested, but the C++
SimpleDemo works with those changes.

new and free change, custom free will crash engine, be wary

fix exporting of non-object types

fix free() crash with custom resources

added type tags and safe object casting

fix global type registration order

fix cast_to

changed build system to be more self contained

updated .gitignore

use typeid() for type tags now

fix indentation in bindings generator

remove accidentally added files

fix gitignore

Fixed up registering tool and updated godot_headers

Fix crash when calling String::split/split_floats

Was casting to the wrong object type.
Also adds parse_ints function to String with the same logic

Better warning/error macros

Change gitignore so we get our gen folders

New documentation based on nativescript 1.1

Fixed GODOT_SUBCLASS macro

Preventing crash when function returned null ptr

Adds needed include <typeinfo>

 Solves this issue #168 due to not having the include of typeinfo

Fix compile error of 'WARN_PRINT' and 'ERR_PRINT'.

cannot pass non-trivial object of type 'godot::String' to variadic function; expected type from format string was 'char *' [-Wnon-pod-varargs]

update vector3::distance_to

Remove godot_api.json as its now in the godot_headers submodule (api.json)
2018-11-07 21:23:08 +11:00
1a32997a0f Fix const for += operator in string 2018-05-15 22:24:53 +02:00
1803ca43fa Fix String const operators.
Added const to various operators.
2018-05-15 22:23:03 +02:00
e74b8f593e adds variadic printing function, makes String.format custom placeholder work 2018-03-07 12:21:33 +00:00
4f4bb8deff String and math fixes
- Added missing static String constructors
- Implemented String operator for math types
- Added XYZ and YXZ euler angles methods
- Fixed wrong det checks in Basis
- Fixed operator Quat in Basis
2018-01-23 00:24:23 +01:00
5dac1b5887 caller-defined entry methods and string API update 2018-01-11 17:58:06 +01:00
d8faa4ec76 Added alloc_c_string 2017-11-25 10:22:36 +11:00
0f773c2d72 Update bindings to use new Api extensions and rename Rect3->AABB 2017-11-23 22:50:05 +11:00
3ddd85d9a2 Fixes #41 2017-10-03 20:40:36 +05:30
4adf3db60b String bindings updated (at most) 2017-10-03 16:27:33 +05:30
10bb24cfbc updated bindings 2017-10-03 16:07:34 +05:30
c27af379b8 updated to use the new NativeScript and GDNative interface 2017-07-24 17:08:52 +02:00
4769f49cb4 Use static linking instead of dynamic linking 2017-07-23 17:53:50 +02:00
cf30b0f39d rewrote binding generator in python 2017-05-12 21:53:07 +02:00