Commit Graph

1198 Commits

Author SHA1 Message Date
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
78b4ec2d4d Increase compiler optimization when using target=release on iOS/Android 2022-05-13 01:12:20 +02:00
d36c5514d3 Fix ZipIO crash when reused (and possible leaks). 2022-05-11 16:08:17 +03:00
3894b08d0d Merge pull request #60553 from madmiraal/separate-display_safe_area 2022-05-03 11:20:46 +02:00
c9ce4069a3 Merge pull request #60601 from touilleMan/gdextension_get_library_path
Add GDNativeInterface::get_library_path to GDExtension
2022-05-03 08:13:34 +02:00
d56462d82a Merge pull request #60638 from m4gr3d/support_hand_tracking_v2_main 2022-05-02 09:51:21 +02:00
97e87a2daf Fix screen_get_usable_rect returning display safe area 2022-05-02 09:31:32 +02:00
bc7ccc909b Merge pull request #60551 from madmiraal/implement-3466
Add a method for obtaining display cutouts on Android
2022-05-02 07:56:41 +02:00
80f61352fb Add GDNativeInterface::get_library_path to GDExtension 2022-04-29 00:51:04 +02:00
cbdc33bcf7 Merge pull request #60563 from madmiraal/fix-60562 2022-04-29 00:30:30 +02:00
6ab672d1ef Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and Windows.
Implement TextServer word break method.
2022-04-28 14:35:41 +03:00
c63ca6c72b Update Meta hand tracking version
https://developer.oculus.com/blog/presence-platforms-hand-tracking-api-gets-an-upgrade/
2022-04-27 20:56:24 -07:00
5924e2b90e Check for null when retrieving clip data item text on Android 2022-04-27 16:12:33 +02:00
8dfa12cae7 Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
71ce5857ec Add a method for obtaining display cutouts on Android 2022-04-26 13:51:21 +02:00
d9f7da2230 Merge pull request #60433 from madmiraal/remove-superfluous-null-check
Remove superfluous null check
2022-04-25 16:02:40 +02:00
b4a1a76bce Merge pull request #60457 from madmiraal/replace-index-iterators
Replace index iterators with for each loops.
2022-04-25 16:02:28 +02:00
5e599d7c22 Merge pull request #60441 from madmiraal/remove-superfluous-inputmanager
Remove superfluous Android InputManager interface and implementation
2022-04-25 15:41:55 +02:00
d167583517 Merge pull request #60434 from madmiraal/remove-superfluous-version-check
Remove superfluous check for minimum Android SDK.
2022-04-25 15:40:33 +02:00
3b1e62bc7c Fix the issue causing the screen to be black after resuming when in low processor mode.
This is done by forcing a redraw and buffers swap when resuming the app.
2022-04-25 00:25:17 -07:00
334ebd7eb7 Replace index iterators with for each loops. 2022-04-23 09:45:44 +02:00
2f225bf2c5 Remove superfluous check for minimum Android SDK. 2022-04-22 18:55:45 +02:00
22ca5b2eba Remove superfluous Android InputManager interface and implementation 2022-04-22 18:52:06 +02:00
988432b8bb Remove superfluous null check 2022-04-22 17:33:27 +02:00
de4c97758a Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
d2ebac3a30 Remove or make private FileAccess close() methods. 2022-04-12 14:50:14 +03:00
9381acb6a4 Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
f851c4aa33 Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
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
53317bbe14 Merge pull request #59866 from m4gr3d/update_default_display_scale_main 2022-04-04 19:31:37 +02:00
8eabf77f54 Update the editor display scale based on the device's scaled density 2022-04-04 09:23:43 -07:00
f1a7caf9bb Remove duplicate resizable settings 2022-04-04 09:18:07 -07:00
3f299e9255 Update resize settings:
- Unlock resizing for the Godot Editor
- Add an option to specify whether a game is resizeable for the Godot template
2022-04-04 01:02:10 -07:00
b176b31f5d Fix flickering issues with low processor mode on Android 2022-03-29 12:17:09 -07:00
5711037bf6 Android port of the Godot Editor
These set of changes focus primarily on getting the core logic and overall Godot Editor UI and functionality up and running natively on Android devices.
UI tweaks / cleanup / polish, as well configuration for Android specific functionality / restrictions will be addressed in follow-up PRs iteratively based on feedback.

Co-authored-by: thebestnom <shoval.arad@gmail.com>
2022-03-28 14:04:51 -07:00
5c7971d856 Merge pull request #59146 from m4gr3d/setup_mavencentral_publishing 2022-03-16 17:24:22 +01:00
98d0af7d5c Implement GDExtension export plugin. 2022-03-16 11:16:19 +02:00
a2bf47de2b Setup logic to publish the Godot Android library to MavenCentral 2022-03-14 14:53:39 -07:00
015fdfc28d Merge pull request #58986 from akien-mga/diraccessref 2022-03-11 12:51:22 +01:00
952b71a425 Merge pull request #58751 from bruvzg/loc_str_props 2022-03-11 10:45:02 +01:00
768f9422bc Convert uses of DirAccess * to DirAccessRef to prevent memleaks
`DirAccess *` needs to be deleted manually, and this is often forgotten
especially when doing early returns with `ERR_FAIL_COND`.
`DirAccessRef` is deleted automatically when it goes out of scope.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-03-11 09:13:11 +01:00
21637dfc25 Remove VARIANT_ARG* macros
* Very old macros from the time Godot was created.
* Limited arguments to 5 (then later changed to 8) in many places.
* They were replaced by C++11 Variadic Templates.
* Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard.
* Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-03-09 18:39:13 +01:00
9b05f29894 Remove unused GDNative code
This has been superseded by GDExtension so this code is no longer useful
nor usable.

There's still some GDNative-related stuff in platform export code which
needs to be adapted for GDExtension (e.g. to include GDExtension libraries
in exports).
2022-03-09 13:59:03 +01:00
ccd4cdfd8b Rename StreamTexture* to CompressedTexture*
* Its not and will not be used for streaming.
* Streaming will be implemented in 4.1 and it will work different.
* It makes more sense to be called CompressedTexture since it imports and compresses texture files.
2022-03-05 16:43:38 +01:00
12cb6386f6 Improve app name and system permission message localization.
Add localizable string (Dictionary<Lang Code, String>) property editor and property hint.
Add localized "app name" property to the project settings.
Add localized permission and copyright properties to the macOS and iOS export settings.
Remove some duplicated ("app name") and deprecated ("info") macOS and iOS export properties.
2022-03-04 18:11:31 +02:00
b8b4580448 Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
11572c6e30 Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
1bdb82c64e Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
2e320dcf87 Merge pull request #57617 from bruvzg/char_cleanup 2022-02-04 13:06:38 +01:00