summaryrefslogtreecommitdiff
path: root/core/io
AgeCommit message (Collapse)Author
2022-06-08Fix (again) loading binary resources with float=64xutaxkamay
I had an error while importing my GLB file from 32-bit precision floating point, I guess this was forgotten while implementing 64-bit precision floating point. I'm not sure if there's any other left to do though.
2022-06-07Fix saving section-less keys in `ConfigFile`Danil Alexeev
2022-06-02Merge pull request #61339 from lyuma/streampeerssl_get_streamRémi Verschelde
2022-05-25Add StreamPeerSSL.get_stream() accessor.Lyuma
2022-05-23Fix typos with codespellRémi Verschelde
Using codespell 2.2-dev from current git.
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-19Use range iterators for RBSet in most casesAaron Record
2022-05-16Merge pull request #60126 from Calinou/image-improve-error-messagesRémi Verschelde
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-12Add a new HashMap implementationreduz
Adds a new, cleaned up, HashMap implementation. * Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing). * Keeps elements in a double linked list for simpler, ordered, iteration. * Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much for performance vs keeping the key, but helps replace old code). * Uses a more modern C++ iterator API, deprecates the old one. * Supports custom allocator (in case there is a wish to use a paged one). This class aims to unify all the associative template usage and replace it by this one: * Map<> (whereas key order does not matter, which is 99% of cases) * HashMap<> * OrderedHashMap<> * OAHashMap<>
2022-05-11Merge pull request #60943 from bruvzg/fix_zipioRémi Verschelde
2022-05-11Fix ZipIO crash when reused (and possible leaks).bruvzg
2022-05-11Fix invalid memory usage when using Image.convertHaoyu Qiu
2022-05-10Fix warnings found by Emscripten 3.1.10Rémi Verschelde
Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and `-Wliteral-range` warnings.
2022-05-05Merge pull request #60597 from reduz/missing-node-resource-placeholdersRémi Verschelde
2022-05-04[Net] Fix StreamPeerTCP accepted status.Fabio Alessandrelli
2022-05-03Implement missing Node & Resource placeholdersreduz
Implemented by request of @neikeq to advance in the GDExtension version of Mono. * If a Resource type is missing upon load, it will be remembered together with its data (Unless manually overriden). * If a Node type is missing upon load, it will be also be remembered together with its data (unless deleted). This feature makes working with GDExtension much easier, as it ensures that missing types no longer cause data loss.
2022-05-03Merge pull request #60627 from aaronfranke/rename-elementsRémi Verschelde
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
2022-05-03Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio
These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
2022-05-02Merge pull request #59895 from akien-mga/clang-tidyRémi Verschelde
2022-05-02Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde
Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
2022-05-02Fix resource dependence renaming.bruvzg
2022-04-29Rename Basis "elements" to "rows"Aaron Franke
2022-04-29Rename Transform2D "elements" to "columns"Aaron Franke
2022-04-27Merge pull request #56093 from bruvzg/pck_section_loadRémi Verschelde
Improve embedded PCK loading and exporting.
2022-04-27Merge pull request #59582 from Faless/net/4.x_tcp_explicit_pollRémi Verschelde
2022-04-27Merge pull request #59979 from bruvzg/cpp_check2Rémi Verschelde
2022-04-22Close FileAccess before accessing it with DirAccessHaoyu Qiu
2022-04-20Improve embedded PCK loading and exporting.bruvzg
Windows export process: Limit size of executable with embedded PCK to 4 GB. Use "rcedit" before embedding PCK. Capture and process "rcedit" errors. Windows, Linux: Add support for PCK loading from executable "pck" section.
2022-04-20Fix more issues found by cppcheck.bruvzg
2022-04-19Merge pull request #50175 from kleonc/image-blit-blend-fix-rectsHugo Locurcio
`Image.blit_rect/blend_rect` Fix rects calculations for negative arguments
2022-04-13Color: Rename `to_srgb`/`to_linear` to include base color spaceRémi Verschelde
This helps reduce confusion around sRGB <> Linear conversions by making both input and output color spaces explicit.
2022-04-12Remove or make private `FileAccess` `close()` methods.bruvzg
2022-04-12Narrow FileAccess scope to prevent deadlocks.bruvzg
2022-04-11Make FileAccess and DirAccess classes reference counted.bruvzg
2022-04-11Improve error messages when creating Images from codeHugo Locurcio
The rationale behind the expected number of bytes is now displayed in clear (width, height, format, number of mipmaps expected if any).
2022-04-08Merge pull request #59324 from Zylann/fix_fvec_array_binary_loadRémi Verschelde
Fix loading binary resources with float=64
2022-04-08Fix loading binary resources with float=64Marc Gilleron
- PackedVector2Array - PackedVector3Array - PackedColorArray
2022-04-06Fix some issues found by cppcheck.bruvzg
2022-04-04Zero initialize all pointer class and struct membersRémi Verschelde
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
2022-03-30Add PortableCompressedTexturereduz
* Resource that allows saving textures embedded in scenes or standalone. * Supports only formats that are portable: Lossy, Lossles or BasisUniversal This is something I wanted to add for a long time. I made it now because @fire requires it for importing GLTF2 files with embedded textures, but also this will allow saving Godot scenes as standalone binary files that will run in all platforms (because textures will load everywhere). This is ideal when you want to distribute individual standalone assets online in games that can be built from Godot scenes.
2022-03-28String: Remove TTR and DTR defines in non-tools buildRémi Verschelde
This ensures we don't use TTR in runtime code, as it's specifically meant to source translations for the editor.
2022-03-27[Net] Drop is_connected_to_host for TCP and UDP.Fabio Alessandrelli
The UDP method is now called `is_socket_connected` to limit confusion with the actual host connection status which doesn't make sense in UDP. The TCP method is completly dropped, use get_status instead. The only one left is the WebSocketPeer one, which should be fine as is for now.
2022-03-27[Net] Make StreamPeerTCP::_poll_connection explicit.Fabio Alessandrelli
No longer hacked into `get_status` and renamed to `poll`. The old `poll` (for *nix `poll`, win `select`) is now called `wait`.
2022-03-26Object: Remove unused category boilerplateRémi Verschelde
We might want to re-add something like this if/when we find a good use case for it and do the effort to categorize all objects in the API properly. Until then, it's better to remove that boilerplate since it's not needed. Closes #18711.
2022-03-23Increase the maximum number of concurrent DNS queries from 32 to 256Hugo Locurcio
This makes the following error message less likely to be printed when performing many concurrent HTTP requests: Condition ' resolving == IP::RESOLVER_INVALID_ID ' is true. returned: ERR_BUG
2022-03-23Fix crash when exporting projects with shared librariesHaoyu Qiu
2022-03-18Add binary MO translation file support.bruvzg
2022-03-17Unify TextServer built-in module and GDExtension code.bruvzg
2022-03-15Merge pull request #45263 from KoBeWi/😕Rémi Verschelde