Commit graph

2445 commits

Author SHA1 Message Date
Andrea Catania
5328dcb7bb Improved trimesh stability 2018-10-05 15:15:54 +02:00
zochris
b84992e374
loosen generic guard on Node extension methods
For more details see #22658
2018-10-05 15:06:05 +02:00
Andrea Catania
62fc66291b Removed wrong equal vertex thresold to GJK solver 2018-10-05 10:51:24 +02:00
Andrea Catania
821bc40dc8 Added correct allowed penetration parameter to cast motion API 2018-10-05 10:44:10 +02:00
Simon Wenner
10718b0961 Fix some cppcheck errors
cppcheck: fix broken pre-processor statement
cppcheck: fix Uninitialized struct members in canvas editor plugin
cppcheck: fix uninitialized struct member: method_api.is_virtual
2018-10-04 18:16:04 +02:00
Rémi Verschelde
f48ee838e7 Fix GCC 8 warnings about potentially unitialized variables
Fixes the following GCC 8 warnings:
```
core/image.cpp:730:44: warning: 'mip1_weight' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/image.cpp:293:20: warning: 'mip2' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/image.cpp:293:20: warning: 'mip1' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/audio_stream_preview.cpp:58:19: warning: 'vmax' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/audio_stream_preview.cpp:85:19: warning: 'vmin' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/editor_themes.cpp:306:53: warning: 'preset_contrast' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/plugins/animation_blend_space_2d_editor.cpp:459:27: warning: 'prev_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/plugins/animation_blend_space_2d_editor.cpp:443:27: warning: 'prev_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
main/tests/test_oa_hash_map.cpp:57:29: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]
modules/csg/csg.cpp:764:40: warning: 'max_angle' may be used uninitialized in this function [-Wmaybe-uninitialized]
modules/csg/csg_shape.cpp:1945:3: warning: 'face_count' may be used uninitialized in this function [-Wmaybe-uninitialized]
scene/3d/voxel_light_baker.cpp:1593:8: warning: 'cone_aperture' may be used uninitialized in this function [-Wmaybe-uninitialized]
scene/3d/voxel_light_baker.cpp:1592:6: warning: 'cone_dir_count' may be used uninitialized in this function [-Wmaybe-uninitialized]
scene/animation/animation_blend_space_2d.cpp:471:8: warning: 'mind' may be used uninitialized in this function [-Wmaybe-uninitialized]

core/os/memory.cpp:94: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
core/os/memory.cpp:95: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
core/os/memory.cpp:98: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
```
2018-10-04 13:08:41 +02:00
Rémi Verschelde
97b9697ea2 Fix some OSX and iOS Clang warnings
Fixes the following XCode 9.4.1 warnings:
```
core/os/memory.cpp:175:13: warning: unused variable 's' [-Wunused-variable]
drivers/coremidi/core_midi.cpp:68:14: warning: comparison between NULL and non-pointer ('MIDIEndpointRef' (aka 'unsigned int') and NULL) [-Wnull-arithmetic]
drivers/gles2/rasterizer_gles2.cpp:77:24: warning: unused function '_gl_debug_print' [-Wunused-function,34]
drivers/unix/thread_posix.cpp:106:12: warning: unused variable 'running_thread' [-Wunused-variable,34]
modules/gdnative/nativescript/nativescript.h:371:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
platform/iphone/gl_view.mm:56:14: warning: unused variable 'video_previous_volume' [-Wunused-variable,34]
platform/iphone/gl_view.mm:251:12: warning: unused function 'get_first_id' [-Wunused-function,34]
platform/iphone/main.m:45:15: warning: unused variable 'app' [-Wunused-variable,34]
platform/osx/os_osx.mm:79:15: warning: unused function 'convertRectToBacking' [-Wunused-function]
```
2018-10-04 11:50:16 +02:00
Rémi Verschelde
e9cb01e366 Fix warnings about non-static data member initializers in nativescript
Fixes the following GCC/Clang warnings:
```
modules/gdnative/nativescript/nativescript.h:280:37: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
modules/gdnative/nativescript/nativescript.h:281:37: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
modules/gdnative/nativescript/nativescript.h:283:42: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
modules/gdnative/nativescript/nativescript.h:285:38: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
modules/gdnative/nativescript/nativescript.h:287:38: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
modules/gdnative/nativescript/nativescript.h:290:45: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
modules/gdnative/nativescript/nativescript.h:291:44: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
```
2018-10-04 09:59:49 +02:00
Simon Wenner
45498caa49 load JPG images as rbg instead of rgba, fixes #21867 2018-10-04 00:12:00 +02:00
Ignacio Etcheverry
d7ece43b74 Mono: Editor and export template dependencies and fixes
- Bundle editor dependencies:
    - 'GodotSharp': Root data directory for the editor
        - 'Tools': Editor dependencies. Only GodotSharp.dll for now.
        - 'Api': Prebuilt GodotSharp and GodotSharpEditor API assemblies.
        - 'Mono': Mono files to bundle with the editor.
            - 'bin': (Optional, not used for now) Mono bin directory.
            - 'etc': Mono configuration files.
            - 'lib': Mono dependency shared libraries.
            - 'lib/mono/4.5': Framework assemblies.
    - Added build option to copy the required files from the mono installation to 'GodotSharp/Mono'. Enable with 'copy_mono_root=yes'. Disabled by default.

- Export template dependencies:
    - 'data_AppName'/'data_Godot':
        - 'Mono': Mono files to bundle with the game.
            - 'etc': Mono configuration files.
            - 'lib': Mono dependency shared libraries.
    - The data directory is generated when compiling and must be bundled with the export templates. In the case of OSX, the data directory must be placed inside the 'osx.zip' export template.
    - In OSX, alternative location for directories (needed for app bundles) are:
        - 'data_AppName/Mono/etc' --> '../Resources/GodotSharp/Mono/etc'
        - 'data_AppName/Mono/lib' --> '../Frameworks/GodotSharp/Mono/lib'

- The editor can bundle prebuilt API assemblies.
    - Generate them with a tools build by running: `--generate-cs-core-api <GodotSharp_OutputDir> --generate-cs-editor-api <GodotSharpEditor_OutputDir> <GodotSharp_OutputDir>/bin/Release/GodotSharp.dll` (This command will be simplified in the future and both projects will be in the same solution)
    - Build the solutions and copy the output files to '#bin/GodotSharp/Api'.
- Fixed API assembly being added twice during the export process.
2018-10-03 19:16:29 +02:00
Rémi Verschelde
344a453bb8
Merge pull request #22681 from akien-mga/fix-warnings
Fix warnings on release builds and some MSVC warnings
2018-10-03 19:05:55 +02:00
Rémi Verschelde
95131e6f23 Fix warnings on release builds (not DEBUG_ENABLED)
Fixes the following Clang 5 warnings:
```
modules/bmp/image_loader_bmp.cpp:46:60: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
modules/bmp/image_loader_bmp.cpp:48:61: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
drivers/png/image_loader_png.cpp:231:20: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
scene/gui/graph_edit.cpp:1045:8: warning: comparison of constant 0 with expression of type 'bool' is always false [-Wtautological-constant-out-of-range-compare]

core/class_db.cpp:812:13: warning: unused variable 'check' [-Wunused-variable]
core/io/file_access_pack.cpp:172:11: warning: unused variable 'ver_rev' [-Wunused-variable]
core/math/bsp_tree.cpp:195:13: warning: unused variable 'plane' [-Wunused-variable]
core/math/bsp_tree.cpp:168:6: warning: unused variable 'plane_count' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:685:10: warning: unused variable 'ok' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:706:10: warning: unused variable 'ok' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:755:19: warning: unused variable 'var_type' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:1306:12: warning: unused variable 'err' [-Wunused-variable]

modules/gdscript/gdscript_function.cpp:158:15: warning: unused function '_get_var_type' [-Wunused-function]
modules/gdscript/gdscript_parser.cpp:750:20: warning: unused variable 'lv' [-Wunused-variable]
modules/gdscript/gdscript_parser.cpp:59:15: warning: unused function '_find_function_name' [-Wunused-function]
scene/main/node.cpp:2489:13: warning: unused function '_Node_debug_sn' [-Wunused-function]
```
2018-10-03 17:34:55 +02:00
qonnop
a93edeb307 Fixed DDS loader according to issue #22530
width and height attributes have to be switched according to the
official DDS header docs:
https://docs.microsoft.com/en-us/windows/desktop/direct3ddds/dds-header
2018-10-03 17:11:14 +02:00
Rémi Verschelde
d952126caf Fix warnings in Android platform
Fixes the following Clang 7 warnings:
```
platform/android/os_android.h:240:16: warning: 'OS_Android::native_video_play' hides overloaded virtual function [-Woverloaded-virtual]
platform/android/os_android.h:241:15: warning: 'OS_Android::native_video_is_playing' hides overloaded virtual function [-Woverloaded-virtual]

platform/android/audio_driver_opensl.cpp:104:3: warning: suggest braces around initialization of subobject [-Wmissing-braces]

platform/android/audio_driver_opensl.cpp:129:10: warning: unused variable 'numOutputs' [-Wunused-variable]
platform/android/audio_driver_opensl.cpp:130:11: warning: unused variable 'deviceID' [-Wunused-variable]
platform/android/java_glue.cpp:795:10: warning: unused variable 'clsio' [-Wunused-variable]
platform/android/java_glue.cpp:890:12: warning: unused variable 'gob' [-Wunused-variable]
platform/android/java_glue.cpp:592:13: warning: unused variable 'resized' [-Wunused-variable]
platform/android/java_glue.cpp:593:13: warning: unused variable 'resized_reload' [-Wunused-variable]

modules/mobile_vr/mobile_vr_interface.cpp:401:8: warning: unused variable 'aspect_ratio' [-Wunused-variable]

drivers/unix/dir_access_unix.cpp:394:2: warning: THIS IS BROKEN [-W#warnings]
```
2018-10-03 15:17:00 +02:00
Rémi Verschelde
f8484bb77d
Merge pull request #22672 from akien-mga/fix-warnings
Fix various warnings reported by CI in #22620
2018-10-03 15:09:00 +02:00
Rémi Verschelde
60688c3fe7 Fix GDNative build warning on Android [-Wignored-attributes]
Fixes the following kind of warning spam:
```
modules/gdnative/include/gdnative/color.h:61:6: warning: calling convention 'sysv_abi' ignored for this target [-Wignored-attributes]
void GDAPI godot_color_new_rgba(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b, const godot_real p_a);
     ^
modules/gdnative/include/gdnative/gdnative.h:52:15: note: expanded from macro 'GDAPI'
              ^
modules/gdnative/include/gdnative/gdnative.h:51:38: note: expanded from macro 'GDCALLINGCONV'
                                     ^
```
2018-10-03 14:23:04 +02:00
Rémi Verschelde
6ab78d9ffb Fix some more warnings reported by CI
Fixes the following Clang 7 warnings:
```
core/io/marshalls.cpp:872:10: warning: unused variable 'f' [-Wunused-variable]

core/ustring.cpp:1831:2: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
core/ustring.cpp:1832:2: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]

drivers/gles3/rasterizer_gles3.cpp:82:24: warning: unused function '_gl_debug_print' [-Wunused-function,34]

main/main.cpp:118:13: warning: unused variable 'auto_build_solutions' [-Wunused-variable]

modules/csg/csg_gizmos.cpp:225:46: warning: 'current' may be used uninitialized in this function [-Wmaybe-uninitialized]
```
2018-10-03 14:13:42 +02:00
Rémi Verschelde
bb1503c3b7
Merge pull request #22666 from JFonS/noisetexture_remove_size
Remove redundant size property from NoiseTexture
2018-10-03 11:36:10 +02:00
JFonS
e14ead32dd Remove redundant size property from NoiseTexture 2018-10-03 10:27:24 +02:00
Rémi Verschelde
64962fe605
Merge pull request #22653 from neikeq/mono-mod-fix-gcc-warnings
Fix GCC compiler warning in mono module
2018-10-03 08:43:43 +02:00
Ignacio Etcheverry
2c8980f44c Fix GCC compiler warning in mono module
- thread_local.h: 'delegating constructors only available with -std=c++11 or -std=gnu++11'
- mono_reg_utils.cpp: 'extra tokens at end of #endif directive'
- mono_bottom_panel.cpp: '<fieldB> will be initialized after <fieldA> when initialized here'
- bindings_generator.cpp: 'name lookup of 'i' changed (...) matches this 'i' under ISO standard rules (...) matches this 'i' under old rules (...)'
2018-10-03 00:56:28 +02:00
Bastiaan Olij
a6df366b23 Moving lens distortion shader into drivers and adding GLES2 support 2018-10-02 17:14:43 +10:00
Rémi Verschelde
b1b625f4f5 Fix various Clang 7 warnings about unused stuff
Namely:
[-Wunneeded-internal-declaration]
[-Wunused-comparison]
[-Wunused-const-variable]
[-Wunused-function]
[-Wunused-private-fields]

