Commit Graph

116 Commits (nativescript-1.1)

Author SHA1 Message Date
lupoDharkael 04637d8697 Vector3: add missing methods 2018-10-18 18:32:38 +02:00
xfx e909f800d0 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]
2018-10-06 07:33:05 +08:00
Thomas Herzog f7fafbbba4
Merge pull request #170 from mundusnine/patch-1
Adds needed include <typeinfo>
2018-08-15 08:58:03 +02:00
mundusnine d7236d3504
Adds needed include <typeinfo>
Solves this issue #168 due to not having the include of typeinfo
2018-08-14 16:00:46 -04:00
Bastiaan Olij 0a3fb023d5 Fixed GODOT_SUBCLASS macro 2018-07-30 21:44:24 +10:00
Bastiaan Olij 40a8b38149
Merge pull request #157 from BastiaanOlij/empty_gen
Change gitignore so we get our gen folders
2018-07-29 16:00:28 +10:00
Bastiaan Olij 4e74c6373b Change gitignore so we get our gen folders 2018-07-28 22:56:15 +10:00
Fabio Alessandrelli e37b186b57 Better warning/error macros 2018-07-26 15:45:14 +02:00
Fabio Alessandrelli ec2a9345bd 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
2018-07-26 15:45:14 +02:00
Bastiaan Olij 75036c5f05 Fixed up registering tool and updated godot_headers 2018-07-26 21:46:59 +10:00
karroffel 7044f45409 remove accidentally added files 2018-07-25 14:29:53 +02:00
karroffel 38da87fc0b use typeid() for type tags now 2018-07-25 14:11:40 +02:00
karroffel 982e77620c changed build system to be more self contained 2018-07-25 14:10:30 +02:00
karroffel d420613bd2 fix cast_to 2018-07-25 14:06:34 +02:00
karroffel dabc96ebd9 added type tags and safe object casting 2018-07-25 14:06:34 +02:00
karroffel 37abbe0c09 fix free() crash with custom resources 2018-07-25 14:06:34 +02:00
karroffel cff59a572e fix exporting of non-object types 2018-07-25 14:06:34 +02:00
karroffel a4a9a16001 new and free change, custom free will crash engine, be wary 2018-07-25 14:06:34 +02:00
karroffel e9517a7b3b 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.
2018-07-25 14:06:08 +02:00
Marcelo Fernandez baddc2ae66 Fix clang warning: 'const' type qualifier on return type has no effect 2018-06-23 12:15:53 -03:00
Timothy Werquin 1a32997a0f Fix const for += operator in string 2018-05-15 22:24:53 +02:00
Timothy Werquin 1803ca43fa Fix String const operators.
Added const to various operators.
2018-05-15 22:23:03 +02:00
Nickolai Korshunov ef37d8d76e Merge branch 'master' of https://github.com/GodotNativeTools/godot-cpp 2018-04-25 11:40:49 +03:00
Gary Oberbrunner a6689b2132 Make all Pool*Array::operator[] as const
This is needed since that operator returns a local copy, not
an lvalue. Attempting to write to the return value of these operators
wouldn't change the array element. PoolVectors need locking when
writing, so this operator can't return a writable reference.

To update a Pool*Array, use the `set()` method which locks and unlocks
the array. For multiple writes, use the `write()` method which returns
a locked writable view, and unlocks when it goes out of scope.
2018-03-13 11:00:25 -04:00
danielytics e74b8f593e adds variadic printing function, makes String.format custom placeholder work 2018-03-07 12:21:33 +00:00
danielytics 01db553c49 adds Array::make and Dictionary::make static methods and has variadic template functions use those 2018-03-07 10:27:34 +00:00
danielytics c7b03c4132 make register_signal and auto-generated variadic funcitons use variadic templates to streamline their use 2018-03-06 21:36:20 +00:00
karroffel 2343a8a54c fix #101 2018-03-02 19:04:57 +01:00
Nickolai Korshunov a049a34f28 fixed forward decl 2018-02-24 11:13:22 +03:00
Nickolai Korshunov f1c35f24f6 NULL -> nullptr 2018-02-23 16:08:36 +03:00
Nickolai Korshunov e123650d76 Strict enums 2018-02-23 15:50:41 +03:00
Nickolai Korshunov 73a67b16b1 fixed some includes. replace cycle include with forward declaration 2018-02-23 14:56:36 +03:00
Nickolai Korshunov 7adae4673c fixed forward declarations 2018-02-23 14:39:35 +03:00
lupoDharkael 756510563b Add const qualifier to PoolArray's size() 2018-02-12 22:38:25 +01:00
Thomas Herzog d7d814f861
Merge pull request #88 from Zylann/fix_ref_return_leak
Fix Ref leak when using Godot getters
2018-01-26 10:36:58 +01:00
Marc Gilleron ac0679eb1a Fix Ref leak when using Godot getters 2018-01-25 20:55:56 +01:00
Marc Gilleron 8a89a447b2 Fix RID::is_valid() 2018-01-25 01:10:55 +01:00
Marc Gilleron 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
Marc Gilleron 3197c3dce3 Rewrite Ref<T> to behave like Godot again 2018-01-22 22:27:10 +01:00
Marc Gilleron 06c61b6535 Added RID::is_valid() and comparison operators
- is_valid() is worked around by comparing a default RID()
2018-01-20 19:37:23 +01:00
karroffel 8c053fc35f allow const getter functions 2018-01-19 11:49:28 +01:00
karroffel 2e4de7b67d Don't leak memory from Ref<>() 2018-01-19 11:40:50 +01:00
Marc Gilleron 07a36732f1 Added copy constructors to PoolArray Read and Write 2018-01-18 22:49:13 +01:00
Marc Gilleron 835233fb71 Added missing copy constructors and assign operators to PoolVectors 2018-01-17 23:58:28 +01:00
Thomas Herzog 02b9b2592a
Merge pull request #67 from Zylann/rename_aabb_position
Renamed AABB::pos --> AABB::position
2018-01-17 08:46:19 +01:00
Thomas Herzog 4eea068b1b
Merge pull request #68 from Zylann/ref_instance
Added Ref<T>::instance()
2018-01-17 08:44:24 +01:00
Thomas Herzog dc2896dc89
Merge pull request #70 from Zylann/fix_register_signal
Fix potential malloc(0)
2018-01-17 08:43:14 +01:00
Marc Gilleron e7202cef8b Fix potential malloc(0) 2018-01-17 02:00:55 +01:00
Marc Gilleron 00f089d7ed Added copy constructors and assignment operators to Array and Dictionary 2018-01-17 01:57:01 +01:00
Marc Gilleron 74e3b4ae23 Added Ref<T>::instance() 2018-01-17 01:54:02 +01:00