Commit graph

1854 commits

Author SHA1 Message Date
Pedro J. Estébanez 00e98458ba Revert "Unify http- and percent- encode/decode"
This reverts commit b76ee30917.
2018-04-12 21:12:34 +02:00
Crazy-P 68dda540fd Fixes incorrect adding to last in self_list
Fixes https://github.com/godotengine/godot/issues/18052
2018-04-11 19:59:41 +08:00
Ruslan Mustakov 1d9a3a9b1c iPhone X support and iOS-related fixes
Starting from April 2018 Apple no longer accepts apps that do not
support iPhone X. For games this mainly means respecting the safe area,
unobstructed by notch and virtual home button. UI controls must be
placed within the safe area so that users can interact with them.

This commit:

- Adds OS::get_window_safe_area method that returns unobscured area of
  the window, where interactive controls should be rendered.

- Reorganizes how launch screens are exported - the previous way was
  incorrect and modern iPhones did not pick up the correct screens and
  because of that used a non-native resolution to render the game.

- Adds launch screen options for iPhone X.

- Makes launch screens optional in the export template. If not
  specified, a white screen will be used.

- Adds App Store icon (1024x1024) export option as it now has to be
  bundled with the app instead of being provided in iTunes Connect.

- Fixes crash when launching games in iOS Simulator. It happened because
  controllerWasConnected callback came before the engine was
  initialized. Now in such case the controllers will be queued up and
  registered after initialization is done.

- Fixes issue with the virtual keyboard where for some reason
  autocorrection panel would intersect with the keyboard itself and not
  allow you to use the top row of the keyboard. This is fixed by
  disabling autocorrection altogether.

Closes #17358. Fixes #17428. Fixes #17331.
2018-04-11 14:53:24 +07:00
Poommetee Ketson 72aa87758a
Update classref and docs, fix missing parameters' name 2018-04-11 10:20:22 +07:00
Guilherme Felipe 4f05190fb0 Implement Input.set_default_cursor_shape to change the default shape
Closes #18043
2018-04-10 11:38:34 -03:00
Crazy-P ae7a9df292 Resolves Inccorect Quaternion Conversion
Fixes https://github.com/godotengine/godot/issues/18025
2018-04-09 14:48:03 +08:00
Juan Linietsky cef01f1f49
Merge pull request #16495 from Chaosus/is_point_in_triangle_fix
Fix is_point_in_triangle function
2018-04-08 18:18:19 -03:00
Juan Linietsky 59cdc5eb9d
Merge pull request #16898 from Lerc/master
add Image::bumpmap_to_normalmap conversion function
2018-04-08 15:52:05 -03:00
Juan Linietsky e9e5aa617e
Merge pull request #17227 from Faless/multiplayer_api
[RFC] MultiplayerAPI refactor
2018-04-08 11:04:16 -03:00
Juan Linietsky 1faea81e15
Merge pull request #17232 from playster000/master
enhance mipmaps, non power of 2 textures
2018-04-08 10:49:13 -03:00
Juan Linietsky 4ee3f3251d
Merge pull request #17382 from bojidar-bg/13971-path-array-unsaved
Duplicate Arrays and Dictionaries when instancing scene in editor
2018-04-08 09:39:03 -03:00
Juan Linietsky 47ffe107e6
Merge pull request #17967 from Nibodhika/all-device-mode
Allows to map an action to all devices.
2018-04-08 09:04:14 -03:00
Nibodhika 1e28f63bcf Allows to map an action to all devices.
This is accomplished by setting a special value (-1) to the device variable
in the InputEvent that's being used to compare with the one received from the OS.