Fixes the following Clang 7 warnings:
```
editor/plugins/script_editor_plugin.cpp:1417:20: warning: function '_find_node_with_script' is not needed and will not be emitted [-Wunneeded-internal-declaration]
editor/scene_tree_dock.cpp:1859:14: warning: function '_find_last_visible' is not needed and will not be emitted [-Wunneeded-internal-declaration]

modules/gdscript/gdscript_parser.cpp:7838:19: warning: equality comparison result unused [-Wunused-comparison]

scene/resources/mesh.cpp:549:35: warning: unused variable '_array_types' [-Wunused-const-variable]
scene/resources/mesh.cpp:563:18: warning: unused variable '_format_translate' [-Wunused-const-variable]

drivers/gles3/rasterizer_scene_gles3.cpp:54:28: warning: unused function 'store_transform2d' [-Wunused-function]

core/io/file_access_network.h:50:6: warning: private field 'ml' is not used [-Wunused-private-field]
core/io/file_access_zip.h:93:14: warning: private field 'archive' is not used [-Wunused-private-field]
core/io/resource_format_binary.h:122:6: warning: private field 'bin_meta_idx' is not used [-Wunused-private-field]
core/message_queue.h:47:9: warning: private field 'mutex' is not used [-Wunused-private-field]
main/tests/test_gui.cpp:63:11: warning: private field 'control' is not used [-Wunused-private-field]
modules/gdscript/gdscript_parser.h:558:7: warning: private field 'completion_static' is not used [-Wunused-private-field]
platform/x11/os_x11.h:148:11: warning: private field 'ip_unix' is not used [-Wunused-private-field]
platform/x11/os_x11.h:180:7: warning: private field 'net_wm_icon' is not used [-Wunused-private-field]
platform/x11/os_x11.h:189:6: warning: private field 'audio_driver_index' is not used [-Wunused-private-field]
platform/x11/os_x11.h:190:15: warning: private field 'capture_idle' is not used [-Wunused-private-field]
servers/physics/body_pair_sw.h:79:6: warning: private field 'cc' is not used [-Wunused-private-field]
servers/visual/visual_server_raster.h:62:7: warning: private field 'draw_extra_frame' is not used [-Wunused-private-field]
```
2018-10-01 17:32:12 +02:00
Rémi Verschelde
686f6ff279 Fix mismatched class/struct definition warnings [-Wmismatched-tags]
Fixes the following Clang 7 warnings:
```
core/object.cpp:44:1: warning: '_ObjectDebugLock' defined as a struct here but previously declared as a class [-Wmismatched-tags]
core/variant_call.cpp:43:1: warning: '_VariantCall' defined as a struct here but previously declared as a class [-Wmismatched-tags]
drivers/gles3/rasterizer_storage_gles3.h:765:2: warning: 'MultiMesh' defined as a struct here but previously declared as a class [-Wmismatched-tags]
editor/editor_node.h:794:1: warning: 'EditorProgress' defined as a struct here but previously declared as a class [-Wmismatched-tags]
modules/bullet/rigid_body_bullet.h:230:17: warning: class 'KinematicUtilities' was previously declared as a struct [-Wmismatched-tags]
modules/bullet/space_bullet.h:60:1: warning: class 'btSoftBodyWorldInfo' was previously declared as a struct [-Wmismatched-tags]
scene/resources/world_2d.cpp:40:1: warning: 'SpatialIndexer2D' defined as a struct here but previously declared as a class [-Wmismatched-tags]
scene/resources/world.cpp:39:1: warning: 'SpatialIndexer' defined as a struct here but previously declared as a class [-Wmismatched-tags]
servers/audio/reverb_sw.cpp:60:1: warning: 'ReverbParamsSW' defined as a struct here but previously declared as a class [-Wmismatched-tags]
thirdparty/bullet/BulletSoftBody/btSoftBody.h:43:1: warning: 'btSoftBodyWorldInfo' defined as a struct here but previously declared as a class [-Wmismatched-tags]
```
2018-10-01 17:02:47 +02:00
Rémi Verschelde
6bfb7944d9 SCons: Remove avoidable defines from main env's CPPPATH
Also finally move freetype to its own env and disable warnings for it.
Still needs some work to fix the awkward situation of the freetype and
svg modules used in scene/ and editor/ respectively.
2018-10-01 11:59:22 +02:00
Juan Linietsky
c24277a520 -Many GLES2 optimizations
-Android export fixes (use ETC if GLES2 backend in use)
-revert to thekla atlas because xatlas is not working well
2018-09-30 23:11:24 -03:00
K. S. Ernest (iFire) Lee
8a7c3d1d6b After using the generic visual script search, reset the generic search mode variable to false. 2018-09-30 10:05:16 -07:00
Fabio Alessandrelli
8b2688786f Fix -Wunused-function in websocket module 2018-09-29 22:26:32 +02:00
Rémi Verschelde
62ecb44035 Fix warning about functions defined but not used [-Wunused-function]
Fixes the following GCC 5 warnings:
```
core/io/zip_io.h:128:26: warning: 'zlib_filefunc_def zipio_create_io_from_file(FileAccess**)' defined but not used [-Wunused-function]
core/script_debugger_remote.cpp:110:17: warning: 'ObjectID safe_get_instance_id(const Variant&)' defined but not used [-Wunused-function]
drivers/unix/socket_helpers.h:103:12: warning: 'int _socket_create(IP::Type&, int, int)' defined but not used [-Wunused-function]
drivers/unix/socket_helpers.h:45:15: warning: 'size_t _set_sockaddr(sockaddr_storage*, const IP_Address&, int, IP::Type)' defined but not used [-Wunused-function]
drivers/unix/socket_helpers.h:76:15: warning: 'size_t _set_listen_sockaddr(sockaddr_storage*, int, IP::Type, IP_Address)' defined but not used [-Wunused-function]
editor/editor_fonts.cpp:40:24: warning: 'Ref<BitmapFont> make_font(int, int, int, int, const int*, const Ref<Texture>&)' defined but not used [-Wunused-function]
editor/editor_themes.cpp:85:26: warning: 'Ref<StyleBoxFlat> change_border_color(Ref<StyleBoxFlat>, Color)' defined but not used [-Wunused-function]
editor/import/editor_import_collada.cpp:493:13: warning: 'void _generate_normals(const PoolVector<int>&, const PoolVector<Vector3>&, PoolVector<Vector3>&)' defined but not used [-Wunused-function]
editor/import/editor_import_collada.cpp:524:13: warning: 'void _generate_tangents_and_binormals(const PoolVector<int>&, const PoolVector<Vector3>&, const PoolVector<Vector3>&, const PoolVector<Vector3>&, PoolVector<float>&)' defined but not used [-Wunused-function]
editor/pvrtc_compress.cpp:118:13: warning: 'void _compress_etc(Image*)' defined but not used [-Wunused-function]
modules/etc/image_etc.cpp:89:13: warning: 'void _decompress_etc1(Image*)' defined but not used [-Wunused-function]
modules/etc/image_etc.cpp:93:13: warning: 'void _decompress_etc2(Image*)' defined but not used [-Wunused-function]
modules/gdscript/editor/gdscript_highlighter.cpp:46:13: warning: 'bool _is_whitespace(CharType)' defined but not used [-Wunused-function]
scene/2d/cpu_particles_2d.cpp:510:14: warning: 'float rand_from_seed_m1_p1(uint32_t&)' defined but not used [-Wunused-function]
scene/3d/cpu_particles.cpp:474:14: warning: 'float rand_from_seed_m1_p1(uint32_t&)' defined but not used [-Wunused-function]
scene/resources/default_theme/default_theme.cpp:123:20: warning: 'Ref<Shader> make_shader(const char*, const char*, const char*)' defined but not used [-Wunused-function]
scene/resources/default_theme/default_theme.cpp:130:24: warning: 'Ref<BitmapFont> make_font(int, int, int, int, const int*, const Ref<Texture>&)' defined but not used [-Wunused-function]
```

Had to split `core/io/zip_io.h` into header and .cpp file without 'static' keyword.

Not fixed yet (static definition in header used in some files but not all):
```
modules/websocket/lws_helper.h:111:13: warning: 'void _lws_make_protocols(void*, int (*)(lws*, lws_callback_reasons, void*, void*, size_t), PoolVector<String>, _LWSRef**)' defined but not used [-Wunused-function]
```

