summaryrefslogtreecommitdiff
path: root/core/io
AgeCommit message (Collapse)Author
2021-05-20Change behavior of String.rightTomasz Chabora
2021-05-20Fix typos with codespellRémi Verschelde
Using codespell 2.0.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn GIRD leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2021-05-17Make all file access 64-bit (uint64_t)Pedro J. Estébanez
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>
2021-05-14Merge pull request #42337 from zaevi/fix-zip-open-twiceRémi Verschelde
Fix zip file opening twice
2021-05-14Fix zip file opening twiceZae
2021-05-06Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio
2021-05-05Add PackedDataContainer data pointer check for non nullableMaxStgs
2021-05-05Fix error handling for user-defined `ResourceFormatLoader.load`Rémi Verschelde
See #48463.
2021-04-30Implement Particle Trailsreduz
-Enable the trails and set the length in seconds -Provide a mesh with a skeleton and a skin -Or, alternatively use one of the built-in TubeTrailMesh/RibbonTrailMesh -Works deterministically -Fixed particle collisions (were broken) -Not working in 2D yet (that will happen next)
2021-04-27Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde
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.
2021-04-27Merge pull request #47398 from Faless/feature/network-local-port-salvagedRémi Verschelde
2021-04-19Use multiple threads to import.Juan Linietsky
- For now everything imports multithreaded by default (should work I guess, let's test). - Controllable per importer Early test benchmark. 64 large textures (importing as lossless, _not_ as vram) on a mobile i7, 12 threads: Importing goes down from 46 to 7 seconds. For VRAM I will change the logic to use a compressing thread in a subsequent PR, as well as implementing Betsy.
2021-04-14Separate set.h from map.hBartłomiej T. Listwon
2021-04-12This renames PacketPeerUDP.listen to bind.Fabio Alessandrelli
2021-04-12Allow local port control on net_socket connectionsdam
2021-03-26Optimize image channel detectionJuan Linietsky
Speeds up compression
2021-03-23Merge pull request #40804 from naithar/fix/json-parseRémi Verschelde
JSON parser fix
2021-03-22Add a "keep" import mode to keep files as-is and export them.Juan Linietsky
2021-03-22Improved 3D Scene ImporterJuan Linietsky
* Added option for importers to show an Advanced settings dialog * Created advanced settings dialog for Scene Importer * Cleaned up importers (remove many old/unused options) * Added the ability to customize every node, material, mesh and animation individually * Saving to animations and meshes to files is now a manual process, making it more predictable * Added the ability for materials to be replaced by external files (or to be made external, up to you). * When doubleclicking an impoted scene in the filesystem dock, it automatically shows the import settings instead of asking to open it. WARNING: Lightmap UV unwrap is not working, it needs to be re-made.
2021-03-16Allow nullptr with zero length in FileAccess get_bufferAlex Hirsch
fix #47071
2021-03-14Merge pull request #46810 from W4RH4WK/file-access-get-buffer-parameter-checksRémi Verschelde
Add parameter checks to FileAccess get_buffer functions
2021-03-12Fixes small typos and grammar correctionAnshul7sp1
2021-03-09Add parameter checkes to FileAccess get_buffer functionsAlex Hirsch
fix #46540
2021-03-03Fix crash on HTTPClient::poll methodPedro Rodrigues
The problem happened because `poll` assumed that when the SSL flag was true, the `connection` would be a subclass of StreamPeerSSL. However that invariant could be broken by calling HTTPClient::set_connection with a `connection` that is not a subclass of StreamPeerSSL. Fixes #46138
2021-03-01JSON parser: add UTF-16 surrogate pairs support.bruvzg
2021-02-28Logger: Cache 'flush_stdout_on_print' to improve performance, and works ↵Mateo Kuruk Miccino
before ProjectSettings starts. ProjectSetting: Now 'application/run/flush_stdout_on_print' requires a restart of the Editor to take effect
2021-02-27ResourceLoader: Fix inverse 'if' on the cache modeMateo Kuruk Miccino
2021-02-25Merge pull request #38844 from hbina/patch-5Rémi Verschelde
Avoid copying vector in constructor of PathMD5
2021-02-24Merge pull request #46354 from reduz/importer-defaults-editorRémi Verschelde
Added Import Defaults Editor in Project Settings
2021-02-24Merge pull request #45914 from HenryWConklin/45841-xml-entitiesRémi Verschelde
Add support for numeric XML entities to XMLParser
2021-02-23Added Import Defaults Editor in Project Settingsreduz
-Change importer defaults in project settings. -Ability to change them or reset them.
2021-02-19doc: Sync classref with current sourceRémi Verschelde
And fix various bogus bindings following previous PRs.
2021-02-18Merge pull request #45617 from RandomShaper/modernize_atomicsRémi Verschelde
Modernize atomics (and fix `volatile`)
2021-02-18Modernize atomicsPedro J. Estébanez
- 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>
2021-02-18Reorganize Project Settingsreduz
-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.
2021-02-14Add support for numeric XML entities to XMLParserHenry Conklin
* Add support for decimal numeric entities to String::xml_unescape * Add more error checks to String::xml_unescape * Refactor XMLParser to use String::xml_unescape instead of an internal implementation
2021-02-12Add ability to change Icon Saturationreduz
-Allows for more theme freedom -Allows for entirely B&W themes.
2021-02-11Improve resource load cachereduz
-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.
2021-02-10Removed _change_notifyreduz
-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.
2021-02-09Fixes crash when exiting with --verbose with leaked resourcesGilles Roudière
2021-02-03Core: add EOF check for json parserSergey Minakov
Additionally reset parse result if error was found.
2021-01-31Merge pull request #45315 from RandomShaper/modernize_threadRémi Verschelde
Modernize Thread
2021-01-29Modernize ThreadPedro J. Estébanez
- 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)
2021-01-28Unify URI encoding/decoding and add to C#Aaron Franke
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
2021-01-26Type consistencies in coreAaron Franke
2021-01-19Modernize RWLockPedro J. Estébanez
- Based on C++14's `shared_time_mutex` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed - Simpler for `NO_THREADS`
2021-01-13Expose `Resource.emit_changed()` to scriptAndrii Doroshenko (Xrayez)
Also known as `emit_signal("changed")`.
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-12-29Consistently use normal_mapMarcel Admiraal
2020-12-28Rename empty() to is_empty()Marcel Admiraal