summaryrefslogtreecommitdiffstats
path: root/core/core_bind.h
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Expose OS data directory getter methodsHugo Locurcio2021-06-191-0/+3
|/ / | | | | | | | | | | This can be used by editor plugins and non-game applications to store data in the correct directories according to the XDG Base Directory specification.
* | Merge pull request #49123 from aaronfranke/it-is-timeRémi Verschelde2021-06-121-8/+0
|\ \ | | | | | | Add a Time singleton
| * | Add Time singletonAaron Franke2021-06-111-8/+0
| | |
* | | Rename Reference to RefCountedPedro J. Estébanez2021-06-111-12/+12
| | |
* | | Merge pull request #49511 from akien-mga/core-diraccess-fileaccess-ioRémi Verschelde2021-06-111-2/+2
|\ \ \ | | | | | | | | Core: Move DirAccess and FileAccess to `core/io`
| * | | Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-111-2/+2
| |/ / | | | | | | | | | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* | | Merge pull request #34566 from Heikki00/34541_to_json_precisionRémi Verschelde2021-06-111-1/+1
|\ \ \ | |/ / |/| | Increased String::num default decimal precision
| * | Increase String::num default decimal precisionHeikki Simojoki2021-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #34541 Renamed MAX_DIGITS to MAX_DECIMALS, since it only changes the amount of digits after the decimal point. Increased MAX_DECIMALS to 32, and made String::num use MAX_DECIMALS consistently. If -1 is passed as decimal precision to String::num, it now gets changed to the correct precision based on the number's magnitude, instead of using printf default(which is 6) String::num_real also calculates the correct precision now. Also made the types used in floating-point math more consistent in a few places.
* | | Add OS.get_external_data_dir() to get Android external directoryMarcel Admiraal2021-06-101-0/+1
| | |
* | | Merge pull request #48889 from Calinou/file-rename-endian-swapRémi Verschelde2021-06-031-6/+6
|\ \ \ | | | | | | | | Rename File's `endian_swap` to `big_endian`
| * | | Rename File's `endian_swap` to `big_endian`Hugo Locurcio2021-05-201-6/+6
| | | | | | | | | | | | | | | | This new name is more consistent with ResourceSaver and StreamPeer.
* | | | Tweak arguments of list_dir_begin()kobewi2021-05-311-1/+1
| |/ / |/| |
* | | Rename File::get_len() get_length()Marcel Admiraal2021-05-251-1/+1
|/ /
* / Make all file access 64-bit (uint64_t)Pedro J. Estébanez2021-05-171-4/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Remove GDScript bindings for OS.get/set_exit_code, ↵Emmanuel Leblond2021-02-251-2/+0
| | | | SceneTree.quit(<exit_code>) should be used instead
* Expose set_environment to GDScriptBastiaan Olij2021-02-251-0/+1
|
* Don't allow negative values for `OS.delay_usec()`/`OS.delay_msec()`Hugo Locurcio2021-02-181-2/+2
| | | | This closes #46190.
* Merge pull request #46131 from bruvzg/move_tablet_to_dsRémi Verschelde2021-02-181-5/+0
|\ | | | | Move tablet driver API from OS to DisplayServer
| * Move tablet driver API from OS to DisplayServer.bruvzg2021-02-181-5/+0
| |
* | Modernize atomicsPedro J. Estébanez2021-02-181-1/+2
|/ | | | | | | | | | - 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>
* Expose a `File.flush()` method to scriptingHugo Locurcio2021-02-131-0/+1
| | | | | | | | This can be used to ensure a file has its contents saved even if the project crashes or is killed by the user (among other use cases). See discussion in #29075.
* Improve resource load cachereduz2021-02-111-1/+8
| | | | | | -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.
* Merge pull request #45315 from RandomShaper/modernize_threadRémi Verschelde2021-01-311-4/+1
|\ | | | | Modernize Thread
| * Modernize ThreadPedro J. Estébanez2021-01-291-4/+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)
* | Merge pull request #44732 from Calinou/os-add-get-thread-caller-idRémi Verschelde2021-01-261-0/+1
|\ \ | |/ |/| Add an `OS.get_thread_caller_id()` method
| * Add an `OS.get_thread_caller_id()` methodHugo Locurcio2020-12-271-0/+1
| | | | | | | | | | | | | | This can be used to print thread IDs in logs. This can make it easier to debug multi-threaded applications. Co-authored-by: Khaos <khaos@khaos-coders.org>
* | Split OS::execute into two methodsMarcel Admiraal2021-01-091-2/+2
| | | | | | | | | | 1. execute(): Executes a command and returns the results. 2. create_process(): Creates a new process and returns the new process' id.
* | Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* | Rename MainLoop methods to match Node methodsMarcel Admiraal2020-12-221-1/+1
|/
* Initialize class/struct variables with default values in core/ and drivers/Rafał Mikrut2020-11-231-2/+2
|
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-3/+0
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-0/+770
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code