Also fixed a couple other warnings missed in previous commits.
2018-09-29 22:26:12 +02:00
Mikko Mustonen
8d31aba24e Fix inconsistent use of tabs and spaces in indentation 2018-09-29 18:03:56 +03:00
Juan Linietsky
6cbdeedf57 Added xatlas as alternative to thekla, forced it on.
Did some hacks to it to avoid it from failing on bad geometry.
2018-09-29 09:46:26 -03:00
Rémi Verschelde
2091f20443 Fix warnings about wrong member initialization order [-Wreorder]
Fixes the following GCC 5 warnings:
```
core/object.h:193:11: warning: 'MethodInfo::flags' will be initialized after [-Wreorder]
core/object.h:192:15: warning:   'PropertyInfo MethodInfo::return_val' [-Wreorder]
core/object.cpp:278:1: warning:   when initialized here [-Wreorder]
core/script_debugger_remote.h:97:6: warning: 'ScriptDebuggerRemote::max_cps' will be initialized after [-Wreorder]
core/script_debugger_remote.h:91:6: warning:   'int ScriptDebuggerRemote::max_messages_per_frame' [-Wreorder]
core/script_debugger_remote.cpp:1086:1: warning:   when initialized here [-Wreorder]
core/script_debugger_remote.h:98:6: warning: 'ScriptDebuggerRemote::char_count' will be initialized after [-Wreorder]
core/script_debugger_remote.h:92:6: warning:   'int ScriptDebuggerRemote::n_messages_dropped' [-Wreorder]
core/script_debugger_remote.cpp:1086:1: warning:   when initialized here [-Wreorder]
modules/bullet/area_bullet.h:102:7: warning: 'AreaBullet::isScratched' will be initialized after [-Wreorder]
modules/bullet/area_bullet.h:92:39: warning:   'PhysicsServer::AreaSpaceOverrideMode AreaBullet::spOv_mode' [-Wreorder]
modules/bullet/area_bullet.cpp:46:1: warning:   when initialized here [-Wreorder]
modules/bullet/collision_object_bullet.h:127:15: warning: 'CollisionObjectBullet::space' will be initialized after [-Wreorder]
modules/bullet/collision_object_bullet.h:117:7: warning:   'CollisionObjectBullet::Type CollisionObjectBullet::type' [-Wreorder]
modules/bullet/collision_object_bullet.cpp:67:1: warning:   when initialized here [-Wreorder]
modules/bullet/godot_ray_world_algorithm.h:48:7: warning: 'GodotRayWorldAlgorithm::m_ownManifol1d' will be initialized after [-Wreorder]
modules/bullet/godot_ray_world_algorithm.h:46:33: warning:   'const btDiscreteDynamicsWorld* GodotRayWorldAlgorithm::m_world' [-Wreorder]
modules/bullet/godot_ray_world_algorithm.cpp:50:1: warning:   when initialized here [-Wreorder]
modules/bullet/godot_result_callbacks.h:91:18: warning: 'GodotAllConvexResultCallback::m_exclude' will be initialized after [-Wreorder]
modules/bullet/godot_result_callbacks.h:89:6: warning:   'int GodotAllConvexResultCallback::m_resultMax' [-Wreorder]
modules/bullet/godot_result_callbacks.h:93:2: warning:   when initialized here [-Wreorder]
modules/bullet/godot_result_callbacks.h:142:18: warning: 'GodotAllContactResultCallback::m_exclude' will be initialized after [-Wreorder]
modules/bullet/godot_result_callbacks.h:140:6: warning:   'int GodotAllContactResultCallback::m_resultMax' [-Wreorder]
modules/bullet/godot_result_callbacks.h:147:2: warning:   when initialized here [-Wreorder]
modules/bullet/godot_result_callbacks.h:168:18: warning: 'GodotContactPairContactResultCallback::m_exclude' will be initialized after [-Wreorder]
modules/bullet/godot_result_callbacks.h:166:6: warning:   'int GodotContactPairContactResultCallback::m_resultMax' [-Wreorder]
modules/bullet/godot_result_callbacks.h:173:2: warning:   when initialized here [-Wreorder]
modules/bullet/godot_result_callbacks.h:195:18: warning: 'GodotRestInfoContactResultCallback::m_exclude' will be initialized after [-Wreorder]
modules/bullet/godot_result_callbacks.h:191:7: warning:   'bool GodotRestInfoContactResultCallback::m_collided' [-Wreorder]
modules/bullet/godot_result_callbacks.h:199:2: warning:   when initialized here [-Wreorder]
modules/bullet/rigid_body_bullet.h:200:9: warning: 'RigidBodyBullet::gravity_scale' will be initialized after [-Wreorder]
modules/bullet/rigid_body_bullet.h:199:9: warning:   'real_t RigidBodyBullet::mass' [-Wreorder]
modules/bullet/rigid_body_bullet.cpp:258:1: warning:   when initialized here [-Wreorder]
modules/bullet/rigid_body_bullet.h:222:28: warning: 'RigidBodyBullet::force_integration_callback' will be initialized after [-Wreorder]
modules/bullet/rigid_body_bullet.h:219:7: warning:   'bool RigidBodyBullet::isTransformChanged' [-Wreorder]
modules/bullet/rigid_body_bullet.cpp:258:1: warning:   when initialized here [-Wreorder]
modules/bullet/rigid_body_bullet.h:220:7: warning: 'RigidBodyBullet::previousActiveState' will be initialized after [-Wreorder]
modules/bullet/rigid_body_bullet.h:208:6: warning:   'int RigidBodyBullet::maxCollisionsDetection' [-Wreorder]
modules/bullet/rigid_body_bullet.cpp:258:1: warning:   when initialized here [-Wreorder]
modules/bullet/soft_body_bullet.h:69:9: warning: 'SoftBodyBullet::total_mass' will be initialized after [-Wreorder]
modules/bullet/soft_body_bullet.h:68:6: warning:   'int SoftBodyBullet::simulation_precision' [-Wreorder]
modules/bullet/soft_body_bullet.cpp:38:1: warning:   when initialized here [-Wreorder]
modules/bullet/soft_body_bullet.h:76:9: warning: 'SoftBodyBullet::drag_coefficient' will be initialized after [-Wreorder]
modules/bullet/soft_body_bullet.h:61:14: warning:   'btSoftBody* SoftBodyBullet::bt_soft_body' [-Wreorder]
modules/bullet/soft_body_bullet.cpp:38:1: warning:   when initialized here [-Wreorder]
modules/bullet/space_bullet.h:97:22: warning: 'SpaceBullet::solver' will be initialized after [-Wreorder]
modules/bullet/space_bullet.h:95:35: warning:   'btDefaultCollisionConfiguration* SpaceBullet::collisionConfiguration' [-Wreorder]
modules/bullet/space_bullet.cpp:333:1: warning:   when initialized here [-Wreorder]
modules/bullet/space_bullet.h:101:23: warning: 'SpaceBullet::soft_body_world_info' will be initialized after [-Wreorder]
modules/bullet/space_bullet.h:99:23: warning:   'btGhostPairCallback* SpaceBullet::ghostPairCallback' [-Wreorder]
modules/bullet/space_bullet.cpp:333:1: warning:   when initialized here [-Wreorder]
modules/gdnative/nativescript/nativescript.h:79:13: warning: 'NativeScriptDesc::base_native_type' will be initialized after [-Wreorder]
modules/gdnative/nativescript/nativescript.h:73:9: warning:   'String NativeScriptDesc::documentation' [-Wreorder]
modules/gdnative/nativescript/nativescript.h:88:9: warning:   when initialized here [-Wreorder]
modules/gdscript/gdscript.h:296:6: warning: 'GDScriptWarning::line' will be initialized after [-Wreorder]
modules/gdscript/gdscript.h:294:4: warning:   'GDScriptWarning::Code GDScriptWarning::code' [-Wreorder]
modules/gdscript/gdscript.h:303:2: warning:   when initialized here [-Wreorder]
scene/3d/physics_body.h:544:7: warning: 'PhysicalBone::simulate_physics' will be initialized after [-Wreorder]
scene/3d/physics_body.h:543:7: warning:   'bool PhysicalBone::_internal_static_body' [-Wreorder]
scene/3d/physics_body.cpp:2502:1: warning:   when initialized here [-Wreorder]
scene/3d/physics_body.h:546:6: warning: 'PhysicalBone::bone_id' will be initialized after [-Wreorder]
scene/3d/physics_body.h:539:12: warning:   'Skeleton* PhysicalBone::parent_skeleton' [-Wreorder]
scene/3d/physics_body.cpp:2502:1: warning:   when initialized here [-Wreorder]
scene/3d/spring_arm.h:44:11: warning: 'SpringArm::mask' will be initialized after [-Wreorder]
scene/3d/spring_arm.h:43:8: warning:   'float SpringArm::current_spring_length' [-Wreorder]
scene/3d/spring_arm.cpp:37:1: warning:   when initialized here [-Wreorder]
scene/animation/skeleton_ik.h:159:11: warning: 'SkeletonIK::target_node_override' will be initialized after [-Wreorder]
scene/animation/skeleton_ik.h:152:7: warning:   'bool SkeletonIK::use_magnet' [-Wreorder]
scene/animation/skeleton_ik.cpp:418:1: warning:   when initialized here [-Wreorder]
scene/resources/tile_set.h:84:9: warning: 'TileSet::AutotileData::size' will be initialized after [-Wreorder]
scene/resources/tile_set.h:83:7: warning:   'int TileSet::AutotileData::spacing' [-Wreorder]
scene/resources/tile_set.h:92:12: warning:   when initialized here [-Wreorder]
scene/resources/tile_set.h:115:12: warning: 'TileSet::TileData::tile_mode' will be initialized after [-Wreorder]
scene/resources/tile_set.h:114:9: warning:   'Color TileSet::TileData::modulate' [-Wreorder]
scene/resources/tile_set.h:120:12: warning:   when initialized here [-Wreorder]
servers/physics/body_sw.h:84:19: warning: 'BodySW::direct_state_query_list' will be initialized after [-Wreorder]
servers/physics/body_sw.h:57:11: warning:   'uint16_t BodySW::locked_axis' [-Wreorder]
servers/physics/body_sw.cpp:756:1: warning:   when initialized here [-Wreorder]
```

Nothing really relevant for us, but it's not a bad consistency
improvement anyway so worth taking.
2018-09-28 17:30:28 +02:00
Rémi Verschelde
3a2ca68af3 SCons: Build thirdparty code in own env, disable warnings
Also remove unnecessary `Export('env')` in other SCsubs,
Export should only be used when exporting *new* objects.
2018-09-28 14:07:39 +02:00
santouits
2694053be3 Renaming SimplexNoise refs to OpenSimplexNoise
Because I think github doesn't show history of renamed files
- The original work is done in commit f12a1b8
by JFonS
- Improved Documentation in commit a386af6
- Last change on the files was in commit 463af5b
- and Fixed compiler warnings in commit e5bbcb8bcf
2018-09-28 14:31:36 +03:00
Rémi Verschelde
c7e646c30a
Merge pull request #22447 from akien-mga/fix-warnings-Wswitch
Fix warnings about unhandled enum value in switch [-Wswitch]
2018-09-28 09:47:29 +02:00
Rémi Verschelde
1c60465c59
Merge pull request #22422 from Faless/server_dummy_vr
Server platform builds (dummy) mobile_vr module.
2018-09-28 09:38:25 +02:00
Fabio Alessandrelli
9d9a14e289 Remove socket_helper.h after NetSocket refactor 2018-09-28 02:03:23 +02:00
Rémi Verschelde
7b081a7fc8 Fix warnings about unhandled enum value in switch [-Wswitch]
Fixes GCC 5 warnings of the form:

core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch]
core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch]

Those can be trivial cases where adding a default fallback is the solution,
or more complex issues/hidden bugs where missed values are actually meant
to be handled.
2018-09-27 18:34:30 +02:00
Rémi Verschelde
cdc411fd54 Fix various warnings: [-Waddress], [-Wpointer-arith], [-Wwrite-strings], [-Wreturn-local-addr] and more
Fixes the following GCC 5 warnings:
```
core/os/file_access.cpp:49:19: warning: the address of 'FileAccess::create_func' will always evaluate as 'true' [-Waddress]
servers/audio_server.cpp:192:70: warning: comparison with string literal results in unspecified behaviour [-Waddress]

drivers/gles2/rasterizer_storage_gles2.cpp:4095:90: warning: NULL used in arithmetic [-Wpointer-arith]

modules/gdnative/register_types.cpp:237:3: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
platform/android/export/export.cpp:207:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

modules/gdscript/gdscript.h:150:67: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:119:56: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:123:56: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:127:50: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:131:52: warning: returning reference to temporary [-Wreturn-local-addr]

editor/plugins/skeleton_editor_plugin.cpp:34:36: warning: extra tokens at end of #include directive
modules/bullet/bullet_types_converter.cpp:31:9: warning: #pragma once in main file

editor/import/editor_scene_importer_gltf.cpp:1996:51: warning: name lookup of 'i' changed
modules/visual_script/visual_script_property_selector.cpp:402:45: warning: name lookup of 'E' changed
scene/gui/tree.cpp:1268:25: warning: name lookup of 'i' changed
scene/resources/visual_shader.cpp:808:32: warning: name lookup of 'i' changed
```
2018-09-27 16:33:52 +02:00
Rémi Verschelde
d95bbb8922 Fix warnings about set but unused variables [-Wunused-but-set-variable]
Fixes the following GCC 5 warnings:
```
drivers/gles2/rasterizer_canvas_gles2.cpp:814:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:2270:11: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:2673:22: warning: variable 'e' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:715:7: warning: variable 'no_cull' set but not used [-Wunused-but-set-variable]
drivers/gles2/shader_gles2.cpp:693:14: warning: variable 'cc' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_canvas_gles3.cpp:1226:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_scene_gles3.cpp:3039:10: warning: variable 'contrib' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_scene_gles3.cpp:4504:32: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable]
editor/editor_inspector.cpp:272:9: warning: variable 'guide_color' set but not used [-Wunused-but-set-variable]
editor/editor_themes.cpp:1067:14: warning: variable 'alpha3' set but not used [-Wunused-but-set-variable]
editor/editor_themes.cpp:263:8: warning: variable 'script_bg_color' set but not used [-Wunused-but-set-variable]
editor/plugins/collision_shape_2d_editor_plugin.cpp:326:11: warning: variable 'cpoint' set but not used [-Wunused-but-set-variable]
editor/plugins/mesh_editor_plugin.cpp:72:9: warning: variable 'size' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:471:12: warning: variable 'mpos' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:89:8: warning: variable 'basetype_color' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:90:8: warning: variable 'type_color' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:92:8: warning: variable 'string_color' set but not used [-Wunused-but-set-variable]
modules/visual_script/visual_script_editor.cpp:2521:7: warning: variable 'seq_connect' set but not used [-Wunused-but-set-variable]
platform/android/export/export.cpp:580:12: warning: variable 'styles_count' set but not used [-Wunused-but-set-variable]
platform/android/export/export.cpp:584:12: warning: variable 'styles_offset' set but not used [-Wunused-but-set-variable]
platform/osx/export/export.cpp:464:9: warning: variable 'zerr' set but not used [-Wunused-but-set-variable]
scene/2d/tile_map.cpp:260:10: warning: variable 'tcenter' set but not used [-Wunused-but-set-variable]
scene/3d/light.cpp:166:7: warning: variable 'editor_ok' set but not used [-Wunused-but-set-variable]
scene/3d/navigation.cpp:566:11: warning: variable 'closest_navmesh' set but not used [-Wunused-but-set-variable]
scene/gui/rich_text_label.cpp:869:8: warning: variable 'size' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:705:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:706:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:726:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:727:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable]
scene/resources/material.cpp:430:7: warning: variable 'using_world' set but not used [-Wunused-but-set-variable]
servers/visual/shader_language.cpp:2026:7: warning: variable 'all_const' set but not used [-Wunused-but-set-variable]
servers/visual/visual_server_scene.cpp:1383:28: warning: variable 'z_max_cam' set but not used [-Wunused-but-set-variable]
```

Also fixes two [-Wunused-value] warnings:
```
scene/gui/text_edit.cpp:4405:20: warning: statement has no effect [-Wunused-value]
servers/visual/visual_server_scene.cpp:905:48: warning: value computed is not used [-Wunused-value]
```

