Commit Graph

4245 Commits

Author SHA1 Message Date
Rémi Verschelde 2660fafcc0
Merge pull request #48869 from tavurth/feature/hmac-port
Backport HMACContext to 3.x
2021-05-21 19:06:18 +02:00
Rémi Verschelde eb78f80f03
Fix typos with codespell
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-20 12:56:56 +02:00
Will Whitty 3f606263d5 Backport HMac crypto to 3.x
Fix headers

Fix docs formatting

Changes for PR

Fix tests
2021-05-20 13:29:38 +03:00
Rémi Verschelde 6355877c0d
Merge pull request #47863 from mphe/same_line_warning_ignore
Allow warning-ignore in the same line as the respective warning
2021-05-18 15:08:00 +02:00
Pedro J. Estébanez 817ffc01e1
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-16 17:52:31 +02:00
Rémi Verschelde c7182512dd
VisualScript: Fix wrongly setting default value on property hint change
PR #45096 put the backported code in the wrong case, it should be for `type`
and not for `hint`.

Also synced `hint` enum values with `Object.PropertyHint`.

Fixes #48698.
2021-05-13 22:37:31 +02:00
Morris Tabor 9caee3b930
fix misaligned loads in bmp loader
(cherry picked from commit 89a8bbda0a)
2021-05-11 10:44:21 +02:00
Rémi Verschelde 4185a22ca8
Merge pull request #48131 from LightningAA/fix-48113-3.x
[3.x] Fix Array.max() navigating to @GDScript.max()
2021-05-06 20:42:23 +02:00
Rémi Verschelde 48d7eff3e3
Merge pull request #48485 from JFonS/3.x_embree_aarch64
Add checks for __SSE2__ in the lightmap raycaster
2021-05-05 18:35:04 +02:00
JFonS 20717990fd Add checks for __SSE2__ in the lightmap raycaster 2021-05-05 18:24:13 +02:00
Rémi Verschelde e53422c8f9
SCons: Disable embree-based modules on x86 (32-bit)
Fixes #48482.
2021-05-05 18:01:45 +02:00
Rémi Verschelde 140350d767
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2021-05-05 15:02:01 +02:00
Rémi Verschelde b8d198eeed
Merge pull request #48455 from JFonS/3.x_embree_aarch64
[3.x] Switch to embree-aarch64
2021-05-05 15:01:18 +02:00
JFonS 73e2ccd603 Switch to embree-aarch64 2021-05-04 18:59:00 +02:00
Rémi Verschelde 0c8b5b5c4d
Style: Remove redundant void argument lists
Using clang-tidy's `modernize-redundant-void-arg`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-redundant-void-arg.html
2021-05-04 16:40:33 +02:00
Rémi Verschelde b4af1eba0a
Style: Enforce use of bool literals instead of integers
Using clang-tidy's `modernize-use-bool-literals`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
2021-05-04 16:39:13 +02:00
Rémi Verschelde a828398655
Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
Rémi Verschelde b5e1e05ef2
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
Rémi Verschelde 64a63e0861
Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde 3d15f04668
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde 6e600cb3f0
Style: Set clang-format Standard to c++14 2021-05-04 14:45:15 +02:00
Rémi Verschelde 7e61be3cb0
Style: Remove executable bit from non-runnable files 2021-05-04 14:45:07 +02:00
Rémi Verschelde 2660f24160
Merge pull request #48429 from kleonc/posmod-change-int-to-int64
[3.x] Make posmod use int64_t instead of int
2021-05-04 12:31:01 +02:00
Rémi Verschelde 62bea72601
doc: Sync classref with Mono build 2021-05-03 22:34:11 +02:00
kleonc f04a964627 Make posmod use int64_t instead of int 2021-05-03 22:03:16 +02:00
MaxStgs 1fc0fb7a5e
Add WebSocketMultiplayerPeer _incoming_packets check bound
(cherry picked from commit 05ad08941b)
2021-05-03 21:39:43 +02:00
Fabio Alessandrelli 77e3514315
[Net] Implement String::parse_url for parsing URLs.
Splits the URL into (scheme, host, port, path).
Supports both literal IPv4 and IPv6.
Strip credentials when present (e.g. http://user:pass@example.com/).

Use that function in both HTTPRequest and WebSocketClient.

(cherry picked from commit 3bb40669d5)
2021-05-03 21:39:43 +02:00
Rémi Verschelde e94161dada
SCons: Add explicit dependencies on thirdparty code in cloned env
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.

So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).

