summaryrefslogtreecommitdiffstats
path: root/modules/gdnative
Commit message (Collapse)AuthorAgeFilesLines
* Rename File::get_len() get_length()Marcel Admiraal2021-05-252-2/+2
|
* Add GDNative Framework loading and export support.bruvzg2021-05-242-6/+15
|
* Make all file access 64-bit (uint64_t)Pedro J. Estébanez2021-05-172-23/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the types of a big number of variables. General rules: - Using `uint64_t` in general. We also considered `int64_t` but eventually settled on keeping it unsigned, which is also closer to what one would expect with `size_t`/`off_t`. - We only keep `int64_t` for `seek_end` (takes a negative offset from the end) and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means we only need to guard against passing negative values in `core_bind.cpp`. - Using `uint32_t` integers for concepts not needing such a huge range, like pages, blocks, etc. In addition: - Improve usage of integer types in some related places; namely, `DirAccess`, core binds. Note: - On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for big files on 32-bit Windows builds made with that toolchain. We might add a workaround. Fixes #44363. Fixes godotengine/godot-proposals#400. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* GDNative: Fix size mismatch on 32-bit platforms for Signal and CallableRémi Verschelde2021-05-112-0/+2
| | | | Fixes #48645.
* Highlight control flow keywords with a different colorHugo Locurcio2021-05-054-0/+10
| | | | This makes them easier to distinguish from other keywords.
* Replace remaining uses of `NULL` with `nullptr`Rémi Verschelde2021-04-291-1/+1
| | | | Follow-up to #38736 (these uses were likely added after this PR was merged).
* Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde2021-04-271-2/+2
| | | | | | | | We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
* Fix crash on GDNative API json generator exit.bruvzg2021-04-221-0/+4
|
* Only cleanup meta data if GDNative library is reloadable and we're about to ↵Bastiaan Olij2021-04-061-28/+32
| | | | unload it
* Fixes #47607 (forgotten statement in GDNative cleanup)Jan Haller2021-04-041-0/+2
| | | | Co-authored-by: geekrelief <geekrelief@gmail.com>
* Merge pull request #47452 from BastiaanOlij/xr_positional_tracker_refRémi Verschelde2021-04-031-12/+13
|\ | | | | Change XRPositionalTracker to a reference (master)
| * Change XRPositionalTracker to a reference and better expose it to GDNativeBastiaan Olij2021-03-291-12/+13
| |
* | Merge pull request #46991 from madmiraal/rename-invert-reverseRémi Verschelde2021-04-013-4/+4
|\ \ | | | | | | Rename Array.invert() to Array.reverse()
| * | Rename Array.invert() to Array.reverse()Marcel Admiraal2021-03-213-4/+4
| | | | | | | | | | | | | | | Does the same internally for List and Vector<>, which includes all PackedArray types.
* | | Fix gdnative config file set as nullKyle2021-03-311-0/+2
| | | | | | | | | | | | | | | Fixes # Setting a GDNativeLibrary config file as null or any other object but a ConfigFile will now cause an error.
* | | [Complex Text Layouts] Provide access to glyph contour points.bruvzg2021-03-313-0/+9
| | |
* | | Merge pull request #46844 from geekrelief/gdnative_unregister_script_fixRémi Verschelde2021-03-291-0/+34
|\ \ \ | |_|/ |/| | fixes #46839, ensure library_classes is cleared and free funcs are ca…
| * | fixes #46839, ensure library_classes is cleared and free funcs are calledgeekrelief2021-03-091-0/+34
| | | | | | | | | | | | | | | Co-authored-by: toasteater <48371905+toasteater@users.noreply.github.com> Co-authored-by: Jan Haller <bromeon@gmail.com>
* | | Add support for _to_string virtual function overwrite in PluginscriptEmmanuel Leblond2021-03-273-0/+9
| | |
* | | Rename some more global enums (Key, Joy, MIDI)Aaron Franke2021-03-231-1/+1
| |/ |/|
* | Added static method information the generated builtin API JSONGeorge Marques2021-03-172-2/+5
| |
* | Further changes in GDNative APIGeorge Marques2021-03-1740-11/+880
| | | | | | | | | | | | | | | | | | | | | | | | - Added new_copy to all types, since trivial copy won't work for all types. - Added functions to convert from String to char array types, which is not provided by the methods bound in Variant. - Added operator index to String. - Added missing cstring version of some Variant functions. They existed in the header but didn't have the implementation and were missing from the gdnative_api.json file. - Added support for static calls on Variant types.
* | Fixes small typos and grammar correctionAnshul7sp12021-03-122-2/+2
| |
* | Merge pull request #44671 from o01eg/fix-gcc-visibilityRémi Verschelde2021-03-121-1/+3
|\ \ | | | | | | GDNative: Fix symbols visibility for GCC
| * | Fix visibility for GCCO01eg2020-12-251-1/+3
| | |
* | | Implement Navigation layersGilles Roudière2021-03-101-0/+2
| |/ |/|
* | Merge pull request #46045 from bruvzg/text_server_bmp_createRémi Verschelde2021-02-243-0/+31
|\ \ | | | | | | [TextServer] Restores bitmap font dynamic construction functions.
| * | [Text Server] Restores bitmap font dynamic construction functions.bruvzg2021-02-153-0/+31
| | |
* | | Merge pull request #45617 from RandomShaper/modernize_atomicsRémi Verschelde2021-02-182-4/+5
|\ \ \ | | | | | | | | Modernize atomics (and fix `volatile`)
| * | | Modernize atomicsPedro J. Estébanez2021-02-182-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Based on C++11's `atomic` - Reworked `SafeRefCount` (based on the rewrite by @hpvb) - Replaced free atomic functions by the new `SafeNumeric<T>` - Replaced wrong cases of `volatile bool` by the new `SafeFlag` - Platform-specific implementations no longer needed Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
* | | | Reorganize Project Settingsreduz2021-02-181-1/+1
|/ / / | | | | | | | | | | | | | | | | | | -Advanced Settings toggle also hides advanced properties when disabled -Simplified Advanced Bar (errors were just plain redundant) -Reorganized rendering quality settings. -Reorganized miscelaneous settings for clean up.
* / / [TextServer] Restore character and space extra spacing support.bruvzg2021-02-153-0/+30
|/ /
* | Only unload the library when no NativeScript objects exist if the reloadable ↵Bastiaan Olij2021-02-141-1/+1
| | | | | | | | flag is true. If it is false it is likely the library does other things and can't be unloaded
* | Improve resource load cachereduz2021-02-118-8/+20
| | | | | | | | | | | | -Added a new method in Resource: reset_state , used for reloading the same resource from disk -Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type) -Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
* | Fix broken gdnative variant testHenry Conklin2021-02-111-0/+1
| |
* | Merge pull request #45847 from vnen/gdnative-bindingsRémi Verschelde2021-02-1125-19/+1098
|\ \ | | | | | | Improve GDNative API and JSON generation further
| * | Improve GDNative api.json generatorGeorge Marques2021-02-091-7/+33
| | | | | | | | | | | | | | | | | | | | | - Add indexed type to the builtin types output, which is useful for bindings implementing array-like access. - Use getter type instead of hint for property types, as the hint can be unreliable and include multiple comma-separated possible types.
| * | Further changes to GDNative APIGeorge Marques2021-02-0924-12/+1065
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Moved Variant struct definition to its own file so it can be used without include cycles (like on Dictionary). - Add `index` operator function so bindings like C++ can implement the operator[] overload (which needs a reference to the actual value). - Added missing new/destroy functions to Vector3i array. - Added print error/warning functions as helpers so bindings can print messages in the same manner as Godot itself does.
* | | Removed _change_notifyreduz2021-02-101-1/+1
|/ / | | | | | | | | | | -For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
* | Initialize class/struct variables with default values in modules/Rafał Mikrut2021-02-085-31/+24
| |
* | C conformance: Include stdbool.h to define `bool`Miguel de Icaza2021-02-021-0/+1
| | | | | | | | `bool` is otherwise not defined in C.
* | Merge pull request #45315 from RandomShaper/modernize_threadRémi Verschelde2021-01-311-1/+1
|\ \ | | | | | | Modernize Thread
| * | Modernize ThreadPedro J. Estébanez2021-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
* | | Add GDNative JSON generator for the builtin APIGeorge Marques2021-01-293-18/+404
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Which can be used by language bindings to generate code statically. This is generated as a different file from the class API because it has different requirements (the builtin types have constructors and don't have signals), so bindings can better make use of each JSON file without extra parsing. This also cleans up a bit the old API generator, mainly initializing structs and renaming "instanciable" to the more correct "instantiable". The argument description in help text was updated to better reflect how it should be used. The <path> argument is mandatory.
* | | Merge pull request #45373 from aaronfranke/gdnative-sizeofGeorge Marques2021-01-2612-40/+95
|\ \ \ | | | | | | | | Define GDNative sizes using sizeof(godot_real) and sizeof(int32_t)
| * | | Define GDNative sizes using sizeof(godot_real_t) and sizeof(int32_t)Aaron Franke2021-01-2512-40/+95
| | | |
* | | | Merge pull request #44617 from geekrelief/gdnative_unloadRémi Verschelde2021-01-261-0/+6
|\ \ \ \ | |/ / / |/| | | free library when no nativescripts reference it
| * | | Removes the gdnative library when no script (gdns) references it any longer. ↵geekrelief2020-12-231-0/+6
| | | | | | | | | | | | | | | | This enables hot reload for gdnative.
* | | | GDNative: Remove print functionsGeorge Marques2021-01-253-73/+0
| | | | | | | | | | | | | | | | | | | | Those are now utilities so the function pointer can be fetched when needed.
* | | | GDNative: New core APIGeorge Marques2021-01-2550-17359/+5922
| |/ / |/| | | | | | | | | | | | | | This API now uses the discovery functions present in Variant instead of wrapping every built-in function. Users now need to query for function pointers and use those.