Some of those are bugs and need further work, they are identified with
`// FIXME` comments.
2018-09-27 16:25:24 +02:00
Rémi Verschelde
cda5b0bfe1 Fix warnings about unused variables [-Wunused-variable]
Fixes the following GCC 5 warnings:
```
drivers/gles2/rasterizer_scene_gles2.cpp:1139:15: warning: unused variable 'offset' [-Wunused-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:1205:39: warning: unused variable 'multi_mesh' [-Wunused-variable]
drivers/gles2/rasterizer_storage_gles2.cpp:359:7: warning: unused variable 'srgb' [-Wunused-variable]
drivers/gles2/shader_gles2.cpp:1016:45: warning: unused variable 'texture_hints' [-Wunused-variable]
editor/animation_track_editor.cpp:776:9: warning: unused variable 'keys_to' [-Wunused-variable]
editor/editor_inspector.cpp:273:7: warning: unused variable 'vs_height' [-Wunused-variable]
editor/editor_themes.cpp:202:10: warning: unused variable 'begin_time' [-Wunused-variable]
editor/editor_themes.cpp:239:10: warning: unused variable 'end_time' [-Wunused-variable]
editor/plugins/animation_blend_tree_editor_plugin.cpp:726:17: warning: unused variable 'an' [-Wunused-variable]
editor/plugins/script_text_editor.cpp:1278:8: warning: unused variable 'fold_state' [-Wunused-variable]
main/main.cpp:132:13: warning: 'use_vsync' defined but not used [-Wunused-variable]
modules/cvtt/image_compress_cvtt.cpp:231:8: warning: unused variable 'y_end' [-Wunused-variable]
modules/cvtt/image_compress_cvtt.cpp:311:6: warning: unused variable 'shift' [-Wunused-variable]
modules/gdscript/gdscript_editor.cpp:58:7: warning: unused variable 'th' [-Wunused-variable]
modules/gridmap/grid_map.cpp:1084:6: warning: unused variable 'ofs' [-Wunused-variable]
modules/theora/video_stream_theora.cpp:442:9: warning: unused variable 'tr' [-Wunused-variable]
modules/visual_script/visual_script_editor.cpp:2606:6: warning: unused variable 'count' [-Wunused-variable]
modules/visual_script/visual_script_editor.cpp:2829:6: warning: unused variable 'seq_count' [-Wunused-variable]
modules/visual_script/visual_script_editor.cpp:2844:24: warning: unused variable 'vnode_function' [-Wunused-variable]
modules/websocket/lws_peer.cpp:122:12: warning: unused variable 'peer_data' [-Wunused-variable]
modules/websocket/lws_peer.cpp:135:12: warning: unused variable 'peer_data' [-Wunused-variable]
modules/websocket/lws_peer.cpp:63:12: warning: unused variable 'peer_data' [-Wunused-variable]
modules/websocket/lws_peer.cpp:91:12: warning: unused variable 'peer_data' [-Wunused-variable]
platform/android/export/export.cpp:763:16: warning: unused variable 'node_size' [-Wunused-variable]
scene/gui/rich_text_label.cpp:850:10: warning: unused variable 'x_ofs' [-Wunused-variable]
scene/gui/text_edit.cpp:653:8: warning: unused variable 'tab_w' [-Wunused-variable]
scene/resources/bit_mask.cpp:186:6: warning: unused variable 'i' [-Wunused-variable]
scene/resources/mesh.cpp:549:20: warning: '_array_name' defined but not used [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:107:10: warning: unused variable 'v2' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:108:10: warning: unused variable 'v3' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:109:10: warning: unused variable 'v4' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:110:10: warning: unused variable 'v5' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:111:10: warning: unused variable 'v0n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:112:10: warning: unused variable 'v1n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:113:10: warning: unused variable 'v2n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:114:10: warning: unused variable 'v3n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:115:10: warning: unused variable 'v4n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:116:10: warning: unused variable 'v5n' [-Wunused-variable]
servers/visual/default_mouse_cursor.xpm:2:21: warning: 'default_mouse_cursor_xpm' defined but not used [-Wunused-variable]
```
2018-09-27 16:25:24 +02:00
Rémi Verschelde
bca2d3ad40 Fix invalid comparison warnings: [-Wbool-compare] and [-Wenum-compare]
Fixes the following GCC 5 warnings and actual bugs:
```
drivers/unix/net_socket_posix.cpp:562:28: warning: comparison between 'enum IP::Type' and 'enum NetSocket::Type' [-Wenum-compare]
modules/gdscript/gdscript_function.cpp:792:26: warning: comparison of constant '17' with boolean expression is always true [-Wbool-compare]
modules/gdscript/gdscript_function.cpp:792:26: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
modules/gdscript/gdscript_parser.cpp:5082:58: warning: comparison of constant '6' with boolean expression is always false [-Wbool-compare]
modules/gdscript/gdscript_parser.cpp:5082:58: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
modules/mbedtls/stream_peer_mbed_tls.cpp:286:45: warning: comparison between 'enum StreamPeerTCP::Status' and 'enum StreamPeerSSL::Status' [-Wenum-compare]
modules/mbedtls/stream_peer_mbed_tls.cpp:313:45: warning: comparison between 'enum StreamPeerTCP::Status' and 'enum StreamPeerSSL::Status' [-Wenum-compare]
```
2018-09-27 16:25:24 +02:00
Rémi Verschelde
e5bbcb8bcf Fix warnings for comparison between signed and unsigned integers [-Wsign-compare]
Also turn off -Wsign-compare warnings in the future, we do not consider them important.

Fixes the following GCC 5 warnings:
```
core/node_path.cpp:279:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/oa_hash_map.h:169:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/oa_hash_map.h:314:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles2/shader_gles2.cpp:985:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles3/rasterizer_storage_gles3.cpp:1075:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/pulseaudio/audio_driver_pulseaudio.cpp:343:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/editor_plugin.cpp:525:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/editor_properties_array_dict.cpp:747:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/spatial_editor_plugin.cpp:2078:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/spatial_editor_plugin.cpp:4096:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/sprite_editor_plugin.cpp💯20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:122:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:134:77: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:339:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/etc/image_etc.cpp:222:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/gdnative/register_types.cpp:242:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/gdnative/register_types.cpp:258:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:200:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:222:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:246:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1085:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1489:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1623:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:206:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:356:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:406:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:493:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/audio_stream_player_3d.cpp:420:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/audio_stream_sample.cpp:565:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/audio_stream_sample.cpp:571:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_rb_resampler.cpp:156:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
```

The following warnings were not fixed, as they implied casting for no gain:
```
core/io/packet_peer.cpp:228:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/io/resource_format_binary.cpp:109:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles2/rasterizer_scene_gles2.cpp:144:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/unix/file_access_unix.cpp:249:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:889:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:1020:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:1154:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:2255:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/bit_mask.cpp:336:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:141:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:150:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:154:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio_server.cpp:86:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio_server.cpp:89:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
```
2018-09-27 16:25:23 +02:00
Rémi Verschelde
d8b30d42f5 Fix warnings for operator precedence disambiguation [-Wparentheses]
Fixes the following GCC 5 warnings:
```
core/io/resource_format_binary.cpp:1721:29: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
core/typedefs.h:108:24: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses]
editor/plugins/spatial_editor_plugin.cpp:2202:58: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses]
editor/plugins/spatial_editor_plugin.cpp:5002:12: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
main/input_default.cpp:346:59: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
main/input_default.cpp:348:60: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
main/input_default.cpp:579:57: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
modules/gridmap/grid_map_editor_plugin.cpp:613:14: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
modules/theora/video_stream_theora.cpp:335:34: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
modules/theora/video_stream_theora.cpp:336:35: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
modules/visual_script/visual_script_property_selector.cpp:215:38: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/rich_text_label.cpp:424:84: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/rich_text_label.cpp:512:80: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/scroll_container.cpp:173:36: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/scroll_container.cpp:173:86: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/tree.cpp:1419:98: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
```
2018-09-27 10:29:48 +02:00
Rémi Verschelde
2b084352b9 Fix warnings on non-static data member initializers (C++11 feature)
We're not formally using C++11 yet so those trigger compilation warnings
(at least with GCC 5):

./main/input_default.h:122:30: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
  CursorShape default_shape = CURSOR_ARROW;
                              ^

Note: We may allow those eventually (especially for non-int static const),
but most of current occurrences were inconsistent with all other classes.

See also http://www.stroustrup.com/C++11FAQ.html#member-init
2018-09-27 10:29:48 +02:00
Ignacio Etcheverry
2e87703136
Merge pull request #22460 from neikeq/issue-22403
Mono: Fix not creating generic Array or Dictionary where expected
2018-09-27 00:38:39 +02:00
Ignacio Etcheverry
50fd5ef3b5 Mono: Fix not creating generic Array or Dictionary where expected 2018-09-27 00:11:31 +02:00
Ignacio Etcheverry
0f3de6ef3a Do not update cache if the C# API assembly is out of sync 2018-09-26 23:59:38 +02:00
Rémi Verschelde
a2b6be23ad ENet: Remove redundant if condition
Closes #22445.
2018-09-26 10:53:45 +02:00
Fabio Alessandrelli
977c9477c1 Set ENet service time to 0.
Process all packets in queue, but never wait.
2018-09-25 16:26:45 +02:00
Fabio Alessandrelli
b0f166987a Server platform builds (dummy) mobile_vr module.
Protect GL functions in mobile_vr with ifdefs.
2018-09-25 12:29:31 +02:00
Rémi Verschelde
5adf7aa6b7 SCons: Fix checks for clang in env['CXX']
They would match the whole path instead of only the filename.
2018-09-25 11:15:25 +02:00
Fabio Alessandrelli
df43b94e6e Update WebSocket documentation 2018-09-24 01:50:37 +02:00
Fabio Alessandrelli
4b92956db7 Implement WebSocket clean close detection. 2018-09-24 01:50:37 +02:00
Fabio Alessandrelli
5d91e87c64 Implement WebSocket close notify. 2018-09-24 01:50:37 +02:00
Andrea Catania
d226ba7c2b Corrected cast_motion query behaviour 2018-09-22 11:17:31 +02:00
Andrea Catania
29e01f97e4 Added rayshape solver algorithm to soft body configurator fixes #22283 fixes #22249 fixes #22281 2018-09-22 09:42:19 +02:00
Rémi Verschelde
ef7b384861 doc: Misc formatting fixes 2018-09-21 15:34:11 +02:00
Max Hilbrunner
a384cffc44
Merge pull request #22316 from Faless/poll_more_checks_easy_squash
Add checks for clean disconnect in HTTP/TCP/SSL.
2018-09-21 15:03:55 +02:00
Fabio Alessandrelli
92de6df113 Add checks for clean disconnect in HTTP/TCP/SSL.
Half-open TCP connection can, of course, only be detected by
writing the socket, or waiting for TCP timeout.
2018-09-21 14:34:57 +02:00
Rémi Verschelde
83758a9004 doc: Sync classref with current source 2018-09-21 09:33:05 +02:00
JFonS
9ffc30699f Fix selection box staying when editing a GridMap 2018-09-20 11:50:38 +02:00
JFonS
463af5b6ef Fix typo in SimplexNoise documentation 2018-09-20 11:03:23 +02:00
JFonS
4faa5acaa7 Replace "persistance" with "persistence"
Replace "persistance" with "persistence" in the simplex code.
Also made some minor fixes to the docs.
2018-09-19 21:00:10 +02:00
Rémi Verschelde
2306ec211c
Merge pull request #22257 from AndreaCatania/fixes
Daily physics Fixes
2018-09-19 20:41:37 +02:00
Hugo Locurcio
a386af67ec
Improve SimplexNoise documentation and fix typos
Spaces were added after code blocks to ensure correct rendering
on the online class reference.
2018-09-19 20:25:09 +02:00
Andrea Catania
0a2c154c8e Added automatically set velocity when rigid is kinematic 2018-09-19 19:46:07 +02:00
Andrea Catania
42f2ff2f8d Added check to prevent contact signal to happen too early 2018-09-19 19:01:59 +02:00
George Marques
b1187b9a2f
GDScript: Revert extra deletion when creating instance
Revert part of e4af39cbc0 that was causing
a crash.
2018-09-19 11:17:47 -03:00
George Marques
825e85ab23
GDScript: Error on empty blocks at the end of file
Fix #15415
2018-09-19 11:17:46 -03:00
George Marques
02acb07d81
GDScript: Fix autocompletion inference after is check
Fix #21915
2018-09-19 11:17:46 -03:00
George Marques
726e836cd9
GDScript: Fix infinite loop in autocomplete
It happened when the definition of the variable contained the variable
itself.
2018-09-19 11:17:46 -03:00
George Marques
e6a6ea65c7
GDScript: Forbid enum values to shadow constants
- Don't allow constants to shadow parent members.
- Fix a spelling mistake.