This special value is invalid for a regular input, so it should be safe.
Implements #17942
2018-04-07 20:08:09 +00:00
Juan Linietsky cd7e9d9642
Merge pull request #17583 from RandomShaper/enhance-uri-utils
Enhance uri utils
2018-04-07 17:07:29 -03:00
Juan Linietsky 5a1a90c3db
Merge pull request #17636 from rainerdeyke/fix_issue_17585
Fixes moving files causes scene corruption
2018-04-07 16:56:02 -03:00
Andrea Catania 2f9354016f
Fixed signal input variable name 2018-04-06 09:09:40 +02:00
Pedro J. Estébanez 1fc85b87bd Fix buggy percent-encoding
Fixes #17875.
2018-04-05 21:49:44 +02:00
Rémi Verschelde 866254343b
Merge pull request #17827 from bruvzg/macos_shortcut_key_remapping_fix
[macOS] Fix keyboard shortcuts on non QWERTY keyboard layouts.
2018-04-05 13:22:52 +02:00
Rémi Verschelde 1710582473
Merge pull request #17847 from Faless/lws_update
LWS v2.4.2, mbedTLS v2.8.0, Websocket  SSL support
2018-04-03 23:14:01 +02:00
Felix Yang 7d5a40c3e6 Ctrl+Clicking a enum now scrolls down to it in the docs. 2018-04-03 21:56:54 +02:00
Fabio Alessandrelli 490dd9f946 Generalize SSL cert reading from file 2018-04-03 20:13:57 +02:00
bruvzg 5ba984fc8c
[macOS] Fix keyboard shortcuts on non QWERTY keyboard layouts. 2018-03-28 20:22:59 +03:00
Pedro J. Estébanez 8d8e9d54c8 Enhance HTTPClient.query_string_from_dict() 2018-03-27 19:18:32 +02:00
Pedro J. Estébanez b76ee30917 Unify http- and percent- encode/decode
There was a percent-prefixed version, which was exposed, and a http-prefixed version which was not (only to GDNative).
This commit keeps the percent-prefixed versions, but with the http-prefixed implementations.
2018-03-27 19:18:30 +02:00
Rainer Deyke 31c6d6649f Fixes scene corruption when updating dependencies.
This commit fixes issue #17585: renaming/moving resources can corrupt
scene files.  The corruption was caused by
'ResourceFormatLoaderBinary::rename_dependencies' updating the file
format version field of the affected scene file to the latest version
without actually updating the content of the file to that version,
resulting in a file whose content does not match its file format version
field.  The fix preserves the file format version field and the engine
version fields when renaming dependencies.
2018-03-24 15:08:55 +01:00
Marcelo Fernandez bbd21c2203 Fix for clang warning at distance_to 2018-03-22 13:26:04 -03:00
Marcelo Fernandez 35d21c0881 Fix several in-class initialization clang warning 2018-03-22 00:17:18 -03:00
Rémi Verschelde baa092e99d
Merge pull request #17653 from eska014/rwlock-dummy
Add RWLockDummy for NO_THREADS builds
2018-03-21 17:40:01 +01:00
Leon Krause 25800ffb0e Add RWLockDummy for NO_THREADS builds 2018-03-20 05:37:42 +01:00
Pedro J. Estébanez 536611704a Fix listing files inside directory in pack file
When adding a directory path to the inventory of the pack, an empty file name was being added to the file list. That made `Directory.get_ntext()` signal end-of-list too early so that files in a subdirectory were missed.

Fixes #15801.
Helps with #16798.
2018-03-18 14:04:50 +01:00
Fabio Alessandrelli c531262190
Merge pull request #16947 from Faless/ui_actions
GUI elements ui_action usage, improvements
2018-03-16 20:55:11 +01:00
Fabio Alessandrelli b0186b41bb
Merge pull request #17237 from RandomShaper/fix-ssl-handshake
Fix HTTPClient SNI support when verify is off
2018-03-15 22:43:34 +01:00
Neil Graham 4bea98de40 change bumpmap_to_normalmap range from [1...255] to [0...255] 2018-03-16 10:22:48 +13:00
Hein-Pieter van Braam 9bc0503c91
Merge pull request #17376 from marcelofg55/file_get_path
Added File.get_path and File.get_path_absolute functions
2018-03-15 22:21:21 +01:00
Hein-Pieter van Braam f8706cbdf2
Merge pull request #17407 from poke1024/fix-hsv-mismatch
Fix mismatch between Color.h and Color.from_hsv()
2018-03-15 22:16:57 +01:00
Rémi Verschelde 99c1323a08
Merge pull request #17388 from Hinsbart/mono_class_name
Mono: Avoid invalid class names.
2018-03-15 19:47:39 +01:00
Andreas Haas 700d07cf7c
Mono: Avoid invalid class names.
Disallow reserved keywords as class names and prefix base class with the Godot
namespace if it's the same as the class name.

