95 Commits

Author SHA1 Message Date
Spartan322
0a87a7b475 Merge commit godotengine/godot@e1b4101e34 2025-07-01 06:43:54 -04:00
Pāvels Nadtočajevs
42733a2a5c Implement sparse bundle PCK support. 2025-06-26 00:47:25 +02:00
Spartan322
0e99b001ac Merge commit godotengine/godot@5dd76968d8 2025-06-05 23:07:30 -04:00
Pāvels Nadtočajevs
8cb2817976 [PCK] Move directory to the end of file, write exported/saved PCK in place. 2025-06-02 12:54:09 +03:00
Spartan322
8122592328 Merge commit godotengine/godot@80a3d205f1 2025-05-01 01:30:09 -04:00
kobewi
5af4bef46f Inline static variables (part 1) 2025-04-29 18:10:44 +02:00
Spartan322
2b59059dde Merge commit godotengine/godot@2d3bdcac35 2025-04-19 16:05:28 -04:00
nikitalita
2d0ae77719 add GDSOFTCLASS to FileAccess and DirAccess derived classes 2025-04-09 11:52:50 -07:00
bruvzg
85d3be8070 [FileAccess] Implement get_size and get_access_time methods. 2025-03-09 16:07:00 +02:00
Thaddeus Crews
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
Spartan322
4805bc1eee Merge commit godotengine/godot9630d4e2fc1d0fdef6f46f24e236548549f31d49 2025-01-17 16:33:06 -05:00
Rie
d17ce4c37e Fix "res://" being replaced by resource packs in the editor and on Android 2025-01-15 11:20:46 +01:00
Spartan322
fa0b4af786 Merge commit godotengine/godot@a7a2a12bfd 2024-12-21 05:32:01 -05:00
Yufeng Ying
be86ce3103 Apply iwyu suggestion in core. 2024-12-19 00:43:47 +08:00
Spartan322
c3314b0ab0 Merge commit godotengine/godot@1f47e4c4e3 2024-12-04 20:11:58 -05:00
bruvzg
a4b17e7852 [FileAccess] Return error codes from store_* methods. 2024-11-29 23:22:31 +02:00
Spartan322
4a5836e546 Merge commit godotengine/godot@6c05ec3d67 2024-11-15 14:24:07 -05:00
Pāvels Nadtočajevs
93a21c3efc Fix PackedData::has_path() using wrong path format. 2024-11-13 09:50:10 +02:00
Spartan322
3a73c6ebd1 Merge commit godotengine/godot@cb411fa960 2024-11-12 13:46:59 -05:00
Juan
2ac562cdf8 Add ability for PCK patches to remove files
Co-authored-by: Mikael Hermansson <mikael@hermansson.io>
2024-11-11 16:34:37 +01:00
Spartan322
6beb1eef9a Fix copyright headers referring to Godot 2024-10-27 11:17:29 -04:00
Dubhghlas McLaughlin
e8542b06ac Rebrand preambles to Redot
Credits:
Co-authored-by: Skogi <skogi.b@gmail.com>
Co-authored-by: Spartan322 <Megacake1234@gmail.com>
Co-authored-by: swashberry <swashdev@pm.me>
Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se>
Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com>
Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com>
Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com>
Co-authored-by: radenthefolf <radenthefolf@gmail.com>
Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com>
Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com>
Co-authored-by: decryptedchaos <nixgod@gmail.com>
Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com>
Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com>
Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com>
Co-authored-by: Mister Puma <MisterPuma80@gmail.com>
Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com>
Co-authored-by: SingleError <isaaconeoneone@gmail.com>
Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
2024-10-11 02:26:51 -04:00
Randolph W. Aarseth II
d5fc3d1e8c Rebrand Godot to Redot
Add Linux Editor tests workflow matrix
Add Windows Editor w/ Mono workflow matrix
Add Generate Glue Code job to Windows workflow
Add Build GodotSharp job to Windows workflow

Add godot compatibility version references
Add Godot author info
Add Godot version compatibility info
Add Godot donor info
Add Godot authors and donors to editor_about.cpp