Fix #13175
2018-09-19 11:17:46 -03:00
George Marques
6c70c4c358
GDScript: Fix autocomplete crash when searching default values
Fix #21700
2018-09-19 11:17:46 -03:00
George Marques
b530031442
GDScript: Allow Object constants to be used with qualifier
Fix #15125
2018-09-19 11:17:46 -03:00
George Marques
4907a1cd28
GDScript: Fix stack address test in compiler 2018-09-19 11:17:45 -03:00
Rémi Verschelde
f148e8eede SCons: Fix ARVR can_build arity 2018-09-18 08:56:44 +02:00
Ignacio Etcheverry
e463834a8b Fix missing mono internal call
- Also fixed uninitalized variable in buildscript
2018-09-17 22:54:47 +02:00
Ignacio Etcheverry
a4e4dd3966
Merge pull request #22193 from neikeq/idontlikesanditscoarseandroughandirritatinganditgetseverywhere
Mono: Build and external editor improvements for OSX
2018-09-17 20:22:05 +02:00
Ignacio Etcheverry
50f6dbff87 Mono: Fix opening code editors in OSX and cleanup 2018-09-17 20:00:19 +02:00
Ignacio Etcheverry
9610bc9580
Merge pull request #22151 from 999eagle/monoexe
Check for mono binary when finding version
2018-09-17 19:55:43 +02:00
Ignacio Etcheverry
b032738a51 Add some mono root dir hints to the build script
This enhancement is specially noticeable in OSX, since it includes Mono's install location (both official and homebrew). This makes it possible to build Godot with Mono on OSX without pkg-config (pkg-config is bundled with Mono, but it's not added to PATH, so finding it would require finding the Mono root directory first).
2018-09-17 19:34:35 +02:00
Rémi Verschelde
4075c80ea9
Merge pull request #22165 from DualMatrix/atan2_plain_wrong
Fixed argument names having wrong order for atan2
2018-09-17 12:33:26 +02:00
Rémi Verschelde
dbee7856e3
Merge pull request #22157 from muiroc/fix_cast_crash
Add null check in godot result callback
2018-09-17 11:09:06 +02:00
DualMatrix
4bad2beeed Fixed argument names being swapped for atan2
The arguments of atan2() should be y,x instead of x,y This was just wrong since the internal atan2 already had y,x as parameters, so if you followed the autocomplete the result would just be wrong.
2018-09-16 21:27:54 +02:00
Mariusz Chwalba
47bf26c40d test for depreciacion warnings only on debug builds
Fix adherence to clang-format rules
2018-09-16 19:37:51 +02:00
muiroc
23a61c7342 Add null check in godot result callback 2018-09-16 16:02:15 +02:00
Sophie Tauchert
99cd17b102
Check for mono binary when finding version 2018-09-16 15:20:44 +02:00
Rémi Verschelde
68e1ef49b1
Merge pull request #22095 from KellyThomas/transform-interpolatewith
[Mono] Transform - add InterpolateWith()
2018-09-16 01:37:19 +02:00
Fabio Alessandrelli
0e56377e96 Allow system certs file to be used by Editor.
Note, it will only used by the Editor, not when running the game.
This allows package maintainer to compile Godot to use system installed
certificates when accessing the AssetLib.
2018-09-15 14:45:54 +02:00
Kelly Thomas
d4b2423428 [Mono] implement Transform.InterpolateWith() 2018-09-15 13:08:21 +08:00
Fabio Alessandrelli
c0e4d7efca Add GDScript slave keyword deprecation warning. 2018-09-15 01:50:34 +02:00
Fabio Alessandrelli
1e9b46d687 Clearly deprecate sync too in favor of remotesync.
NOTE: This changes the RPC_MODE_* enum values.
Games should be re-exported. GDNative rebuilt.
2018-09-15 00:06:03 +02:00
Fabio Alessandrelli
d6b31daec6 Rename slave keyword to puppet
The slave keyword will still be available as deprecated in 3.1 but will
be dropped from future releases.
2018-09-15 00:06:03 +02:00
Rémi Verschelde
5961a6da03
Merge pull request #21717 from willnationsdev/edicon-refactor
Refactor editor icon retrieval
2018-09-14 17:24:04 +02:00
Rémi Verschelde
2aad7f1376
Merge pull request #21569 from JFonS/add_noise_textures
Add SimplexNoise and NoiseTexture as new resources
2018-09-14 16:57:26 +02:00
willnationsdev
5436abefe4 Refactor editor icon retrieval 2018-09-14 09:27:56 -05:00
JFonS
f12a1b8863 Add SimplexNoise and NoiseTexture as new resources
SimplexNoise can be used to generate parameterized fractal noise based on Open Simplex.

NoiseTexture uses SimplexNoise to generate noise textures for using in
shaders/visual effects.
2018-09-14 15:24:34 +02:00
Thomas Herzog
e0f763f1c9 [GDNative] add Variant::Operator 2018-09-13 17:23:38 +02:00
Rémi Verschelde
1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz
08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Ignacio Etcheverry
995a40e8ef Move modules/mono/glue/cs_files to modules/mono/glue/Managed/Files
Added dummy MSBuild project and solution to get tooling help when editing these files.
2018-09-12 22:03:36 +02:00
Ignacio Etcheverry
5e57beebb1 Mono: Fix build regression due to wrong return type 2018-09-12 21:08:18 +02:00
Ignacio Etcheverry
6ae47ff19b C#: Fix explicit enum values when exporting member 2018-09-12 18:54:20 +02:00
Rémi Verschelde
277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Ignacio Etcheverry
d21c64cc3b C#: Fix cs_files glue mismatch bug 2018-09-12 03:24:08 +02:00
Ignacio Etcheverry
e558e1ec09 Fix/workaround for issue #21667
When a Reference managed instance is garbage collected and its finalizer is called, it could happen that the native instance is referenced once again before the finalizer can unreference and memdelete it. The workaround is to create a new managed instance when this happens (at least for now).
2018-09-12 03:24:08 +02:00
Ignacio Etcheverry
61426464ea Add some mono root hint dirs for OSX
Fixes #13355
2018-09-12 03:24:08 +02:00
Ignacio Etcheverry
691d4e3835 Allow special characters in C# glue files
Fixes #21139

- Surround the generated file modules/mono/glue/cs_compressed.gen.h with ifdef TOOLS_ENABLED
2018-09-12 03:24:08 +02:00
Ignacio Etcheverry
b1356a3590 Cleanup of c# api files and bindings generator
- We no longer generate RID and NodePath C# classes. Both will be maintained manually.
- We no longer generate C# declarations and runtime registration of internal calls for the following classes: RID, NodePath, String, GD, SignalAwaiter and Godot.Object (partial base).
- We no longer auto-generate the base members of Godot.Object. They will be maintained manually as a partial class.

This makes it easier to maintain these C# classes and their internal calls, as well as the bindings generator which no longer generates C# classes that don't derive from Godot Object, and it no longer generates the Godot.Object base members (which where unreadable in the bindings generator code).

- Added missing 'RID(Object from)' constructor to the RID C# class.
- Replaced MONO_GLUE_DISABLED constant macro with MONO_GLUE_ENABLED.
- Add sources in module/mono/glue even if glue is disabled, but surround glue files with ifdef MONO_GLUE_ENABLED.
2018-09-12 03:23:45 +02:00
Rémi Verschelde
0d04fb76e1 Fix mistake in previous commit 2018-09-11 18:12:40 +02:00
Rémi Verschelde
af57515775 UPnP: Fix includes of thirdparty headers 2018-09-11 18:09:12 +02:00
Ignacio Etcheverry
8366da5bc6
Merge pull request #21822 from aaronfranke/mono-pascal
[Mono] Various style changes and naming standardization
2018-09-10 23:52:00 +02:00
Aaron Franke
627ed98ed1 [Mono] Various style changes and naming standardization 2018-09-10 15:22:10 -04:00
Aaron Franke
4743852466 [Mono] Tabs -> Spaces 2018-09-10 15:12:49 -04:00
Rémi Verschelde
0faafa6f4d Fix crash when extending non-existing GDScript file
Fixes #21682 with a partial revert of #21411.
The ~Ref() destructor (from 'scriptres') already takes care
of freeing the 'script' resource.
2018-09-10 20:46:20 +02:00
Rémi Verschelde
d9a96878f2
Merge pull request #21921 from AndreaCatania/bugfix2
Fix bullet crashes
2018-09-10 08:20:15 +02:00
Andrea Catania
b252e66414 Fiex bullet crash 2018-09-10 07:55:11 +02:00
Poommetee Ketson
bb0e8d260c Fix indentation in bullet SCsub 2018-09-10 12:22:23 +07:00
George Marques
af290f7b7d
Merge pull request #21866 from Paulb23/fix_scientific_notation_highlight_issue_21435
Fixed scientific notation not highlighting correctly, issue 21435
2018-09-09 18:21:33 -03:00
Juan Linietsky
ffe158ae85
Merge pull request #21861 from fire/visual_script_18024
Change the default variable Visual Script constructor to use EditorInspector and etc
2018-09-08 17:05:03 -03:00
Paulb23
f051f5110e Fixed scientific notaion not highlighting correctly, issue 21435 2018-09-08 13:42:11 +01:00
K. S. Ernest (iFire) Lee
7ce9e67355 Change the default variable constructor to use EditorInspector and updated property hints that were changed. 2018-09-08 02:51:23 -07:00
Andrea Catania
3eaaf712db Fixed crash during raycast and CCD radius calculation 2018-09-07 20:38:30 +02:00
Juan Linietsky
fc50728d45
Merge pull request #21808 from AndreaCatania/optitri
Optimized bullet trimesh collision
2018-09-07 15:09:26 -03:00
Andrea Catania
6142448417 Update bullet to Master 12409f1118a7c7a266f9071350c70789dfe73bb9 2018-09-07 16:11:04 +02:00
Andrea Catania
88967e4001 Fixing trimesh precision 2018-09-06 18:53:03 +02:00
Andrea Catania
9b446f1cc3 Optimized in case is used just 1 shape with no transform 2018-09-06 18:19:05 +02:00
Rémi Verschelde
3a8f8381f2
Merge pull request #21771 from WiggleWizard/get-stack-fix
Fixed return type for get_stack() function call
2018-09-05 19:46:12 +02:00
Andrea Catania
ce138d3449 Fixed bullet area vs Trimesh shape overlap 2018-09-05 13:43:02 +02:00
WiggleWizard
d227a9ae12 Fixed return type for get_stack() function call 2018-09-05 11:29:06 +01:00
Will Nations
fadf2d2afd Fix invalid deref in NativeScript script classes 2018-09-04 08:35:28 -05:00
Max Hilbrunner
21ea1d89ef
Merge pull request #21605 from Faless/ws_no_proto
Allow WebSocket connect with no sub-protocols.
2018-08-31 13:15:46 +02:00
Fabio Alessandrelli
6bc97cc7cc Allow WebSocket connect with no sub-protocols. 2018-08-30 20:23:16 +02:00
Thomas Herzog
917bd5b2c2 [NativeScript] implement refcount instance binding funcs 2018-08-30 19:55:04 +02:00
Thomas Herzog
492b4cf837 [GDNative] add initial core 1.1 extension 2018-08-30 19:18:55 +02:00
Rémi Verschelde
cb63cc86e5
Merge pull request #21575 from YeldhamDev/gridmap_deprecated_fix
Small change on how GridMap's "theme" is deprecated
2018-08-30 09:03:11 +02:00
Rémi Verschelde
5267099a87 doc: Sync classref with current source 2018-08-29 22:25:11 +02:00
Michael Alexsander Silva Dias
8ede2647ed Small change on how GridMap's "theme" is deprecated 2018-08-29 17:14:06 -03:00
Andrea Catania
9a67a07a2c Fixed crash if convex has 0 vertices 2018-08-29 17:34:26 +02:00
Rémi Verschelde
907b7a3897
Merge pull request #21538 from jmf/master
Fix CSGBox size
2018-08-29 15:03:01 +02:00
Ibrahn Sahir
2a823a38ac Initialise rays_found count in test_ray_separation.
Prevents branch on uninit that could result in crashes with
move_and_slide.
2018-08-29 13:23:14 +01:00
Yuri Chornoivan
06e73522dc Fix vformat(), minor typos and word puzzles 2018-08-29 11:50:39 +03:00
jmf
11c90b0bb3 Fix to make CSGBox the size that is entered in Width, Height and Depth instead of twice those lengths. 2018-08-28 14:41:41 -03:00
Rémi Verschelde
57ba7caa6d
Merge pull request #21511 from eska014/webm-nomt
Fix WebM and Theora video in HTML5 export
2018-08-28 07:56:52 +02:00
Ignacio Etcheverry
6b10e3750e
Merge pull request #21497 from neikeq/hm
C# generated classes ignore warning CS1591 and cleanup
2018-08-27 21:43:46 +02:00
Ignacio Etcheverry
aa2bcf3dfc C# generated classes ignore warning CS1591 and cleanup 2018-08-27 20:39:51 +02:00
Rémi Verschelde
66778eae71
Merge pull request #21420 from elasota/fix-last-mipmap
Fix uninitialized mipmap levels
2018-08-27 17:48:41 +02:00
Rémi Verschelde
f06b7d40c8
Merge pull request #21449 from vnen/gdscript-builtin-is
Allow `is` operator to test built-in types
2018-08-27 17:48:11 +02:00
Rémi Verschelde
5b87864385
Merge pull request #21369 from Noshyaar/exportflag
Deprecating bit flags export with no hint text
2018-08-27 17:47:21 +02:00
Ignacio Etcheverry
78bb53f85d
Merge pull request #21205 from KellyThomas/c-sharp-feature-parity-quat
[Mono] Quat - add some missing constructors and methods
2018-08-27 16:18:09 +02:00
Rémi Verschelde
49cf675ef4
Merge pull request #21450 from vnen/gdscript-type-space
Remove space before colon on type hints
2018-08-27 10:42:19 +02:00
Rémi Verschelde
3dc63a710f
Merge pull request #21469 from akien-mga/glsl-clang-format
Style: Enable clang-format on GLSL shaders
2018-08-27 10:12:24 +02:00
Rémi Verschelde
ddfef86836 Fix build after c2a9cb34
`return` statements were missing, and those warnings do not need to be
behind #ifdefs, they do not expose any deprecated API.
2018-08-27 10:10:40 +02:00
Rémi Verschelde
2131f101b6
Merge pull request #21470 from elasota/fix-tiled-exr
Fix tiled EXR import
2018-08-27 09:46:57 +02:00
elasota
4b7885fb1e Fix tiled EXR crash, update tinyexr to head to fix corrupted uncompressed EXR loading 2018-08-27 02:52:12 -04:00
Rémi Verschelde
98cc2ce1dd
Merge pull request #21433 from AndreaCatania/megafix
Multiple fixes on Physics things
2018-08-27 07:46:40 +02:00
Rémi Verschelde
4226d56ca9 Style: Enable clang-format on GLSL shaders
As of clang-format 6.0.1, putting the `/* clang-format off */` hint
around our "invalid" `[vertex]` and `[shader]` statements isn't enough
to prevent a bogus indent of the next comments and first valid statement,
so we need to enclose that first valid statement in the unformatted chunk.
2018-08-27 07:34:14 +02:00
Leon Krause
92b259ccf1 Fix WebM module for HTML5 platform 2018-08-27 04:08:04 +02:00
Ignacio Etcheverry
db55d8a4b6
Merge pull request #21423 from exts/mono/collections
[Mono] Added Collections namespace to Array & Dictionary
2018-08-26 19:11:45 +02:00
George Marques
de45b18ddb
GDScript: Remove space before colon on type hints 2018-08-26 13:43:13 -03:00
George Marques
4b974a36b7
GDScript: Allow is operator to test built-in types 2018-08-26 13:31:23 -03:00
Andrea Catania
64b5eaf43c Correctly set safe_motion on cast_motion query Fixes: #21212 2018-08-26 12:09:52 +02:00
Andrea Catania
c2a9cb343b Added deprecated to joints un/used parameters 2018-08-26 09:10:30 +02:00
Crazy-P
e4af39cbc0 Fixes several resource leaks in ...
- gdscript
- gdscript_compiler
- regex
- android/export
- gles3/rasterizer (scene and storage)
2018-08-26 09:19:02 +08:00
exts
035d498af2 Added Collections namespace to Array & Dictionary 2018-08-25 17:19:37 -05:00
elasota
de2a36505a Fix mipmap levels not being initialized 2018-08-25 17:22:53 -04:00
Juan Linietsky
8c435a343e
Merge pull request #16927 from neikeq/rework-refcount-notify
Notify instance binding data api of refcount increment/decrement
2018-08-25 11:01:55 -03:00
Rémi Verschelde
77185aaf21
Merge pull request #21049 from AndreaCatania/joints
Improved 6DOF joint implementation
2018-08-24 17:10:54 +02:00
Ignacio Etcheverry
d72a281468
Merge pull request #20717 from PJB3005/18-08-04-godot-exceptions
Fix Mono exception handling.
2018-08-24 16:27:43 +02:00
Ignacio Etcheverry
750f128a05
Merge pull request #20707 from aaronfranke/mono-combine
[Mono] Move several related small files
2018-08-24 15:53:38 +02:00
Poommetee Ketson
cee6d5620a Deprecating bit flags export with no hint text 2018-08-24 20:46:04 +07:00
Rémi Verschelde
52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
Rémi Verschelde
de59fe04e7 Add print_verbose to print to stdout only in verbose mode
Equivalent of the cumbersome:
if (OS::get_singleton()->is_stdout_verbose())
	print_line(msg);
