summaryrefslogtreecommitdiffstats
path: root/core/bind
Commit message (Collapse)AuthorAgeFilesLines
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-073-3387/+0
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Removed unused method Geometry.get_uv84_normal_bitYuri Roubinsky2020-10-092-7/+0
|
* Cancel rename if file does not existTomasz Chabora2020-10-081-0/+2
|
* OS: Remove unused get_splash_tick_msecRémi Verschelde2020-09-242-6/+0
| | | | | | It was added in 3e20391bf607dc7c452b056854aed4a8c99ba0f6 but it doesn't seem particularly useful, and it was only implemented for the custom splash branch and not the default one, so it could return an uninitialized int.
* Added debugger plugin supportsimpu2020-08-262-0/+206
| | | | | | Changes: * EngineDebugger is exposed to gdscript. Game side of communication can be implemented through it. * EditorDebuggerPlugin is added which handles the editor side of communication.
* Merge pull request #38900 from bruvzg/docs_ignore_os_spec_def_valsRémi Verschelde2020-07-251-0/+1
|\ | | | | Docs: Ignore OS specific values (constants, project settings, properties)
| * Docs: Ignore OS specific values (constants, project settings, properties).bruvzg2020-07-151-0/+1
| |
* | Fix Directory make_dir and make_dir_recursiveNathan Franke2020-07-201-2/+2
|/
* Follow-Up Fix Directory OpenNathan Franke2020-07-101-8/+13
|
* Fix Directory Open CheckNathan Franke2020-07-062-17/+25
|
* Fix weekday calculation in get_datetime_from_unix_time for negative timesMaganty Rushyendra2020-06-291-1/+1
| | | | | Fix calculation for negative times to ensure Sundays are wrapped around to '0' instead of '7', making it consistent with the output for positive times.
* Remove OS.get_system_time_secs/get_system_time_msecs and change ↵Emmanuel Leblond2020-05-312-14/+2
| | | | OS.get_unix_time return type to double
* Split `Geometry` singleton into `Geometry2D` and `Geometry3D`Andrii Doroshenko (Xrayez)2020-05-272-218/+250
| | | | Extra `_2d` suffixes are removed from 2D methods accoringly.
* [Windows] Add tablet driver selection.bruvzg2020-05-202-0/+27
|
* Style: Remove unnecessary semicolons from `core`Rémi Verschelde2020-05-191-20/+20
| | | | | | | | | | Semicolons are not necessary after function definitions or control flow blocks, and having some code use them makes things inconsistent (and occasionally can mess up `clang-format`'s formatting). Removing them is tedious work though, I had to do this manually (regex + manual review) as I couldn't find a tool for that. All other code folders would need to get the same treatment.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-30/+56
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+48
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-142-238/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-142-117/+34
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Warn when trying to open `res://` or `user://` with `OS.shell_open()`Hugo Locurcio2020-04-281-0/+5
| | | | | | | `OS.shell_open()` will pass on the path directly to the OS' shell handler (which can handle file paths or URLs). It can't handle Godot-specific paths, so these need to be converted with `ProjectSettings.globalize_path()` first.
* Replace NULL with nullptrlupoDharkael2020-04-022-20/+20
|
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
* Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky2020-03-262-650/+3
|
* doc: Sync classref with current sourceRémi Verschelde2020-03-181-1/+1
| | | | Fix wrong binding after #37111.
* Merge pull request #37111 from RandomShaper/imvu/unexpose_include_driveRémi Verschelde2020-03-172-3/+3
|\ | | | | Remove meaningless parameter from bindings
| * Remove meaningless parameter from bindingsPedro J. Estébanez2020-03-172-3/+3
| |
* | Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-13/+13
|/ | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Merge pull request #36752 from RandomShaper/rework_semaphoreRémi Verschelde2020-03-052-20/+14
|\ | | | | Drop old semaphore implementation
| * Drop old semaphore implementationPedro J. Estébanez2020-03-032-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | - Removed platform-specific implementations. - Now all semaphores are in-object, unless they need to be conditionally created. - Similarly to `Mutex`, provided a dummy implementation for when `NO_THREADS` is defined. - Similarly to `Mutex`, methods are made `const` for easy use in such contexts. - Language bindings updated: `wait()` and `post()` are now `void`. - Language bindings updated: `try_wait()` added. Bonus: - Rewritten the `#ifdef` in `mutex.h` to meet the code style.
* | Improve UX of drive lettersPedro J. Estébanez2020-03-032-4/+4
|/ | | | | | | | | | Namely, move the drive dropdown to just the left of the path text box and don't include the former in the latter. This improves the UX on Windows. In the UNIX case, since its concept of drives is (ab)used to provide shortcuts to useful paths, its dropdown is kept at the original location.
* Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodesRémi Verschelde2020-03-012-9/+11
|\ | | | | Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
| * Rename `scancode` to `keycode`.bruvzg2020-02-252-9/+11
| | | | | | | | | | Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap. Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
* | doc: Sync classref with current sourceRémi Verschelde2020-02-291-1/+1
| |
* | Removed interactive loader, added proper thread loading.Juan Linietsky2020-02-282-4/+38
| |
* | Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-262-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
* | Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-2/+2
|/ | | | | | | | | | | | | | | | | | | | | - Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
* Core: Change _Marshall class inherit from Reference to ObjectMateo Dev .592020-02-241-2/+2
|
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-6/+6
| | | | objects and made them default.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-182-78/+68
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Remove incomplete battery status/power APIRémi Verschelde2020-02-142-35/+0
| | | | | | | | | | | It was initially implemented in #5871 for Godot 3.0, but never really completed or thoroughly tested for most platforms. It then stayed in limbo and nobody seems really keen to finish it, so it's better to remove it in 4.0, and re-add eventually (possibly with a different API) if there's demand and an implementation confirmed working on all platforms. Closes #8770.
* Remove more deprecated methods and codeRémi Verschelde2020-02-132-13/+0
|
* Remove obsolete GLES3 backendRémi Verschelde2020-02-132-2/+1
| | | | | | | | | | | | | | Due to the port to Vulkan and complete redesign of the rendering backend, the `drivers/gles3` code is no longer usable in this state and is not planned to be ported to the new architecture. The GLES2 backend is kept (while still disabled and non-working) as it will eventually be ported to serve as the low-end renderer for Godot 4.0. Some GLES3 features might be selectively ported to the updated GLES2 backend if there's a need for them, and extensions we can use for that. So long, OpenGL driver bugs!
* Merge pull request #29993 from bruvzg/vulkanRémi Verschelde2020-02-111-0/+1
|\ | | | | | | Initial Vulkan support for macOS (MoltenVK) and Windows
| * Add static Vulkan loader.bruvzg2020-02-111-0/+1
| | | | | | | | | | Initial Vulkan support for Windows. Initial Vulkan support for macOS.
* | Added a spinlock template as well as a thread work pool class.Juan Linietsky2020-02-112-2/+2
|/ | | | Also, optimized shader compilation to happen on threads.
* Remove duplicate WARN_PRINT macro.Marcel Admiraal2020-02-051-1/+1
|
* Remove duplicate ERR_PRINT macro.Marcel Admiraal2020-02-051-1/+1
|
* Make `OS.execute()` blocking by default if not specifiedHugo Locurcio2020-01-232-2/+2
| | | | | This makes `OS.execute()` calls quicker to set up when calling programs in a blocking fashion.
* Thread: Fix typo in destructor error messageRémi Verschelde2020-01-221-1/+2
|
* Merge pull request #35092 from AndreaCatania/frames_expRémi Verschelde2020-01-142-0/+14
|\ | | | | Exposed physics frame count and idle frame count