Credits:
Co-authored-by: Skogi <skogi.b@gmail.com>
Co-authored-by: Spartan322 <Megacake1234@gmail.com>
Co-authored-by: swashberry <swashdev@pm.me>
Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se>
Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com>
Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com>
Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com>
Co-authored-by: radenthefolf <radenthefolf@gmail.com>
Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com>
Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com>
Co-authored-by: decryptedchaos <nixgod@gmail.com>
Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com>
Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com>
Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com>
Co-authored-by: Mister Puma <MisterPuma80@gmail.com>
Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com>
Co-authored-by: SingleError <isaaconeoneone@gmail.com>
Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
2024-10-11 02:25:54 -04:00
Mikael Hermansson
d3be030ea6 Add ability to export patch packs
Co-authored-by: Poq Xert <poqxert@poqxert.ru>
2024-09-25 17:07:28 +02:00
BlueCube3310
205a10e0ae Reduce code duplication in FileAccess 2024-09-01 12:39:32 +02:00
bruvzg
88b3e68f93 [FileAccess] Implement resize method. 2024-04-12 19:20:49 +03:00
bruvzg
bf8ec7b81b [Export] Use relative file base offset for embedded PCK. 2024-03-06 14:02:01 +02:00
Muller-Castro
a8bc9f3e78 Add const lvalue ref to core/* container parameters 2024-02-14 11:20:36 -03:00
bruvzg
8aa6f29b56 [FileAccess] Add methods to get/set "hidden" and "read-only" attributes on macOS/BSD and Windows. 2023-08-08 21:51:32 +03:00
jpcerrone
0fb307720c PCK file path improvements
Fixes godotengine#77317 (Inconsistent PCK file path behaviour).
Simplifies all PCK file paths so that paths with extra '/' symbols in them
still match to the same path.
Fixes various FileAccess methods that didn't work when using PCK paths that
contain extra '/' symbols.
2023-05-22 15:03:05 -03:00
bruvzg
bc95b0b171 Restore FileAccess.close method. 2023-02-16 15:34:20 +02:00
Rémi Verschelde
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
kobewi
9f2dc68279 Replace File/Directory with FileAccess/DirAccess 2022-09-19 11:03:31 +02:00
Marcel Admiraal
c06025fa13 Add override keywords to DirAccess derived classes 2022-08-02 16:39:44 +01:00
Marcel Admiraal
cafb19e608 Add override keywords to FileAccess derived classes 2022-08-02 16:35:15 +01:00
reduz
141c375581 Clean up Hash Functions
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934
* Clean up usage of murmur3
* Fixed usages of binary murmur3 on floats (this is invalid)
* Changed DJB2 to use xor (which seems to be better)
2022-06-20 12:54:19 +02:00
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
reduz
746dddc067 Replace most uses of Map by HashMap
* 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-16 10:37:48 +02:00
bruvzg
de4c97758a Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
bruvzg
d2ebac3a30 Remove or make private FileAccess close() methods. 2022-04-12 14:50:14 +03:00
bruvzg
9381acb6a4 Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
bruvzg
f851c4aa33 Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
Rémi Verschelde
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Rémi Verschelde
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Rémi Verschelde
9e328bb5b7 Core: Move DirAccess and FileAccess to core/io
File handling APIs are typically considered part of I/O, and we did have most
`FileAccess` implementations in `core/io` already.
2021-06-11 14:52:39 +02:00
Rémi Verschelde
7ab34e1a96 Merge pull request #48889 from Calinou/file-rename-endian-swap
Rename File's `endian_swap` to `big_endian`
2021-06-03 15:19:07 +02:00
Marcel Admiraal
da5d7db610 Rename File::get_len() get_length() 2021-05-25 11:54:28 +01:00
bruvzg
139a9d6370 Add symlink API to the DirAccess (on macOS and Linux). 2021-05-22 17:33:34 +03:00
Hugo Locurcio
12462d9055 Rename File's endian_swap to big_endian
This new name is more consistent with ResourceSaver and StreamPeer.
2021-05-20 14:58:03 +02:00
Pedro J. Estébanez
469fa47e06 Make all file access 64-bit (uint64_t)
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-17 15:06:19 +02:00