2018-08-24 09:23:20 +02:00
Kelly Thomas
a941684590 mono: Quat - add some missing constructors and methods 2018-08-24 07:56:54 +08:00
Pieter-Jan Briers
af39684885 Fix Mono exception handling.
First of all, this fixes the handling of exceptions so the engine actually notices them,
it was broken in 4172fa03b5.

Next, unhandled exceptions now do NOT cause an abort(). They're logged now,
so before #16987. The pending exception thing still works though.
2018-08-23 20:21:36 +02:00
Aaron Franke
514856d8c7 [Mono] Move several small related files 2018-08-23 12:50:04 -04:00
Kelly Thomas
46207ae7aa [Mono] AABB - Position, Size, End setters, Rect2 - End setter 2018-08-23 23:45:18 +08:00
Rémi Verschelde
7f8f76ffbb
Merge pull request #21301 from elasota/multithread-cvtt
Multithread BPTC compression jobs
2018-08-23 09:33:47 +02:00
Rémi Verschelde
18e1268cd7
Merge pull request #21254 from YeldhamDev/tile_grid_map_side
Add option to move Tile/GridMap editors to another side
2018-08-23 09:04:12 +02:00
Rémi Verschelde
1e729630d6
Merge pull request #21240 from aaronfranke/mono-project-vector
[Mono] Vector2/3 Project methods
2018-08-23 08:59:26 +02:00
Rémi Verschelde
a2acbb0bfb
Merge pull request #21167 from elasota/squish-quality-config
Support higher-quality S3TC compression modes
2018-08-23 08:58:44 +02:00
elasota
8c4e24862b Multithread CVTT compression jobs 2018-08-22 22:42:22 -04:00
Ignacio Etcheverry
908a30964a Notify instance binding data api of refcount increment/decrement 2018-08-23 01:38:48 +02:00
Michael Alexsander Silva Dias
6fa1b5eca7 Add option to move Tile/GridMap editors to another side 2018-08-22 19:18:23 -03:00
Rémi Verschelde
61f15878de
Merge pull request #21283 from YeldhamDev/gridmap_meshlib_rename
Rename instances of the word "theme" to "mesh_library" in GridMap and MeshLibrary editors
2018-08-22 22:41:40 +02:00
Ignacio Etcheverry
980b81dd2a
Merge pull request #21174 from KellyThomas/c-sharp-feature-parity-rect2
[Mono] Rect2 - add Abs(), rename private fields
2018-08-22 22:34:45 +02:00
Rémi Verschelde
d9cad85f43
Merge pull request #21229 from marcelofg55/ns_profiling
Implemented profiling functions for NativeScript
2018-08-22 22:27:42 +02:00
Michael Alexsander Silva Dias
5c6be1aea5 Rename instances of the word "theme" to "mesh_library" in GridMap and MeshLibrary editors 2018-08-22 16:52:38 -03:00
Marcelo Fernandez
a323b7a1ba Implemented profiling functions for NativeScript 2018-08-22 15:40:41 -03:00
Aaron Franke
434973fb83 [Mono] Vector2/3 Project methods 2018-08-22 13:27:35 -04:00
elasota
4cd866685e Use cluster fit at higher quality levels 2018-08-22 12:05:25 -04:00
Rémi Verschelde
3573d5f4ae
Merge pull request #21281 from elasota/fix-squish-sse
Fix Squish SSE misconfiguration
2018-08-22 09:55:57 +02:00
Rémi Verschelde
a6979e7c66
Merge pull request #21279 from vnen/gdscript-fixes
Assorted GDScript fixes
2018-08-22 09:53:52 +02:00
elasota
35f6ba5c5d BPTC support 2018-08-21 22:56:04 -04:00
elasota
04410346bb Fix Squish SSE misconfiguration 2018-08-21 22:21:56 -04:00
George Marques
94d662ad55
GDScript: Ignore unused arguments/local vars that start with _
Makes it simple to ignore particular arguments without adding special
comments, especially in engine-defined functions.
2018-08-21 20:29:43 -03:00
George Marques
4d2b9a4b35
GDScript: Show warning messages only on debugger
Don't show on console/output anymore.
2018-08-21 20:29:33 -03:00
Ignacio Etcheverry
143c471eff Mono: Fix weird crash when loading corlib 2018-08-22 00:49:38 +02:00
Ignacio Etcheverry
5df91099c7
Merge pull request #18502 from space-wizards/18-04-29-assembly-load-hook
assembly_load_hook fallback for registering GDMonoAssemblies.
2018-08-22 00:27:35 +02:00
Rémi Verschelde
404ee1a56b Style: Fix issues that went past CI 2018-08-21 21:28:06 +02:00
Rémi Verschelde
a319d72071
Merge pull request #21253 from aaronfranke/plane-constants
Rename Plane constants, add to Mono
2018-08-21 21:16:41 +02:00
Rémi Verschelde
28e9aedbdd
Merge pull request #21267 from akien-mga/color-grayscale
Deprecate incorrect Color::gray()
2018-08-21 20:29:56 +02:00
George Marques
fdf18a4198
GDScript: Fix undefined behavior on GDScriptTokenizerBuffer 2018-08-21 13:54:52 -03:00
Andrea Catania
0b98834b77 Added ray / shape / point / motion / rest cast exclusion of area and or body 2018-08-21 18:51:08 +02:00
George Marques
abbdb9d951
GDScript: Forbid invalid identifiers in match bindings
Also forbid shadowing a variable from an upper scope.
2018-08-21 13:38:18 -03:00
George Marques
d97624e295
GDSCript: Fix cyclic class dependency detection 2018-08-21 13:14:11 -03:00
Rémi Verschelde
2969dffbe3 Deprecate incorrect Color::gray()
This average is not a proper approximation of a grayscale value,
get_v() is better suited for that.

If we want a real to_grayscale() conversion, it's somewhat more
involved: https://en.wikipedia.org/wiki/Grayscale

Remove the deprecated Gray() from C# bindings as it conflicts
with new named color constants.
2018-08-21 17:48:31 +02:00
Rémi Verschelde
912131fe03
Merge pull request #20101 from panzergame/shape_margin
Expose bullet shape margin to UI.
2018-08-21 16:17:11 +02:00
Aaron Franke
a986686ac4 Rename Plane constants, add to Mono
But I'm not tagging PR as [Core] or [Mono] due to it being a minor change anyway.
2018-08-21 01:35:07 -04:00
Rémi Verschelde
4ea3e4f551 doc: Sync classref with current source 2018-08-21 00:35:46 +02:00
Juan Linietsky
d88d0d457d Fixes to move and slide and ray separation, implement separation in Godot physics 2018-08-20 17:31:55 -03:00
Juan Linietsky
1b66b08fdb
Merge pull request #20908 from AndreaCatania/kiSlope
Improved move_and_slide function stay on slope
2018-08-20 13:24:28 -03:00
Rémi Verschelde
661c9ece7c Add PROPERTY_HINT_PLACEHOLDER_TEXT for String properties
Use it to provide a better example for application identifiers
on Android, iOS and macOS, where users thought they *had* to use
this as a magic token.
2018-08-20 13:48:05 +02:00
Rémi Verschelde
789d1f2e07
Merge pull request #21208 from jmca/master
Prevent "cannot use a string pattern on a bytes-like object"
2018-08-20 09:30:01 +02:00
Justin Abene
c6a4ca5c9e Prevent "cannot use a string pattern on a bytes-like object"
Fixes #21207
2018-08-20 00:42:47 -04:00
John Teasdale
7323f7998b Bullet picking will now ignore objects without input_ray_pickable 2018-08-19 13:14:12 -07:00
Hugo Locurcio
649c3bee3b
Highlight multiline strings as strings instead of comments
Since multiline comments are not officially supported in GDScript, it is
more common to see multiline strings being used as strings rather than
as comments (which are actually standalone expressions here).

This closes #21142.
2018-08-19 13:47:57 +02:00
Andrea Catania
0010d9c82a Added ray shape and move_and_slide with snapping on 3D.
Added stop_on_slope on 2d part
2018-08-19 13:45:23 +02:00
Kelly Thomas
792a8446ac mono: add Abs() to Rect2 and rename private fields 2018-08-19 19:18:12 +08:00
Andrea Catania
9826456f2e Improved move_and_slide function to stay on slope and fall on steep slope 2018-08-18 15:11:51 +02:00
Ignacio Etcheverry
7287300433 Mono: Improve C# core files (glue/cs_files) buildsystem
- Search C# files recursively in 'glue/cs_files'.
- Determine a version for the C# core files automatically. The latest modified time will do for now.
2018-08-17 13:51:55 +02:00
Rémi Verschelde
968b31e971
Merge pull request #20561 from willnationsdev/script-class-ns
Add NativeScript support for script classes via exported script properties.
2018-08-16 20:03:49 +02:00
Rémi Verschelde
333999c24f Fix Theora/Webm loaders declaring binary extension
RES_BASE_EXTENSION is only to declare our proprietary binary formats
(e.g. "scn", "res", etc.).