This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.

(cherry picked from commit c7b53c03ae)
2021-04-29 16:57:00 +02:00
Rémi Verschelde 70ae90e0e8
Core: Drop custom `copymem`/`zeromem` defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

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.

Backport of #48239.
2021-04-29 12:34:11 +02:00
David Snopek 1db31d0afa
Fixes #48178: WebXR broken when built with Emscripten 2.0.13 or later
(cherry picked from commit b77925d246)
2021-04-29 12:30:36 +02:00
Johannes Witt 41a016c1e8
Fix CSG Path Polygon cache being removed after connect
fixes #30229

(cherry picked from commit bab36f1273)
2021-04-29 12:29:28 +02:00
Marcel Admiraal a68c88adfd Update CSGMesh3D's documentation to explain how vertex normals are used 2021-04-27 18:37:19 +01:00
Rémi Verschelde 2d57df60f7
Merge pull request #48144 from Faless/crypto/3.3_encryption_stable 2021-04-27 13:46:49 +02:00
Rémi Verschelde c3272997cd
doc: Update classref headers with 3.4 version 2021-04-26 13:15:29 +02:00
Marcel Admiraal cfccf77edb
Fix CSGMesh undo not refreshing gizmo
(cherry picked from commit 4311c2f66e)
2021-04-26 12:52:15 +02:00
Francois Belair 1f54a75310
Make LSP update the filesystem of changed scripts
This updates global classes and exposes base member variables.
Fixes #39713

(cherry picked from commit b16bb33a5b)
2021-04-26 12:20:28 +02:00
Rémi Verschelde 137f71fd75
Merge pull request #48173 from madmiraal/fix-empty-csgshape-error-3.x
[3.x] Fix new `CSGMesh` errors
2021-04-26 12:20:08 +02:00
Rémi Verschelde e554ecd691
Merge pull request #47451 from BastiaanOlij/arvr_positional_tracker_ref
Change ARVRPositionalTracker to a reference (3.x)
2021-04-26 07:45:34 +02:00
Marcel Admiraal decdf4fcbc Fix empty CSGShape error 2021-04-25 08:01:14 +01:00
Fabio Alessandrelli dcd5433b3b Implement RSA encryption/decryption. 2021-04-24 00:04:56 +02:00
Fabio Alessandrelli 09b9e65688 Implement sign and verify in crypto. 2021-04-24 00:04:56 +02:00
Fabio Alessandrelli 09af27fa39 CryptoKey supports public keys. 2021-04-24 00:04:56 +02:00
Fabio Alessandrelli a486783d3d Better zeroizing in CryptoKey. 2021-04-24 00:04:56 +02:00
Lightning_A 2c4aa50648 Fix Array.max() navigating to @GDScript.max() etc. 2021-04-23 09:40:24 -06:00
kleonc 4d7f642fb3 Improve some argument names for core types 2021-04-23 15:34:24 +02:00
Rémi Verschelde a2c68d9da7
lightmapper: Disable build if raycast module can't build
We need to propagate the hacky checks from the raycast config to the
lightmapper config, as the failure of a `can_build()` check is not notified to
other modules (which might even be checked further depending on the processing
order in SConstruct).

A more thorough fix would be to change SConstruct to do two loops on modules:
one to check `can_build()` and disable modules which can't build, then another
one to rechecked `can_build()` with the new lineup and do further config.
But there would be more risk for regressions than with this ad hoc hack.

Similar story for the `platform/x11/detect.py` change... oh my eyes :(
2021-04-22 19:12:37 +02:00
Rémi Verschelde b1898c77fb
Merge pull request #48073 from akien-mga/3.x-unbundle-embree
embree: Allow building against system library on Linux
2021-04-22 18:06:49 +02:00
Rémi Verschelde 2a00a6bfca
fbx: Fix include for zlib that broke unbundling
It's possible to link against system zlib on Linux, so we should use system paths.

(cherry picked from commit 93b7406138)
2021-04-22 17:22:18 +02:00
bruvzg 575433b997
Fix crash on GDNative API json generator exit.
(cherry picked from commit a4423c82f8)
2021-04-22 17:21:52 +02:00
Rémi Verschelde b266cc2315
embree: Allow building against system library on Linux 2021-04-22 17:06:28 +02:00