Fixes #12483
2018-03-15 19:25:06 +01:00
Bernhard Liebl 1d3b5d5a2f Fix mismatch between Color.h and Color.from_hsv() 2018-03-14 21:04:02 +01:00
Rémi Verschelde b64d4e3a83
Merge pull request #17486 from bojidar-bg/x-fix-clang-negation-warn
Fix a potential bug hinted by clang
2018-03-13 20:02:42 +01:00
Bojidar Marinov 9f6c0c6eae
Duplicate Arrays and Dictionaries when instancing scene in editor
Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate

Fixes #13971
2018-03-13 17:18:08 +02:00
Bojidar Marinov 4d81e8afe6 Fix a potential bug hinted by clang 2018-03-13 17:10:28 +02:00
Marcelo Fernandez a4e64c5454 Added File.get_path and File.get_path_absolute functions 2018-03-13 12:07:37 -03:00
Rémi Verschelde b4da44981a
Merge pull request #17254 from Chaosus/updatewrap
Update wrap functions
2018-03-13 12:33:57 +01:00
Rémi Verschelde ced5b57a60
Merge pull request #17257 from and3rson/master
Fix garbage in string padding.
2018-03-13 12:30:42 +01:00
Rémi Verschelde 18d543d7ab
Merge pull request #17311 from marcelofg55/export_err_checks
Improved error checking at EditorExportPlatformPC::export_project
2018-03-13 12:17:53 +01:00
Rémi Verschelde 4287c7822b
Merge pull request #17440 from viktor-ferenczi/issue-5042
Properly closing all files in Python build code
2018-03-13 11:49:58 +01:00
Rémi Verschelde 08415d0f53
Merge pull request #17319 from eska014/polyclipper-toolsonly
Build polygon clipper only in tools builds
2018-03-13 11:01:28 +01:00
robfram ea94a82596 Fix non working action names containing whitespaces
Now the action name is quoted if it contains spaces. Also, quotation
mark (") is added to the forbidden character list for action names, as
it was also a bug.

Fix #17322
2018-03-12 21:28:41 +01:00
Viktor Ferenczi 272ecddb28 Properly closing all files in Python code 2018-03-11 14:55:50 +01:00
Rémi Verschelde 8ded15b035
Merge pull request #16485 from poke1024/vector2-cross
Bring back Vector2.cross()
2018-03-08 08:50:20 +01:00
Bernhard Liebl 9d7856620c Bring back Vector2.cross() 2018-03-07 21:10:31 +01:00
Leon Krause 802b6d3669 Reinstate WebGL 1.0 driver in HTML5 platform 2018-03-07 20:38:14 +01:00
Leon Krause fa760082f5 Build polygon clipper only in tools builds 2018-03-06 21:53:37 +01:00
Marcelo Fernandez 0876502f72 Improved error checking at EditorExportPlatformPC::export_project 2018-03-06 14:23:17 -03:00
Chaosus 70bb31a7b2 Update wrap functions 2018-03-06 10:34:37 +03:00
Andrew Dunai 0269e366f1 Fix garbage in string padding. 2018-03-04 19:45:33 +02:00
Marcelo Fernandez d780d774aa Clean and expose get_audio/video_driver_* funcs on OS class 2018-03-04 14:18:05 -03:00
Pedro J. Estébanez 602da6fa4f Fix wrong SSL handshake
The name of the remote host is passed to mbed TLS in all cases so the client hello message is correctly formed.
2018-03-04 01:22:59 +01:00
Mavropoulos Ioannis 60b2ee1624 enhance mipmaps 2018-03-03 23:19:31 +02:00
Fabio Alessandrelli df391cc5be Add new MultiplayerAPI class
Handles all the high level networking stuff
2018-03-03 18:28:49 +01:00
Nicolas Silva e73266a51c Allow degenerate triangles in polygon triangulation when necessary. 2018-02-28 22:46:56 -05:00
Hein-Pieter van Braam d702d7b335 Fix various valgrind reported uninitialized variable uses 2018-02-28 21:55:13 +01:00
Ignacio Etcheverry f37090ccf4 Mono: Better versioning and gracefully unloading of Godot API assemblies 2018-02-25 20:56:27 +01:00
Poommetee Ketson 67e20dc2b6 (Magnify|Pan)Gesture: implement as_text 2018-02-24 10:35:25 +07:00
Neil Graham 617d3cde1a change to clang format 2018-02-24 13:59:02 +13:00
Rémi Verschelde 23ebae01dc Refactor version macros and fix related bugs
The previous logic with VERSION_MKSTRING was a bit unwieldy, so there were
several places hardcoding their own variant of the version string, potentially
with bugs (e.g. forgetting the patch number when defined).

The new logic defines:

- VERSION_BRANCH, the main 'major.minor' version (e.g. 3.1)
- VERSION_NUMBER, which can be 'major.minor' or 'major.minor.patch',
  depending on whether the latter is defined (e.g. 3.1.4)
- VERSION_FULL_CONFIG, which contains the version status (e.g. stable)
  and the module-specific suffix (e.g. mono)
- VERSION_FULL_BUILD, same as above but with build/reference name
  (e.g. official, custom_build, mageia, etc.)
  Note: Slight change here, as the previous format had the build name
  *before* the module-specific suffix; now it's after
- VERSION_FULL_NAME, same as before, so VERSION_FULL_BUILD prefixed
  with "Godot v" for readability

Bugs fixed thanks to that:

- Export templates version matching now properly takes VERSION_PATCH
  into account by relying on VERSION_FULL_CONFIG.
- ClassDB hash no longer takes the build name into account, but limits
  itself to VERSION_FULL_CONFIG (build name is cosmetic, not relevant
  for the API hash).
- Docs XML no longer hardcode the VERSION_STATUS, this was annoying.
- Small cleanup in Windows .rc file thanks to new macros.
2018-02-23 20:15:29 +01:00
Fabio Alessandrelli 920d2bfdfa Add two new default actions ui_end, ui_home
Used by Slider and Scrollbar
2018-02-23 13:01:28 +01:00
Poommetee Ketson f4f92b55e1 Color:fix setting V switch S to old V value 2018-02-22 16:43:00 +07:00
luz.paz 612ab4bbc6 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
Juan Linietsky 9e3a1e5401 Add base support for 2D meshes in Godot, including Sprite -> Mesh2D conversion. 2018-02-21 09:39:09 -03:00
Rémi Verschelde 57d562b394 Fix loading project.binary from PCK file
Regression introduced in #16825.
My logic was correct, but not the error code I was expecting.
The error reporting in FileAccess likely needs a review too.
2018-02-21 09:07:59 +01:00
Neil Graham bc7db7a08d add Image::bumpmap_to_normalmap conversion function 2018-02-21 11:43:58 +13:00
Rémi Verschelde 37a6ce5a42
Merge pull request #15563 from poke1024/gdscript-shuffle
Add shuffle() method to Array
2018-02-19 21:53:08 +01:00
Rémi Verschelde 7455244866
Merge pull request #15852 from poke1024/color_hsv
Add Color.from_hsv()
2018-02-19 21:51:04 +01:00
Rémi Verschelde 7839076f95 Improve error reporting of ProjectSettings::setup()
And use it to better report errors in the console and project manager
when a project.godot file is corrupted.

Fixes #14963.
2018-02-19 16:41:43 +01:00
Artem Varaksa d35e486228 Clean up some bad words from code comments 2018-02-17 16:00:39 +03:00
Rémi Verschelde 0c7bed45c4 Add locale renames for Hebrew and Indonesian on Windows
Windows does not fully respect ISO 639-1 like other systems,
so we have to override its locale values for those languages.

Also added comments to document the locale provenance.
2018-02-14 18:49:27 +01:00
Rémi Verschelde e0f43e0678
Merge pull request #15564 from RandomShaper/adpod-topmost
Add new window setting: always on top
2018-02-14 16:43:40 +01:00
Rémi Verschelde 574133e4e0
Merge pull request #15892 from Zylann/add_missing_vs_bindings
Added all missing VisualServer bindings
2018-02-14 16:05:49 +01:00
Rémi Verschelde b48cc669e2
Merge pull request #16169 from hungrymonkey/issue_16160
Change function signature from float to double to match type get_doub…
2018-02-14 15:50:47 +01:00
Fabio Alessandrelli 67b600d957 Add mbedtls module 2018-02-14 01:26:23 +01:00
Marcelo Fernandez ea1d726a46 Added OS::center_window to center the window precisely on desktop platforms 2018-02-12 15:45:41 -03:00
Ibrahn Sahir 95dfa5b96d fix for segfault when using CallBasic in visual script on release build 2018-02-12 17:09:00 +00:00
Chaosus f2c22791ce Fix is_point_in_triangle 2018-02-08 19:59:52 +03:00
Rémi Verschelde cbdd410a6f
Merge pull request #15899 from karroffel/stringbuffer-template-arg
add template argument for size in StringBuffer
2018-02-07 11:37:10 +01:00
Nicolas Silva 91215e1919 Fix polygon triangulation failure.
The ear clipping algorithm used to triangulate polygons has a slightly too conservative point-in-triangle test which can, in some configurations prevent it from finding a possible tessellation. Relaxing the test by considering that points exactly on edges don't belong the triangle fixes the issue. Changing the semantic of the test is safe because no other code makes use of it. A more detailed explanation can be found in issue #16395.

Fixes #16395.
2018-02-05 16:01:24 +01:00
Hein-Pieter van Braam e836a7d88d Kill an old debugging message
When running the engine with -d we get a message on the command-line for
each control being clicked. After discussing with @reduz it seems that
this is old and should be removed. Commented out as requested.
2018-02-05 11:18:49 +01:00
Timur Celik c16f61190c Fix broken variant call of Vector3.snapped 2018-02-03 19:57:12 +01:00
Paolo Perkovic 08d4bfacaf Fix inconsistencies and typos in argument names 2018-02-01 16:47:20 +01:00
Rémi Verschelde 906ac2fc9d
Merge pull request #16002 from bruvzg/mono_loading_form_res
[Mono] Allow loading assemblies (including mscorlib) from resources.
2018-02-01 14:36:05 +01:00
Rémi Verschelde e7cf2b2e77
Merge pull request #16188 from Schweigert/master
Display set_nodelay to GDScript
2018-01-31 17:26:12 +01:00
bruvzg b3ddf12fb1
Mono: Allow loading mscorlib from resources. 2018-01-31 09:20:46 +02:00
Marlon Henry Schweigert 87adf9cfba Display set_nodelay to GDScript
Pass enabled arg

Rename set_nodelay to set_no_delay

Add description to the method

Change description
2018-01-30 13:22:15 -02:00
Rémi Verschelde 5b580fb69b
Merge pull request #15995 from GodotExplorer/pr-debugger-weakref
Remote debugger send the real instance of WeakRef referenced to
2018-01-30 13:43:02 +01:00
Poommetee Ketson ebe2337515 Fix wrong return type of xform functions 2018-01-30 18:45:54 +07:00
hungrymonkey d2f1c87063 Change function signature from float to double to match type get_doubleCloses #16160 2018-01-29 15:45:46 -08:00
Hein-Pieter van Braam 7577252b1b Use the appropriate Variant hash and compare functions for Dictionaries
Dictionaires did not use the VariantHasher and VariantComparator making
them unsafe for use with NaN values as keys. This PR uses the
appropriate Variant implementations for these functions.

   var d = {}
   d[Vector2(NAN, NAN)] = 0
   d[Vector2(NAN, NAN)] = 0
   print(d.size())

will now output '1' and not '2'

This fixes #16031
2018-01-27 15:11:39 +01:00
Ariel Manzur 81426ff0a8 - Improves portability in joystick buttons enum
- Fixes linking bug in modules split library
2018-01-24 19:12:54 -03:00
Rémi Verschelde 5342ec32b5
Merge pull request #15844 from letheed/better-error-msg
Make cyclic resource inclusion error message more helpful
2018-01-24 11:52:52 +01:00
Geequlim 10f0451cc2 Remote debugger send the real instance of WeakRef referenced to 2018-01-23 17:17:35 +08:00