Fixes #20395.
2018-08-16 19:17:24 +02:00
Tristan Porteries
e5bfa98d0f Expose bullet shape margin to UI.
The margin value is exposed into the UI for shape ressource.
This value can be modified through set_margin and get from get_margin
or by using the property margin. Each time the margin is modified
the associated collision shape is recreated and the margin value is
used in ShapeBullet::prepare.
2018-08-16 16:58:15 +02:00
Bastiaan Olij
4194581823 Delay initialising lens distortion shader so GLES2 doesn't crash 2018-08-16 20:42:47 +10:00
Andrea Catania
a12e3bab23 Improved 6DOF joint implementation, and removed useless function from cone joint 2018-08-15 18:14:32 +02:00
willnationsdev
05f717376b Add NativeScript support for script classes. 2018-08-15 10:58:13 -05:00
Will Nations
3ed9231117 Fix error spam from loading script class icons 2018-08-15 10:17:28 -05:00
Rémi Verschelde
040c6be426
Merge pull request #20560 from willnationsdev/class_icons
Add custom icons to script classes.
2018-08-15 15:16:29 +02:00
Rémi Verschelde
4548ec4a49
Merge pull request #20945 from neikeq/dict-erase-retbool
Dictionary: remove erase_checked(key), make erase(key) return bool
2018-08-15 01:08:23 +02:00
Juan Linietsky
4e55835e48
Merge pull request #18096 from aaronfranke/master
[Core] Split up math_2d.h
2018-08-14 18:58:32 -03:00
Will Nations
6d9cc032e7 Add custom icons to script classes. 2018-08-14 14:18:05 -05:00
Rémi Verschelde
b4f579b5ba
Merge pull request #20583 from neikeq/issue-15371
Fix case where exported properties value is lost
2018-08-14 21:08:56 +02:00
Kelly Thomas
815d08f10c mono: add constants to transform and vector structs 2018-08-15 02:03:36 +08:00
Ignacio Etcheverry
21d285e30f Dictionary: remove erase_checked(key), make erase(key) return bool 2018-08-14 19:19:05 +02:00
Ignacio Etcheverry
d7b9fcd336
Merge pull request #20890 from KellyThomas/mono-is-instance-valid
mono: add IsInstanceValid(), move WeakRef()
2018-08-14 18:12:18 +02:00
Kelly Thomas
9341129d14 mono: add IsInstanceValid(), move WeakRef() 2018-08-14 15:48:54 +08:00
Rémi Verschelde
695b8d254e SCons: Fix mono_root initialization
As advised by @neikeq.
2018-08-14 08:55:37 +02:00
Ignacio Etcheverry
c4e75aa63a
Merge pull request #20706 from mysticfall/issue-20705
Add missing GetPtr() for Dictionary<> and Array<>
2018-08-13 22:37:09 +02:00
Rémi Verschelde
139e621338
Merge pull request #20913 from pulkomandy/master
Rebase patches for fixing haiku build.
2018-08-13 21:26:15 +02:00
Teashrock
51a0a38135 Fixed absent variable exception while trying to raise another exception. 2018-08-13 16:28:28 +02:00
Chaosus
179e15f876 Remove usage console spam 2018-08-13 16:51:17 +03:00
Rémi Verschelde
68ab428d4d
Merge pull request #20155 from Tunous/line-edit-clear
Add clear button to search fields
2018-08-13 12:54:57 +02:00
Adrien Destugues
a294a842cb Rebase patches for fixing haiku build. 2018-08-11 17:20:51 +02:00
Juan Linietsky
b6b1d14ca1
Merge pull request #20753 from Faless/ws_fix
Fix WebSocket crash due to non PDO init after CowData PR
2018-08-11 09:45:12 -03:00
Łukasz Rutkowski
81fb81de9d Do not use theme to set LineEdit right_icon 2018-08-11 12:04:26 +02:00
Łukasz Rutkowski
e8a435c8cd Add clear text button to LineEdit
- Add pressed state to clear button
- Enable clear button on all inputs with search icon
- Remove duplicate clear buttons
- Fix rendering of icon for center and right alignments
- Add clear button to more search fields
- Add clear icon to default theme
- Add method to control enabled state of clear button
- Add property to enable clear button from inspector
2018-08-11 12:04:26 +02:00
Aaron Franke
cf136a91d6 [Core] Completely kill math_2d.h, change includes 2018-08-11 03:08:34 -05:00
Aaron Franke
28fc195339 [Core] Change math_2d includes to vector2 includes where relevant 2018-08-10 14:59:29 -05:00
George Marques
eb48119821
Added system for GDScript warnings
- Count and panel per script.
- Ability to disable warnings per script using special comments.
- Ability to disable warnings globally using Project Settings.
- Option to treat enabled warnings as errors.
2018-08-10 16:00:47 -03:00
Juan Linietsky
ea3d997f9d
Revert "added get_creation_time function for gdscript" 2018-08-10 13:29:49 -03:00
Juan Linietsky
275e0d5ee4
Merge pull request #18914 from notwarp/master
added get_creation_time function for gdscript
2018-08-10 13:28:47 -03:00
Juan Linietsky
c76f444c4e
Merge pull request #14704 from poke1024/colorconstants
Allow some non-integer built-in constants in gdscript
2018-08-10 12:57:20 -03:00
JFonS
59fd18ab1a New gizmo structure and new gizmo disabling menu 2018-08-09 20:58:39 +02:00
Juan Linietsky
14fd797c53
Merge pull request #20381 from AndreaCatania/phymat_2
Improved Physics material
2018-08-07 15:31:26 -03:00
Andrea Catania
5e65e28eed Removed physics material combination mode. Added rough and absorbent parameter to material. Fixed 'change' signal connection 2018-08-07 19:38:04 +02:00
Juan Linietsky
edde52c8de Added proper import support for 3D and Array textures 2018-08-06 14:56:06 -03:00
Fabio Alessandrelli
6a57f29573 Fix WebSocket crash due to non PDO init.
Move RingBuffer (and few related vars) to LWSPeer.
2018-08-06 03:47:02 +02:00
Marc Gilleron
6cf4f62f2b Allow to create a heightmap collision shape from an image 2018-08-05 19:43:47 +01:00
Juan Linietsky
c41397596d
Merge pull request #20693 from AndreaCatania/soft_fix2
Fixed SoftBody pinned point offset calculation
2018-08-04 09:10:57 -03:00
Xavier Cho
5d2c239772 Add missing GetPtr() for Dictionary<> and Array<>
Add missing GetPtr() method for generic versions of Dictionary
and Array to fix #20705.
2018-08-04 14:34:55 +09:00
Ignacio Etcheverry
b911165679
Merge pull request #20600 from exts/new_generic_methods
Mono: Added generic methods for PackedScene & ResourceLoader
2018-08-04 05:22:38 +02:00
exts
cdb4ae471b Added generic method for ResourceLoader: Load<T>() 2018-08-03 13:40:42 -05:00
Andrea Catania
b469267d94 Fixed SoftBody pinned point offset calculation 2018-08-03 17:44:09 +02:00
Ignacio Etcheverry
3fa2404a79
Merge pull request #20644 from NickToony/master
Fixed Windows mono compile
2018-08-01 03:52:46 +02:00
Nick Hope
24b4694313 fixed: windows mono compile (#20598)
tidy: formatting.
2018-07-31 21:16:47 +01:00
Ignacio Etcheverry
ccce161d0e
Merge pull request #20639 from neikeq/issue-20531-and-cleanup
Mono: Fix property set_value and cleanup
2018-07-31 20:10:04 +02:00
Ignacio Etcheverry
4172fa03b5 Mono: Fix property set_value and cleanup 2018-07-31 19:49:16 +02:00
Bernhard Liebl
ba974b8d1e Allow some non-integer built-in constants in gdscript 2018-07-31 17:56:48 +02:00
Ignacio Etcheverry
f3c7527225 Fix case where exported properties value is lost
Fixes exported property modified values lost when creating a placeholder script instance with a failed script compilation

- Object set/get will call PlaceHolderScriptInstance's new fallback set/get methods as a last resort. This way, placeholder script instances can keep the values for storage or until the script is compiled successfuly.
- Script::can_instance() will only return true if a real script instance can be created. Otherwise, in the case of placeholder script instances, it will return false.
- Object::set_script(script) is now in charge of requesting the creation of placeholder script instances. It's no longer Script::instance_create(owner)'s duty.
- PlaceHolderScriptInstance has a new method set_build_failed(bool) to determine whether it should call into its script methods or not.
- Fixed a few problems during reloading of C# scripts.
2018-07-29 22:40:12 +02:00
Hein-Pieter van Braam
0deb8dda51 Fix Mono compilation on Windows/Ming
(cherry picked from commit 83140541dc)
2018-07-29 22:31:38 +02:00
Rémi Verschelde
d8e1cd7a10 mbedtls: Update to upstream version 2.12.0
_WIN32_WINNT redefinition fix is no longer needed as it was merged
upstream. PR 1453 is still not merged, diff updated to current state.
2018-07-28 11:16:58 +02:00
Rémi Verschelde
4488bb9956
Merge pull request #20463 from fire/vs_expand_hints_to_virtual_func
Visualscript: Carry property hint and hint string through to Visualscript virtual funcs
2018-07-28 09:49:23 +02:00
Rémi Verschelde
66429a1576
Merge pull request #17595 from viktor-ferenczi/issue-5042-subproc
Running builder (content generator) functions in subprocesses on Windows
2018-07-28 09:20:50 +02:00
K. S. Ernest (iFire) Lee
2650b87102 Carry property hint and hint string through to Visualscript virtual functions. 2018-07-27 13:12:34 -07:00
Rémi Verschelde
aecc3a444b
Merge pull request #20457 from fire/vs_generic_search_crash_and_connecting
Visualscript: misc generic search changes
2018-07-27 21:38:11 +02:00
Viktor Ferenczi
c5bd0c37ce Running builder (content generator) functions in subprocesses on Windows
- Refactored all builder (make_*) functions into separate Python modules along to the build tree
- Introduced utility function to wrap all invocations on Windows, but does not change it elsewhere
- Introduced stub to use the builders module as a stand alone script and invoke a selected function

There is a problem with file handles related to writing generated content (*.gen.h and *.gen.cpp)
on Windows, which randomly causes a SHARING VIOLATION error to the compiler resulting in flaky
builds. Running all such content generators in a new subprocess instead of directly inside the
build script works around the issue.

Yes, I tried the multiprocessing module. It did not work due to conflict with SCons on cPickle.
Suggested workaround did not fully work either.

Using the run_in_subprocess wrapper on osx and x11 platforms as well for consistency. In case of
running a cross-compilation on Windows they would still be used, but likely it will not happen
in practice. What counts is that the build itself is running on which platform, not the target
platform.

Some generated files are written directly in an SConstruct or SCsub file, before the parallel build starts. They don't need to be written in a subprocess, apparently, so I left them as is.
2018-07-27 21:37:55 +02:00
Rémi Verschelde
33f1ca89a5
Merge pull request #20462 from fire/vs_don't_typeguess_nil
Visualscript: Don't type guess on nil and set default type to ""
2018-07-27 21:37:46 +02:00
Ignacio Etcheverry
92c59384ec
Merge pull request #17720 from paulloz/custom-csharp-glue
[mono] Generic Typed GetNode, GetChild, etc.
2018-07-27 18:47:19 +02:00
Bastiaan Olij
8a914f17b0 Fixed nativescript getter and setter logic 2018-07-27 23:45:29 +10:00
Bastiaan Olij
03d02e88fc Reenabled module and fixed missing const 2018-07-27 18:43:50 +10:00
Paul Joannon
877ea882ce
Add missing methods to Node class in the mono glue
* GetNodeOrNull<T>
* GetChild<T>
* GetChildOrNull<T>
* GetOwner<T>
* GetOwnerOrNull<T>
* GetParent<T>
* GetParentOrNull<T>
2018-07-27 08:50:35 +02:00
George Marques
e8da2a60b3
GDScript: Fix parse error in string formatting 2018-07-26 10:52:11 -03:00
K. S. Ernest (iFire) Lee
607e5b7c95 Visualscript: Don't type guess on nil. 2018-07-26 06:39:36 -07:00
Rémi Verschelde
ef93fec789
Merge pull request #15643 from organicpencil/bullet_contact_impulse
Expose PhysicsDirectBodyState.get_contact_impulse
2018-07-26 15:36:37 +02:00
K. S. Ernest (iFire) Lee
00519debbe Visualscript fix crash and generic search does not connect ports.
* Signal change requires function changes to _selected_new_virtual_method
2018-07-26 06:18:23 -07:00
Rémi Verschelde
96d37769d9
Merge pull request #20468 from vnen/typed-gds-fixes
General GDScript fixes
2018-07-26 13:48:37 +02:00
Rémi Verschelde
10af1b3444
Merge pull request #20477 from swarnimarun/vs_duplicate_fix
Fix Visual Script duplicate issue
2018-07-26 12:57:55 +02:00
Rémi Verschelde
391e46830f doc: Sync classref with current source
Fix various missing arguments in bindings.
2018-07-26 11:56:21 +02:00
Rémi Verschelde
47a7dc7b3c
Merge pull request #18282 from aaronfranke/better-mathf
[Core] [Mono] Fix Color missing int export methods, added 64-bit
2018-07-26 10:48:47 +02:00
Swarnim Arun
b893dc2028 Fix Visual Script duplicate issue 2018-07-26 14:01:48 +05:30
George Marques
0b78e4f9e3
GDScript: Add type inference syntax for function arguments 2018-07-25 21:06:35 -03:00
George Marques
7db7b43cb0
GDScript: Fix type detection for String formatting operator 2018-07-25 20:50:13 -03:00
George Marques
aeb0b3114d
GDScript: Fix type detection on Object typed assign
Also make typed assigns a debug-only thing, so release builds are more
lenient on errors.
2018-07-25 20:50:12 -03:00
George Marques
a3ae4a9510
GDScript: Allow accessing constants of outer classes 2018-07-25 20:50:12 -03:00
George Marques
a62f4af7ba
GDScript: Enable built-in function introspection in non-tools
Only for debug builds. Fix problems in non-tools targets.
2018-07-25 20:50:12 -03:00
George Marques
3d6609303b
GDScript: Fix bogus error when a cursor token is found on class 2018-07-25 20:50:12 -03:00
George Marques
1ac9c0fe3a
GDScript: Allow strict conversion when assigning typed variables 2018-07-25 20:50:12 -03:00
George Marques
96ee93e8c7
GDScript: Fix mismatching between export hint and type hint 2018-07-25 20:50:12 -03:00
George Marques
4cb17191b8
GDScript: Allow inherited method to add optional arguments
Also show the parent method signature in the error message.
2018-07-25 20:50:11 -03:00
George Marques
cd6ad5462c
GDScript: Fix returned value of get_default_argument_count() 2018-07-25 20:50:11 -03:00
George Marques
65c069c8d9
GDScript: Fix main script detection 2018-07-25 20:50:11 -03:00
George Marques
b7bd85e70c
GDScript: Look up local scope first for detecting type 2018-07-25 20:50:11 -03:00
Hein-Pieter van Braam
0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Aaron Franke
e3368d692d [Mono] Fix Color incorrect ordering of int export methods, added 64-bit
[Mono] Fix Color incorrect ordering of int export methods, added 64-bit long export methods.
2018-07-25 15:34:24 -05:00
Ignacio Etcheverry
762c912e8e Fix continuous attempt to reload domain with API assemblies out of sync 2018-07-25 21:54:21 +02:00
Ignacio Etcheverry
f1130f9a8a Mono: Fix domain reload never triggering 2018-07-25 21:31:02 +02:00
Ignacio Etcheverry
8edf85b09c Fix '!valid' error spam on C# script instance create 2018-07-25 21:30:49 +02:00
Ignacio Etcheverry
5aefe5d936 Mono: Fix null dereferences 2018-07-25 21:30:11 +02:00
Rémi Verschelde
19fe78fe6f
Merge pull request #20450 from fire/vs_generic_search_20433
Visualscript: Don't show Shift+A search box at every screen.
2018-07-25 20:54:45 +02:00
Max Hilbrunner
bacc02b7d8
Merge pull request #20452 from fire/vs_hide_empty_categories_20433
Visualscript: Hide empty categories for basic types and methods.
2018-07-25 20:08:05 +02:00
K. S. Ernest (iFire) Lee
31008c9199 Visualscript: Don't show Shift+A search box at every screen and reuse EDIT_FIND_NODE_TYPE (ctrl-f) shortcut.
The generic search shortcut is now CTRL-F.
2018-07-25 09:34:52 -07:00
Ignacio Etcheverry
fe28e323b3
Merge pull request #20298 from PJB3005/18-07-20-mono-partial-api-ext
Makes Mono binding classes partial & adds GetNode<T>.
2018-07-25 18:03:57 +02:00
K. S. Ernest (iFire) Lee
5b2c4b77e2 Visualscript: Hide empty categories for basic types and methods. 2018-07-25 08:56:03 -07:00
Thomas Herzog
95d9302248
Merge pull request #20370 from marcelofg55/gdnative_crash
Fix possible crash at NativeScript::get_base_script
2018-07-25 17:09:51 +02:00
Marcelo Fernandez
77f3c0b495 Fix possible crash at NativeScript::get_base_script 2018-07-25 10:58:15 -03:00
Rémi Verschelde
f778bd8e69
Merge pull request #20404 from TigerCaldwell/master
Ensured consistency between RigidBody, PhysicsDirectBodyState, PhysicsServers and their 2D counterparts
2018-07-25 08:25:34 +02:00
Juan Linietsky
2e67fc57e6
Merge pull request #18867 from fire/better_vx_us_rebase_02
Improve VisualScript UX
2018-07-24 18:02:10 -03:00
K. S. Ernest (iFire) Lee
85670726fd Improve VisualScript UX
* Prototype faster function call ux.
* Work on general search ux.
* Able to create nodes from search.
* Show class for variables but not methods.
* Get actions search working.
* Descriptions now show for both methods and properties.
* Enable zooming on mouse wheel up and down.
* Make the drag trigger on right mouse button.
* Search now shows for action visual script nodes.
* Able to search visual node names.
* Search works better.
* Change zooming scale to hide artifacts better.
* Remove zoom changes
* Select from base should check properties too like the other functions.
* Seq_connect flag is needed to set sequence lines correctly.
* Remove comment
* Code cleanup with function names and arguments.
* Use brief description for search descriptions.
* Clean and fix bug with input nodes connecting with sequence lines.
* Add a warning and fix some edge conditions with sequence into data lines and vice versa.
* Don't search functions when pulling from a sequence node.
* Don't show actions when pulling from a data line.
* Set set and get properties.
* Convert visual script operators to the correct type
* Create a function preset finds only functions.
* Singletons can now find functions.
* Add shift-a for generic search.
* Add brief descriptions for Visual Script nodes.
* Search boxes can now filter names.
* Add bigger hit zones to node connect.
* For the drop zones, make all the rect2 areas the same size.
* Function names in visual script node should be lower case so that search works better.
* Use the convention of capitalize() for set, set, visual script nodes and methods.
* Make search more general. Ignore "_" and make case-insensitive. Also made the search window smaller and remove extra info from search
* Make type_cast use the connecting node's type and remove use of found variable.
* Fix case where you call an instance's call function where it becomes an invalid call.
* Make get_visual_node_names use a set of filters, move action creations and fix bug with sequence node connections.
* Make the window bigger.
* Make connect_data and connect_seq more robust.
* Add icons to search items.
* Add vs constructors in shift-a menu.
* Operators, builtins and constructors show type name. Fix several problems with port connections.
* In shift-a mode search everything.
* Code cleanup
* Work on autocompleting the type.
  * Use type guess in action creation.
  * Check if type hint string exists in object variables when generating the visual script search.
  * Add the hint to SceneTree.
  * Add original type detection.
  * Make type casting great again. This puts the type casted base type as the data output type string hint.
  * Pass the type in a VisualScriptFunctionCall too.
  * Set the base type correctly in VisualScriptFunctionGet and VisualScriptFunctionSet using hint string.
  * Make sure the instance is passed in VisualScriptPropertySet.
  * Restore search on the node's type.
* Remove dependencies from graph_edit.
* Remove dependencies from property_selector and name the class visual_script_property_selector.
* Extract hot zones into a function.
* Move hot_zones constants into default theme.
* Bigger capture zones.
* Clean messy port_grab_distance variables.
* Remove RMB functionality.
* Remove memory leak on showing visual script descriptions.
* Read the port_grab_distance constants on enter tree and theme changed.
2018-07-24 13:59:28 -07:00
Max Hilbrunner
b92c432313
Merge pull request #19225 from Paulb23/open_all_files_in_script_editor
Open all files in script editor
2018-07-24 21:52:11 +02:00
Tiger Caldwell
40c7716586 Modified RigidBody, PhysicsDirectBodyState, PhysicsServer, and their respective 2D counterparts to be more consistent and to include more useful methods.
RigidBody:
- Added add_central_force
- Added add_force
- Added add_torque
- Added apply_central_impulse

RigidBody2D:
- Added add_central_force
- Added add_torque
- Added apply_central_impulse
- Added apply_torque_impulse

PhysicsDirectBodyState:
- Added apply_central_impulse

Physics2DDirectBodyState:
- Added add_central_force
- Added add_force
- Added add_torque
- Added apply_central_impulse
- Added apply_impulse
- Added apply_torque_impulse

PhysicsServer:
- Added body_add_force
- Added body_add_torque
- Added body_add_central_force
- Added body_apply_central_impulse

Physics2DServer:
- Added body_add_torque
- Added body_add_central_force
- Added body_apply_central_impulse
- Added body_apply_torque_impulse

Also fixed some small bugs along the way
2018-07-24 05:00:56 -04:00
Wilson E. Alvarez
a22e746bc3 Removed unnecessary assignments 2018-07-24 09:51:03 +02:00
Ignacio Etcheverry
779c9d638e
Merge pull request #15880 from neikeq/better-collections
Mono: Add Dictionary and Array classes
2018-07-23 23:59:04 +02:00
AndreaCatania
17ebbfb56d Implemented Soft body
- Soft Body Physics node
- Soft Body Rendering
- Soft body Editor
- Soft body importer
2018-07-23 20:50:23 +02:00
Juan Linietsky
1ad20dc2f1
Merge pull request #12403 from AndreaCatania/phymat
Physics material
2018-07-23 07:37:03 -03:00
Rémi Verschelde
df170d81cc Mono: Default to not shipping C# scripts content
Fixes #20053.
2018-07-22 17:28:17 +02:00
Paulb23
8ff747171f Allow opening and editing of any utf_8 file in script editor 2018-07-22 11:55:56 +01:00
Ignacio Etcheverry
525384d8cc
Merge pull request #20337 from aaronfranke/mono-pascal-gd
[Mono] Improvements to GD.cs: PascalCasing and real_t
2018-07-22 03:49:58 +02:00
Rémi Verschelde
7478649b2f
Merge pull request #20229 from aaronfranke/mono-warning-text
[Mono] Update about/warning text
2018-07-22 00:40:15 +02:00
Aaron Franke
174cf31d00 [Mono] Improvements to GD.cs: PascalCasing and real_t
[Mono] Improvements to GD.cs: PascalCasing and real_t
2018-07-21 16:40:46 -05:00
Rémi Verschelde
92415365c8
Merge pull request #19264 from vnen/typed-gdscript-final
Typed GDScript
2018-07-21 23:13:51 +02:00
Juan Linietsky
2b9902db06 -Fix disable_3d flag
-Add extra flag optimize=[size,speed] to be able to prioritize size
2018-07-21 17:26:49 -03:00
Aaron Franke
69530ef614 [Mono] Update about/warning text
I've removed the section about being unable to export games using C# - as you are now able to do this, as long as the export templates are installed. Also, I've made a few minor grammar tweaks.
2018-07-21 15:26:41 -05:00
George Marques
3e87ad5187
Rewrite code completion
- Use data type struct from the parser.
- Avail from type hints when type can't be guessed.
- Consider inner classes and other scripts when looking for candidates.
2018-07-20 21:55:18 -03:00
George Marques
3445dca01d
Add ability to infer variable type from assigned value
Syntax: var x : = 42
Infers the type of "x" to be an integer.
2018-07-20 21:55:18 -03:00
George Marques
03746da73f
Add editor highlight for type-safe lines
The line number is hightlighted to indicate that the line contains only
type-safe code.
2018-07-20 21:55:18 -03:00
George Marques
a2305cd8b2
Fix line number detection in some parser nodes 2018-07-20 21:55:17 -03:00
George Marques
75f395c2a0
Use type hints to improve completion
- Allow type hints to be completed.
- Use type information to infer completion candidates.
- Show typed function signature in tooltip.
- Add type hints when completing declaration from virtual functions
(optional).
2018-07-20 21:55:17 -03:00
George Marques
95351ac867
Add syntax highlighting to type hints 2018-07-20 21:55:17 -03:00
George Marques
e3d72d14ff
Use type information to enable GDScript introspection
This makes the Script API provide accurate information when requesting
property or method info.
2018-07-20 21:55:17 -03:00
George Marques
4b18c4e448
Add typed instructions to GDScript
- Typed assignment (built-in, native, and script).
- Cast (built-in conversion; native and script checks).
- Check type of functions arguments on call.
- Check type of members on set.
2018-07-20 21:55:17 -03:00
George Marques
743053734f
Add static type checks in the parser
- Resolve types for all identifiers.
- Error when identifier is not found.
- Match return type and error when not returning a value when it should.
- Check unreachable code (code after sure return).
- Match argument count and types for function calls.
- Determine if return type of function call matches the assignment.
- Do static type check with match statement when possible.
- Use type hints to determine export type.
- Check compatibility between type hint and explicit export type.
2018-07-20 21:55:16 -03:00
George Marques
f7793fc5c9
Store type hint of declared identifiers 2018-07-20 21:55:16 -03:00
George Marques
b7a00aead0
Move inheritance resolution to the parser 2018-07-20 21:55:16 -03:00
George Marques
8aab9a06d4
Add typing syntax 2018-07-20 21:55:16 -03:00
Juan Linietsky
6c09cdd136
Merge pull request #20157 from GodotExplorer/image-load-webp
Add webp buffer loader for Image
2018-07-20 12:00:21 -03:00
Pieter-Jan Briers
a8c97eb094 Makes Mono bindings partial & adds GetNode<T>. 2018-07-20 13:55:13 +02:00
Ignacio Etcheverry
a85f0f89fe
Merge pull request #20257 from oisincar/fix_basis
Fix bug with Basis.Transposed()
2018-07-20 06:47:15 +02:00
Ignacio Etcheverry
ee3c476c9a Add Array and Dictionary wrapper classes to C# 2018-07-20 01:44:30 +02:00